Trying to do so will print an error stating the state is not flagged for use in weapons.
However if you try to do it on layer -1 (strife burning hands) it will work fine, could this behavior be extended to all other layers?
This will allow modders to define overlays that are independent of the weapon and persist between weapon switching.
This will also fruther deprecate the use of CustomInventory items, as they are the only way of achieving such overlays so far.
Quick player class for testing purposes:
Code: Select all
Class OverlayPlayer : DoomPlayer{
Override void Tick(){
Super.Tick();
//Press the reload key to activate the overlay
If(player.cmd.buttons&BT_RELOAD&&!(player.oldbuttons&BT_RELOAD)){
//Layer 2 prints an error, layer -1 works fine
player.SetPSprite(2,FindState("Gun"));
}
}
States{
Gun:
SHTG D 1;
Loop;
}
}