First of all I am NOT a newbie to scratch. I am, in fact, quite adept at it (Although I would like to hear your say on that).
I need some help with a reset script on my arcade mode for my incomplete Pacman project here: http://scratch.mit.edu/projects/Anonymuss/2320403
I want to reset my score dots like this:
when gf clicked forever if < score = [any multiple of score you get after all points are collected] > set hide to 0 show(Forget the errors, it will work out in the engine) If there is any way to do this, I would be most grateful (However the only thing I really need help with is the <If score => statement, I can work the rest out by myself)
Offline
I may be able to help.
1.)Set up a variable that detects how many 'things' Pacman has ate (sry, forgot what the things are called).
2.)Then do something like this:
if <(Things Pacman Ate) = [whatever]> brodcast [stop v] set [Score v] to <(Score) + (Things Pacman Ate)> endJust tell me if I'm not understanding correctly.
Last edited by ads98 (2012-02-09 15:35:50)
Offline
I already have the score system, I just need a way for it to be able to detect any multiple of the amounts of things he eats in the game, without having to rewrite it in an 'or' statement a couple of thousand times.
So say the amount of things I have is 32. I don't want to go around saying 'if score = 32 or 64 or 96 or ETC. I just want a quick and easy way to go 'if score = anything that is a multiple of 32'
would the (_) X (_) Command in operatives work? I'm not sure
thanks anyway
-anonymuss ¦D :3
Offline
Try using the
((n1)mod(n2))block. It reports the remainder when dividing n1 by n2. If it reports 0, then you have a multiple. That's how I understand it anyway, take a look at the Wiki page for more information.
Last edited by sparks (2012-02-10 12:00:38)
Offline