| 06-01-2004, 10:41 PM | #1 |
Well this is about duel option in my map. ok its pretty cool its like this: player types message -duel and select a player from dialog list,the player should get the invation and can say accept or deny if he accept they to go arena and if they die hmm just see the triggers,send me PM if u want the map to help me fix this. The problem is this doesnt work for some reason,or well one time it worked but why not always? I tryed it with my freinds. This happen when duel is accepted Code:
Duel Accept
Events
Dialog - A dialog button is clicked for DuelDialogInvited
Conditions
(Clicked dialog button) Equal to DuelDialogButtonAccept
Actions
Trigger - Turn off Duel Invitation <gen>
Game - Display to (All players) the text: ((Name of (Triggering player)) + has accepted the duel invitation)
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Set DuellingHero2 = (Picked unit))
Wait 2.00 seconds
Game - Display to (All players) the text: Feel free to watch ...
Cinematic - Ping minimap for (All players) at (Center of Duel Arena <gen>) for 5.00 seconds
Player Group - Pick every player in (All players) and do (Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Duel Arena <gen>)
Wait 3.00 seconds
Unit - Move DuellingHero1 instantly to (Center of Duel Postion1 <gen>), facing (Center of Duel Arena <gen>)
Unit - Move DuellingHero2 instantly to (Center of Duel Postion2 <gen>), facing (Center of Duel Arena <gen>)
Unit - Set life of DuellingHero1 to 100.00%
Unit - Set mana of DuellingHero1 to 100.00%
Unit - Set life of DuellingHero2 to 100.00%
Unit - Set mana of DuellingHero2 to 100.00%
Game - Display to (All players) the text: Duel starting in 20...
Countdown Timer - Create a timer window for DuelTimer with title Duel
Countdown Timer - Start DuelTimer as a One-shot timer that will expire in 20.00 seconds
Cinematic - Disable user control for (Player group((Owner of DuellingHero1)))
Cinematic - Disable user control for (Player group((Owner of DuellingHero2)))
Camera - Pan camera for (Owner of DuellingHero1) to (Position of DuellingHero1) over 2.00 seconds
Camera - Pan camera for (Owner of DuellingHero2) to (Position of DuellingHero2) over 2.00 seconds
Player Group - Pick every player in (All players) and do (Unit - Grant shared vision of DuellingHero1 to (Picked player))
Player Group - Pick every player in (All players) and do (Unit - Grant shared vision of DuellingHero2 to (Picked player))
Wait 20.00 seconds
Countdown Timer - Destroy (Last created timer window)
Cinematic - Enable user control for (All players)
Game - Display to (All players) the text: The duel starts now...
Trigger - Turn on Duel Hero 1 Dies <gen>
Trigger - Turn on Duel Hero 2 Dies <gen>
Player - Make (Owner of DuellingHero1) treat (Owner of DuellingHero2) as an Enemy
Player - Make (Owner of DuellingHero2) treat (Owner of DuellingHero1) as an EnemyAnd this when one of the heros die Code:
Duel Hero 1 Dies
Events
Unit - A unit Dies
Conditions
(((Dying unit) is A Hero) Equal to True) and ((Dying unit) Equal to DuellingHero1)
Actions
Game - Display to (All players) the text: ((Name of (Owner of DuellingHero2)) + ( defeated + ( + (Name of (Owner of DuellingHero1)))))
Wait 2.00 seconds
Game - Display to (All players) the text: And that's the end ...
Player - Make (Owner of DuellingHero1) treat (Owner of DuellingHero2) as an Ally
Player - Make (Owner of DuellingHero2) treat (Owner of DuellingHero1) as an Ally
Unit - Move DuellingHero2 instantly to (Center of Healing City Area <gen>)
Unit - Set life of DuellingHero2 to 100.00%
Unit - Set mana of DuellingHero2 to 100.00%
Camera - Pan camera for (Owner of DuellingHero2) to (Position of DuellingHero2) over 2.00 seconds
Set DuellingHero1 = No unit
Set DuellingHero2 = No unit
Player Group - Pick every player in (All players) and do (Unit - Deny shared vision of DuellingHero1 to (Picked player))
Player Group - Pick every player in (All players) and do (Unit - Deny shared vision of DuellingHero2 to (Picked player))
Trigger - Turn on Duel Invitation <gen>
Trigger - Turn off (This trigger) |
