Scripts / Helicopters and planes do fly

Author
Message
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Apr 2017 19:47


Time for a teaser, just in case you thought I'd stopped working on this.
Been there, done that, got all the T-Shirts!
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 9th Apr 2017 21:02 Edited at: 9th Apr 2017 21:11
@AmenMoses.
this is so great the pilots can now land there helli's. lol

SO they will be able to take of from one of bods helli pads and then lands again. awesome.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Apr 2017 21:29
Yes they will, there are a lot of other improvements to the scripts as well, I'll give full details in a few days when I post all the scripts again.
Been there, done that, got all the T-Shirts!
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 9th Apr 2017 21:31
thank you ,
you are so kind.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Apr 2017 14:49 Edited at: 11th Apr 2017 15:37
having fun with AmenMoses script and Bods airplane
just made small mod on script.

Thank you AmenMoses and bod

Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 11th Apr 2017 16:54
truly a masterpiece! which is the "script" to download?

My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Apr 2017 17:51
All the credit goes to AmenMoses.
i just change some small settings.

Hope you dont mind AmenMoses.
I have so much fun with this.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2017 19:59
I'm going to be a while completing the stuff I wand to add next so in the meantime here is that latest to play around with.

The _call script triggers the helicopters so edit it to suit, just change the CallHelicopters function parameters which are:
1 - Number of helicopters
2 - Mode 'enemy'/'friendly'/'neutral'
3 - Flight Time in seconds
4 - Return to origin flag, set to true to make them return home after attack, false to let them find a landing site themselves
5 - Height to fly at
6 - Strength (i.e. big numbers if you don't want to be able to shoot them down)

_target script is used to specify the target for friendly mode

_landing script tells the helicopters where to land if the return to origin flag is not set

Rest of the scripts as before, anyone downloading these for the first time go back up the thread to get the quatlib script and see the setup instructions.

have fun.

Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 11th Apr 2017 20:03
Great!
@AmenMoses u are a little genius! Thank you for your hard work!
@PCSKILLER thank you to share your mod



My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 17th Apr 2017 20:06
Bod very nice,
one of these days we are going to have a dog fight in the air with all your planes.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Apr 2017 21:35 Edited at: 21st Apr 2017 19:49
I'm back ... didja miss me?

Spent Easter down at the beach in my caravan, of course I took my GG PC with me so here is the result of my 'relaxing' weekend:



Lots of little tweaks but the main thing now is that the helicopters will hunt down and eliminate any enemy AI when in 'friendly' mode (maybe that should be renamed 'badass' mode?).
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Apr 2017 01:48
Always impressive. Thanks for the update.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 19th Apr 2017 16:26 Edited at: 19th Apr 2017 16:27
I guess it's time to change the thread name . Helicopters and planes do fly , (or what ever sounds better ).

Lance
Lance

Joined 22nd Jul 2003

PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Apr 2017 20:56
Title of thread changed at OP's request.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 19th Apr 2017 21:55
lol truly amazing
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 20th Apr 2017 18:48
Thank you 'AmenMoses' for making my helo's fly and do a lot more than I ever expected .

Lance
Lance

Joined 22nd Jul 2003

PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Apr 2017 20:08
It was a lot of fun.
Been there, done that, got all the T-Shirts!
PM
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 21st Apr 2017 12:07
I was trying to use a dragon that shoots fireballs, using the "jet.lua" script, the dragon flies too fast and does not shoot the shots. can you help me ?

Is there a way to fly it right away without waiting?


My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Apr 2017 17:21 Edited at: 21st Apr 2017 17:24
If you look in the 'main' part of the helicopter script you will see where the delays are set, these are there to enable the helicopters to load rockets and spin up their blades before take off, just reduce the values to 1. (if you reduce them too much it may not load up the rockets)

Similarly look for the lines that set speed values and reduce them until you get the look you want.

If you also change the function that positions the rockets so that the offsets are where the mouth is and change the rockets script so that they are initially hidden and only show when fired then that will look a lot better.

Also don't use the jets script, try the helicopter one first.
Been there, done that, got all the T-Shirts!
PM
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 21st Apr 2017 17:54 Edited at: 21st Apr 2017 17:54
Thanks for all the advice! If this is set"helicopter.lua", i get this error.

(i use GG build 1.14)

My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Apr 2017 19:48
Oops. try this one.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 21st Apr 2017 21:28
Thank you, this work great! I have to try to figure out how to do it now! we hope well...

My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 23rd Apr 2017 19:26
@AmenMoses The sound of the helicopter, when it is distant, also lowers the volume of other game elements. Is my bug or script bug?

My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd Apr 2017 21:10
Hmm, not sure. All I do is:

SetSound(e, 2)
SetSoundVolume(plane.soundVolume - 5)

(where soundVolume is based on distance from player and calculated separately for each helicopter)

It seems to work for me but I haven't really tested it fully, I had assumed the sound samples for each entity are handled separately so each helicopter would have a different volume but it shouldn't have any effect on other sounds.
Been there, done that, got all the T-Shirts!
PM
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 23rd Apr 2017 21:21
As far as I know, you need to use global sounds if you want to control the volume of individual sounds. SetSoundVolume will set the volume of all non-global sounds.
i5 2500k 3GB GTX1060 8GB RAM Windows 10
lotgd
3D Media Maker
14
Years of Service
User Offline
Joined: 2nd Apr 2010
Location: italy
Posted: 23rd Apr 2017 21:31
I solved by removing the sound volume from the script, in my projects at all levels I was creating this problem. The sound increased and decreased according to the passage of the helicopter (dragon in my case)

Can it be because I never added an audio file?

My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd Apr 2017 21:49
As I said, it appears to work ok for me, I have 5 helicopters flying around and the volume of each is different and seems to be related to their distance, same for the gun fire sounds, they are louder from the closer helicopters than from those further away.

Possibly there is some bug in GG such that if the entity doesn't actually have a sound sample in a particular slot and you try to change its volume then it changes the global volume by default?

I wonder if there is some way from within the script of checking whether there is actually a sound sample attached? Where is smallg when you need him?
Been there, done that, got all the T-Shirts!
PM
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 28th Apr 2017 19:04 Edited at: 28th Apr 2017 19:21
Great stuff. I have a couple of questions, but first thought I'd share a vid as I'm sure you guys would like to see what we have all been doing with these great scripts.
sorry I don't seem to be able to embed the video but here it is on youtube
https://www.youtube.com/watch?v=D68FWiT1gx4


Questions about the sound slots:

1. Is it slot 1 or slot 2 for the Helicopter?

2. Does it have to be Mono Wav for volume distance and direction to work properly?

3. which entity do i attatch a sound to for gun firing sounds (guessing at the muzzleflash entity/decal), and again is this slot1 or slot 2?

4. can I add sounds to one of the other entities or the bullet hit? (if so, again in which slot, eg 1 or 2)

Thanks in advance, and thanks for the scripts and models chaps
its like deja-vu, but all over again, again
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Apr 2017 19:54
Sound slot 1 is the cannon, slot 2 is the blade sound. Sound slot 0, 3 & 4 are unused.

You could add sound to the bullet hit, add a line in bullet_hit.lua to play the sound after line 70.

You could also add sound to the rocket script, I was meaning to do that but couldn't really find a decent rocket motor sample. The simplest way to do it would be to use the RPG sound.

Not sure about the Mono question, but I don't think GG does sound positioning.
Been there, done that, got all the T-Shirts!
PM
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 28th Apr 2017 20:36 Edited at: 28th Apr 2017 23:10
thanks very much, AmenMoses, thats a great help.

I added PlaySound(e,1) to the bullet hits script after line 70 and it works a charm.
Add me to the list of people who owe you a pint
its like deja-vu, but all over again, again

Login to post a reply

Server time is: 2024-12-23 05:34:45
Your offset time is: 2024-12-23 05:34:45