Description
Moves all parts of a dynamic aircraft carrier back into place relative to its base object.
For every entry of the base's "bis_carrierParts" variable, the part gets the base's vectorDir and vectorUp and is moved with setPosWorld to the position of its memory point on the base. It does nothing where isServer is false.
The function is called from the carrier base's Dragged3DEN Eden event handler when the carrier is dragged in Eden Editor. As the code does not depend on Eden, it can also be called by scripts after the base has been moved during a mission.
Syntax
carrier call BIS_fnc_carrier01PosUpdate
Parameters:
carrier: Object - the carrier base object holding the"bis_carrierParts"variable
Returns: Nothing
Examples
Example 1
Carrier base config (event handlers as given in the function's header):
class EventHandlers
{
init = "_this call BIS_fnc_carrier01Init";
AttributesChanged3DEN = "_this call BIS_fnc_carrier01EdenInit";
Dragged3DEN = "_this call BIS_fnc_carrier01PosUpdate";
RegisteredToWorld3DEN = "_this call BIS_fnc_carrier01EdenInit";
UnregisteredFromWorld3DEN = "_this call BIS_fnc_carrier01EdenDelete";
};
Example 2
Move a carrier during a mission (server side):
myCarrier setPosWorld (getPosWorld myCarrier vectorAdd [0, 500, 0]);
myCarrier call BIS_fnc_carrier01PosUpdate;
See also
BIS_fnc_carrier01Init · BIS_fnc_carrier01EdenInit · BIS_fnc_carrier01EdenDelete · BIS_fnc_destroyer01PosUpdate