macieksoft 11 Posted January 13, 2015 (edited) I am looking for a script command to detonate already placed charge. I want it to make my firing system works with charges placed by player using AGM mod. So i need a script command to detonate this charge. I will take particular charge by using cursortarget command that will return particular charge as object, so i only need a way to detonate it. Something like setoff chargex;. I do NOT want something like player action ["touch off", unit2];. Edited January 13, 2015 by macieksoft Share this post Link to post Share on other sites
Jona33 51 Posted January 13, 2015 _charge setDamage 1; should do the trick I believe Share this post Link to post Share on other sites
killzone_kid 1326 Posted January 13, 2015 Cant do this unless you use different class http://killzonekid.com/arma-scripting-tutorials-scripted-charges/ Share this post Link to post Share on other sites
macieksoft 11 Posted January 13, 2015 So how AGM gui is detonating those charges? Share this post Link to post Share on other sites
killzone_kid 1326 Posted January 13, 2015 I believe there is script example on the same page. Share this post Link to post Share on other sites
Jigsor 175 Posted January 14, 2015 (edited) Didn't realize this is your baby Killzone_Kid. Any solution/workaraound for this? Scripted explosives are buged or lacking because they do not conform to A3 vanilla standard compatibility with "handledamage" event handler. _source returns ObjNull, because of no localization or owner. Place an ammobox in editor named myAmmoBox and run this code in debug console then set scripted charge on myAmmoBox. Blow it up with scripted charge. JIG_ammmoCache_damageB = { _cache = _this select 0; _damage = _this select 2; _source = _this select 3; _ammo = _this select 4; _out = 0; player sidechat format ["Cache:%1 - Damage%2 - Source%3 - Ammo%4",_cache,_damage,_source,_ammo]; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo") || (_ammo == "satchelCharge_remote_ammo_scripted") || (_ammo == "demoCharge_remote_ammo_scripted")) then { hint "Ammo type found"; }; diag_log text format ["ExplosiveType:%1",_ammo]; [_source] spawn { _source = _this select 0; diag_log text format ["Owner:%1",_source]; _sidesource = side _source; diag_log text format ["Owner Side:%1",_source]; }; _out }; publicVariable "JIG_ammmoCache_damageB"; myAmmoBox removeAllEventHandlers "HitPart"; myAmmoBox removeAllEventHandlers "handledamage"; myAmmoBox addeventhandler ["handledamage",{_this call JIG_ammmoCache_damageB}]; Edited January 14, 2015 by Jigsor Share this post Link to post Share on other sites
killzone_kid 1326 Posted January 14, 2015 Scripted charges are just extended normal charges, so if they are bugged then normal charges are bugged too. What you refer to is inability to assign originator to a scripted event. For example the same would happen if you spawn grenade ammo via script. When exploded you will also get objnull for originator. The only workaround I found is to use hitpart eh, but it is way too complicated and awkward. There is actually a ticket on FT somewhere for an abitlity to assign originator, I dont want to be negative, but reality of the situation is that this is probably at the bottom of mountain Everest of todo tasks. Share this post Link to post Share on other sites
Jigsor 175 Posted January 14, 2015 Understandable, thank you for the insight. Share this post Link to post Share on other sites
Mr_Sideburns 1 Posted June 11, 2017 Hello ! Sorry to necro this but it looks like I can find an answer here with you. I am making an ambush mission in which the player is alredy placed in his hiding place, and the ied as well. I would like to "link" the explosive to the player to be able to remotely detonate it with a firing system. I don't want the player to go to the ied to manualy activate it and go back to his hiding. It should be like he placed it. thanks for your answers ! Share this post Link to post Share on other sites
killzone_kid 1326 Posted June 11, 2017 You can use https://community.bistudio.com/wiki/addOwnedMine Share this post Link to post Share on other sites
Mr_Sideburns 1 Posted June 12, 2017 18 hours ago, killzone_kid said: You can use https://community.bistudio.com/wiki/addOwnedMine Thanks a lot ! That's exactly what I was looking for Share this post Link to post Share on other sites