Home   Help Search Login Register  

Author Topic: Laserguided bombs  (Read 654 times)

0 Members and 1 Guest are viewing this topic.

Iceholey

  • Guest
Laserguided bombs
« on: 27 Oct 2003, 23:03:22 »
Hi all,

First of all, thanks to everyone on this board for some of the stuff you've been posting on here. It's been great help for this NooB trying to get to grips with OFP editing.

To the question: I'm a rather dumb/immature NooB who likes playing with the Camcreate command, and creating big explosions using "Laserguidedbombs". I suppose I'll grow out of it eventually...

Ahem... until then, can someone tell me if there is anyway to remove a single laser guided bomb from an A10? (it's going to be used in a script to imitate an A10 dropping, surprise surprise, a laser guided bomb).

The best I've managed so far is the "remove laserguidedbomblauncher" command, which just removes all the ordnance from it's wings. I just can't find the correct ammo syntax for LGBs (if there is one).

Thanks in advance!

McFly

  • Guest
Re:Laserguided bombs
« Reply #1 on: 28 Oct 2003, 02:17:42 »
You could remove all the bombs on the A10, then add all but one of them back.

Komuna

  • Guest
Re:Laserguided bombs
« Reply #2 on: 28 Oct 2003, 15:34:08 »
You could remove all the bombs on the A10, then add all but one of them back.

The command "addMagazine" won't allow such things, it just adds a full set of bombs to the Thunderbolt.

So, the best way would be compelingthe Thunderbolt to fire and then catch it's bomb:

_A10 fire "LaserGuidedBomb"

Of course, you'll have to add the A10 an eventHandler "fired" to detect and catch the bomb:

this addEventHandler ["fired",{LGB=nearestObject [this, "LaserGuidedBomb"; LGB exec "MyScript.sqs"}]

Notice that you must have the command "nearestObject" in the "addEventHandler"'s command line, otherwise, if you call it trhough a script, it might not be fast enough to detect the bomb (well, it usualy happens with bullets ;D so, with bombs you shouldn't have any probs, eheh!).

Iceholey

  • Guest
Re:Laserguided bombs
« Reply #3 on: 28 Oct 2003, 18:58:41 »
Thanks, that effectively solves my problem.

For the record it's

unitname fire "LaserGuidedBombLauncher"

Much appreciated Komuna / Mcfly
« Last Edit: 28 Oct 2003, 19:00:00 by Iceholey »