Potassium API
  • Environment
    • Cache
    • Closures
    • Console
    • Crypt
    • Debug
    • Drawing
    • File System
    • Input
    • Instance
    • Metatable
    • Miscellaneous
    • Scripts
    • Web Sockets
    • Actor
Powered by GitBook
On this page
  • create_comm_channel
  • get_comm_channel
  • run_on_actor
  • getactors
  • is_parallel
  • run_on_thread
  • getactorthreads
  1. Environment

Actor

create_comm_channel

<number, BindableEvent> create_comm_channel()

Returns the channel and the associated ID.


get_comm_channel

<BindableEvent> get_comm_channel(<number> id)

Returns the communication channel if it exists.


run_on_actor

<nil> run_on_actor(<Actor> actor, <string> script, ...)

Runs a script on an actor thread.

run_on_actor(getactors()[1], [[
    print("Hello, world!")
]])

getactors

<table<Actor>> getactors()

Returns a table of all actors that exist within the game.


is_parallel

<boolean> is_parallel()

Returns if the thread is running on an actor.


run_on_thread

<nil> run_on_thread(<thread> thread, <string> script, ...)

Runs a script on a specified thread, actor threads only.

run_on_thread(getactorthreads()[1], [[
    print("Hello, world!")
]])

getactorthreads

<table<thread>> getactorthreads()

Returns all threads that belong to actors in a table.


PreviousWeb Sockets

Last updated 2 months ago