OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: richy-c on 31 Mar 2003, 16:01:38
-
Hi.i am quite new to editing and have run into problems involving the switchmove command.I am trying to get a soldier to repeatedly do some pressups,but he does it once and stands up again.please help.
-
Richy-c
Welcome to the forums... You need to create a script and place it in your mission. This is what I found from searching the forums that will be able to help you.
;---Start----
_unit = _this select 0
_moves = _this select 1
_i = 2
#routine
_unit playmove "FXStandDip"
_i = _i + 1
? _i < _moves : goto "routine"
exit
;---End----
You activate it [unit, amount of push-ups] exec pushup.sqs
example "[dude, 10] exec pushup.sqs"
Just remeber to save the attached file to pushup.sqs
IW
-
I have a feeling its harder than it sounds.
endPressUps=false
#loop
loon1 playmove "FXStandToDip"
~2
?endPressUps:exit
goto "loop"
looks good on paper but he does two, stops, stands up, then starts again, which is hardly continuous. Also he drifts to his right.
Edit: Well IW beat me to it ;D ... you'll need to rename his script pushups.sqs and put a delay like this ~1 in the loop.
If you're not sure how to use script files read snYpir's excellent Introduction to code snippets in the Editors Depot.
-
Ok i know what you mean:
The only way i know how to do it is make like 5 trigger of the same trigger over the person.
Look at this picture:
Also if you want the person be standing then put his gun on his back, then do his push ups, make the switchMove be playMove in this command line; unitname switchMove "FXStandDip"
bye
-
VOLKOM TO DA FURUMS!
;D
-
I have tried the script but i keep getting an "unknown operator"message.what am i doing wrong.
-
"unknown operator" usually means a spelling mistake or typo. Maybe you have an extra space somewhere, or you have missed out a ".