How Would I Make A Sell Option On Buildings?

ADuckOnQuack

New Member
Reaction score
2
I am wondering how to create that button on buildings that lets u sell it for the money u paid to build it plz comment ty
 

Syndrome

You can change this now in User CP.
Reaction score
126
Well, what I would do is.
1] Set the MAX HP of the Buildings to the amount of gold paid for the building.
2] Create a Wind Walk ability, rename it to sell and stuff...
3] Create a trigger that activates when that ability is casted, transfering a % of the HP of the Tower to your gold coffers.

EDIT: Man Im sleepy. A button?
Yea, use Wind Walk. Add the ability to the Unit Ability part in the Object Editor.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Set the buildings Point Value in Object Editor to the cost of the building.
Base the "Sell" ability off of any ability that when clicked automatically does it's stuff (War Stomp, Thunder Clap, Channel, Wind Walk, etc.) .
When the player uses the "Sell" ability, just do this:
Trigger:
  • Building Sell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sell
    • Actions
      • Player - Add (Point-value of (Triggering unit)) to (Owner of (Triggering unit)) Current gold
 

ADuckOnQuack

New Member
Reaction score
2
Codition Help

The Condition that is boolean and says:
(Ability being cast) is equal to "sell"
I cant find out where the option (ability being cast) is. Ive looked through the function list on boolean chart but cannot find an option that suites an ability, Please help me thanks! and thank you for first reply also
 

WolfieeifloW

WEHZ Helper
Reaction score
372
As said in your PM;
It's under "Ability Comparison" in Conditions.
It's the second from the top.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top