A Memory-Efficient Way To Detect Player Movement

So, on May 16th, we got the Player Coordinates device, which allows us to detect when a player moves, along with grabbing a player’s X & Y coordinates (with some extra number properties). However, if one were to want to detect when a player moves, that’s 3.5% (3.5k) memory down the drain! Here’s a system on how to make a movement detector!

Before anyone asks me, credit to @EggNoodle for making it first.

Materials & Steps
  • Item Granter x1
  • Inventory Item Granter x1 (Optional, but recommended)
  • Movement Meter x1
  • Starting Inventory x1

The Process

First, we want to configure our Starting Inventory device to start us out with 1 banana. Then, for our movement device, configure the speed when out of resource to “1.00.”

Next, get your item granter to grant 2 bananas when receiving on the channel “Player Moves.” Now, the system is set back up again. Optionally, you can add an inventory item manager to disable the item alert.

Extras: Extending for AFK Detection

Now, with this system, we can detect if a player goes AFK. First, add a lifecycle and link it up to a relay so that all players are triggered when the game starts. Then, add a repeater and link it to the relay.

Now, add a counter, set its target value to 30 (or desired amount before AFK kick), and have the counter incremented when the repeater runs a task.

Now, add a team switcher, have it switch the player to spectators, and make sure it recieves from channel “AFK.” Now, if a player is deemed AFK, they’ll be sidelined until the next game.

I’m so tired…

3 Likes

This is actually quite useful for most games,
Let’s say we made a device that puts a tag on AFK peopl, the host will be able to see who’s afk while on call with their friends and scream/ask them why they afk get back on the game

Seriously though, great guide. Haven’t seen stuff this good before.

Clever way of doing this… would the banana mechanism just be to alert the player? I don’t totally get how it would alert anyone else… nice memory-saving option though. The AFK monitor is a really good idea! Also, welcome to the forums!

No. I tested the system with a notification to make sure it works. You should use an inventory item manager to hide the banana alerts. Thanks for the welcome
:blush:

Oh, OK! To be honest, I’ve never actually used an inventory item manager (I’ve never made a setup that needs one) so I didn’t know you could do that :slight_smile: :upside_down_face:

Never use repeaters

Wait, there is a Player Coordinates Device?!
But good Guide!

I know repeaters are bad for memory efficiency, but aren’t they easier to understand in a guide? If you were going to use this in a game, it would make sense to use a trigger loop instead, but isn’t it OK to use a repeater in a guide?

It’s definitely not ok if you’re making a guide on a MEMORY-EFFICIENT way to detect player movement.

4 Likes

Oh yeah…
(me just realising that I totally forgot that was part of the guide)
Yeah, you’re right…

MB yall, I can’t edit anymore tho :frowning: