• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

'A unit begins construction' event

Status
Not open for further replies.
Level 2
Joined
Oct 1, 2004
Messages
12
How do I refer to the worker that is constructing in conditions and actions using the GUI trigger system? 'Triggering Unit' does not work, and the only options related to construction are the 'constructing structure' which refers to the building that is being constructed, not the worker.

Any help would be appreciated, thanks!
 
Level 9
Joined
Apr 6, 2008
Messages
436
hmm... if the costructing unit builds like a human, you could do like this, because when it starts building, it uses the "repair" ability.

  • Your_trigger
    • Events
      • Unit - A unit starts the launch of an ability
    • Conditions
      • (ability being cast) is equal to Repair
    • Actions
      • Do something with (casting unit)
If it builds like an Orc, an Elf, or an Undead, you'll have to use JASS...
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
triggering unit DOES work if you use the correct event, there is sth like "Unit - a unit starts to build" check generic unit events, i'm not sure if i translated it 100% correct, my WE is german

Edit: ok it does not work sry for that, but the german expression made me think it might be the other way round
 
Level 2
Joined
Oct 1, 2004
Messages
12
hmm... if the costructing unit builds like a human, you could do like this, because when it starts building, it uses the "repair" ability.

  • Your_trigger
    • Events
      • Unit - A unit starts the launch of an ability
    • Conditions
      • (ability being cast) is equal to Repair
    • Actions
      • Do something with (casting unit)
If it builds like an Orc, an Elf, or an Undead, you'll have to use JASS...

I'm using Undead for my builder. Is there something in JASS I can use to refer to the worker like 'GetConstructingUnit' or something? I know how to make locals in GUI and I would be able to set a local variable to it if there were such a function.
 
Level 2
Joined
Oct 1, 2004
Messages
12
Well I just decided to change it to a human worker, as a previous poster said the repair ability is the only one that works. Making a TD and I want the builders to have building animations which non-peons lack.

If anyone is able to provide information on how to do this in jass or something it would still be appreciated.
 
Level 5
Joined
Jan 15, 2007
Messages
199
I know i've seen this done before, though i think it was finishing the building while it was under construction.

You could do a .01 wait then group enum unfinished buildings and finish them??
 
Status
Not open for further replies.
Top