Code: Select all
Script 34 (void)
{
if(!GetActorProperty(152,APROP_Dormant))
{
Thing_Deactivate(152);
ThingSound(152, "click", 127);
}
else
{
Thing_Activate(152);
ThingSound(152, "click", 127);
}
}
If I use it with a SwitchableDecoration actor (for example, a small decorative lantern - but I have tried several different actors) it behaves differently. The lantern goes to its inactive state label, as expected (with a click from the script) when I use the script the first time but, when I use the script again, the actor remains in the inactive condition (but I still hear a click, indicating that the script is running). I can certainly activate/deactivate the decoration using Thing_Activate/Thing_Deactivate in ACS. So, it seems to me as if the GetActorProperty check is failing somehow.
Here's the lantern:
Code: Select all
CLASS LanternLED : SwitchableDecoration
{
Default
{
Radius 8;
Height 16;
+FLOORCLIP;
}
States
{
Spawn:
Active:
LNTN A -1;
Stop;
Inactive:
LNTN B -1;
Stop;
}
}
I can easily work around this and get what I want. I just wanted to check why it is happening in the first place.
