GDevelopApp / GDevelop-extensions

Repository of behaviors, actions, conditions and expressions to be used in GDevelop for creating games
https://gdevelop.io
MIT License
131 stars 52 forks source link

Change Amount of Jumps (Platformer, Mid-Air) #142

Closed Elairyx7301 closed 2 years ago

Elairyx7301 commented 3 years ago

Describe the extension

With this extension, you can freely change the amount of jumps a Platformer Character can perform mid-air. You can bind your own key to it and you have the option to only apply changes when touching the ground or to instantly force the change. This extension that makes limiting mid-air jumps very easy to set up should make creating and allowing double-jumps simple and intuitive.

Note that when setting the amount of allowed jumps to for example 2, the player will be able to jump a total of 3 times. Once off the ground and then the entered 2 additional jumps mid-air.

Checklist

Extension game example

Change Jumps Example.zip

Extension file

The .json file can be found inside the following .zip folder: JumpMidAir.zip

D8H commented 3 years ago

Thanks for sharing. Can you attach an example that uses the extension? (also, you may want to edit the issue title to let people know what the extension is for)

Elairyx7301 commented 3 years ago

Hello D8H, I have updated the extension title and added a game example. Thanks for letting me know.

D8H commented 3 years ago

I feel like it should be a behavior instead of an action.

Elairyx7301 commented 3 years ago

But it needs the platformer behavior for it. I thought about it as an extension or add-on to the platformer. Making this a separate behavor would require me to copy the entire platformer because of the platform collisions, jump speed, gravity etc, right?

D8H commented 3 years ago

Sorry, you're right. Behaviors can't ask their object to have another behavior. It didn't occur to me.

tristanbob commented 3 years ago

Sorry, you're right. Behaviors can't ask their object to have another behavior. It didn't occur to me.

This is something that needs to be submitted as a feature request. I am often forced to use Action functions because I require specific behaviors of objects.

4ian commented 3 years ago

This is indeed something that is a feature request, called "Behavior composition": https://trello.com/c/U8hR6L7l/392-allow-behaviors-to-be-configured-to-work-with-other-behaviors-behavior-composition And we can imagine that if you select a behavior that requires other behaviors, and that they don't exist on the object, they can be added automatically :)

D8H commented 3 years ago

The coyote time time will also requires a PlatformerObject: https://github.com/GDevelopApp/GDevelop-extensions/issues/193

I think that they should be tested together, because they may conflict each other. For instance, an air jump can happen during a coyote time and should not be counted by the multi-jump behavior.

Maybe, they will have to be merged in one behavior like "Jump enhancement".

D8H commented 3 years ago

Hello Elairyx, since the beta 117, it's possible to make this extension. You can require a Platformer Character using a behavior property.

Elairyx7301 commented 3 years ago

Thank you for the reminder! I'll take another look at the files soon.

D8H commented 3 years ago

Please, try to integrate your features in this extension when the PR is merged:

D8H commented 3 years ago

The "Advanced Jump" extension was added to the repository. Please, try to add your features on it. Feel free to "at" me in Discord if you have any question.

Elairyx7301 commented 2 years ago

This version of the extension is outdated. The newest and most stable version is being merged in #255

Edit: Thank you 4ian for closing the issue :p

4ian commented 2 years ago

I'm closing this then :)