Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Hmm, well what is the best idea if you are having about 10-20 cameras on the map, for example once your hero enters that region the camera will be locked to that camera every 0.1sec. For every player that will need duplicates.
Is there any other way or would i need a trigger for each camera rather then all in one?
It's actually under the ground and it'll stuff up a lot of view, and the cameras are needed. So your telling me there is no other way? Other then reducing the every second to 1 second (This would make it look crap ).
Sadly I don't have a whole lot of experience with cameras and i just took a look at your project and damn, your terraining skills blow mine away. Perhaps if i understood better what it is you're trying to achieve I could help. What is making the camera change so often anyway that you have to set the camera so much?
Here is the entire camera system, it's not 100% complete but i beleive this is causing the lag over time.
it's basicly the same thing over and over. I asume it is this because i was working on this and when i tested it after about 5 miniutes it slowly lagged then so much lag you need to restart comp.
Security Cameras
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
-------- ========================== --------
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player1[1] Equal to 1
Then - Actions
Camera - Apply Security Camera 1 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player1[1] Equal to 2
Then - Actions
Camera - Apply Security Camera 2 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player1[1] Equal to 3
Then - Actions
Camera - Apply Security Camera 3 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player2[1] Equal to 1
Then - Actions
Camera - Apply Security Camera 1 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player2[1] Equal to 2
Then - Actions
Camera - Apply Security Camera 2 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player2[1] Equal to 3
Then - Actions
Camera - Apply Security Camera 3 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player3[1] Equal to 1
Then - Actions
Camera - Apply Security Camera 1 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player3[1] Equal to 2
Then - Actions
Camera - Apply Security Camera 2 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player3[1] Equal to 3
Then - Actions
Camera - Apply Security Camera 3 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[4] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player4[1] Equal to 1
Then - Actions
Camera - Apply Security Camera 1 <gen> for Player 4 (Purple) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[4] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player4[1] Equal to 2
Then - Actions
Camera - Apply Security Camera 2 <gen> for Player 4 (Purple) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[4] is in (Units in Region 068 <gen>)) Equal to True
SecurityCamera_Player4[1] Equal to 3
Then - Actions
Camera - Apply Security Camera 3 <gen> for Player 4 (Purple) over 0.00 seconds
Else - Actions
-------- ========================== --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 070 <gen>)) Equal to True
Then - Actions
Camera - Apply Seucirty Camera Lift 1 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 069 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 061 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 071 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 062 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 072 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 063 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 073 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 064 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 074 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 065 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 075 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 066 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 076 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 068 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[1] is in (Units in Region 077 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 069 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 070 <gen>)) Equal to True
Then - Actions
Camera - Apply Seucirty Camera Lift 1 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 069 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 061 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 071 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 062 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 072 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 063 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 073 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 064 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 074 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 065 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 075 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 066 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 076 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 068 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[2] is in (Units in Region 077 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 069 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 070 <gen>)) Equal to True
Then - Actions
Camera - Apply Seucirty Camera Lift 1 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 069 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 061 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 071 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 062 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 072 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 063 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 073 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 064 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 074 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 065 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 075 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 066 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 076 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 068 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player_Hero[3] is in (Units in Region 077 <gen>)) Equal to True
Then - Actions
Camera - Apply Camera 069 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
-------- ========================== --------
-------- ========================== --------
-------- Lifts --------
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
-------- ========================== --------
-------- PLAYER 1 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_1_Lift[5] Equal to True
Then - Actions
Camera - Apply Camera 058 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_1_Lift[4] Equal to True
Then - Actions
Camera - Apply Camera 060 <gen> for Player 1 (Red) over 0.00 seconds
Else - Actions
-------- ========================== --------
-------- PLAYER 2 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_2_Lift[5] Equal to True
Then - Actions
Camera - Apply Camera 058 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_2_Lift[4] Equal to True
Then - Actions
Camera - Apply Camera 060 <gen> for Player 2 (Blue) over 0.00 seconds
Else - Actions
-------- ========================== --------
-------- PLAYER 3 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_3_Lift[5] Equal to True
Then - Actions
Camera - Apply Camera 058 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_3_Lift[4] Equal to True
Then - Actions
Camera - Apply Camera 060 <gen> for Player 3 (Teal) over 0.00 seconds
Else - Actions
-------- ========================== --------
-------- PLAYER 4 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_4_Lift[5] Equal to True
Then - Actions
Camera - Apply Camera 058 <gen> for Player 4 (Purple) over 0.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_4_Lift[4] Equal to True
Then - Actions
Camera - Apply Camera 060 <gen> for Player 4 (Purple) over 0.00 seconds
You said there is no lag at the start, but becomes increasingly laggy as time progressed. This sounds like a memory leak to me. Your trigger runs every 0.1 second, creating x amount of leaks every cycle.
Untitled Trigger 001
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Camera - Pan camera for Player 1 (Red) to (Center of (Playable map area)) over 0.00 seconds
This trigger leaks because it refers a location.
Untitled Trigger 001
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Set point = (Center of (Playable map area))
Camera - Pan camera for Player 1 (Red) to point over 0.00 seconds
Custom script: call RemoveLocation (udg_point)
I created a variable ("point"), and assigned a position to it. The camera refers the variable. Then the variable is destroyed. This makes sure the memory is cleaned, and does not "leak"
Ensure there are no memory leaks. I suggest you look at memory leak tutorials if u are unclear what you should be looking for.
I was typing this post before u submitted your last comment sorry.
He is definitely leaking like a mother fricker, but they are not location leaks. They are group leaks. .01 is a problem too i believe, try .03 at least.
To fix your leaks this is what you have to do, create a global group variable, for this example will say its called GlobalGroup. Then in the actions of an if statement with a line in the conditions like this one: (Player_Hero[4] is in (Units in Region 068 <gen>)) Equal to True
Before that if then statement set GlobalGroup = Units in Region 068 <gen>
Then in the If put (Player_Hero[4] is in (GlobalGroup)) Equal to True
Then after that if statement do this: Unit Group - Clear(GlobalGroup)
Repeat that for every statement like that and change it to .03 or .05 --should be fast enough and that should fix your problem.
Melee Initialization
Events
Conditions
Actions
Set GlobalGroup = (Units in (Playable map area))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SomeHero is in GlobalGroup) Equal to True
Then - Actions
-------- Do stuffz --------
Else - Actions
Custom script: call DestroyGroup(udg_GlobalGroup)
Set GlobalGroup = (Units in (Playable map area))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
No, that's still leaking. You're not actually using the group, you're still using (Units in Region 068) in your condition. You need to use (Units in GlobalGroup) in the condition. And set the group to (Units in Region 068), not (Units in (Playable map area)).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.