How to spawn a buddy?
-
@iTap-Development Think outside the bun.
The question, the Original post, is the problem trying to be solved. That is a CONCEPTUAL problem.
Along the way to solving that might be some examples, and I posited one, a buddy relationship. You're welcome to use other examples. But the problem remains conceptual. How does one reference a buddy of a spawned mate?
Whilst I thought I'd solved this problem, I have not.
Can you demonstrate that it's possible?
That might be a better way to use your literalist thinking.
Here's the example that demonstrates the problem.
Spawning 3 mates.
Each mate then spawns a buddy.
Each mate wants to be able to communicate with his buddy.
Is this possible in this engine?
At this point, I'm saying no. It seems broadcasting gets hung up around the first instance for the spawned buddy.
@Deeeds what would you like them to communicate?
-
@iTap-Development Think outside the bun.
The question, the Original post, is the problem trying to be solved. That is a CONCEPTUAL problem.
Along the way to solving that might be some examples, and I posited one, a buddy relationship. You're welcome to use other examples. But the problem remains conceptual. How does one reference a buddy of a spawned mate?
Whilst I thought I'd solved this problem, I have not.
Can you demonstrate that it's possible?
That might be a better way to use your literalist thinking.
Here's the example that demonstrates the problem.
Spawning 3 mates.
Each mate then spawns a buddy.
Each mate wants to be able to communicate with his buddy.
Is this possible in this engine?
At this point, I'm saying no. It seems broadcasting gets hung up around the first instance for the spawned buddy.
@Deeeds is having the mate and buddy see each other’s position and move based on the position(or something like that) good enough?
-
@Deeeds is having the mate and buddy see each other’s position and move based on the position(or something like that) good enough?
@iTap-Development For an example of communication, think of something that can only be seen internally by mate and buddy. Say, for example, the result of some calculation in Mate that he wants to share with his buddy.
-
@Deeeds I’ll see about building that....I might not have time tonight, but I’ll try.
@iTap-Development and CHEERS ! For the time and consideration. THANK YOU!
-
@iTap-Development and CHEERS ! For the time and consideration. THANK YOU!
@Deeeds Yes, it is possible, but not as easy as you’d like.
This is for my new “KrystalOS” (touch-screen OS simulator)
I’ve successfully made a Loop spawn my “App_Base” object, each of their X coord is unique (in the spawn Loop, SpawnObjectX = LoopIndex).After this loop finishes, another loop runs which broadcasts to each individual app by using their unique broadcast key (from the x position) in the broadcast, I send them their App Name and App Index.
-
@iTap-Development For an example of communication, think of something that can only be seen internally by mate and buddy. Say, for example, the result of some calculation in Mate that he wants to share with his buddy.
@Deeeds great! I’ll see what I can do.
-
@Deeeds Yes, it is possible, but not as easy as you’d like.
This is for my new “KrystalOS” (touch-screen OS simulator)
I’ve successfully made a Loop spawn my “App_Base” object, each of their X coord is unique (in the spawn Loop, SpawnObjectX = LoopIndex).After this loop finishes, another loop runs which broadcasts to each individual app by using their unique broadcast key (from the x position) in the broadcast, I send them their App Name and App Index.
@Kamdroid This is very similar to my testbed.
The initial loop is exactly like yours, the index is used as an ID for the spawned objects.
Then the spawned objects are each spawning One buddy for themselves, and giving him that ID as channel to receive messages on.
Then the "master" will sometimes send details about events in its world to its buddy. And this is where things aren't working as expected, or reliably.
That I need to go to this degree of bother is also INFURIATING me. It's not often I beg for encapsulation and polymorphism. But I do today.
-
@Deeeds Yes, it is possible, but not as easy as you’d like.
This is for my new “KrystalOS” (touch-screen OS simulator)
I’ve successfully made a Loop spawn my “App_Base” object, each of their X coord is unique (in the spawn Loop, SpawnObjectX = LoopIndex).After this loop finishes, another loop runs which broadcasts to each individual app by using their unique broadcast key (from the x position) in the broadcast, I send them their App Name and App Index.
@Kamdroid This has taught me a very dirty trick. I spawn the objects to a position of x based on their index, and then, inside them, use a "get position" to create their ID, then use an array of their desired positions to move them where they should, also based on that index value, as their desired position is in that array.
-
@Kamdroid This has taught me a very dirty trick. I spawn the objects to a position of x based on their index, and then, inside them, use a "get position" to create their ID, then use an array of their desired positions to move them where they should, also based on that index value, as their desired position is in that array.
-
How I usually handle initialization is by creating a receive message behavior and call it initialize. And every time you spawn an object, broadcast initialize.
Then on the initialize, get a value from a global count somewhere on your scene like an object on global ui that has an attribute like count. Then set the spawned objects “id” attribute to that count. Then increment that count.
Now, the spawned object has an id that you can use before the next time step!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login