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

Heal spell aint working

Status
Not open for further replies.
Level 2
Joined
Sep 21, 2005
Messages
13
well it aint working
Heal
Code:
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Heal 
    Actions
        Set Int[(Player number of (Owner of (Casting unit)))] = (Intelligence of (Casting unit) (Include bonuses))
        Game - Display to (All players) the text: (String((Int[(Player number of (Owner of (Casting unit)))] x 3)))
        Unit - Set life of (Targeted unit) to ((Life of (Targeted unit)) + ((Real(Int[(Player number of (Owner of (Casting unit)))])) x 3.00))
        Floating Text - Create floating text that reads (String((Int[(Player number of (Owner of (Triggering unit)))] x 3))) above (Targeted unit) with Z offset 0.00, using font size 8.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds

I think the problem is in this line: "Unit - Set life of (Targeted unit) to ((Life of (Targeted unit)) + ((Real(Int[(Player number of (Owner of (Casting unit)))])) x 3.00))
Floating Text - Create floating text that reads (String((Int[(Player number of (Owner of (Triggering unit)))] x 3))) above (Targeted unit)"

and I dont see eny floading text.. what am i doing wrong.?

Int is a intiger array (10)
 
Level 2
Joined
Sep 21, 2005
Messages
13
Well i made it work.....I changed "Targeted unit" too "Target unit of Ability being cast" solved the problem. and I also changed the event too "unit begins the efffect of"

here are my code now..
Code:
Heal lvl 1 too 9
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Heal 
        (Level of (Casting unit)) Less than 10
    Actions
        Set Int[(Player number of (Owner of (Casting unit)))] = (100 + ((Intelligence of (Casting unit) (Include bonuses)) x 2))
        Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Real(Int[(Player number of (Owner of (Casting unit)))])) x 1.00))
        Floating Text - Create floating text that reads (String(Int[(Player number of (Owner of (Casting unit)))])) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
        Wait 5.00 seconds
        Floating Text - Destroy (Last created floating text)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
the reason the one works and not the other

Targeted Unit refers to a unit is the target of a unit order

whereas

Target Unit of Ability Being Cast.. well... duuh

also... good thing you switched the event, because if you press Stop after beginning to cast an ability, Begins Casting will still activate whereas Starts the Effect of will not :)
 
Status
Not open for further replies.
Top