Jump to content
Spriterfight

HELP With direction of object

Recommended Posts

I have this code 

Quote

_dir = _bomberplane getDir _caller;
_bomberplane setDir _dir;

What i want is to set the direction of the plane to face the caller but everytime i run the script the plane is facing the right direction but it is upside down

Share this post


Link to post
Share on other sites
_bomberplane = createVehicle [_planetype, _posspawn, [], 0, 'FLY'];
[_bomberplane, 600, _posspawn, "ASL"] call BIS_fnc_setHeight;

_dir = _bomberplane getDir _caller;
_bomberplane setDir _dir;

_crewbomber = createVehicleCrew _bomberplane;


_wp1 = _crewbomber addWaypoint [_targetpos,1];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "Full";
_wp1 setWaypointBehaviour "Aware";
_wp1 setWaypointStatements ["true", "deleteVehicle this"];

It is sabs secret weapon planes i want the plane to face the direction of caller 

Share this post


Link to post
Share on other sites

this part:

14 hours ago, Spriterfight said:

_dir = _bomberplane getDir _caller;

 

should be i think:

_dir = getDir _caller;
_bomberplane setDir _dir;

could also try this?

_bomberplane setDir (getdir _caller);

 

Share this post


Link to post
Share on other sites
15 hours ago, Spriterfight said:

_bomberplane = createVehicle [_planetype, _posspawn, [], 0, 'FLY'];
[_bomberplane, 600, _posspawn, "ASL"] call BIS_fnc_setHeight;

_dir = _bomberplane getDir _caller;
_bomberplane setDir _dir;

_crewbomber = createVehicleCrew _bomberplane;


_wp1 = _crewbomber addWaypoint [_targetpos,1];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "Full";
_wp1 setWaypointBehaviour "Aware";
_wp1 setWaypointStatements ["true", "deleteVehicle this"];

It is sabs secret weapon planes i want the plane to face the direction of caller 

 

Your code seems OK. Try with a vanilla plane.

 

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

×