User talk:Blue Shadow

From ZDoom Wiki
Jump to navigation Jump to search

GetArmorType

Are you sure your script works? Specifically, this check:

if (CheckInventory("Armor"))

Players do not ever have the base Armor item in their inventory. Instead, they have BasicArmor and/or HexenArmor. Also, they have BasicArmor even if they don't have an armor. Start a new Doom game, and before picking anything up, type printinv. --Gez (talk) 14:38, 14 December 2012 (CST)

Yes, the code works as intended. I've used Armor before to check on the amount of armor points the player may or may not have and it seems to function as expected. As for unforeseen problems that may result from using it instead of BasicArmor, I've not run into any, so far. However, if BasicArmor is the one that should be used to check on player's armor amount, then it's my bad and I shall fix the code.
Speaking of that check, I put it there because there is no way the function would return "true" to display the "unarmored" message by checking on the "None" value even if the player has no armor at all. - Blue Shadow (talk) 06:13, 15 December 2012 (CST)