HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with a LOT of doors.

10-03-2004, 04:45 AM#1
Ares_WarBlade
I decided to revive an old project I had started months ago but never finished (Just like all of my others :o but that's another story.) Anyways, it takes place inside of a labyrinth with 576 rooms, and each room has 4 doors. I'm wondering if there is an easy way to make 576 regions relatively quickly and relatively organized (So it's not Area 001 Copy 351 or something crazy like that.)

Basically, I want to make it so as soon as you enter a room, all the doors close, you step on a ground lever in the middle of the room to "activate" the room. When you step on the lever one of several things can happen... like a certain % of the time, a monster will spawn, you kill the monster, and randomly one of the four doors opens. So really once the objective of the room is complete a door will randomly open.

Now what I'm wondering... is there a way to do this easier than making 576 regions for rooms, 576 regions for floor levers, and god only knows how many triggers to do the room objectives and random opening of a single door then closing all the doors once the person has entered the new room. Oh, and I planned on having them backtrack one room if the randomness desired them to do so in case you are wondering.
10-03-2004, 05:45 AM#2
Dark_Uber
Probably not, you could make the maze smaller. Thats the only way to make it easier I can think of
10-03-2004, 06:10 AM#3
Miningjrk
Mass regions are hard to deal with, as said in the post above the only way i can think of to make it easier is to make a smaller maze. I do not think thats what you want to do so i suggest you get started on those 576 regions (x3 i think?) o_O
10-03-2004, 01:01 PM#4
Dead-Inside
"Unit comes within X range"

Then just check for gate, who's the owner of the gate, if the gate should open to the unit in range, then wait, check if the unit is there, if it is, wait more... Then close.
10-03-2004, 01:07 PM#5
Gandalf2349
What I would do is make a region that encloses the entire room and doors, then put them into an array at initializiation, destroy the fucking huge trigger so it doesn't lag, and then you've got them all in arrays for easy access.

No real easy way to do it though. I got a hold of an unprotected copy of one of the Maze of Death maps, and guess what, they don't detect what terrain the unit is on, it's a big mess of regions.
10-03-2004, 01:10 PM#6
Dead-Inside
You can't detect which terraintype (Except blight) the units are on.

I still suggest using unit gets within range though. This goes hand in hand with Gandalf's suggestion above.
10-03-2004, 01:14 PM#7
Gandalf2349
Thats what I was saying.

What would you be detecting he comes within range with?
(wow, that came out hard to understand)

Code:
Unit Comes within X of ?
10-03-2004, 01:20 PM#8
Dead-Inside
Yea I know, I was just "going over the basics". If you have preplaced gates, you can just pick them all and set them to array numbers manually. Else you can do what Gandalf said. There's no big difference to that really.

If you're going to be able to build gates, you'll be needing to do some more advanced stuff. Not only set newly built gates (Which are regular structures which are then replaced by doodads) but also remove destroyed ones. Pretty advanced stuff.

Regards
Dead-Inside
10-03-2004, 01:21 PM#9
Gandalf2349
You could use the Trigger - Add Event action, but that's known to lag.
10-03-2004, 05:20 PM#10
Ares_WarBlade
Hmmm, I like the whole idea of

Unit Comes within X of ?

I could make it like...

Unit comes within 0 of "the floor switch" will randomly select one door in a radius of 250 or so and open it, then do the % spawn.

I'm not a trigger Guru, but I'm pretty sharp and a quick learner, and I knew my way around the Age of Empires II trigger system pretty well so it shouldn't be too hard for me to figure out how do this.

Oh, and is there a way so he steps on the floor switch, the trigger becomes disabled and the switch is killed (So it's in the down position) and once he steps on the switch of the next room, the switch he previously destroyed pops back up and the disabled trigger is re-enabled?
10-03-2004, 05:58 PM#11
Dead-Inside
... Unit comes within X range of YOUR DOOR.
10-03-2004, 06:05 PM#12
Ares_WarBlade
Quote:
Originally Posted by Dead-Inside
... Unit comes within X range of YOUR DOOR.

But see, Theres a floor switch in the middle of the room, I want it so if the player's unit steps on it, one of the four doors will randomly open. If it is within x range of the Door, then all the doors would be opened by this as long as the player walks around the room wouldn't they? I only want One door to open per room.
10-03-2004, 07:17 PM#13
Dead-Inside
Umm... How about setting the event to react when the button is pressed? How's that for smart event triggering?
10-03-2004, 10:49 PM#14
-={tWiStÄr}=-
you would still need each floor switch and region stored in 2 arrays. not too hard tho,
ok so
pick all floorswitches
set floorswitches[i] = picked unit
set i = i + 1 //integer var
endthatthing
set i = 1
pick all regions//setback not possible function, may work with return bug doubt it
if picked region containts floorswitches[i] then set regions[i] = picked region
set i = i + 1
so that will correspond each region to the floor switch, but the pick all regions thing.. or another way would be to create the rects manually so like
rect(0,0,256,256)
set rect[i] = last created rect
loop a 1 - 576
if rect has floorswitches[a] set rect[i] = rect[a]
something like that, ill go into more detail later. but basicly, you create a region at each place, then find out which floorswitch it has. dont use that yet, its totaly wrong
10-03-2004, 11:33 PM#15
Ares_WarBlade
I'm so confused. :( Maybe I should just post what I've got so far and have someone expirement so I can see how you did it via reverse engineering.(Did all the regions for the rooms and switches, but have a map without them.)