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

[Trigger] Avatar Skill

Status
Not open for further replies.
Level 2
Joined
Jan 14, 2014
Messages
16
After I've Known How To Damage x Stats Skill...
I Want Know Too About How To Add HP Bonus And Damage Depends On Stats (Effect Duration Include :D(If It Possible))
Ex :
[R] - [Ultimate] Lv.1 Avatar
When The Avatar Is Activated, Gives Mountain King Immunity Spell, HP +200 + [x5STR] , Damage +50 + [x2.5STR], Last For 20 + [x5Lv Skill]
And Also, How About For Damage Bonus For Passive Skills Like Bash, Ex : Bashing Your Enemy By 100 + [x10STR] , 20% Change.
 
Last edited:
Level 2
Joined
Jan 14, 2014
Messages
16
hmm, i just need several times to create this triggers, i haven't tested,:xxd:
at least, it's about 0.80 Seconds wait or 0.5 >.>
  • Bash
  • Events
    • Unit - A unit Is attacked
  • Conditions
  • Actions
    • Wait 0.80 seconds
    • Set Real = (100.00 + (2.00 x (Real((Strength of (Attacking unit) (Include bonuses))))))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Attacked unit) has buff Stunned (Pause)) Equal to True
      • Then - Actions
        • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing Real damage of attack type Spells and damage type Normal
      • Else - Actions
        • Do nothing
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
we are talking about miliseconds if not micro seconds of delay here. The wait should be like 0.1 (if not lower, which is rather pointless)

1. it is not MUI in most cases, it works in very few cases.
2. inaccurate if you wait 1 second it can end up waiting 0.9
3. can ruin your code completely in some cases. (I dont remember exactly) I think it was something like it destroyed threads.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Wait:

- Causes non*MUIness most of the time
- is inaccurate(however, it never waits for shorter than ordered, always higher, up to 250 ms in Battle.net games)
- can cause game crash if the trigger that is sleeping is destroyed
 
Level 14
Joined
Nov 30, 2013
Messages
926
Let me know if you creating a passive skill that has a chance to do a damage bonus like the example you said.
If yes.
Then maybe this should be work.
  • Passive Attack Chance
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Chance = 20
      • Set AttackChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Level of Bash for (Attacking unit)) Greater than 0
              • AttackChance Less than or equal to Chance
        • Then - Actions
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (100.00 + (10.00 x (Real((Strength of (Attacking unit) (Include bonuses)))))) damage of attack type Spells and damage type Normal
        • Else - Actions
About the Avatar form. I also just created a trigger for the Avatar Ability.

  • Avatar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Set Last = (20.00 + (5.00 x (Real((Level of Avatar (Neutral) for (Casting unit))))))
      • -------- Damage --------
      • Hero - Modify Strength of (Casting unit): Add (50 + (2 x (Strength of (Casting unit) (Include bonuses))))
      • Wait Last seconds
      • Hero - Modify Strength of (Casting unit): Subtract (50 + (2 x (Strength of (Casting unit) (Include bonuses))))
I don't know if the HP can be increase by using a trigger anyway. Sry..
 
Level 11
Joined
Nov 15, 2007
Messages
800
  • Avatar
    • Hero - Modify Strength of (Casting unit): Add (50 + (2 x (Strength of (Casting unit) (Include bonuses))))
    • Wait Last seconds
    • Hero - Modify Strength of (Casting unit): Subtract (50 + (2 x (Strength of (Casting unit) (Include bonuses))))


That won't work. What happens here is:

Hero has 100 strength, casts Avatar, gains 50 + 100x2 = 250 strength.

Hero has 350 strength, Avatar ends, hero loses 50 + 350x2 = 750 strength.

Now your hero has -400 strength.



Also, OP himself has already pointed out the problem with using "A unit is attacked". Better to use a damage detection system; you will have to trigger every sort of damage (or use dummy caster workarounds) however, so implementing this kind of thing into a map that's already got a lot of progress done on it can be really messy.
 
Level 14
Joined
Nov 30, 2013
Messages
926
That won't work. What happens here is:

Hero has 100 strength, casts Avatar, gains 50 + 100x2 = 250 strength.

Hero has 350 strength, Avatar ends, hero loses 50 + 350x2 = 750 strength.

Now your hero has -400 strength.



Also, OP himself has already pointed out the problem with using "A unit is attacked". Better to use a damage detection system; you will have to trigger every sort of damage (or use dummy caster workarounds) however, so implementing this kind of thing into a map that's already got a lot of progress done on it can be really messy.

Opps I didn't notice that.
 
Level 2
Joined
Jan 14, 2014
Messages
16
if it don't work then, how about this?
  • Avatar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Set Last = (20.00 + (5.00 x (Real((Level of Avatar for (Casting unit))))))
      • Set Interger = (10 + (2 x (Strength of (Casting unit) (Exclude bonuses))))
      • Hero - Modify Strength of (Casting unit): Add (10 + (2 x (Strength of (Casting unit) (Exclude bonuses))))
      • Wait 30.00 seconds
      • Hero - Modify Strength of (Casting unit): Subtract Interger
 
Level 11
Joined
Nov 15, 2007
Messages
800
Use "Triggering Unit" instead of "Casting Unit". Add "Integer" for better efficiency. Wait "Last" seconds, so it scales with level. Also, this won't work if more than one unit casts the ability at the same time because the integer will be overwritten.
 
Level 2
Joined
Jan 14, 2014
Messages
16
I didn't ever use "instead of" :con:, which section is it? or can you give me some examples?
btw, it's just will be 1 hero/player in my maps, that wouldn't make me worried
 
Level 11
Joined
Nov 15, 2007
Messages
800
I didn't ever use "instead of" :con:, which section is it? or can you give me some examples?
btw, it's just will be 1 hero/player in my maps, that wouldn't make me worried

I mean you should use Event Response - Triggering Unit rather than Event Response - Casting Unit. Casting Unit won't work with a wait.
 
Status
Not open for further replies.
Top