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

[General] Building Refunds and Putting rally points on a building

Status
Not open for further replies.
Level 4
Joined
Jul 10, 2013
Messages
60
1st Topic:

If a building is destroyed mid-construction, you get no gold back.

I thought of a simple fix, to refund if a building of that type is destroyed, but that would also refund fully completed versions of a buildings. So I'm a bit stumped, how do I make it construction only?

2nd Topic:
How do I give buildings rally point?
 
Level 7
Joined
Mar 6, 2006
Messages
282
Edited**

1st Topic:

If a building is destroyed mid-construction, you get no gold back.

I thought of a simple fix, to refund if a building of that type is destroyed, but that would also refund fully completed versions of a buildings. So I'm a bit stumped, how do I make it construction only?

Trigger 1:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 1
Trigger 2:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A structure) Equal to True
      • (Custom value of (Triggering unit)) Equal to 0
    • Actions
      • Remove the resources that were refunded.
To get the resource cost of the building, you probably need to use a hashtable. I also think that there's a system for getting the resource cost of something, lemme see if I can find it.

2nd Topic:
How do I give buildings rally point?

  • Unit - Order No unit to Set Rally Point To (Center of (Playable map area))
 
Last edited:
Status
Not open for further replies.
Top