Actors
Documentation of actor-related Synapse Z environment functions
getactors
table<Actor/ActorProxy> getactors()
returns a list of all loaded actors
run_on_actor
void run_on_actor(actor: <Actor/ActorProxy>, source: string, ...)
runs the specified code on specified actor, additionaly passing arguments
check_parallel
bool check_parallel()
returns whenever the current thread is parallel
NOTE: if FFlagDebugRunParallelLuaOnMainThread is true, it would always return false, please account for this using getfflag.
get_current_actor
<Actor/ActorProxy/nil> get_current_actor()
returns the actor the thread is currently running on, returns nil if running on main global state
create_comm_channel
<SynCommChannel/(string, SynCommChannel)> create_comm_channel(name: string?)
returns a new communication channel if name is provided, else returns a random generated name and a new communication channel with the following prototype:
Field | Type | Description |
---|---|---|
Event | SynSignal | the event used for communication |
Fire | void function(...) | equal to this.Event:Fire(...) |
get_comm_channel
SynCommChannel get_comm_channel(name: string)
returns the communication channel by name, errors if doesnt exist