OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: sharkattack on 29 Sep 2006, 17:15:44

Title: creating vehicle
Post by: sharkattack on 29 Sep 2006, 17:15:44
ive done this before .. but im buggered if i can remember how.was a long time ago .
im trying to create the illusion of a chopper dropping of a zodiac using createvehicle command  ..
thanx in advance  shark attack
Title: Re: creating vehicle
Post by: Mandoble on 29 Sep 2006, 17:23:22
Code: [Select]
...
...
;

_poc = getPos _chopper
_dir = getDir _chopper
;Assuming the open chopper's door is at its left side
;The zodiac will spawn at the left of the chopper, 2 meters away and 1.5 meters down
_rad = 2
_ang = _dir - 90
_pos = [(_posc select 0)+sin(_ang)*_rad, (_posc select 1)+cos(_ang)*_rad, (_posc select 2) - 1.5]
_zodiac = "zodiac object type" createVehicle _pos
....
....
exit
Title: Re: creating vehicle
Post by: Mr.Peanut on 30 Sep 2006, 05:47:05
Won't hurt either to give the zodiac the same velocity as the heli to start.
Code: [Select]
zodiac setVelocity velocity heli
Title: Re: creating vehicle
Post by: sharkattack on 30 Sep 2006, 16:21:30
hey guys i put the above information into a script call zodi obviously i changed the helo name and the class name of the zodiac .i created a trigger to call the script  and nothing happens .. any ideas as to what im doing wrong ?
Title: Re: creating vehicle
Post by: Mandoble on 30 Sep 2006, 16:54:42
Change
_poc = getPos _chopper
by
_posc = getPos _chopper
Title: Re: creating vehicle
Post by: sharkattack on 01 Oct 2006, 14:45:59
still no joy ... cant get it .
Title: Re: creating vehicle
Post by: JasonO on 01 Oct 2006, 14:48:32
What do you have in the trigger activation?
Title: Re: creating vehicle
Post by: sharkattack on 02 Oct 2006, 15:09:44
i put the codes into a script and named it zodi ..
in the trigger i have  [] exec"zodi.sqs"..