Git Product home page Git Product logo

construct-playfab-photonchat's Introduction

construct-playfab-photonchat

The Script Interface documentation for the Photon Chat addon of the Construct Master Collection, for Construct 3.

IPhotonChat documentation

This is the documentation to use Construct 3's new JavaScript Scripting feature with Photon Chat.

Easy usage

You can easily access the PhotonChat object's interface using the runtime, from both the event sheet and script.

runtime.objects.PhotonChat.getFirstInstance().publishMessage("channelName", "message");

For more information, please see the scripting documentation of the Sprite object.

Advanced usage

You can also subclass instances in a script, please see the subclassing instances documentation for more information.

class Photon extends IPhotonChat
{
	constructor()
	{
		super();
	}
}

API

The supported methods and properties to use in Construct 3's scripting feature with Photon Chat.

Globals

  • Context - retrieve the current instance of the Photon Chat object.
  • Client - retrieve the current instance's load balancing client.
  • Photon - retrieve the global Photon object.

Actions

  • setUserId (userId)
  • setCustomAuthentication (authParameters, authType)
  • setRegion (region)
  • setAppId (appId)
  • setAppVersion (version)
  • connect ()
  • disconnect ()
  • subscribe (channelNames, historyLength, lastIds)
  • unsubscribe (channelNames)
  • publishMessage (channelName, content)
  • sendPrivateMessage (userId, content)
  • addFriends (userIds)
  • removeFriends (userIds)
  • setUserStatus (statusOption, status, messageOption, statusMessage)
  • reset ()
  • PlayFabAuthenticate (PlayFabID, PhotonToken)
  • GetPhotonAuthToken ()

Conditions

  • isConnectedToNameServer ()
  • isConnectedToFrontEnd ()

Expressions

  • Result ()
  • ErrorCode ()
  • ErrorMessage ()
  • State ()
  • StateString ()
  • UserId ()
  • Channel ()
  • Message ()
  • Sender ()
  • UserStatusUserId ()
  • UserStatus ()
  • UserStatusString ()
  • UserStatusMessageUpdated ()
  • UserStatusMessage ()
  • ChannelLastMessageID (channelName)
  • PhotonToken ()

Guide

The API documentation only shows the methods with its parameters, sometimes this is not enough to fully understand each use of the references. To solve that, use the Photon Chat addon as reference.

image

Instructions

  • For text parameters, use string values.
  • For number parameters, use int or float values.
  • For combo parameters, use the placement of the drop-down selection, starting from 0.
  • For toggle parameters, use boolean values.

construct-playfab-photonchat's People

Contributors

chadori avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.