Just problems in general :?

chosenonestudioschosenonestudios Member Posts: 1,714
edited November -1 in Working with GS (Mac)
ok basically, I'm just doing a add on for my game....

Explaining:

the main character goes back and forth across the screen (to dodge stuff) I added a button to "shoot stuff"

Code:

button, when button is pushed, change game.firebutton to 1 when button is released change game.firebutton to 0

main actor, (the one that moves back and forth) constrain attribute game.maincharacter x to self.position x (same for y value)

spawner, when game.firebutton = 1, spawn actor (missile),

spawner, (still) constrain attribute self.position x to game.maincharacter x (same for y)

missile, move 90 degress at (300 speed)

Problems: sometimes the button works sometimes it doesn't (i have the missile actor on screen and it works, but if you barely take it off, it'll stop (and even when it kinda works, it doesn't work very well haha) )

Conclusion: If you see some problems in this or more efficient ways to do it please let me know, or if its just in general wrong, please show me how to do it! Thanks in advance:)

Comments

Sign In or Register to comment.