Welcome, Guest! Login | Register
Need script help!
Info
Report
50 Posts

I courld need some script help here, I have decided to make a Formula 1 game but The cars wont slow down when they turn in sharp corners. I wourld like to add a script that set break when The wheels are in a certain degree, is this possible? Courld Someone help Me with a script?
Thanks....
Created on: 1 month ago
Info
Report
193 Posts

What do you mean by breaking when the wheels get a certain angle?
Created on: 1 month ago
Info
Report
73 Posts

AI car speed at turns is determined by the placement of nodes in the path as the help states 'In particular, the more nodes are defined, the slower the speed.' for natural speeds, i use rec mode frequency and drive at the speed i want, rather than manual node placement.

you could do it by scripting rigid's Path speed, but it's not how i'd do it, and with many cars it could cause lag, and if you aren't good at scripting it's not worth the bother.
Created on: 1 month ago
Info
Report
434 Posts

Lurkers idea would be the best, but i know what you're looking for, i think i can do something.
But the script can be basic or complicated where speed of the vehicle would need to be factored in , not just the wheel angle ... I'll look into it, give it a try for you, either it will work or it wont.. give me some time though, i've got a few things i'm doing right now @love74.

The other thing is, are you using AI to drive the car, if so, i'm not sure how or if the script will work if the AI ( script) is already in control..... let me look into it though, its an interesting idea.
Created on: 1 month ago
Info
Report
73 Posts

well yeh, as the car AI already has:
'Path following>Minimum throttle. If this parameter is lower than 1, the vehicle will slow down when turning.'
since he said 'cars' i assume they're AI.
Created on: 1 month ago
Info
Report
50 Posts

@thelurker
I didnt know that, the cars drive pretty good now but it looks like a "car track on", it is a good idea to remake the nodes but I had a hell of a job to make the cars drive at a slim street in Monaco! (LOL!)

@TinSoldier
Wow, that seems cool. The problem seems to be that the car wourld just slow down in the corners and not really a bit before turn a sharp left or right, do You think there are any way to solve it? Perhaps I courld add some triggerzones before and in the turns? Why not try both options and give it a try?
Created on: 1 month ago
Info
Report
434 Posts

@love74, i concidered "trigers" too, at this point, its more about the script and if it can effect the AI driven cars... i'll look into it though.
Created on: 1 month ago
Info
Report
50 Posts

thanks TinSoldier...
Created on: 1 month ago
Info
Report
434 Posts

@LOVE74 I tried effecting the AI to control the cars, it wont work, i also found if i turn off the AI then script can control the cars, but as soon as the AI are turned back on, you get undesirable effects. the triggers are of no use if the script cant adjust the cars.  
Sooo, i suggest you recreate the path and use more  points in corners to slow down the cars.

You could rewrite / create a custom AI, but i wont be trying to do that
Created on: 1 month ago
Edited on: 1 month ago
Reply
Preview
Post
Or use the advanced reply form here...
Sponsored