However, I have a minor problem with it. I have set it so that, if active, the item spawns and then skips to the end of the Active state sequence (without running through the opening animation) and sits there. Fine, that's what I want. However, if I want the closed (inactive) version to appear on a map, it spawns in its open position and then closes in the first few tics of the game. Not a huge issue but if the player start is near one of these decorations, the player can see and hear the toolbox closing.
Here is my code.
Code: Select all
//Little hand-held toolbox
ACTOR ModelToolBoxHandHeld : SwitchableDecoration
{
Radius 16
Height 16
+FLOORCLIP
States
{
Spawn:
POSS A 1
goto Active+6
Active:
POSS F 2 A_StartSound("misc/ToolboxOpen1")
POSS EDCBA 2
POSS A -1
Stop
Inactive:
POSS ABCD 2
POSS E 2 A_StartSound("misc/ToolboxClose1")
POSS F 2
POSS F -1
Stop
}
}
It's currently in DECORATE, but it doesn't have to be.