Significant lag when moving and shooting

I have an actor moving(accelerating) in an up/down/left/right direction when it receives a key press (WASD). I also have the actor shoot to the current location of the mouse on mouse click.

Both of these actions work fine when they are done separately, but whenever I try to move AND shoot, the movement and shooting get really buggy. Is there anyway I can fix this, or is this because of a slow machine?

I have attached my current project file for reference.
http://www.mediafire.com/download.php?a3tnp42ta8bpf4d (Mac)
http://www.mediafire.com/download.php?sb9jbo79j1ojdj1 (PC)

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'm not seeing anything unexpected on the Mac version in Preview. The bullet spawns on top of the actor rather than at the mouse click location, but moving and shooting seems fairly smooth. I did notice you have the shoot rule wrapped in a timer which seemed an odd way of setting it up. Might be better to do When Mouse is Down AND self.Time>self.bulletTime+1--> Spawn bullet; Change Attribute self.bulletTime to self.Time.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.