Quote: --- Original message by: Spartan314
Don't think I've ever seen something like this
This is cool
Nice that you got it syncing across all clients
Thanks. This is prone to breaking because the player index is always changing, if I could find a way to give the player a static identifier, this could very much work. I tried assigning the player to a blank encounter and using (unit (list_get (ai_actors blank0) 0)), but that only works for players already joined.
Edit: I have a way around this issue now, and I have a test map that supports up to four players, the rest are not scripted yet.
Flashlight turns on flying mode, action button leaves flying mode. This doesn't work correctly on dedicated servers yet.
The script runs on both the server and client, allowing clients to have movement that would match what a host would see. It uses a drone biped set up for flying with the drone animations set up for flight, it has a seat for the player to enter. Scripts load and unload the player from this biped on both the client and server when the flashlight is on. When the player index is updated, all players are kicked out of flying mode. So when someone dies or joins/leaves a game, you are kicked out of flying mode but can re-enter right after.
The client may experience some offset players that are in flight mode because the client has different calculations compared to the host. I'm looking into ways of fixing this.
The issue with dedicated servers is that I cant exit the bugger biped for some reason. The server just wont let me and I'm trying to figure this out.
Any help or ideas to improve this would be greatly appreciated.Edited by JadeMcLain on Nov 30, 2018 at 07:36 AM