Home   Help Search Login Register  

Author Topic: Airstrike  (Read 725 times)

0 Members and 2 Guests are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Airstrike
« on: 15 Nov 2004, 07:06:12 »
hello
I know there are a lot of on map single click airstrikes and stuff.
All i want to do is have a small SIMPLE  :P code that I can put into a triggers act field, that when activated creates a bomb under a plane, lets say the planes name is      plane1. I just want a code i can copy and paste because i will use it alot. also is it possible to make the bomb created going the same speed as the plane use the set velocity maby.
thanks

shadow99

  • Guest
Re:Airstrike
« Reply #1 on: 15 Nov 2004, 09:02:33 »
I believe this is what you are looking for:

Code: [Select]
explo01 = "laserguidedbomb" camcreate [getpos plane1 select 0, getpos plane1 select 1, getpos plane1 select 2]
Put this is the activation field of a trigger and a bomb will appear under the plane (and drop) whenever the trigger is activated.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Airstrike
« Reply #2 on: 15 Nov 2004, 21:37:12 »
but you are missing something:
explo01 setvelocity velocity plane1

and i would change this:
explo01 = "laserguidedbomb" camcreate [getpos plane1 select 0, getpos plane1 select 1, getpos plane1 select 2]

to this:
explo01 = "laserguidedbomb" camcreate [getpos plane1 select 0, getpos plane1 select 1, (getpos plane1 select 2)-1]
just to insure that it doesn't blow up the plane

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Airstrike
« Reply #3 on: 16 Nov 2004, 07:33:09 »
the code works good thank you
but how would i make the bomb start going the same speed as the plane. it looks pretty unrealistic with a 300mph plane droping a bomb that falls straight down
maby use
bomb1 setVelocity getVelocity plane1
how would i add to the code to make it do that?
thank you guys

by the way trigger happy, how is the ultimate halo and plane crash scripts going anything i can do to help?
« Last Edit: 16 Nov 2004, 07:36:30 by penguinman »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Airstrike
« Reply #4 on: 16 Nov 2004, 09:10:52 »
Quote
...but how would i make the bomb start going the same speed as the plane?
Look up a post. :D

Quote
but you are missing something:
explo01 setvelocity velocity plane1

One more thing though: LGB's actually move a little bit in the direction they are facing entirely on their own (meaning, if you drop one w/no velocity, it won't fall straight down). So you should make sure the bomb is facing the same direction as the plane via: explo01 setdir getdir plane1


Now if you want to put this all in the field of a trigger, you would obviously want to use some semicolons to separate it:

Code: [Select]
bomb = "laserguidedbomb" camcreate [getpos plane1 select 0, getpos plane1 select 1, (getpos plane1 select 2)-2]; bomb setvelocity velocity plane1; bomb setdir getdir plane1
I changed explo01 to bomb, but it doesn't matter. I also made it start 2 meters below the plane, to be sure it doesn't hit the plane (though if the plane is in a dive, it still might).
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Airstrike
« Reply #5 on: 16 Nov 2004, 22:23:05 »
by the way trigger happy, how is the ultimate halo and plane crash scripts going anything i can do to help?
really anxious aren't you?
i'll im you when i have one of them ready, as both of them are giving me problems.
(see the thread craters)