This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-07-15 05:18:03

yavol
Scratcher
Registered: 2009-07-05
Posts: 4

mouse controls for a game

I am making a game in which you move your character only using the mouse! (you can see the very first version of the game on my profile) the whole game will be controlled only using the mouse! nothing else! the problem is.... that I'm thinking about making an attacking skill but I don't know how to do it,  sad  I was thinking that if you move your cursor down then up you would do uppercut... but I have know idea how to do it... plz help...........









I've only made the jumping and walking part so far....

Offline

 

#2 2009-07-15 06:06:51

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: mouse controls for a game

yavol wrote:

I am making a game in which you move your character only using the mouse! (you can see the very first version of the game on my profile) the whole game will be controlled only using the mouse! nothing else! the problem is.... that I'm thinking about making an attacking skill but I don't know how to do it,  sad  I was thinking that if you move your cursor down then up you would do uppercut... but I have know idea how to do it... plz help...........

I've only made the jumping and walking part so far....

That is quite an interesting challenge!  To do that, you have to not only look at where the mouse is but where it has been in the past and maybe even look at how long ago it was there (so the actions have to happen in a certain number of seconds, maybe). 

A much simpler approach would be to have hot spot areas on the screen that when the mouse is over them, trigger an action of some sort.  Or, you could break the screen up into vertical zones and if the mouse were in a certain range of Y values, an action would be triggered. 

I don't know if either of those simpler approaches would work with your game...and don't let me discourage you (or others) from trying to get the mouse-gesture approach to work.  But I don't have a good handle on how it could be done at this point.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2009-07-15 07:19:43

yavol
Scratcher
Registered: 2009-07-05
Posts: 4

Re: mouse controls for a game

that's for the help, i never thought of those kind of approaches... thanks  big_smile

Offline

 

Board footer