Can anyone give me ideas on how to set up a room of monsters appearing?

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,704
I'm making a trigger that can make a random number between 10 to 30 creeps appearing in a room during a particular event.

The event is:

When a hero walks in, it sets up a random number.
If the random number matches, or conditions equals true, then monsters appear.
I need ideas on how to make creeps appear randomly. Just ideas.

I made this trigger, but I wondered if it works:

Trigger:
  • Monster Room
    • Events
      • Unit - A unit enters Monster House 1 <gen>
    • Conditions
      • (Triggering unit) Equal to HeroUnit[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • Trigger - Turn off (This trigger)
      • For each (Integer A) from (Random integer number between 1 and 10) to (Random integer number between 25 and 50), do (Actions)
        • Loop - Actions
          • Set TempPoint[500] = (Random point in Monster House 1 <gen>)
          • Unit - Create 1 UnitType[(Random integer number between 0 and 11)] for Neutral Hostile at TempPoint[500] facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack HeroUnit[(Player number of (Owner of (Triggering unit)))]
          • Custom script: call RemoveLocation(udg_TempPoint[500])


Reason is, I'm currently not at my computer. Those are copied-pasted from a text document, which was copied-pasted from WE yesterday.
Any tips, suggestions, etc. are welcome. Thanks in advance. :D
 

emilemil1

New Member
Reaction score
20
With that loop you could easily get more than 30 units.

Try:

For each (Integer A) from 1 to (Random integer number between 10 and 30), do (Actions)

And I wonder if your condition would work. You might have to set a specific number instead of a variable.

Otherwise it should be fine.
 

DarkSonicele

New Member
Reaction score
20
Other than what emilemil1 said, you're turning off the trigger before the rest of the actions have been run. Move it to the bottom!
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,704
To DarkSonicele:

The description for the (Turn off this trigger) said, this trigger will continue to execute even after it passes that action.

--------------

To emilemil1:

The problem arises when I don't know what to do with that Monster Room trigger. I am in need of finding a way to enable that trigger only by chance. But it's kind of hard to, you know, mix them up together with two triggers.

One trigger works continually, while the other works when the former trigger turns to true. That's the problem I'm having.
 

Lammet

New Member
Reaction score
0
Monster Room
Events
Unit - A unit enters Monster House 1 <gen>
Conditions
(Triggering unit) Equal to HeroUnit
Actions
Set Unitspawn (Random integer number between 10 and 30)
Unit - Create (Integer(Unitpawn (UnitType MONSTER))) for Neutral Hostile at random point in Region facing Default building facing degrees
Unit - Order (Last created unit) to Attack HeroUnit[(Player number of (Owner of (Triggering unit)))]
Custom script: call RemoveLocation(udg_TempPoint[500])

Something like that?
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,704
I forgot, I left out details. Sorry. That's not what I meant in the first place.

Trigger:
  • Dungeon 1A
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup[0] = (Units in (Playable map area))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup[0]) Less than 100
        • Then - Actions
          • For each (Integer A) from 1 to 12, do (Actions)
            • Loop - Actions
              • Set PlayerPosition[(Integer A)] = (Position of HeroUnit[(Integer A)])
              • Set TempPoint[0] = (PlayerPosition[(Integer A)] offset by 1000.00 towards (Random real number between 0.01 and 360.00) degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Terrain type at TempPoint[0]) Equal to Dungeon - Brick
                      • (Spawn 1 &lt;gen&gt; contains TempPoint[0]) Equal to True
                      • (Spawn 2 &lt;gen&gt; contains TempPoint[0]) Equal to True
                      • (Spawn 3 &lt;gen&gt; contains TempPoint[0]) Equal to True
                • Then - Actions
                  • Unit - Create 1 UnitType[(Random integer number between 0 and 11)] for Neutral Hostile at TempPoint[0] facing Default building facing degrees
                  • Unit - Order (Last created unit) to Attack HeroUnit[(Player number of (Triggering player))]
                  • Trigger - Remove (This trigger) from the trigger queue
                  • Custom script: call RemoveLocation(udg_PlayerPosition[bj_forLoopAIndex])
                  • Custom script: call RemoveLocation(udg_TempPoint[0])
                • Else - Actions
                  • Wait 1.00 seconds
                  • Trigger - Add (This trigger) to the trigger queue (Checking conditions)
        • Else - Actions
          • Do nothing
      • Custom script: call DestroyGroup(udg_TempGroup[0])


I wanted to try and mix this trigger with that Monster Room trigger up there. But I don't know how to do that. I've been trying it for over 2 hours.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top