Page 1 of 1

Colision while creating actor

PostPosted: Sat Jul 21, 2007 1:42 am
by Game A Gogo
If an actor is created while it has a collision on another actor, it will not receive colision events when colliding whit the actor, this is a big problem for what I am developing, here is a sample GED:

PostPosted: Sat Jul 21, 2007 2:27 am
by d-soldier
Hey GOGO, I had the exact same problem in Hull Breach, with asteroids no less... What I did to solve the problem was have each roid's create-actor event (collision state set to disable) and a timer created for like 250mm. That timer event turned the collision state back on, and it seemed to fix the problem with my asteroids. You may need to adjust the 250mm to more or less depending on the size of the sprites/velocity. Hope this works in your case.

PostPosted: Sat Jul 21, 2007 2:51 am
by Game A Gogo
I see, well thx, But I'd prefer if this would get solved!

PostPosted: Sat Jul 21, 2007 3:50 am
by Fuzzy
Its not really solvable. I recall this problem from long ago. Basically, the collision state is unknowable prior to, or during the creation of the actor, as it is the actor that checks and handles the result of collision. Its like you trying to remember a time before you were born.

What you can do is check the location before creating the actor. What would be nice is to have GE pass a value to a created actor. By this means, you could, in the create actor event, set collision to zero, and then immediately flip it on, or have it act out the collision regardless.

PostPosted: Sun Jul 22, 2007 12:03 am
by Game A Gogo
yeah, I guess I will use D-Soldier's method

PostPosted: Sun Jul 22, 2007 2:01 am
by DilloDude
Of course, in general you would just try and avoid this. Such as making the first frame invisible, or only covering an area where it won't collide.

PostPosted: Sun Jul 22, 2007 2:11 am
by Fuzzy
Thats brilliant Dillo. Make a special transparent animation, set it to that, then flip to the regular one on the first draw, and it it should detect the collision.

PostPosted: Mon Jul 23, 2007 12:42 am
by Game A Gogo
yes, but I already did D-Soldiers technique, and it works great :D