Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
Change Character Movement Speed

lucazani
Registered User
Quote
2021-02-10 19:09:18

How can I make the player go to Example on some stages faster and slower on others?


csp-games
Guest
Quote
2021-02-10 23:44:59

depends on how you control the character in the first place.


just_in_case
Moderator
Quote
2021-02-11 11:53:23

If you are using move with keyboard or the game actor with health and Ai behavior then you can use "$player.movementspeed" global variable to change the movement speed of your player during runtime.
Just remove the dollar sign and use hashtag, for some unknown reason you can't usr hashtag symbol in forum posts. Also player is the name of the scenenode to which the behavior is attached.

For example you have a node with name soldier and a move with keyboard behavior attached to it then you can altet the movement speed by using the global variable $soldier.movementspeed and can put any value to that variable according to your needs.

Don't forget to change the dollar symbol into hashtag.


Hope thats helps😇


j9907
Guest
Quote
2021-02-11 12:59:03

Expanding up0n what csp-games and just_in_case said: It depends on how you're making the character move around.

If you're using the built-in movement controller (which I wouldn't recommend if you're making a platforming game as I am), then do what just_in_case suggested and simply make it so when something happens (maybe if you collide with an object which gives the player a speed boost), it sets that variable to a higher number. You could even make it so its only temporary, so if you wanted it to last 5 seconds, you'd have a "Do something later" action and set the variable back to what you previously had it at (the original movement speed)


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (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