Jump to content
  • 0

ACS Problems?


Mengo

Question

So I'm making a script that checks if enough enemies of tag 25 are dead when you kill an enemy, then lowers a door.

However I keep getting errors with this.

 

Here's the script

 

Script 256 (VOID)
{
if ThingCount(T_NONE, 25) = 0
{
Floor_LowerToLowest(4,5)
}
}

 

Here's the error

 

Line 3 in file "...AppData\Roaming\SLADE3\temp\ACS.acs" ...
...AppData\Roaming\SLADE3\temp\ACS.acs:3: Missing '('.
> if ThingCount(
>             ^
 

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 0

Try this instead:

 

script 256 (void)

{
         while (ThingCount(T_NONE, 25) > 0)
          delay(35);
    Floor_LowerToLowest(4,5)
}

 

This script is based on my DooW mod where you must kill Barons on E1M8. It represents the same system as Tag 666

Edited by Deⓧiaz

Share this post


Link to post
  • 0
15 minutes ago, Deⓧiaz said:

Try this instead:

 

script 256 (void)

{
         while (ThingCount(T_NONE, 25) > 0)
          delay(35);
    Floor_LowerToLowest(4,5)
}

 

This script is based on my DooW mod where you must kill Barons on E1M8. It represents the same system as Tag 666

 

I now have another error.

Here's the error:
 

t_none : Identifier has not been declared.
>          while (ThingCount(T_NONE,2
>                                  ^
 

Share this post


Link to post
  • 0
2 hours ago, Mengo said:

Identifier has not been declared.

 

Okaaaay, let's try this:

 

script 256 (int floorTag, int time) {
         while (ThingCount(T_NONE, 25) > 0)
          delay(35);
    Floor_LowerToLowest(floorTag,5);
}

 

In doom builder select your monster(s) with tag 25, go to Actions and Setup the Action=80 (ACS Execute). Select your script 256 and type Tag of your Floor Sector.

Let the Time to be =0 (to be honest I don't remember why I've used this in my mod, but since it worked fine, I'm not complaining).

 

Share this post


Link to post
  • 1
5 hours ago, Mengo said:

Here's the script


Script 256 (VOID)
{
	if ThingCount(T_NONE, 25) = 0
	{
		Floor_LowerToLowest(4,5)
	}
}

 

Well, there are a lot of mistakes here that prevent the parser from doing anything useful.

  1. The if condition isn't within parenthesis. First change is to make it "if (ThingCount(T_NONE, 25) = 0)".
  2. The = is an assignment operator, not a comparison operator. It cannot work here. Second change is to make it "if (ThingCount(T_NONE, 25) == 0)".
  3. The instruction does not have its terminating marker (semi-colon). Third change is to make it "Floor_LowerToLowest(4,5);"

After these three changes, it should compile correctly... Whcih doesn't mean it will necessarily work! If you run that script just once before the monsters are dead, it'll see there are still some monsters, so skip the instruction, do nothing, and exit. Dexiaz's script has the logic tweak needed to keep the script running until all the monsters are dead.

 

3 minutes ago, Mengo said:

t_none : Identifier has not been declared.
>          while (ThingCount(T_NONE, 
>  

Do you have #include "zcommon.acs" at the top of your file?

Share this post


Link to post
  • 0
13 minutes ago, Gez said:

Do you have #include "zcommon.acs" at the top of your file?

Oh i entirely forgot!

Share this post


Link to post
  • 0
7 hours ago, Gez said:

Do you have #include "zcommon.acs" at the top of your file?

 

7 hours ago, Mengo said:

Oh i entirely forgot!

 

Oh dear...

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...