Displaying Usernames in Online Game, Lacewing

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey all, I've been fumbling around and creating a sort of "virtual world" game with Lacewing as the online tool, but I'm having a tremendous amount of trouble trying to get usernames to show for individual players.

    For example, the username for Player A is stored as soon as Player A logs in, so all I need to achieve is the ability for the other users to see Player A's username.

    Everything works fine if two players are on the server, but three or more will cause the username of the first player who logged in to begin flickering between all users.

    I do want to know, what is the best object to use if I want to go about displaying multiple usernames all at the same time?

    I've been using a string to try and achieve displaying all the usernames, because I remember being able to do this exact thing with a string years ago. I'm quickly realizing that this either won't work with strings or I'm not as versed with MMF2/Fusion 2 as I previously thought.

    Thank you!

  • +On Peer Connect
    -Create Peer Object
    -Set alterable string "Name" to Peer Name
    -Create String Object
    -Change alterable string to Peer Name

    +Compare Alterable String of Peer Object (Name) = Alterable String Text
    -Position String -30 Y above Peer Object


    This will set the alterable string "name" of the peer object to the person's name. Then it will create a string object and set that string to the peer's name. You then compare the alterable string "name" of the peer object to the string and always set its position to be above the peer object.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

  • You're a miracle worker, you know that? :)

    I had similar lines of code, but for the event that checks where the username tag is, I added an action "Lacewing: On binary message from channel on subchannel 0 (blasted)". Once I deleted that action, everything worked perfectly.

    Thanks so much, man! Awesome stuff.

  • you could add a foreach loop in your string comparison event line
    otherwise all string instances will be affected

    i.e.

    always
    >>> count - start loop for each one of "string" loop name "position"

    on each one of "string", loop name "position"
    + string = str$(global value A)
    [...]
    >>> do stuff

    a selection of my Fusion examples can be found Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!