OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 29 Sep 2005, 19:40:55
-
ive created this little script
_grpw = _this select 0
_pos1 = [getpos leader _grpw select 0,(getpos leader _grpw select 1)-5,getpos leader _grpw select 2]
"SoldierWLAW" createunit [getpos _pos1, _grpw]
~0.75
"SoldierW" createunit [getpos _pos1, _grpw]
~0.75
"SoldierW" createunit [getpos _pos1, _grpw]
exit
_this select 0 is the groups name eg grpBravo wich i initialised from the leaders init field
the problem is that the unit isnt created and i get an error about the group after the first comma in the line to create the unit where you assign the group
why isnt this working ?
cheers
-
Try to remove the getpos command.
Klavan
-
You can't getpos an array. You allready defined the position, and you can't use getpos on a position, only an object. Its pretty much the same thing as going "setpos getpos (getpos object)".
Also, you are probably going to want to add some more parameters in that command, like skill and init.
-
so i should get rid of the getpos okay will do then try later
also is there an actualy default skill level ? is it 0.5 or is it 0 or what ?
cheers
-
Everything that you set with a slider in the editor is a 0-1 value.
-
but he was asking for default, and the default value is 0.5