OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kneehi on 19 Sep 2009, 00:50:49
-
Sorry guys, i could'nt find a good topic for this.
Hi to you all :)
How can i make a unit to do push ups continually?
I got this script to a cutscene, for example, but the man just do 2 push ups than stand up.
Hope you got some answers please..
Here it goes:
titlecut [" ","BLACK IN",3]
opdruk1 playmove "FXStandToDip"
enableradio false
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
_cam camsettarget target1
_cam camsetrelpos [-80,100,7]
_cam camcommit 0
@camcommitted _cam
~2
blah blah blah insert the rest of the script here
~2
titlecut ["","BLACK OUT",2]
~2
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
enableRadio true
exit
Sorry my bad English, BR here. :D
-
If I remember correctly there are two loons doing continual push-ups in the training mission of the Cold War Crisis campaign. You could depbo that mission and see how BIS did it.
I suspect a separate script which loops.
-
#loop
? ! (alive loon1): exit
loon1 playmove "fxstandtodip"
~6
;adjust the seconds to suite your needs.!
goto "loop"
And that's all!
-
Haroon1992 In the very start of the script(the cutscene one) i put : push1 exec "pushups.sqs" which was the name i gave to your script.
but the guy do 2 pushups, than stand up, than do two more pushups, than stantd up again,and there it goes...
And please, where can i find a depbo program?
thanks guys.
-
Search is your friend (http://www.ofpec.com/ed_depot/index.php?action=list&cat=to&type=me).
-
Continuous press-up loop; it takes three seconds for a unit to do two press-ups / push-ups
#begin
loon switchMove "FxStandDip"
~3.0
goto "begin"As long as they don't need to be seen starting and stopping.
-
Continuous press-up loop; it takes three seconds for a unit to do two press-ups / push-ups
And that solves it!
Haroon1992........................
-
So, you guys are saying that there is no way to make a unit to do push-ups continually, without standing up, than doing two more push-ups? :confused: ???
How sad :(
Thanks bedges, i found it in other place.
I had depbo the training mission. I realized that it is a little cofusing, but i can handle with that.
i just wanted to know how to do that from a scrpt.
Thanks again.
-
Hey,if possible, why not post the script here......
So in the future, we can refer this thread to some one needing it...........or someone will able to find this thread via the search...
Haroon1992................................................................
-
In fact, it is activated only by triggers, so, i can't put it into my script directly.
I think the problem is solved.
Thank you all again.
And again, sorry for my bad English, i'm Br.
-
Here is a simple script that allows you to define the unit doing the pushups and how many pushups he will do.
_u = _this select 0
_n = _this select 1
~ random .5
_c = 0
_u switchmove "FXStandToDip"
~ 3
#loop
_u switchmove "FXStandDip"
~ 3
_c = _c + 1
? _c < _n : goto "loop"
exit
Execution is like this: [pushupguy, 50] exec "pushups.sqs"
pushupguy is the unit who will do the pushups (name him whatever you like) and 50 is the number of pushups (you can change the 50 to whatever you want).
The random .5 at the start of the script allows you to have many units doing pushups but not in perfect unison (it looks dumb if they are doing them in perfect timing with each other). To execute the script on multiple units do something like this:
{[_x, 25] exec "pushups.sqs"} forEach units group pushupguy
This will make everyone in pushupguy's squad do 25 pushups.