Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2017-08-15 18:34:03, last edited by cercul1 (2017-08-16 01:09:50)

cercul1
Member
From: USA
Joined: 2015-02-18
Posts: 91

[Resolved] Efficient way to get position of someone moving

I've noticed that the move event only gets called once their speed changes through either pressing another key or releasing a previously held one.  Is there anyway to constantly check what block they're on when they move.  I need to check when they step on "water", water being a lack of a background.  The only solution I can think of is to have the bot constantly do the "/getpos" command on who ever's turn it is and check the background id at the point, but this seems incredibly inefficient.


Om_1869ea_249353.jpg

Offline

#2 2017-08-15 18:50:38

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Resolved] Efficient way to get position of someone moving

The best way is to just simulate the physics client side, there are a few libraries people have made to do this, I think Jesse made a good one

Offline

#3 2017-08-15 19:00:06

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Resolved] Efficient way to get position of someone moving

Captain9 and Jesse's EEPhysics library can be found here. Capasha seems to be updating it.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by: (5)

#4 2017-08-17 00:54:46

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Resolved] Efficient way to get position of someone moving

pro tip

/getpos is client side only.

Offline

Wooted by: (2)
SirJosh39171502927686673450

Board footer

Powered by FluxBB

[ Started around 1732214184.4122 - Generated in 1.991 seconds, 13 queries executed - Memory usage: 1.43 MiB (Peak: 1.53 MiB) ]