Jump to content
  • 0

Question on using ACS in Slade3, UDMF format


aloysiusfreeman

Question

Hey everyone 

 

Finally at the point of experimenting with ACS scripting for the first time. Here is the situation I'm working with. 

 

I'm trying to use ACS_LockedExecute to lower the floor with a red skull lock and am using the following script: 

 

Quote

script 1 OPEN

{

if (CheckInventory("RedCard") || CheckInventory("RedSkull"))

{

Print(s:"You use the red skull.");

// Lower floor

Floor_LowerToNearest(2,34);

}

else

Print(s:"You need the red skull.");

}

 

When I test this, trying to activate without the skull will give me the message that says "You need the red skull to activate this object." When I try to activate with the skull, I get a message in the "P_startscript: unknown script 1"

 

The values I put for the special argument are: 

 

Script#: 1

Max Levelnum: 0

First Arg: 0

Second Arg: 0

Lock #: 0

 

believe I am compiling this correctly, and the ACS Source doc is set in the wad under Behavior. 

 

With all of this said, is there anything obvious that I am completely overlooking here? 

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 1

You're using UDMF for your map. UDMF allows you to lock any line special with a key. None of what you're trying to accomplish here has to be done via ACS.

 

image.png

Share this post


Link to post
  • 1

You have OPEN script, that is script which gets run on start of map, not triggered later.

You need to make it normal closed script, starting with script 1 (void) instead of script 1 OPEN.

 

Also if you use ACS_LockedExecute, then it checks for key before executing and you don't need to check for the key in the script itself.

Share this post


Link to post
  • 1
15 minutes ago, aloysiusfreeman said:

I will need to take a deeper look then - I am using Slade and I do not recall seeing an option for lock number when selecting floor lower to nearest floor.

 

just use UDB do you have the "Show all" option enabled in the Item Properties sidebar?

Share this post


Link to post
  • 0
On 7/25/2023 at 9:12 PM, SMG_Man said:

You're using UDMF for your map. UDMF allows you to lock any line special with a key. None of what you're trying to accomplish here has to be done via ACS.

 

image.png

 

I will need to take a deeper look then - I am using Slade and I do not recall seeing an option for lock number when selecting floor lower to nearest floor.

 

This will definitely make life easier! 

Share this post


Link to post
  • 0

SO whenever I try to add in the lock #, it will automatically revert to 0

 

Alright, so for some reason it wouldnt save while in Properties proper, but if you pull up the side menu for Item Properties, I'm able to save it. Tested and good - we're in business!

Edited by aloysiusfreeman

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...