• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] give and remove an ability

Status
Not open for further replies.
Level 4
Joined
Dec 10, 2008
Messages
59
Hi there.

I'm having some problems currently, here's the basic picture:

A unit turns on an ability (in this case, a self-immolation) that deals damage to the caster over time, while he has that ability on, he has a small percentage to OHKO his target..

Now the problem:

I also added a stat increment ability (which is another skill, so meaning, he turns the self-immo ability on, then he gets the stat increment skill) to that unit while he has that self-immo ability turned on. The problem is, however, each time i TURN OFF the self-immo ability, the stat increment ability remains on that unit, and it stays there permanently after that D=

I'm quite a n00b at triggers, so i don't really know how to make the stat increasing ability go away. Anyone mind helping?
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Make new buff (eg. Stat Increase) and add it to self-immolation. Then, in trigger check your hero for buff Stat Increase (boolean comparison). Boolean comparison is located in conditions.

  • ((Triggering unit) has buff Stat Increase) Equal to True
Now if the unit has buff, make him increase his stats, else, stop increasement.

What is OHKO?
 
Level 4
Joined
Dec 10, 2008
Messages
59
Make new buff (eg. Stat Increase) and add it to self-immolation. Then, in trigger check your hero for buff Stat Increase (boolean comparison). Boolean comparison is located in conditions.

  • ((Triggering unit) has buff Stat Increase) Equal to True
What is OHKO?

One-hit K.O.

hmm..

i did store the stat increase into a variable. but it still didn't work (yes, used boolean too)

Ugh....i don't know how to use the trigger tag, maybe if you explain to me how to use it, i can show you what i did D=

Edit: I fixed it....>___> all i needed was a simple wait till condition...

+rep for the help anyways
 
Level 7
Joined
Jul 12, 2008
Messages
295
Here i have the exact trigger that u are looking for... First make a spellbook with minimum/maximum spells set to 1. Add your stat Increase to the spellbook and do this trigger:

Code:
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
                (Issued order) Equal to (Order(Immolation))
            Then - Actions
                Set SI_Unit = (Ordered unit)
                Unit - Add Spellbook to SI_Unit
                Unit - Set level of Spellbook for SI_Unit to (Level of Immolation for SI_Unit)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Issued order) Equal to (Order(Unimmolation)))
                    Then - Actions
                        Unit - Remove Spellbook from SI_Unit
                    Else - Actions
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
OHKO :) trigger here:
Just modifiy the chance for K.O.
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff OneHitKO) Equal to True
      • (Random integer number between 1 and 20) Equal to 1
    • Actions
      • Set TempPoint = (Position of (Attacked unit))
      • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit - Cause (Last created unit) to damage (Attacked unit), dealing 1000000000.00 damage of attack type Chaos and damage type Unknown
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
For stats increment better do this:
StatLoopTrigger - Trigger which increases your stats overtime.
  • 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
          • (Issued order) Equal to (Order(Immolation))
        • Then - Actions
          • Trigger - Turn On (StatLoopTrigger)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Issued order) Equal to (Order(Unimmolation)))
            • Then - Actions
              • Trigger - Turn Off (StatLoopTrigger)
            • Else - Actions
 
Level 11
Joined
Apr 6, 2008
Messages
760
use
  • instead of [CODE] plz, it makes my eyes hurt
  • [TRIGGER]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
          • (Issued order) Equal to (Order(Immolation))
        • Then - Actions
          • Set SI_Unit = (Ordered unit)
          • Unit - Add Spellbook to SI_Unit
          • Unit - Set level of Spellbook for SI_Unit to (Level of Immolation for SI_Unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Issued order) Equal to (Order(Unimmolation)))
            • Then - Actions
              • Unit - Remove Spellbook from SI_Unit
            • Else - Actions
 
Level 7
Joined
Jul 12, 2008
Messages
295
Oh come on guys, i made my trigger first +rep for me :D. My trigger is guarenteed it is just the same as Electric Rave just with other ability
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Igor_Z ur Commenting on the posts are only for + rep To u making people think that ur telling what's right and what's not u shouldn't have any +REP U JUST MAKE URSELF SEEM SMART IN GUI to get them to believe u but ur not and they +REP U :s
 
Status
Not open for further replies.
Top