1 decade ago by janix2011
So other than a few issues I have ran into along the way, which got sorted out thanks to the forums and a little trial and error, my first game is coming along fairly well. Yesterday I ran into a problem and have spent many hours trying different techniques to fix it.
My problem is the doors I have in my levels. I have them set up to be fixed entities. When the key is collected and a hotkey is pressed by the door it will change to a different sprite and will be passive allowing the player to pass through. The problem I have ran into is that my entities do not return after bumping into them like they did before when I had the doors as foreground tiles with collision. The enemies and my player's projectile weapons stick to the door once they make contact, and the projectiles do not .kill themselves.
I know the problem has to do with entity types, check against, etc; but I am not sure how to go about setting this up. I can include some code if needed, but general tips on how to set up unlockable doors would be very much appreciated. Thank you.
My problem is the doors I have in my levels. I have them set up to be fixed entities. When the key is collected and a hotkey is pressed by the door it will change to a different sprite and will be passive allowing the player to pass through. The problem I have ran into is that my entities do not return after bumping into them like they did before when I had the doors as foreground tiles with collision. The enemies and my player's projectile weapons stick to the door once they make contact, and the projectiles do not .kill themselves.
I know the problem has to do with entity types, check against, etc; but I am not sure how to go about setting this up. I can include some code if needed, but general tips on how to set up unlockable doors would be very much appreciated. Thank you.