Home   Help Search Login Register  

Author Topic: Setting satchel and timer  (Read 1249 times)

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Setting satchel and timer
« on: 18 Aug 2008, 21:47:02 »
I know how to create just a satchel charge but is there a way to script a timer and if that timer hits 0.... BOOM!!!

I dont think I am asking for the impossible lol....
TS3 IP: tor.zebgames.com:9992

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Setting satchel and timer
« Reply #1 on: 18 Aug 2008, 23:29:29 »
This does the job, though the explosion will not actually be the same as a satchel, since you aren't actually triggering the satchel itself. Try different ammo types to create the bomb effect, e.g. "Sh_125_HE", "Sh_122_HE", "Sh_105_HE", "R_Hydra_HE" or "Bo_GBU12_LGB":
Code: (timedSatchel.sqf) [Select]
// nil = [_pos,  "Sh_122_HE", 45] execVM "timedSatchel.sqf";
_pos = _this select 0;
_bombClass = _this select 1;
_delay = _this select 2;

_bomb = "PipeBomb" createVehicle _pos;

sleep _delay;

deleteVehicle _bomb;
_bombClass createVehicle _pos;

EDIT: Was always creating a Sh_122_HE rather than the requested explosive class.
« Last Edit: 19 Aug 2008, 00:16:48 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Setting satchel and timer
« Reply #2 on: 19 Aug 2008, 10:57:35 »
Here is a list of ArmA actions, which also include the "settimer" action. I'm sure it works - somehow - but I'm not entirely certain how to get "bomb name" out of it all  :dunno: A better option might be to use the "touchoff" action since it seems fairly "safe" (no weird parameters - should blow up all satchels at once).

So - depending on what kind of scenario we're talking about, you can do a number of things. For instance, you can use a dummy unit to set the satchel charge, then move said dummy unit to an island somewhere far off, then when the "timer" is out (sort of like in Spooner's script) you can teleport the dummy unit within 300 meters of the satchel (say, 300 meters above it in the air ;)), have him perform the touchoff, and then delete him. Or, just have the original satcheler lying in some bush someplace perform the touch off, if there's little to no chance of him getting offed in the meantime.

Or, you can actually try using the settimer action, if you can get it to work. :)

Tell us some more about your scenario, and maybe we can help some more! Good luck.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Setting satchel and timer
« Reply #3 on: 19 Aug 2008, 12:12:01 »
Yeah, I tried to get it working in the way you describe, but I couldn't get anywhere. Realised that sometimes the workaround is a lot simpler than the proper way of doing it  :whistle:
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)