OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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.
-
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.
-
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.
-
_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
-
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:
-
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....
-
Thanks guys