OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: HedgeHog on 16 Oct 2008, 15:57:39
-
If I need to make a cutscene start while the player is flying in a plane/chopper, which commands should I use at the beginning of the camscript to avoid the player's crash?
I would be pleased if you could also remind me some other "useful commands" to make the player not to move/being shot at during an ongoing mid-mission cutscene.
And if the cutscene starts during a wild gunfight (as the trigger's conditions turn true) what do you think is good to momentarily stop the fight? To turn captive all the soldiers involved? A bit tricky, I suppose!
Thank you in advance! :D
-
Dunno about the crashing, but for stopping the gunfight use the following:
west setFriend [east,1];
east setFriend [west,1];
This will make ALL east and west units love each other very much (or at least not shoot each other).
to undo this use the same code, replacing the 1 values with a value lower than .6
Luke
-
Try something like this:
Make sure the plane has a name, say, aPplane, then add this to the beginning of the camscript:
aPplane setvectorup [0,0,1];
apPlane setpos [(getpos aPplane select 0), (getpos aPlane select 1), 200];
_vel = velocity apPlane;
_dir = direction apPlane;
_speed = 100;
apPlane setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2)];
Now the vector up of the plane should be level, at a height of 200 meters, and given a little "push" of speed to make sure it keeps on flying even if the player was just about to crash it or whatever.
Try it!
Wolfrug out.
-
Very nice! :D
I'll try as soon as possible!
Thank you! :D