.:QUESTION/HELP:. Syncing Lasers

Report any bugs here or ask questions here!

.:QUESTION/HELP:. Syncing Lasers

Postby Zibuya » 30 August 2020, 20:02

This might sound or atleast be kinda complex, however: I need to synchronize lasers via either variables, or some kind of movables. Basically, i need it for my map called zibuya-energy. Theres a battery that charges up, and once it's charged up, lasers will be activated that will do damage. The big thing is tho, that this is DM, and it's important for me to have it as DM, COOP and TDM. The battery was made with movables and decorations, not with variables if someone might ask. If somebody know how to sync the damage, then im happy about any response!

Zibuya
Cyber Grub [25]
 
Posts: 44
Joined: 31 October 2019, 17:12

Re: .:QUESTION/HELP:. Syncing Lasers

Postby nightmar » 30 August 2020, 20:58

I do not see how it can be perfectly synced without using vars.
How many bugs does this game have anyway? jeez
User avatar
nightmar
Usurpation Destroyer [350]
 
Posts: 393
Joined: 2 September 2017, 19:36
Location: Inside your closet or under your bed

Re: .:QUESTION/HELP:. Syncing Lasers

Postby jeje52 » 30 August 2020, 21:52

You need to change your design so that it uses variables. I would have a variable that holds the battery power, which would then be synced every time a player joins. After it's synced you of course have to change the battery power that's shown and activate the laser if necessary. This should only be done on the client of the player that joined, so make a 1-second timer that's activated on start, which makes those changes.

If you do that it'll have very basic sync, but as the laser is active for about 9 seconds, it can be 9 seconds off at most depending on when a player joined. An easy fix would be to increase the variable every second so that it's more precise. It would make it go faster, but that's easy to fix (change shown battery power every 3rd second, etc).

So remake it first, then try to sync it. It shouldn't be too difficult if you know variables and how to sync them.
User avatar
jeje52
Civil Security Lite [100]
 
Posts: 146
Joined: 13 April 2018, 19:52


Return to Bug Reporting, Help & Support

Who is online

Users browsing this forum: No registered users



cron