gametechmods
Robot Arena => General Support => Topic started by: G.K. on August 29, 2010, 10:48:23 AM
-
How do you execute commands from the F9 python window. I type it in, but then don't know what to press. Enter does nothing.
-
what commands you be talking bout? the FB f9 cheat thing? Theres a few steps before you can do the commands. Try reading the readme.
-
Not cheating, but I was trying to do this:
If you would like to test it, all you need to do is use this python code: plus.getHitpoints(BotID, CompID)
And when I typed the command in and pressed enter, nothing happened.
-
you sure you did BOTID and COMPID correct?
-
Is (1,3) correct?
-
I think your running into four somewhat related problems:
1. If you want text to be returned, you need to add the "AIHelpers=1" line to "RA2.cfg" (anywhere inside of the 'RA2 Config' section). Doing this sometimes causes problems (especially in DSL) but its really handy IMO and you can always set it to 0 when your done.
2. If you install Firebeetle's Cheat Menu mod, his other modification to RA2.cfz allows you to press the tilda (~) key instead of pressing F9. By using the tilda key instead F9, you don't need to "turn off" refreshing (by typing "showFPS(0)" into the debug window). If you want to manually add this feature, all you have to do is add this to "RA2.cfg":
[Begin Input Config]
device0 = guid a5e224e0 9cd4 11d7 80 1 44 45 53 54 0 0; deadzone 500
device0 = guid 4cb8b0d0 9e7a 11d7 80 1 44 45 53 54 0 0; deadzone 500
[End Input Config]
3. The debug window automatically imports the plus module as "from plus import *" so you don't need to have "plus." before "getHitpoints." If you want to use the same syntax as Arenas and AI then type "import plus" before typing "plus.getHitpoints(BotID, CompID)"
4. Replace BotID with the position that the bot is taking up (0-3 depending on which starting position they were assigned at the start of the battle). Replace CompID with the ID number of the component that your looking at (0=chassis, 1=first component attached, 2=second component attached, etc.)
-
BUMP:
I've got to step 3, but once I type the command in, I find no way of executing it. What key am I supposed to press?
-
You may either press Enter after each command or have a semicolon separating each command.
For something like this, I would just type something like: print getHitpoints(0,2)
(with slightly different parameters)
before hitting Enter.
-
ah, thanks