The below setup should always give +25 to armour/+5 AC, because each of armours should add up to that amount for that class. These armours work normally and give the correct AC if picked up from their component items, or given by the console "give X" command. But a custom inventory giving them doesn't seem to work; and no matter what I set for the items (they should give different bonuses by class), they actually each give +5 to armour (which would be +1 AC) as if they are not reading the correct stats from the playerclass for some reason.
Code: Select all
ACTOR ArmourLesserWalp : CustomInventory
{
+INVENTORY.QUIET
+INVENTORY.PICKUPFLASH
+INVENTORY.AUTOACTIVATE
Inventory.MaxAmount 0
States
{
Spawn:
TNT1 A 0 Nodelay A_JumpIf(CheckClass("CrusaderPlayer",AAPTR_PLAYER1),"SpawnCrus")
TNT1 A 0 A_JumpIf(CheckClass("MyrmidonPlayer",AAPTR_PLAYER1),"SpawnMyrm")
TNT1 A 0 A_JumpIf(CheckClass("MagisterPlayer",AAPTR_PLAYER1),"SpawnMagi")
TNT1 A 0 A_JumpIf(CheckClass("DruidPlayer",AAPTR_PLAYER1),"SpawnDrui")
Stop
SpawnMyrm:
ARMM M -1
Stop
SpawnCrus:
ARMC M -1
Stop
SpawnMagi:
ARMG M -1
Stop
SpawnDrui:
ARMD M -1
Stop
Pickup:
TNT1 A 0 A_JumpIf(CheckClass("CrusaderPlayer",AAPTR_PLAYER1),"IsCrus")
TNT1 A 0 A_JumpIf(CheckClass("MyrmidonPlayer",AAPTR_PLAYER1),"IsMyrm")
TNT1 A 0 A_JumpIf(CheckClass("MagisterPlayer",AAPTR_PLAYER1),"IsMagi")
TNT1 A 0 A_JumpIf(CheckClass("DruidPlayer",AAPTR_PLAYER1),"IsDrui")
Stop
IsMyrm:
TNT1 A 0
TNT1 A 1 A_GiveInventory("AmuletOfWardingW", 1,AAPTR_PLAYER1)
TNT1 A 1 A_GiveInventory("DrakeBoots", 1,AAPTR_PLAYER1)
TNT1 A 0 A_Log("\c[white]A fresh set of \c[red]Gauntlets\c[white] and \c[brown]Boots\c[white]! They should help protect me.")
TNT1 A 0 A_Playsound("Pickup/ArmourMed",CHAN_ITEM,1,false,ATTN_NONE)
Stop
IsCrus:
TNT1 A 0
TNT1 A 1 A_GiveInventory("AmuletOfWardingW", 1,AAPTR_PLAYER1)
TNT1 A 1 A_GiveInventory("DrakeBoots", 1,AAPTR_PLAYER1)
TNT1 A 0 A_Log("\c[white]Excellent, a new \c[red]Shield\c[white] and \c[gold]Rosary\c[white]! They should help protect me.")
TNT1 A 0 A_Playsound("Pickup/ArmourMed",CHAN_ITEM,1,false,ATTN_NONE)
Stop
IsMagi:
TNT1 A 0
TNT1 A 1 A_GiveInventory("MeshArmourW", 1,AAPTR_PLAYER1)
TNT1 A 1 A_GiveInventory("PlatinumHelmW", 1,AAPTR_PLAYER1)
TNT1 A 0 A_Log("\c[white]A pristine \c[red]Tunic\c[white] and \c[sapphire]Focusing Stone\c[white]! They should help protect me.")
TNT1 A 0 A_Playsound("Pickup/ArmourClothing",CHAN_ITEM,1,false,ATTN_NONE)
Stop
IsDrui:
TNT1 A 0
TNT1 A 1 A_GiveInventory("MeshArmourW", 1,AAPTR_PLAYER1)
TNT1 A 1 A_GiveInventory("PlatinumHelmW", 1,AAPTR_PLAYER1)
TNT1 A 0 A_Log("\c[white]A pristine \c[green]Tunic\c[white] and \c[red]Wolf Fetish\c[white]! They should help protect me.")
TNT1 A 0 A_Playsound("Pickup/ArmourClothing",CHAN_ITEM,1,false,ATTN_NONE)
Stop
}
}