when gf clicked set [œ v] to [0] forever if <touching <item (length of (œ))>?> change [œ v] by ((join (mouse x) ([sin v] of (œ) * ([e^] of ((œ) + (pick random (œ) to (œ))?> end repeat ((length of (œ) + (pick random [1] to [23])) change x by (œ) change y by ((œ) * [45644637583294596]) endlol
Last edited by Liamadams (2013-04-26 17:09:11)
Offline
when [any v] key pressed if <(keypressed) > (0)> broadcast [keypress v] else Sorry, an internal error was encountered in the system. Press any key for assistance. If (assistance doesn't come) Scream at top of lungs and pound on keyboard. end end Press any key to continue... :D
Offline
I seem to get lag on Scratch when I have a gigantic chain of if/else stuck together, e.g. in my W.I.P. Sonic game:
when I receive [Sound Test! v] set [Audio Track Selected v] to [1] set [Zone v] to [Sound Test] switch to background [SOUNDTEST v] show variable [Audio Track Selected v] stop all sounds play sound [race results v] forever if <<(Audio Track Selected) = [1]> and <key [g v] pressed?>> stop all sounds play sound [Sonic_Jump_Sound v] else if <<(Audio Track Selected) = [2]> and <key [g v] pressed?>> stop all sounds play sound [S3extralife v] else if <<(Audio Track Selected) = [3]> and <key [g v] pressed?>> stop all sounds play sound [AngelIslandZoneAct1 v] else if <<(Audio Track Selected) = [4]> and <key [g v] pressed?>> stop all sounds play sound [MysticCaveZone v] else if <<(Audio Track Selected) = [5]> and <key [g v] pressed?>> stop all sounds play sound [Sonic 2 Boss v] else if <<(Audio Track Selected) = [6]> and <key [g v] pressed?>> stop all sounds play sound [Sonic CD Title Screen v] else if <<(Audio Track Selected) = [7]> and <key [g v] pressed?>> stop all sounds play sound [14-game-over v] else if <<(Audio Track Selected) = [8]> and <key [g v] pressed?>> stop all sounds play sound [race results v] else if <<(Audio Track Selected) = [9]> and <key [g v] pressed?>> stop all sounds play sound [sonic drop rings v] else if <<(Audio Track Selected) = [10]> and <key [g v] pressed?>> stop all sounds play sound [sonic die v] else if <<(Audio Track Selected) = [11]> and <key [g v] pressed?>> stop all sounds play sound [stage alter v] else if <<(Audio Track Selected) = [12]> and <key [g v] pressed?>> stop all sounds play sound [Sonic Advance 3 Boss Pinch v] else end end end end end end end end end end end end end end
Offline
when gf clicked repeat until <(timer) > [10]> go to [mouse-pointerblahblag v] end think [Scripts in your posts!] for (3) secs
Offline
Skylord_Guthix wrote:
I seem to get lag on Scratch when I have a gigantic chain of if/else stuck together, e.g. in my W.I.P. Sonic game:
when I receive [Sound Test! v] set [Audio Track Selected v] to [1] set [Zone v] to [Sound Test] switch to background [SOUNDTEST v] show variable [Audio Track Selected v] stop all pinks play sound [race results v] forever if <<(Audio Track Selected) = [1]> and <key [g v] pressed?>> stop all pinks play sound [Sonic_Jump_Sound v] else if <<(Audio Track Selected) = [2]> and <key [g v] pressed?>> stop all pinks play sound [S3extralife v] else if <<(Audio Track Selected) = [3]> and <key [g v] pressed?>> stop all pinks play sound [AngelIslandZoneAct1 v] else if <<(Audio Track Selected) = [4]> and <key [g v] pressed?>> stop all pinks play sound [MysticCaveZone v] else if <<(Audio Track Selected) = [5]> and <key [g v] pressed?>> stop all pinks play sound [Sonic 2 Boss v] else if <<(Audio Track Selected) = [6]> and <key [g v] pressed?>> stop all pinks play sound [Sonic CD Title Screen v] else if <<(Audio Track Selected) = [7]> and <key [g v] pressed?>> stop all pinks play sound [14-game-over v] else if <<(Audio Track Selected) = [8]> and <key [g v] pressed?>> stop all pinks play sound [race results v] else if <<(Audio Track Selected) = [9]> and <key [g v] pressed?>> stop all pinks play sound [sonic drop rings v] else if <<(Audio Track Selected) = [10]> and <key [g v] pressed?>> stop all pinks play sound [sonic die v] else if <<(Audio Track Selected) = [11]> and <key [g v] pressed?>> stop all pinks play sound [stage alter v] else if <<(Audio Track Selected) = [12]> and <key [g v] pressed?>> stop all pinks play sound [Sonic Advance 3 Boss Pinch v] else end end end end end end end end end end end end
fixed.
Last edited by PresidentialNyan (2013-04-17 20:46:37)
Offline
// when flag clicked change <x position> by <y position> // // repeat <when Green Flag clicked> // if <when i receive [10 v]> // // // if end end end
Last edited by PresidentialNyan (2013-04-17 20:51:02)
Offline
[scratchblocks]
when gf clicked
think [i hope this works...] for (1) secs
say [yay it worked!] for (1) secs
random star block
[scratchblocks]
Offline
GiorgosKarvelas365 wrote:
when gf clicked wait until <key [enter v] pressed?> wait until <not <key [enter v] pressed?>> if <[Drive sensor motor v] is moving> point in direction (90 v) else if <(battery voltage) = [0]> stop all end end
Fixed. And also, there isn't a key [enter] pressed block.
Offline
beyen wrote:
when gf clicked if <<(popcorn) * <<when gf clicked> * <join (3.1415926535897932384626433832795028841971693993751058209749445923) (smelly old sock)>>> = (300)> say <[universe v] contains <item (last v) of [3.1415926535897932384626433832795028841971693993751058209749445923 v]><when gf clicked <when gf clicked>><when [space v] key pressed <I die! no, just kidding.>><when I receive [nothing v] <clear>>> else repeat (165) turn right (2) degrees say [whee!] for [0.01] secs end repeat (5) play sound [glitch v] until done end stop all pinks stop all end
Offline
Sparkle3000 wrote:
when gf clicked think [i hope this works...] for (1) secs say [yay it worked!] for (1) secs random star block
Fixed, just forgot your "/" in scratchblocks.
Offline
canadiandufus wrote:
when [poop v] clicked
Fixed.
Offline
themakerbaker wrote:
when gf clicked forever stop all reds stop all blues stop all pinks stop all horrible cheeseburgers at mcdonalds stop all bad chicken at kfc stop voices at stores stop logo changing
fixed.also, it's stop all pinks and forever blocks are flat at the bottom.
Offline
Test1
[scratchblcocks]
stop all pinks
[/scratchblocks]
and much more
Offline
stop all you cant do that
Offline
GiorgosKarvelas365 wrote:
Test1
stop all pinksand much more
Fixed.
Offline
when gf clicked forever if <<touching[mouse-pointer v> and <mouse down> go to [mouse-pointer v]first test lol
Offline
when gf clicked forever if <<touching [mouse-pointer v}> and <mouse down> go to [mouse-pointer v]welp trying again
Offline
when gf clicked forever if <<touching [mouse-pointer v]> and <mouse down> go to [mouse-pointer v]welp trying again
Offline