Strange lump problem

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
Classic Doom Guy
Posts: 176
Joined: Wed Mar 21, 2007 11:15 pm
Location: Kali-FORnia

Strange lump problem

Post by Classic Doom Guy »

I made a lump.wad containing a MAPINFO lump. On map 11, I included a cyberdemonspecial, and a spidermastermindspecial, as well as a specialaction_lowerfloor.

There is a sector tagged 666. What I want to happen, is have that sector lower when both the cyberdemon and spider are dead.

But when the spider dies, the level ends.
User avatar
Penguinator
Posts: 625
Joined: Mon May 22, 2006 6:55 pm
Location: Hell

Post by Penguinator »

Just make an if/else ACS script.
Spoiler:
Now have the Cyberdemon and Spidermastermind have ACS Execute always and the script tag of 666. My script may not work right off the bat since I retrieved it from memory and I am fairly new at scripts.
Classic Doom Guy
Posts: 176
Joined: Wed Mar 21, 2007 11:15 pm
Location: Kali-FORnia

Post by Classic Doom Guy »

Is there a way to do it and avoid scripts? I've been playing around with them, and they're cool and all, but they add a whole level of complexity to the map that I'm not prepared to deal with.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

No. If you want to do something based on the death of 2 separate monsters a script is the only option.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Scripts aren't that complex, though I'd really recommend using something approaching proper spacing rather than none's mess. :P

Try this:

Code: Select all

#include "zcommon.acs"

script 666 OPEN {
     if (!ThingCount(T_SPIDERMASTERMIND, 0) && !ThingCount(T_CYBERDEMON, 0)) {
          Floor_LowerToLowest(666, 16);
     }
     delay(1);
     restart;
}
Now just tag your sector(s) 666 and remove the MAPINFO that you created. As soon as all Cyberdemons and Spidermasterminds in the map are dead, the sectors will lower.

That wasn't so hard, was it?
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

Code: Select all

script 1 open
{
while(thingcount(0,1)>0)
    {
      delay(35);
    }
floor_lowertolowest(666,16);
}
It's easier if you just tag the Spider and the Cyber with a Thing ID and then run a while loop so you dont have to restart the script :P
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Either way works just fine. What's so bad about using restart?
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

I dunno, just a personal opinion :) (sorta gave me headaches at one point, long story)
Classic Doom Guy
Posts: 176
Joined: Wed Mar 21, 2007 11:15 pm
Location: Kali-FORnia

Post by Classic Doom Guy »

And the funny part is, after I got to thinking, and trying out some other Doom as Hexen triggers, I realized that I'd rather go with it in that mode anyway. It would be insane not to take advantage of the wide range of options, especially since I made a bunch of vanilla doom maps that have all this elaborate stuff to give the appearance of complicated actions.

So yeah, I'll tackle scripts. :P


Though Graf Zahl, even without the two monsters for one sector thing, I couldn't get the spidermastermindspecial to perform a lower floor special action, it just ended the level regardless.

But I guess that's moot now.
Locked

Return to “Editing (Archive)”