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

[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