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:
I hope that helps.whenclicked
foreverifmouse downchange variable by 1elseset variable to 0ifvariable > 20set variable to 0Do whatever
Last edited by pi3 (2012-03-18 12:55:41)
Offline
Try this:
It should be "timer > 4.5"whenclicked
foreverifmouse down?reset timerwait untilnotmouse down?whenclicked
foreverifmousedown?andtimer4.5wait.5secsifmousedown?andtimer4.5do script
Last edited by MoreGamesNow (2012-03-18 13:00:07)
Offline
whenclicked
ifkeyspressed?crouchwait untilnotkeyspressed?stand
Last edited by MoreGamesNow (2012-03-18 13:01:31)
Offline
MoreGamesNow wrote:
whenclicked
ifkeyspressed?crouchwait untilnotkeyspressed?stand
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