My F-Series Starter + Lau training for Traction
2 posters
RigidChips :: Rigid-Chips :: Files :: Works In Progress
Page 1 of 1
My F-Series Starter + Lau training for Traction
Ok so I was going to work on it in RCD while I was away, but having no way to test it is not a good way to go. So I'm in a need of some input.
At the moment it has no brakes or reverse. It's stable (One out of how many of my chip are? _-_ )
Controls are as usual, Up is gas and Left/Right is turning, but this car also have rear stearing, so Q to drift right and E to drift left. W is for a Boost from a single jet chip, at the center of the car to even out power distributiveness, I'd use a trim to increase drift possibilities, but I found that cheating. Oh, Boost is set at 10000 and will go down by 100, kind of unrealistic Nos release but yeah.
Lua does not work I know that much, I get an error ;
[string ""]:4: attempt to perform arithmetic on global `ENG2' (a nil value) Or I get EInvalidOp
So I have two models, one with Lua+Error first, second without Lua and fully functional Val
Lua+Error
To Mugen
I found that when I used your Traction Lua, there was an extra ')' beside the '5' on the fourth string. (Before; ENG = 1+math.abs(_VZ(0)*0.035)) After; ENG = 1+math.abs(_VZ(0)*0.035) )
When I took it out I got a nit value error, what I miss? (I've been reading slowly on it, but I just did a copy paste this time. So it obvious there is something wrong/missing.)
At the moment it has no brakes or reverse. It's stable (One out of how many of my chip are? _-_ )
Controls are as usual, Up is gas and Left/Right is turning, but this car also have rear stearing, so Q to drift right and E to drift left. W is for a Boost from a single jet chip, at the center of the car to even out power distributiveness, I'd use a trim to increase drift possibilities, but I found that cheating. Oh, Boost is set at 10000 and will go down by 100, kind of unrealistic Nos release but yeah.
Lua does not work I know that much, I get an error ;
[string ""]:4: attempt to perform arithmetic on global `ENG2' (a nil value) Or I get EInvalidOp
So I have two models, one with Lua+Error first, second without Lua and fully functional Val
Lua+Error
- Spoiler:
- Code:
// [RCD]
Val
{
BOOST(default=0, max=10000, step=100)
ENGINE1(default=0, min=-10000, max=100000, step=1000)
ENGINE2(default=0, min=-10000, max=100000, step=1000)
TURN1(default=180, min=170, max=190, step=0.5)
TURN2(default=180, min=170, max=190, step=0.5)
}
Key
{
0:ENGINE1(step=1000), ENGINE2(step=1000)
1:ENGINE1(step=-1000), ENGINE2(step=-1000)
2:TURN1(step=-1)
3:TURN1(step=1)
14:TURN2(step=-1)
15:BOOST(step=10000)
16:TURN2(step=1)
}
Body
{
Core() {
S:Frame(angle=135) {
S:Frame(angle=45) {
W:Frame() {
W:Weight(spring=.5, damper=.5) {
S:TrimF(angle=90) {
S:Frame(angle=-45, spring=.5, damper=.5) {
S:Frame(angle=45) {
W:Frame(angle=90) {
E:RudderF(angle=Turn1) {
W:Wheel(angle=90, option=1, effect=2, name=LRW) { }
}
}
}
}
}
N:TrimF(angle=90) {
N:Frame(angle=45, spring=.5, damper=.5) {
N:Frame(angle=-45) {
N:Frame() {
E:Frame(angle=-90) {
W:RudderF(angle=-Turn2) {
E:Wheel(angle=-90, option=1, effect=3, name=LRW) { }
}
}
}
}
}
}
}
}
E:Frame() {
E:Weight(spring=.5, damper=.5) {
S:TrimF(angle=90) {
S:Frame(angle=45, spring=.5, damper=.5) {
S:Frame(angle=-45) {
W:Frame(angle=-90) {
E:RudderF(angle=-Turn1) {
W:Wheel(angle=-90, option=1, effect=2, name=RFW) { }
}
}
}
}
}
N:TrimF(angle=90) {
N:Frame(angle=-45, spring=.5, damper=.5) {
N:Frame(angle=45) {
N:Frame() {
E:Frame(angle=90) {
W:RudderF(angle=Turn2) {
E:Wheel(angle=90, option=1, effect=3, name=RRW) { }
}
}
}
}
}
}
}
}
N:Jet(angle=85, power=-BOOST, spring=1, damper=1) { }
}
}
}
}
Lua
{function engine()
slip = math.abs(_WY(LFW)/_VZ(0))+math.abs(_WY(RFW)/_VZ(0))+math.abs(_WY(LRW)/_VZ(0))-math.abs(_WY(RRW)/_VZ(0))
ENG = 1+math.abs(_VZ(0)*0.035)
ENGINE = (ENG*100)*ENG2
end
function main()
engine()
end}
- Spoiler:
- Code:
// [RCD]
Val
{
BOOST(default=0, max=10000, step=100)
ENGINE1(default=0, min=-10000, max=100000, step=1000)
ENGINE2(default=0, min=-10000, max=100000, step=1000)
TURN1(default=180, min=170, max=190, step=0.5)
TURN2(default=180, min=170, max=190, step=0.5)
}
Key
{
0:ENGINE1(step=1000), ENGINE2(step=1000)
1:ENGINE1(step=-1000), ENGINE2(step=-1000)
2:TURN1(step=-1)
3:TURN1(step=1)
14:TURN2(step=-1)
15:BOOST(step=10000)
16:TURN2(step=1)
}
Body
{
Core() {
S:Frame(angle=135) {
S:Frame(angle=45) {
W:Frame() {
W:Weight(spring=.5, damper=.5) {
S:TrimF(angle=90) {
S:Frame(angle=-45, spring=.5, damper=.5) {
S:Frame(angle=45) {
W:Frame(angle=90) {
E:RudderF(angle=Turn1) {
W:Wheel(angle=90, power=-Engine1, option=1, effect=2, name=LRW) { }
}
}
}
}
}
N:TrimF(angle=90) {
N:Frame(angle=45, spring=.5, damper=.5) {
N:Frame(angle=-45) {
N:Frame() {
E:Frame(angle=-90) {
W:RudderF(angle=-Turn2) {
E:Wheel(angle=-90, power=Engine2, option=1, effect=3, name=LRW) { }
}
}
}
}
}
}
}
}
E:Frame() {
E:Weight(spring=.5, damper=.5) {
S:TrimF(angle=90) {
S:Frame(angle=45, spring=.5, damper=.5) {
S:Frame(angle=-45) {
W:Frame(angle=-90) {
E:RudderF(angle=-Turn1) {
W:Wheel(angle=-90, power=-Engine1, option=1, effect=2, name=RFW) { }
}
}
}
}
}
N:TrimF(angle=90) {
N:Frame(angle=-45, spring=.5, damper=.5) {
N:Frame(angle=45) {
N:Frame() {
E:Frame(angle=90) {
W:RudderF(angle=Turn2) {
E:Wheel(angle=90, power=Engine2, option=1, effect=3, name=RRW) { }
}
}
}
}
}
}
}
}
N:Jet(angle=85, power=-BOOST, spring=1, damper=1) { }
}
}
}
}
To Mugen
I found that when I used your Traction Lua, there was an extra ')' beside the '5' on the fourth string. (Before; ENG = 1+math.abs(_VZ(0)*0.035)) After; ENG = 1+math.abs(_VZ(0)*0.035) )
When I took it out I got a nit value error, what I miss? (I've been reading slowly on it, but I just did a copy paste this time. So it obvious there is something wrong/missing.)
Re: My F-Series Starter + Lau training for Traction
Ok, the "attempt to perform arithmetic on a nil variable is a very common error. It basically means that you haven't declared a variable either in the Lua or in the Val section. So, you have a variable with nothing in it, and you are trying to do some maths on it. What does the Lua do? It complains
As for the EInvalidOp, that can mean that you are dividing by zero, but I have models that say that in RCD constantly and RC doesn't seem to care.
As for the EInvalidOp, that can mean that you are dividing by zero, but I have models that say that in RCD constantly and RC doesn't seem to care.
JHaskly- Admin
- Posts : 235
Join date : 2010-07-16
Age : 28
Location : Brisbane
Re: My F-Series Starter + Lau training for Traction
Edit; To repost with new info than double post.
It seems that RCD gives me a EInvalidOp at home, RC gives me nothing. Laptop RCD says Nil Value first time then Invalid, RC on laptop says the [string ""]:4: line. So I'm absolutely confuzled (On purpose) about what to do...
I have another question as for the front of my car, I just realized that the distance between the front wheels when going forward increase with speed. I thought of decreasing the distance (Increase the angle of the frame from the trim), that didn't help. It then became either closer together or same distance apart. I return it to normal, then angeled the frame holding the wheels slightly, and this slowed down the time it took to separate minimally. What should I do?
The same this happens to the back wheels when reversing, though its no big deal as the front.
It seems that RCD gives me a EInvalidOp at home, RC gives me nothing. Laptop RCD says Nil Value first time then Invalid, RC on laptop says the [string ""]:4: line. So I'm absolutely confuzled (On purpose) about what to do...
I have another question as for the front of my car, I just realized that the distance between the front wheels when going forward increase with speed. I thought of decreasing the distance (Increase the angle of the frame from the trim), that didn't help. It then became either closer together or same distance apart. I return it to normal, then angeled the frame holding the wheels slightly, and this slowed down the time it took to separate minimally. What should I do?
The same this happens to the back wheels when reversing, though its no big deal as the front.
Re: My F-Series Starter + Lau training for Traction
This is because the frame has too much flex in it. There isn't a heap you can do besides playing with springs and dampers, or redesigning the frame.
JHaskly- Admin
- Posts : 235
Join date : 2010-07-16
Age : 28
Location : Brisbane
Re: My F-Series Starter + Lau training for Traction
Alright, I'm learning new things on RCD, been playing around since I've had more time, so yeah, I'll make an update soon! =D
Similar topics
» The FG - Viper Series
» What Happened To The Traction Lua Made By Project64Mugen??
» RigidChips Tutorial - Making Cars That Have Better Traction
» What Happened To The Traction Lua Made By Project64Mugen??
» RigidChips Tutorial - Making Cars That Have Better Traction
RigidChips :: Rigid-Chips :: Files :: Works In Progress
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum