Results 1 to 6 of 6

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

  1. #1
    Join Date
    Sep 2016
    Posts
    216

    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:

    http://steamcommunity.com/sharedfile.../?id=779900330

    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:

    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
        zoneObj.createButton(buttonParams)
    end
    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: http://www.berserk-games.com/forums/...re-also-scaled
    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
    Posts
    216
    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:
    http://www.berserk-games.com/forums/...ests-in-server

    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.

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, 11:03 AM

Posting Permissions

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