Shooting one way but not the other?? Help!

Superior Games

  • Posts: 6
So my character is moving fairly smoothly, and jumping fine. But when I shoot I have issues. Shooting to the left seems to work okay, fast and correct, a bit buggy. But shooting to the right, the "bullet" just kinda falls to the side of him. Mind you I do have gravity on for the "bullet" actor, but I also have x speed set for 80, so, should move quicker than just falling, as it does when I shoot to the left. I am pretty much a beginner with stencyl, and this has me stumped. I will include my "shooting" event code. Any help is appreciated!!

-------'When Updating'- Shooting
---------------when updating
                            if <space bar> is <down> and Shoot = True
                           create "bullet at x of self and y of self
                           if <current animation for self >=Idle
                           kill last created actor
                           if <current animation for self> = walk left or jump left
                           set x speed to -80 for last created actor
                           if <current animation for self> = walk right or jump right
                           set x speed to 80 for last created actor
                           set shoot to false
                           do after 1.3 seconds
                           set shoot to true
                           kill last created actor

Like I said I am beginner, so if I've left out important info to help me solve this please let me know! Thank you!!

Superior Games

  • Posts: 6
Problem solved. was a grouping issue. I had my bullet colliding with my character when moving right. I switched the bullet to a player group, turned collision with my character off and everything is working fine.