Colision while creating actor

Talk about making games.

Colision while creating actor

Postby Game A Gogo » Sat Jul 21, 2007 1:42 am

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:
Attachments
Level.zip
All graphics belongs to me, do not steal!
(363.53 KiB) Downloaded 87 times
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby d-soldier » Sat Jul 21, 2007 2:27 am

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.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Sat Jul 21, 2007 2:51 am

I see, well thx, But I'd prefer if this would get solved!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Fuzzy » Sat Jul 21, 2007 3:50 am

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.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Game A Gogo » Sun Jul 22, 2007 12:03 am

yeah, I guess I will use D-Soldier's method
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby DilloDude » Sun Jul 22, 2007 2:01 am

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.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Fuzzy » Sun Jul 22, 2007 2:11 am

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.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Game A Gogo » Mon Jul 23, 2007 12:42 am

yes, but I already did D-Soldiers technique, and it works great :D
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron