Home   Help Search Login Register  

Author Topic: Exploding car  (Read 487 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Exploding car
« on: 19 Apr 2004, 18:27:04 »
I know this script has kind of been done wen the car reaches a particular speed but what im interested in is having a car just kamikaze into a truck or a house and explode. How and what do i need to write?

j-man

  • Guest
Re:Exploding car
« Reply #1 on: 19 Apr 2004, 21:26:51 »
Well, there is a Kamakazie script at the editors depot. You could use that along with:

Code: [Select]
?(CAR distance TRUCK < 2) : CAR setdammage 4

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Exploding car
« Reply #2 on: 20 Apr 2004, 20:17:04 »
Ya, I wrote a sucide bomber script ages ago that works with cars as well... It sucks so hard. I think I wrote it just after I finnished reading half Johan's Scripting Tute lol. :P

Anyway, it does work even though the code isn't the most beautiful. ;D

:beat: *Gets Shot* :beat:

Grendel

  • Guest
Re:Exploding car
« Reply #3 on: 20 Apr 2004, 22:11:35 »
Haven't seen the others, but heres one that should work nicely with cars, people (suicide bombers), anything really:

Code: [Select]
_bomber=nameofbomber
_target=bombertarget

;_detdist is distance from target that detonation occurs
_detdist=10

;change explosive for more/less bang if you want
_explosive="shell125"


;Check distance and close with target
#discheck
_bomber move getpos _target
_dis=_bomber distance _target
?(_dis > _detdist):goto "discheck"

;detonation
?(typeof _bomber==man):deletevehicle _bomber
;line above gets rid of body if bomber is a man

_explosive camcreate getpos _bomber
exit

Should work fine, but was not actually tested.

-Grendel