In my script I have a string and I want to see its value so I know if everything is working. Is there any way I can do this?
The only way I can thing of, is creating a file then writing the string to that file. There has to be an easier way than this. Anyone?
How do you view debugging output?
Moderator: Moderators
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: How do you view debugging output?
So anyone have any ideas on getting output other than using ShowMessageText() ? Developers, where is print() displaying to and how can I view its output?
RE: How do you view debugging output?
print() is displaying to the stdout of the program, and I forget if print() is disabled in release builds or not. If it does work, print() should output to the logfile from BF2_modtools.exe.
Maybe you could just display an objective-update message with that string, instead...
Mike Z
Maybe you could just display an objective-update message with that string, instead...
Mike Z
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: How do you view debugging output?
Thanks. Now if I had only bought the cd version...
I'm only seeing UpdateObjectiveMessage() in ObjectiveSpaceAssault.lua. I'm not really sure what the objective message that is being updated is.
My end goal is to limit the type of units a player can use based on the rank in the player's user name (BFG tournment members have ranks). I can determine if a string contains a rank by using find(), but I don't think I've been able to get the player's name. I can't really tell because I don't have a way to output the string I'm testing. Can you think of anything else that might help with this?
I'm only seeing UpdateObjectiveMessage() in ObjectiveSpaceAssault.lua. I'm not really sure what the objective message that is being updated is.
My end goal is to limit the type of units a player can use based on the rank in the player's user name (BFG tournment members have ranks). I can determine if a string contains a rank by using find(), but I don't think I've been able to get the player's name. I can't really tell because I don't have a way to output the string I'm testing. Can you think of anything else that might help with this?
RE: How do you view debugging output?
If you want to display something in the "X Killed Y" display list, you can use
ShowMessageText(string)
optionally you can give it a team number that you have defined to only show it to that team
ShowMessageText(string, REP)
CTF uses this for flag notifications.
Mike Z
ShowMessageText(string)
optionally you can give it a team number that you have defined to only show it to that team
ShowMessageText(string, REP)
CTF uses this for flag notifications.
Mike Z
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: How do you view debugging output?
Is there a way to tell it what X is? For example, can I somehow pass in "whatever" in ShowMessageText so it says "whatever killed Y" instead of "X killed Y" or are those variables hard coded inside the game? I know I could do ShowMessageText( "message.whatever" ), but can it be done the other way?