Has anyone played the internet game fishy? Im making a game like that but i dont know how to make my sprites glide the way fishy does. when i press one of the arrow keys i want the main sprite to move in that direction like the main sprite in fishy does. Does anyone have a script that i can use?
Offline
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[--> ]pressed?>[/blocks]
[blocks]<point in direction(90[/blocks]
[blocks]<move(10)steps>[/blocks]
You can modify that, but that's the basic moving thing. Or:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[--> ]pressed?>[/blocks]
[blocks]<change x by(10[/blocks]
I sometimes use the second one, IT's good sometiems
Last edited by Bluestribute (2008-05-19 18:42:30)
Offline
I have never heard of fishy, but Archmage has a very good shooting motion script: When green flag clicked forever repeat until touching edge change x by sine of direction times 15. For y, it is the same thing but cosine of direction instead of sine. You can have it activate however you want, and it will make smooth movement.
Last edited by Cyclone103 (2008-05-19 19:04:17)
Offline
Thanks, but im already using that script. just look up fishy in google search and u can find a "fish eat fish" game somewhere. The script i want will still leave your fish gliding to a stop when the key isnt pressed.
Offline
hmmm. Is the length it moves gliding to a stop always the same or is it dependent on how far it has moved? if it is the same, just add a set number to the end of it. If it is dependent, just make a variable that changes by 1 every_____secs, and then just have it move that variable steps.
Offline
Try looking at the premade sprite called friction marble in the things section of the example sprites folder. Or you could just download other fishy projects.
Offline
Just have it repeat until not (key_____pressed), which will tell it to move until you let go.
Offline