Ask here your questions to get help using GDevelop.
By wombocombo
#62973 Hey guys!
Thank you for the support on my previous post. I was taking a trip down memory lane and I saw this really cool game on CoolMath (eww, I know, but hear me out) on Android, and I wanted to remake it. It was pretty simple. Touch and hold to make the cow change gravity. Would any of you know how to accomplish this? I know that there's a setting for press and hold.

Thanks,
wombocombo
User avatar
By ddabrahim
#62977 It seems really simple to remake.
What I would try is to increase the position of the cow on the Y axis until hit a tile if/when the mouse button is down or touch is held and decrease it position on the Y axis until hit a tile if no mouse button is down and no touch is held.
When the position of the cow on the Y axis is less than 50% of the screen, change it animation head up, if it position on the Y axis is greater than 50% of the screen then change it animation to head down or maybe change it animation only if it hit a tile on the top so it looks like it standing on the tile upside-down and if your release the touch or mouse button than change animation back to normal and decrease it Y position...

In case of an endless runner this is all I would do, in case you want to make a platformer game with this feature, I'm not so sure if the platformer behaviour can be manipulated to make this because of the direction of the gravity and jump, you might need to making your own platformer engine which is totally possible but not that simple.
By wombocombo
#62979
ddabrahim wrote:It seems really simple to remake.
What I would try is to increase the position of the cow on the Y axis until hit a tile if/when the mouse button is down or touch is held and decrease it position on the Y axis until hit a tile if no mouse button is down and no touch is held.
When the position of the cow on the Y axis is less than 50% of the screen, change it animation head up, if it position on the Y axis is greater than 50% of the screen then change it animation to head down or maybe change it animation only if it hit a tile on the top so it looks like it standing on the tile upside-down and if your release the touch or mouse button than change animation back to normal and decrease it Y position...

In case of an endless runner this is all I would do, in case you want to make a platformer game with this feature, I'm not so sure if the platformer behaviour can be manipulated to make this because of the direction of the gravity and jump, you might need to making your own platformer engine which is totally possible but not that simple.

Thanks so much!
User avatar
By Lizard-13
#62980 I was not able to do it in with the Platformer behavior, you can invert the gravity but the jump speed can't be negative and you keep accelerating up even if you collide with an object... :|

You could try with the Physics engine, I have an example here (press Space to invert the gravity):
(6.89 KiB) Downloaded 49 times

The problem with the Physics engine is that you have to write all the conditions to be able to walk, jump, etc. manually, while the platformer behavior has everything out of the box.
By wombocombo
#62982
Lizard-13 wrote:I was not able to do it in with the Platformer behavior, you can invert the gravity but the jump speed can't be negative and you keep accelerating up even if you collide with an object... :|

You could try with the Physics engine, I have an example here (press Space to invert the gravity):
InvertGravity.zip

The problem with the Physics engine is that you have to write all the conditions to be able to walk, jump, etc. manually, while the platformer behavior has everything out of the box.

I'll check it out soon! Thanks!
By wombocombo
#62985
Lizard-13 wrote:I was not able to do it in with the Platformer behavior, you can invert the gravity but the jump speed can't be negative and you keep accelerating up even if you collide with an object... :|

You could try with the Physics engine, I have an example here (press Space to invert the gravity):
InvertGravity.zip

The problem with the Physics engine is that you have to write all the conditions to be able to walk, jump, etc. manually, while the platformer behavior has everything out of the box.

it says I don't have the permission to open the file :/
User avatar
By Lizard-13
#62986 That is new... can someone confirm this?, maybe it's just a user permission problem :?
By wombocombo
#62989
Lizard-13 wrote:That is new... can someone confirm this?, maybe it's just a user permission problem :?
Silly question, but how do I open the project? It just opens a bunch of stuff on the left.