sendToMany(actors, messageName, arg)
Sends a message to the given actors. This is a convenient variant of send that sends a message to multiple actors instead of one.
||Array.<ActorRef>||The actors to which to send the message. This is an array.|
||string||The name of the message to send.|
||Optional argument to the message. This can be anything you want (a number, a string, a complex object). The destination actor will receive this as a parameter in the message handler.|
// Figure out who's within a distance of 5 units of me. let actorsNearby = overlapSphere(getPos(), 5); // Send them all a message, with argument 1234. sendToMany(actorsNearby, "SomeMessage", 1234);