• 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.

Instant Build With a Trigger?

Status
Not open for further replies.
Level 4
Joined
Apr 15, 2008
Messages
82
Hi Hive. I was wondering if someone could help me with a trigger that makes it so whenever a building starts being created, it is instantly finished.

The trigger that I thought would work was:

  • Instant Build
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Unit - Set (Constructing structure) construction progress to 100%
But this doesn't work...Help a brotha out?
 
  • Instant Build
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Set TempLocA = (Position of (Constructing structure))
      • Set TempType = (Unit-type of (Constructing structure))
      • Set TempPlayer = (Owner of (Constructing structure))
      • Unit - Remove (Constructing structure) from the game
      • Unit - Create 1 TempType for TempPlayer at TempLocA facing Default building facing degrees
      • Custom script: //--------------Cleaning Up The Leaks--------------\\
      • Custom script: call RemoveLocation(udg_TempLocA)
      • Custom script: set udg_TempPlayer = null
      • Custom script: //TempType doesn't need to be nulled because unit types don't leak
I can give it to you in jass where it won't use any globals if you want.
 
Level 4
Joined
Apr 15, 2008
Messages
82
  • Instant Build
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Set TempLocA = (Position of (Constructing structure))
      • Set TempType = (Unit-type of (Constructing structure))
      • Set TempPlayer = (Owner of (Constructing structure))
      • Unit - Remove (Constructing structure) from the game
      • Unit - Create 1 TempType for TempPlayer at TempLocA facing Default building facing degrees
      • Custom script: //--------------Cleaning Up The Leaks--------------\\
      • Custom script: call RemoveLocation(udg_TempLocA)
      • Custom script: set udg_TempPlayer = null
      • Custom script: //TempType doesn't need to be nulled because unit types don't leak
I can give it to you in jass where it won't use any globals if you want.

Oh wow I love you. +rep

Also, JASS isn't necessary.

EDIT: Can't give +rep right now...have to give it to someone else first >:|

EDIT: I just tested the trigger, and found two things that I would consider to be flaws. It doesn't say, "Job's done." or whatever (but I guess I could have expected that anyways, the trigger never actually allows the building to be complete, it just removes the structure and replaces it), and it gets rid of the builder if it uses Orc or Wisp type building. Thanks for the trigger, it will probably come in handy some day, and I'll still giver +rep, but I think that I am just going to go with the 1 second build times. It isn't really that much of a difference anyways.
 
Last edited:
Level 4
Joined
Apr 15, 2008
Messages
82
I can fix those bugs if you give me a minuite, but 1 seconed build times are the best choice if you want it to not be an upgrade or a powerup. Tell me if you want me to fix those flaws.

I'd really appreciate it if you could fix those bugs, but what do you mean by "1 seconed build times are the best choice if you want it to not be an upgrade or a powerup." ?
 
Level 11
Joined
Oct 20, 2007
Messages
342
I'd really appreciate it if you could fix those bugs, but what do you mean by "1 seconed build times are the best choice if you want it to not be an upgrade or a powerup." ?
Let me explain more about this, if you dunno.
first i think the word "1 seconed" should juz a wrong typing, it shall be "1 second"

if u know what is build time that i m finish what my explain,
-else follow it:
there got an option called "build time" in object editor,
that is the time taken to build a building,
(W3 world editor > Modulo > object editor > your building > stat > build time)

and graystuff111 meaning is changing the value to 1, so it nid 1 second to complete the building.
 
Status
Not open for further replies.
Top