- Joined
- Dec 26, 2010
- Messages
- 475
Hello guys
i need help.
I have a duel system and when it starts it works fine but when 7 seconds passed my hero automatically teleports at my base. even though my enemy is not dead. (sorry its too hard to explain
)
Heres the triggers.
I have a duel system and when it starts it works fine but when 7 seconds passed my hero automatically teleports at my base. even though my enemy is not dead. (sorry its too hard to explain
Heres the triggers.
Tha Triggars!Duel Timer.
Duel Start
Duel Timers
Events
Time - Elapsed game time is 10.00 seconds
Conditions
Actions
-------- Start the timer --------
Countdown Timer - Start DuelSystem_Timer as a One-shot timer that will expire in 35.00 seconds
-------- Create a window --------
Countdown Timer - Create a timer window for DuelSystem_Timer with title Duel In
Set DuelSystem_TimerWindow = (Last created timer window)
Countdown Timer - Show DuelSystem_TimerWindow
-------- Change color and transparency --------
Countdown Timer - Change the color of the title for (Last created timer window) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Duel Remove
Duel Start
Events
Time - DuelSystem_Timer expires
Conditions
Actions
-------- Setting the Arena --------
Set DuelSystem_Point_Arena = (Center of Arena <gen>)
-------- ========================================================== --------
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Camera - Pan camera for (Player((Integer A))) to DuelSystem_Point_Arena over 3.00 seconds
Unit - Pause all units
Sound - Play GameFound <gen>
-------- Destroying the timer window --------
Countdown Timer - Destroy DuelSystem_TimerWindow
-------- ========================================================== --------
-------- Setting the Units --------
Set DuelSystem_Unit[1] = (Random 1 units from (Units owned by (Random player from (All allies of Player 1 (Red))) matching (((Matching unit) is A Hero) Equal to True)))
Set DuelSystem_Unit[2] = (Random 1 units from (Units owned by (Random player from (All allies of Player 7 (Green))) matching (((Matching unit) is A Hero) Equal to True)))
-------- ========================================================== --------
-------- Setting the Duel Location --------
-------- The region where the two units will fight --------
Set DuelSystem_Point_Leak[1] = (Center of Arena Team 1 Teleport <gen>)
Set DuelSystem_Point_Leak[2] = (Center of Arena Team 2 Teleport <gen>)
-------- The region where the two units will be teleported when the duel is finished --------
Set DuelSystem_Point_Leak[3] = (Center of Hero Teleport When Pick T1 <gen>)
Set DuelSystem_Point_Leak[4] = (Center of Hero Teleport When Pick T2 <gen>)
-------- ========================================================== --------
-------- Pick the unit that will duel --------
Unit Group - Pick every unit in DuelSystem_Unit[2] and do (Actions)
Loop - Actions
-------- Be sure to check where i put the Duel Region --------
-------- Check if the unit is belongs to which team --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an ally of Player 7 (Green)) Equal to True
Then - Actions
Set DuelSystem_PickedUnit[0] = (Picked unit)
Unit Group - Add (Picked unit) to DuelSystem_Group[2]
Unit - Move (Picked unit) instantly to DuelSystem_Point_Leak[2]
Else - Actions
-------- Pick the unit that will Duel --------
Unit Group - Pick every unit in DuelSystem_Unit[1] and do (Actions)
Loop - Actions
-------- Be sure to check where i put the Duel Region --------
-------- Check if the unit is belongs to which team --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Set DuelSystem_PickedUnit[1] = (Picked unit)
Unit Group - Add (Picked unit) to DuelSystem_Group[1]
Unit - Move (Picked unit) instantly to DuelSystem_Point_Leak[1]
Else - Actions
-------- ========================================================== --------
-------- Announcing the units --------
Game - Display to (All allies of Player 1 (Red)) the text: (PlayerName[(Player number of (Owner of DuelSystem_PickedUnit[0]))] + ((Name of DuelSystem_PickedUnit[0]) + ( Vs + (PlayerName[(Player number of (Owner of DuelSystem_PickedUnit[1]))] + (Name of DuelSystem_PickedUnit[1])))))
Game - Display to (All allies of Player 7 (Green)) the text: (PlayerName[(Player number of (Owner of DuelSystem_PickedUnit[0]))] + ((Name of DuelSystem_PickedUnit[0]) + ( Vs + (PlayerName[(Player number of (Owner of DuelSystem_PickedUnit[1]))] + (Name of DuelSystem_PickedUnit[1])))))
-------- ========================================================== --------
Wait 2.00 seconds
Game - Display to (All allies of Player 1 (Red)) the text: 3 ...
Game - Display to (All allies of Player 7 (Green)) the text: 3 ...
Sound - Play BattleNetTick <gen>
Wait 1.00 seconds
Game - Display to (All allies of Player 1 (Red)) the text: 2 ...
Game - Display to (All allies of Player 7 (Green)) the text: 2 ...
Sound - Play BattleNetTick <gen>
Wait 1.00 seconds
Game - Display to (All allies of Player 1 (Red)) the text: 1 ...
Game - Display to (All allies of Player 7 (Green)) the text: 1 ...
Sound - Play BattleNetTick <gen>
Wait 1.00 seconds
-------- Orders the two units to attack each other. --------
Unit Group - Pick every unit in DuelSystem_Unit[1] and do (Actions)
Loop - Actions
Unit - Unpause (Picked unit)
Unit - Order (Picked unit) to Attack-Move To DuelSystem_Point_Leak[2]
Unit Group - Pick every unit in DuelSystem_Unit[2] and do (Actions)
Loop - Actions
Unit - Unpause (Picked unit)
Unit - Order (Picked unit) to Attack-Move To DuelSystem_Point_Leak[1]
-------- ========================================================== --------
Wait 2.00 seconds
Trigger - Turn on Duel End <gen>
-------- Removing Leaks --------
Custom script: call RemoveLocation( udg_DuelSystem_Point_Leak[1] )
Custom script: call RemoveLocation( udg_DuelSystem_Point_Leak[2] )
Custom script: call DestroyGroup( udg_DuelSystem_Unit[1] )
Custom script: call DestroyGroup( udg_DuelSystem_Unit[2] )
Custom script: call RemoveLocation(udg_DuelSystem_Point_Arena)
Duel End
Duel Remove
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Or - Any (Conditions) are true
Conditions
((Dying unit) is in DuelSystem_Group[1]) Equal to True
((Dying unit) is in DuelSystem_Group[2]) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Unit Group - Remove (Dying unit) from DuelSystem_Group[1]
Else - Actions
Unit Group - Remove (Dying unit) from DuelSystem_Group[2]
Duel End
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DuelSystem_Group[2] is empty) Equal to True
Then - Actions
Quest - Display to (All players) the Quest Completed message: Team 1 wins the due...
Wait 2.00 seconds
Unit Group - Pick every unit in DuelSystem_Group[1] and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to DuelSystem_Point_Leak[3]
Custom script: call RemoveLocation(udg_DuelSystem_Point_Leak[3])
Unit Group - Remove all units from DuelSystem_Group[1]
Unit Group - Remove all units from DuelSystem_Group[2]
-------- countdown timer can be changed --------
Countdown Timer - Start DuelSystem_Timer as a One-shot timer that will expire in 300.00 seconds
Countdown Timer - Create a timer window for DuelSystem_Timer with title Duel In
Set DuelSystem_TimerWindow = (Last created timer window)
Countdown Timer - Show DuelSystem_TimerWindow
Countdown Timer - Change the color of the title for (Last created timer window) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Unit - Unpause all units
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DuelSystem_Group[1] is empty) Equal to True
Then - Actions
Quest - Display to (All players) the Quest Completed message: Team 2 wins the due...
Wait 2.00 seconds
Unit Group - Pick every unit in DuelSystem_Group[2] and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to DuelSystem_Point_Leak[4]
Custom script: call RemoveLocation(udg_DuelSystem_Point_Leak[4])
Unit Group - Remove all units from DuelSystem_Group[1]
Unit Group - Remove all units from DuelSystem_Group[2]
-------- countdown timer can be changed --------
Countdown Timer - Start DuelSystem_Timer as a One-shot timer that will expire in 300.00 seconds
Countdown Timer - Create a timer window for DuelSystem_Timer with title Duel In
Set DuelSystem_TimerWindow = DuelSystem_TimerWindow
Countdown Timer - Show DuelSystem_TimerWindow
Countdown Timer - Change the color of the title for (Last created timer window) to (0.00%, 100.00%, 0.00%) with 0.00% transparency
Unit - Unpause all units
Trigger - Turn off (This trigger)
Else - Actions
Do nothing