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

Ability to move faster but lose mana

Status
Not open for further replies.
Level 4
Joined
Oct 4, 2012
Messages
80
How can i make system(or ability) like when i press a button the unit will move 50%faster, and lose 5 mana per second?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
How can i make system(or ability) like when i press a button the unit will move 50%faster, and lose 5 mana per second?

base the ability with Channel, set the target type to Instant (No Target), and the 'Data - Option to Visible'. set the Hotkey to A. now you need to set the Attack hotkey from gameplay constant / interface i think to other than A.

now create an ability based on Mana Regeneration, set data Amount Regenerated to '-5.00' and set the Data - Percentage to False.

when the unit starts the effect of the spell.

  • Events
    • Unit - A unit starts an effect of an ability
  • Conditions
    • (Ability being cast) Equal to Your Spell
  • Actions
    • Unit - Add Mana Regeneration to (Triggering unit)
    • Unit - Set movement speed of unit to ((Current Movement speed of (Triggering unit)) x 0.5)
now when the ability is stopped.
  • Events
    • Unit - A unit stops casting an ability
  • Conditions
    • (Ability being cast) Equal to Your Spell
  • Actions
    • Unit - Remove Mana Regeneration from (Triggering unit)
    • Unit - Set movement speed of unit to (Default movement speed of (Triggering unit))
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
...and lose 5 mana per second?
This means that the spell can be activated/deactivated at will, Venom.

You should base this off of Immolation.

Also, by doing your algorithm (by simply resetting it back to default movement speed) is not a good way to handle the movement speed of that unit.
Use Variables instead.
 
Level 4
Joined
Oct 4, 2012
Messages
80
I mean when i hold button the unit will go 50% faster, and when i release it, it will switch back to default unit movement speed..
if you know how to do that, please post triggers and variables(if any).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Yes, we know... you need your trigger. Please stop asking us constantly, I was actually trying to make you do this yourself, but okay. Here it goes.

Requirements:
- Main Ability: must be based in immolation. Remove/change all unnecessary data (art, damage, icon, ...) and fit it to your needs.
- Buff: based on "Speed Bonus", just so you can change the art and all that.
- Item ability: must be based on "Rune of Speed". Make it so it gives +50% (0.50) movement speed. Give it the buff from the previous requirement. Set duration to 3600 seconds.
- Item: base it on a rune (power-up) and give it the Item Ability (see previous requirement).

The Trigger:
  • Sprint
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (String((Issued order))) Equal to immolation
        • Then - Actions
          • Unit - Add Inventory (Hero) to (Triggering unit)
          • Hero - Create Rune of Speed and give it to (Triggering unit)
          • Item - Remove (Last created item)
          • Unit - Remove Inventory (Hero) from (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (String((Issued order))) Equal to unimmolation
            • Then - Actions
              • Unit - Remove Speed Bonus Dummy buff from (Triggering unit)
            • Else - Actions

Notes:
- If only heroes can use this ability, remove the actions "Unit - Add Inventory (Hero)" and "Unit - Remove Inventory (Hero)".
 
Last edited:
Level 4
Joined
Oct 4, 2012
Messages
80
The Trigger:
  • Sprint
    • Events
      • Unit - A unit Start an effect of an Ability
    • Conditions
      • (ability being cast)Equal to Sprint
      • (Mana of(Triggering unit)) less than 5
    • Actions
      • Unit-Remove Sprint Buff from(Triggering unit)
i need to put that right? or...
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Nope, that's not enough. U must check it periodly while the skill is active (like what u said, it will move faster until u turn off the skill). If it doesnt have enough mana, order it turn off the skill and remove the buff.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Save the caster into a unit group (let's call it tempGroup).
this trigger is initially on, it will only be turned on if the ability is being cast


  • Sprint
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in tempGroup and do multiple actions
        • Loop - Actions
          • If all conditions are True then do actions else do actions
            • If - Conditions
              • (Mana of (Picked unit)) less than 5
            • Then - Actions
              • Unit - Remove Buff of Sprint from(Picked unit)
              • Unit - Remove (Picked unit) from tempGroup
              • Trigger - Turn off (this trigger)
            • Else - Actions
something like that.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Personally, I would do it like this:

  • Sprint
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of (Triggering unit)) Less than or equal to 0.10
        • Then - Actions
          • Unit - Remove Speed Bonus Dummy buff from (Triggering unit)
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (String((Issued order))) Equal to immolation
        • Then - Actions
          • Unit - Add Inventory (Hero) to (Triggering unit)
          • Hero - Create Rune of Speed and give it to (Triggering unit)
          • Item - Remove (Last created item)
          • Unit - Remove Inventory (Hero) from (Triggering unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is in sprintGroup) Equal to False
            • Then - Actions
              • Unit Group - Add (Triggering unit) to sprintGroup
              • Trigger - Add to (This trigger) the event (Unit - (Triggering unit)'s mana becomes Less than or equal to 0.10)
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (String((Issued order))) Equal to unimmolation
            • Then - Actions
              • Unit - Remove Speed Bonus Dummy buff from (Triggering unit)
            • Else - Actions
 
Level 4
Joined
Oct 4, 2012
Messages
80
This may be stupid question but where i can find those:
"(String((Issued order))) Equal to immolation"
and
"(String((Issued order))) Equal to unimmolation", i found "(String((Issued order))) Equal to" but i cant find how to put immolation and unimmolation :/
 
Status
Not open for further replies.
Top