Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
behavior_doubleJump

xanimalkingx
Registered User
Quote
2018-07-23 22:54:40

Description:
This is a CopperCube behavior which makes an object jump (with the ability to double jump) when space is pressed. Note that this behavior doesn't include movement scripts like moving with W, A, S, and D. Be sure to set jump speed to 0 for the scene node you're attaching this behavior to. The collision is checked by drawing a line from the scene node to an offset Y position below the scene node. The Y offset is the length of the line. The line extrudes to below the camera. Be sure not to input negative values as it will cause the line to extrude upwards instead, causing unwanted affects. This behavior only works with physics simulation enabled, which only the Windows and Mac targets support.

Behavior properties:
"SceneNodeName" = The scene node that this behavior is attached to.
"YLenghtOfCollisionLine" = The length of the collision line.
"FirstJumpVelocity" = The velocity (height) of the first jump.
"SecondJumpVelocity" = The velocity (height) of the second jump.
"FirstJumpAction" = The action that happens when the first jump happens.
"SecondJumpAction" = The action that happens when the second jump happens.
"CollisionAction" = The action that happens when collision of the line and the ground happens.


CopperCube variables that this script checks for (be sure to set these at scene startup):
"DisableJump" = if it equals 1, the entire script will disable jumping completely. Useful if you dont want to allow the player to jump during cutscenes and such
"DisableDoubleJump" = if it eqauls 1, the script will disallow a second jump. Useful if you either want double jump to be an unlockable or dont want to allow a second jump at all.


Download:
http://www.mediafire.com/file/50...


niko
Moderator
Quote
2018-07-24 09:44:44

Very cool, thanks for sharing!
Would you want me to put it onto the official download page for behaviors?


xanimalkingx
Registered User
Quote
2018-07-24 10:14:10

wrote:
Very cool, thanks for sharing!
Would you want me to put it onto the official download page for behaviors?

Sure!


tim12345
Guest
Quote
2018-07-27 23:05:50

hey that is some great work if i do say so myself! you made it to the coppercube hall of fame!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact