Do you ever play FishChomp games in Scratch that the big fish have to eat small fish by following the mouse pointer? Or have you imagined your bee looking for pollen in the flower by following the movement of the mouse pointer? Interaction between mouse pointer and Sprite objects are very important in creating video games. But we are only know how to build behavior of single Sprite until now. We still don't understand how script from one Sprite could interact with other object.
Now let's we try. This interaction can be build with three step of logics. First, we must changing the direction of the Sprite object towards the mouse pointer. We can do this by using "point towards mouse-pointer" block. Don't forget to click the down-arrow and choose mouse-pointer from the list. Second, we have to move the Sprite object in that direction several steps. We can get this by picking "move ... steps" block . And the last step is adjusting the distance and speed between the movement of mouse pointer and the movement of our Sprite object. This can be done with delay block . But we have to make some experiment to determine how much step and how long the delay every cycle of program, to find the best response of our object to the movement of our mouse pointer.
We have develop program that produces the effects of the interaction. Now you can feel how easily the program interaction between Sprite objects and mouse pointer in the Scratch. You can use this stack for various effect in your games.
Thanks for this - you saved my life!! And it's so ludicrously simple...
ReplyDeleteyeah. Thank for this. It gave me an idea for a game. :D
ReplyDeleteYou could just use The block Forever (control) and the block go to (motion) and select mouse-pointer. This would make it continuously follow the cursor.
ReplyDeleteCan I simply say what a relіef to uncоver an individuаl whо tгuly understаnds whаt they're talking about on the web. You definitely know how to bring an issue to light and make it important. More and more people ought to read this and understand this side of your story. I was surprised that you're not more popular gіvеn that you certainly havе thе gift.
ReplyDeleteMy ωeb page: Same Day Payday Loans
Article writіng is alѕo a fun, if
ReplyDeleteyou be famіliar with after that you can writе if nоt it is difficult to write.
Havе a looκ at my web-site; payday loans
fatty liver treatment in hindi fatty liver treatment in hindi fatty liver treatment in hindi
ReplyDeletemy blog ... what to eat to reverse fatty liver
penis
ReplyDelete