Disabling/Enabling Heart of Tarrasque

JsK

New Member
Reaction score
0
Can anyone help me with this? I've got the regeneration part done but I need help on disabling and enabling it.
 

millz-

New Member
Reaction score
25
I don't know if there's an action to replace item carried by a hero, but I think there is. So the trigger would look like this.

Trigger:
  • Events
    • A unit is attacked
    • Conditions
      • Owner of Attacking Unit is not neutral
      • Owner of Attacking Unit is not sentinel/scourge (the computer controllers)
      • Attacked Unit has item Heart
    • Actions
      • if-then-else
        • if
          • HeartDisabledTime[Player Number of Owner of Attacked Unit] Less Than or Equal to 0
        • then
          • Replace Heart item with Disabled Heart item
        • else
      • Set HeartDisabledTime[Player Number of Owner of Attacked Unit] = 8

Trigger:
  • Events
    • Every 1 second of game time
    • Conditions
    • Actions
      • For loop Integer A 1 to MaxPlayersInYourGame
        • Loop-actions
          • Set HeartDisabledTime[Integer A] = HeartDisabledTime[Integer A] - 1
          • if-then-else
            • if
              • HeartDisabledTime[Integer A] Equal to 0
              • Hero[Integer A] has item Disabled Heart
            • then
              • Replace Disabled Heart item for Hero[Integer A] with Heart
            • Else

Firstly, it would be best if you have a Unit array, e.g. Hero that stores every player's Hero (I am assuming in your map you can only control a Hero at a time). Then an Integer array, e.g. HeartDisabledTime to serve as a "timer". When a hero is attacked by a player controlled unit, the Heart will get replaced by the disabled version and have timer set to 8. In the second trigger, the "timer" will reduce by 1 every second of game time. If any of the timer reaches 0 and the corresponding hero has the disabled heart, it will be replaced with the normal heart.

And it was obviously freehanded, I don't have WE with me. I hope this actually helps you a little.
 

avalya

New Member
Reaction score
37
Use a damage detection system with a 12-player array (real, that is the timer to enable it again) whenever a unit takes damage and has the Heart, remove the Heart and replace it with the Disabled one and set the timer to 8 (Set Heart_Timer = 8.00) and make another trigger that runs periodically every 0.05 seconds that reduces the timer by 0.05 (Set Heart_Timer = Heart_Timer - 0.05).

Remember to check that the attacker is a Hero (or Roshan/Your Boss if you want 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