Whenever a PC/NPC dies, the macro should set them to 0 wounds, move them to a different layer and apply the dead state to them. However, what I get is this now:
The wounds still get set ok, the state gets applied, but the layer doesn't get changed, and the damage result doesn't get posted to the chat log.Function getLayer requires exactly 1 parameters; 0 were provided.
I beleive I've traced it to this portion of the code:
Code: Select all
<!----------------SETS NPCS TO DEAD AT ZERO OR FEWER WOUNDS--------->
[r, IF(RW <= 0 && isNPC()), CODE:
{
[h: setState("Dead", 1)]
[h: setState("Bloodied", 0)]
[h: setBarVisible("Health", 0)]
[h: layerName = getLayer()]
[h: layerName = if(state.Dead&&isNPC(), 'OBJECT', layerName)]
[h: setLayer(layerName)]
}]