function shootables_done(player) { while(1) { self waittill(level.shootablesCollected >= level.shootablesNeeded);
if(level.shootablesCollected == level.shootablesNeeded) { // What ever code you want to execute once all shootables are collected IPrintLn("All Shootables Collected"); }
break; } }
Last Edit: October 11, 2016, 01:55:14 am by reckfullies
function shootables_done(player) { while(1) { self waittill(level.shootablesCollected >= level.shootablesNeeded);
if(level.shootablesCollected == level.shootablesNeeded) { // What ever code you want to execute once all shootables are collected IPrintLn("All Shootables Collected"); player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false ); }
break; } }
Tested and it works fine
This is for 3 triggers
Last Edit: October 11, 2016, 12:37:16 pm by TheKillerey
function shootables_done(player) { while(1) { self waittill(level.shootablesCollected >= level.shootablesNeeded);
if(level.shootablesCollected == level.shootablesNeeded) { // What ever code you want to execute once all shootables are collected IPrintLn("All Shootables Collected"); player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false ); }
break; } }
Tested and it works fine
This is for 3 triggers
Thanks for sharing your script with anyone who might not know how to do this, if anyone wants to change the perk all names are located in _zm_perks.gsh
Thanks for sharing your script with anyone who might not know how to do this, if anyone wants to change the perk all names are located in _zm_perks.gsh
function shootables_done(player) { while(1) { self waittill(level.shootablesCollected >= level.shootablesNeeded);
if(level.shootablesCollected == level.shootablesNeeded) { // What ever code you want to execute once all shootables are collected IPrintLn("All Shootables Collected"); player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false ); }
break; } }
Tested and it works fine
This is for 3 triggers
I get no errors compiling map and it works but the game doesn't give me electric cherry once i shoot all three bottles just the on screen messages
I get this error it looks like a path error anyone know what I did wrong? ^1ERR(83) scripts/zm/zm_hard.gsc (12,32) : Compiler Internal Error : Compile error processing "using" file - file not found : scripts/custom/shootable.gsc
EDIT: Nevermind got it fixed and working
Last Edit: October 12, 2016, 09:08:16 am by Lukkie1998
I want to give the zombie shield weapon instead of a perk how do you do that?
*Note - Make sure you are using the script that TheKillerey made above since it has access to the player variable*
Replace player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false ); with this:
Code Snippet
Plaintext
weapon = GetWeapon("zod_riotshield"); player GiveWeapon(weapon);
I'm not sure if this is the right way to do it since it acts as a equipment not a weapon but it should work since it is in the weapons table. Please let me know if anything doesn't work and Ill figure out the right way.
Thanks man that worked ill give you some credit in my map description once its updated! Double Post Merge: October 15, 2016, 12:30:44 amThe script works but after testing it on multiplayer it gives the shield to only 1 player and not all players. Is theirs a way to script it to all players or all 4? Double Post Merge: October 15, 2016, 12:31:42 amholly fuck i was baked when I wrote that
Last Edit: October 15, 2016, 12:31:42 am by Gondor