Make a sprite ask if you have the cheat code. Then, if answer = red, give 200 money, else say 'you got it wrong.' Hope I helped
Offline
You could have the cheat ask box appear only in some special condition:
here the player has to press and hold up arrow and c pressed for 3 seconds
when green flag clicked forever wait until < <key [up arrow v] pressed?> and <key [c v] pressed?>> wait (3) secs if < <key [up arrow v] pressed?> and <key [c v] pressed?>> ask [enter secret code...] and wait if <(answer) = [mySecretCode]> say [do something!] end if <(answer) = [myOtherSecretCode]> say [do something else!] end end end
Offline
JSO wrote:
You could have the cheat ask box appear only in some special condition:
here the player has to press and hold up arrow and c pressed for 3 secondswhen green flag clicked forever wait until < <key [up arrow v] pressed?> and <key [c v] pressed?>> wait (3) secs if < <key [up arrow v] pressed?> and <key [c v] pressed?>> ask [enter secret code...] and wait if <(answer) = [mySecretCode]> say [do something!] end if <(answer) = [myOtherSecretCode]> say [do something else!] end end end
Thanks
Offline
or, if you didn't want them to see the cheatcode box, do
forever if <key [space v] pressed?> //clear cheatcode set [cheatcode v] to [] end if <key [a v] pressed?> set [cheatcode v] to (join (cheatcode) [a]) end if <key [b v] pressed?> set [cheatcode v] to (join (cheatcode) [b]) end ... if <key [z v] pressed?> set [cheatcode v] to (join (cheatcode) [z] end if <key [up arrow v] pressed?> set [cheatcode v] to (join (cheatcode) [<up>]) end if <key [down arrow v] pressed?> set [cheatcode v] to (join (cheatcode) [<down>] end if <key [left arrow v] pressed?> set [cheatcode v] to (join (cheatcode) [<left>]) end if <key [right arrow v] pressed?> set [cheatcode v] to (join (cheatcode) [<right>] end if <[codes v] contains (cheatcode)> //if you want to disable a cheatcode you can delete it from this list if <(cheatcode) = [something]> do stuff end if <(cheatcode) = [somethingelse]> do other stuff end ... set [cheatcode v] to [] //clear code so it won't trigger again endrun this in turbo mode
Last edited by joefarebrother (2012-04-13 06:39:22)
Offline
You could do this:
when gf clicked wait until <key [r v] pressed?> wait until <key [e v] pressed?> wait until <key [d v] pressed?> set [money v ] to (200)
Last edited by Optimax-DJ (2012-04-13 12:40:56)
Offline
Sorry for asking this on your topic but I figured out myself how to add cheats to m game, but theres one problem, is there any way to stop people seeing the cheat code if they download the game?
I use the method':
when.p. pressed:
ask. enter cheat code here. and wait.
If answer = ( my cheat code )
do something.
Offline
gamesman12 wrote:
Sorry for asking this on your topic but I figured out myself how to add cheats to m game, but theres one problem, is there any way to stop people seeing the cheat code if they download the game?
I use the method':
when.p. pressed:
ask. enter cheat code here. and wait.
If answer = ( my cheat code )
do something.
You could use a hidden sprite and have the cheat-code asking script in it. Very few Scratchers know how to find hidden sprites. See this.
In my opinion, this is more ethical than forcing Scratch to quit, as people can still remix a project with a hidden sprite.
Last edited by MoreGamesNow (2012-04-13 14:39:40)
Offline
thanks i figured it out after a few tryes and its great thanks so much it will really help.
Offline