I've made a script for bullets in my game but i can only make it go right, because my player can turn right and left, i'm trying to work out how to get the bullet to go left when i press the shoot button
Offline
Could you specify a little more? Is it a top down shooter? Without knowing, can you not set the direction of the bullet to -90 (left) and
point in direction (-90) move (5) steps?
Last edited by Prestige (2012-04-18 17:37:37)
Offline
Do you want the bullets to go the same way as the player is facing?
I think I know what you mean. Try this.
For the Player:
when gf clicked forever if <key [left arrow v] pressed?> point in direction [-90] move [5] steps end if <key [right arrow v] pressed?> point in direction [90] move [5] steps end if <key [any v] pressed?> set [bullet fire v] to [fire] end endFor the Bullets:
when gf clicked forever if <(bullet fire)=[fire]> show go to [player v] point in direction ([direction v] of [player v]) repeat until <touching [anything v]?> move [10] steps end set [bullet fire v] to [0] else hide end
Offline