Author Topic: Helicopters and Nukes!  (Read 1614 times)

ARSEnic.

  • Newbie
  • *
  • Posts: 47
  • Karma: +17/-15
  • Hell o!
    • View Profile
Helicopters and Nukes!
« on: November 11, 2017, 03:23:42 pm »
Yes you read that right! Helicopters and Nukes are coming to LU!

But firstly, just to make you less excited so you don't do anything stupid, both of them are together in this post BUT not together in a script!


So here's the nuke script

Here are some photos
Aiming screen:


Dropping the nuke:


And the aftermath!:





Controls
W - Moves the camera North   ^
A - Moves the camera West     <
S - Moves the camera South    v
D - Moves the camera East      >
Shift - Moves the camera Up          ^^^
Control - Moves the camera Down   vvv
Left Mouse Button - Launches the Nuke!    X

Commands
/test - "Teleports" you the the "Helicopter" (nice command I know, don't judge)


Known Bugs
Don't you just love bugs.
-The third time anyone drops the nuke, everyone in the server crashes*.
That's it.

*Definition of crash - of (a computer, computing system, or software) fail suddenly, Oxford Dictionary



Summary
So basically you navigate to where you want to nuke with W, A, S, D, fly higher or lower with shift and control and nuke with the left mouse button! (Found on your keyboard and mouse) A bomb will pop out, the camera will follow the nuke to the ground and the nuke will detonate itself when it reaches ground level (if you don't know how nukes work).

I added a nice little counter at the bottom right of the screen that tells you the current position of the camera which you're supposed to pretend is actually a helicopter with nukes, and also the ground level of the camera's position.

Also I've added a maximum flying height of 500m (or whatever units lu uses) and a minimum flying height of about 50m from the ground level, along with a crappy detection system that spams you with "We'll hit a building!" when you are about to hit a building (the lower part of one, anyway).




And the helicopter script
No nukes for this one :( but hey 3D camera!

More photos








More Controls
F - Enters/Exits the helicopter
ENTER - Starts/Stops the Helicopter's Engine
W - Increases the Helicopter's Engine Power    +++
S - Decreases the Helicopter's Engine Power    - - -
A - Rotates the Helicopter Left   <
D - Rotates the Helicopter Right >
Arrow Up - Tilts the Helicopter Forward      ^
Arrow Down - Tilts the Helicopter Backward   V
Arrow Left - Tilts the Helicopter Left         <
Arrow Right - Tilts the Helicopter Right     >


More Commands
None. Aren't you happy.

Bugs
I realize that the player still moves when flying the plane, and there's still tons of bugs like how the helicopter stops flying halfway sometimes I'm not going to update this anymore so have fun fixing it! xD


Another summary
So basically you enter the helicopter by pressing F, then you start the engine by pressing enter. You give the engine more power by pressing W, less power by pressing S. When you're high enough, press A or D to rotate the helicopter towards the left or right respectively, and press the up down left right arrow key to tilt it forwards, backwards, towards the left or towards the right respectively.

I added an INI file which loads the position of the helicopter and spawns it into the world when the script loads. It is recommended that you use that to spawn in the helicopter instead of manually adding it via commands or whatever method, otherwise fear the wrath of ERRORS!

There's tons of math calculations to this and this script isn't exactly 'edit friendly' so you'll probably have to dig around quite a lot and find out where to change the bindkeys.

The GUI is horribly buggy with tons of overlapping labels, I'm just going to release it now because I'm too lazy to continue working on it. Feel free to edit the script and use it in your server or play around with it or do whatever but if you're going to upload another script based on this, HAVE THE DECENCY TO AT LEAST CREDIT ME AND LINK BACK TO THIS TOPIC. I get really annoyed at people who just takes other people's scripts and claims it as their own.

Other than the GUI, the Helicopter's movement, script management and the camera movement can really be improved (as Vortex suggested). If you are to make a better version of this script, do share it with the LU community by replying to this topic or whatever AS LONG AS YOU CREDIT ME.

Lastly, the reload time thingy was something i wanted to implement but got too lazy to, again, feel free to add guns or nukes or whatever to this thing just... CREDIT ME

Finally for the long awaited Downloads
I put it here just to make you read all my shit :)
Nuke

Helicopter

THE MOST IMPORTANT PART OF THIS POST, THR CREDITS

Vortex - calculatuons for the 3d camera for the helicopter script
Krulcifer - My friend IRL that suggested and supported me with ideas
My math teacher - For teaching me wtf sin and cosin was.




[size=200pt].[/size]
« Last Edit: November 11, 2017, 11:47:00 pm by ARSEnic. »

 

© Liberty Unleashed Team.