- Joined
- Mar 5, 2008
- Messages
- 3,881
Hello, its been a while since I worked with WE now I installed wc3 again and I found one unfinished map on my PC, I had this nice idea for a map but I stopped working on it because of its arrow key movement which works but it becomes really laggy when tested with more than 3 players. Now I'm hoping someone could try to figure out why.
Other moves left right... are the same just different actions for movement.
I think the problem begins with event every 0.03 seconds, because there must be like 500 events 0.03 running every second, but I can't think of anything else to make this system work.
Map:
-
Melee Initialization
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Camera - Lock camera target for Player 1 (Red) to Arthas 0001 <gen>, offset by (0.00, 0.00) using The unit's rotation
-


Camera - Lock camera target for Player 2 (Blue) to Arthas 0037 <gen>, offset by (0.00, 0.00) using The unit's rotation
-


Camera - Lock camera target for Player 3 (Teal) to Arthas 0039 <gen>, offset by (0.00, 0.00) using The unit's rotation
-


Camera - Lock camera target for Player 4 (Purple) to Arthas 0040 <gen>, offset by (0.00, 0.00) using The unit's rotation
-


Camera - Lock camera target for Player 5 (Yellow) to Arthas 0043 <gen>, offset by (0.00, 0.00) using The unit's rotation
-


Camera - Lock camera target for Player 6 (Orange) to Arthas 0044 <gen>, offset by (0.00, 0.00) using The unit's rotation
-


For each (Integer A) from 1 to 6, do (Actions)
-



Loop - Actions
-




Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across (Playable map area)
-




Set Move_Press_Up[(Integer A)] = False
-




Trigger - Add to Move UP <gen> the event (Player - (Player((Integer A))) Presses the Up Arrow key)
-




Trigger - Add to Move UP stop <gen> the event (Player - (Player((Integer A))) Releases the Up Arrow key)
-




-------- - --------
-




Set Move_Press_Left[(Integer A)] = False
-




Trigger - Add to Move Left <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key)
-




Trigger - Add to Move Left stop <gen> the event (Player - (Player((Integer A))) Releases the Left Arrow key)
-




-------- - --------
-




Set Move_Press_Right[(Integer A)] = False
-




Trigger - Add to Move Right <gen> the event (Player - (Player((Integer A))) Presses the Right Arrow key)
-




Trigger - Add to Move Right stop <gen> the event (Player - (Player((Integer A))) Releases the Right Arrow key)
-




-------- - --------
-




Trigger - Add to Move DOWN <gen> the event (Player - (Player((Integer A))) Presses the Down Arrow key)
-




-------- - --------
-
-
-
-
-
Move UP
-

Events
-

Conditions
-

Actions
-


Set Move_Press_Up[(Player number of (Triggering player))] = True
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Move UP Execution <gen> is on) Equal to False
-
-



Then - Actions
-




Trigger - Turn on Move UP Execution <gen>
-
-



Else - Actions
-
-
-
-
Move UP stop
-

Events
-

Conditions
-

Actions
-


Set Move_Press_Up[(Player number of (Triggering player))] = False
-


For each (Integer A) from 1 to 6, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Move_Press_Up[(Integer A)] Equal to True
-
-





Then - Actions
-






Skip remaining actions
-
-





Else - Actions
-
-
-
-


Trigger - Turn off Move UP Execution <gen>
-
-
-
Move UP Execution
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer A) from 1 to 6, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Move_Press_Up[(Integer A)] Equal to True
-
-





Then - Actions
-






Set Move_Group_Up = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is selected by (Player((Integer A)))) Equal to True) and ((Owner of (Matching unit)) Equal to (Player((Integer A)))))))
-






Unit Group - Pick every unit in Move_Group_Up and do (Actions)
-







Loop - Actions
-








Set Move_Up_Location_Unit = (Position of (Picked unit))
-








Set Move_Up_Location = (Move_Up_Location_Unit offset by 50.00 towards (Facing of (Picked unit)) degrees)
-








Unit - Order (Picked unit) to Move To Move_Up_Location
-








Custom script: call RemoveLocation(udg_Move_Up_Location_Unit)
-








Custom script: call RemoveLocation(udg_Move_Up_Location)
-
-
-






Custom script: call DestroyGroup(udg_Move_Group_Up)
-
-





Else - Actions
-
-
-
-
-
I think the problem begins with event every 0.03 seconds, because there must be like 500 events 0.03 running every second, but I can't think of anything else to make this system work.
Map:
Attachments
Last edited:

How could I help you, since this doesn't work how it should.





