View previous topic :: View next topic |
Author |
Message |
theDooMguy On a Rampage!
Joined: 07 Feb 2009 Location: Installing ZDaemon on the school computers
|
Posted: Sat Mar 21, 2009 10:29 pm Post subject: ACS problem |
|
|
I'm working on a map with an scripted event similar to the one on dietest18 map 30, on the "hive" area. Basically a bunch of monsters spawn and once they are all dead different monsters spawn in. the problem is that while testing, right after the demons spawn in, I get runaway script 4 terminated. I can't really see anything that could be causing this.
here's that script
script 4 (void)
{
int n = 100;
sector_setcolor(11,200,0,0);
delay(50);
thing_spawn(8,T_imp,0,9);
while(n>0)
{
n = thingcount(T_IMP,9);
delay(100);
}
delay(50);
thing_spawn(8,T_demon,0,10); <---ZD terminates right after this
delay(50);
n = 100;
while(n>5);
{
n = thingcount(T_DEMON,10);
delay(100);
}
delay(50);
thing_spawn(8,T_cacodemon,0,11);
delay(50);
n = 100;
delay(50);
while(n>0);
{
n = thingcount(T_CACODEMON,11);
delay(100);
}
delay(50);
sector_setcolor(11,0,200,0);
}
|
|
Back to top |
|
|
adeon has entered the game!
Joined: 22 Feb 2009
|
Posted: Sat Mar 21, 2009 11:40 pm Post subject: |
|
|
Could you upload the wad? |
|
Back to top |
|
|
theDooMguy On a Rampage!
Joined: 07 Feb 2009 Location: Installing ZDaemon on the school computers
|
|
Back to top |
|
|
ZombieMachine Bloatware!
Joined: 12 Jan 2009 Location: Im not telling.
|
Posted: Sun Mar 22, 2009 1:19 am Post subject: |
|
|
nice wad. You got a few missing texture errors. |
|
Back to top |
|
|
theDooMguy On a Rampage!
Joined: 07 Feb 2009 Location: Installing ZDaemon on the school computers
|
Posted: Sun Mar 22, 2009 2:31 am Post subject: |
|
|
thanks for the copliment-and the error check
I'll go check that out
EDIT: oh, I see what you mean. Other than the first one, I meant to delete that inner sector that causes those missing textures. fixed it on my version |
|
Back to top |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Sun Mar 22, 2009 9:01 am Post subject: |
|
|
Code: | thing_spawn(8,T_demon,0,10); <---ZD terminates right after this
delay(50);
n = 100;
while(n>5); [B]INSERT DELAY HERE[/B]
{
n = thingcount(T_DEMON,10);
delay(100);
}
delay(50);
|
I think it's because your variable gets doubled up here. But there are far easier methods to achieve the behaviour you like, and also more flexible. Contact me in Zdaemon IRC is you would like to know more about it ([QnB]Ronald). Also a little warning. Servers will hate you when you try to spawn more than 60 monsters at one time. |
|
Back to top |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Sun Mar 22, 2009 9:34 am Post subject: |
|
|
take out the semicolon after the second and third while.
also you shouldn't name your wad "epic.wad", as there is already a epic.wad, and people who use getwad are likely to download the wrong wad. (not to mention people who already have eternals epic.wad ) |
|
Back to top |
|
|
theDooMguy On a Rampage!
Joined: 07 Feb 2009 Location: Installing ZDaemon on the school computers
|
Posted: Sun Mar 22, 2009 4:37 pm Post subject: |
|
|
k I'll try the semicolon thing.
and I'll rename it. I really just threw on the first name that came to mind, Didn't know there was already an epic.wad either.
EDIT: well getting rid of the semicolons worked, but I would like to hear about Ronald's method too, so I'll head to irc in just a minute.
Good to know I shouldn't be spawning so many monsters at once on a server. I guess another thing I should keep in mind is that i'm testing this on a very fast computer (quad-core 3 GHz processer w/ 3.2 gigs of RAM ) so maybe when it's done i'll test it on my old computer and see how it runs there. |
|
Back to top |
|
|
|