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

Need help in a spell

Status
Not open for further replies.
Level 19
Joined
Oct 7, 2014
Messages
2,209
Need help in a passive spell

Hello Hive!

I'm working on a spell and I don't know how to display how much gold is given whether as a special effect or game message and the other problem is its a passive spell but I want it to have a 30 second cooldown. I also don't know how to check if a spell is on cooldown order for the trigger to work.

  • Spoils of War
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set SoW_KillingUnit = (Killing unit)
      • Set SoW_DyingUnit = (Dying unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of SoW_KillingUnit) Equal to Warchief
          • (SoW_DyingUnit is A structure) Equal to True
        • Then - Actions
          • Set SoW_OwnerKillingUnit = (Owner of SoW_KillingUnit)
          • Set SoW_StructureInteger = (SoW_StructureInteger + 1)
          • Trigger - Turn on SoW Structure <gen>
        • Else - Actions
          • Set SoW_UnitInteger = (SoW_UnitInteger + 1)
          • Trigger - Turn on SoW Unit <gen>
  • SoW Structure
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SoW_StructureInteger Equal to 5
        • Then - Actions
          • Player - Add (SoW_StructureInteger x 50) to SoW_OwnerKillingUnit Current gold
          • Special Effect - Create a special effect attached to the overhead of SoW_KillingUnit using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set SoW_StructureInteger = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
  • SoW Unit
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SoW_UnitInteger Equal to 20
        • Then - Actions
          • Player - Add (SoW_UnitInteger x 12) to SoW_OwnerKillingUnit Current gold
          • Special Effect - Create a special effect attached to the overhead of SoW_KillingUnit using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set SoW_UnitInteger = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Last edited:
Level 21
Joined
Nov 4, 2013
Messages
2,016
You can do it via Floating Texts. Simply add these triggers below the special effects triggers:

  • Floating Text - Create floating text that reads (String((SoW_StructureInteger x 50)) above SoW_KillingUnit with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
  • Floating Text - Set the velocity of (Last created floating text) to 30.00 towards 90.00 degrees
  • Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
 
Status
Not open for further replies.
Top