Need Help on ability

MaaxeEvid

New Member
Reaction score
8
Hi, i need help in one ability:

Type:Instant
Target: Self
Mana Cost: 160 / 150/ 140
Effect: Gives a powerfull defense

Description: When you hit points goes below 30%, you can activate this skill and gets aditional defense.

Level 1: Gets 60% of defense
Level 2: Gets 65% of defense
Level 3: Gets 70% of defense

1st
how i make the ability only trigger when the HP of the caster is below 30%?

2nd
how i make, if he try to casts above 30%, the spell doesnt have a cooldown?

3rd
how i make if he try to cast above 30% hp, show a message, "Your hp is not below 30%"
Thx for helps:p
 

13lade619

is now a game developer :)
Reaction score
398
Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Percentage life of (Triggering unit)) Less than or equal to 30.00
            Then - Actions
                <Your actions>
            Else - Actions
                Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: Your hp is not below 30%

this answers numbers 1 and 3. just add the appropriate events and conditions.
i dont know number 2.

-
thehelperTripleAnimatedUB.gif
 

PurgeandFire

zxcvmkgdfg
Reaction score
508
Well, the only solution I could find is to either disable the ability, or do this:
- Create an exact replication of the spell you made through copy'n'paste. Set all level cooldowns for the replication as something like 9999999999999... Hold "Shift" then double click the field. This won't make it have a no cooldown, but it will make the person wait like 10 hours before the spell is able to cast. :D

- Then, do this:
Code:
TT
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability Being Cast) Equal to Defence Ability
    Actions
        Set Abil_Level = Level of Defence Ability for (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Percentage life of (Triggering unit)) Less than or equal to 30.00
            Then - Actions
                <Your actions>
            Else - Actions
                Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: Your hp is not below 30%
                Unit - Add (Defence Replication Ability) to (Triggering Unit)
                Unit - Set Level of (Defence Replication Ability) for (Triggering Unit) to Abil_Level
                Unit - Remove (Defence Ability) from (Triggering Unit)
That should work. ;)
 

waaaks!

Zinctified
Reaction score
256
try giving him a dummy ability when his hitpoints are above 30%, the dummy ability has no cooldown and mana cost, and when he drops his life to 30% below give him the main ability that gives him defense, the main ability has cooldown and has mana cost
 

DuckieKing

Elitist Through and Through
Reaction score
51
Set all level cooldowns for the replication as something like 9999999999999... Hold "Shift" then double click the field. This won't make it have a no cooldown, but it will make the person wait like 10 hours before the spell is able to cast. :D
As far as I know max cooldown is 300 seconds, even if you set the field higher. ^_^;

try giving him a dummy ability when his hitpoints are above 30%, the dummy ability has no cooldown and mana cost, and when he drops his life to 30% below give him the main ability that gives him defense, the main ability has cooldown and has mana cost
But then if his hp goes above 30% then back below, the cooldown will be refreshed.


Blade's answer's great; for #2 if he uses the spell above 30% remove and readd the spell. You need to set a temporary integer to store the spell's level so it's not level 1 when added again. I don't know GUI wording... all I could do is JASS. ^_^;
 

denmax

You can change this now in User CP.
Reaction score
155
Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Percentage life of (Triggering unit)) Less than or equal to 30.00
            Then - Actions
                <Your actions>
            Else - Actions
                Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: Your hp is not below 30%
                [B]Unit - Reset ability cooldowns for (Triggering Unit)[/B]

XD hahahxx.. Im not sure if you fixed it yet.. and I haven't seen anyone post anything about the Bolded Action
 

DuckieKing

Elitist Through and Through
Reaction score
51
XD hahahxx.. Im not sure if you fixed it yet.. and I haven't seen anyone post anything about the Bolded Action
That resets ALL ability cooldowns. You can't pick a single ability to be refreshed.
Needless to say (I don't care! I'm saying it anyway!) this would pose problems if the author didn't want a player to be able to refresh all of his abilities if his HP is just over 30% (and he hasn't used this ability for its cooldown).
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
IT is a simple one, no need for all those big triggers.

Every unit needs some time to cast the spell like 0.5 secs or so

Use condition to determin if ur caster has more than 30% hp and if he has simply order him to stop, spell wont be cast, cooldown wont be triggered
 

DuckieKing

Elitist Through and Through
Reaction score
51
That's if you trigger it on spell cast, in which case they can use it and hit S themselves, and the cooldown won't start and mana won't be taken.
It does seem like a good idea to make it passive, though. All in your discretion, which problem you want to have.
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
The way i said it worked fine for me, I use it whenever i want to prevent spell cast in my maps, never failed me
 

DuckieKing

Elitist Through and Through
Reaction score
51
It seems like this spell needs to be triggered, although I still don't know what it does, but I guess you could have another trigger just to stop the cast. That seems like a quick easy solution. :D
 
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