hopy
Active Member
- Reaction score
- 64
One and a half question, shouldn't be to hard.
Reveal every unit.
In my map if your Town Hall gets destroyed you have 5 minutes to build another one or else all your units will get revealed to your opponents.
In order to achieve this I created a trigger that's supposed to create a timer when your Town Hall dies and you have no other town halls.
Now, when my town hall dies nothing happens; no timers start at all. I thought it would be because of the "(((Unit-type of (Matching unit)) is A town-hall-type unit)" part, but I don't quite understand why.
Does anyone else see any reason for this to not work?
(There are a few custom town hall units in my map, but it didn't work when testing it with just a normal castle either, so that shouldn't be the problem I think).
Initially on:
Every trigger has the option for "Initially on", and I've seen people say that you're supposed to turn that off for every repeating trigger or something like that. Now I was wondering: Why? What exactly does this do? When to use it? And what advantages does it have?
+rep for anyone posting something usefull, thank you for helping in advance.
Reveal every unit.
In my map if your Town Hall gets destroyed you have 5 minutes to build another one or else all your units will get revealed to your opponents.
In order to achieve this I created a trigger that's supposed to create a timer when your Town Hall dies and you have no other town halls.
Trigger:
- Reveal TH death
- Events
- Unit - A unit Dies
- Conditions
- ((Triggering unit) is A town-hall-type unit) Equal to True
- Actions
- Set Unit_Group = (Units owned by (Owner of (Dying unit)) matching (((Unit-type of (Matching unit)) is A town-hall-type unit) Equal to True))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Unit_Group) Greater than or equal to 1
- Then - Actions
- Do nothing
- Else - Actions
- Countdown Timer - Start TH_Time[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 300.00 seconds
- Countdown Timer - Create a timer window for (Last started timer) with title Time until you're r...
- Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))
- Countdown Timer - Change the color of the title for (Last created timer window) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
- If - Conditions
- Custom script: call DestroyGroup (udg_Unit_Group)
- Events
Now, when my town hall dies nothing happens; no timers start at all. I thought it would be because of the "(((Unit-type of (Matching unit)) is A town-hall-type unit)" part, but I don't quite understand why.
Does anyone else see any reason for this to not work?
(There are a few custom town hall units in my map, but it didn't work when testing it with just a normal castle either, so that shouldn't be the problem I think).
Initially on:
Every trigger has the option for "Initially on", and I've seen people say that you're supposed to turn that off for every repeating trigger or something like that. Now I was wondering: Why? What exactly does this do? When to use it? And what advantages does it have?
+rep for anyone posting something usefull, thank you for helping in advance.