Page 1 of 2
Please help with calling ACS in decorate - Working with flaw
Posted: Wed Apr 06, 2016 11:41 pm
by S_Andrew_S
I fixed it: please move. Although, I do wonder what tics would be good to ensure all monsters spawn, sometimes I'm still a few short one numbers over 20 it seems...
EDIT: Okay, now it all works 99%, but--- when going to the next level in a play through, Zand 2.1.1 crashes but --- quite ironically --- it crashed offline, not online. Even though it will be used mostly online, I still won't stand for this. I may have this fixed before anyone reads this, but hell, it's very ironic.
Re: Please help with calling ACS in decorate
Posted: Wed Apr 06, 2016 11:48 pm
by Catastrophe
I'm guessing it works offline but not online?
Re: Please help with calling ACS in decorate
Posted: Wed Apr 06, 2016 11:52 pm
by S_Andrew_S
Neither
Re: Please help with calling ACS in decorate
Posted: Wed Apr 06, 2016 11:58 pm
by Catastrophe
I'm just curious, does it work if you call script 10000 with acs_executealways?
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:02 am
by S_Andrew_S
It does not, also I did add the lump name into LOADACS in case anyone asks.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:16 am
by Catastrophe
So, 10001 works with acs_executealways but 10000 doesn't?
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:20 am
by ibm5155
Code: Select all
Script 10000 (void)
{
int levelnum;
levelnum = GetLevelInfo(LEVELINFO_LEVELNUM);
printbold(d:levelnum);
SetResultValue(levelnum);
}
Does it work?
EDIT: you could also add some print codes for debug your decorate like
GTIK A 0 A_Print("You got the golden ticket! Escape to the chocolate factory!")
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:23 am
by S_Andrew_S
Nope. It does if I puke it however.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:27 am
by ibm5155
If I understand, you cannot execute any code after SetResultValue being called (it's like a return from functions), so your print code was never called (printbold(d:levelnum); )
Also I belive there was something related about doing some code in the first Spawn frame (ignoring the one with zero tic)
Try this one
Code: Select all
TNT1 A 5 NoDelay A_JumpIf(ACS_ExecuteWithResult(10000) == 1, "Level1Spawn")
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:31 am
by S_Andrew_S
NoDelay appears to be unsupported by 2.1.2.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:45 am
by ibm5155
(facepalm)
Code: Select all
Spawn:
TNT1 A 1
TNT1 A 4 A_JumpIf(ACS_ExecuteWithResult(10000) == 1, "Level1Spawn")
(bunch of other checks)
stop
It's 1 tic invisible, but it'll not hurt anyone
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 12:49 am
by S_Andrew_S
That doesn't work either. I'm under the impression it might be something stupid, like I forgot to add the decorate file or something.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 2:46 am
by SwordGrunt
I'm pretty sure support for script numbers over 1000 was added alongside support for named scripts (ZDoom 2.7.1), which means it's not in the current official Zandronum version yet.
Change the script number to something like 900 instead and try it.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 3:58 am
by S_Andrew_S
I changed the script to 850 for the level number and 851 for the spawner. It still didn't work. The thing is, I made a horribly ugly script once that allowed one faction to be set for each level, it used the same numbers and worked. The only differences was what was being executed in the scripts. I have no idea why this has to be any different.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 5:17 am
by Catastrophe
Can you post the script that worked, and the one that didn't? Lets compare.
Re: Please help with calling ACS in decorate
Posted: Thu Apr 07, 2016 5:29 am
by S_Andrew_S
Oh god, once you open this you will see why I want a less crude script
acs.zip
. Very crude, but it works, for the most part. The thing was, the original spawn system where every faction spawned at random only worked half of the time.
EDIT: Well, I did what IBM said and added the print line, yet it did not work. It appears it may not even be detecting the monsters, at all. I added #include "actors/Spawn/S-DOOMADV1.txt" (file name) in a decorate file. This issue has is pretty weird if you ask me, as if it doesn't want to work.
Re: Please help with calling ACS in decorate
Posted: Fri Apr 08, 2016 1:16 am
by Catastrophe
Does ur original problem occur in zdoom?
Re: Please help with calling ACS in decorate
Posted: Fri Apr 08, 2016 3:23 am
by S_Andrew_S
I just downloaded ZDoom 2.5, and I tried making this work there; it doesn't work on GZDoom 1.5 either; It still doesn't work. And if I puke script 10000 in my console, it will crash; GZDoom won't crash, however, it won't pull up the number. Zandronum pukes script 10000 correctly, however. GG ZDoom & GZDoom! Here is the test file by the way.
https://drive.google.com/file/d/0B2yXvg ... sp=sharing
EDIT: I remember that Zandronum 2.1 added support for scripts higher than 10000. So...
Re: Please help with calling ACS in decorate
Posted: Fri Apr 08, 2016 5:19 am
by Catastrophe
You're definitely doing something wrong if it crashes on latest version of Zdoom.
Re: Please help with calling ACS in decorate
Posted: Fri Apr 08, 2016 4:35 pm
by S_Andrew_S
I'm thinking it is a decorate issue. But what can it possibly be?