Unit Counters Hand When Moving Long Distances
Moderators: Jason Petho, Campaign Series Matrix Edition Development Group
-
- Posts: 29
- Joined: Tue Feb 06, 2018 9:09 am
Unit Counters Hand When Moving Long Distances
I am not sure if this is an issue or a limitation of the engine, but when I select a unit that can move a long way, such as a helicopter, I noticed that longer distances causes the unit to move 4-6 hexes before the screen hangs for a bit, and the action resumes once they get to their destination. It's strange because moving only a few hexes doesn't cause the same issue.
RE: Unit Counters Hand When Moving Long Distances
Never observed that. Could be a quirk in your graphics driver?
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
- Jason Petho
- Posts: 17400
- Joined: Tue Jun 22, 2004 10:31 am
- Location: Terrace, BC, Canada
- Contact:
RE: Unit Counters Hand When Moving Long Distances
I've noticed this in 3D when zoomed out quite a bit.
Not 2D though, works as expected in 2D
Not 2D though, works as expected in 2D
-
- Posts: 29
- Joined: Tue Feb 06, 2018 9:09 am
RE: Unit Counters Hand When Moving Long Distances
I only notice it in 3D. 2D doesn't have any issues.
RE: Unit Counters Hand When Moving Long Distances
I have also experienced this in big maps starting when I tried completing Bootcamp 3 where the choppers need to travel long distances.
RE: Unit Counters Hang When Moving Long Distances
On second thought...
In Manual/LUA_FUNCTIONS_REFERENCE.txt, there is this:
FUNCTION
unset_move_tracking ()
DESCRIPTION
Toggles OFF game engine unit movement tracking, thereby on_unit_move() is not triggered.
Consider calling this function (in on_startup(), and on_resume()) if game performance lags.
INPUTS
none
RETURN VALUE
none
EXAMPLES
unset_move_tracking()
SEE ALSO
set_move_tracking ()
is_move_tracking ()
move_tracking ()
And its companion function:
FUNCTION
set_move_tracking ()
DESCRIPTION
Toggles ON game engine unit movement tracking, thereby triggers on_unit_move().
INPUTS
none
RETURN VALUE
none
EXAMPLES
set_move_tracking()
SEE ALSO
unset_move_tracking ()
is_move_tracking ()
move_tracking ()
There is much processing overhead as, in real time, the game engine communicates the details of movement to the CSEE. Add to that the extra processing required to render the 3D, yes, you might observe the occasional stutter.
One fix would be to get in the habit of using the 8 or 9 hotkey to 2D zoom out before long-distance helo moves, then use the appropriate hotkey to toggle back to your earlier map zoom level.
Also note the first two bullet point items here:
http://www.matrixgames.com/forums/fb.asp?m=5132033
If the above suggestions don't suffice, if this issue continues to be terribly bothersome, you might consider adding the highlighted to your user.lua file (located in the top-level game folder):
------------------------------------------------------------------------------------------------------------------------
--[[
user.lua -- called each time a scenario is started, or resumed (after a save and scenario restart).
Intended for global identifiers, "uber functions" (unofficial, subject to change), and other shared, common odds & ends.
--]]
------------------------------------------------------------------------------------------------------------------------
--[[
-- With DEBUG=true, user.lua, init.lua, and all [scenario filename].lua files in Scenarios folder will adapt to this setting;
-- use when debugging your Event files.
-- Hand edit the DEBUG toggle here, maybe, but better to set DEBUG at the game engine command line with the -G switch
-- (sets DEBUG to true; omitting the switch, DEBUG defaults to false); and/or use Ctrl+Alt+G in-game to goggle DEBUG=true
-- DEBUG=false.
DEBUG = false
#DEBUG = true
-- Note also that the command-line switch -E toggles on/off Lua script execution tracing.
-- In addition to the command-line switch -L# (e.g., -L3) to raise/lower the game engine LogLevel (higher is more verbose,
-- and slower).
-- With all logging cranked up to the max -- ... -G -E -L5 ... -- the game will run glacially s-l-o-w, so beware!
--]]
------------------------------------------------------------------------------------------------------------------------
unset_move_tracking ()
------------------------------------------------------------------------------------------------------------------------
The above would toggle OFF movement tracking in all scenarios. Not advised.
If it is bothersome only in some scenarios, you can instead try this (as mentioned in the LUA_FUNCTIONS_REFERENCE.txt):
Consider calling this function (in on_startup(), and on_resume()) if game performance lags.
You would do that edit in individual scenario Lua files' on_startup() and on_resume().
Try not to do any of this; try to leave ON movement tracking, the default. Because otherwise on_unit_move() is not triggered, and the CSEE (and the SAI) are deprived of real-time movement and unit location updates thereby. That could have bad CSEE/SAI implications. So only turn movement tracking OFF if you really feel the need to.
It might be something else, but this movement tracking thing might be the prime suspect.
Good luck.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
- Crossroads
- Posts: 18151
- Joined: Sun Jul 05, 2009 8:57 am
RE: Unit Counters Hang When Moving Long Distances
I’ve never seen this in 2D either if it helps.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
---
CS: Vietnam 1948-1967 < v2.00.03 Remastered Edition (May 20, 2025)
CS: Middle East 1948-1985 < v3.00.03 Remastered Edition (May 20, 2025)
RE: Unit Counters Hang When Moving Long Distances
To my surprise, I can't reproduce the problem anymore, I am currently using the 1.01b uploaded last January 27. I'm just trying to find where the problem seems to start in order for me to save and apply the changes in the Lua before continuing my test if it works.
I hope the problem is actually resolved in this current build, if not then I'll just bear with the short hang since it's not a real-time game where every second counts or just try the Lua fix (for curiosity's sake) just to see if that is really the cause of the problem. I can also switch to 2d for a better experience but I am still getting used to the camera controls of CSVN. Thank you very much for the feedback and help!
I hope the problem is actually resolved in this current build, if not then I'll just bear with the short hang since it's not a real-time game where every second counts or just try the Lua fix (for curiosity's sake) just to see if that is really the cause of the problem. I can also switch to 2d for a better experience but I am still getting used to the camera controls of CSVN. Thank you very much for the feedback and help!
-
- Posts: 29
- Joined: Tue Feb 06, 2018 9:09 am
RE: Unit Counters Hang When Moving Long Distances
It's not a big enough of an issue to worry about other than just to confirm it's not some issue I alone am having. The game only hangs for a short time, and if it does bug me, I could also just move no more than 4-5 hexes as a time. Thanks for looking into it for us!
RE: Unit Counters Hang When Moving Long Distances
Hi! Are you currently playing using the 1.01b version of the game?
-
- Posts: 225
- Joined: Tue Apr 28, 2009 8:39 pm
- Location: USA
RE: Unit Counters Hang When Moving Long Distances
1.01b won't help much unless its scenario specific and that scenario was updated. The .exe's were not updated in 1.01b but will be in the official patch.
-
- Posts: 29
- Joined: Tue Feb 06, 2018 9:09 am
RE: Unit Counters Hang When Moving Long Distances
Hey,
No, just the 1.00 version.
No, just the 1.00 version.
RE: Unit Counters Hang When Moving Long Distances
Hi! if you are still interested, you can try installing the 1.01b patch located here and try it with the scenario that you are currently playing to see if the problem still persists because I can't reproduce it anymore on my end.
-
- Posts: 29
- Joined: Tue Feb 06, 2018 9:09 am
RE: Unit Counters Hang When Moving Long Distances
Thanks! I looked again, and I remember downloading the patch. So it looks like I already have it. That's okay, though, as the problem isn't a big deal. I shouldn't be moving that many hexes at a time as it is 
