OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gooner861 on 26 Apr 2004, 16:50:14
-
How can u put multiple commands into a units initialization field.
Ive tried doing this in the init field:
this setBehaviour"COMBAT" : next comand.
Help? ;D
-
simple...
blah blah blah this is the first command blah; blah blah blah this the second blah; blah blah blah and finally third
;D
-
You need to put a ;, example:
this setbehaviour "COMBAT"; this dotarget loon1
:beat: *Gets Shot* :beat:
EDIT: Damn! I wasn't fast enough! ;)
-
Damn, i knew it wud b sumthing stupidly easy.
-
No questions are stupid. Try reading some more tutes at OFPEC's excellent ed depot though. ;)
:beat: *Gets Shot* :beat:
-
when you have a lot of commands which you like to insert in a init field, you could also make a script for.
;myinit.sqs
_unit = _this select 0
_unit setbehaviour "COMBAT"
_unit setcombatmode "RED"
removeallweapons _unit
_unit addmagazine "M16"
_unit addweapon "M16"
exit
...and in the init line you just put
[this] exec "myinit.sqs"
not necessarly though but it is easier to overview it
@Armstrong
hehe...beat you by 23 seconds
:beat: *shots* :beat: