๐จโ๐คActors
Create Communication Channel
<any> create_comm_channel(<string channelName>)
Creates a communication channel for sending and receiving messages.
Get Actors
<string> getactors(<void>)
Returns all the actors in the game, example above will return
0
if there are no actors in the game.
Alternative:
get_actors
Get Actor From Thread
<any> get_actor_from_thread(<thread thrd>)
Returns the actor (script or environment) associated with
thrd
.
Alternative:
getactorfromthread
,getthreadactor
,get_thread_actor
Get Communication Channel
<any> get_comm_channel(<string channelName>)
Retrieves an existing communication channel by
channelName
.
Get Current Actor
<string> get_current_actor(<void>)
Returns the actor instance of the current running thread.
Alternative:
getcurrentactor
Get Deleted Actors
<string> getdeletedactors(<void>)
Checks actor threads specifically connected to an expired actor instance.
Note: This function does not return the actor instance directly. Instead, it returns a lightuserdata that can be passed to
run_on_actor
.
Alternative:
get_deleted_actors
Is Parallel
<string> is_parallel(<void>)
Returns if the thread is parallel or not.
Run On Actor
<string> run_on_actor(<ActorState>, <Script>)
Will run the script on an actor state.
local id, channel = create_comm_channel()
channel.Event:Connect(print) -- .Event returns channel, so we are connecting directly to channel
run_on_actor(Instance.new("Actor"), [[
local s = get_comm_channel(...)
s:Fire("hello from actor")
]], id)
Last updated