How to use ACS_Execute in Zscript?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Obo

How to use ACS_Execute in Zscript?

Post by Obo »

I try to use ACS_Execute (or the named variant, same problem) in a custom item and it gives this error: Unable to call action special ACS_Execute from constant declaration
I don't know why. I have the script in the map.

Class l_ret : CustomInventory
{
Default
{
Inventory.Amount 1;
Inventory.PickupMessage "Lab Returner";
Inventory.MaxAmount 1;
Inventory.Icon "RET1A0";
Inventory.AltHUDIcon "RET1A0";
Inventory.PickupSound "misc/p_pkup";
Inventory.UseSound "menu/activate";
-COUNTITEM
+INVENTORY.UNDROPPABLE
+INVENTORY.INVBAR
+INVENTORY.PERSISTENTPOWER
+INVENTORY.UNTOSSABLE
Radius 16;
Height 21;
Tag "Lab Returner";
}

States
{
Spawn:
RET1 A -1;
Stop;

Use:
TNT1 0 ACS_Execute(888, 0, 0, 0, 0);
Fail;
}
}
Obo

Re: How to use ACS_Execute in Zscript?

Post by Obo »

It's solved. Turns out I missed a frame letter and that didn't cause any problems in DB, like usual, but it made GZD crash.
Post Reply

Return to “Scripting”