Home   Help Search Login Register  

Author Topic: Suicide Bomobing  (Read 1246 times)

0 Members and 1 Guest are viewing this topic.

Offline terran4999

  • Members
  • *
Suicide Bomobing
« on: 09 May 2008, 19:35:32 »
Hey

I know there is a suicide bombing script available, but the explosion created by vehicles aren't powerful enough to destroy tanks. I wonder does anyone know of a command that will destroy the target vehicle when the suicide bomber gets within a certain range of the target???

I know to destroy vehicle is

Code: [Select]
vehicle1 setdammage 1.0
but what is the command to destory them when they are within a certain range

Offline Gcfungus

  • Members
  • *
Re: Suicide Bomobing
« Reply #1 on: 09 May 2008, 20:25:28 »
Give that t1 is the tank which will explode and t2 is the target which a bomber must be close to, try this:

Code: [Select]
#check
~0.1
_dis = t1 distance t2
?(_dis < 5): goto "check"
~1
// this is optional
hint "Bomb Ignited"
~2
hint "3"
~1
hint "2"
~1
hint "1"
~1
_pos = getpos t1
_x = _pos select 0
_y = _pos select 1
// this could be different types of vehicle weapons (in the COMREF)
_bomb = LaserGuidedBomb camcreate [_x,_y,0]
// end of optional
t1 setdammage 1

Tell me what you think.  :D
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Suicide Bomobing
« Reply #2 on: 09 May 2008, 22:15:46 »
"LaserGuidedBomb", with ""

Offline terran4999

  • Members
  • *
Re: Suicide Bomobing
« Reply #3 on: 10 May 2008, 07:22:28 »
how do i use this script?? Everytime i put this in the initi of a vehicle, t1 explode disregarding its distance and t1 is fine.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Suicide Bomobing
« Reply #4 on: 10 May 2008, 09:06:58 »
Code: [Select]
?(_dis < 5): goto "check" ---->
Code: [Select]
?(_dis > 5): goto "check"

Offline Gcfungus

  • Members
  • *
Re: Suicide Bomobing
« Reply #5 on: 10 May 2008, 10:23:12 »
Well, it was just a quick thing I wrote, and hadn't tested it. There were bound to be flaws.  :)
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton