Spawn different kinds of creep every x minutes

wirawiki

New Member
Reaction score
0
Hello there... I wanted to make a trigger that for the first 10 minutes of the game, every 30 seconds, it spawns 10 Jahrakal (Level 2) creeps on the center of the map. And the next 10 minutes, the creeps spawn will be Broodmother (Level 3). Next 10 minutes, Jahrakal Berserker (Level 5) and so on. I can make a trigger for every x minutes spawn y units, but what can I do with this condition? Anyone has suggestions?
 
I think it will be easy to do it this way:
1. create 3 integer variables (1 for every 10 minutes)
2. At the Map Initialziation, set CreepType(unit) = Whatever starting spawned unit
3. When a time passes what you want, (lets say make an event Time - Elapsed game time is 600 seconds) then set CreepType = next units(so on..).
4. Make a periodic event: Time - Every 60 seconds of game time, create (your amount of units) CreepType at (Point).
 
Code:
Spawn Init
    Events
        Map initialization
    Conditions
    Actions
        Set Temp_Int = 0
        Set Temp_Unit[1] = Peasant
        Set Temp_Unit[2] = Footman
        Set Temp_Unit[3] = Knight

Code:
Spawning
    Events
        Time - Every 600.00 seconds of game time
    Conditions
    Actions
        Set Temp_Int = (Temp_Int + 600)
        Set Temp_Point = (Center of (Playable map area))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Temp_Int Equal to 600
            Then - Actions
                Unit - Create 10 Temp_Unit[1] for Neutral Hostile at Temp_Point facing Default building facing degrees
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Temp_Int Equal to 1200
            Then - Actions
                Unit - Create 10 Temp_Unit[2] for Neutral Hostile at Temp_Point facing Default building facing degrees
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Temp_Int Equal to 1800
            Then - Actions
                Unit - Create 10 Temp_Unit[3] for Neutral Hostile at Temp_Point facing Default building facing degrees
            Else - Actions
        Custom script:   call RemoveLocation(udg_Temp_Point)

Make sure to change the Temp_Unit[x] with your unit type.
 
Code:
Spawn Init
    Events
        Map initialization
    Conditions
    Actions
        Set Temp_Int = 0
        Set Temp_Unit[1] = Peasant
        Set Temp_Unit[2] = Footman
        Set Temp_Unit[3] = Knight

Code:
Spawning
    Events
        Time - Every 600.00 seconds of game time
    Conditions
    Actions
        Set Temp_Int = (Temp_Int + 600)
        Set Temp_Point = (Center of (Playable map area))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Temp_Int Equal to 600
            Then - Actions
                Unit - Create 10 Temp_Unit[1] for Neutral Hostile at Temp_Point facing Default building facing degrees
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Temp_Int Equal to 1200
            Then - Actions
                Unit - Create 10 Temp_Unit[2] for Neutral Hostile at Temp_Point facing Default building facing degrees
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Temp_Int Equal to 1800
            Then - Actions
                Unit - Create 10 Temp_Unit[3] for Neutral Hostile at Temp_Point facing Default building facing degrees
            Else - Actions
        Custom script:   call RemoveLocation(udg_Temp_Point)

Make sure to change the Temp_Unit[x] with your unit type.

And obviously not call it "Temp_Unit" since it's not Temporary...
 
Actually it doesnt matter, its just a variable every map maker that uses GUI should have. Basically all my stuff uses Temp_Point, Temp_Unit, Temp_Group, it can be named as he wishes also long as he edits the code according to that.
 
Actually it doesnt matter, its just a variable every map maker that uses GUI should have. Basically all my stuff uses Temp_Point, Temp_Unit, Temp_Group, it can be named as he wishes also long as he edits the code according to that.

Well yeah I know it won't matter, but when I see it, my first thought is that it's not used in more than 1 trigger.
 
Can I use this type of trigger to create a random spawning creep camp?
EG: I have 10 camps in my map at total. In each camp, spawns a different type of creep, and I don't really care if they have the same creep (so it will be more simple :p). I would have to save each "creep camp unit group" to a variable. So:
temp_unit_group[1] = 1 Troll Berserker (Level 6), 2 Troll (Level 1)
temp_unit_group[2] = 1 Broodmother, 5 Spiderlings
etc;

How do I all those units as one unique variable?

Thanks for the atention,

Myt.

PS: Sorry for topic stealing :p
 
Mythes:Sin is not doing what is wrong but knowing its wrong and doing it
Rofl..... Anyway im gonna help u anyway..... But ur descript is vague so i guess u shld be making 1 unit group and then add all ur unitgroup array to that unit group.
 
Mythes:Sin is not doing what is wrong but knowing its wrong and doing it
Rofl..... Anyway im gonna help u anyway..... But ur descript is vague so i guess u shld be making 1 unit group and then add all ur unitgroup array to that unit group.

Well, I'm not doing it to piss anyone, it just felt really stupid to create another thread to ask almost the same thing...
Anyway, I'll explain better what I asked, but I think you already answered... (but I won't have time to test it till day 23 or so...)

Let's say I have 3 creep camps, Camp A, Camp B and Camp C.
At these 3 camps, there can be many spawnables type of creep "families".
One creep family is: 1 Troll Level 6, 2 Trolls Level 1.
Other creep family is: 1 Broodmother, 5 Spiderlings
Another one: 1 Uther Lightbringer, 3 Undead <- LoL! roleplay ftw.
etc, etc, etc.

So, now I want to random which family can appear at each camp.
I can do such:

Set CreepSpawnChance = Random number between 1 and 100.
If: CSC (for creep spawn chance) = 1
Then: Create 1 "Troll Level 6"
Create 2 "Troll level 1"

If: CSC = 2
Then: Create 1 "Broodmother"
Create 5 "Spiderlings"

If: CSC = 3
Then: Create 1 "Lol you got the idea ¬¬"



What I wanted is to make only one variable to refer to all the group.
So,

set Broodcamp = 1 Broodmother + 5 Spiderlings
set Trollcamp = 1 Troll Level 6 + 2 Trolls Level 1


Got the idea?
I'll try that when I return from my trip.


Myt.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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