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.

      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