• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Undead Builder

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
The undead accolyte doesn't actually count as the one constructing the structure or am I doing it wrong?

  • Accolyte
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering unit))
Returned message: Ziggurat. Thats not the man (or building) which started the project.
 
You are lucky that I've just finished last few things with my ConstructEvent.

Btw GetTriggerUnit() returns unit which construction has begun, instead of actual builder unit. Worry not, after short lecture, link below will sent you to place where pesky construction events are polite and teddy.

When talking about unit construction, you have to consider multiple factors:
-race of structure unit
-item usage
-item-based build ability
-collision/pathing (space taken by building)
-if structure-unit is organic or mechanic type of unit

In case you don't know, buildings can be build on "arbitrary" coordinates (like doodads) and then issue complicates even more.
Common trick is to check builder's coords and structure coords on construct start event. Are we fine? No, when structure has no collision radius, there might be difference between those values.

What more, those values have to be translated accordingly to map's quarter (XY axis). Oddly enough, those coordinates will be rounded up or down to 0.250 base depending on quarter unit is in.

Enough of this shit talk, enjoy! ConstructEvent.
 
Level 10
Joined
Apr 27, 2012
Messages
241
The undead accolyte doesn't actually count as the one constructing the structure or am I doing it wrong?

  • Accolyte
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering unit))
Returned message: Ziggurat. Thats not the man (or building) which started the project.


Oh noez! I just started a very similar thread. If only I had read this before :/
 
Status
Not open for further replies.
Top