OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Preacher1985 on 14 Mar 2005, 16:56:53

Title: Camcreate maverick missiles?
Post 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
Title: Re:Camcreate maverick missiles?
Post by: Preacher1985 on 14 Mar 2005, 17:59:15
Just to mention, it has to be 1.46 compatible...



thanks
Title: Re:Camcreate maverick missiles?
Post by: RujiK on 14 Mar 2005, 18:50:35
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.
Title: Re:Camcreate maverick missiles?
Post by: Preacher1985 on 14 Mar 2005, 20:02:52
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?




Title: Re:Camcreate maverick missiles?
Post by: Raptorsaurus on 14 Mar 2005, 21:53:23
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
Title: Re:Camcreate maverick missiles?
Post by: Preacher1985 on 14 Mar 2005, 22:06:10
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.

Title: Re:Camcreate maverick missiles?
Post by: Planck on 14 Mar 2005, 22:13:20
_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
Title: Re:Camcreate maverick missiles?
Post by: Preacher1985 on 14 Mar 2005, 22:23:06
Ahhh I see,


So it would be


_bomb = "maverick" createVehicle _pos [_x, _z, 120]
Title: Re:Camcreate maverick missiles?
Post by: Planck on 14 Mar 2005, 22:52:48
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