Potion Spell Help

JakeWC123

New Member
Reaction score
2
o.k. im making a ORPG andeach hero has a potion spell. but the potion spell doest heal how do i make it heal the caster. this is what i have

Code:
Events
    Unit - A unit Begins casting an ability
Conditions
    (Ability being cast) Equal to Health Potion 
Actions
    Unit - Set life of (Triggering unit) to (0.00 + 25.00)%
    Player - Add -50 to (Owner of (Triggering unit)) Current gold
 

PurgeandFire

zxcvmkgdfg
Reaction score
508
Code:
    Unit - Set life of (Triggering unit) to ((Life of (Triggering Unit)) + 25.00)%

Something like that...
 
D

D0MinIc

Guest
Trigger should be like this.

PHP:
Health Potion
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Health Potion
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Triggering unit)) Current gold) Greater than or equal to 50
            Then - Actions
                Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (0.25 x (Life of (Triggering unit))))
            Else - Actions
                Unit - Order (Triggering unit) to Stop
                Game - Display to (All players) for 5.00 seconds the text: Insufficient Funds!

This way the ability can't be used unless the player has 50 gold.

And
PHP:
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (0.25 x (Life of (Triggering unit))))

That will make the unit gain 25% of it's CURRENT hit points when it's used.

If you want it to gain 25% of it's total hit points put
PHP:
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (0.25 x (Life of (Triggering unit))))
 

JakeWC123

New Member
Reaction score
2
Yea i no This is mine
Events
Unit - A unit Begins casting an ability
Conditions
((Owner of (Casting unit)) Current gold) Greater than or equal to 50
(Ability being cast) Equal to Health Potion

Actions
Unit - Set life of (Triggering unit) to (0.00 + 25.00)%
Player - Add -50 to (Owner of (Triggering unit)) Current gold
 
D

D0MinIc

Guest
No but you see if the player has 0 gold, the trigger will still go and it will 'add -50 gold' to 0. So you could use it freely if you have less than fifty. You need to do what mine says with the if/then/else gold check.
 

Estel3

New Member
Reaction score
6
Does this condition not do what you speak of?

Code:
((Owner of (Casting unit)) Current gold) Greater than or equal to 50
 

JakeWC123

New Member
Reaction score
2
demonic your wrong the spell will only work if u have 50 gold or 50+ gold
((Owner of (Casting unit)) Current gold) Greater than or equal to 50
So if he doesnt hhave at least 50 gold he cant use spell. i already tested it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top