Need help with motion detectors and fire alarms.

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.
User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Need help with motion detectors and fire alarms.

Post by Talonos »

Okay, I have a wad where there are a ton of people in a dozen rooms or so. Killing them off one room at a time is difficult, so I want to put in a control room. In this room, there are three buttons. The first locks all of the exits, and unlocks them next time you hit the button, which isn't very useful. That's easy enough to do. The next button turns on a motion detection security system. That is bad for the player, usually. I figure I could put together a non-motion activated security system that just shoots projectiles down all of the halls at regular intervals with a bunch of map-spots and some ACS scripting, but how to make is motion detecting is slightly beyond me. The last button activates a fire alarm, which (if possible) sends all of the people in all of the rooms running for the exit. This is usually not good either, then the halls will be filled with angry monsters. However, all three put together, it makes a nice killing machine. First close the exits, then activate the security system, then hit the fire alarm. The monsters will leave the fortified areas, run to the exit, and then loiter around in confusion near the exits as the security system funnels projectiles into them.

But how do I do that? In demo.wad, there were those shotgun zombies on patrol. How do I do the same thing so when a switch is thrown, everybody runs? How difficuly will it be?

And is there any way to make my security system motion activated?
User avatar
QBasicer
Posts: 766
Joined: Tue Sep 16, 2003 3:03 pm
Contact:

Post by QBasicer »

Couldn't you just make a bunch of monsters using dectorate that spawn when the system is active, and fire at the player if they see it? The monsters could be invisible.
User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Post by Talonos »

I could, but I need the security system to fire at the monsters too. I originally planned to put in invisible decorate monsters that would fire at the player, but then I realized that they wouldn't shoot at the monsters. I figured I could do thing hate or whatever, but then you would have a bunch of monsters shooting back at the invisible decorate monster, which would look like a bunch of monsters shooting at nothing. No, I think that a map spot is the way to go, though if there is a way to make it so the invisible decorate monster security system doesn't trigger infighting, then that could work.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

With Clever use of Thing_Hate, you could make the monsters not hate the turrets while the turrets hate the monsters and the player.
User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Post by Talonos »

And this would make the monsters not retaliate at the turrets?

Okay. That's cool.

But what about the fire alarm? I know there's a way to make monsters move. I've seen levels with monster patrols. I figure that there's a way I can make monsters "patrol" to the exit, and then have a script remove them. But how do I do that?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

To avoid retaliation against certain objects there is a NOTARGET flag in DECORATE. It specifically means that any object with this flag can not be set as a target for monsters. For your turrets this is probably the best solution.
User avatar
QBasicer
Posts: 766
Joined: Tue Sep 16, 2003 3:03 pm
Contact:

Post by QBasicer »

Would you want actuall turrents on the ceiling, or just invisible sources of fire?

Would rockets be your best bet?
User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Post by Talonos »

These would be invisible, behind a wall with a hole in it. So to the player, it will look like stuff is flying out of a small hole in the wall.

Rockect are good, only this is fantasy based. I'm thinking a lightning bolt (railgn weakened slightly) melf's acid arrow (Just some projectile) or a fireball (weaker version of rocket, only with a fireball graphic)

So what about the walking monsters?
User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Post by Talonos »

Okay, I think I have it part figured out. I looked in in demo.wad, and it seems that there are pathnodes that defined the patrol route. Then, there's thing_setgoal in the wiki(http://www.zdoom.org/wiki/index.php?title=Thing_SetGoal) but I still don't know how to set it up in a level. Is there a level any of you know of that extensively uses partol routes that I can look at for an example? or is there a way to throw together an exmple wad you could show me?
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Thing_SetGoal is an ACS command, so you'll need a script to accomplish what you want. From the sound of things, you're already using ACS so that shouldn't be a problem.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

you can also put Thing_SetGoal as the thisg's special and it will work
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Bio Hazard wrote:you can also put Thing_SetGoal as the thisg's special and it will work
Not for this effect, unless maybe all the monsters are dormant until you hit the button.

I think there may be an issue here if the monsters are made aware of the player... I don't think they will move toward their goal. I could be wrong.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Talonos wrote:Rockect are good, only this is fantasy based. I'm thinking a lightning bolt (railgn weakened slightly) melf's acid arrow (Just some projectile) or a fireball (weaker version of rocket, only with a fireball graphic)

So what about the walking monsters?
D'Sparil's blue bolt or modified Arc of Death sprites (lightning bolt), Hexen's poison dart (acid arrow) and Heretic's volcano fireball blown up in size (fireball).
User avatar
Talonos
Posts: 789
Joined: Mon May 03, 2004 7:08 am
Location: At college!

Post by Talonos »

Thanks guys!

Risen: I has saw that page and downloaded the wad, but it wouldn't open for me. Also, I needed to use an ACS script, and when I looked in te scripts lump, the only script was the one to control the camers. Sorry, but that didn't work for me.

I finally figured it out, though, I think.

Code: Select all

script 1 (void)
{
	Thing_SetGoal (1, 2, 20);
	Thing_SetGoal (6, 5, 20);
	Thing_SetGoal (10, 7, 20);
	Thing_SetGoal (12, 11, 20);
	Print(s:"The fire alarm went off!");  
}
Will that work? Will it get them moving to the path nodes, that chain to the exit?

Speaking of the exit, I now have problem 3:

How do I get them to go away?

I have the exits teleporters, for simplicities sake. There are two in the level: The one you "Came in" from, that you can't do anything with, and the one that exits you. Both of them need to do something to remove a monster from the level when they step on it. I have looked in the wiki under thing_remove and thing_destroy, but neither kills the activator of the script, it just kills the things with the right TID. What now? If I could get remove to work, that would be ideal. If I can't, I could build a script that teleportd the monsters to a dummy sector and then kill them. That way it will not leave bodies.
Locked

Return to “Editing (Archive)”