Go Back   Wiremod Forums > Wiremod Adv. Skills > Advanced Gates

Advanced Gates For all your advanced wiremod gates.

Reply
 
LinkBack Thread Tools Display Modes
Old 08-07-2008   #1 (permalink)
Newbie
 
Big_Adam's Avatar
 

Join Date: May 2008
Posts: 9
Big_Adam is on a distinguished road
Default Help With a Steering Expression.

Good Day.

I come here once agin with a problem many (I hope) will answer with ease.

Anyway, I'm building a Stolly (6x6 boat car truck ... thing) and I want the steering to be done via two thrusters that only work in water.

So I have my truck, 2 thruster with a 5000 multiplier and an adv.pod controller.

I tried this.

Code:
N@Stolly_Con
I@Water A S D W Active
O@Wleft Wright Tleft Tright
Active==0 W==0 A==0 S==0 D==0 Water==1-> Tleft=0 Tright=0;
Active==1 W==0 A==0 S==1 D==0 Water==1-> Tleft=-1 Tright=-1;
Active==1 W==1 A==0 S==0 D==0 Water==1-> Tleft=1 Tright=1;
But one thruster (Tright I think) just kept going full pelt all the tie regardless. I also tried the Out=(statment?T:F) way of writing it but I just don't know how to write an expression where multiple key presses do multiple things.

What I would like is for when in water for the following to happen.

W = Both thruster forward.
S = Both thrusters backward.
A = One thruster forward, one backwards.
D = One thruster forward, one backwards but the otherway round to A.

So can anyone help me please?




My Stolly.
Big_Adam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-08-2008   #2 (permalink)
Newbie
 
fraserelliott's Avatar
 

Join Date: Feb 2008
Posts: 16
fraserelliott is on a distinguished road
Default Re: Help With a Steering Expression.

Well im not sure what Wleft and Wright are but ill give it a go

Code:
N@Stolly_Con
I@Water A S D W Active
O@Wleft Wright Tleft Tright
W==1&Water&Active -> Tleft=1;
W==1&Water&Active -> Tright=1;
S==1&Water&Active -> Tleft=-1;
S==1&Water&Active -> Tright=-1;
A==1&Water&Active -> Tleft=0;
A==1&Water&Active -> Tright=1;
D==1&Water&Active -> Tleft=1;
D==1&Water&Active -> Tright=0;
it probably looks a bit complex, but thats cause i dont know how to make it shorter to be honest :P
fraserelliott is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2008   #3 (permalink)
Wire Guru

 
IEF015's Avatar
 

Join Date: Feb 2008
Location: London, ON (Canada, eh?)
Posts: 729
IEF015 has a spectacular aura aboutIEF015 has a spectacular aura about
Default Re: Help With a Steering Expression.

Code:
N@Stolly_Con
I@Water A S D W Active
O@Wleft Wright Tleft Tright
Active==0 & W==0 & A==0 & S==0 & D==0 & Water==1-> Tleft=0 Tright=0;
Active==1 & W==0 & A==0 & S==1 & D==0 & Water==1-> Tleft=-1 Tright=-1;
Active==1 & W==1 & A==0 & S==0 & D==0 & Water==1-> Tleft=1 Tright=1;
& = and
| = or
__________________
WIREMOD WILL NOT WORK ON A PIRATED GMOD!


MY COLOUR IS BLUE.
Post your expressions here: www.wiredexpressions.tk
It's my favourite country song. And I hate it.
IEF015 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2008   #4 (permalink)
Lifetime Supporter
 
shadowkeeper's Avatar
 

Join Date: Jul 2007
Location: Heffen, Belgium
Posts: 411
shadowkeeper is on a distinguished road
Send a message via MSN to shadowkeeper
Default Re: Help With a Steering Expression.

untested but should work:
Code:
N@Stolly_Con
I@Water A S D W Active
O@Wleft Wright Tleft Tright
Tleft = (Water & Active ? (W | D ? 1 : (S | A ? -1 : 0)) : 0)
Tleft = (Water & Active ? (S | A ? 1 : (W | D ? -1 : 0)) : 0)
__________________
I am nowhere, yet I am everywhere, I am the eyes that don't see but see all, I am therefore I live

shadowkeeper is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-27-2008   #5 (permalink)
Newbie
 
DeadDogsEyes's Avatar
 

Join Date: May 2007
Posts: 6
DeadDogsEyes is on a distinguished road
Default Re: Help With a Steering Expression.

Well, maybe the concept of what you would do with wheels could help here. With wheels, the formula could be (adding the water argument to make it a bit more relevant)
Leftwheels = (W - S - A + D)*Water
Rightwheels = (W - S - D + A)*Water

If there are two thrusters in the back, one on the far left side of the back, and one on the right, both in a position to move the vehicle forward if they were to both turn on, then this formula should work for that too. Only problem, is that if it's only those two thrusters making it turn, it might turn a bit awkwardly.

Last edited by DeadDogsEyes; 08-27-2008 at 01:44 AM..
DeadDogsEyes is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-27-2008   #6 (permalink)
Wire Guru

 
l3ulletje's Avatar
 
Disco Racer Champion!
Join Date: Jun 2008
Posts: 540
l3ulletje has a spectacular aura aboutl3ulletje has a spectacular aura about
Default Re: Help With a Steering Expression.

Quote:
Originally Posted by DeadDogsEyes View Post
Well, maybe the concept of what you would do with wheels could help here. With wheels, the formula could be (adding the water argument to make it a bit more relevant)
Leftwheels = (W - S - A + D)*Water
Rightwheels = (W - S - D + A)*Water

If there are two thrusters in the back, one on the far left side of the back, and one on the right, both in a position to move the vehicle forward if they were to both turn on, then this formula should work for that too. Only problem, is that if it's only those two thrusters making it turn, it might turn a bit awkwardly.
Uhm W-S-A+D is exactly the same as W-S-D+A ?

it's the same as 2+3 = 5 But guess what.. 3 + 2=also 5! I'm a math genious
__________________
My signature has a point.
Quote:
Originally Posted by Squeakyneb View Post
when l3ulletje says do it, do it.
That
l3ulletje is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-27-2008   #7 (permalink)
Newbie
 
DeadDogsEyes's Avatar
 

Join Date: May 2007
Posts: 6
DeadDogsEyes is on a distinguished road
Default Re: Help With a Steering Expression.

Quote:
Uhm W-S-A+D is exactly the same as W-S-D+A ?

it's the same as 2+3 = 5 But guess what.. 3 + 2=also 5! I'm a math genious
No, it's not. Say you're pressing just A.
0-0-1+0 = -1
0-0-0+1 = +1
Left tires go backward, right tires go forward, turning to the left.
Mine involves subtraction. 3-2 is not the same is 2-3.
DeadDogsEyes is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-27-2008   #8 (permalink)
Advanced Member
 
Tuollaf's Avatar
 

Join Date: May 2008
Posts: 168
Tuollaf is on a distinguished road
Default Re: Help With a Steering Expression.

Im gonna ask a dumb question but how do you make vehicle suspension. I would love to lean how
__________________
Tuollaf is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 05:09 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.

Page top