OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Scratchdat on 09 Jun 2004, 18:04:37
-
Should be quite simple but apparently its not.
Basically I want a unit to use his binoculars, but
unit selectWeapon "Binocular"
doesn't seem to work, even though the unit has binoculars in his inventory.
Any ideas?
-
:) yea, dude. ya need to use the default "play/Switch-Moves" from a list, pref. using a script :
Name a guy Bob, then in a scroll you put:
Bob playMove "StandToBinocStand"
..or whatever the code is. And then a short delay before you loop the command. ;) :thumbsup:
And finally, a trigger could fire the magic word that would cut the loop & exit the script.
Example:
#loop
~2
bob switchMove "CombatRunFtoLying"
~2
bob selectWeapon "binocular"
?notbozoBinocing: bob switchMove "auto", exit
goto "loop"
som'n like that would make bob lie down & use them binocs ::) ;D
later :-*
-
Cheers m8
:thumbsup:
-
Should be quite simple but apparently its not.
Basically I want a unit to use his binoculars, but
unit selectWeapon "Binocular"
doesn't seem to work, even though the unit has binoculars in his inventory.
Any ideas?
Works for me, make sure you put the unit in SAFE behaviour.
@Tomb
bob switchMove "auto",
???
do you mean ?
bob setunitpos "AUTO"
-
:) nope, m8
I was talking about animations... If you selectWeapon Binocs, he'll pocket them again
after a short while. To avoid this (for cutscenes or alike), a looped scroll works better. :thumbsup: