Home   Help Search Login Register  

Author Topic: places satchel charges before a mission starts  (Read 1254 times)

0 Members and 1 Guest are viewing this topic.

bobthedinosaur

  • Guest
places satchel charges before a mission starts
« on: 15 Jan 2004, 23:52:28 »
is there a way to place a load of satchel charges at certain places using the editor and then give a unit the trigger to blow them all up?

_hammy_

  • Guest
Re:places satchel charges before a mission starts
« Reply #1 on: 16 Jan 2004, 00:13:27 »
yes, you can do it with scripts

Code: [Select]
; satchel.sqs

Unit = _this select 0
; how to use [dudes name] exec "satchel.sqs"

Normal = Unit AddAction [FORMAT["Blow up satchels"],"blowbomb.sqs"]
; add the action to blow up the bombs

exit

Code: [Select]
; blowbomb.sqs

Unit RemoveAction Normal
; remove the action that was added in satchel.sqs
; Add more of these to blow up more satchels replace Pipey with the name of the satchel
"LASERGUIDEDBOMB" camCreate getpos Pipey
; create a explosion at the satchel charge
~0.35
Pipey setpos [getpos Pipey select 0, getpos Pipey select 1, (getpos Pipey select 2) -10]
; make it so the satchel charge is no longer viewable
~0.1

"LASERGUIDEDBOMB" camCreate getpos Pipey2
; create explosion at another satchel
~0.35
Pipey2 setpos [getpos Pipey2 select 0, getpos Pipey2 select 1, (getpos Pipey2 select 2) -10]
; make it so satchel charge is no longer visible
~0.1

exit

This is taken from one of my scripts that was made a long long time ago, so i dont know if it still works.

You could probably replace
Code: [Select]
Pipey setpos [getpos Pipey select 0, getpos Pipey select 1, (getpos Pipey select 2) -10] lines
with
Code: [Select]
deletevehicle Pipey
 ;)
« Last Edit: 16 Jan 2004, 01:09:39 by HAMMY »

bobthedinosaur

  • Guest
Re:places satchel charges before a mission starts
« Reply #2 on: 16 Jan 2004, 00:36:08 »
ok thanx, i'm a bit dumb though and i know nothing about scripts

could you explain a few things about what you just said?

_hammy_

  • Guest
Re:places satchel charges before a mission starts
« Reply #3 on: 16 Jan 2004, 01:10:04 »
ok, i added some comments to the code previously posted.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:places satchel charges before a mission starts
« Reply #4 on: 16 Jan 2004, 01:48:40 »
bobthedinosaur, read snYpir's Friendly Intro to Code snippets and also Johan Gustafsson's scripting guide, if you haven't already.
Plenty of reviewed ArmA missions for you to play

Offline desper8

  • Members
  • *
  • REBEL Council member
    • http://rebel.clanzone.at/board/
Re:places satchel charges before a mission starts
« Reply #5 on: 16 Jan 2004, 14:01:53 »
ok
while the subject is up

im after a script were a sachel will start (maybe at a flagpole if it makes it EZer)

and it will detonate in 3 seconds
friendly clan battle any one?
PM me

_hammy_

  • Guest
Re:places satchel charges before a mission starts
« Reply #6 on: 17 Jan 2004, 00:23:40 »
try this

Code: [Select]
; boom.sqs
; use by:
; [satchel_charge_name, flagpole_name] exec "boom.sqs"
_sat = _this select 0
_moveto = _this select 1
_tim = 0

_sat setpos getpos _moveto

#loop
~1
_tim = _tim + 1
?(_tim >= 3):goto "next"
goto "loop"

#next
"LASERGUIDEDBOMB" camCreate getpos _sat
~0.5
deletevehicle _sat

exit

then place a satchel charge on the map somewhere and a flagpole somewhere too

Then run this script and the satchel will move over were the flag pole is and blow up in 3 second.

you could also put the line
Code: [Select]
_sat setpos getpos _moveto in the init.sqs script so the satchel moves to the flagpole at the start of the missions :)
« Last Edit: 19 Jan 2004, 19:25:03 by HAMMY »

Leech

  • Guest
Re:places satchel charges before a mission starts
« Reply #7 on: 18 Jan 2004, 23:33:21 »
can u actually start with a satchel charge sitting there and not use the laserguided bomb trick?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:places satchel charges before a mission starts
« Reply #8 on: 19 Jan 2004, 07:28:43 »
You can camcreate a 'timebomb' but it takes 30 seconds to explode. I don't know how to make the time shorter nor I know how to make camcreated 'pipebomb' explode because setting damage to it doesn't work.
Not all is lost.

_hammy_

  • Guest
Re:places satchel charges before a mission starts
« Reply #9 on: 19 Jan 2004, 19:22:02 »
no, you cant make satchel charges explode without camcreated a explosion over them then removing the satchel charge.