I’m using the emitter block to spawn a cube with a starting velocity so that the spawned cube can detect the velocity and then initiate something else. the black cube, which is the spawn origin, follows the blue path and should change its angle as it moves along. This in turn should change the velocity of the cube it spawns so it goes in the same direction, but for some reason it isn’t working. All related code is in blackEnemy, blueEnemy, and enemy_parent objects. If you can’t figure it out, is there some other way to send data to a spawned object when it is created?
Also I should mention, my goal is to get the black cube as well as all the blue cubes it spawns to travel along the path.
In theory, you CAN use the emit. In practice, it’s better to use the spawn, then have the object set its own velocity. Hope that helps.
If you want your object to be in a specific position than its much better to use the spawn behavior. It’ll take a little bit of figuring out, but I’m here if you need the help!
yeah, I do know its better to use spawn, however I was using emit because they objects don’t know which direction to use. The problem is, when an enemy spawns its default is to go right. The new enemy doesn’t know where the path is leading, so the way I have it is that it can tell which direction from the velocity that is given when it spawns.
Basically, I’m using emit because the new object needs data from the black cube. Without it, it won’t know where to go.
You should still use the spawn block, tho. Just mix and match extractor behaviors with mailbox behaviors in order to tell the enemy where it needs to go.
Okay so. I did not know that there was such a thing as starting value for the extractor, that is so helpful. Thanks so much!