Multiple issues with Night Elf structures

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 :cool:.
 

Inflicted

Currently inactive
Reaction score
63
post your triggers please.

the second issue is the buildings would not root (stay fixed as buildings) and would instead be movable like any other unit

try checking the following:
Is Building - True
Movement Type - None

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).

um swi i need to see it more, and the computer im on now has blocked the picture.
 

KILLJAW

New Member
Reaction score
0
Thank you for the reply, here is a link to the trigger image. As far as the second issue, it is a building and its movement type is set to none, and yet it still will move when ordered to.

For upgrading the tree of life, I used the upgrade function in the object editor, the same way as it would work in a regular, non-custom game. Perhaps the issue is with the models, since it uses the same "model" for each one, i.e. its listed as Tree of Life, Tree of Ages, Tree of Eternity as the model?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
first of all, your triggers are kinda messy, this:
Trigger:
  • Unit - Replace (Triggering Unit) with a Tree Of Life using ...

could be removed by using chaos, and most probably you wouldnt need to order it to root at all.
and thus the point variable wouldnt be needed as well.

then the next lines do not even make any sense...
at least if you showed us everything of that trigger.
Trigger:
  • Unit Group - Add (Last created unit) to temp_unitgroup

there is not (last created unit) in your trigger. Oo
Trigger:
  • Unit - Remove (Random unit from temp_unitgroup) from the game

is nonsense cause you pretty much know the only unit inside would be the (last created unit) and that one isnt there.

then next:
Trigger:
  • Unit Group - Pick all units in (Units owned by (Player((IntegerA))) of type...

1). leaks
2). could be done easily with chaos either.


and please, for your next question, copy your triggers as text, i can imagine many people here didnt replied because writing all your triggers by hand is hard of a job for lazy people like us.
 

KILLJAW

New Member
Reaction score
0
Ah, thanks so much for replying. I'll apologize for the bad format, I didn't realize it would make things difficult in my using a screen shot, I'll remember that next time.

It sounds like using chaos is the most efficient way of doing what I'm trying to do, by what you've suggested, but I'm afraid I don't understand exactly how to do that. Forgive my ignorance, but what exactly does it do? I looked it up in the object editor in unit abilities, and there weren't any tooltip explanations. How would I apply chaos to replace the unit?

As for the "last created unit" issue, it says "last replaced unit" in the trigger, I apologize if it was difficult to see in the picture. I also understand how it would look as though it was a redundant set of actions in the trigger, but an unusual bug was appearing when I used the replace action which, for some reason, would replace the original unit with two of the new unit, instead of just replacing the original unit with one new unit. There seems to be no reason for this to happen, but it did, and so by removing a random unit from the unit group "last replaced unit," it removed 1 of those 2 units created. There were actually 2 units in the unit group "last replaced unit," at least that's how it appeared to me.

It seems that using chaos as you suggested should solve all of these issues anyway, so you can you elaborate on how you would recommend using it?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
chaos is a passive ability which transforms one units unit type to an other.

maybe you remember the RoC orc campaign when grom hellscreams orcs where fighting in ashenvale against cenarius, they turned to chaos orcs there. this was made with the chaos ability.

same for the troll headhunters, they have been given the chaos ability to turn into troll berserkers after researching the corresponding upgrade.

you can give the chaos ability to a unit by default and set a techtree requirement for the chaos ability. when this requirement is met the unit will transform into the new unit type. the great advantage is that the unit will keep items, experience, hitpoints, mana, hero proper name, attributes, and even variables which point to it.
 

KILLJAW

New Member
Reaction score
0
Ah, wow, yeah that definitely makes things easier, thank you. I'll implement it asap. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top