Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: "Idle time" tracking?  (Read 4309 times)

0 Members and 1 Guest are viewing this topic.

Marek

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
"Idle time" tracking?
« on: June 26, 2004, 03:55:12 PM »

I'd love to have a function that returns the number of seconds the user hasn't a) interacted with anything or b) moved the mouse.

For example when the user hasn't done anything for X minutes, I could give him a new hint. This could also be used for things like idle animations, 'screensavers' or returning users to a menu screen when the game has been idle for a while (this would be really useful for my game for example, since I have to show it at an event where people will probably play for only 5 minutes or-so ... I could make it so that it automatically resets the game when no one is playing it).

Maybe there's a way to do it already, but a function for it sure would make it easier.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "Idle time" tracking?
« Reply #1 on: June 26, 2004, 04:52:21 PM »

This can be achieved by periodically tracking actor's Ready state. If the actor stays "ready" we can assume the player haven't interacted with anything.

See this thread for an example script: http://forum.dead-code.org/index.php?topic=585.0

As for mouse movement, it could be done similarly; by remembering the original mouse position and periodically checking if it has changed or not.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.015 seconds with 20 queries.