- Joined
- May 20, 2009
- Messages
- 822
(Map is attached)
UPDATED: Map Download
This is a custom move system I've put about 10 or so hours into so far, completely written in GUI. The point of it is to be an easily expandable system that can 100% replace the vanilla WC3 movement.
Feature List:
1. Infinite move speed.
2. Easily index each unit in your map.
3. Change each individual unit's movement speed dynamically.
Planned Features:
1. Acceleration and Deceleration.
2. Built-in Knockback,
3. Gravity (Pull or push widgets to or from another widget or point),
4. Parabola,
5. 3D Snake Movement (X/Y/Z snake-like movement),
6. And Jumping.
7. Use any name for the walk animation & control animation speed.
8. Customized Collision.
9. Push-Pathing system. (SC2-Like. Can be turned off.)
If you find any other bugs, or if you think the code can be simplified, lemme know! I will also be fixing leaks once it's more finished. Right now it's barely 1/4 of the way done, but it is functional. If you also have any ideas for features, lemme know.
UPDATED: Map Download
This is a custom move system I've put about 10 or so hours into so far, completely written in GUI. The point of it is to be an easily expandable system that can 100% replace the vanilla WC3 movement.
Fixed Bugs
Weird interactions when multiple units are moving.
Speed being multiplied by the number of units moving.
Fixed: Default values were used by any unit not in the first index.
Current Bugs
Animations do not work properly.
Feature List:
1. Infinite move speed.
2. Easily index each unit in your map.
3. Change each individual unit's movement speed dynamically.
Planned Features:
1. Acceleration and Deceleration.
2. Built-in Knockback,
3. Gravity (Pull or push widgets to or from another widget or point),
4. Parabola,
5. 3D Snake Movement (X/Y/Z snake-like movement),
6. And Jumping.
7. Use any name for the walk animation & control animation speed.
8. Customized Collision.
9. Push-Pathing system. (SC2-Like. Can be turned off.)
If you find any other bugs, or if you think the code can be simplified, lemme know! I will also be fixing leaks once it's more finished. Right now it's barely 1/4 of the way done, but it is functional. If you also have any ideas for features, lemme know.
-
Init
-
Events
- Map initialization
- Conditions
-
Actions
- Custom script: call TriggerRegisterTimerEventPeriodic( gg_trg_MS_Clock, udg_MSG_ClockSpeed )
-
Events
-
MS Initiate
-
Events
- Unit - A unit Is issued an order targeting a point
- Unit - A unit Is issued an order targeting an object
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Issued order) Equal to (Order(move))
- (Issued order) Equal to (Order(smart))
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
For each (Integer MSG_Integer[4]) from 1 to MSG_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to MSG_Unit[MSG_Integer[4]]
-
Then - Actions
- Custom script: call RemoveLocation(udg_MSG_UPos[udg_MSG_Integer[4]])
- Custom script: call RemoveLocation(udg_MSG_MovePoint[udg_MSG_Integer[4]])
- Custom script: call RemoveLocation(udg_MSG_Point[udg_MSG_Integer[4]])
- Set MSG_Anim[MSG_Integer[4]] = MSG_Anim[MSG_MaxIndex]
- Set MSG_UPos[MSG_Integer[4]] = MSG_UPos[MSG_MaxIndex]
- Set MSG_ActualDistance[MSG_Integer[4]] = MSG_ActualDistance[MSG_MaxIndex]
- Set MSG_CalcDistance[MSG_Integer[4]] = MSG_CalcDistance[MSG_MaxIndex]
- Set MSG_DisFinal[MSG_Integer[4]] = MSG_DisFinal[MSG_MaxIndex]
- Set MSG_U2TAng[MSG_Integer[4]] = MSG_U2TAng[MSG_MaxIndex]
- Set MSG_MovePoint[MSG_Integer[4]] = MSG_MovePoint[MSG_MaxIndex]
- Set MSG_CalcSpeed[MSG_Integer[4]] = MSG_CalcSpeed[MSG_MaxIndex]
- Set MSG_IsPointOrTarget[MSG_Integer[4]] = MSG_IsPointOrTarget[MSG_MaxIndex]
- Set MSG_MoveSpeed[MSG_Integer[4]] = MSG_MoveSpeed[MSG_MaxIndex]
- Set MSG_Object[MSG_Integer[4]] = MSG_Object[MSG_MaxIndex]
- Set MSG_Point[MSG_Integer[4]] = MSG_Point[MSG_MaxIndex]
- Set MSG_Unit[MSG_Integer[4]] = MSG_Unit[MSG_MaxIndex]
- Set MSG_TarObj[MSG_Integer[4]] = MSG_TarObj[MSG_MaxIndex]
- Set MSG_MaxIndex = (MSG_MaxIndex - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set MSA_Object = (Target unit of issued order)
- Set MSA_Point = (Target point of issued order)
- Custom script: if ( udg_MSA_Point != null ) then
- Custom script: set udg_MSA_IsPoint = true
- Custom script: else
- Custom script: if ( udg_MSA_Object != null ) then
- Custom script: set udg_MSA_IsObject = true
- Custom script: endif
- Custom script: endif
- Animation - Change (Triggering unit) turn speed to 1.00
- Unit - Make (Triggering unit) face (Angle from (Position of (Triggering unit)) to MSA_Point) over 0.00 seconds
- Set MSG_MaxIndex = (MSG_MaxIndex + 1)
- Set MSG_Unit[MSG_MaxIndex] = (Triggering unit)
-
For each (Integer MSG_Integer[1]) from 1 to MC_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Triggering unit)) Equal to MC_UnitType[MSG_Integer[1]]
-
Then - Actions
- Set MSG_MoveSpeed[MSG_MaxIndex] = MC_SpeedSettings[MSG_Integer[1]]
- Set MSG_Anim[MSG_Integer[1]] = MC_WalkAnim[MSG_Integer[1]]
-
Else - Actions
- Set MSG_MoveSpeed[MSG_MaxIndex] = 2.25
- Set MSG_Anim[MSG_Integer[1]] = MC_WalkAnim[MSG_Integer[1]]
-
If - Conditions
- Game - Display to (All players) the text: (String(MSG_MoveSpeed[MSG_MaxIndex]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MSA_IsPoint Equal to True
-
Then - Actions
- Set MSG_IsPointOrTarget[MSG_MaxIndex] = True
- Set MSG_Point[MSG_MaxIndex] = MSA_Point
- Set MSA_IsPoint = False
- Set MSA_Point = NullPoint
-
Else - Actions
- Set MSG_IsPointOrTarget[MSG_MaxIndex] = False
- Set MSG_TarObj[MSG_MaxIndex] = (Target unit of issued order)
- Game - Display to (All players) the text: (Name of MSG_TarObj[MSG_MaxIndex])
- Set MSG_Point[MSG_MaxIndex] = (Position of MSG_TarObj[MSG_MaxIndex])
- Set MSA_IsObject = False
- Set MSA_Object = No unit
-
If - Conditions
-
For each (Integer MSG_Integer[4]) from 1 to MSG_MaxIndex, do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
MS Clock
- Events
- Conditions
-
Actions
-
For each (Integer MSG_Integer[2]) from 1 to MSG_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MSG_IsPointOrTarget[MSG_Integer[2]] Equal to True
-
Then - Actions
- Set MSG_UPos[MSG_Integer[2]] = (Position of MSG_Unit[MSG_Integer[2]])
- Set MSG_ActualDistance[MSG_Integer[2]] = (Distance between MSG_UPos[MSG_Integer[2]] and MSG_Point[MSG_Integer[2]])
- Set MSG_CalcDistance[MSG_Integer[2]] = (MSG_ActualDistance[MSG_Integer[2]] - (MSG_ActualDistance[MSG_Integer[2]] x 2.00))
- Set MSG_CalcSpeed[MSG_Integer[2]] = ((MSG_MoveSpeed[MSG_Integer[2]] x 32.00) / 33.33)
- Set MSG_DisFinal[MSG_Integer[2]] = (MSG_CalcDistance[MSG_Integer[2]] + MSG_CalcSpeed[MSG_Integer[2]])
- Set MSG_U2TAng[MSG_Integer[2]] = (Angle from MSG_UPos[MSG_Integer[2]] to MSG_Point[MSG_Integer[2]])
- Set MSG_MovePoint[MSG_Integer[2]] = (MSG_Point[MSG_Integer[2]] offset by MSG_DisFinal[MSG_Integer[2]] towards MSG_U2TAng[MSG_Integer[2]] degrees)
- Custom script: call RemoveLocation(udg_MSG_UPos[udg_MSG_Integer[2]])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MSG_CalcSpeed[MSG_Integer[2]] Less than or equal to MSG_ActualDistance[MSG_Integer[2]]
-
Then - Actions
- Unit - Move MSG_Unit[MSG_Integer[2]] instantly to MSG_MovePoint[MSG_Integer[2]]
- Game - Display to (All players) the text: (String(MSG_MoveSpeed[MSG_Integer[2]]))
- Custom script: call RemoveLocation(udg_MSG_MovePoint[udg_MSG_Integer[2]])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MSG_CalcSpeed[MSG_Integer[2]] Greater than MSG_ActualDistance[MSG_Integer[2]]
-
Then - Actions
- Unit - Move MSG_Unit[MSG_Integer[2]] instantly to MSG_Point[MSG_Integer[2]]
-
Else - Actions
- Custom script: if ( GetUnitLoc(udg_MSG_Unit[2]) == udg_MSG_Point[2] ) then
- Set MSG_Anim[MSG_Integer[2]] = MSG_Anim[MSG_MaxIndex]
- Set MSG_UPos[MSG_Integer[2]] = MSG_UPos[MSG_MaxIndex]
- Set MSG_ActualDistance[MSG_Integer[2]] = MSG_ActualDistance[MSG_MaxIndex]
- Set MSG_CalcDistance[MSG_Integer[2]] = MSG_CalcDistance[MSG_MaxIndex]
- Set MSG_DisFinal[MSG_Integer[2]] = MSG_DisFinal[MSG_MaxIndex]
- Set MSG_U2TAng[MSG_Integer[2]] = MSG_U2TAng[MSG_MaxIndex]
- Set MSG_MovePoint[MSG_Integer[2]] = MSG_MovePoint[MSG_MaxIndex]
- Set MSG_CalcSpeed[MSG_Integer[2]] = MSG_CalcSpeed[MSG_MaxIndex]
- Set MSG_IsPointOrTarget[MSG_Integer[2]] = MSG_IsPointOrTarget[MSG_MaxIndex]
- Set MSG_MoveSpeed[MSG_Integer[2]] = MSG_MoveSpeed[MSG_MaxIndex]
- Set MSG_Object[MSG_Integer[2]] = MSG_Object[MSG_MaxIndex]
- Set MSG_Point[MSG_Integer[2]] = MSG_Point[MSG_MaxIndex]
- Set MSG_Unit[MSG_Integer[2]] = MSG_Unit[MSG_MaxIndex]
- Set MSG_TarObj[MSG_Integer[2]] = MSG_TarObj[MSG_MaxIndex]
- Custom script: call RemoveLocation(udg_MSG_Point[udg_MSG_Integer[2]])
- Custom script: call RemoveLocation(udg_MSG_MovePoint[udg_MSG_Integer[2]])
- Custom script: call RemoveLocation(udg_MSG_Point[udg_MSG_Integer[2]])
- Set MSG_MaxIndex = (MSG_MaxIndex - 1)
- Custom script: endif
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer MSG_Integer[2]) from 1 to MSG_MaxIndex, do (Actions)
-
MS Stop
-
Events
- Unit - A unit Is issued an order with no target
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Issued order) Equal to (Order(channel))
-
Then - Actions
-
For each (Integer MSG_Integer[3]) from 1 to MSG_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to MSG_Unit[MSG_Integer[3]]
-
Then - Actions
- Custom script: call RemoveLocation(udg_MSG_UPos[udg_MSG_Integer[3]])
- Custom script: call RemoveLocation(udg_MSG_MovePoint[udg_MSG_Integer[3]])
- Custom script: call RemoveLocation(udg_MSG_Point[udg_MSG_Integer[3]])
- Set MSG_Anim[MSG_Integer[3]] = MSG_Anim[MSG_MaxIndex]
- Set MSG_UPos[MSG_Integer[3]] = MSG_UPos[MSG_MaxIndex]
- Set MSG_ActualDistance[MSG_Integer[3]] = MSG_ActualDistance[MSG_MaxIndex]
- Set MSG_CalcDistance[MSG_Integer[3]] = MSG_CalcDistance[MSG_MaxIndex]
- Set MSG_DisFinal[MSG_Integer[3]] = MSG_DisFinal[MSG_MaxIndex]
- Set MSG_U2TAng[MSG_Integer[3]] = MSG_U2TAng[MSG_MaxIndex]
- Set MSG_MovePoint[MSG_Integer[3]] = MSG_MovePoint[MSG_MaxIndex]
- Set MSG_CalcSpeed[MSG_Integer[3]] = MSG_CalcSpeed[MSG_MaxIndex]
- Set MSG_IsPointOrTarget[MSG_Integer[3]] = MSG_IsPointOrTarget[MSG_MaxIndex]
- Set MSG_MoveSpeed[MSG_Integer[3]] = MSG_MoveSpeed[MSG_MaxIndex]
- Set MSG_Object[MSG_Integer[3]] = MSG_Object[MSG_MaxIndex]
- Set MSG_Point[MSG_Integer[3]] = MSG_Point[MSG_MaxIndex]
- Set MSG_Unit[MSG_Integer[3]] = MSG_Unit[MSG_MaxIndex]
- Set MSG_TarObj[MSG_Integer[3]] = MSG_TarObj[MSG_MaxIndex]
- Set MSG_MaxIndex = (MSG_MaxIndex - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer MSG_Integer[3]) from 1 to MSG_MaxIndex, do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Attachments
Last edited: