- Joined
- Mar 14, 2022
- Messages
- 17
Hello! I am reasonably new to the map editor, however have been learning quickly on how everything works. I currently have a problem where after a destructible within a region has been removed and a new one created; a trigger - 'Destructible - Destructible within region (Playable map area) dies', the actions don't happen. I have tried a lot of troubleshooting and ways around this to figure out what the problem is... But nothing has worked. This is with my using the Test Map function in version 1.32k (6114).
See below for a detailed explanation of what I am trying to do and how I am currently doing it.
I am trying to create a TD, where each player has an upgradable gate that the creeps attack. After the gate - the creeps then move through another players area before making their way towards a king. See below:
(Creeps attack the gate to the left, and then continue moving to the purple region, etc. The gate to the right is more just for aesthetics. It gets destroyed as well 0.5 seconds after the left gate has been destroyed.)
I have created a Blacksmith building with a gate acting as a unit in front of it. This building is where the gate upgrades are purchased are from. The unit gate is to act as the unit entering the map area for the trigger, as well as act as a tech tree requirement for other gates upgrades (as destructibles cannot have or be tech tree requirements).
I've created several triggers for this to function. After creating variables to represent the player gates and regions, I have a gate initialization trigger - setting the variables to equal the gates placed for the player to have at the start of the game (the dungeon gates). I have also created custom units and destructibles to represent the different types of gates.
Within the pathing triggers created for the creeps - there is a trigger that orders them to attack the gate (represented by variables) if it is alive.
I have a trigger set for upgrading a gate. There are 4 other triggers for different gates that use the same scripting, but with altered details to make it upgrade to a different gate.
And then the problem (I think) - a trigger telling the units to move to the next region after a destructible within region dies.
Trouble is; when an upgraded version of the gate is destroyed - the creeps don't move + the second gate doesn't get destroyed.
For some reason as well - after the first upgrade to the 'Iron Gate', the second gate breaks. I think the 'Gate Dies' trigger activates even though that gate technically isn't dying... Just being removed. It also doesn't activate for any of the other gate upgrades... So I don't know why it does that for the Iron gate.
(Note that this picture is with the 'Icy Gate' upgrade, not the Iron Gate since the second Iron Gate breaks when you upgrade)
Its either I am doing something wrong that I cant see, or a bug. I think that when a new gate is created after the old one is removed - the editor for some reason cant find the new gate (referenced through a variable) as a destructible anymore. The triggers works perfectly for the first gate already placed in the map, but none of the upgrades.
I have double checked all the variable and region allocations... But everything looks like it should be doing what I'm asking. I have attached the current version of the map to this thread - note that its is very unfinished! This map is also just for me to test/try make everything work before creating the full version with more players.
I feel like I cant continue until this problem is solved... But I don't know how to fix it. Any help would be greatly appreciated!
(Also; I currently don't know how to avoid data leaks; any links or references to leak proofing triggers and maps would be awesome!)
See below for a detailed explanation of what I am trying to do and how I am currently doing it.
I am trying to create a TD, where each player has an upgradable gate that the creeps attack. After the gate - the creeps then move through another players area before making their way towards a king. See below:
(Creeps attack the gate to the left, and then continue moving to the purple region, etc. The gate to the right is more just for aesthetics. It gets destroyed as well 0.5 seconds after the left gate has been destroyed.)
I have created a Blacksmith building with a gate acting as a unit in front of it. This building is where the gate upgrades are purchased are from. The unit gate is to act as the unit entering the map area for the trigger, as well as act as a tech tree requirement for other gates upgrades (as destructibles cannot have or be tech tree requirements).
I've created several triggers for this to function. After creating variables to represent the player gates and regions, I have a gate initialization trigger - setting the variables to equal the gates placed for the player to have at the start of the game (the dungeon gates). I have also created custom units and destructibles to represent the different types of gates.
Within the pathing triggers created for the creeps - there is a trigger that orders them to attack the gate (represented by variables) if it is alive.
I have a trigger set for upgrading a gate. There are 4 other triggers for different gates that use the same scripting, but with altered details to make it upgrade to a different gate.
And then the problem (I think) - a trigger telling the units to move to the next region after a destructible within region dies.
Trouble is; when an upgraded version of the gate is destroyed - the creeps don't move + the second gate doesn't get destroyed.
For some reason as well - after the first upgrade to the 'Iron Gate', the second gate breaks. I think the 'Gate Dies' trigger activates even though that gate technically isn't dying... Just being removed. It also doesn't activate for any of the other gate upgrades... So I don't know why it does that for the Iron gate.
(Note that this picture is with the 'Icy Gate' upgrade, not the Iron Gate since the second Iron Gate breaks when you upgrade)
Its either I am doing something wrong that I cant see, or a bug. I think that when a new gate is created after the old one is removed - the editor for some reason cant find the new gate (referenced through a variable) as a destructible anymore. The triggers works perfectly for the first gate already placed in the map, but none of the upgrades.
I have double checked all the variable and region allocations... But everything looks like it should be doing what I'm asking. I have attached the current version of the map to this thread - note that its is very unfinished! This map is also just for me to test/try make everything work before creating the full version with more players.
I feel like I cant continue until this problem is solved... But I don't know how to fix it. Any help would be greatly appreciated!
(Also; I currently don't know how to avoid data leaks; any links or references to leak proofing triggers and maps would be awesome!)