Question Testing for a perk in a level

Tyne

Veteran
Messages
8
Reaction score
1
Points
783
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
145
Reaction score
56
Points
888
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

Veteran
Messages
8
Reaction score
1
Points
783
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
145
Reaction score
56
Points
888
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.
 
Top