You'll need to send a message to the default actor of the "chefs" group.
The default actor upon receiving that message can spawn as many actors
as you'd like.
Or you can put logic in the default actor's "update" method to spawn
more actors based on some condition.
John
> --
> You received this message because you are subscribed to the Google Groups "pysage" group.
> To post to this group, send email to pys...@googlegroups.com.
> To unsubscribe from this group, send email to pysage+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pysage?hl=en.
>
>
As I've mentioned earlier, a pysage "group" is another OS level
process running completely separately. You can't simply spawn an
actor (an object) in another process. Although pysage abstracts a lot
of this away, it still is a distributed system.
Having said that, doing this is fairly simple and if things like this
are requested more, it's fairly easy to extend the API to allow this.
The way you do this is simply to have your "Default Actor" spawn
additional actors in the group. The default actor is the "mother"
actor that you start a pysage group with.
Example:
So you have two groups: Main and Slave
You started "Slave" group with a default actor of "SlaveActor". And
you want to be able to "spawn" more actors into the "Slave" group from
the "Main" group. Simply make the "SlaveActor" accept "SpawnActor"
message, and have your "Main" group send "SpawnActor" message to your
"Slave" group. The "SlaveActor" upon receiving the message can spawn
as many actors as you want.
--
Group Main: MainActor(sends "SpawnActor" message to group "Slave")
Group Slave: SlaveActor(accepts "SpawnActor" Message)
--
You'll need to make this call:
mgr.queue_message_to_group
example usage: http://www.bigjstudio.com/pysage/ipc.html#example
Does this help?
John
John