Question Testing for a perk in a level

Tyne

Known Member
Messages
8
Points
108
How would I get a boolean for whether or not a perk was in a level?
I've tried isDefined("specialty_additionalprimaryweapon") and isDefined(level._custom_perks["specialty_additionalprimaryweapon"]) and both neither work. Trying to use it within an if statement.
 
Last edited:

CF4_99

Veteran
Messages
100
Points
663
This is the correct what to see what perks are available on the map

Code:
if(isDefined(level.zombiemode_using_juggernaut_perk))
if(isDefined(level.zombiemode_using_sleightofhand_perk))
if(isDefined(level.zombiemode_using_revive_perk))
if(isDefined(level.zombiemode_using_doubletap_perk))
if(isDefined(level.zombiemode_using_marathon_perk))
if(isDefined(level.zombiemode_using_additionalprimaryweapon_perk))
if(isDefined(level.zombiemode_using_deadshot_perk))
if(isDefined(level.zombiemode_using_tombstone_perk))
if(isDefined(level.zombiemode_using_chugabud_perk))
if(isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_nomotionsensor"]))
if(isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_grenadepulldeath"]))
 

Tyne

Known Member
Messages
8
Points
108
This is the correct what to see what perks are available on the map

Code:
if(isDefined(level.zombiemode_using_juggernaut_perk))
if(isDefined(level.zombiemode_using_sleightofhand_perk))
if(isDefined(level.zombiemode_using_revive_perk))
if(isDefined(level.zombiemode_using_doubletap_perk))
if(isDefined(level.zombiemode_using_marathon_perk))
if(isDefined(level.zombiemode_using_additionalprimaryweapon_perk))
if(isDefined(level.zombiemode_using_deadshot_perk))
if(isDefined(level.zombiemode_using_tombstone_perk))
if(isDefined(level.zombiemode_using_chugabud_perk))
if(isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_nomotionsensor"]))
if(isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_grenadepulldeath"]))
I thought so. Came across those in the string dump but I figured there might've been a way to test for it using a string to represent the perk.
 

CF4_99

Veteran
Messages
100
Points
663
I thought so. Came across those in the string dump but I figured there might've been a way to test for it using a string to represent the perk.
The problem with trying to use isDefined("perk name"); is that no matter what, the perk is already defined, even if it isn't going to be used on the map.
 

Tyne

Known Member
Messages
8
Points
108
The problem with trying to use isDefined("perk name"); is that no matter what, the perk is already defined, even if it isn't going to be used on the map.
I was afraid of that.
 

Top