0 Favourites

Modifying a list from another plugin

  • I am developing a JWebsocket plugin that I intend to use for a multiplayer game.

    The plugin receives a list of users who are online.

    My aim is to take this list of users and put these users into a "constructs 2 list".

    Now i dont know how to set the elements of the list from within my plugin.

    here's what I want to do:

    Acts.prototype.PopulateUserList = function ()

         {

              this.userarray = [];

              if (!this.websocketClient)

                   return;

              console.log("Got user list into constructs runtime")

              

              

              this.userList = this.websocketClient.fetchUserList();

              for (var i=0;i<this.userList.length;i++)

              {

                   array.add(this.userList.uname);

              }

              

                     // Now I want to access the list which i have created

                     // and populate it with userarray

                     

                     // Basically something like this.runtime.list ?

         };

    Any suggestions or help is highly appreciated.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Ok let me simplify.

    From within one plugin, how can I get reference to another plugin object, and call one of its actions ?

    Also how do I pass parameters for that action ?

    Thanks

  • You should not do this, in principle. Simply expose the data from your plugin, and allow users to display it where they want via the event system.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,068 148,660
Reflextions's avatar
Reflextions
Unread hot topic
0 Favourites
[plugin] firebase
687 65,136
cybertron7's avatar
cybertron7
Unread hot topic
0 Favourites
[PLUGIN] Canvas
627 186,682
zenox98's avatar
zenox98