Results 1 to 9 of 9

Thread: Buttons not showing and/or showing at the wrong position for clients

  1. #1
    Join Date
    Sep 2016

    Buttons not showing and/or showing at the wrong position for clients

    I've been receiving multiple reports of buttons not showing up correctly in my mod from players. You can view the comments here:


    According to them, the problem is only visible by some clients, while the host never sees the issue. It's frequent enough that it happens at least once for multiple players every game, and it happens regardless of who is hosting.

    I feel it's at least partially related to changing most of the buttons to spawn on scripting zones instead of objects, using the following code:

    --creates a button at the given position, dimensions, scale, and rotation
    function createArbitraryButton(params)
        local objectParams = {}
        objectParams.type = "ScriptingTrigger"
        objectParams.position = params.position
        objectParams.scale = params.scale
        local zoneObj = spawnObject(objectParams)
        buttonParams = {}
        buttonParams.position = {0, 0, 0}
        buttonParams.rotation = params.rotation
        buttonParams.width = params.width
        buttonParams.height = params.height
        buttonParams.index = 1
        buttonParams.label = params.label
        buttonParams.font_size = params.font_size
        buttonParams.click_function = params.click_function
    However, there was a mention of it happening when the button is created on an object as well. Just a note, the above code is needed to avoid stretching caused by scaled objects: [url][/url]
    I could undo the code, but the buttons will go back to being warped and stretched, and as I mentioned, it seems to happen even then.

  2. #2
    Join Date
    Sep 2016
    Correction, I don't know of this issue occurring when creating buttons on objects. It only occurs using the code I put above.

  3. #3
    A similar issue also occurs when buttons are removed from objects. The button may still exist on the client when it's been removed on the server. Alarmingly the button still functions for the client when it doesn't exist on the server, strongly suggesting there may also be a potential exploit there for hackers that wish to use it.

    On a vaguely related note, buttons will also appear visible for all clients if they're created on an object inside a hidden zone. The buttons are no longer visible if the client has access the hidden zone which is then revoked, suggesting it's just caused by missing a check when the button is initially created and not an issue with the buttons themselves.

  4. #4
    You should avoid adding buttons to zones as this is an issue with the mis calibration between host and client.

    I found that when I added buttons to a zone, and deleted the button after, it would sometimes appear to some clients, as you said but not host.

    I changed it and added the buttons to an object instead of a zone, and it seems to be working fine.

  5. #5
    there may be some relation to the bug I ran into:

    for me, i had completely unscripted objects seemingly take on the scripting buttons of a scripted object.

    The part here that is relevant -- the host never sees it this way; the host always sees the buttons as they are intended, on the proper objects.

    And inconsistently, a guest on the server would see the buttons missing/on a completely different object. It is very odd.

  6. #6
    This issue persists all the way since buttons were introduced. It's some kind of desync between client and host regarding buttons, it was at its worst when object.clearButtons() stopped working altogether . Right now it's the usual - sometimes buttons are not deleted, sometimes they do appear on wrong stuff out of the blue. Always only for clients, sometimes different for different cleints and it's not 100% reproducible.

  7. #7
    Did this bug ever make it anywhere? I'm definitely running into it today where I am trying to make an on-object menu system

  8. #8
    Join Date
    Sep 2017
    I haven't seen the problem myself, but I am hot a heavy button user. I have read that the XML UI also can have desync problems between client and host, but it might still be better for your application.

    - - - Updated - - -

    I use XML for my turnButton V0.4 workshop mod and have had no sync issues with it.

  9. #9
    Join Date
    Oct 2020
    Québec, QC, Canada
    I've run into the same de-sync issue with my own project, a table lookup tool for a game. It is a Custom Token with some buttons on it. Clicking them causes a set of other buttons (most used as labels, but not all) to be deleted and recreated. Everything works fine on the server but the client rapidly misses some deletions and ends up with superposed labels and buttons, a real mess. Adding a refresh button wouldn't help since the issue is button deletion messages not making it to the client.

    I can set up a minimalist mod to be used to debug this issue if you want.

Similar Threads

  1. [SOLVED] Chip value field not showing up
    By Jabrwock in forum Bug Reports
    Replies: 4
    Last Post: 03-12-2017, 03:39 PM
  2. Video showing frustration with TTS.
    By Keybounce in forum General Discussion
    Replies: 2
    Last Post: 08-13-2016, 10:05 AM
  3. [SOLVED] Name of person not showing when sending an invite.
    By TheRaven81 in forum Bug Reports
    Replies: 1
    Last Post: 08-05-2016, 11:28 PM
  4. [SOLVED] Crashes before showing main menu
    By ootm in forum Technical Support
    Replies: 2
    Last Post: 08-02-2016, 11:58 AM
  5. [SOLVED] Server browser showing Max # of players as 9
    By TheRaven81 in forum Technical Support
    Replies: 3
    Last Post: 01-09-2016, 12:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts