Should workCode:interval(1000) Timer += 1 Timer >= 1 & Timer <= 10 -> HydraG = 150; Timer >= 10 & Timer <= 20 -> HydraG = 200;
Right... I have made a sorta factory, still its just the beginning.
So. I have created a expression to get this to work the best way, but still. I got a problem.
I use:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>Timer >= 1 & Timer <= 10 -> HydraG = 150;</div>
Ok, HydraG is the one that I want to move. But
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>Timer >= 1 & Timer <= 10 -> HydraG = 150;
Timer >= 10 & Timer <= 20 -> HydraG = 200;</div>
Didn't work. And I have no idea how to do this? I want it to change to value 150 when the timer is over the value of 1 and under the value of 10, and then I want it to change to value 200 when then timer is over value 10 and under the value of 20.
Please help me.
Should workCode:interval(1000) Timer += 1 Timer >= 1 & Timer <= 10 -> HydraG = 150; Timer >= 10 & Timer <= 20 -> HydraG = 200;
Thanks ALOT! I'll try it out right away :lol:
EDIT: Nope... Don't work... Any more ideas?
what happens? beause it should... I think
Oh wait, doesn't the one you first posted work?I didn't get that "Timer" referred to an external timer.
Really should work... as you posted it.Code:I@Timer O@HydraG Timer >= 1 & Timer <= 10 -> HydraG = 150; Timer >= 10 & Timer <= 20 -> HydraG = 200;
I don't really see any problems either
appart from the fact that there is this split second that HydraG is two values
but i believe e-gate just takes the last one assigned as ouput?
anyway, your problem shouldn't be in this e-gate, maybe it's the rest of you wireing?![]()
Creator of this Ram controller
Click here if u experience wiremod error Problems
92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.
98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig.
It ain't broken, it just lacks ducktape
No.... The wireing is fine :P. Yeah, I also think my code should work... It work's without the expression, if I just value range it works, but not that. Its very odd...
what exactly does that hydro have to do? only switch between those 2 values? or does it need a 0 value outside of those bounds?
if it does need to go back to 0 you could try this:
HydraG = (Timer >= 1 & Timer <= 10 ? 150 : (Timer >= 10 & timer <= 20 ? 200 : 0))
if not, I don't know what you could change, other then mayby changing ">= 10" to just "> 10" so that you can be absolutely certain that that doesn't collide and block the code somehow (though it shouldn't)
edit: come to think of it, if you don't need it to zero out you can drop one of the value ranges (since it wouldn't change after the second range, you can drop that entirely)
HydraG = (Timer >= 1 & Timer <= 10 ? 150 : (Timer > 1 ? 200 : 150)) <-- the second conditional is merely to prevent a 200 output from 0-1 on the timer, the greater then prevents it from firing at the same time as the first conditional so it won't spaz (could replace it with ">= 10" for extra security though), also, you can use it to have the hydro get a 0 before the timer hits 1 (replace 150 with 0 on the second conditional) and it would still stay 200 no matter how high the timer got after 10, it really depends on what you're trying to do exactly.
edit2:
if you only need it to switch between the two values, you can try:
HydraG = (Timer <= 10 ? 150 : 200)
so as long as the timer is below 10 you'll get 150, once you go above it you get 200
if you need it to go back to 150 after that 20th second you can replace "200" by "(Timer <= 20 ? 200 : 150)"
all this is guesswork ofcourse, since I don't know what you need specificaly
Bookmarks