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

Problems with Passive Abilities

Status
Not open for further replies.
Level 25
Joined
Sep 26, 2009
Messages
2,378
Hello Hive.
I am currently having difficulties with 2 passive abilities. The abilities have nothing to do together.

The 1st passive ability has same concept as Reincarnation - in other words it's a passive ability, that when Hero dies, it resurrects him and then the passive starts counting down it's cooldown timer.
This is what I want, but what I don't know how to do - to somehow force the passive ability to start counting down it's cooldown.
I guess it might work with 2 active abilities where one is based on "Channel" spell with same spell ID as the second spell, but I can't make it work for passive ones :sad:
I am not sure if it matters or not, but I based the spell on Evasion. I can't base the spell on Reincarnation however, because the trigger would collide with the Reincarnation.


The 2nd passive ability is based on "Critical Strike" with a bonus effect. Basically what I want the spell to do is when the Critical Strike procs and the Hero deals X times more damage, I want a dummy unit to cast on the Hero the "Bloodlust" spell.
I don't know, however, how to check in triggers when the passive ability procs. :cry:


Could someone help me here please? :cute:
 
Level 9
Joined
Jun 25, 2009
Messages
427
You need Orb of Lightning (New) and the Reincarnation ability itself, in order to make passives' cooldown show up. Here is a test map:
View attachment 83017

For the critical strike part, you need a custom Critical Strike, which means that you need a Damage Detection System.

I think you could do the %s by triggers.
  • Critical Strike
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Critical Strike for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 10) Less than or equal to (Level of Critical Strike for (Attacking unit))
    • Actions
      • Set Critical_Striker = (Attacking unit)
      • Set Critical_Striked = (Triggering unit)
      • Trigger - Add to Critical Damaged <gen> the event (Unit - Critical_Striked Takes damage)
  • Critical Damaged
    • Events
    • Conditions
      • (Damage source) Equal to Critical_Striker
    • Actions
      • Set Critical_Striked_Pos = (Position of Critical_Striked)
      • Set Critical_Damage = ((Integer((Damage taken))) x 2)
      • Unit - Cause (Damage source) to damage (Triggering unit), dealing (Real(Critical_Damage)) damage of attack type Hero and damage type Normal
      • Floating Text - Create floating text that reads (String(Critical_Damage)) at Critical_Striked_Pos with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the color of (Last created floating text) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Unit - Create 1 Footman for (Owner of (Attacking unit)) at Critical_Striked_Pos facing Default building facing degrees
      • Unit - Add Bloodlust to (Last created unit)
      • Unit - Set level of Bloodlust for (Last created unit) to (Level of Critical Strike for (Damage source))
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Damage source)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set Critical_Striked = No unit
      • Set Critical_Striker = No unit
      • Custom script: call RemoveLocation(udg_Critical_Striked_Pos)
Please tell me if this could work :) (Cause it's my 1st Damage detection system for one spell :D)

Tiche3:grin:
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
You need Orb of Lightning (New) and the Reincarnation ability itself, in order to make passives' cooldown show up. Here is a test map:
Thanks for the reply. But does this really help?
I tried your map, however the Orb of Lightning ability, when "Data - Effect Ability" is set to Reincarnation, does the exact same thing as Reincarnation.

I'll write in steps what the ability I am working on is doing:
1) The Hero dies
2) Hero gets immediately revived and hidden through trigger
3) A Dummy unit with locust ability and same model as the Hero appears on Hero's position and plays the "death" animation.
4) Through triggers the dummy has set a 2 second "generic" expiration timer.
5) After 2 seconds the dummy disappears in smoke and "skull_pile" is left on it's place
6) Through trigger I pick up random (even dead) unit in XX radius where the Hero will appear. If no unit is nearby, Hero will appear where the dummy unit was.
7) Hero appears with 50% Hp and full mana.

