auto train trigger

Status
Not open for further replies.
Level 2
Joined
Jan 23, 2014
Messages
14
Hi all

I made a building, it has two abilities 1.train a unit 2.upgrade to another building. I tested the map and everything was good i could train as many unit as i want and then upgrade my building. nothing was wrong . BUT i only added this trigger for auto training (like Footman Map)

  • Mytrigger
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Unit - Order (Triggering unit) to train/upgrade to a (Trained unit-type)
the problem is when i canceled the auto train manually at some point so that i can upgrade building, i found that the upgrade button is grayed i can see the tool tip but can't click it. it seems like the building is still in train/research queue. Before this trigger map was working so the problem must be from it, what i did wrong?
 
Well i uploaded the map can someone test it please? just train 1 unit and after that cancel the auto training and see if you can upgrade the building. My warcraft crashes sometime recently, maybe it's my fault not the map QQ
 

Attachments

Hi, your idea was ok. Just the implementation of blizzard doesnt seem to be good here.

Seems to bug if you do the build order in same operation thread. I fixed it with including a "wait 0 seconds" line.

To still make it MUI (multiple unit instability) with the wait I added a local integer which represents the unit type of trained unit.

Check this out:

  • Aktionen
    • Custom script: local integer t = GetUnitTypeId(GetTrainedUnit())
    • Wait 0.00 seconds
    • Custom script: call IssueTrainOrderByIdBJ( GetTriggerUnit(), t )
 
Status
Not open for further replies.
Back
Top