Jump to content
  • 0

Common event causing stutter while moving


CharmingClyde

Question

I currently have a comment event setup for my driving game, where if you have a certain suspension item equipped it changes the sprite that shows that you're lowered and if you don't have it equipped, to change it back to the original sprite. Both are autorun events but it seems like every few tiles you move it's probably refreshing the event causing a stutter as removing the event the movement is completely normal. Is there anyway i can do something like this using the event system that doesn't cause a stutter?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 3
2 hours ago, CharmingClyde said:

I currently have a comment event setup for my driving game, where if you have a certain suspension item equipped it changes the sprite that shows that you're lowered and if you don't have it equipped, to change it back to the original sprite. Both are autorun events but it seems like every few tiles you move it's probably refreshing the event causing a stutter as removing the event the movement is completely normal. Is there anyway i can do something like this using the event system that doesn't cause a stutter?

 

Create a new Player Variable called "Suspension Active" set it to Boolean and on your Autorun event have it do a conditional check for "Item is Equipped = Suspension" and "Player Variable 'Suspension Active' = False" in the same conditional list. Have the first line of the Event change the player's sprite, and then the second line change Player Variable "Suspension Active" to True. Create a second page on the same Common Event, conditions are "Item is Equipped = Suspension" (Make sure you hit NEGATED on the bottom so that the condition checks if that item is NOT equipped) and "Player Variable 'Suspension Active' = True" The first line of this page should be setting the character's sprite back to normal, then the second line setting Player Variable Suspension Active = False. Hopefully that mess was somewhat understandable. The issue you have now is that you're using an autorun with no checks so it's spamming that event constantly every few milliseconds. With these checks in place it will only check to change the sprite when your suspension item is equipped once and then check again when you unequip it to set it back to normal.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...