The 6. point has a little problem (when no unit is nearby, the Hero won't appear, but I think I found a way how to set it correctly).

I could set it somehow with Reincarnation, however Events "Unit dies", "Unit begins/finishes casting an ability" or "Unit starts the effect of ability" does not respond to Reincarnation, which is the main cause why I can't use Reincarnation.

I could provide the map with it if necessary.
 
Level 9
Joined
Jun 25, 2009
Messages
427
^this would make th eunit suffer a crit from every hit after a crit procs.
you need to add the condititons from the first to the second trigger.
(cause there isnt a problem if a unit is registered, but you need to chek everytime the unit takes damage)

I think it wouldn't, because i set stuff to no unit and other to no unit, how can i damage NO UNIT? :) I think it clears up the stuff. Oh wait ill check it in my map.

EDIT: Found the never stopping action in the trigger. Changed the trigger, also i don't how to check if the damage source isn't from a spell.
  • Critical Damaged
    • Events
    • Conditions
      • (Damage source) Equal to Critical_Striker
    • Actions
      • Set Critical_Striked_Pos = (Position of Critical_Striker)
      • Set Critical_Damage = ((Damage taken) x 2.00)
      • Unit - Create 1 Footman for (Owner of Critical_Striker) at Critical_Striked_Pos facing Default building facing degrees
      • Unit - Cause (Last created unit) to damage (Triggering unit), dealing Critical_Damage damage of attack type Hero and damage type Normal
      • Floating Text - Create floating text that reads (String(Critical_Damage)) at Critical_Striked_Pos with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the color of (Last created floating text) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 50.00 towards 90.00 degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.75 seconds
      • Unit - Add Bloodlust to (Last created unit)
      • Unit - Set level of Bloodlust for (Last created unit) to (Level of Critical Strike for (Damage source))
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Damage source)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set Critical_Striked = No unit
      • Set Critical_Striker = No unit
      • Custom script: call RemoveLocation(udg_Critical_Striked_Pos)
 
Last edited:
Level 19
Joined
Feb 25, 2009
Messages
2,004
I think you could do the %s by triggers.
  • Critical Strike
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Critical Strike for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 10) Less than or equal to (Level of Critical Strike for (Attacking unit))
    • Actions
      • Set Critical_Striker = (Attacking unit)
      • Set Critical_Striked = (Triggering unit)
      • Trigger - Add to Critical Damaged <gen> the event (Unit - Critical_Striked Takes damage)
  • Critical Damaged
    • Events
    • Conditions
      • (Damage source) Equal to Critical_Striker
    • Actions
      • Set Critical_Striked_Pos = (Position of Critical_Striked)
      • Set Critical_Damage = ((Integer((Damage taken))) x 2)
      • Unit - Cause (Damage source) to damage (Triggering unit), dealing (Real(Critical_Damage)) damage of attack type Hero and damage type Normal
      • Floating Text - Create floating text that reads (String(Critical_Damage)) at Critical_Striked_Pos with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the color of (Last created floating text) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Unit - Create 1 Footman for (Owner of (Attacking unit)) at Critical_Striked_Pos facing Default building facing degrees
      • Unit - Add Bloodlust to (Last created unit)
      • Unit - Set level of Bloodlust for (Last created unit) to (Level of Critical Strike for (Damage source))
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Damage source)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set Critical_Striked = No unit
      • Set Critical_Striker = No unit
      • Custom script: call RemoveLocation(udg_Critical_Striked_Pos)
Please tell me if this could work :) (Cause it's my 1st Damage detection system for one spell :D)

Tiche3:grin:

You do realize that the first trigger registers an event each time a unit is ordered to attack, which will, sooner or later turn into a helpless situation with ALOT of lag?

Also, damage-taken shouldn't be converted to a integer since the damage is a REAL (ex: 10.000) and not just 10.

And, I don't see a reason to clear 2 globals since they are overriten every time the first trigger is executed.
 
Level 9
Joined
Jun 25, 2009
Messages
427
You do realize that the first trigger registers an event each time a unit is ordered to attack, which will, sooner or later turn into a helpless situation with ALOT of lag?

Also, damage-taken shouldn't be converted to a integer since the damage is a REAL (ex: 10.000) and not just 10.

And, I don't see a reason to clear 2 globals since they are overriten every time the first trigger is executed.

I just updated, please check it now.

EDIT: I was updating and didn't see the converted. W/e i just fixed it now.

And yeah, for those two variables, i set them to no unit BECAUSE it would be 100% critical if i wouldn't.

EDIT 2: After a bit of thinking i figured what you just said. It would cause a lot of lag and overwrite itself by the 1st trigger still running during the 2nd. updated.

  • Critical Strike
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Critical Strike for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 10) Less than or equal to (Level of Critical Strike for (Attacking unit))
    • Actions
      • Set Critical_Striker = (Attacking unit)
      • Set Critical_Striked = (Triggering unit)
      • Trigger - Add to Critical Damaged <gen> the event (Unit - Critical_Striked Takes damage)
      • Trigger - Turn off (This trigger)
  • Critical Damaged
    • Events
    • Conditions
      • (Damage source) Equal to Critical_Striker
    • Actions
      • Set Critical_Striked_Pos = (Position of Critical_Striker)
      • Set Critical_Damage = ((Integer((Damage taken))) x 2)
      • Unit - Create 1 Footman for (Owner of Critical_Striker) at Critical_Striked_Pos facing Default building facing degrees
      • Unit - Cause (Last created unit) to damage (Triggering unit), dealing (Real(Critical_Damage)) damage of attack type Hero and damage type Normal
      • Floating Text - Create floating text that reads (String(Critical_Damage)) at Critical_Striked_Pos with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the color of (Last created floating text) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 50.00 towards 90.00 degrees
      • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.75 seconds
      • Unit - Add Bloodlust to (Last created unit)
      • Unit - Set level of Bloodlust for (Last created unit) to (Level of Critical Strike for (Damage source))
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Damage source)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set Critical_Striked = No unit
      • Set Critical_Striker = No unit
      • Custom script: call RemoveLocation(udg_Critical_Striked_Pos)
      • Trigger - Turn on Critical Strike <gen>
