Home   Help Search Login Register  

Author Topic: timed bombs.. please help!  (Read 933 times)

0 Members and 1 Guest are viewing this topic.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
timed bombs.. please help!
« on: 11 Dec 2004, 05:29:59 »
Could someone please tell me how to make a timed satchel charge? And if possible, how do I attach it to a vehicle or a soldier? Im getting the scripting a litle bit in hands now.. I know how to add weapons and comments using ;  :D lolz
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Homefry31464

  • Guest
Re:timed bombs.. please help!
« Reply #1 on: 11 Dec 2004, 05:34:34 »
Hmm, to camcreate a satchel....

You could create an object, and after a certain amount of time spawn an explosion there. Or I am pretty sure there is a better way to do this... I just don't know it.  ;)

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:timed bombs.. please help!
« Reply #2 on: 11 Dec 2004, 09:55:08 »
hm i'll just wait for more replies.. thx any way  ;)
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

bored_onion

  • Guest
Re:timed bombs.. please help!
« Reply #3 on: 11 Dec 2004, 12:27:37 »
you can camcreate a satchel but it either wont explode or it will explode after 30 seconds depending on which type you use.

Code: [Select]
_bomb= "timebomb" camcreate [x,y,z]
the x,y,z refers to the coordinates of the thing on the map

to make it go onto a vehicle you would need to do something like:

Code: [Select]
_bomb= "timebomb" camcreate [getpos vehicle select 0, getpos vehicle select 1, (getpos vehicle select 2) + 2]
(syntax not guaranteed) that would explode 30 seconds later... but its a start! :D

EDIT: whoops, shouldve put a loop in see coldsteels post for details on doing that
« Last Edit: 11 Dec 2004, 17:30:48 by bored_onion »

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:timed bombs.. please help!
« Reply #4 on: 11 Dec 2004, 16:37:29 »
If you want to get it to stick to a vehicle or soldier (that's what you're asking right?) You'll need a loop in there. Something like:

Code: [Select]

_bomb= "timebomb" camcreate [getpos vehicle select 0, getpos vehicle select 1, (getpos vehicle select 2) + 2]

#Loop

_bomb SetPos  [getpos vehicle select 0, getpos vehicle select 1, (getpos vehicle select 2) + 2]

~0.1
goto "Loop"


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:timed bombs.. please help!
« Reply #5 on: 11 Dec 2004, 16:51:47 »
I seem to remember there is a carbomb script in the Ed Depot, which might be relevant.
Plenty of reviewed ArmA missions for you to play

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:timed bombs.. please help!
« Reply #6 on: 11 Dec 2004, 20:17:25 »
Yea I know macgube but I didnt even know what the word script ment then... I downloaded it and eploded myself a lot (i like blowing up my own team mates or things in games  ;D) But anyway C0LDST33L thanks but eh.. how do i time the bomb?? or if somone knows detonate it by radio or an addaction (i dont know how addaction works either :() I'm getting the scripting soe time!  :D
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:timed bombs.. please help!
« Reply #7 on: 11 Dec 2004, 20:22:12 »
Quote
Code: [Select]
_bomb= "timebomb" camcreate [getpos vehicle select 0, getpos vehicle select 1, (getpos vehicle select 2) + 2]

#Loop

_bomb SetPos  [getpos vehicle select 0, getpos vehicle select 1, (getpos vehicle select 2) + 2]

~0.1
goto "Loop"

and anyway vehicle is the name of the vehicle?? well I need a name somewhere! Whatabout those millions of other vehicles!? ???
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:timed bombs.. please help!
« Reply #8 on: 11 Dec 2004, 20:25:15 »
Code: [Select]
testcar=_this select 0
_bomb= "timebomb" camcreate [getpos testcar select 0, getpos testcar select 1, (getpos vehicle select 2) + 2]
#Loop

_bomb SetPos  [getpos testcar select 0, getpos testcar select 1, (getpos testcar select 2) + 2]

~0.1
goto "Loop"

Is it this??? Tell me  :P
« Last Edit: 11 Dec 2004, 20:29:14 by OFPfreak »
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:timed bombs.. please help!
« Reply #9 on: 11 Dec 2004, 20:51:14 »
when you use:
testcar = _this select 0
it should be:
_testcar = _this select 0
as well as any place you have testcar you need a _ before it
and that means you are calling the script like this:
[somevehiclesname] exec "yourscript.sqs"
if you are doing it that way, then it's good

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:timed bombs.. please help!
« Reply #10 on: 11 Dec 2004, 22:03:39 »
Yeah. That script will have the bomb explode after the standard thirty seconds. In order to detonate it with a radio or addaction command you could use:

Code: [Select]
_testcar=_this select 0
_bomb= "timebomb" camcreate [getpos _testcar select 0, getpos _testcar select 1, (getpos _testcar select 2) + 2]
#Loop

_bomb SetPos  [getpos _testcar select 0, getpos _testcar select 1, (getpos _testcar select 2) + 2]

?(denonate): goto "exit"

~0.1
goto "Loop"

#Exit

*code to make bomb detonate*

exit

Here you would have a boolean "detonate". When a trigger was fired on whatever condition you wanted in the activation field would be dentonate=true and this would blow up the bomb. However I dont know how to actually detonate the bomb so I leave that to more experianced scripter to fill in the *code to make bomb explode* part - the best I can do there is make it write bang on the screen  ;).

If you want the bomb to explode after 30 seconds then I reccomend creating a pipebomb instead.

Or you could just create a bomb there in live form when you want it. eg have

Code: [Select]
_bomb= "LaserGuidedBomb" camcreate [getpos _testcar select 0, getpos _testcar select 1, (getpos _testcar select 2) + 2]
in the trigger activation field and just put a delay on the trigger to act as a timer.
« Last Edit: 11 Dec 2004, 22:10:11 by C0LDSt33L »

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:timed bombs.. please help!
« Reply #11 on: 12 Dec 2004, 05:12:39 »
hey thx man!! that helped! Im trying to create a mission where im watching on top of a mission and placed an imaginary bomb under a fuel truck. when the fuel truck reaches the biggest security zone i blow it with the radio and I destroy the smaller security places.. e.g. a big security place could be 2 tanks near a fuel station and 1 squad... gtg now!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline AirCav

  • Members
  • *
  • I'm a llama!
Re:timed bombs.. please help!
« Reply #12 on: 03 Jan 2005, 05:05:45 »
You guys are making his far too complex.  Just use a the simple explosion script with a trigger.

Quote
;Script by MP - markpalmer@hotmail.com
;Based on script created by David Berka (David.Berka@nmi.at) respect is due

;creates a large explosion at an object location, vehicle, infantry etc..
;can be easily modified to accept coords, but you know that already ;-)
;usage: [objectname] exec "explosion.sqs"

_AmmoType = "Heat120"
_Unit = _this select 0

_Explosion = GetPos _Unit

_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = _Explosion select 2

_tempObj = _AmmoType camCreate[_cx, _cy, _cz]
~0.01
_tempobj = objNull

exit