[SOLVED]Particles don't spawn where you want; but MOVE there

For questions about using Classic.

Post » Sun Feb 28, 2010 10:52 pm

[Solved] The first part was a bug which is being posted to the tracker. The second part was a problem with events which has been solved in chat.

I was creating a simple magic attack test for my game and ran across a problem with the particles that move with a circle hitbox (invisible). The particles don't spawn from the player object like I tell them to. They spawn where the particles object was originally placed (destroyed on start) then move extremely quickly to the player's position. I tested it with a second instance of the particles object (also destroyed on start) but it seems to only move from the original instance. The problem with all of this is that some particles can be seen along the super quick movement path of the particles!

I tested all of this out in an example .cap file which I'll upload and link to in an edit.

Edit: viewtopic.php?f=16&t=5871

Sneaking in another problem edit: I have another problem. Each magic attack's hitbox (which is the moving object with the particles being set to their locations) is supposed to have its own particles instance. Right now I'm using containers so that when a magic orb hits an enemy, the right particles object instance gets destroyed with the hitbox. The problem is that particles in the air disappear instantly when the particles object and hitbox object are destroyed simultaneously. It looks extremely weird. There must be a better way to do this so that the particles in the air get to fade out normally instead of being removed instantly.

Addition to the above: It would help SO much if I could choose to pair up the right instances of particles (for ALL further events, not just those with the event each one was created in) without using Containers because Container destroys all objects when one is destroyed.

Another addition: What I'm trying to do with pairing is this- When a magic attack is performed, an invisible circle-shaped hitbox with the bullet behavior is spawned from the player. Also spawned is a particles object which is the visible part of the magic attack. The particles should be set to the position of the proper hitbox each tick. Then, when the hitbox collides with an enemy, the hitbox is destroyed BUT the particles object is set to Spray not Enabled. Finally, after a timer (long enough so that particles already in the air are gone), the particles object is destroyed.
Posts: 372
Reputation: 1,794

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests