ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator gain speed by walking
person icon
verybigooooooof
Registered User
Quote
2024-06-12 21:33:26

can someone help me?
i need my character to gain speed when walking and when the character stops the speed will go back to normal

person icon
vp
Guest
Quote
2024-06-13 09:30:02

You can use predefined "special variables" (see help documentation for how to use special variables - call them using the hash-sign, then define them using the node-name, followed by ".movementspeed" or ".health" etc). Here's an example of what you asked for...

BEFORE FIRST DRAW AND ON RELOAD
set variable "run" == "0"

ACTION
when "w" key is pressed>
set variable "run" == "1"

ACTION
when "w" key is released>
set variable "run" == "0"

BEHAVIOUR
every few seconds (10ms)>
If variable "run" == "1">
set variable "(hash-sign)player.movementspeed" + "0.1"
<else> set variable "(hash-sign)player.movementspeed" == "1"

person icon
verybigooooooof
Registered User
Quote
2024-06-13 15:48:51

didnt work at all

person icon
vp
Guest
Quote
2024-06-16 01:24:54

only works if you do it properly

person icon
vp
Guest
Quote
2024-06-16 01:46:48

It does work... download the the "speedchange.ccb" I made which shows how to do it...

https://veganpete.itch.io/free-c...

person icon
verybigooooooof
Registered User
Quote
2024-06-16 14:45:42

oh i realised i did some stuff wrong it works now thank you sir!


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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