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

Problem with ability...

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hi! I wanna ask why my spell doesn't work, triggers here :

  • Da hashtable
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set HashForDamage = (Last created hashtable)
  • Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Bear
    • Actions
      • Hashtable - Save (Damage taken) as 1 of 1 in HashForDamage
  • Da actual spell
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Power Slam [Bear]
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - ((Load 1 of 1 from HashForDamage) + ((Load 1 of 1 from HashForDamage) x 10.00)))
What i actually want is when my bear uses the spell 'Power Slam' - the damage taken to be 11 times X the normal damage of the bear. The dummy spel i use is Storm bolt. +rep 4 help!
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
The event "A unit is attacked" fires before any damage is taken (when a unit is ordered to attack).
Therefore, the "Damage taken" value is incorrect.

If a damage detection system was this easy, there wouldn't be many of those systems around.
Unfortunately, it is not. Creating a smooth system requires some time (because "unit takes damage" fires with triggered damage, spells and regular attacks. Differentiating them is sometimes tricky.
Well, I advise you use http://www.hiveworkshop.com/forums/spells-569/gui-friendly-damage-detection-v1-2-1-a-149098/ for a damage detection system (since you use GUI).
 
I created a little test map for you, since i wont write here triggers while you are not familiar with any of damage systems.

I used GUI friendly damage system, as metioned above its great for GUI users.
(i used it for unit type, not for signle unit, and for testing its just a footman)

EDIt if its not what are you looking for, or you are not satysty with it, post it.
 

Attachments

  • bear strike.w3x
    24 KB · Views: 48
Level 14
Joined
Aug 8, 2010
Messages
1,022
Thanks, Spinnaker! But i saw that in the tutorial for the friendly damage capture system that i can copy the triggers and the variables from one map to another. Can you show me how to do it - i can't open 2 maps at the same time... And where i can find the function "Automatically create unknown variables while pasting trigger data" and enable it???
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hmmm... i found the function and enable it, but when i copy the trigg, it isn't pasting... Exactly what i do is this : I open your map, copy the trigger (also i tried with 'copy as text'), close your map, open my map, try to paste it and nothing happens, i mean i can't click the 'Paste' button... ?

You may think i am dumb and that i am noob - i am! :D :X
 
Last edited:
Every one was a beginer. First copy category - here trigger forlder - GDD into your map: you have to right-click ->copy, close map, open ur's go to trigger editor, hold cursor on triggers category field (there is a map init trigger already) and paste it. Your GDD should now be implemented if you enabled creating new variables as metioned above. Rest you know - i hope so.
 
Status
Not open for further replies.
Top