how to make spawn with space between creeps?

zzyzxroad

TH.net Regular
Reaction score
1
My spawn currently is grouped together that makes it look like one unit. I would like to have them possibly spawn with a space in between. perhaps a 1/4 second in between them appearing? I am not sure, what the best method is. I have tried so far:

1)setting collision size to 0,10....buth then they attack the towers if towers are built too close to the spaw location, even though the spawn is several towers away.

2)for the tower destruction t stop, I set the collision back to 0 and gave them the ghost ability, but then they are basically "1 unit" and run to the end in a matter of seconds.

3)Cant remember what else.. :D

Any thoughts or ideas how to remedy this?
 

Exide

I am amazingly focused right now!
Reaction score
448
Show us your code.
-Adding a 'wait 0.25 seconds' will probably help. (Depends on your code, though..)
 

zzyzxroad

TH.net Regular
Reaction score
1
Code:
If (Level_Number Equal to 1) then do (Set Monster_Type = Scout Level 1) else do (Do nothing)
If (Level_Number Equal to 1) then do (Set Monster_Amount = 20) else do (Do nothing)

Unit - Create 30 Monster_Type for Player 12 (Brown) at (Center of Red right spawn <gen>) facing Default building facing degrees

Trigger - Run Startup Movement <gen> (checking conditions)

nothing more really. they are just a normal spawn
 

Exide

I am amazingly focused right now!
Reaction score
448
Show us Startup Movement as well.
Also, make a loop:

For each Integer A 1 to 30 do:
Unit - Create 1 Monster_Type for Player 12 (Brown) at (Center of Red right spawn <gen>) facing Default building facing
Wait 0.10 seconds

-This trigger leaks.
 

zzyzxroad

TH.net Regular
Reaction score
1
Code:
Trigger - Run Move BluYelloLeft <gen> (ignoring conditions)          

Move BluYelloLeft
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in AttackersBlueYelloLeft and do (Unit - Order (Picked unit) to Move To (Center of Yellow left corner <gen>))
 

Exide

I am amazingly focused right now!
Reaction score
448
You're running an awful lot of triggers. :p
What you could do is to create a couple of triggers (one for each region where the creeps move), like this:

Code:
A unit enters Region1

Owner of (Triggering Unit) equal to Player 12 (Brown)

set temppoint = Center of (Region2)
Order (Triggering unit) to Move to temppoint
custom script   call RemoveLocation(udg_temppoint)

Code:
A unit enters Region2

Owner of (Triggering Unit) equal to Player 12 (Brown)

set temppoint = Center of (Region3)
Order (Triggering unit) to Move to temppoint
custom script   call RemoveLocation(udg_temppoint)

And change your spawn trigger to this:

Code:
If (Level_Number Equal to 1) then do (Set Monster_Type = Scout Level 1) else do (Do nothing)
If (Level_Number Equal to 1) then do (Set Monster_Amount = 20) else do (Do nothing)

set temppoint =  Center of (Region1)
For each Integer A 1 to 30 do:
  Unit - Create 1 Monster_Type for Player 12 (Brown) at [B]temppoint[/B] facing 270
  Wait 0.10 seconds
custom script   call RemoveLocation(udg_temppoint)

You should also move the If / Then / Else out of the spawn trigger, and into another trigger that runs (and checks level) after each level is done.
 

zzyzxroad

TH.net Regular
Reaction score
1
Ok, thanks. I think I might need to delete al movement triggers and try it your way. Funny, I just disabled this:

If (Level_Number Equal to 1) then do (Set Monster_Amount = 20) else do (Do nothing)

and spawning still works. But it seems to clash. In this trigger I am saying to create 20 creeps but in the trigger:

Create 30 Monster_Type for Player 12

I am saying to create 30?
 

Exide

I am amazingly focused right now!
Reaction score
448
>I am saying to create 30?
-Yea, I missed that as well.
You should do this:

Code:
If (Level_Number Equal to 1) then do (Set Monster_Type = Scout Level 1) else do (Do nothing)
If (Level_Number Equal to 1) then do (Set Monster_Amount = 20) else do (Do nothing)

set temppoint =  Center of (Region1)
For each Integer A 1 to [B]Level_Number[/B] do:
  Unit - Create 1 Monster_Type for Player 12 (Brown) at temppoint facing 270
  Wait 0.10 seconds
custom script   call RemoveLocation(udg_temppoint)
 

zzyzxroad

TH.net Regular
Reaction score
1
Thanks for the help. I am working on it as you are replying. :D

Lets see where screw it up next.
 

zzyzxroad

TH.net Regular
Reaction score
1
Hmm, I keep getting an error here:

Custom script: call RemoveLocation(udg_Tmppoint)


Error:

line:Invalid argument type (string) (endfunction)
line:Expected a code Statement (string) (function InitTrig_Grey_Region takes nothing returns nothing)
line:Expected a function name (string) (endfunction)

Also, I am kinda wondering if this will work for 10 ifferent spawns? (10 players)
 

Exide

I am amazingly focused right now!
Reaction score
448
>Hmm, I keep getting an error here:

Custom script: call RemoveLocation(udg_Tmppoint)


Weird, only error I can see could be the name of the variable 'Tmppoint' - make sure you spelled it correctly, and that you added a Point Variable with the same name (exclude udg_) in the variable editor.

Open Trigger Editor (F4), open the Variable Editor (small X icon at the top), click 'add/new variable' -> choose Point in type, and name it something. In this case 'Tmppoint'. Then click 'ok'.

Also, show me your spawn trigger again.
And try not to double post, instead: Edit your last post. (Double post only after 24 hours.)
 

zzyzxroad

TH.net Regular
Reaction score
1
Woops, sorry about double.


I actually tried your trigger wthout "call removelocation" and the spawn move seamlessly thru the map to the end. I actually used the variable type "region" not point.


dummy me, i needed a space in between Removelocation and (udg_tmppoint). seems to be working now. will let you know!!

Ok, so I have all the spawns working, and moving to the next point in the map. The first level works perfect. The next levels however, some of the spawns want to wait about 10 second until they decide they want to finally run. Its the same spawn that stick every round. also there are other spawns that get to the next point, then decide to wait about 10 seconds before moving on,while the rest move right along seamlessly.

any idea?
 

Exide

I am amazingly focused right now!
Reaction score
448
>dummy me, i needed a space in between Removelocation and (udg_tmppoint).
-Nah, that's not needed.

>I actually tried your trigger wthout "call removelocation" and the spawn move seamlessly thru the map to the end.
-Removing it will still cause leaks, though.

>I actually used the variable type "region" not point.
-That might be it. :p
 

Exide

I am amazingly focused right now!
Reaction score
448

Exide

I am amazingly focused right now!
Reaction score
448
True, but in this case it's not required to be able to stop it.
 

zzyzxroad

TH.net Regular
Reaction score
1
Ok, so I have all the spawns working, and moving to the next point in the map. The first level works perfect. The next levels however, some of the spawns want to wait about 10 second until they decide they want to finally run. Its the same spawn that stick every round. also there are other spawns that get to the next point, then decide to wait about 10 seconds before moving on,while the rest move right along seamlessly.
 

LightChaosma

New Member
Reaction score
60
have a look at my spawning system, maybe a bit confusing at first, but migh save you a whole buch of triggers, this system spawns units spaced apart for each player at the same time, and only needs a few triggers and it works for all levels:

link

if you have questions, just ask ;)
 
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!
  • 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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top