Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Seldkam

Member
  • Content Count

    1
  • Joined

  • Last visited

  • Medals

Everything posted by Seldkam

  1. Hey folks. I've tried various script drafts at this point but can't seem to get anything to work, I'm not experienced with coding in general aside from tinkering in Unity way back when. Putting both these two iterations of the code in a van transport truck's init (just by double clicking the vehicle in the editor) does nothing upon honking the horn. if (!local this) exitWith {}; this addEventHandler ["Fired", { if (_this select 1 == "CarHorn") then { ied1 setDamage 1; } forEach attachedObjects _vehicle; } ] The above is the most recent version, the below is the version I started with thanks to someone on the discord. if (!local this) exitWith {}; this addEventHandler ["Fired", { private _vehicle = _this select 0; private _weapon = _this select 1; private _weaponName = getText (configFile >> "cfgWeapons" >> _weapon >> "displayName"); if (toLower _weaponName isEqualTo "carhorn") then { { if ("remote" in toLower typeOf IEDUrbanBig_Remote_Mag) then { IEDUrbanBig_Remote_Mag setDamage 1; }; } forEach attachedObjects _vehicle; }; }]; Any help is appreciated. The version I'm using now (the shorter one) doesn't work, nor does the longer one below it. This is meant for public zeus usage, but I'm just curious to see how to make this work at this point.
×