Home   Help Search Login Register  

Author Topic: Car bomb?  (Read 581 times)

0 Members and 1 Guest are viewing this topic.

Egwal

  • Guest
Car bomb?
« on: 10 Dec 2002, 18:35:26 »
I want to simulate a simple car bomb where a civ car gets blown up like there was a satchel charge inside.
How do i do this?
Thank you


seanver

  • Guest
Re:Car bomb?
« Reply #1 on: 10 Dec 2002, 18:43:04 »
Try this:

bomb = "shell120" camcreate (getpos car'sname

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Car bomb?
« Reply #2 on: 10 Dec 2002, 18:58:53 »
Depending on when you want the bomb to explode, there are a few ways to do this.  If you want the bomb to explode the instant the civilian gets into the car, then you can use SeAnVeR's code and put that in the civilian's Get In waypoint's activation field.

If you'd rather have a slight delay for some added realism (since most car bombs don't go off just because you got in the car, but rather because you started the car), then you can apply a slight delay.  In the waypoint's activation field, have it execute a short script that has the following code:

Code: [Select]
; Delay for 1 second.

~1

; Create an explosion.

_tempObj = "SHELL120" camcreate car

Where car is the name of your car.  Replace SHELL120 with whatever explosion type you really want to use.

By changing the delay, or by having a different waypoint create the explosion, you can alter when the car bomb will go off, if you so desire.
Ranger

mr. lightswitch

  • Guest
Re:Car bomb?
« Reply #3 on: 11 Dec 2002, 14:47:49 »
Try this. create a .sqs file named blowup.

enter the following:
_unit= _this select 0
_vehicle= _this select 1

#Update

? (_unit in _vehicle) : goto "blowup"

~2

goto "update"

#blowup

~2

_vehicle setdammage 1
_unit setdammage 1
exit

once you have done this place the .sqs in your mission folder
and in the vehicle you want to blowup's init. put: [unitname, this] exec "blowup.sqs"