Jump to content
Sign in to follow this  
Sandy106

3 questions - brand new to editing

Recommended Posts

I'm trying to make my first mission in the editor and I can't figure out how to properly enter stuff into the initialization box. The BI wiki doesn't explain it either. When I try to type it in like in the following picture it gives me a missing semicolon error

tuAfB.png

So my questions are:

1 What's the proper syntax to enter that in?

2 Is it possible to edit multiple units at once? I tried selecting group mode and double clicking the group leader but it only edits the group leader and not the other units in the group.

3 Whats the proper syntax for adding multiple commands in the initialization box?

Share this post


Link to post
Share on other sites

1.

this allowFleeing 0;

2. Nope. Sometimes you can use code to do that though. Like this will move all of a group's units into a vehicle called car1 without having to select In Cargo or use multiple moveInCargo commands:

{_x moveInCargo car1} forEach units group this;

3. A trick you can use is click ON the command (like after the 'w' in allowFleeing) and press F1. You'll get context sensitive help. For your example it would have shown you that the syntax for allowFleeing is unit:object,Group allowFleeing courage:number hence the this allowFleeing 0 as above. Sometimes there's even a copyExample button to copy the code to use.

As you type it will give you examples as well. So after you type allowfl you should have seen

unit allowFleeing courage
as a tooltip. The reason you were getting the "missing ;" error was that you weren't listing the unit part of the command so it didn't know what you wanted.

Make sense? :)

Edited by kylania

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×