• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

i need some help in triggering...

Status
Not open for further replies.
Level 12
Joined
Oct 16, 2010
Messages
680
set variables at first.

  • (Attacked Unit)
should be
  • (Attacking Unit)
and

  • (Random integer number between 1 and 100) Less than or equal to (10 x (Level of Panic Reload for (Attacking unit)))
this is the same as the rest.. so you can delete all the other conditions

you set Point (position of pr_unit) but you didn't use it.

and you forgot to remove Point

  • Panic Reload
  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Random integer number between 1 and 100) Less than or equal to (10 x (Level of Panic Reload for (Attacking unit)))
  • Actions
    • Set PR_Unit = (Attacking unit)
    • Set Point = (Position of PR_Unit)
    • Unit - Create 1 Dummy Caster for (Owner of PR_Unit) at Point facing Point
    • Set Unit = (Last created unit)
    • Unit - Add Panic Reloading (Reloaded) to Unit
    • Unit - Set level of Panic Reloading (Reloaded) for Unit to (Level of Panic Reload for PR_Unit)
    • Unit - Order Unit to Orc Shaman - Bloodlust PR_Unit
    • Unit - Add a 1.50 second Generic expiration timer to Unit
    • Custom script - call RemoveLocation(udg_Point)
 
Level 4
Joined
Oct 23, 2013
Messages
92
oh i see! so you really need to set and remove the point.... thanks for the correction!
 
Level 4
Joined
Oct 23, 2013
Messages
92
i need another help on a spell that deals initial damage + attribute damage but i think something is wrong. I want the attribute damage part to deal x the level of the spell, here's the trigger. Please check if there's anything wrong.
  • Death Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Low Blow (Neutral Hostile)
      • (Real((Strength of (Triggering unit) (Include bonuses)))) Greater than or equal to (1.00 x (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit)))))
    • Actions
      • Set Real_Str = (Real((Strength of (Triggering unit) (Include bonuses))))
      • Set LB_Point = (Position of (Triggering unit))
      • Set Univ_Target = (Target unit of ability being cast)
      • Unit - Cause (Triggering unit) to damage Univ_Target, dealing Real_Str damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_LB_Point)
 
Level 4
Joined
Oct 23, 2013
Messages
92
You didn't multiply the Str of the hero to the level of ability.
  • (Real((Strength of (Triggering unit) (Include bonuses)))) Greater than or equal to (1.00 x (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit)))))
(1.00 x (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit))))) i tried to change the 1.00x to 5.00 and it's to high so i set it to 1.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I was talking about this line, not the condition.
  • Actions
  • Set Real_Str = (Real((Strength of (Triggering unit) (Include bonuses))))
 
Level 4
Joined
Oct 23, 2013
Messages
92
I was talking about this line, not the condition.
  • Actions
  • Set Real_Str = (Real((Strength of (Triggering unit) (Include bonuses))))
  • Set Real_Str = ((Real((Strength of (Triggering unit) (Include bonuses)))) x 3.00)
this was the original trigger and i tested it and assumed that the damage is too big so i removed it.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Oh, okay, I read your post again, my bad sorry. I thought you want to multiply the damage. You wanted to damage the attribute, here's the action for that:
  • Hero - Modify Strength of (Target unit of ability being cast): Subtract (Level of (Ability being cast) for (Triggering unit))
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
  • Set Real_Str = (Real((Strength of (Triggering unit) (Include bonuses))))
"i need another help on a spell that deals initial damage + attribute damage"

The sentence is obvious,
  • [trigger] Set Real_Str = 150.00 + (Real((Strength of (Triggering unit) (Include bonuses))))
[/trigger]

Set Real_Str = 150.00 + (Real((Strength of (Triggering unit) (Include bonuses))))

150.00 = This value is the initial damage that you must add in the damage. as you said "initial damage +"
+ = This is the operator sign: + is the added or addition to the value.

(Real((Strength of (Triggering unit) = This is the strenght attribute of the triggering unit or the hero.

(Include bonuses)))) This is the including bonuses of the attribute that you can get on items such as Gauntlets of Strenght.

