- Joined
- Jan 20, 2011
- Messages
- 492
Hey guys, I was wondering with my game I am making, my Respawn System for Creeps and when I kill the boss it teleports everyone in the area, works on the first try, but if I come back and try it again, it doesn't work. SO, lets say , I kill the boss and then I get teleported to region, and I come back to kill the boss again, it DOESN'T teleport me. Can anyone tell me what I am doing wrong?
Here is the Coding I've been using;
Creep Respawn System
Boss Trigger
So an overview of what I am asking is, can someone tell me how to fix it so the trigger works like this, I kill the boss it teleports me to the region and continuously works, instead of it working once then not at all.
If it needs better explaining please let me know
Here is the Coding I've been using;
Creep Respawn System
-
Creep Respawn Init
-
Events
- Map initialization
- Conditions
-
Actions
- Set Respawn_Time = 45.00
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
-
Loop - Actions
- Set Temp_Integer = (Temp_Integer + 1)
- Unit - Set the custom value of (Picked unit) to Temp_Integer
- Set Creep_Point[Temp_Integer] = (Position of (Picked unit))
-
Loop - Actions
-
Events
-
Respawn
-
Events
- Unit - A unit Dies
-
Conditions
- (Owner of (Triggering unit)) Equal to Neutral Hostile
- (Custom value of (Triggering unit)) Greater than 0
-
Actions
- Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
- Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
- Wait Respawn_Time game-time seconds
- Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
-
Events
-
Add Creep to Respawn
-
Events
- Unit - A unit enters (Playable map area)
-
Conditions
- (Owner of (Triggering unit)) Equal to Neutral Hostile
-
Actions
- Set Temp_Integer = (Temp_Integer + 1)
- Unit - Set the custom value of (Triggering unit) to Temp_Integer
- Set Creep_Point[Temp_Integer] = (Position of (Triggering unit))
-
Events
Boss Trigger
-
Boss Dungeon 1
-
Events
- Unit - Arachnos 0050 <gen> Dies
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in Dungeon 1 Dungeon Region <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dungeon 1 Dungeon Region <gen> contains (Picked unit)) Equal to True
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Move (Picked unit) instantly to (Center of Camp 2 <gen>)
- Sound - Play NewTournament <gen>
- Game - Display to (All players) for 10.00 seconds the text: |CFF20C000Congratul...
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in Camp 1 Weather Region <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dungeon 1 Dungeon Region <gen> contains (Picked unit)) Equal to True
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Move (Picked unit) instantly to (Center of Camp 2 <gen>)
- Sound - Play NewTournament <gen>
- Game - Display to (All players) for 10.00 seconds the text: |CFF20C000Congratul...
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in Dungeon 1 Dungeon Region <gen>) and do (Actions)
-
Events
So an overview of what I am asking is, can someone tell me how to fix it so the trigger works like this, I kill the boss it teleports me to the region and continuously works, instead of it working once then not at all.
If it needs better explaining please let me know