Retro Lord Posted December 22, 2014 Share Posted December 22, 2014 I have some problems with making missile0 dissapear after the firebutton has been pressed. The idea is that missile0 appears at either left or right depending on which direction the joystick is pushed and the firebutton is pressed. I managed too get this part too work. But, I can't figure out how to make it stay for 1 second and then dissapear. I tried adding a counter that starts at 0 and then goes up too 10, and when it hits 10 missile0x and y is set too 200 but that just made missile0 never come at all. Any simple tip on how to set this up? My basic missile0 setup is: if joy0right && joy0fire then k = 1 if joy0left && joy0fire then k = 2 if k=1 then missile0x=player0x + 10 : missile0y=player0y - 6 if k = 2 then missile0x=player0x - 10 : missile0y=player0y - 6 Thanks in advance. Gamecode: Lonks Adventure.bas Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted December 22, 2014 Author Share Posted December 22, 2014 Update: I managed too find a pretty clever solution I think: if missile0y<200 && joy0right then missile0y=200 : missile0x = 200 : k=0 if missile0y<200 && joy0left then missile0y=200 : missile0x = 200 : k=0 Now the "sword" (aka, missile0) dissapears if you move after you've swung it. I feel clever, hehe... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.