• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Selling unit with "transmute"

Status
Not open for further replies.
Level 1
Joined
Oct 1, 2009
Messages
4
Hello all, I have a little question here. I've been trying to make (self) sell ability like in TowerDeffence maps. But as results I've only got fatal errors.
(PLS no point values, I want gold to appear next to building when it's sold)

Here's some triggers of few tries of mine.
Sell = dummy unit (training)
Sell [EDITED] = Transmute ability

TRIGGERS-1 (to quick removing dummy unit)
  • Selling start
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Sell
    • Actions
      • Unit - Add Sell [EDITED] to (Triggering unit)
  • Selling finish
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Sell
    • Actions
      • Unit - Order (Triggering unit) to Neutral Alchemist - Transmute (Triggering unit)
      • Unit - Remove (Trained unit) from the game
TRIGGERS-2 (Fattal error)
  • Selling start
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Sell
    • Actions
      • Unit - Add Sell [EDITED] to (Triggering unit)
  • Selling finish
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Sell
    • Actions
      • Unit - Order (Trained unit) to Neutral Alchemist - Transmute (Triggering unit)
  • Selling dummy remove
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Sell [EDITED]
    • Actions
      • Unit - Remove (Triggering unit) from the game
I really appreciate your help! :)
 
Level 26
Joined
Sep 26, 2009
Messages
2,434
An easy way is to make the self-sell ability actually a unit upgrade ability (like Town Hall upgrades into Keep, etc.), check whenever a new unit enters game (the upgraded version) and remove it +add gold.

Your triggers may not work because Transmute may not be intended to be cast on one self.
 
Level 1
Joined
Oct 1, 2009
Messages
4
An easy way is to make the self-sell ability actually a unit upgrade ability (like Town Hall upgrades into Keep, etc.), check whenever a new unit enters game (the upgraded version) and remove it +add gold.

Your triggers may not work because Transmute may not be intended to be cast on one self.

I want to gold appear next to sold "unit".
I have tested transmute ability it casts transmute on his self perfectly:
  • ability test
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • Unit - Add Sell [EDITED] to (Triggering unit)
      • Unit - Order (Triggering unit) to Neutral Alchemist - Transmute (Triggering unit)
Point value sell system is easier to make than upgraade:

Setting Point value equal to Gold cost
Training dummy unit
When finished training adding Player gold ((Point value of (Triggering unit) /2)
Removing triggering unit from the game.


(Its all about gold appearing next to sold unit without triggers. It removes all that triggering work).
 
Level 1
Joined
Oct 1, 2009
Messages
4
Ok Im done, thanks for your help :)
I've added Immolation ability with name "SELL" when it activates, it replaces immolation with transmute, and orders unit to cast transmute on itself, it works very fast and uses only 1trigger :)

Here's trigger if you would like to see:
  • skill check
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sell [EDITED2]
    • Actions
      • Unit - Add Sell [EDITED] to (Triggering unit)
      • Unit - Order (Triggering unit) to Neutral Alchemist - Transmute (Triggering unit)-

Have you considered using floating text?
I was thinking about that at first, but I hate all that playing with floating texts, and color codes. And plus I think that this sell "system" I've made here uses less space than any other.


OFC there's some minuses if you would accidently push sell it would sell building/unit immediately, so upgrade/train has some pluses too.
 
Last edited:
Level 1
Joined
Oct 1, 2009
Messages
4
In following event:
  • Events
    • Unit - A unit begins training a unit
You can not check unit type of trained unit.

It's impossible to get unit type of un-trained units, because they do not exist.
You only can use that unit type check after unit finished training.

Now that's something interesting u have told there, I'll keep it in my mind. It's really useful information actually. Thanks for commenting :)
 
Status
Not open for further replies.
Top