Pages: 1
Topic closed
So basically I just want to hold the left mouse down for a while and eventually it will do what I want it to do but if you/I don't hold it down it won't do it?
ummmmm so i'm working on a game and you click to attack and hold down click to block so what i'm saying is that how do I get it to only register if I hold it down,
I tried with variables but no success,
also he crouches and its S to crouch and so I want it I hold down S to crouch not just press s and then he crouches, and then once I release S he stands up, wow I just realize alot of this game involves holding down.
Last edited by FINGIN (2012-03-18 12:56:50)
Offline
Here's my first attempt at scratchblocks:
when gf clicked forever if < mouse down > change variable by 1 else set variable to 0 end if ( variable > 20 ) set variable to 0 Do whatever end endI hope that helps.
Last edited by pi3 (2012-03-18 12:55:41)
Offline
Try this:
when gf clicked forever if<mouse down?> reset timer wait until <not <mouse down?> > end end when gf clicked forever if <<<mousedown?> and <(timer)>[4.5]> > wait (.5) secs if<<<mousedown?> and <(timer)>[4.5]> > do script end end endIt should be "timer > 4.5"
Last edited by MoreGamesNow (2012-03-18 13:00:07)
Offline
when gf clicked if<key [s] pressed?> crouch wait until <not <key [s] pressed?>> stand end
Last edited by MoreGamesNow (2012-03-18 13:01:31)
Offline
MoreGamesNow wrote:
when gf clicked if<key [s] pressed?> crouch wait until <not <key [s] pressed?>> stand end
For that one to work, I think you need a forever block around it.
Last edited by pi3 (2012-03-18 13:05:07)
Offline
pi3 wrote:
Glad I could help!
Yeah, thanks for that. That was kind of embarrassing xD
Offline
Topic closed
Pages: 1