OK now how can i use the space again without repeating the same actions. I tried stop script. When i press space to continue It puts me in a loop for the first when space is pressed bit of code. Should i just use another Broadcast or is there an easier way?
Offline
Another broadcast did not work still puts me in a loop. Please help!! and Thank you!!
Offline
I guess i should not call it a loop. Its just i set press space to start the game and now i want to press space to continue after a correct answer but when you press space it goes back to start game.
Offline
Well, use a different key for both functions.
Or, you could do it this way:
when gf clicked set [gamestarted v] to (0) when [space v] key pressed if <(gamestarted) = (0)> set [gamestarted v] to (1) put your game blocks here else put your continue blocks here end
Last edited by BoltBait (2012-10-18 18:29:41)
Offline
BoltBait wrote:
Well, use a different key for both functions.
Or, you could do it this way:when gf clicked set [gamestarted v] to (0) when [space v] key pressed if <(gamestarted) = (0)> set [gamestarted v] to (1) put your game blocks here else put your continue blocks here end
Thank you i did not think about a if else statement. That should work!
Offline
This is going to be a game for baby's so i really need to stick with simple keys like space. That is why i don't really want to change the keys. but now i have a lot to change. Making this for my 1 year old. she loves computers especially my keyboard!!
Offline
InfamousGeoff wrote:
This is going to be a game for baby's so i really need to stick with simple keys like space. That is why i don't really want to change the keys. but now i have a lot to change. Making this for my 1 year old. she loves computers especially my keyboard!!
Well then, good luck with making your project! I hope that your daughter likes your game!
Offline
Can you post it to the website?
Offline
Walkthrough101 wrote:
Can you post it to the website?
Will do as soon as i finish. This is actually gonna be my project for CS 50. But i figured i would try to make something useful for my little girl in the process. only have another week to get it done and still having some issues with the space bar being implemented as different commands. If/else i do not think will work for this. I need to find a way to possibly hide my previous command or ignore it and start a new one. or else i am gonna have to use a mouse pointer touching or something else. She really loves to peck on my keyboard. So i hope to get the space bar to work for me as it is the most hit key.
Offline
Ahh figured it out just using a if statement and a hidden variable. when space key pressed add 1 to variable. If variable is 1 broadcast 1 thing/ if variable is two broadcast another and so on. now to rewrite everything. thanks BoltBait was looking at your idea as i figured it out.
Offline