Disappearing units PLZ help

Tothumn

New Member
Reaction score
4
Hi all
I started to fix my first map's bugs but here is one which I cant fix, and it causes more problem than i thought.
I have a building which works like an orc burrow, but its upgradeable.When I upgrade it, while my units inside it, they disappear.I can't make a working trigger for this.My ideas is to use Stand Down ability (so empty the building) when the upgrade button is clicked or hiding the upgrade option when a unit enters the building.But i can do neither. :(
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
just trigger it so when the upgrade starts create new units for the player and let the ones inside dissapear
 

Tothumn

New Member
Reaction score
4
it would be a good idea but my units carrying items
and i dont even know how check how many units i lost.And they dont die, only disappear so they still use food, which is a great problem because that players food never become 0 so that player cant lose.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
well then when the upgrade starts destroy the building which will force out the units and create the upgrade version.
 

Tothumn

New Member
Reaction score
4
aww, i think my event isnt correct but idk how to complete it.

Trigger:
  • trigger
    • Events
      • Unit - A unit Begins an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Farm
    • Actions
      • Wait 2.00 seconds
      • Unit - Remove (Triggering unit) from the game
      • Wait 0.05 seconds
      • Unit - Create 1 House for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
 

reyghost

New Member
Reaction score
14
Just one thing if you are going to use a lot of these "upgrades" make sure to fix the point leaks "position of triggering unit" or your map will probably end up lagging.
 

Tothumn

New Member
Reaction score
4
Thanks for the tip (even if i do not know how to fix it).
I would give +rep for a trigger which empty the building when i start upgrade or for another one which doesnt allow to upgrade when the units are inside. :rolleyes:
 

afisakov

You can change this now in User CP.
Reaction score
37
Your trigger
Code:
Untitled Trigger 001
    Events
        Unit - A unit Sells a unit
    Conditions
        (Unit-type of (Sold unit)) Equal to faketowerunit 
    Actions
        Unit - Remove (Triggering unit) from the game
        Unit - Remove (Sold unit) from the game
        Set Temp_Point = (Position of (Triggering unit))
        Unit - Create 1 Scout Tower for Player 1 (Red) at Temp_Point facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_Temp_Point)
Instead of an upgrade order you have ur burrow sell a unit with the same name, description, and cost as the needed tower. This trigger detects the sale and replaces your tower killing the old one in the process, thus freeing your workers. The only downside is the tower tends to move slightly in the process. Temp_Point is just a point variable that combined with the custom script removes the leak.

Hope this helps you
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
dont let it sell a unit rather use an ability to do this.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top