cScripts icon indicating copy to clipboard operation
cScripts copied to clipboard

Have escapeWreck function move player out on a random side of the aircraft.

Open pool011 opened this issue 3 years ago • 3 comments

          You can also adda random side here if you want ^^

[_target, selectRandom [true,false]] call FUNC(doGetOutHeloSide);

Originally posted by @AndreasBrostrom in https://github.com/7Cav/cScripts/pull/950#discussion_r1275369762

pool011 avatar Jul 30 '23 02:07 pool011

@AndreasBrostrom I'm going to sit down and do this now. I'll use the bounding box to decide the location, possibly randomly. Or I will just do a force move out so that it uses the model memory point to set the dismount location.

pool011 avatar Dec 07 '23 17:12 pool011

Closed on accident

pool011 avatar Dec 07 '23 17:12 pool011

Here is a snippet that give you a random position on the edge of a ellipse marker. You can just write away the marker part and replace it with the model size and what not.

_mark = "BASE";
_phi = random(360);
_x = cos(_phi);
_y = sin(_phi);

_posVector = [_x * ((markerSize _mark) select 0), _y * ((markerSize _mark) select 1), 0];
_newPos = (markerPos _mark) vectorAdd _posVector;

AndreasBrostrom avatar Dec 08 '23 07:12 AndreasBrostrom