OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SCORP on 18 Jan 2003, 09:14:27
-
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
-
There are a few scripts that have the ability to transport a M2 in a truck or APC. These kind of scripts are based on object postition updating, and you won't be able to watch it moving or updating its position according the Carrying Object's position as the rate is too high. Therefore we have something like this:
#updpos
_AttachedObj setpos (getpos _CObj select 0,getpos _CObj select 1,(getpos _CObj select 2)+_height)
_attachedObj setdir getdir _CObj
~.001
Goto "updpos"
Where _attachedObj is the 'weapon' u wanna transport, _CObj is ur 'CHOPPER' and _height is the _attachedObj's height according to _CObj's position.
Remember that you may set the carried object's position related to virtual x and y axis of the transporter, yet this time u'll have to get the transporter direction (in degrees), calculate the angle's tan (inclination) and remind the straight line's equation (plan! not space!) in order to get the virtual line which defines the trajectory of the transporter! :-\ Hope you understand what is supposed to do after line's equation.
-
;D thx for your help MorMel, ill read more about "Script", i think i have no choice, i need to understand that. Again thx MorMel.
-
this addweaponcargo ["m16",100]; this addmagazinecargo ["m16",100]
-
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
When I c things like this, IÂ'm not sure I wanna help......