Town Halls

Ryman1024

New Member
Reaction score
0
Hey, Ive got a problem where when I replace a Human town hall with a naga town hall via a trigger, "It says the build town hall in 2 mins thing" what do I need todo to avoid that. Like what do I need to change in the object editor to get stop that. Or in the trigger editor to get rid of it all together?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
as far as i know its the action: melee-Game - Enforce victory/defeat conditions (for all players) which is responsible for that.
 

Ryman1024

New Member
Reaction score
0
Yeah, but I woulddnt be able to delete that, or no one would win or lose. And I know, theres some way I can make one building be recognized as another building.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
either you can create an own win/lose condition with triggers so you can delete that action or use an invisible dummy unit with the classification townhall.
 

Ryman1024

New Member
Reaction score
0
How would I go about that? When I look for the action, it doesnt let me edit anything? Im pretty newby at this.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
whats the condition to lose the game? if you use the standart melee initialization i guess something like "a player has no units left = defeated"
then you could go with a very easy trigger, it should look somewhat like this:
Code:
Untitled Trigger 001
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Triggering unit)) controller) Equal to User
    Actions
        Set TempGroup = (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is alive) Equal to True))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in TempGroup) Equal to 0
            Then - Actions
                Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!
            Else - Actions
        Custom script: call DestroyGroup (udg_TempGroup)
TempGroup is a unitgroup variable, it is used to avoid memory leaks.
this trigger will make all players lose if they got not a single unit left in game.
 

Ryman1024

New Member
Reaction score
0
I could do that, but what you said before "classification of a town hall" instead of making a dummy unit, I could just put it on the town hall I wanted, without the triggering, which is too complicated for me at the moment.

EDIT: I dont know what the classification for a town hall is.
 

Ioannes

Oh man, I shot Marvin in the face.
Reaction score
49
"Classification for a town hall" = find a field in the object editor where it says "Unit Classification" and open it. A list of possible "unit types" (e.g. Tauren, Ancient, Undead, Mechanical, Peon, and somewhere in there Town Hall) will appear. Find the one where it says 'Town Hall' and check it.

There, the unit now counts as a town hall in the game (and consequentially, stuff like Town Portals will recognize it as a town hall, even if it is just a farm of some sort).
 

Ryman1024

New Member
Reaction score
0
What im using is a Temple of the Tides in place of the Human town hall, the unit classification is already Mechanical, and Town Hall. And the 2 minute timer still pops up. Ive also tried changing the race from Naga to Human, and it still does it.
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
townhalls.png

Adding the Temple of the Tides to those fields might work.
 

Ryman1024

New Member
Reaction score
0
It didnt work, I think the problem is that its not a human town hall, because when I spawn a human town hall instead it works fine.

EDIT: Tried with Tree of Life-Necropolis-Great Hall and it works fine.
 

Ryman1024

New Member
Reaction score
0
I tried it didnt, but I just made custom victory conditions. Now I have another problem, the heroes ive made when I train them, I can make more like a regular unit and i dont know how to stop that. :banghead:
 
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