Jump to content
Sign in to follow this  
ViperCheese

Longer animations

Recommended Posts

How do I increase the amount of pushups done with the this switchmove "FXStandtodip" command and the amount of time a guy has his arms crossed with "this switchmove "FXCivilFoldOnesArms"

Share this post


Link to post
Share on other sites

Use a loop.

Here's a script to make a specified soldier do 10 push ups. Note the use of the PlayMove statement, it ensures smooth transition between animations.

USAGE:

[mysoldier] exec "pushups.sqs"

Pushups.sqs:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

; Parameter 1: Unit to do press ups.

_soldier = _this select 0

_j = 0

#lp

? _j == 10: goto "end"

_soldier playmove "FXStandDip"

_j = _j+1

~1.5

goto "lp"

#end

exit

Share this post


Link to post
Share on other sites

thanks but I get an error that says

" _soldier = _this select 0|#|': Error Select :Type Object, expected Array

??

Share this post


Link to post
Share on other sites

You did copy that text into a file called pushup.sqs didn't you?

And [] exec'd it from the unit's initialisation section in the mission editor?

What to do:

1) Go to mission editor

2) Place a soldier on the map

3) Double click the soldier to bring up its properties

4) Name the soldier mysoldier.

5) In the soldier's initialisation section, type:

[mysoldier] exec "pushups.sqs"

the [] are very important.

6) Save the map and make sure pushups.sqs is in the same directory as the map's .sqm file.

Share this post


Link to post
Share on other sites

does it work the same way if i want a couple of soldiers stand on knee with their hands on their heads? untill all enemys within a 100m perimeter is dead and a friendly soldier comes within 5m from the men? and that they join the friendly squad after that? (a hostage rescue)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×