OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Preacher1985 on 14 Mar 2005, 16:56:53
-
Hi people,
Just one quick question...
I'm having trouble creating a maverick missile when a plane activates a waypoint.
Here's what I've got <--- /me hopes someone can help me correct it
[This] Camcreate Setpos 1 [("maverickvehicle", 120)]
Where, the maverick is obviously the A10 bomb and 120 is the height. But does'nt seem to work. Anyone know how to fix it?
thanks guys
-
Just to mention, it has to be 1.46 compatible...
thanks
-
Im not exzactly sure of the name of the maverick missle so I'll just correct your camcreate abilities...
Instead of:
[This] Camcreate Setpos 1 [("maverickvehicle", 120)]
do:
bomb = camcreate "LASERGUIDEDBOMB" getpos pos
You will need to put a gamelogic down where ever you want the bomb to be but I'd suggest you put the gamelogic in the air with setpos.
-
Hi,
thanks for the reply, but I don't understand it sorry...
I'm don't know or understand how to do it that wat mate.
Is there a basic script to do say, on waypoint activ
create and drop bomb from heigh 120
wait for 0.5 secs
repeat for 8 bombs?
-
Your sytax for camcreate is incorrect. Rujik was giving you the correct syntax. If you want an example script for creating and controling missiles (incuding mavericks) check out my Super Guided Missile script in the editor depot. Also, use createVehicle instead of camcreate. Createvehicle sometimes does weird things with live ammo creation. Here is the syntax:
_mis = "maverick" createVehicle _pos
-
Thanks for the reply Raptor
So, on the waypoint it should be...
_bomb = "maverick" createVehicle _pos 120
Therefor the bomb is created, _pos is the waypoint, and if I add 120 it will be created at 120m then fall and explode? I don't want a missile, just a bomb to be created and fall.
-
_pos would be an array for the position or the position of an object.
The array is of the form: [xpos, zpos,ypos}
xpos is east-west
zpos is north south
ypos is height
Planck
-
Ahhh I see,
So it would be
_bomb = "maverick" createVehicle _pos [_x, _z, 120]
-
If you name your plane in its name field.....lets say....bomber
_bomb = "maverick" createVehicle setPos [getPos bomber select 0, getPos bomber select 1, (getPos bomber select 2) -2]
This will create _bomb at the position of the plane, but 2 metres below it.
You don't want to create it at the same height as the plane, as it might destroy the plane instead.
At least I hope that will work.....try it.
Planck