Heyyyo guys
I have this simple character for a small demo game that I’m working on from time to time. They have the platform character behaviour and the tiles around them have the platformer behaviour.
Their size is 12x12 and they only have 3 basic animations.
Idle (You have this when you move etc)
Attack
Small (This one turns the character into a smaller version 8x8)
Now, there is a point in the game where you get to become small (From 12px to 8px) in order to fit into certain areas. When you are small you are not allowed to attack as it will turn you into your normal Idle size.
This is working fine and all, but my problem occurs when you attack while you are inside a tight area, like in the below example.
I want the game to PUNISH you for doing so, so if you attack while you are in an area like this I want the character to die.
In order to do so I gave to my character the below points.
TopWallCheck and BottomWall check. Basically the points appear only when you are in the Idle or Attack animation and if all of them are in contact with the Platform Tiles your character dies.
My events for this
For some reason this doesn’t work as I planned to.
When you grow in size during the small area the game changes you to the idle or attack animation but the Player isn’t getting deleted. Instead they are getting pushed downwards.
Sometimes they can get deleted if you move or wait a bit. While in the out of bounds position, If you attack again and wait the player gets deleted but this ruins the experience as I want it to happen the moment you attack.
I understand that this is probably because of the Platformer and Platformer character behaviours interfering, most likely getting confused by the change of the size and the system doesn’t know where to position the Player. Is there a way to make this work? Should I do something different completely?
It bothers me cause the character does get deleted but only after Gdevelop pushes them out of bounds so its not like my method isn’t working. Are Platformer Objects transferred into a different dimension or something?