So it is cleared about that:
  • [b]150.00[/b] [b]+[/b] [b](Real((Strength of (Triggering unit)[/b]
^INITIAL DAMAGE ^ ADD or + ^ THE ATTRIBUTE OF THE HERO.
 
Level 4
Joined
Oct 23, 2013
Messages
92
oh yes i forgot that there's an initial damage! what i'm trying to do is there's a different initial damage per level and there's different attribute damage per level let's say for lvl 1 is 50 initial + (2 x the real attribute) so on and so forth.
 
Level 4
Joined
Oct 23, 2013
Messages
92
^ Seperate the calculation of the damage into 2 variable then add them.
based on the trigger the i posted, how can i do that? i'm a newbie so i kindly please help me.
what if i make a dummy unit that casts the initial damage, then the triggering hero will deal the attribute damage? but i think that would be too long and consumes a lot of memory.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
  • Set Real_Str = (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit) x (Real((Strength of (Triggering unit) (Include bonuses))))
  • Set Real_InitialDamage = (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit) x 50.00
  • Unit - Cause (Triggering unit) to damage Univ_Target, dealing Real_InitialDamage + Real_Str damage of attack type Spells and damage type Normal
 
Level 4
Joined
Oct 23, 2013
Messages
92
  • Set Real_Str = (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit) x (Real((Strength of (Triggering unit) (Include bonuses))))
  • Set Real_InitialDamage = (Real((Level of Low Blow (Neutral Hostile) for (Triggering unit) x 50.00
  • Unit - Cause (Triggering unit) to damage Univ_Target, dealing Real_InitialDamage + Real_Str damage of attack type Spells and damage type Normal
so there's no need for dummies. One question, why the x50?
 
Level 4
Joined
Oct 23, 2013
Messages
92
It is times or multiply

Example: The level of the ability to the caster is 1 then it is multipled by 50 so:
50 times 1 equals 50.00 so the damage is 50.00.
so given the triggers that you posted, the spell is working leak free? i don't need to change anything else? Here's the final trigger kindly check if there's any unnecessary things that i should remove, i edited the name also.
  • Death Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Death Strike
      • (Real((Strength of (Triggering unit) (Include bonuses)))) Greater than or equal to (1.00 x (Real((Level of Death Strike for (Triggering unit)))))
    • Actions
      • Set DS_StrDmg = ((Real((Strength of (Triggering unit) (Include bonuses)))) x 3.00)
      • Set DS_InitialDmg = (Real(((Level of Death Strike for (Triggering unit)) x 50)))
      • Set DS_Point = (Position of (Triggering unit))
      • Set Univ_Target = (Target unit of ability being cast)
      • Animation - Play (Triggering unit)'s attack slam animation
      • Unit - Cause (Triggering unit) to damage Univ_Target, dealing (DS_InitialDmg + DS_StrDmg) damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_LB_Point)
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
^ You need to store the triggering unit into a unit variable and the level of the ability to the integer variable because you use it twice., Of course no involve leaks in the trigger it just use a unit and integer .
 
Level 4
Joined
Oct 23, 2013
Messages
92
is it possible to set the level of a spell in a hidden spell book equal to the level of a aura/passive ability?
 
Level 12
Joined
Oct 16, 2010
Messages
680
there is no way to level up a spell inside a spell book since you can not open the spellbook via triggers.

a way to emulate the leveling of the spell is by storing spell1,spell2 and spell3 ( these represent the 3 level of one ability)
store them in 3 different spellbook
store the spellbook id's in a integer array at the corresponding indexes ( array[1] = spell1's spellbook , array[2]= spell2...)
then get the level of the aura/passive and add the corresponding spell ( if the aura/passive's level is 2 , give array[2] )
 
Level 4
Joined
Oct 23, 2013
Messages
92
there is no way to level up a spell inside a spell book since you can not open the spellbook via triggers.

a way to emulate the leveling of the spell is by storing spell1,spell2 and spell3 ( these represent the 3 level of one ability)
store them in 3 different spellbook
store the spellbook id's in a integer array at the corresponding indexes ( array[1] = spell1's spellbook , array[2]= spell2...)
then get the level of the aura/passive and add the corresponding spell ( if the aura/passive's level is 2 , give array[2] )

i knew it! that's the way too do it but second guessed it. But i think you can't set the ability of the spells within the spell book if it's disabled by trigger.
 
Level 4
Joined
Oct 23, 2013
Messages
92
i made the spell to work with no leaks, my next problem is to create aura that has effects on allies and enemies too....
 
Last edited:
Level 6
Joined
Sep 13, 2013
Messages
155
maybe create two auras one positive and negative, then use a dummy unit and give the dummy unit the negative one with no effect and art, then you can both order the dummy unit to follow the unit (you need to set the follow range in gameplay constants to 100 for affecting completely) or you can make your dummy unit follow the unit by using wisps' harvest lumber based ability (I didn't test this one myself, don't know it gives you resources or not :p)
 
Level 4
Joined
Oct 23, 2013
Messages
92
that's the problem, i don't know how to make an aura to affect enemy units, i only know how to set the aura to target enemies. I'm thinking of using unit groups.
 
Status
Not open for further replies.
Top