• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Mana System

Status
Not open for further replies.
Level 3
Joined
Feb 28, 2009
Messages
25
I need a System if a Hero cast a Spell and lost Percentage of his Mana.

z.B

  • A Spell cost 2% of Maximum Mana.
  • A Unit cast this Spell and have 25 Mana and his Max Mana is 100 then he lose 2 Mana-Points, but if he have 1 Mana the Hero can't cast the Spell because no Mana.

Pls Help me with this Problem i need a System for this in GUI (Normal Editor , not JASS :p)


I say Thx :spell_breaker:
 
Level 3
Joined
Feb 28, 2009
Messages
25
Hmm i understand but i have a problem if the Spell a TriggerSpell it dont interuppted when the Unit have not enough Mana to cast it =(.

And what is the Different of Triggering unit & Casting unit ?

The Spell is Based on Berserker . . . =(
 
Last edited:
Level 9
Joined
Nov 25, 2008
Messages
194
So you mean you have something like:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast gleich bla
  • Actions
    • Do some stuff.....
Then you simply do this:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast gleich bla
  • Actions
    • If all conditions are true then do (Then) actions else do (Else) actions
      • If - Conditions
        • Percentage Mana of Triggering Unit > (Percentage Manacost)
      • Then - Actions
        • Unit - Set Percentage Mana of Triggering Unit = Percentage Mana of Triggering Unit - (Percentage Manacost)
        • Do Some Stuff
      • Else - Actions
 
Level 3
Joined
Feb 28, 2009
Messages
25
  • Events
  • Unit - A unit complete the effect of an ability
  • Conditions
  • Ability being cast gleich "Heal"
  • Actions
  • Unit - Set Life of (Target unit of ability being cast) to ((Leben of (Target unit of ability being cast)) + ((Real((Intelligenz of (Triggering unit) (exlusiv bonuses)))) x 5.00)
  • Specialeffect - Create a special effect attached to the origin of (Target unit of abillity being cast) using Abilities\Spells\Human\Heal\HealTarget.mdl
  • Specialeffect - Destroy (Last created special effect)
This not funktion i dont know why ? :(
 
Level 9
Joined
Nov 25, 2008
Messages
194
Well in this case I'D use the normal thing I told you: an additional trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast gleich "Heal"
  • Actions
    • If all conditions are true then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Percentage Mana of (Triggering Unit) > (manacost)
      • Then - Actions
        • Unit - Set (percentage mana).....
      • Else - Actions
        • Unit - Order Triggering Unit to "Stop"
 
Status
Not open for further replies.
Top