March 10 2025 19:34:28
Navigation
Users Online Now
· Guests Online: 1

· Members Online: 0

· Total Members: 1
· Newest Member: admin
Forum Threads
Latest Discussions
No Threads created
Hottest Threads
No Threads created
Latest Articles
· MapDataEditor
· Project Nomad
· Upcoming updates
· IA Vision tool
· Map DataEditor tool
Articles Hierarchy
Articles Home » Scripting school » Scripting 1.
Scripting 1.
Key
This can be any key on the keyboard. To get the name of a key. Write this in the console 'kb_ShowKeys 1'. This will
show all the keys that are pressed.
Note: the console command kb_ShowKeys will show a list of all keys available.

ACTION This can be any of the functions avaliable in The Outforce, including the 'bind' function itself.
Binding Examples

bind("DOWN", "", "k", "echo (\"Hello World!\")";

This binds the key 'k' to the Echo command. The bind will print 'Hello
World!' to the console.

bind("UP", "CONTROL ALT", "G", "echo (\"Eek the Geek!\")";

This binds Control-Alt-G to say 'Eek the Geek!' whenever you press those keys.

COMMANDS

Any Outforce command can be used in a script. We will not list them all here, since that can be done from inside The Outforce. To get help about a command just type the command and auto-complete with Shift-Tab, If you only need to see the syntax for the command, press Ctrl-Tab.

Command Examples

Echo(str S)

Prints the string S to the console.

ScreenEcho(str S)

Prints the string S to the screen. Very useful.

Exec(str Filename)

Executes a file with script commands.

ss_UnitArrayMove(X1, Y1, X2, Y2 ... XN, YN)

Moves the selected units into a formation around the mouse cursor, occupying all the coordinates entered.

ss_Build(str UnitName, float X, float Y)

Makes a building unit add a building order at X, Y position. The orign of the position is the mouse position.

Tips

If all this looks complicated, check the original Outforce scripts. There are some goodies there. Don't be afraid of change those scripts, but make a backup copy of them first!

Matrix says: Go figure!

Foot note: Magnus "Matrix" Auvinen works as a programmer at O3 Games, and claim no affiliations with the movie. He furthermore wishes it to be publically known that he had this nickname long before Mr. Neo Andersson decided to take the pill.
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.
Ratings
Rating is available to Members only.
Please Login or Register to vote.

No Ratings have been Posted.
Sign In
Enter Username

Password



Not a member yet? Click here to register.

Forgot Password?
RSS Feeds
Articles Blog Downloads Forums News Web Links
7,648 unique visits