Mengo Posted January 20, 2020 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( > ^ 0 Quote Share this post Link to post
1 Gez Posted January 20, 2020 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. The if condition isn't within parenthesis. First change is to make it "if (ThingCount(T_NONE, 25) = 0)". 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)". 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? 1 Quote Share this post Link to post
0 Dexiaz Posted January 20, 2020 (edited) 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 January 20, 2020 by Deⓧiaz 1 Quote Share this post Link to post
0 Barry Burton Posted January 20, 2020 (edited) EDIT: Nvm, Dex got it. Edited January 20, 2020 by R4L 0 Quote Share this post Link to post
0 Mengo Posted January 20, 2020 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 > ^ 0 Quote Share this post Link to post
0 Dexiaz Posted January 20, 2020 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). 0 Quote Share this post Link to post
0 Mengo Posted January 20, 2020 t_none : Identifier has not been declared. > while (ThingCount(T_NONE, > 0 Quote Share this post Link to post
0 Mengo Posted January 20, 2020 13 minutes ago, Gez said: Do you have #include "zcommon.acs" at the top of your file? Oh i entirely forgot! 0 Quote Share this post Link to post
0 Dexiaz Posted January 21, 2020 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... 0 Quote Share this post Link to post
Question
Mengo
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.