Creep Spawns - Easier way?

mathiasdk

New Member
Reaction score
0
Hi all, i though like if i needed to make alot of levels, this would be a very hard way xD. so is there any easier way to spawn 10 units a time with 2 seconds between ?

something which told the game to spawn Level 1 attacking creep every 2. second for 10 seconds, then level 2 attacking creeps every 2. second for 10 seconds. and so on ?
 

Bonzo

New Member
Reaction score
4
Trigger Spawn
Events
Every 2 seconds of game time
Conditions
--
Actions
Create 1 Your_Creep at <spawnpoint>
Order Last Created Unit to move to <point>


Trigger Creeptype
Events
Every 10 seconds of game time
Conditions
--
Actions
For each integer A from 1 to 50 do Actions {if your map has 50 levels}
if Current_Level = Integer A
then
-set Your_Creep = Creep[Integer A]
-set Current_Level = Current_Level +1
-skip remaining Actions


Your_Creep is a non-array unit type variable
Creep[Index] is an array unit type variable in which you must predefine the different creep types for each level
Current_Level is a non-array integer variable


Greets Bonzo
 

Bonzo

New Member
Reaction score
4
Code:
SpawnStart
    Events
        Time - Elapsed game time is 30.00 seconds
    Conditions
    Actions
        Trigger - Turn on Spawn <gen>
        Trigger - Turn on Creeptype <gen>

Code:
Creeptype
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Unit- Create 1 Your_Creep for Player12 (Brown) at <the point where you want the creeps to spawn> facing 0.0 degrees

Code:
Spawn
    Events
        Time- Every 10.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 50, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    'IF'-Conditions
                        Current_Level equal to Integer A
                    'THEN'-Actions
                        Set Your_Creep = Creep[IntegerA]
                        Set Current_Level = Current_Level+1
                        Skip remaining actions
                    'ELSE'-Actions

You must turn off the Creeptype and the Spawn trigger: rightclick on the triggername and then turn off, so that the sheet in front of it is half red (no cross).
The "for each integer A" actions is in no category, you need to select it directly with no action type.

If you have still problems I'd suggest you learn the basics of triggering.

The preset of the Current_Level variable has to be '1'.

Greets Bonzo
 

Don

Rise with the Fallens!
Reaction score
52
Here, try those:

Map init:
Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Visibility - Disable fog of war
        Visibility - Disable black mask
        Wait 0.01 seconds
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Food cap to 1
                Player - Set (Picked player) Current gold to 50
                Player - Set (Picked player) Current lumber to 1
        Set time_ammount = 20
        Set unit_type[1] = 1 - |cffffcc00Pig|r
        Set level = 0
        Trigger - Run Timer <gen> (ignoring conditions)

Timer:
Code:
Timer
    Events
    Conditions
    Actions
        Set level = (level + 1)
        Game - Display to (All players) the text: (Level |cffffcc00 + ((String(level)) + (|r Will start in 30 seconds + , |cffffcc00get ready!|r)))
        Leaderboard - Change the value for Player 9 (Gray) in game_leaderboard to level
        Leaderboard - Change the value for Player 11 (Dark Green) in game_leaderboard to time_ammount
        Countdown Timer - Start wave_timer as a One-shot timer that will expire in 30.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title (Level  + ((String(level)) +  in:))
        Set wave_timer_window = (Last created timer window)
        Countdown Timer - Show (Last created timer window)

Timer expires:
Code:
Timer Expires
    Events
        Time - wave_timer expires
    Conditions
    Actions
        Countdown Timer - Destroy wave_timer_window
        Game - Display to (All players) the text: (Level |cffffcc00 + ((String(level)) + (|r:  + ((String(time_ammount)) + ( |cffffcc00 + ((String(unit_type[level])) + |r in every corner.))))))
        Trigger - Turn on Spawn <gen>
        Wait (Real(time_ammount)) seconds
        Set time_ammount = (time_ammount + 1)
        Leaderboard - Change the value for Player 11 (Dark Green) in game_leaderboard to time_ammount
        Trigger - Run Timer <gen> (ignoring conditions)
        Trigger - Turn off Spawn <gen>

Spawn units:
Code:
Spawn
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (((Player 1 (Red) slot status) Equal to Is playing) and ((Player 1 (Red) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 9 (Gray) at (Center of red spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 2 (Blue) slot status) Equal to Is playing) and ((Player 2 (Blue) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 9 (Gray) at (Center of blue spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 3 (Teal) slot status) Equal to Is playing) and ((Player 3 (Teal) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 10 (Light Blue) at (Center of teal spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 4 (Purple) slot status) Equal to Is playing) and ((Player 4 (Purple) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 10 (Light Blue) at (Center of purple spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 5 (Yellow) slot status) Equal to Is playing) and ((Player 5 (Yellow) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 11 (Dark Green) at (Center of yellow spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 6 (Orange) slot status) Equal to Is playing) and ((Player 6 (Orange) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 11 (Dark Green) at (Center of orange spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 7 (Green) slot status) Equal to Is playing) and ((Player 7 (Green) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 12 (Brown) at (Center of green spawn <gen>) facing Default building facing degrees) else do (Do nothing)
        If (((Player 8 (Pink) slot status) Equal to Is playing) and ((Player 8 (Pink) controller) Equal to User)) then do (Unit - Create 1 unit_type[level] for Player 12 (Brown) at (Center of pink spawn <gen>) facing Default building facing degrees) else do (Do nothing)

Variables:

Level: integer (no array)
Time_Ammount: integer (in your case it is set to 10)
Unit_type: integer (with array, using level to spawn a fdifferent unit every level.) Also, you pre-set the kinds of units in map initialisation.
Other var are leaderboard and timer, you know how it works (i hope lol)

TGhese are from my newest map, enjoy!
 

Bonzo

New Member
Reaction score
4
This is a simple tutorial for variables:
http://world-editor-tutorials.thehelper.net/variables.php
On this page theres also very much basic stuff that could help you to understand what i wrote.

About the "From Integer A from 1 to 50" function:
This runs a loop 50 times and each time it replaces the A with a number between 1 and 50 and does certain actions.

For example:
From Integer A from 1 to 3 do Actions
- set My_Number = Integer A

This means in smaller steps:
set My_Number = 1
set My_Number = 2
set My_Number = 3

Greets Bonzo
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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