Good night, all right ?! Well, I have a problem on my map... I put a wall weapon "secret" behind a model that would be accessible only when performing an easter egg that moves this model, though when I'm playing, I'm getting access to trigger it through the model... That is, I can buy a weapon without making the easter egg. Is there any way to get this wall weapon off until it receives a flag or until a variable is set to "true"? I tried in various ways but could not...
trigger disable_trigger(); // waittill here trigger enable_trigger();
I tried this... But wallweapon is a prefab, is there any way to disallow the trigger of a prefab? Also, it would disable the trigger all the weapons wall on map, right?
I tried this... But wallweapon is a prefab, is there any way to disallow the trigger of a prefab? Also, it would disable the trigger all the weapons wall on map, right?
Go inside the prefab and check the targetname. If targetname is used on all wallweapons, you can use script_noteworthy or target
You don't have to stamp the prefab. It does not matter in game. The trigger can be in a prefab or anything, all that matters is the kvps.
First get the ent or ent array and then disable the trigger you wish some how, based on kvps, using disable or trigger off or hide, or any of those will work. Sometimes there are issues if the trigger is linked to something, but this should not be the case with a wall weapon and if it was, you could then just unlink it first.
Edit: for example, I use this to disable specific triggers during my gun game, via targetname, which can be edited for more specific trigger kvp conditions if you like.
Code Snippet
Plaintext
//the following is thread in mapname.gsc or somewhere //thread DisableTheseTriggers("weapon_upgrade"); //thread DisableTheseTriggers("zombie_vending_upgrade"); //thread DisableTheseTriggers("treasure_chest_use");
DisableTheseTriggers(name){ wait(3); trigs = GetEntArray( name,"targetname" ); for( i=0;i<trigs.size;i++ ){ trigs[i] SetHintString( "This feature is disabled during this game mode" ); trigs[i] disable_trigger( ); } }
Last Edit: February 01, 2016, 02:23:16 pm by MakeCents
You don't have to stamp the prefab. It does not matter in game. The trigger can be in a prefab or anything, all that matters is the kvps.
First get the ent or ent array and then disable the trigger you wish some how, based on kvps, using disable or trigger off or hide, or any of those will work. Sometimes there are issues if the trigger is linked to something, but this should not be the case with a wall weapon and if it was, you could then just unlink it first.
Edit: for example, I use this to disable specific triggers during my gun game, via targetname, which can be edited for more specific trigger kvp conditions if you like.
Code Snippet
Plaintext
//the following is thread in mapname.gsc or somewhere //thread DisableTheseTriggers("weapon_upgrade"); //thread DisableTheseTriggers("zombie_vending_upgrade"); //thread DisableTheseTriggers("treasure_chest_use");
DisableTheseTriggers(name){ wait(3); trigs = GetEntArray( name,"targetname" ); for( i=0;i<trigs.size;i++ ){ trigs[i] SetHintString( "This feature is disabled during this game mode" ); trigs[i] disable_trigger( ); } }
Thank you very much, I could understand a little better now!