Player object's location lag

Place to get help with not working mods / modding interface.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Player object's location lag

Post by Ranakastrasz »

In multiplayer, if you use a script to get a player's location, it lags behind by a tile or two. This results in any animations you try to place on top of the player sliding behind them. Is there a way to fix this?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Rseding91
Factorio Staff
Factorio Staff
Posts: 15950
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Player object's location lag

Post by Rseding91 »

The location the script is using is the actual player location. The one you see in MP is the local latency state version of the player.

There's no way to get the location of the latency state player because it only exists visually.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Player object's location lag

Post by Ranakastrasz »

Rseding91 wrote:The location the script is using is the actual player location. The one you see in MP is the local latency state version of the player.

There's no way to get the location of the latency state player because it only exists visually.
Hmm. Is there a way to place a visual effect on that local version of the player image?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Rseding91
Factorio Staff
Factorio Staff
Posts: 15950
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Player object's location lag

Post by Rseding91 »

Ranakastrasz wrote:
Rseding91 wrote:The location the script is using is the actual player location. The one you see in MP is the local latency state version of the player.

There's no way to get the location of the latency state player because it only exists visually.
Hmm. Is there a way to place a visual effect on that local version of the player image?
No
If you want to get ahold of me I'm almost always on Discord.
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Player object's location lag

Post by Zeblote »

Rseding91 wrote:
Ranakastrasz wrote:
Rseding91 wrote:The location the script is using is the actual player location. The one you see in MP is the local latency state version of the player.

There's no way to get the location of the latency state player because it only exists visually.
Hmm. Is there a way to place a visual effect on that local version of the player image?
No
why not?
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Player object's location lag

Post by Ranakastrasz »

Is there any way to attach it via some knockoff of the slowdown capsule effect?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Player object's location lag

Post by DaveMcW »

There is no API for lag hiding - everything done in lua is subject to multiplayer lag.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Player object's location lag

Post by Ranakastrasz »

That makes sense. What happens if you hit a player with a slow capsule? Does the effect follow them? Actually, how is the player immune to it in the first place? I actually couldn't figure that out.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5410
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Player object's location lag

Post by Klonan »

Ranakastrasz wrote:That makes sense. What happens if you hit a player with a slow capsule? Does the effect follow them? Actually, how is the player immune to it in the first place? I actually couldn't figure that out.
(I think) it only affects units
Post Reply

Return to “Modding help”