| 05-04-2004, 06:19 PM | #1 |
A trigger that counts if the score[array] of a player reaches 5, it the current hero will be replaced with an other hero. but only once. A trigger when a hero dies, a timer window with countdown of 30 seconds will be made, and after the timer expires, revive the hero at the player start location and remove the timer window. I have actually no clue how these could be done... :\ If you want to help, i would be gracefull. :> |
| 05-05-2004, 02:47 AM | #2 |
It seems no one has tried to answer your questions... I will, however, do my best to answer them. (It's late though, so I'm not sure if I'm thinking straight or not... I guess we'll see) For the first question, I'll give you a trigger that will both set the score and do the 'if Hero score is 5, change units' part. Variables Needed: - <Leaderboard>: This is your variable that represents your leaderboard. - <Integer>: An integer array - <HeroPlayer>: A unit array, this represents the varaible used for each player's Hero - <NewHero>: The unit tyoe of the Hero you wish to replace the old one with - <Timer>: Timer array - <TimerWindow>: Timer Window array Code:
Trigger 001
Events
Unit - A unit Dies
Conditions
Actions
Leaderboard - Change the value for (Owner of (Killing unit)) in <Leaderboard> to (Integer2[(Player number of (Owner of (Killing unit)))] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
<Integer>[(Player number of (Owner of (Killing unit)))] Equal to 5
Then - Actions
Unit - Replace <HeroPlayer>[(Player number of (Owner of (Killing unit)))] with a <NewHero> The old unit's relative life and mana
Else - ActionsNote: Because of the way this is set up, you only need this one trigger to do the score and the Hero changing; not one for each player. If you need any additional help with the material enclosed within this post, you need only inform me and I shall endeavor to fulfill your requests to the fullest. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- As for the reviving of the Hero, try this trigger: Code:
Trigger 002
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Countdown Timer - Start Timer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 30.00 seconds
Set TimerWindow[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)
Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))
Wait 30.00 seconds
Hero - Instantly revive HeroPlayer[(Player number of (Owner of (Triggering unit)))] at ((Owner of (Triggering unit)) start location), Show revival graphics
Countdown Timer - Hide TimerWindow[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))I hope this has assisted you! |
