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

[Trigger] Help please

Status
Not open for further replies.
Level 19
Joined
Aug 24, 2007
Messages
2,888
  • ReviveHeroForest
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Dying unit) is A Hero) Equal to True
          • ((Owner of (Dying unit)) is in ForestWarriors) Equal to True
    • Actions
      • Custom script: local unit udg_TempUnit = GetDyingUnit()
      • Custom script: local integer bj_forLoopAIndex
      • Custom script: local integer bj_forLoopAIndexEnd
      • Set Countdown[(Player number of (Owner of TempUnit))] = ((Hero level of TempUnit) x 3)
      • Player - Add (50 x (Integer((Real((Level of TempUnit)))))) to (Owner of (Killing unit)) Current gold
      • Player - Add -300 to (Owner of TempUnit) Current gold
      • Leaderboard - Create a leaderboard for (Player group((Owner of (Triggering unit)))) titled (<Empty String> + ((String(Countdown[(Player number of (Owner of TempUnit))])) + seconds))
      • Set Coundownboard[(Player number of (Owner of (Triggering unit)))] = (Last created leaderboard)
      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( + (killed + (Name of (Owner of (Dying unit))))))
      • Player - Add 1 to (Owner of (Killing unit)) Current lumber
      • For each (Integer A) from 1 to ((Hero level of TempUnit) x 3), do (Actions)
        • Loop - Actions
          • Set Countdown[(Player number of (Owner of TempUnit))] = (Countdown[(Player number of (Owner of TempUnit))] - 1)
          • Leaderboard - Change the title of (Last created leaderboard) to (Reviving in + ((String(Countdown[(Player number of (Owner of TempUnit))])) + seconds))
          • Wait 1.00 seconds
      • Leaderboard - Destroy Coundownboard[(Player number of (Owner of TempUnit))]
      • Camera - Pan camera for (Owner of TempUnit) to (Center of ReviveForest <gen>) over 0.00 seconds
      • Wait 1.00 seconds
      • Hero - Instantly revive TempUnit at (Center of ReviveForest <gen>), Show revival graphics
doesnt work
 
Level 3
Joined
Oct 23, 2007
Messages
36
Please elaborate on
1. What the trigger is supposed to do
2. What it is doing wrong

I won't wade through that code until I know what I'm looking for first.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
sorry The problem is everything fine but coundown starts from -1 and goes to -unlimited and hero doesnt get revived

anyway I used jass and fixed
Q: Why didnt u use jass at beggining
A: its my friends map and he doesnt want me to use jass so long as I can
 
Last edited:
Status
Not open for further replies.
Top