AND STILL I HAVE A QUESTION: Is it possible to check (Conditions) the damage source type? Magic, spells, etc? If you know how please tell me i can't find anything.

EDIT 3: Already found that you were wrong, if i set the var to real, it shows like 170.121 or something. Converted it back to integer

AND GUYS, if you don't believe me that it works. I can attach my test map here and you could check it.
 
Last edited:
Level 19
Joined
Feb 25, 2009
Messages
2,004
You clearly misunderstood my point for the events...

When your first trigger executes, it creates a new event (every time) which in some point will never end, until the unit has the ability deleted or disabled (somehow).

At this point, you'll have like, lets say 1,000 events, which will cause lag after some point, as well as causing the trigger to malfuction since there will no more space for adding more and more events.

As for the part of the damage, you first convert it to a integer, then back to a real, which is still wrong. I never said it MUST be an real when you need to show it via the text tag. All you had to do is convert it after the unit is damage, so there will be no strange numbers.

And again, both triggers are horribly mixing with each other.
 
Level 9
Joined
Jun 25, 2009
Messages
427
You clearly misunderstood my point for the events...

When your first trigger executes, it creates a new event (every time) which in some point will never end, until the unit has the ability deleted or disabled (somehow).

At this point, you'll have like, lets say 1,000 events, which will cause lag after some point, as well as causing the trigger to malfuction since there will no more space for adding more and more events.

As for the part of the damage, you first convert it to a integer, then back to a real, which is still wrong. I never said it MUST be an real when you need to show it via the text tag. All you had to do is convert it after the unit is damage, so there will be no strange numbers.

And again, both triggers are horribly mixing with each other.

So how could i destroy the events? >.>
 
Level 14
Joined
Nov 18, 2007
Messages
816
You dont need to write a custom critical strike for your second passive. Just use an ability based off of Critical Stike, set it up, give it a buff and give it a duration of 0.01. Then use a Damage Detection System and see whether the selected buff has been placed.

So how could i destroy the events? >.>
Destroy the trigger theyre registered for. Thats the one way. But even that way is discouraged to use because you might screw up your map horribly.
 
Level 9
Joined
Jun 25, 2009
Messages
427
You dont need to write a custom critical strike for your second passive. Just use an ability based off of Critical Stike, set it up, give it a buff and give it a duration of 0.01. Then use a Damage Detection System and see whether the selected buff has been placed.

Destroy the trigger theyre registered for. Thats the one way. But even that way is discouraged to use because you might screw up your map horribly.

And to your answer, critical strike doesn't give a buff when it procs. :)
 
Level 9
Joined
Jun 25, 2009
Messages
427
Yes, it does. Just try it. I can even make a Critical Strike stun units for some duration.

Edit: It seems like adding a duration to Critical Strike stuns the target for the specified duration.

Are you sure? It is like hmm the best ability ever then? :D

AND YEAH if this works, then just do what that guy said: Add if one guy has a buff then do it :)
 
Status
Not open for further replies.
Top