Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Pages: 1 [2]

Author Topic: Animated wind turbine  (Read 29569 times)

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #15 on: September 19, 2014, 05:36:53 am »

Thanks,  I was able to make one of my own.  I don't know much about JavaScript.  Since this one was short and simple I figured I could get it to work.

How about a script that makes something rotate the part back and forth like a radar or oscillating fan?

Thanks again.  Very useful.
Glad you figured it out!
You can take a look at the Ilyushin_Il14P's script for the cab fans. I think that's exactly what you're looking for.

This is the code:

Code: [Select]
Line 544   //Misc
                //CabFans
//base
if(fans_base>=1){fans_inv=1;}
if(fans_base<=-1){fans_inv=0;}
if(fans_inv==0){fans_base+=dt*0.5;}
if(fans_inv==1){fans_base-=dt*0.5;}
geom.rotate_joint_orig(left_fan_base, fans_base, {x:0,y:0,z:1});
geom.rotate_joint_orig(right_fan_base, fans_base, {x:0,y:0,z:-1});

The variables are declared at the beginning of the script.

Code: [Select]
var fans=0;
var fans_base=0;
var fans_inv=0;
Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1788
  • newbie
Re: Animated wind turbine
« Reply #16 on: October 10, 2014, 04:10:12 pm »

Love how Acetone has these scattered around his test scenery. I would love it if they were spinning.
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

jonslynn

  • Member
  • **
  • Posts: 78
Re: Animated wind turbine
« Reply #17 on: October 15, 2014, 01:09:30 am »

Thank you Levi.  It helped me.  Are there any books or links on the scripting?  How come you know so much?
Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1788
  • newbie
Re: Animated wind turbine
« Reply #18 on: October 15, 2014, 01:51:26 am »

Thank you Levi.  It helped me.  Are there any books or links on the scripting?  How come you know so much?

Cause' his brain is so large he has to learn how to drive a truck to carry it around in!  ;D
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

Acetone

  • Hero Member
  • *****
  • Posts: 963
    • Youtube channel
Re: Animated wind turbine
« Reply #19 on: October 15, 2014, 03:54:44 am »

Love how Acetone has these scattered around his test scenery. I would love it if they were spinning.

I tried to keep them on a realistic pattern (oriented toward the north entry of the valley where I suppose most of the wind come from) but it's purely a fantasy, there are no wind turbine here in reality. Same thing with the various water tower, there is not a single one in this area, but I've placed them in realistic locations (a higher than the other buildings).
Side note : have you found that poor guy trapped on the top of one of the turbine?  ;D

And I would cut my arm for a way to set some animations as automatic when the object is loaded on the scene, it will really be a nice addition to make the scene a bit more living :)
Logged

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #20 on: October 15, 2014, 06:02:47 am »

Thank you Levi.  It helped me.  Are there any books or links on the scripting?  How come you know so much?
Glad it helped!

I know very little about scripting, that's only basic stuff...

But you could start reading this book: JavaScript: The Definitive Guide, 6th Edition. It's one of the best books about JavaScript out there. :)


Cause' his brain is so large he has to learn how to drive a truck to carry it around in!  ;D
lol, you made my day! ;D ;D :D
Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1788
  • newbie
Re: Animated wind turbine
« Reply #21 on: March 14, 2015, 06:23:15 pm »

Is it possible for these windmills to autostart when Outerra is launched, yet?
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #22 on: March 14, 2015, 06:40:19 pm »

Is it possible for these windmills to autostart when Outerra is launched, yet?
No, not yet, unfortunately.
Logged
Pages: 1 [2]