• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help for an amateur triggerer.

Status
Not open for further replies.
Level 2
Joined
Sep 17, 2012
Messages
11
Hello there,

I'm trying to create a dungeon-crawling based map with a random room system; as in, the player cannot possibly know where they'll end up if they take x or y exit at the beginning of the game, but will be able to come back to their first room if they wish to do so.
The map is filled with these rooms, small and large, with a diverse number of exits, that we'll call North, South, East and West exits (depending on the location of the exit itself), leading to a North, South East and West entrance to another room.
The simplest system I thought of for now was a system which basically assigned a random integer value at map initialisation to a variable specific to one exit, and another random integer value to a variable specific to another entry. This way, exits and entrances would be randomized, and the system would just have to assign which entrances and exits have an equal integer value, thus 'linking' them together at the start of the game.
Only problem is, I can't think of a way so that only one of these integer values are used: I don't want three exits leading to one same entrance, and vice-versa. Is there a possibility of restraining this, or am I taking the wrong end of the stick here, and there's a much simpler way of doing something like this?

Thanks in advance.
 
Level 11
Joined
Aug 6, 2009
Messages
697
All I can say is use a randomly generated order at startup.
EX:
  • Untitled Trigger 003
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set RandomedNumber = (Random integer number between 1 and 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomedNumber Equal to 1
        • Then - Actions
          • -------- Your order of enterance/exits here. --------
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomedNumber Equal to 2
        • Then - Actions
          • -------- Your next order of enterance/exits here. --------
        • Else - Actions
 
Status
Not open for further replies.
Top