jack
November 18, 2019, 10:20am
#1
I want to change the Max-Falling-Speed in my extention/function, but it does not work because no behaviors are available.
I just need the standard PlatformerObjekt Behavior.
I think I have to add a second parameter to my function?
But if I select “Typ: Behavior (for the previous object)” GD is crashing.
Bouh
November 18, 2019, 11:23am
#2
Yup crash is already reported
opened 09:13AM - 29 Oct 19 UTC
closed 10:17PM - 02 Dec 19 UTC
## Describe the bug
The IDE shows an error when adding a behavior as a paramete… r of a custom behavior's function.
## To Reproduce
Steps to reproduce the behavior:
1. Create a new project (add a scene and a textobject)
2. Add a behavior to the textobject
3. Create a new custom behavior and add a custom function
4. In the function parameters tab add a new parameter
5. Choose "Behavior (for the previous object)" as a type
6. The Editor shows an error and the parameters tab cant be opened again until the IDE is restarted
## Other details
It doesn't matter if an object has been added as a previous parameter or not.
Project file with custom behavior already added:
[BehaviorBug.zip](https://github.com/4ian/GDevelop/files/3782579/BehaviorBug.zip)
Version: 5.0.0-beta82
For edit value in platformer you can use JS Event
const playerHitBoxes = runtimeScene.getObjects("PlayerHitBox");
const platformerBehavior = playerHitBoxes[0].getBehavior("PlatformerObject");
platformerBehavior.isJumping()
platformerBehavior.isFalling()
platformerBehavior.isOnFloor()
platformerBehavior.isMoving()
If you print platformerBehavior in console you can see all value of your Behavior.
platformerBehavior._gravity
is equal to 1300 for example.