Seeing as E1 is going to be deprecated and I already did this, here is a conversion of the "Holographic 3d-Scanner" expression. The lines are aligned too.
Code:@name ScannerHydraulics @inputs Time On @outputs VertHyd HorizHyd if (On & Time < 10) {VertHyd = 50, HorizHyd = 50 - (Time - 0) * 5} if (On & Time >= 10 & Time < 20) {VertHyd = 45, HorizHyd = 50 - (Time - 10) * 5} if (On & Time >= 20 & Time < 30) {VertHyd = 40, HorizHyd = 50 - (Time - 20) * 5} if (On & Time >= 30 & Time < 40) {VertHyd = 35, HorizHyd = 50 - (Time - 30) * 5} if (On & Time >= 40 & Time < 50) {VertHyd = 30, HorizHyd = 50 - (Time - 40) * 5} if (On & Time >= 50 & Time < 60) {VertHyd = 25, HorizHyd = 50 - (Time - 50) * 5} if (On & Time >= 60 & Time < 70) {VertHyd = 20, HorizHyd = 50 - (Time - 60) * 5} if (On & Time >= 70 & Time < 80) {VertHyd = 15, HorizHyd = 50 - (Time - 70) * 5} if (On & Time >= 80 & Time < 90) {VertHyd = 10, HorizHyd = 50 - (Time - 80) * 5} if (On & Time >= 90 & Time < 100) {VertHyd = 5, HorizHyd = 50 - (Time - 90) * 5} if (On & Time >= 100 & Time < 110) {VertHyd = 0, HorizHyd = 50 - (Time - 100) * 5} if (!On) {VertHyd = 50, HorizHyd = 50}
Last edited by chinoto; 07-15-2009 at 11:52 PM.
(\__/) Expression 2 Resources: E2 Beginner's Guide | E2 Formatting Guide | E2 Function Reference | E2 Examples | Me
(='.'=) PM me code and I'll send it back optimized if possible. (I find it fun dammit!)
(")_(") Drunkie referring to an E2: "It's obvious that Chinoto made this, his coding style is all over it."
you really helped me to get startet with wire mod thank you so much![]()
MaNy ShOoTs, No KiLls
NoT LuCk AnD iT aNt SkIlls
Now go on and learn Expression2![]()
Hey, I'm having trouble getting the videos to work.
When I click on them to start playing, they just load and load, and never finish.
Any ideas?
BTW: of the tutorials I have seen, these are great tutorials
Go to the site to watch them.
i tried the turret and im having some problem, it wont go up, like the hydrolics arent working, it turns but it wont go up and also i wired it exactley the same as the tutorial said and ive checked it 3 times, the beacon sensor seams to be putting out negative values. hope someone can help.
hey i found out wat was wrong, i had accidentally wired the less than chip value b to the const val of 75
Since I have no clue how to work e2 how to you copy and paste expressions
I hope you know the basics of copying and pasting, and what you really don't understand is how to get code into an expression. Well;
1. Find Expression 2 in the Wire tab in the Q-Menu
2. Click "New Expression"
3. Paste the code you have in the clipboard.
4. Close the editor, and click to spawn the expression
5. ???
6. PROFIT!
Bookmarks