Script not executing properly?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Script not executing properly?

Post by OmDr »

Hi, I'm still new to ACS and am having a problem that I just can't seem to figure out.
The script:

Code: Select all

#include "zcommon.acs"

script 100 (VOID)
{
  ChangeLevel ("Map02", 0, CHANGELEVEL_NOINTERMISSION, -1);
}
The object:

Code: Select all

Actor Levelender : SwitchingDecoration 10242
{
  Height 40
  Radius 20
  Activation THINGSPEC_Activate
  +SOLID
  +BUMPSPECIAL
  States
  {
  Spawn:
    PRAM A 10
    Loop
  Active:
    PRAM B 1 ACS_Execute(100,0)
    Stop
  }
}
When the script starts, rather than changing to map02, it jumps to the Doom 2 end credits (the 'monster names' one). There are no errors. Why is this happening?
Last edited by OmDr on Tue Jul 22, 2014 2:07 pm, edited 1 time in total.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Script not executing properly?

Post by ChronoSeth »

OmDr wrote:

Code: Select all

ACS_Execute(100,0)
This is executing script 100, not script 1.

Not sure why that would do what you're describing, though.
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Re: Script not executing properly?

Post by OmDr »

Whoops, copy paste error on my part. The script is 100, not 1!
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Script not executing properly?

Post by ChronoSeth »

It works properly when I make a test wad with that code, so there must be something else at work here. Any other info you can provide?
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Re: Script not executing properly?

Post by Isle »

is the mapinfo screwed up?
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Re: Script not executing properly?

Post by OmDr »

Spoiler: MAPINFO
And that is pretty much it. I've noticed that even if I set the script to jump to another level (map03, map10, map20), it will still jump to the credits.
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Re: Script not executing properly?

Post by OmDr »

Ok. I've found that if I use Teleport_NewMap(2, 0, 0) I can get to other maps, though I would highly prefer changelevel. Any ideas?
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: Script not executing properly?

Post by Blue Shadow »

Can we take a look at the file in which you're using the above code?
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Re: Script not executing properly?

Post by OmDr »

And just as I get ready to provide a link, I do one last test and actually finally solve the problem. Turns out another script I wasn't even using was interfering with it (somehow. They don't use the same numbers). Deleting that script allows the changelevel command to work as intended. In any case, thanks all of you for trying to help!
Locked

Return to “Editing (Archive)”