TD Question

SnoopyLoL

New Member
Reaction score
6
Ok, instead of creating an introduction to my thread and all that, I will just ask you the question;)

My question is, how do other TD's make it so that if you wall, then the creeps attack?
 
Reaction score
107
Give the creep an attack, and order them to move to the end/next region. If they get blocked they will attack automatically.
 

Menelaus

New Member
Reaction score
9
or u can have an anti-cheat like in line tower wars..tell me if u need more info on that cuz its sorta complicated


but anyways baka-ranger's idea is much easier for u but might not be as effective as u want it to be
 

SnoopyLoL

New Member
Reaction score
6
baka-ranger
Really? I never knew that. So if you order them to move then they will automatically attack if they are blocked? Oh wait... when they are blocked they are auto-orded to be stopped aren't they.. or do you have to change something?

Menelaus
I'm not stupid you know...
 

Joker(Div)

Always Here..
Reaction score
86
baka-ranger
Really? I never knew that. So if you order them to move then they will automatically attack if they are blocked? Oh wait... when they are blocked they are auto-orded to be stopped aren't they.. or do you have to change something?
Nope, theres nothing else you have to do besides what baka told you.
 

Menelaus

New Member
Reaction score
9
> Menelaus I'm not stupid you know...
lol just trying to help... but just wondering which part made you say that?
 
Reaction score
107
or u can have an anti-cheat like in line tower wars..tell me if u need more info on that cuz its sorta complicated


but anyways baka-ranger's idea is much easier for u but might not be as effective as u want it to be

The anti-cheat in line tower uses exactly the same thing...

You might want to have some sort of trigger to reorder the creep to move so that they don't just keep breaking the maze..
 

Terrabull

Veteran Member (Done that)
Reaction score
38
Nope, theres nothing else you have to do besides what baka told you.

Not entirely true, not entirely false. The blocked unit will attack everything in it's line of sight, then usually it will not know what to do after that. I've had most of the creeps return to their spawn point after they attack. Then again, that only matters if they are strong enough to kill all the towers before being taken down themselves.
 

SnoopyLoL

New Member
Reaction score
6
Did you know "baka" means stupid in Japanese? :DI'm:Dpart:DJapanese:D Sorry, just saying.

Anyway, so technically you need a trigger to make them go to the spawn point or something?
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
Not entirely true, not entirely false. The blocked unit will attack everything in it's line of sight, then usually it will not know what to do after that. I've had most of the creeps return to their spawn point after they attack. Then again, that only matters if they are strong enough to kill all the towers before being taken down themselves.

If that is the case then maybe if you also add a trigger that orders the unit to move to the region every 10 seconds or so, if it has attacked and killed the blocking unit then it will go to the region, or if it hasn't killed it yet it will just resume attacking until the 10 sec trigger sets them off again?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> when they are blocked they are auto-orded to be stopped aren't they

No, they are not.
When they are blocked, they lose their current order.
At that point, the comp takes over and issues an "attack" order to the point they were created at.
I.e. they attack whatever is nearest.

If they have an attack that is.
If they don't, they are still given the same order but will simply walk back.


An alternative would be to catch that order, add some AoE damage on death ability, and kill them, taking a tower or two with them.
 

Darg

Administrator
Reaction score
49
> I've had most of the creeps return to their spawn point after they attack.

You can fix that by calling the AI action to remove the unit's guard position.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> You can fix that by calling the AI action to remove the unit's guard position.

Hm... isn't there some hint text that says "works only on pre-placed units"?
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
This looked like a good reason to write this without cause:

Code:
Starting Point
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Set Point = (Center of Starting_Point[(Integer A)])
                Unit - Create 1 Level_Unit[Current_Level[(Integer A)]] for Neutral Hostile at Point facing Default building facing degrees
                Custom script:   call RemoveLocation(udg_Point)
                Unit - Set the custom value of (Last created unit) to 1
                Set Point = (Center of First_Point[(Integer A)])
                Unit - Order (Last created unit) to Move To Point
                Custom script:   call RemoveLocation(udg_Point)
                Trigger - Add to Player_Paths_Triggers[(Integer A)] the event (Unit - A unit enters First_Point[(Integer A)])
Code:
Player1 Path
    Events
    Conditions
        (Owner of (Entering unit)) Equal to Neutral Hostile
    Actions
        Unit - Set the custom value of (Entering unit) to ((Custom value of (Entering unit)) + 1)
        Set Point = (Center of Player1_Path[(Custom value of (Entering unit))])
        Unit - Order (Entering unit) to Move To Point
        Custom script:   call RemoveLocation(udg_Point)
        Trigger - Add to (This trigger) the event (Unit - A unit enters Player1_Path[(Custom value of (Entering unit))])
Code:
Player 1 Structure Dies
    Events
        Unit - A unit owned by Player 1 (Red) Dies
    Conditions
        ((Dying unit) is A structure) Equal to True
    Actions
        Set UnitGroup = (Units in Player_Area[(Player number of (Owner of (Dying unit)))] owned by Neutral Hostile)
        Unit Group - Pick every unit in UnitGroup and do (Actions)
            Loop - Actions
                Set Point = (Center of Player1_Path[(Custom value of (Picked unit))])
                Unit - Order (Picked unit) to Move To Point
                Custom script:   call RemoveLocation(udg_Point)
        Custom script:   call DestroyGroup(udg_UnitGroup)

All 3 to help explain the reasoning...^_^
Thats one thing you can do.
 

SnoopyLoL

New Member
Reaction score
6
but anyways baka-ranger's idea is much easier for u but might not be as effective as u want it to be
The bolded part.

Perhaps... Thanks you though.

I think that Ryoko would be the best person to ask *whistful* but I don't think he uses the help forums(I've never seen any of his posts if he does)
 

Darg

Administrator
Reaction score
49
> Hm... isn't there some hint text that says "works only on pre-placed units"?

It works great for me on created units too.

There have been times when I've seen creeps go back to the position where they were created, which made me perplexed.....but after debugging the code I quickly realised I forgot to issue the "ignore" command for those creeps. After doing that, they stopped going back.
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top