OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BlackDeath7 on 30 Apr 2005, 19:51:23

Title: Suicide Bombers
Post by: BlackDeath7 on 30 Apr 2005, 19:51:23
hey guys,

I am trying to make a mission based in the Middle East.  However my mission requires suicide bombers, both men and vehicles.  Does anyone know how to make this happen?  My guess is some kind of script, but I am not sure.
Title: Re:Suicide Bombers
Post by: sharkyjoe on 30 Apr 2005, 21:17:57
Try the Editors Depot for the car/truck bombs and then I thought I saw personal/human bomb on an add-on. Some site, try Cech site, or Google it.
The Tute for car-bomb is good.
Title: Re:Suicide Bombers
Post by: macguba on 30 Apr 2005, 21:47:47
Somebody did this, or attempted it, a long time ago.    if you search the forum, going back a long way, you may find something helpful.    It is perfectly possible and yes the solution is a script.     Modifying a car bomb script is probably a good way to go.
Title: Re:Suicide Bombers
Post by: DBR_ONIX on 30 Apr 2005, 22:05:48
Code: [Select]
_guy = _this select 0
_target = _this select 1

#loop
~2
?(_guy distance _ target) < 10:GOTO "explode"
goto "loop"

#explode
blah123123 = "laserguidedbomb" camcreate getpos _guy
; optional next line
deletevehicle _man

EXIT

Use.. [this,targetLogic] exec "scriptname.sqs" in the bombers INIT field

targetLogic is a gameLogic, named targetLogic

Basicly, it checks every 2 seconds if the bomber is <10 meters from the target, if he is, then blow him up.

The same will work on cars, just put it in it's init, and give it a waypoint ;)
- Ben
Title: Re:Suicide Bombers
Post by: dmakatra on 30 Apr 2005, 23:11:20
The first script I ever written was a suicide bomber script. It's in the editors depot. It's a bucket of horse shit but at least it works. Even with cars. Yay. :P

:beat: *Gets Shot* :beat:
Title: Re:Suicide Bombers
Post by: Peter_Bullet on 01 May 2005, 06:17:15


Use.. [this,targetLogic] exec "scriptname.sqs" in the bombers INIT field

targetLogic is a gameLogic, named targetLogic

Is that targetLogic a special kind of gamelogic affected by the game? Or is it the same as ex. "sss" named gameLogic? I'm curious....
Title: Re:Suicide Bombers
Post by: BlackDeath7 on 03 May 2005, 21:31:26
Thanks guys