OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ball Zack on 12 Jun 2003, 02:00:42
-
I am creating a music video where Osama sings a song and then gets blown up... anyway towards the end there is an instrumental part where I want Osama to start moonwalking like Michael Jackson. I was thinking that it might be possible if I use a waypoint to make him walk in one direction, but then use a movement script to pull him backwards, making it appear as if he is moonwalking backwards. Anyway if someone could please try this and send me a sample mission, I would be more than happy to include you in the credits for my music video...
-
I am not sure if this is what you want, but it is still pretty funny :D Set endmoonwalk to true to exit the moonwalk.
The script is:
_unit = _this select 0
#loop
_unit setpos [(getpos _unit select 0) + sin (getdir _unit + 180) * 0.08, (getpos _unit select 1) + cos (getdir _unit + 180) * 0.08,0]
~0.01
?endmoonwalk:exit
?!(alive _unit):exit
goto "loop"
You can find an example here:
http://www.red-dev.net/missions/test_moon.zip
RED
-
thanks Ill try it out.
-
YES!!! This is perfect this is exactly what I was talking about. I modified it a little bit, here is my version...
-
Looks good, have fun :)
RED
-
I do have one question. How do I make the script shut off after several seconds?
-
_unit = _this select 0
_timelimit = _this select 1
_pause = 0.005
_i = 0
#loop
_unit setpos [(getpos _unit select 0) + sin (getdir _unit + 180) * 0.08, (getpos _unit select 1) + cos (getdir _unit + 180) * 0.08,0]
_timelimit
~_pause
_i = _i + _pause
?_i >= _timelimit
?endmoonwalk:exit
?!(alive _unit):exit
goto "loop"
Execute the script with [unitname, timeinseconds for script to work for] or you could just set endmoonwalk to true.
RED
-
ok thanks