| 10-24-2004, 05:14 PM | #1 |
I have no idea why this is not working ... Stumped, been at it for an hour and now I am tired so I am gonna post this and go to bed... and see what replies are here in the mornin, and yah you will get karma/rep whatever VB calls it. @Part 1: When hero dies it sets a timer for when to resurrect the hero. @Part 2: When the timer reaches zero it resurrects the hero now this is what goes wrong... The hero does not resurrect. The camera pans to the point where the hero was moved to (I needed to move it for a reason) ... so I know the trigger is working, however simply put the god damn hero will not resurrect and it is driving me nuts... Part 1:: Events Unit - A unit Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Set HRO_TimeLeftToRes[(Player number of (Triggering player))] = (((Hero level of (Dying unit)) x 4) + 10) Wait 10.00 seconds Unit - Move (Dying unit) instantly to (Center of HRO_ReviveSpots[(Player number of (Owner of (Dying unit)))]) Part 2:: Events Time - Every 1.00 seconds of game time Conditions Actions For each (Integer A) from 1 to 12, do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions HRO_TimeLeftToRes[(Integer A)] Less than 0 Then - Actions Do nothing Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions HRO_TimeLeftToRes[(Integer A)] Equal to 0 Then - Actions Hero - Instantly revive Heros[(Integer A)] at (Center of (Playable map area)), Hide revival graphics Camera - Pan camera for (Player((Integer A))) to (Position of Heros[(Integer A)]) over 0.00 seconds Set MLB_Res[(Integer A)] = Alive Set HRO_TimeLeftToRes[(Integer A)] = (HRO_TimeLeftToRes[(Integer A)] - 1) Else - Actions Set MLB_Res[(Integer A)] = (String(HRO_TimeLeftToRes[(Integer A)])) Set HRO_TimeLeftToRes[(Integer A)] = (HRO_TimeLeftToRes[(Integer A)] - 1) |
| 10-24-2004, 05:57 PM | #2 |
Set HRO_TimeLeftToRes[(Player number of (Triggering player))] = (((Hero level of (Dying unit)) x 4) + 10 Set HRO_TimeLeftToRes[(Player number of (Owner Of Dying Unit))] = (((Hero level of (Dying unit)) x 4) + 10 |
| 10-24-2004, 06:02 PM | #3 |
Thats the same thing ... For the record just tried this and it didnt work: Hero Dies Events Unit - A unit Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Hide revival graphics I have no idea what I have done, this should work ... Just tried that code on a test map and it worked ... what the hell is stuffing it up in this map... ARGR! |
| 10-24-2004, 06:06 PM | #4 |
you always want to use the most specific event response. in that 1 use Dying unit instead of triggering unit. it is different. i think sometimes you can slide by with triggering unit, but that is used for other things. and triggering player is used for things like the player entering a chat message. |
| 10-24-2004, 06:13 PM | #5 | |
Quote:
hmm, that looked really complicated. But it doesn't have to be like that, does it? Alternate way of doing it: Trigger 1 - The Countdown Timer Events Unit - A unit Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Countdown Timer - Start CountdownTimer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (15.00 + ((Real((Level of (Dying unit)))) x 5.00)) seconds Countdown Timer - Create a timer window for CountdownTimer[(Player number of (Owner of (Dying unit)))] with title ((Proper name of (Dying unit)) + revived in) Countdown Timer - Show CountdownTimerWindow[(Player number of (Owner of (Dying unit)))] for (Owner of (Dying unit)) Trigger 2 - Revive Events Time - CountdownTimer[1] expires Conditions Actions Hero - Instantly revive Hero[1] at (Center of (Playable map area)), Hide revival graphics and then for the other players. You also have to set all heros to the Variable "Hero" player 1's hero to "Hero[1]" player 2's hero to "Hero[2]" etc. Another way of doing this is like this: Trigger 1(and only) - Revive Events Unit - A unit Dies Conditions And - All (Conditions) are true Conditions ((Dying unit) is A Hero) Equal to True ((Owner of (Dying unit)) controller) Equal to User Actions Countdown Timer - Start Respawn_Hero_Timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (20.00 + ((Real((Level of (Dying unit)))) x 5.00)) seconds Set Respawn_Hero_Timer[(Player number of (Owner of (Dying unit)))] = (Last started timer) Countdown Timer - Create a timer window for Respawn_Hero_Timer[(Player number of (Owner of (Dying unit)))] with title ((Name of (Dying unit)) + will be revived in...) Set Respawn_Hero_Timer_Window[(Player number of (Owner of (Dying unit)))] = (Last created timer window) Wait (20.00 + ((Real((Level of (Dying unit)))) x 5.00)) seconds Hero - Instantly revive (Dying unit) at ((Owner of (Dying unit)) start location), Show revival graphics Hero - Set (Dying unit) Hero-level to ((Hero level of (Dying unit)) - 1), Hide level-up graphics Camera - Pan camera for (Owner of (Dying unit)) to (Position of Hero[(Player number of (Owner of (Dying unit)))]) over 0.00 seconds Countdown Timer - Hide Respawn_Hero_Timer_Window[(Player number of (Owner of (Dying unit)))] Countdown Timer - Destroy Respawn_Hero_Timer_Window[(Player number of (Owner of (Dying unit)))] Edit: Damn, i kewn some1 was going to be faster than me :p |
| 10-24-2004, 06:23 PM | #6 |
Argr this is just gettin wierd, it works on some heros but not all of them ... wtf ... This map is way too advanced to let a little thing like this fuck it up =\ EDIT> @ oNdizZ : Yah it does have to be that complicated ... It is updating a multiboard with an integer, like in Dota Allstars where you can see it go 43-42-41 etc etc then NO or in this case Alive. But as far as my scripting goes this is not really that complicated ... ;) |
| 10-24-2004, 06:28 PM | #7 |
theres prolly some interference somewhere else then. |
| 10-24-2004, 06:35 PM | #8 |
FIXED IT! God damn I knew it wasn't my scripting that could be causing the problem, after all it is not that I am always right it is rarely I am wrong. Me do bad scriptin, yah that will be the day. The problem was is I had too many heros owned by Player 1. See what happened was I had a copy of every hero on the map in player 1s team so I could see all the graphics to use for hero making. As soon as I swapped them to neutral passive (they will be deleted before the map is released anyways) it worked. Apparently warcraft does have a hero cap on it. Must be around 10-20 heros per team or something like that otherwise you cant resurrect them. So simple, now I can go to bed! You both get Rep, enjoy ;) |
