Here's my problem:
I'm making a similar upgrade to that of Trollheadhunter-->Berserker, and I'm not sure if I completely understood the mechanic in which the upgrade works but I thought it was sort of built in the game and I'd have to work with triggers.
Okay so I went and gave the unit production building the initial unit and the upgraded version of that unit, then made a trigger that removes the availability of the upgraded unit on map initialization, created the upgrade from the same base of the troll berserker upgrade and so far so good. The building in question can train the initial unit at start and the upgraded unit after the upgrade is researched.
Now if you remember my topic, you can prolly already guess what my problem is. I also want the existing old units on the map to become upgraded units when the research is completed. I already came up with a trigger, but apparently the one I made doesn't work. No surprise really, as I'm still fairly new with the world editor and triggering.
Below is what I've made, if you could tell me if it's something minor or if I've done everything wrong right from the start it'd be greatly appreciated. And sorry cos I'm new and I don't know how to put the trigger into that box where it'd be easier to read. It's short and simple though so I hope you won't have much trouble reading it.
Events
-Unit - A unit Finishes an upgrade
Conditions
-(Researched tech-type) Equal to (have the specific research here)
Actions
-Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
Loop - Actions
- If ((Unit-type of (Picked unit)) Equal to (the specific unit I want)) then do (Unit - Replace (Picked unit) with a (improved version of the unit) using The old unit's relative life and mana) else do (Do nothing)
Thanks beforehand!
I'm making a similar upgrade to that of Trollheadhunter-->Berserker, and I'm not sure if I completely understood the mechanic in which the upgrade works but I thought it was sort of built in the game and I'd have to work with triggers.
Okay so I went and gave the unit production building the initial unit and the upgraded version of that unit, then made a trigger that removes the availability of the upgraded unit on map initialization, created the upgrade from the same base of the troll berserker upgrade and so far so good. The building in question can train the initial unit at start and the upgraded unit after the upgrade is researched.
Now if you remember my topic, you can prolly already guess what my problem is. I also want the existing old units on the map to become upgraded units when the research is completed. I already came up with a trigger, but apparently the one I made doesn't work. No surprise really, as I'm still fairly new with the world editor and triggering.
Below is what I've made, if you could tell me if it's something minor or if I've done everything wrong right from the start it'd be greatly appreciated. And sorry cos I'm new and I don't know how to put the trigger into that box where it'd be easier to read. It's short and simple though so I hope you won't have much trouble reading it.
Events
-Unit - A unit Finishes an upgrade
Conditions
-(Researched tech-type) Equal to (have the specific research here)
Actions
-Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
Loop - Actions
- If ((Unit-type of (Picked unit)) Equal to (the specific unit I want)) then do (Unit - Replace (Picked unit) with a (improved version of the unit) using The old unit's relative life and mana) else do (Do nothing)
Thanks beforehand!
Last edited: