• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Custom Move System: Code Check, Debugging, Testing

Status
Not open for further replies.
Level 12
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.


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 )
  • 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))
        • 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
          • 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]]
              • 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)
            • 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
        • Else - Actions
  • 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
            • Else - 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
        • Else - Actions
 

Attachments

  • Custom Move System.w3x
    24.4 KB · Views: 94
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
It's okay, I'm very confident I can handle this. I'm taking it one feature at a time, instead of trying to do multiple things at once.

I fixed the bug with the movement speed... I had my loop for moving units inside of another loop, causing each unit to be moved for every unit that was indexed instead of once. Will be updating the map.
 
Level 12
Joined
May 20, 2009
Messages
822
Update: The system is getting closer to being finished.

Dynamically changing unit speed is half complete, I have it modifying based on buffs and now I have to modify it based off of "other" as in things that would effect speed that aren't a buff, like triggers.

I think I'll work on Gravity next, as that'll be the next-easiest feature. (Just pushing/pulling toward/away from a point is all.)
 
This is an awesome idea, keep at it and ignore anybody who says this is terrible because they seem to have no idea and only want to hinder you.

Though I do suggest replacing points with coordinates and the GUI move unit with custom script set unit x/y. That way you can combine your system with default movement system if you chose too and could add that as a configurable option for the users of your system.

Once you do both of those then it will easily outdo Warcraft 3 system of movement. Plus pinball was one of the best games ever made.


Kind of amazed you wouldn't encourage this Nes, bit disappointed. =(

A Void, give aple time and you might just be terribly wrong.

Edit: Another suggestion if your going to do collision checking so units don't ghost(go through) each other, phoenix fire + a damage detection system works really well in terms of memory usage and leaks/lags.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • 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]]
->Replace with a hashtable, load the integer


  • 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
->
  • local integer eventId = GetHandleId(GetTriggerEventId())


  • Set MSG_CalcSpeed[MSG_Integer[2]] = ((MSG_MoveSpeed[MSG_Integer[2]] x 32.00) / 33.33)
->32/33.33 is a constant
 
Also A_Void, The Lab is a place where anyone can put up anything. Don't be critical mate ^_-. You can save that for when they try to submit it : P.

I guess you're right, but I just stated my opinion that this is useless it should remain in the lab. I know not much about coding but I can tell you that this is a highly impractical system just from the test map. You can't right click on the ground, this is not comfortable to use.

I'm being realistic. Would you use this system instead of the regular default? I doubt it.
 
Level 12
Joined
May 20, 2009
Messages
822
Okay, Update: I got rather busy so I didn't have time to work on this. I should be able to start back working on it soon. At the moment it's having some weird bugs that I gotta iron out that I thought I had already fixed but for some reason have cropped back up. I know that it has to do with my indexing/deindexing but I can't find where it's wrong...

There are a number of ways to improve upon this, but I can't do that just yet. It needs to be functional first. It is kind of functional, but it is still lacking many features.

I had learned of a way to hide the basic command buttons but keep their functionality (I think), so I'll look into that to allow for right-clicking.

Can Channel Ability having Smart as it's orderstring allow for right-clicking? If so, that'd be a much more satisfying result.


I did not test this, but i dont suppose its intended as a replacement for the normal unit movement in regular maps. Maybe someone has an idea for a funmap which could make use of such a system...

It is intended to be a full replacement, though.

I guess you're right, but I just stated my opinion that this is useless it should remain in the lab. I know not much about coding but I can tell you that this is a highly impractical system just from the test map. You can't right click on the ground, this is not comfortable to use.

I'm being realistic. Would you use this system instead of the regular default? I doubt it.

Right-Click functionality is coming later. I have some ideas to get it working, but it'll have to come later down the road.


  • Set MSG_CalcSpeed[MSG_Integer[2]] = ((MSG_MoveSpeed[MSG_Integer[2]] x 32.00) / 33.33)
->32/33.33 is a constant

No, it's Move Speed x 32, / 33.33. Not 32 / 33 x move speed. We're getting the movespeed, then multiplying that by the number of distance in the second-smallest grid size in the Map Editor, which is exactly 32, then we divide that by game speed which is ~33.33 (IIRC). Gamespeed will change depending on the game-speed, at some point I will set up stuff to check the game speed then adjust that variable accordingly.

Also, I really have no idea how to use hashtables. I'd rather not fuck around with that, as it's already functional and that could break things because I don't know what I'm doing with them.

This is an awesome idea, keep at it and ignore anybody who says this is terrible because they seem to have no idea and only want to hinder you.

Though I do suggest replacing points with coordinates and the GUI move unit with custom script set unit x/y. That way you can combine your system with default movement system if you chose too and could add that as a configurable option for the users of your system.

Once you do both of those then it will easily outdo Warcraft 3 system of movement. Plus pinball was one of the best games ever made.


Kind of amazed you wouldn't encourage this Nes, bit disappointed. =(

A Void, give aple time and you might just be terribly wrong.

Edit: Another suggestion if your going to do collision checking so units don't ghost(go through) each other, phoenix fire + a damage detection system works really well in terms of memory usage and leaks/lags.

I intend to replace it with coordinates later, right now I'm just getting it functional. Set X/Y was buggy, for some reason unfortunately. I'll try again later, but it was a very, VERY unsatisfying result. :<

As for collision, I'll see what to do once I get there. However, that sounds like a really, really good way to determine collision thinking on it, and it could also work very well with implementing SC2-style pushing.

Sorry but this is just terrible, I would rather use normal movement than this. This movement is unnatural, units bumping into each other and knocking back? This is not some pinball game. I know this is in beta or alpha yet, but it really will not outdo Warcraft 3 system of movement. Sorry.

They bump into each other like this because there is absolutely no collision detection or path finding yet. That is going to be next once I get all the "movement" aspects finished.
 
Okay, Update: I got rather busy so I didn't have time to work on this. I should be able to start back working on it soon. At the moment it's having some weird bugs that I gotta iron out that I thought I had already fixed but for some reason have cropped back up. I know that it has to do with my indexing/deindexing but I can't find where it's wrong...

There are a number of ways to improve upon this, but I can't do that just yet. It needs to be functional first. It is kind of functional, but it is still lacking many features.

I had learned of a way to hide the basic command buttons but keep their functionality (I think), so I'll look into that to allow for right-clicking.

Can Channel Ability having Smart as it's orderstring allow for right-clicking? If so, that'd be a much more satisfying result.




It is intended to be a full replacement, though.



Right-Click functionality is coming later. I have some ideas to get it working, but it'll have to come later down the road.



No, it's Move Speed x 32, / 33.33. Not 32 / 33 x move speed. We're getting the movespeed, then multiplying that by the number of distance in the second-smallest grid size in the Map Editor, which is exactly 32, then we divide that by game speed which is ~33.33 (IIRC). Gamespeed will change depending on the game-speed, at some point I will set up stuff to check the game speed then adjust that variable accordingly.

Also, I really have no idea how to use hashtables. I'd rather not fuck around with that, as it's already functional and that could break things because I don't know what I'm doing with them.



I intend to replace it with coordinates later, right now I'm just getting it functional. Set X/Y was buggy, for some reason unfortunately. I'll try again later, but it was a very, VERY unsatisfying result. :<

As for collision, I'll see what to do once I get there. However, that sounds like a really, really good way to determine collision thinking on it, and it could also work very well with implementing SC2-style pushing.



They bump into each other like this because there is absolutely no collision detection or path finding yet. That is going to be next once I get all the "movement" aspects finished.

We'll see how it goes. You should try changing order string use/turn on to "Smart". You will have to shift-click on order string and change the value manually. I haven't tested it .
 
Level 12
Joined
May 20, 2009
Messages
822
So, here's a couple discoveries I've made so far:

When a unit is moved via the Move Unit function, they are ordered to stop even if they don't have the stop ability. This is why my custom stop ability does not have the stop order, because it will immediately cause units to stop moving as soon as they start moving.

The Smart order entirely by itself is what allows for right-click ordering. There is nothing special about the big 5 abilities that allows for right-clicking. So, now this system can actually work 100% as I intended it to work, instead of having to make a hacky solution by having the basic commands, but just hidden. This could be very useful in other situations as well.

This is unrelated, but I don't think I've ever mentioned this on the Hive before. When you use "Turn Unit Instantly" they actually are physically being turned instantly, it's just that their model isn't. Visually, they are turning slowly. But actual game-wise, they are being turned instantly.
 
So, here's a couple discoveries I've made so far:

When a unit is moved via the Move Unit function, they are ordered to stop even if they don't have the stop ability. This is why my custom stop ability does not have the stop order, because it will immediately cause units to stop moving as soon as they start moving.

The Smart order entirely by itself is what allows for right-click ordering. There is nothing special about the big 5 abilities that allows for right-clicking. So, now this system can actually work 100% as I intended it to work, instead of having to make a hacky solution by having the basic commands, but just hidden. This could be very useful in other situations as well.

Good news, You could now add animations. It would look better. Everytime moving starts play string - walk.
 
Level 12
Joined
May 20, 2009
Messages
822
Since I started this, making animations work perfectly have been really difficult. There is often a short delay from the unit starting to move and the actual walk animation being played, and I have no idea how to fix it. So unless you know what's wrong, I'm unfortunately going to have to leave that off until the system is more complete. (To me, it seems like it's just the execution speed of the play animation function is just too slow.)

I won't say it's impossible, because I CAN get the animation to play perfectly fine via other means, but they're just not practical. There are ways that will work to get the animation playing, but it will just take some effort.

EDIT: I'm going to have to do some other work around, apparently, because casting spells on units that are out of range and building will be impossible otherwise. I guess I WILL have to resort to having the original basic commands and then hide them via Commandfunc to be off the command card (By having it -11 on Y)

EDIT2: Nevermind, it doesn't even fully give the results I want. So I have to think of something else entirely.
 
Last edited:
Don't make it anti-mac now, just use the jass version of playing animations. Same as moving a unit. . . It is much better and actually works without interrupting anything usually. Also the GUI animation actions would work better if you didn't use the GUI move action. GUI move spams the stop order/command. Kind of another reason why its slow and bad.
 
Level 12
Joined
May 20, 2009
Messages
822
The JASS function to Set X/Y is really buggy with my system for some reason. It makes the model move out of the HP bar and selection circle with my system, even the Move Unit function kind of puts them off center of their selection circle.

Setting the buttons to 0,-11 was my only option at that point, but after testing around it gives very unsatisfying results so that won't be apart of it.

I'm going to have to completely script building and figure out a work-around for casting spells otherwise this system will be a bust, because they're totally non-functional with it. :<

If anybody's got any ideas for spell casting, that'd be helpful. Basically the issue is when units are out of range, it gives the usual "Target is out of range" error. The only way I can think of fixing this is having to script all the spell/weapon ranges, and give all the ranges in the Object Editor infinite. The casting of spells and attacking will then be superseded by the trigger, telling the unit to move within "range" then to attack/cast spells. But that might be very hacky and sluggish and could be prone to occasional failure, I'd think.
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
There are problems with having vanilla speed involved at all. The traditional movement takes over, but if I try to overwrite it with my custom movement the spell/building gets cancelled. I could simply use the Set X/Y to get around this, but as I said it's insanely buggy and looks really bad.

Take a look for yourself, change the move function to Set X and Y functions and you'll see exactly what I'm talking about.

EDIT: I'm lazy.
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
Alright, I think soon I'll start back working on this. (Couple days or so) to see if I can get more progress. I'll update if I do anything.

Right now I think my plan will be to use the Set X/Y and upload a new map to demonstrate the issue it causes with my system for some reason, and if anyone can debug it.
(I cannot for the life of my figure out what the problem is, I've never even seen this issue before with Set X/Y. xD)
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Alright, I think soon I'll start back working on this. (Couple days or so) to see if I can get more progress. I'll update if I do anything.

Right now I think my plan will be to use the Set X/Y and upload a new map to demonstrate the issue it causes with my system for some reason, and if anyone can debug it.
(I cannot for the life of my figure out what the problem is, I've never even seen this issue before with Set X/Y. xD)

I forget what exactly the reason was, but it's something related to movement speed and/or type. Play around with different settings.
 
Level 12
Joined
May 20, 2009
Messages
822
I forget what exactly the reason was, but it's something related to movement speed and/or type. Play around with different settings.

My unit's movement speed is set to 0, and as I'm testing it on ground units such as the Peasant, Footman, Grunt, and Shaman (Because I was testing out Bloodlust), they should all be Foot Movement Type.

EDIT: That seems to be an issue. A unit with 0 movement speed being moved via Set X/Y doesn't have it's actual model move but if it's set to 1 it works fine.

Okay, now I just need to figure out how to get this to work with spells and buildings. I don't need to upload a new thing, yet.

EDIT2:

Okay, now I have a new bug I need to knock out. It's time once and for all that I get animations playing properly with this. It seems as though the real move command, that I have hidden, forces the walk animation to be played and it seems like Set X/Y relies on the real move command to move units. (Which is why the unit's model, hitbox, and etc, don't move but the health bar and selection circle does, when the movement speed is 0, I'm assuming) This makes the animation constantly loop because I'm constantly moving my unit.

In the mean time, here is an updated version of the map.

This version has the movement changes to Set X/Y, and it also fixes a bug where any index other then the first index used the default values.

EDIT: I'm also getting a bit closer to cracking Buff-related speed modification. It's taken a few tries at redoing it, but I think I've got it this time. Please note that this speed modification will be per-buff, and not per ability. So if you use the same buff on two different abilities, you'll get the same speed modification.
 

Attachments

  • Custom Move System0.1.w3x
    28.4 KB · Views: 186
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
Update:

Getting spells and other things that require moving toward a location are nearly functional. They just require a system that will queue my custom move order first. I may not even need to queue it, I might be able to just have them move without intervening an order.

Filtering out non-basic commands and no-target orders, it should be rather simple to get working after that.
 
Status
Not open for further replies.
Top