My project is here : http://scratch.mit.edu/projects/Jakekerrigan/3047648
I'm creating a game and I tried to add a double xp powerup.
I've done the timer correct, but I'm having problems with getting the double xp to work. I would appreciate and credit any help given, please download my game and try to figure it out
Offline
Jakekerrigan wrote:
My project is here : http://scratch.mit.edu/projects/Jakekerrigan/3047648
I'm creating a game and I tried to add a double xp powerup.
I've done the timer correct, but I'm having problems with getting the double xp to work. I would appreciate and credit any help given, please download my game and try to figure it out
Well first I have a quick question; do you want the variable Double XP to be a score multiplier or a count down timer?
Offline
A countdown timer. Just 10 seconds or so. So whenever the timer is up everything you collect has x2 points
Offline
Hmm I misread your question. I guess both a countdown timer and a score multiplier?
Offline
Jakekerrigan wrote:
Hmm I misread your question. I guess both a countdown timer and a score multiplier?
No, you answered it correctly. I'll be back in a few minutes...
Okay, so in your Double XP box, you had a script like this:
when gf clicked show variable [double XP v] set [Double XP v] to (10) forever wait (1) secs change [Double XP v] by (-1) if <(Double XP) = (0)> hide variable [Double XP v] end
when gf clicked set [Double XP v] to (0)
when gf clicked show variable [double XP v] set [Double XP v] to (10) repeat until <(Double XP) = (0)> wait (1) secs change [Double XP v] by (-1) if <(Double XP) = (0)> hide variable [Double XP v] end end
when I receive [doubleXP! v] forever if <(touching [sprite1 v]?) and <(Double XP) = (1)>> broadcast [xpBurger! v] end
when I receive [eatenHOTDOG! v] change [score v] by (100)
when I receive [eatenHOTDOG! v] if <(Double XP) > (0)> change [score v] by (200) else change [score v] by (100) end
Last edited by ErnieParke (2013-01-19 12:48:30)
Offline
Can you please upload your version of my game with the scripts you changed? I'm really struggling
-Thanks :3
Offline
Never-mind, it's sorted Many thanks!!!!!!!!!!!!!!!!
Offline
Jakekerrigan wrote:
Never-mind, it's sorted Many thanks!!!!!!!!!!!!!!!!
Your welcome! Also, I should've said this earlier, but hello Jakekerrigan and welcome to Scratch! I wish you good luck with your game!
Offline
Thanks! There is just one problem however. When I start the game and pickup a double xp powerup, the timer doesn't appear. I messed about with some scripts, and now the timer just begins right at the beginning?
Offline
Jakekerrigan wrote:
Thanks! There is just one problem however. When I start the game and pickup a double xp powerup, the timer doesn't appear. I messed about with some scripts, and now the timer just begins right at the beginning?
Could you reupload your project? I think that something went wrong when you were messing around with your scripts.
Offline
http://scratch.mit.edu/projects/Jakekerrigan/3047952
Thanks for all your help
Offline
Jakekerrigan wrote:
http://scratch.mit.edu/projects/Jakekerrigan/3047952
Thanks for all your help
Ah, okay, I see the problem now. When I was giving you the script for the Double XP sprite, I forgot to change the hat block. So, what you have is:
when gf clicked show variable [double XP v] set [Double XP v] to (10) repeat until <(Double XP) = (0)> wait (1) secs change [Double XP v] by (-1) if <(Double XP) = (0)> hide variable [Double XP v] end end
when I receive [doubleXP! v]//Hopefully correct broadcast... show variable [double XP v] set [Double XP v] to (10) repeat until <(Double XP) = (0)> wait (1) secs change [Double XP v] by (-1) if <(Double XP) = (0)> hide variable [Double XP v] end end
Offline
Everything is fixed! Thanks!
Offline