TD Help

BornANoob[MR]

Member
Reaction score
21
Hey all, could someone quickly tell/show me how to make a function for my td, so that when someone types -(insert something here) all other towers in their area apart from their own will be destroyed. So that people cant steal others' kills.

Thanks in advance,
Matt
 

xxyourdeadxx

New Member
Reaction score
11
I don't have WE open so not really a code.
Umm, i just thought this would be easier XP.

Event - Player 1 (red) selects a unit.
Condition - Owner of (selected unit) is not equal to Player 1 (red)
(selected unit) is in Region 001 <gen>
Action - Kaboom! (selected unit)

If you do the event Player 1 (red) types a message, then the actions should be pick every unit matching condition, and the condition is that the owner of matched unit is not equal to player 1 red, and do Action - Kaboom! (picked unit

For the typed message (again) use condition AND. and condition one, is the owner of matched unit is not equal to player red, and the second one should be matching unit is in region 001 <gen>

Tell me if it's sloppy, I'll open WE and fix it up.
 

Dimaspy

New Member
Reaction score
19
Event - Player 1 (red) selects a unit.
Condition - Owner of (selected unit) is not equal to Player 1 (red)
(selected unit) is in Region 001 <gen>
Action - Kaboom! (selected unit)

That would be lovely!

Else, you just set the event where the player says the line, you mark up a unit group in a region, and kaboom those which does not belong to you. Piece o' cake, mate.
 

BornANoob[MR]

Member
Reaction score
21
I would do that, but i want it to be triggered by the player, some people may want another player to build in their area to help out ^^.

Thanks nevertheless AceHart!
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
If you use the "player 1 selects a unit"...thing...
May I suggest it is not activated by default? You have to turn on an ability so the trigger also turns on? And if you use the same ability again, it turns off..Would be better, since as you mention, some players might want some other to help them, and then, it would be retarded if player 1 asks for player2's help, then player1 checks out player2s tower, and lol, it suddenly is destroyed! :)
 

xxyourdeadxx

New Member
Reaction score
11
If you use the "player 1 selects a unit"...thing...
May I suggest it is not activated by default? You have to turn on an ability so the trigger also turns on? And if you use the same ability again, it turns off..Would be better, since as you mention, some players might want some other to help them, and then, it would be retarded if player 1 asks for player2's help, then player1 checks out player2s tower, and lol, it suddenly is destroyed! :)

Thats why it'd be funny :D, but anyways I gave him the trigger for the first question :banghead:
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Thats why it'd be funny
Thats no fun, thats just retarded. take a player like me, clicking about 200 times each minute...even in TDs!...ofc I would click other towers also, to check their dmg.b.albalbal :p yeye, ill rest my case!
 

BornANoob[MR]

Member
Reaction score
21
Ok well ive sorted it all, but realised... DOH, it removes the creeps aswell haha, can anyone write me a trigger that will do the following:

When the area owner types a message, all enemy towers are removed, but if there are creeps in the area, they aren't!

Thanks in advance,
Matt
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) types a chat message containing tt as An exact match
        Player - Player 2 (Blue) types a chat message containing tt as An exact match
        Player - Player 3 (Teal) types a chat message containing tt as An exact match
       etc....
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering player) Equal to Player 1 (Red)
            Then - Actions
                Unit Group - Pick every unit in (Units in Region 1 <gen> matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Not equal to (Triggering player)))) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering player) Equal to Player 2 (Blue)
            Then - Actions
                Unit Group - Pick every unit in (Units in Region 2<gen> matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Not equal to (Triggering player)))) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering player) Equal to Player 3 (Teal)
            Then - Actions
                Unit Group - Pick every unit in (Units in Region 3 <gen> matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Not equal to (Triggering player)))) and do (Actions)
                    Loop - Actions
                        Unit - Kill (Picked unit)
            Else - Actions
       etc
Now just choose your region instead of "Region 000"... And insteado f creating 10 triggers of this one, 1 for each player, add all players inside this trigger, Add all 10 events ( depends on how many players you got, but yes, everyone!)... And do just as many players you got, in if then else.. arg like this! :D
Edit: look trigger again :p
 

BornANoob[MR]

Member
Reaction score
21
Yeah this is what i want but again it kills the creeps :/ Which i dont want, i need a trigger that kills all units in said region EXCEPT creeps and owner! :p
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Thats what it does? Unless your creeps are Structures!

Unit Group - Pick every unit in (Units in Region 2<gen> matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Not equal to (Triggering player)))) and do (Actions)

You dont see it?
I pick every unit in Region 2 (in this example) that mathces IS A structure and it cannot be owned by triggering player...Which in this case would be player 2, since it is region 2... Thats why the if condtion also...yeye..It is like that.
 

BornANoob[MR]

Member
Reaction score
21
ARGH, sorry mate! I scanned over it too quick! Thanks a lot, really appreciate it!
You are always very helpful ManyTimes, thanks a lot :)
 
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