Please help with calling ACS in decorate - Working with flaw
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Please help with calling ACS in decorate - Working with flaw
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.
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.
Last edited by S_Andrew_S on Mon Apr 11, 2016 11:55 pm, edited 14 times in total.
-
- Retired Staff / Community Team Member
- Posts: 2569
- Joined: Sat Jun 02, 2012 2:44 am
Re: Please help with calling ACS in decorate
I'm guessing it works offline but not online?
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
-
- Retired Staff / Community Team Member
- Posts: 2569
- Joined: Sat Jun 02, 2012 2:44 am
Re: Please help with calling ACS in decorate
I'm just curious, does it work if you call script 10000 with acs_executealways?
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
It does not, also I did add the lump name into LOADACS in case anyone asks.
-
- Retired Staff / Community Team Member
- Posts: 2569
- Joined: Sat Jun 02, 2012 2:44 am
Re: Please help with calling ACS in decorate
So, 10001 works with acs_executealways but 10000 doesn't?
- ibm5155
- Addicted to Zandronum
- Posts: 1641
- Joined: Tue Jun 05, 2012 9:32 pm
- Location: Somewhere, over the rainbow
Re: Please help with calling ACS in decorate
Code: Select all
Script 10000 (void)
{
int levelnum;
levelnum = GetLevelInfo(LEVELINFO_LEVELNUM);
printbold(d:levelnum);
SetResultValue(levelnum);
}
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!")
Last edited by ibm5155 on Thu Apr 07, 2016 12:23 am, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
Nope. It does if I puke it however.
- ibm5155
- Addicted to Zandronum
- Posts: 1641
- Joined: Tue Jun 05, 2012 9:32 pm
- Location: Somewhere, over the rainbow
Re: Please help with calling ACS in decorate
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
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")
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
NoDelay appears to be unsupported by 2.1.2.
- ibm5155
- Addicted to Zandronum
- Posts: 1641
- Joined: Tue Jun 05, 2012 9:32 pm
- Location: Somewhere, over the rainbow
Re: Please help with calling ACS in decorate
(facepalm)
It's 1 tic invisible, but it'll not hurt anyone
Code: Select all
Spawn:
TNT1 A 1
TNT1 A 4 A_JumpIf(ACS_ExecuteWithResult(10000) == 1, "Level1Spawn")
(bunch of other checks)
stop
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
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.
- SwordGrunt
- Forum Regular
- Posts: 377
- Joined: Thu Jun 07, 2012 8:43 pm
Re: Please help with calling ACS in decorate
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.
Change the script number to something like 900 instead and try it.
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
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.
-
- Retired Staff / Community Team Member
- Posts: 2569
- Joined: Sat Jun 02, 2012 2:44 am
Re: Please help with calling ACS in decorate
Can you post the script that worked, and the one that didn't? Lets compare.
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
Oh god, once you open this you will see why I want a less crude script
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.
. 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.
You do not have the required permissions to view the files attached to this post.
-
- Retired Staff / Community Team Member
- Posts: 2569
- Joined: Sat Jun 02, 2012 2:44 am
Re: Please help with calling ACS in decorate
Does ur original problem occur in zdoom?
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
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...
https://drive.google.com/file/d/0B2yXvg ... sp=sharing
EDIT: I remember that Zandronum 2.1 added support for scripts higher than 10000. So...
-
- Retired Staff / Community Team Member
- Posts: 2569
- Joined: Sat Jun 02, 2012 2:44 am
Re: Please help with calling ACS in decorate
You're definitely doing something wrong if it crashes on latest version of Zdoom.
- S_Andrew_S
- Posts: 37
- Joined: Fri May 29, 2015 11:21 pm
- Location: San Nicholas Island
- Contact:
Re: Please help with calling ACS in decorate
I'm thinking it is a decorate issue. But what can it possibly be?