• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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