Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
A problem i came across when testing my map is that you can build the towers so that the creeps can't come through. The map is build like a Line Tower Wars or Shango Wars.
So i want a trigger that prevents the player to block (by building towers) the path to the ending region!
I don't want to use "testers" that will run through or that the creeps start to attack if they can't pass. (Though it doesn't matter if you tell me how )
Unit - A unit Is issued an order targeting a point
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
(String((Current order of (Triggering unit)))) Equal to attack
Actions
Set loc[1] = (Position of (Triggering unit))
Set TempGroup = (Units within 130.00 of loc[1] matching (((Matching unit) is A structure) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Unit - Order (Picked unit) to Orc Blademaster - Wind Walk)
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_loc[1])
That should cover it...
From the moment a creep gets blocked, he will try to attack (even if that unit is invulnerable), so this trigger will activate, forcing all structures near the blocking unit to be sold.
Not really hard, is it?
I have attached a test-map if you'd like to see it.
It's possible, you just need a good algorithmic function to detect if there is any space left. Example: let a point go through your maze: let the point turn left/up/right/down if there is a building in it's way (in that order, the point can also only move 90º every time, so it doesn't go left -> right).
When the point reaches the start again, the player is blocking, if the point reaches the end, he isn't blocking.
I hope you understood what I was trying to say, it's best if you draw it on paper when you don't get it ^^
Just draw 2 mazes, one where the player is blocking, one where the player isn't,draw a point and if he can go right, let him go right, if he can't, let him go up, if he can't, let him go left, if he can't let him go down.
Of course, if he is going left, he can't suddenly turn right (that would cause an infinite loop when he can't go up (he can't go right/up, so he goes left - he can go right, so he goes right, he can't go right/up, so he goes left, ...)).
Anyway, whenever the player is blocking, you'll notice the point reaches the start again.
AntiBlock
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
(String((Current order of (Triggering unit)))) Equal to attack
Actions
Set loc[1] = (Position of (Triggering unit))
Set TempGroup = (Units within 130.00 of loc[1] matching (((Matching unit) is A structure) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Unit - Order (Picked unit) to Orc Blademaster - Wind Walk)
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_loc[1])
[/trigger]
That should cover it...
From the moment a creep gets blocked, he will try to attack (even if that unit is invulnerable), so this trigger will activate, forcing all structures near the blocking unit to be sold.
Not really hard, is it?
I have attached a test-map if you'd like to see it.
EDIT:
It's possible, you just need a good algorithmic function to detect if there is any space left. Example: let a point go through your maze: let the point turn left/up/right/down if there is a building in it's way (in that order, the point can also only move 90º every time, so it doesn't go left -> right).
When the point reaches the start again, the player is blocking, if the point reaches the end, he isn't blocking.
I hope you understood what I was trying to say, it's best if you draw it on paper when you don't get it ^^
Just draw 2 mazes, one where the player is blocking, one where the player isn't,draw a point and if he can go right, let him go right, if he can't, let him go up, if he can't, let him go left, if he can't let him go down.
Of course, if he is going left, he can't suddenly turn right (that would cause an infinite loop when he can't go up (he can't go right/up, so he goes left - he can go right, so he goes right, he can't go right/up, so he goes left, ...)).
Anyway, whenever the player is blocking, you'll notice the point reaches the start again.
Um... I don't think i rely understand the trigger and when I tested the map the air units was bugged and all other creeps died before they started any attack....
So maybe you should check the map out yourself first
And i don't know how to do that thing about the point.
Um... I don't think i rely understand the trigger and when I tested the map the air units was bugged and all other creeps died before they started any attack....
So maybe you should check the map out yourself first
And i don't know how to do that thing about the point.
I did test the map, a couple of times
Hold on... maybe I uploaded the wrong version (I've been experimenting with that map :/)
Edit: the map works fine... apart from air, I know the problem there (pathing blockers), but it really doesn't matter, since air cannot be blocked by towers.
The trigger is very simple... I just forgot trigger tags xD (well, I added the [/trigger], but not the [ trigger], here it is again
AntiBlock
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
(String((Current order of (Triggering unit)))) Equal to attack
Actions
Set loc[1] = (Position of (Triggering unit))
Set TempGroup = (Units within 130.00 of loc[1] matching (((Matching unit) is A structure) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Unit - Order (Picked unit) to Orc Blademaster - Wind Walk)
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_loc[1])
So... when a unit gets a different order, that unit is a creep and the order is attack, all buildings in range of that unit will be sold.
Sold because I hate it when they get destroyed.
All buildings in range because I don't want to be picky.
Anyway, the "Orc Blademaster - Wind Walk" is the Sell-ability.
Actions:
We set the location and unit group to what we want: we want all buildings in a short range of the unit who got blocked. (action 1-2).
Then we force all units inside that unit group to cast "Sell" (action 3).
After that, we remove the leaks (action 4-5), leaks are the most common reason of lag and should always be removed.
If you can't create this trigger, I seriously doubt you can create a good TD, your triggers will probably heavily leak and be highly inefficient if you "don't know how to do that thing about the point.".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.