Spontaneous spawning.

Level 3
Joined
Nov 15, 2009
Messages
30
Well I ran into a problem the other day. In my map I want wells (both health and mana) to spawn on a specific place, but I want them to spawn differently. So maybe the first time a mana well will spawn and later a health etc.

I want the well to be there for 30 seconds, and then be removed. And also a ping on the minimap, and I want text to appear to tell people the good news :)
 

Dr Super Good

Spell Reviewer
Level 62
Joined
Jan 18, 2005
Messages
27,041
Yes so make it...

Perodically, itterate through a list of well points and then create a well of a random type (again can be from a list of well types) for each of those well points. When you spawn the wells, you add a timed life to them of 30 seconds and set a ping off to all human players. Finally after all that you send the message to everyone telling that the wells have spawned.
 
Last edited:
Level 7
Joined
Jul 3, 2011
Messages
251
Solution

I believe this is what you are looking for, let me know if it isnt though.

Replace the regions with the regions you want the fountains to spawn at, they will spawn at the start due to the "Start" trigger and keep spawning every 30 seconds due to the "Spawning" trigger, when a fountain of health spawns, a blue ping will ping its location, and a purple ping will ping fountain of manas location.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Ftype[1] = Fountain of Health
      • Set Ftype[2] = Fountain of Mana
      • Set Pos[1] = (Center of Region 000 <gen>)
      • Set Pos[2] = (Center of Region 001 <gen>)
  • Start
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Trigger - Run Spawning <gen> (ignoring conditions)
  • Spawning
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Set Int = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Int Equal to 1
            • Then - Actions
              • Cinematic - Ping minimap for (All players) at Pos[(Integer A)] for 2.00 seconds, using a Simple ping of color (0.00%, 0.00%, 100.00%)
            • Else - Actions
              • Cinematic - Ping minimap for (All players) at Pos[(Integer A)] for 2.00 seconds, using a Simple ping of color (50.00%, 0.00%, 100.00%)
          • Unit - Create 1 Ftype[Int] for Neutral Passive at Pos[(Integer A)] facing Default building facing degrees
          • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
 
I believe this is what you are looking for, let me know if it isnt though.

Replace the regions with the regions you want the fountains to spawn at, they will spawn at the start due to the "Start" trigger and keep spawning every 30 seconds due to the "Spawning" trigger, when a fountain of health spawns, a blue ping will ping its location, and a purple ping will ping fountain of manas location.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Ftype[1] = Fountain of Health
      • Set Ftype[2] = Fountain of Mana
      • Set Pos[1] = (Center of Region 000 <gen>)
      • Set Pos[2] = (Center of Region 001 <gen>)
  • Start
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Trigger - Run Spawning <gen> (ignoring conditions)
  • Spawning
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Set Int = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Int Equal to 1
            • Then - Actions
              • Cinematic - Ping minimap for (All players) at Pos[(Integer A)] for 2.00 seconds, using a Simple ping of color (0.00%, 0.00%, 100.00%)
            • Else - Actions
              • Cinematic - Ping minimap for (All players) at Pos[(Integer A)] for 2.00 seconds, using a Simple ping of color (50.00%, 0.00%, 100.00%)
          • Unit - Create 1 Ftype[Int] for Neutral Passive at Pos[(Integer A)] facing Default building facing degrees
          • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)

You don't need "Start" trigger, just let the Spawning trigger initially enabled and it will apply the first spawning in 30 seconds.

Don't use "Run trigger" on a trigger with a periodic event; use "Trigger - Turn on (Trigger)". However, you don't need the Start trigger in the first place.
 
Level 7
Joined
Jul 3, 2011
Messages
251
You don't need "Start" trigger, just let the Spawning trigger initially enabled and it will apply the first spawning in 30 seconds.

Don't use "Run trigger" on a trigger with a periodic event; use "Trigger - Turn on (Trigger)". However, you don't need the Start trigger in the first place.

I was using that trigger to spawn one as soon as the game starts, not just at 30 seconds, but as you said its not needed, if not wanted.
 
Top