Game Modding | Call of Duty: Black Ops 3 | Scripting
Dedrix:
I'm basically looking for a way to cause a trigger with a specific weapon. Mainly trigger a door to open with a shield. A custom script to put whichever weapon and/ door would be very appreciated. Thanks
Spiki:
This should work. didnt test
//call thisfunctionweapon_trigger(){trigs=GetEntArray("weapon_trigger","targetname");foreach(potatointrigs)potatothreadsetup_weapon_trigger();}functionsetup_weapon_trigger()//self = trig damage{while(1){selfwaittill("damage",amount,attacker,direction_vec,point,type,tagName,modelName,partName,weapon,dFlags,inflictor,chargeLevel);if(is_right_gun(weapon))break;}door=GetEnt("door?","targetname");doorDelete();}functionis_right_gun(weapon){trigger_guns=array("pistol_standard","zod_riotshield");foreach(gunintrigger_guns)if(IsSubStr(ToLower(weapon.name),ToLower(gun)))//incase attachments and papreturn1;return0;}