OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: daniel relf on 26 Feb 2007, 23:41:42
-
hey guys. ive tried surchin the forums for this 1 and am struggling to find what i need.
ive been trying to put together a script, that cam creates a strike plane, the plane moves to wherever i clicked on the map, and the plane fires ONLY where i clicked on the map.
now the prob im having is geting the strikeplane to dofire at a target "smokethingred" that i cam create where i click. the smoke bomb thing is named so id have thought the jet wld dotarget it no prob.
instead, the jet flies past my desired target point and engages any nearby enemies. Im a little new so i duno wot else to try. any suggestions?
L&R Relfy Baby.
Ohh and the plane only fires missiles. NOT bomb, which is really the only thing seperating it from other airstrike scripts.
-
There is an invisible targets addon out there somewhere. You can camCreate both it and the smokeshell. I suspect the smokeshell is techncially destroyed when it goes off, which is why the kite can't target it.
Add a reveal command so that the pilot knows the target is there.
-
May I suggest to use "createVehicle" instead of "camCreate", using camCreate for those purposes a bad habit.
And as macguba to told you, you could try to use the invisible targets addon.
You might want to following too:
plane setCombatMode "BLUE";
or, if that makes your plane to stop firing completely:
plane setCombatMode "GREEN";
More about the command setCombatMode here (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#setCombatMode).
-
thanx loads guys. :) will try it. L&R Relfy Baby.
-
Yes the solution is by using an invisible target. This addon is included in the EditorUpgrade102 or object1.pbo or object2.pbo.
Smokeshell and all kind of ammo cannot be seen as AI visible object.
Otherwise you can camcreate a shell125 at the same place of your smoke by a stript which synchronize the plane passing.
_Boom = "Shell125" camcreate [x,y,z]
You can do something more complex by create a missile under the plane with a velocity, direction and angle ...
If you have the COCordonance addon you can use V-111 Shkval nuclear and you'll see what was Hiroshima ... LOL