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

Spell Question

Status
Not open for further replies.
Level 10
Joined
Apr 22, 2010
Messages
422
Hello, Thank you for clicking for i have a big problem, Im am creating a spell called Posssesion that is diffrent from the ingame possesion where the hero has a CHANCE of possesing the target unit.

I have made a ability with triggers but i dont know if it will work.
Bascily the Spell is composed of a few steps:
1-Unit is hit by "Possesion" Spell(target spell)(based off storm bolt)
2-The spell deals low damage and stuns for a few seconds
3a-IF the unit's hp is lower then or equal to (level of spell x10)%, then it is yours!(a small floating message appears above the target displaying the success message)
3b-IF not, then nothing happens.(and a message above the unit appears saying "Possession Failed"

Basicly, the dummy base spell takes care of the stun and damage, then my triggers do the rest, i just need someone to examin and tell me if it leaks or if there are any problems.If yes, please tell me what are the problems, if not, then please say so.

  • SPELL Possesion
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • Set Posses_Level = (Level of Possesion for (Casting unit))
      • Set Posses_TargetLife = (Integer((Life of (Target unit of ability being cast))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of (Target unit of ability being cast)) Less than or equal to (((Real((Level of Possesion for (Casting unit)))) x 10.00) / (Max life of (Target unit of ability being cast)))
        • Then - Actions
          • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
          • Floating Text - Create floating text that reads Possesion Success above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Wait 3.00 seconds
          • Floating Text - Destroy (Last created floating text)
        • Else - Actions
          • Floating Text - Create floating text that reads Possesion Failed above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Wait 3.00 seconds
          • Floating Text - Destroy (Last created floating text)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
1. For Event, please use the "Unit - Starts the effect of an ability"
It's the safest, most efficient Event to use in a Spell-casting Event

2. Add your Conditions, you don't want to make ANY unit casting ANY spell, will trigger this trigger, right... ?
So, add Conditions, like this:
  • Conditions
    • (Ability being cast) Equal to Possession
3. Do NOT use Wait, as it will bug your trigger, very much

4. Use this Action to destroy Floating Text without the usage of Wait
  • Actions
    • Floating Text - Create floating text that reads Possession Success ! above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
    • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
    • Floating Text - Change (Last created floating text): Disable permanence
    • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
5. If you have any more problem, please, do tell.
 
Status
Not open for further replies.
Top