Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » AFK Checker
- Westech60
- Scratcher
84 posts
AFK Checker
You could check to see if the x and y pos are the same after maybe 3 minutes.
Just because there's a workaround doesn't mean it shouldn't exist.
- JaCreatot
- Scratcher
100+ posts
AFK Checker
All you need is to check if nothing changes, make a timer variable, when it reaches a certain time in seconds have it activate the afk code. The check could check x&y, cursor position, clicks in a certain time, many things, they just have to be something common.
Profile//Featured Project: CatQuote Quote Search Engine//Territorial.Io Scratch Edition Collab//⚡Scripts, Art, Sounds, & Animations Shop ⚡ //Scratch Site Hunt//LAOTC (Platformer Series) Studio//My Scratch GitHub Tracker
If you find my responses helpful, please consider following me! My Alternate Accounts Are:@JaCrealtot, @AtlasKone, @OfNoNames//Front Page Curated Projects:1- The_Imaginarium
- Scratcher
1000+ posts
AFK Checker
forever
set [Old mouse x v] to (mouse x)
set [Old mouse y v] to (mouse y)
if <<key [any v] pressed?> or <mouse down?>> then
reset timer // the user did something
end
if <<not <(mouse x) = (Old mouse x)>> or <not <(mouse y) = (Old mouse y)>>> then
reset timer // the moused moved
end
if <(timer) > [10]> then // replace 10 with the time you want
afk :: #969696
end
end
- Niltoz
- Scratcher
14 posts
AFK Checker
ksforever
set [Old mouse x v] to (mouse x)
set [Old mouse y v] to (mouse y)
if <<key [any v] pressed?> or <mouse down?>> then
reset timer // the user did something
end
if <<not <(mouse x) = (Old mouse x)>> or <not <(mouse y) = (Old mouse y)>>> then
reset timer // the moused moved
end
if <(timer) > [10]> then // replace 10 with the time you want
afk :: #969696
end
end
thanks
- Binary-Logic
- Scratcher
100+ posts
AFK Checker
I made one here if you need it.
The greatest glory in living lies not in never falling, but in rising every time we fall.
-Nelson Mandela
- satyasundar
- Scratcher
19 posts
AFK Checker
hey, idk how to make the afk button
The AFK button? Well it's quite easy, click the “My Blocks” category (the last category), and then click “Make a Block” then, name the block AFK and add in the following functions as stated above, or add your own functions to it.
Hope this helps!
Last edited by satyasundar (March 31, 2024 08:55:44)
- Unithlees3
- Scratcher
1000+ posts
AFK Checker
why did you bring up a topic from 3 years ago hey, idk how to make the afk button
it was already resolved
Last edited by Unithlees3 (March 31, 2024 11:09:45)
this is a signature, it goes beneath my posts and a link here isn't considered advertising
meh youtube channel is here
- ___lol__---
- Scratcher
2 posts
AFK Checker
forever
set [Old mouse x v] to (mouse x)
set [Old mouse y v] to (mouse y)
if <<key [any v] pressed?> or <mouse down?>> then
reset timer // the user did something
end
if <<not <(mouse x) = (Old mouse x)>> or <not <(mouse y) = (Old mouse y)>>> then
reset timer // the moused moved
end
if <(timer) > [10]> then // replace 10 with the time you want
afk :: #969696
end
end
/scratchblocks][/quote]
- Discussion Forums
- » Help with Scripts
- » AFK Checker