A noobish problem with a TD map

smiley1337

New Member
Reaction score
1
hello !
i started editing a td what i got from garena and now i tryed to add 2 more spawn spots to the map then i totally had to remake the spawning system but im a noob in mapmaking so i cant get my creeps moving :(
i create the units to a region the use trigger
unit group - pick every unit in (Units in CreepSpawnBottom <gen> owned by Player 12 (Brown) and do (Unit group - Order (Units in CreepSpawnBottom <gen>) to Move to (Center of MoveBottomMiddle <gen>)
but in the game creeps wont move,whats the problem? if u need more information then ask and ill tell u:p
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Hope this helps

Code:
CT Attack
    Events
        Unit - A unit enters West Team CT <gen>
        Unit - A unit enters East Team CT <gen>
    Conditions
        ((Triggering unit) is A Hero) Not equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
            Then - Actions
                Set Temp_Region = (Center of East Team CP <gen>)
                Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                Custom script:   call RemoveLocation (udg_Temp_Region)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
                    Then - Actions
                        Set Temp_Region = (Center of West Team CP <gen>)
                        Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                        Custom script:   call RemoveLocation (udg_Temp_Region)
                    Else - Actions
 

Don

Rise with the Fallens!
Reaction score
52
try using unit group - move picked unit to <move bottom middle> instead of ordering unit in creep spwan bottom because you allready picked them in your unit group pick all unit in creep spawn bottom.

Trigger:

E:
- A unit enter <creep spawn Bottom>
C:
- owner of entering unit equal to *your hostile player*
A:
- Pick every unit in <creep spawn bottom> and order (last picked unit) to move to center of <move bottom middle
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
try using unit group - move picked unit to <move bottom middle> instead of ordering unit in creep spwan bottom because you allready picked them in your unit group pick all unit in creep spawn bottom.

Trigger:

E:
- A unit enter <creep spawn Bottom>
C:
- owner of entering unit equal to *your hostile player*
A:
- Pick every unit in <creep spawn bottom> and order (last picked unit) to move to center of <move bottom middle


Why are you picking every unit in the area and then just ordering 1 to attack?
 

smiley1337

New Member
Reaction score
1
thank you both so much for helping ! i used don's way coz it looked much easier^^ and it worked:) thanks
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
The defrence between dons and mine is that with his you need to make 1 trigger for each side, with mine 1 trigger will work for both sides, the 2 triggers are almost the same, but on mine I added if then else, in the if put player 11, order him to attack the circle on the other team then copy the if then else function, paste it in the else section, and change player 11 to 12 and the circle to the other teams, also his trigger will leak and in a case like this you dont want that, it will end up lagging the game.
 

smiley1337

New Member
Reaction score
1
umm i didn't understand all what u sayd,but anyways his trigger works fine,it laggs for a sec when it creates creeps but thats no problem and btw i have 4 spawn spots so i cant use ur code(i think)

if ill have problems in the future then ill remake the system:/
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
This is why I was saying it will cause lagg, every time you make a unit and it enters that region, you create an area (being the circle) for it to attack. That area isn't removed, so it creates 1 memorie leak, then if a 2nd creep enters there is 2 leak then 3 and so on, check out this page

http://www.thehelper.net/forums/showthread.php?t=27219&highlight=Leak+tutorial

Also my trigger will work for how ever many regions you have, just add the regions to the a unit enters region in the events. As long as it is player 11 and 12 my trigger will work for them.
 

smiley1337

New Member
Reaction score
1
well i atm the lagg isnt problem,if i play the map online with other players it basically doesnt lagg at all but i know i have to change the system anyways,and the problem with the creeps movement is that they sometimes destroy towers when they are not blocked,damaeon will your code fix that? and mby u could change it for 4 spawn spots+after they move to the 1st region they have to move to 2 more regions,do i need somekinda code for that movement to so it wouldnt cause any memory leaks? please help me dameon:p(offcource all can help) oh and i want to +rep u and don but pls tell me how ^^
ill be waiting:)

edit: oh and how could i make air units spawn or move like ground units? i mean atm the air units all spawn and move on the same spot,like 30 creeps are on each other...hope u get the point,my english vocabulary isnt very good
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
THe towers is an easy fix that require no triggers, go to the towers in the object editor and scroll all the way to the bottom, under classifycation chose anchent, now find the creeps (this part might take awhile) and under there allowed targets add non anchent.


As for the other part, that is going to require being a little creative to limite it to 1 trigger.

WARNING LONG TRIGGER

Code:
Unit send attack
    Events
        Unit - A unit enters T1 Start 1 <gen>
        Unit - A unit enters T1 Start 2 <gen>
        Unit - A unit enters T1 Middle 1 <gen>
        Unit - A unit enters T1 Middle 2 <gen>
        Unit - A unit enters T2 Start 1 <gen>
        Unit - A unit enters T2 Start 2 <gen>
        Unit - A unit enters T2 Middle 1 <gen>
        Unit - A unit enters T2 Middle 2 <gen>
    Conditions
        ((Triggering unit) is A Hero) Not equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (T1 Start 1 <gen> contains (Triggering unit)) Equal to True
                (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
            Then - Actions
                Set Temp_Region = (Random point in T1 Middle 1 <gen>)
                Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                Custom script:   call RemoveLocation (udg_Temp_Region)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (T1 Start 2 <gen> contains (Triggering unit)) Equal to True
                        (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
                    Then - Actions
                        Set Temp_Region = (Random point in T1 Middle 2 <gen>)
                        Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                        Custom script:   call RemoveLocation (udg_Temp_Region)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (T2 Start 1 <gen> contains (Triggering unit)) Equal to True
                                (Owner of (Triggering unit)) Equal to Player 12 (Brown)
                            Then - Actions
                                Set Temp_Region = (Random point in T2 Middle 1 <gen>)
                                Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                                Custom script:   call RemoveLocation (udg_Temp_Region)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (T2 Start 2 <gen> contains (Triggering unit)) Equal to True
                                        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
                                    Then - Actions
                                        Set Temp_Region = (Random point in T2 Middle 2 <gen>)
                                        Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                                        Custom script:   call RemoveLocation (udg_Temp_Region)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
                                                Or - Any (Conditions) are true
                                                    Conditions
                                                        (T2 Middle 1 <gen> contains (Triggering unit)) Equal to True
                                                        (T2 Middle 2 <gen> contains (Triggering unit)) Equal to True
                                            Then - Actions
                                                Set Temp_Region = (Center of T2 End <gen>)
                                                Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                                                Custom script:   call RemoveLocation (udg_Temp_Region)
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
                                                        Or - Any (Conditions) are true
                                                            Conditions
                                                                (T1 Middle 1 <gen> contains (Triggering unit)) Equal to True
                                                                (T1 Middle 2 <gen> contains (Triggering unit)) Equal to True
                                                    Then - Actions
                                                        Set Temp_Region = (Center of T1 End <gen>)
                                                        Unit - Order (Triggering unit) to Attack-Move To Temp_Region
                                                        Custom script:   call RemoveLocation (udg_Temp_Region)
                                                    Else - Actions

As for the last part can you post your spawn movement trigger for me to look at, it is the one that move your creeps and gives them to player 11 or 12.

Ps. Here are the 2 triggers needed if you just want to use the one I do.

Code:
CT Spawner
    Events
        Unit - A unit enters West Team CS <gen>
        Unit - A unit enters East Team CS <gen>
    Conditions
        ((Triggering unit) is A structure) Not equal to True
        ((Triggering unit) is A Hero) Not equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Triggering unit)) is in Player_Group[1]) Equal to True
            Then - Actions
                Set Temp_Region = (Random point in West Team CT <gen>)
                Unit - Remove (Triggering unit) from the game
                Unit - Create 1 (Unit-type of (Triggering unit)) for Player 11 (Dark Green) at Temp_Region facing Temp_Region
                Custom script:   call RemoveLocation (udg_Temp_Region)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Owner of (Triggering unit)) is in Player_Group[2]) Equal to True
                    Then - Actions
                        Set Temp_Region = (Random point in East Team CT <gen>)
                        Unit - Remove (Triggering unit) from the game
                        Unit - Create 1 (Unit-type of (Triggering unit)) for Player 12 (Brown) at Temp_Region facing Temp_Region
                        Custom script:   call RemoveLocation (udg_Temp_Region)
                    Else - Actions


Code:
MS Player Group Copy
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) is an ally of Player 11 (Dark Green)) Equal to True
                        ((Picked player) controller) Equal to User
                        ((Picked player) slot status) Equal to Is playing
                    Then - Actions
                        Player Group - Add (Picked player) to Player_Group[1]
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked player) is an ally of Player 12 (Brown)) Equal to True
                                ((Picked player) controller) Equal to User
                                ((Picked player) slot status) Equal to Is playing
                            Then - Actions
                                Player Group - Add (Picked player) to Player_Group[2]
                            Else - Actions

Sence you spawn units in 2 regions you will need to add to the trigger.

Ps. Dont worry about the rep, I am in this to try to help you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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