Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Car driving problem

andgameplay
Registered User
Quote
2021-12-07 19:54:19

Hi VP, I want the car to be controlled by keyboard, it's will be fantastic! I really thankful!


VP
Guest
Quote
2021-12-07 22:48:34

No problem, you're welcome. I'll start tomorrow and hopefully it will be of some help to you.


andgameplay
Registered User
Quote
2021-12-08 12:32:43

Ok VP, really thankyou! ;)


VP
Guest
Quote
2021-12-08 14:46:34

Here's a little car demo with acceleration, braking and steering, using only variables (no coding).

Tyres will smoke as they spin, wheels turn as they steer, car tilts as it accelerates, you can swap cars by pressing "G".

https://drive.google.com/file/d/...


andgameplay
Registered User
Quote
2021-12-08 17:17:53

Great VP, it's excellent! I will study your project, it will be very useful to me, thanks again to use your time to help me! ;)


VP
Guest
Quote
2021-12-08 20:03:04

You're welcome.


andgameplay
Registered User
Quote
2021-12-09 16:31:31

Hello VP, I had a doubt, in this project you created, I noticed that when the car brakes with the S button, it stops completely. Is it possible to make the car brake progressively and slowly with the S button? I'm trying to do this with variables.


VP
Guest
Quote
2021-12-10 01:40:09

The car uses acceleration for both increase/decrease speed.

"S" will stop the car immediately - so if you don't want the car to stop abruptly, simply don't press "S".

If you release W, the car will slowly decelerate to a stop instead.

EG: While the car is driving Release "W" and press "T" to brake (instead of "S") - the car will slow down as you want.

Download the latest version (same link) as I've added a few more things for you.


VP
Guest
Quote
2021-12-10 01:49:02

If you use "Player Controlled by Keyboard", it automatically uses WASD keys, so you can't change these easily.

If, however, you want to make your own controller, the variable to slow down the car when a key is pressed is:

Every 100ms,
When key "S" is pressed,
Change variable: ‡‡Taxi(Dummy).movementspeed
Subtract 1

Just remember, "Player Controlled by Keyboard" will always use "S" as reverse unless you edit the script.

"hashtag(Object).movementspeed" is a special variabe to adjust speed. You can set it directly or add/subtract to it.


andgameplay
Registered User
Quote
2021-12-10 16:44:33

Ok VP, it's excellent! Thank you!


andgameplay
Registered User
Quote
2021-12-10 17:00:51

VP, this idea of ??hitting the cones to score is fantastic, I can already imagine many possibilities to create games with similar systems! Thanks for all the help!


VP
Guest
Quote
2021-12-11 01:50:27

You're welcome! Hey, thanks. Glad you found it helpful. :)


Adeshjeet
Guest
Quote
2023-06-29 14:28:42

Please Some one Help me. I am creating a open world game in coppercube BUT CAR is the problem I can't found CAR mechanics in whole internet PLEASE give me working car project which will not turn while standing and have some logics pleaseeeeeee


Monks
Guest
Quote
2023-06-29 19:07:36

Mummy vp the link is broken pls repost the link


andgameplay
Registered User
Quote
2023-06-29 20:58:03

Just use "sm car behavior", the car don't turn when is stoped and have the logic to mark the rubber in the ground and spin and turn the wheels!

I'll share a ccb file for you:

https://drive.google.com/file/d/...

Good luck with your project and show to us when you develop your game! :


Create reply:


Posted by: (you are not logged in)


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