KILLJAW
New Member
- Reaction score
- 0
Multiple issues with my trigger & upgrading buildings
Hi, I'm making a map, and to start out you have the option of choosing what race you want, humans, orcs, night elves and undead. You start with a building and use it to train the relevant unit (this is the process by which players will pick their race), and then the building is replaced, upon completion of the unit, by the tier 1 town hall structure for the chosen race (town hall, tree of life, etc.). Each player also starts out with a generic scout tower, which is replaced by the relevant defense tower (guard tower, watch tower, ancient guardian...).
This whole process works fine with every race except for the blasted night elves. There are a couple of issues I've been having: The first is that the editor would replace the initial building with 2 trees of life instead of just one, the second issue is the buildings would not root (stay fixed as buildings) and would instead be movable like any other unit, and the third is that when I upgrade the tree of life to the tree of ages, it upgrades the building, but it still looks like the tree of life (the model doesn't change).
The first issue I managed to resolve by having the game select a copy at random from those created and remove the copy from the game (thus leaving 1 tree of life and not 2), but I would still like to know the cause if anyone knows it, so as to more elegantly fix or avoid it in the future. [Edit: I discovered the cause to be an error with the replace function; whenever I replace something it creates 2 copies of the new object/unit. ] The second problem I managed to fix on the tree of life by having the game order it to root at its position, but I tried the same thing for the ancient protector, and it doesn't work. The third issue is entirely unresolved. I've attached a screenshot of the trigger in question; if you need any more information just ask and I will provide it.
Any help anyone can provide here would be highly appreciated .
Hi, I'm making a map, and to start out you have the option of choosing what race you want, humans, orcs, night elves and undead. You start with a building and use it to train the relevant unit (this is the process by which players will pick their race), and then the building is replaced, upon completion of the unit, by the tier 1 town hall structure for the chosen race (town hall, tree of life, etc.). Each player also starts out with a generic scout tower, which is replaced by the relevant defense tower (guard tower, watch tower, ancient guardian...).
This whole process works fine with every race except for the blasted night elves. There are a couple of issues I've been having: The first is that the editor would replace the initial building with 2 trees of life instead of just one, the second issue is the buildings would not root (stay fixed as buildings) and would instead be movable like any other unit, and the third is that when I upgrade the tree of life to the tree of ages, it upgrades the building, but it still looks like the tree of life (the model doesn't change).
The first issue I managed to resolve by having the game select a copy at random from those created and remove the copy from the game (thus leaving 1 tree of life and not 2), but I would still like to know the cause if anyone knows it, so as to more elegantly fix or avoid it in the future. [Edit: I discovered the cause to be an error with the replace function; whenever I replace something it creates 2 copies of the new object/unit. ] The second problem I managed to fix on the tree of life by having the game order it to root at its position, but I tried the same thing for the ancient protector, and it doesn't work. The third issue is entirely unresolved. I've attached a screenshot of the trigger in question; if you need any more information just ask and I will provide it.
Any help anyone can provide here would be highly appreciated .