I'm creating a TD that allows the tower builders to build structures wherever they please allowing the builders to construct massive mazes for the monsters to follow. The problem lies in if a builder decides to block the pathing for the wave units with a wall of towers.
WhatI'm experimenting with right now is: Timer-Every1.0secondsofGameTimeLocalVariablesConditionsActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If((CenterofEndRegion)ispassable)==trueThenUnit-Orderallunitsin(Anyunitsin(Entiremap)ownedbyplayer5matchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)to(Movetargeting(CenterofEndRegion))(ReplaceExistingOrders)ElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If((CenterofEndRegion)ispassable)!=trueThenUnit-Orderallunitsin(Anyunitsin(Entiremap)ownedbyplayer5matchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)to(Attacktargeting(CenterofEndRegion))(ReplaceExistingOrders)
You would think this works, but it doesn't. the trigger keeps issuing the move order to end region every second. So I experimented to make sure I have the trigger set up properly I removed the only single ramp leading up to the end region on map isolating the region completely on a high platform) and the units were given the attack issue instead of the move issue.
SO, it would seem that by placing buildings in a wall formation and blocking their path doesn't return this trigger back as false which I was hoping it would. I guess it would seem that the trigger is setup for as long as there is ground connecting to points with or without buildings. Any ideas on where I can go from here? I've looked at the other pathing triggers including "points connected by pathing" from my spawn region to my end region, but it yields the same results as this current trigger.
To get the units that spawn to move in the first place I issue a move command to "end region" I've done significant testing and if I don't use any triggers here is what happens. The units move towards end point, if path is blocked units head in the direction of the target region and stop when they hit a wall. Once they hit the wall (without a trigger) the move command is cancelled and the units will then attack anything that is within their aggro range (including towers) after all units within aggro range are dead they do "not" start moving towards the original issued order. On the other hand, if nothing is in their aggro range they stay put. which means (ive tested this) if the path is blocked further down the line (keep in mind the entire path is zig zaggy) the units stay in the corner.
What I have now is the closest I've gotten to success, but I'm missing something else. Someone please help
And to answer your question, this is what I would like to happen:
1. if pathing is clear units "move" to end region.
2. if pathing is blocked by buildings units continue to run the normal course until they reach the obstructed area. At this point I want the enemy to attack towers until path is clear, at that point I want the mobs to stop attack towers immediately and continue moving to the end region.
That doesn't work for the design of my map. Like I said, if the tower wall is constructed later down the lane from the mobs (because of my zig zag path) the units bump into the closest corner facing the end region and stay there. and in your case the only way it would work is if the user constructs a line of towers starting at where the units gather and lead it all the way to the tower wall. Because if the towers aren't within the units aggro range (which is like 7 range I believe) they wont attack.
I am attempting to make a 3 lane map where the creep waves change lanes depending on obstacles placed in the path and I'm having similar issues with this. I tried using the Condition: Points connected by pathing but this condition does not fail with destructible pathing blockers like rocks in the way. The rocks do not block the path according to the trigger, so I'm thinking this only checks cliffs.
Alternatively, I tried the condition Point is passable. This will work properly and stop the trigger if the point is exactly on the rocks, but If the point is behind the rocks, the condition is considered true, even though the only way to get to the point is to pass the rocks.
I think you can try and see if a building would make the "points connected by pathing" condition fail.
Edit: I'm thinking the issue here lies with the objects I'm using to block the path. If I do a little bit of Data editor work and make the "rocks" unit like force field, this will force the condition to return false. Here's hoping...
I'm creating a TD that allows the tower builders to build structures wherever they please allowing the builders to construct massive mazes for the monsters to follow. The problem lies in if a builder decides to block the pathing for the wave units with a wall of towers.
You would think this works, but it doesn't. the trigger keeps issuing the move order to end region every second. So I experimented to make sure I have the trigger set up properly I removed the only single ramp leading up to the end region on map isolating the region completely on a high platform) and the units were given the attack issue instead of the move issue.
SO, it would seem that by placing buildings in a wall formation and blocking their path doesn't return this trigger back as false which I was hoping it would. I guess it would seem that the trigger is setup for as long as there is ground connecting to points with or without buildings. Any ideas on where I can go from here? I've looked at the other pathing triggers including "points connected by pathing" from my spawn region to my end region, but it yields the same results as this current trigger.
Please anyone help!!!
@Etravex:
What do you intend to occur if a player blocks the pathing completely?
Normally, with no triggered intervention, the wave units will automatically attack, then stop one their targets are destroyed.
Is that different than what you would like to occur?
@Vexal: Go
To get the units that spawn to move in the first place I issue a move command to "end region" I've done significant testing and if I don't use any triggers here is what happens. The units move towards end point, if path is blocked units head in the direction of the target region and stop when they hit a wall. Once they hit the wall (without a trigger) the move command is cancelled and the units will then attack anything that is within their aggro range (including towers) after all units within aggro range are dead they do "not" start moving towards the original issued order. On the other hand, if nothing is in their aggro range they stay put. which means (ive tested this) if the path is blocked further down the line (keep in mind the entire path is zig zaggy) the units stay in the corner.
What I have now is the closest I've gotten to success, but I'm missing something else. Someone please help
@Vexal: Go
And to answer your question, this is what I would like to happen:
1. if pathing is clear units "move" to end region. 2. if pathing is blocked by buildings units continue to run the normal course until they reach the obstructed area. At this point I want the enemy to attack towers until path is clear, at that point I want the mobs to stop attack towers immediately and continue moving to the end region.
@Etravex: Go
Why don't you try
event - unit dies condition - owner of unit is user action - order wave units to move to end region
@Vexal: Go
That doesn't work for the design of my map. Like I said, if the tower wall is constructed later down the lane from the mobs (because of my zig zag path) the units bump into the closest corner facing the end region and stay there. and in your case the only way it would work is if the user constructs a line of towers starting at where the units gather and lead it all the way to the tower wall. Because if the towers aren't within the units aggro range (which is like 7 range I believe) they wont attack.
I am attempting to make a 3 lane map where the creep waves change lanes depending on obstacles placed in the path and I'm having similar issues with this. I tried using the Condition: Points connected by pathing but this condition does not fail with destructible pathing blockers like rocks in the way. The rocks do not block the path according to the trigger, so I'm thinking this only checks cliffs.
Alternatively, I tried the condition Point is passable. This will work properly and stop the trigger if the point is exactly on the rocks, but If the point is behind the rocks, the condition is considered true, even though the only way to get to the point is to pass the rocks.
I think you can try and see if a building would make the "points connected by pathing" condition fail.
Edit: I'm thinking the issue here lies with the objects I'm using to block the path. If I do a little bit of Data editor work and make the "rocks" unit like force field, this will force the condition to return false. Here's hoping...