Home   Help Search Login Register  

Author Topic: switchmove problems  (Read 696 times)

0 Members and 1 Guest are viewing this topic.

richy-c

  • Guest
switchmove problems
« 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.

Iwesshome

  • Guest
Re:switchmove problems
« Reply #1 on: 31 Mar 2003, 16:14:36 »
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.

Quote
;---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

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:switchmove problems
« Reply #2 on: 31 Mar 2003, 16:16:18 »
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.
« Last Edit: 31 Mar 2003, 16:19:47 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline OFPWiZard

  • Members
  • *
Re:switchmove problems
« Reply #3 on: 31 Mar 2003, 16:18:48 »
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

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:switchmove problems
« Reply #4 on: 31 Mar 2003, 17:00:29 »
VOLKOM TO DA FURUMS!

 ;D

richy-c

  • Guest
Re:switchmove problems
« Reply #5 on: 01 Apr 2003, 13:04:10 »
I have tried the script but i keep getting an "unknown operator"message.what am i doing wrong.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:switchmove problems
« Reply #6 on: 01 Apr 2003, 14:53:36 »
"unknown operator" usually means a spelling mistake or typo.    Maybe you have an extra space somewhere, or you have missed out a ".
Plenty of reviewed ArmA missions for you to play