HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can anyone tell me why my keyboard movement system is jittery at high speed?

07-28-2006, 05:31 PM#1
Sardius
At lower speeds my system works flawlessly, but once you get up to around 400+ movement speed it gets a bit flakey, the animation of the moving hero gets a bit twitchy and I notice the "stop" command is very frequently getting getting flagged, which doesn't happen at lower movement speeds.

Trigger:
Movement
Events
Collapse Conditions
((This trigger) is on) Equal to True
(X Not equal to 0.00) or (Y Not equal to 0.00)
Collapse Actions
Unit - Order Hero1 to Move To ((Position of Hero1) offset by (X, Y))
Wait 0.04 seconds
Trigger - Run (This trigger) (checking conditions)

Trigger:
Release Left
Collapse Events
Player - Player 1 (Red) Releases the Left Arrow key
Conditions
Collapse Actions
Set X = 0.00

Trigger:
Movement Left
Collapse Events
Player - Player 1 (Red) Presses the Left Arrow key
Conditions
Collapse Actions
Set X = (X - 100.00)
Trigger - Run Movement <gen> (checking conditions)

I can post the the movement and release up, right n down triggers as well, but you get the idea, they are all the same aside from the (Set X or Y = -100or +100)

So any idea why my system gets a bit crazy with higher movement speed and how I could fix that or why the stop command seems to keep getting initiated?
07-28-2006, 05:53 PM#2
PipeDream
The wait action is mislabelled. It's not designed for delays, and will be wildly inaccurate when used for them. You'll have to use timers. A periodic trigger event will fit into what you've got now.
07-28-2006, 06:12 PM#3
Sardius
So in the Event of my main Movement trigger, just throw in a periodic timer? How much time would you recommend I put in there?
07-29-2006, 04:56 PM#4
Sardius
Hmm, well that made it worse... I removed the wait and run trigger actions at the bottom and from my other key activated triggers... If I tried some values below 0.10 and it was fine for about the first 10 second, the it became extremely jittery and the movement animation glitcy... I tried .20 and above and same deal, above 400 speed the stop command starts being frequently triggered and its jittery.