| 02-05-2004, 02:05 PM | #1 |
I'm making a aeon map, and i don't now how to revive hero when they die. In other words: When a hero die, how do you make a timer, and when the timer expired the hero revive at a point. Plz |
| 02-05-2004, 03:06 PM | #2 |
Event : Unit dies Condition : Unit is a hero Actions: Wait for (seconds) seconds.. Hero - Revivs instantly (showing/hiding(revival graphics) |
| 02-05-2004, 04:20 PM | #3 |
Yes i know. But i mean whit a Timer and all this.... |
| 02-05-2004, 04:28 PM | #4 |
To make timer: Code:
Events: A unit dies. (generic unit event) Conditions: Dying unit is a hero equal to true (boolean comparision) Actions: Countdown timer - Create a countdown timer. Set ReviveTimer[player number of owner of dying unit] to last created countdown timer. (ReviveTimer = array) Countdown - Create timer window for ReviveTimer[Owner of dying unit] Set ReviveWindow[...] to last created etc... And when timer expires then make a hero revive at center of a region |
| 02-05-2004, 04:39 PM | #5 | |
Quote:
I can folow you to: [code] Events: A unit dies. (generic unit event) Conditions: Dying unit is a hero equal to true (boolean comparision) Actions: Countdown timer - Create a countdown timer. ------------------ But what do you mean whit the rest?? Set ReviveTimer[player number of owner of dying unit] to last created countdown timer. (ReviveTimer = array) Countdown - Create timer window for ReviveTimer[Owner of dying unit] Set ReviveWindow[...] to last created etc... |
| 02-05-2004, 05:01 PM | #6 |
Basically, he set the timer to an array, whose index equals to owner of dying unit's slot number. So, this means that if a unit owned by player 4 dies, it will set ReviveTimer[4] as the timer. It will then create a timer window for that same timer. Hope that makes sense. :P |
| 02-05-2004, 05:44 PM | #7 |
I understand, but i don't know where to set or make the ''Array''!!! emote_sweat Do it have somthing to do whit Variables???? |
| 02-05-2004, 07:01 PM | #8 |
I mean: Event´: 1 trigger Condition: 1 trigger Action: is it 1 or 2 trigger??? And do you need variables??? |
| 02-06-2004, 05:58 AM | #9 |
Hallo |
| 02-06-2004, 12:18 PM | #10 |
hi. :ggani: You want a countdown timer to revive your hero? easy enough, but you probably DO want to use a variable (play scary music). Ok in my greatness i will explain. :ggani: 1. Go to trigger Editor. 2. Type in ctrl+B. 3.Click on new variable. 4. Under variable name, type in timer (or whatever you want; it doesnt matter) 5. Under variable type, select timer. 6. Press OK. -now we have a timer, just waiting to be used. -now here is the code for the timer itself. 7. Enter in the following code: Start timer as a one shot timer that will expire in (the amount of time you want before your hero revives) seconds. Create a Timer Window for timer with title (type in a title) -then you can cheat like i do: Wait for (the same amount of time as before in the one shot timer thing) 8. Do your revive code. NOTE: The other guy was trying to get you to use an array, which would be like alot of timers all grouped together. When you get this variable thing down, you should try it. (because my version only works for one player) If your confused, ask! |
| 02-06-2004, 05:33 PM | #11 |
I don't want to use variables unless i have to!! |
| 02-07-2004, 10:48 AM | #12 |
No, but thanks, i want to use there method, i just don't understand all that they say. How Manny trigger's shall i use?? Event: 1 Condition: 1 Action: ??? Plz help mee!!! |
| 02-07-2004, 11:18 AM | #13 | |
Quote:
you can't be serious, right ?:) you would use 2 triggers with array timers, or 20 without arrays.... and should i say that all 20 triggers would be EXACTLY the same, except trigger #1 will have "RedTimer" timer-variable, and trigger #2 would then have "BlueTimer" variable... u make an array, just make the normal variable, check the "Array" box, enter the maximum size (in this case 12) and there it goes... |
| 02-07-2004, 11:51 AM | #14 |
´Now i understand, but how do i make so the hero revive after the time has expired and so the time box disappear after that. |
| 02-07-2004, 02:29 PM | #15 |
here thats how it works perfectly!, you just need 2 arrays, 1 Timer Array and 1 timer window array Code:
E: Unit - A unit dies C: ((Triggering unit) is Ein Held) Gleich True ((Owner of (Dying unit)) is in team1) Gleich True A: Countdown-Timer - Start revivetime[(Player number of (Owner of (Dying unit)))] as a Einmalig timer that will expire in ((Real((Hero level of (Dying unit)))) x 4.00) seconds Set revivetime[(Player number of (Owner of (Dying unit)))] = (Last started timer) Countdown-Timer - Create a timer window for revivetime[(Player number of (Owner of (Dying unit)))] with title (Name of (Dying unit)) Set revivetimewindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window) Kamera - Pan camera for (Owner of (Dying unit)) to (Position of (Triggering unit)) over 0.00 seconds Spiel - Display to (Player group((Owner of (Dying unit)))) the text: (YOU DIED! YOU REVIVE IN + ((String(((Hero level of (Dying unit)) x 4))) + SECONDS)) Wait ((Real((Hero level of (Dying unit)))) x 4.00) seconds Countdown-Timer - Destroy revivetimewindow[(Player number of (Owner of (Dying unit)))] Held - Instantly revive (Dying unit) at (Center of revivepoint <gen>), Zeigen revival graphics Kamera - Pan camera for (Owner of (Dying unit)) to (Center of herohumanpoint <gen>) over 0.00 seconds have fun :p |
