• 🏆 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!

From passive to active spell with ranks

Status
Not open for further replies.
Level 2
Joined
Jun 10, 2011
Messages
20
Hey guys. I'm kind of new at WE so I ain't too good at triggers and stuff...only the basics, also at the moment I'm doing my first map so I got a little question tied to another topic that was closed.

I am trying to make a passive ability become an active one, but what I found was for a lvl 1 ability... and what I am exactly tring to do is make an active dodge ability with 10 levels.

Can anyone help? Just need for 2 levels, the rest I can do it myself ^_^


Also I got this part made by MikeyDN (ty for the example):
  • Trigger 1
  • Events
  • Unit - A unit starts the effect of an ability
  • Conditions
  • Ability - Ability being cast equal to <Active Critical Strike>
  • Actions
  • Set variable <Unit_Caster> to <casting unit>
  • Unit - Add ability <Passive Critical Strike> to <Unit_Caster>
  • Timer - Start timer <Timer_CriticalStrike> as a one-shot timer that will expire in XX seconds
  • Trigger 2
  • Events
  • Game/Timer - <Timer_CriticalStrike> expires
  • Conditions
  • Actions
  • Unit - Remove ability <Passive Critical Strike> from <Unit_Caster>
 
Level 7
Joined
Apr 1, 2010
Messages
289
here is the easiest way to do it, and it will work for all levels
  • Help
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Custom script: local unit udg_Unit
      • Custom script: local integer udg_Int
      • Custom script: local real udg_Real
      • Set Unit = (Triggering unit)
      • Set Int = (Level of ActiveCrit for Unit)
      • Set Real1 = (((Real(Int)) x 5.00) + 10.00)
      • Unit - Add HiddenCrit to Unit
      • Unit - Set level of Crit for LocalUnit to Handle
      • Wait Real1 game-time seconds
      • Unit - Remove HiddenCrit from Unit
      • Custom script: set udg_Unit=null
      • Set Int = 0
      • Set Real1 = 0
you will also need to add this trigger to a Init trigger
  • For each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • Player - Disable HiddenCrit for (Player((Integer A)))
where HiddenCrit is a Spellbook that has abillity Crit(which is based off of critical strike) in it
 
Level 2
Joined
Jun 10, 2011
Messages
20
^_^

Ok so basically I got to use a spellbook with an ability in it being my evasion or what? Or erm...I don't get it :D what spells I have to use what and where :grin:
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
@Narogog
You did well by using local variable to make it MUI but to be more accurate, please use normal Wait action rather than using the Wait game-time because PolledWait is much slower than TriggerSleepAction function
Also, it is more wise to use all the function in custom script, rather than setting a local variable that is based on global variable (the udg_)
 
Level 2
Joined
Jun 10, 2011
Messages
20
tyvm Kala!!
That was exactly what I was looking for ^_^.

And ty Narogog to you too ^_^

Still I got one questions, about hiding the spell that is being added so it won't show. I don't want it to remain visible, just blank. and if I delete the icon it's just green square ^_^. Is there any way?
 
Level 11
Joined
Jun 20, 2009
Messages
880
Make an Spellbook called HiddenBook. Put your dodge ability in it.
Then use this trigger to disable the spellbook for all players:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Disable HiddenBook for (Player((Integer A)))
And now, instead of adding the "Dodge" ability with the trigger, add the HiddenBook.
 
Status
Not open for further replies.
Top