I'm guessing the player is not being set as activator, hence why its returning 1. I tried SetActivator(0, AAPTR_PLAYER1); instead of SetActivatorToTarget(0); but the problem remained. Any ideas on what is going on here?
Decorate:
- Code: Select all • Expand view
actor LootBox : SwitchableDecoration
{
health 150
radius 16
height 28
scale 0.5
Activation THINGSPEC_Activate
+USESPECIAL
+CANNOTPUSH
+SHOOTABLE
+NOBLOOD
States
{
Spawn:
*irrelevant code*
loop
Active:
VOXB A 1 A_JumpIf(CallACS("KeyCheck",0,0,0) == 0,"OpenBox")
VOXB A 0 A_JumpIf(CallACS("KeyCheck",0,0,0) == 1,"NoKey")
Stop
NoKey:
VOXB A 1 A_SpawnItem("Lootbox")
VOXB A 1 A_Print("Key Required",3,"BIGFONT")
Stop
OpenBox:
VOXB A 1 A_SpawnItem("LootboxOpen")
TNT1 A 0 A_PlaySound("chest/open", 0, 1.0, FALSE, 1.3)
Stop
Death:
*irrelevant code*
stop
}
}

ACS:
- Code: Select all • Expand view
Script "KeyCheck" (void)
{
SetActivatorToTarget(0);
Delay(1);
if(CheckInventory("ModdedBlueCard") || CheckInventory("ModdedRedCard")
|| CheckInventory("ModdedYellowCard") || CheckInventory("ModdedRedSkull")
|| CheckInventory("ModdedBlueSkull") || CheckInventory("ModdedYellowSkull"))
{
SetResultValue(0);
terminate;
}
else
{
SetResultValue(1);
terminate;
}
}