• 🏆 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!

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.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
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 9
Joined
Apr 27, 2012
Messages
235
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