Scripts / Helicopters and planes do fly

Author
Message
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 30th Mar 2017 16:29
Uhmmm thanks Bod, I loaded down gchopper.zip from down there, but the rotor remains static. What am I doing wrong ?
Thanks for the model, neverthe less...
[quote=]That's brilliant, the best use of one of my models I have seen.


Quote: "but it isn't animated"
One of them has animated rotors.

https://forum.game-guru.com/thread/215012?page=5#msg2554881

@AmenMoses
I downloaded your helicopter scripts, (thanks likewise for the great work), the heli takes off - with static rotors - flies away ascending, turns, then hovers stutteringyly, keeping its distance, and eventually falls out of the sky for no apparent reason.
At first, it wouldn't do anything at all; examining the script, I saw that your libquat.lua wasn't there on my pc; downloading that brought the result above.
thanks for libquat all the same, maybe you want to alert people to it mentioning it near yor list of heli* luas.
Am I missing another component?
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Mar 2017 19:30 Edited at: 30th Mar 2017 20:42
Should be fine, guatlib.lua is all it needs, did you get it from earlier in the thread?

Bod's helicopter model will probably fly sideways without a change in the fpm to make 'forward' be 'north', not sure what the command is though as I did it by rotating the model in fragmotion.

Edited to add: The symptoms you describe sound very much like the entity not being set 'always active' in the properties.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 30th Mar 2017 21:05 Edited at: 31st Mar 2017 09:25
Damn, I might have gotten a "quatlib.lua" from elsewhere in the forums, but I can't find the exact location anymore.
So, I downloaded it earlier from this here thread and overwrote what I had before.

EDIT:
Well since I positioned my player marker sideways to the heli, it may well have taken off sideways, but only a little, it looks largely ok until it wants to come back at me. then it falters up down a few times, then goes down to the ground. Could the reason be that I don't have the rockets attached ?


Oh, btw, I started having the tumbling box that you showed in another thread in the same level, and it is tumbling happily away, so, the quatlib should be fine.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Mar 2017 22:15
No, I haven't posted the 'armed' version on here yet. Did you make sure the heli was 'always active'? Probably worth setting physics off as well.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Mar 2017 22:40
@Bod, roty doesn't work as it simply rotates the model along with its axis, I think there is another command which rotates the model relative to the axis, or maybe there isn't and I'm just imagining it.

As I said I simply dropped the model into fragmotion and rotated it -90 degrees in y then re-exported it, that solves the problem.

I just tried the script with the original model and it flies around sideways but apart from that behaves as it should, I always have vsync on btw not sure if that is the issue as Lee defaults it off for some reason, GG runs a lot better with it on.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 01:44
Pointing straight up, which in GG is +Z direction.

The reason it is important is that the Eular angles relate to the world relative angles whereas quaternion rotations are relative to the entity, so for roll for example to be in the right plane the initial axis must be aligned, in GG that initial alignment needs the models 'forward' axis to be +Z so roll is around the Z axis, pitch around the X axis and yaw around the y axis.

btw the blades are far too short for a real helicopter, IRL the blades would almost reach the tail.

I'm not working tomorrow so I'll put the scripts together (including rockets and fake bulllets) and post them on here with instructions of how to set it all up.


Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 31st Mar 2017 09:35
Quote: "No, I haven't posted the 'armed' version on here yet. Did you make sure the heli was 'always active'? Probably worth setting physics off as well"

Foolishly ,"just to be safe", I also downloaded again and overwrote the chopper model (obviously the wrong, unanimated one, because I somehow failed to identify the animated version. Thanks, Bod, for pointing this out and thanks for the other model, too), forgetting at first to remove the static flag,
so it just sat there. After setting it to non static, it again behaved as described, nice takeoff, then, in the turn to me, starts to move erratically,
even jumping to flight level again after grounding when I go nearer to it

When I get home today, I'll download the proper heli model, will set the flags to your recommendations and report back.

Thanks again, Amen Moses
Lives of great men all remind us we may make our lives sublime
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 31st Mar 2017 13:49
Quote: "
@yrkoon, the animated model should be called gchopperanim.x"

Couldn't find that one, because it is hidden from searching in gchopperA.zip (or at least I hope that one is it !)
Thanks, Bod
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 14:43 Edited at: 31st Mar 2017 14:59
Okey Dokey,

Picture 1 shows what the settings should be for the entities.

Picture 2 shows all the entities in the editor view.

So attach the helicopter.lua script to Bods gchopperanim1 model. Make sure the quatlib.lua file is in scriptbank, set the entity properties as follows (this will apply to all entities used):

Static Mode - No
Physics On - No
Always Active - Yes
(I always set the occluder options to No but I don't think they matter much)

For the helicopter (blade if you use a model with a separate blade) and rockets make Explodable Yes, more on rockets later.

Test your level, helicopter should fly around nicely.

Now add the muzzle flash, I used a red 'flare' decal for this, attach the helicopter_muzzle_flash.lua, test the level and now the helicopter will look like its firing the machine gun (if you use a different helicopter model the flash position will need to be changed in the script, look for the line with 0, 30, 164, these are the x.y.z offsets from the model origin to the machine gun barrel)

Once you are sure this is working extract the decal and copy it 5 times (it will be shared by all the helicopters you add so you only have to add them once not per helicopter)

Now add a smoke decal in the same way but attach the helicopter_muzzle_smoke.lua script, again 5 of them and test the level. (you need a decal that makes a darkish puff-ball effect)

Next add the bullet hit decals, experiment with different decals until it looks good, there are three scripts, helicopter_bullet_hit.lua must be used, this is the script that will detect a 'hit' on the player and remove health. The helicopter_bhs1.lua and helicopter_bhs2.lua are optional but give you a better effect with the right decals. Once happy with the effect extract and copy about 12 of each, these are also shared by all helicopters. (the height of the decals can be adjusted in the scripts, look for the ResetPosition(e, x, y + 40, z) line (for example) and adjust the number to suit the decal)

Once tested and looking as you want the final step is the most fun.

Find a rocket model, I have a 'Low Polygon' directory in entitybank, not sure if everyone has that, which contains some appropriate models, they must point in the same initial direction the helicopter does (i.e. straight up or +Z direction) to work properly. Scale it to be appropriate to the helicopter, add the helicopter_rocket.lua script and make sure you have 4 rocket models per helicopter. (the positioning of the rockets on the helicopter is controlled by the helicopter.lua script, look for displayRockets function and you will see some values, again these are the x.y.z offset values from the helicopter model origin for each rocket position, if the rocktes don't sit right on the helicopter you can adjust them until it looks right)

If you don't want the player to be able to shoot the rockets (which makes them and the whole helicopter explode and bypasses the nifty 'death throes') then set the 'Strength' for the rocket model to some value like 500.

So have fun.

Almost forgot, if the helicopter 'Strength' is left set to the default then the script will change it to 250, this allows two sniper rifle shots to kill it, if you want to make it harder to bring them down just give a higher strength value, an RPG hit will instantly destroy the helicopter regardless of the strength you give it.

Tip for the day, when the heli is in rocket range - Run!

Last word, in the top of the helicopter.lua there are two values you can change:
PlayerActivationRange - basically how close the player has to be to trigger the heli
HeliTargetHeight - rough height above terrain you want the heli to fly, the actually height will be a random amount slightly above or below this value, if you make it too low the rockets may not fire at all as the firing trigger point for the rockets is calculated taking into account the height above the player.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 31st Mar 2017 19:20
Thank you so much, Amen Moses, for taking that much trouble with me.
The heli now flies ok, albeit sideways (not, that helicopters are not known to be able to perform such maneouvres).

Must dig out my fragmotion (rather its license key) or other modelling tool now (I have a few, but I'm clearly a sorry modeller; re-aligning by 90 or 270 degrees should be possible, even for me, I suppose )

What puzzles me is that - assuming that you did not alter your scripts anymore - the problem must have been with those parameter setting combinations.


Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 19:32
Bods last post includes the gchopperanim1 model, use that and all will be well.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 31st Mar 2017 19:35
Just one more thing, Amen Moses: How/where can the ascension _speed_ be controlled ?

I deliberately set the target height to 18,000, giving a nice, somewhat hard to see heli when it reaches that height, but it almost _jumps_ to the target height there, after its first moderate ascension phase.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 19:42
There isn't one, the helicopter is supposed to stay down low to strafe the player.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 31st Mar 2017 20:34 Edited at: 31st Mar 2017 20:52
Amen Moses :
Oh. That's probably why I couldn't make real sense of the suspected part of the script.
Thank you. I might try my own hand at that (having bombs, dropping in from high above, in mind, instead of rockets .)

Bod:
Also a repeated "thank you" to you, the gchopperanim1.x seems to be doing the trick for me.

EDIT: what I was immediately was thinking of when I saw this heli thing is to add them to "Early morning mountain stroll" for my own private use.
I like this demo game so much, using it always when a new version of GG appears to see how it fares.
Way back in time, EMMS was almost too hard with the damned rocket men having too much kill power on their hands,
then came the radar, making things almost too easy for the player,
then, lately, it became harder again with the new AI.
I think a heli or two somewhere in the middle section could make things more interesting for me.
But - of course - the rockets may not be the best solution from the heli's "viewpoint".
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 20:48
Oops, try this one, I left some debugging code in there by mistake.

I also put a limit on the climb rate so you should get a more realistic flight path to altitude.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 31st Mar 2017 21:02
WONDERFUL, Amen Moses. How many more "thank you"s can I express ?
For 20,000, it takes the heli several turns to reach that height, and getting bombed from that height appears somewhat more scary to me
than facing those rockets, especially with some foliage above me.

Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 23:00
Yeah I'm fine with that although I still think the blades need to be longer.

What would be nice would be if Lee could include the rockets and decals but I'm not sure who owns those.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Mar 2017 23:48
Cool, I'll have a play with that tomorrow and make a demo video, may even include some sound effects this time.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 1st Apr 2017 08:23 Edited at: 1st Apr 2017 09:02
Quote: "Your quite welcome yrkoon, if Lee wanted to include my Helicopter and AmenMoses scripts with GameGuru I am quite happy with that if AmenMoses is."

Sounds good, although I doubt Lee he will find the time.

One could add a little atmosphere putting a military radio on the table where the player finds the Magnum. When the player arrives there, he could overhear incoming communication like "Major, we just finished fuelling up. ETA: 3 Minutes, Sir! Major ... ? Major .. do you read me!?! Damn, the bugger must even have taken out the Major, Tom. Hurry up!" with some muffled heli engine sound overdubbed.
This could be followed by a bombing attack of a single heli.

Later, a triple heli rocket attack may occur at one of the longer hose-like passages with open skies and (already there) infantry alternately on the left and right sides behind covers, all together giving the player a really hard time.

And if I may be so bold to say : this is one little instance where - in the eyes of a potential new user - GG is taken from a "doesn't even have " to at least a "look, they have working helis" view. I think GG could do with more such little things. The new user is probably not too keen on reading "Welll just learn lua and you can do ANYTHING, it's only up to you"
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 1st Apr 2017 11:23
I think you overestimate the average new user somewhat, more like "But they don't even have pilots", "Why can't we fly the helicopters","Can we have jet power helicopters with lasers","When they crash there is no wreckage, a real AAAAAAA engine would have wreckage" .... etc

As to your game level idea, you provide the fpm and the audio files and I'll be happy to provide the lua scripts.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 1st Apr 2017 14:41
Not going to argue with you about average Joe Newuser, Amen. Elsewhere, I got asked only recently whether there are moving / driveable cars available in GG; they weren't asking for Ferraris, there . It obviously depends on who you meet.

And, honestly, I feel flattered that you took on my idea I'll see what I can do.

Exploring the level off the beaten path showed me there is still a miraculosly lot of unused area in that level, enough space for a hidden heli base with a few helis, so, the helis don't have to come out of "nowhere".

A military radio intercom is in the "Classic" model collection which is free, if not already contained altogether in GG as stock material. A stock or free bomb model should also be available, somewhere, I believe.

I am neither a native english speaker nor have I ever served with the forces, so I may have to see whether I can provide realistic audio speech.
But that is most likely the least problem.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 1st Apr 2017 15:16
I'm currently modifying the script so that the helicopters can be 'enemy', 'friendly' or 'neutral'. If 'enemy' they will behave pretty much as they do now, 'neutral' will simply fly around without any attack phase and 'friendly' will attack specified targets (I'll add a helicopter_target.lua script which is simply attached to an entity that you want to be attacked) or attack the nearest ai characters to the player.

I'm still looking for decent sound effects.
Been there, done that, got all the T-Shirts!
PM
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 1st Apr 2017 15:55
The helicopter scripting has come along way . I like the idea of 'enemy', 'friendly' ,'neutral' and helicopter_target.lua . I finally got a chance to try out the scripting for the gun and missile firing . I replaced the smoke decal with a green flare so it looks like the helo is firing a laser weapon since the model is a Sci- Fi helicopter . The only thing that didn't work for me yet was the missile firing (?) . I don't seem to have a red flare in the decals folder . Where did you get yours from ?

I think you have made a good contribution to the GG community with the helicopter scripting .
Keep up the great work

Lance
Lance

Joined 22nd Jul 2003

PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 1st Apr 2017 16:28
@AmenMoses. i have no words for what you have accomplice so far with your scripting talent.
your work is of a next level, its awesome.

if i may ask. is it possible, that you can modify the existing script of the helicopter with a timer , so that the helicopters lands on its own again after some time. A variable that we can adjust so that the helicopters can after a certain amount of time land again on its starting point.
would be nice if we have helicopters that takes off and land again on its own after a certain a mount of flight time.





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: 1st Apr 2017 17:10
@Lance, the red flare came from the Mega Pack 2. Some time ago someone posted links to a bunch of free decals which I downloaded so some of the ones I originally used probably came from those. If you followed the instructions I posted the rockets should work, the targetting code for the rockets relies on the height of the heli above the player so if it is too high or too low it may not fire them.

As to having them land again, that would be possible I suppose, I suppose I could have a script that could be attached to an object which could then be placed to indicate a landing zone, then maybe after a specific time or the last rocket if fired or if the player is killed the helicopters could automatically head back and land. Let me get the friendly/neutral code finished and I'll think about it some more.

Found something strange when trying to add sound effects. If the player is killed the looping sound effect for the blades stopped! I've added some code to restart the sounds after a slight delay whilst the player respawns but I don't know if this is just an editor thing, stand-alone might work differently.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 1st Apr 2017 19:01
With sound FX!

Been there, done that, got all the T-Shirts!
PM
Szabi
9
Years of Service
User Offline
Joined: 25th Oct 2015
Location:
Posted: 1st Apr 2017 20:03
Please a tutorial,how to make.
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 1st Apr 2017 20:15 Edited at: 1st Apr 2017 20:23
2017 RAMBO Award for exceptional bravery and marksmanship to you, Amen.

I started to create the heli base, all with fuel tanks, ammo bunkers, baracks, and a radio station.
4 Helis should be ok, but a proper hangar would be desirable, eventually. Only, the helis are quite large.
The heli base IS reachable for the player, but only with a LOT of insane climbing. I'm still pondering wether to block the player completely from the heli base, or else even enticing him to try to get there, perhaps by positioning the radio tower so that he just may be able to spot the tower's top from one or two specific locations, thus possibly making him curious.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 1st Apr 2017 22:38
@Szabi, look back through the thread and you'll find the tutorial.
Been there, done that, got all the T-Shirts!
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 2nd Apr 2017 05:39
@AmenMoses are you fading out your helli sound or not as they fly.

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
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 2nd Apr 2017 11:16
Quote: "
You need to check out my Bod's Mods thread in the free models and media section, there are hangars and helipads amongst many other things."

Yes, yes, Bod, thanks.
I wrote "eventually", because I habitually search my own backyard before I look into others' .
But I actually hoped you would have something in that direction already available.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Apr 2017 11:35
Yes, attempting to fade with distance but it's hard to get it sounding right without knowing much about how GG works with audio under the hood, lots of guesswork going on. (for example the minimum volume level appears to be around 60 and max at 100 but is the range in between linear or logarithmic? Does GG attempt any sort of stereo separation? - probably not judging by my next comment)

The other issue I am having is that I only have one 'blade' sound which is ok with one helicopter but if you have several the sound samples can mix and produce some weird harmonic effects, without any positional clues the human ear/brain can't separate them properly so it can end up sounding horrid.

Everybody tends to focus on the visual aspects of 3d games but imo the sound is just as important, its better to have none at all in some respects as the brain is very good at imagining what it should sound like.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Apr 2017 11:44
I keep thinking about the "tutorial" question. Maybe the first step in the tutorial should be "1) Spend 40 years learning how to code."?
Been there, done that, got all the T-Shirts!
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 2nd Apr 2017 13:17
@AmenMoses

i have put this into your script, just under the main(e) .
A little code i got from RoanDoom.


and then the flag to triger i put in just after.
SetAnimationSpeed(e, 1)
hellisound = 1


i have found that it works qiut well.

only one thing is missing.
All my helicopters are all running out off fuel and then they crash. the pilots have not jet learned how to land there helicopters at the base .






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: 2nd Apr 2017 15:29
I already have something similar albeit a bit more complicated than that.

Progress so far is that the 'neutral' mode is done and I'm happy with it, 'enemy' mode is as it was before, so now I'm working on the new target script so I can get the 'friendly' mode working the way I want it to.

I noticed an interesting bug with the old code, if you put down lots of extra rockets (i.e. more than enough for the number of helicopters) they re-arm themselves in the air! Soon put a stop to that cheating, now the arming can only occur when the helicopter is on the ground. My intention eventually is to have them go back to a specified landing spot and rearm ready for the next attack, you would just need to build a stockpile of rockets at the landing zone and as soon as they land they will rearm.

Hopefully a new set of scripts will be ready sometime tonight or tomorrow night.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 2nd Apr 2017 17:33
Quote: "My intention eventually is to have them go back to a specified landing spot and rearm ready for the next attack, you would just need to build a stockpile of rockets at the landing zone and as soon as they land they will rearm."

EXACTLY what I was hoping for,Amen. I was thinking of little waggons taking 4-6 rockets/bomb each, to transport them from the ammunition bunkers to the landing spot.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Apr 2017 17:34
Friendly mode first attempt.


Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Apr 2017 17:48
Little wagons, ammo bunker, blimey let me get the landing part done first.
Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 2nd Apr 2017 19:17
I saw those on my part, Amen, not yours, since I understood that your landing script just expects a number of rockets in the immediate vicinity of the landing spot, assuming that they also might be lying on a waggon instead of plainly on the ground. Just thought I'd mention it early , in case you would need to be informed.

And: I do not see any reason for self-inflicted mental pressure. We won't get paid for it, anyways; so, it will be finished when it is finished. I also have my own projects to cope with alongside this little intermezzo. Nevertheless, I think it deserves a halfway reasonable design for the helibase, not a 100 rockets/bombs placed together under a naked sun, alongside four 20,000 l fuel tanks, right ?
Lives of great men all remind us we may make our lives sublime
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 2nd Apr 2017 21:11
very nice
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
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 3rd Apr 2017 14:26
It's getting better and better, Amen Moses. SO convincing.

In the long run (when all else is done I mean it): Can we possibly use one of the fpe-property-variables for the targetheight the individual heli is supposed to go to ?

Altering the value in the script is not so great;
but for the time being, I can certainly get around this with a fistfull of pre-made
copies called "helicopter_th00500.lua" to, say, "helicopter_th30000.lua", but setting via a property value would at least be nice.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Apr 2017 19:36
The properties are not all visible to Lua yet, I could use the strength value I suppose then reset it to 250.

The helicopters do all fly at different heights btw, I could make the random variation much larger I suppose. Alternatively I could take it from the name of the helicopter itself, i.e. name the entity H_2000_F could mean height 2000 'freindly' or something similar.

Can't quite get my head around why you would want to fly a helicopter so high, the player definitely won't see it or hear it that high so you may as well use a box or something.

In fact a far simpler script that just randomly simulates explosions near the player would do as well.

The problem with using separate scripts btw is that the helicopters would no longer share data so would not avoid each other.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Apr 2017 22:21
Gonna be a few days before the next update, the landing part needs a wee bit of a redesign.
Been there, done that, got all the T-Shirts!
PM
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 3rd Apr 2017 22:30
ok thanks for all your hard work. you are truely gifted
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
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 4th Apr 2017 10:47
Quote: "It might be an idea to have this thread renamed to "Helicopters do fly and do lots of other things too". "

I second that
Lives of great men all remind us we may make our lives sublime
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 4th Apr 2017 11:14 Edited at: 4th Apr 2017 16:05
Quote: "The properties are not all visible to Lua yet, I could use the strength value I suppose then reset it to 250.
"

I am aware of that

Quote: "The helicopters do all fly at different heights btw, I could make the random variation much larger I suppose. Alternatively I could take it from the name of the helicopter itself, i.e. name the entity H_2000_F could mean height 2000 'freindly' or something similar.
"

Sounds good.

Quote: "Can't quite get my head around why you would want to fly a helicopter so high, the player definitely won't see it or hear it that high so you may as well use a box or something. "


It won't HAVE to be 30,000, but I had them flying at that exact height (unless the height was clipped somehow internally by GG); helis are visible at that height and can still be identified as helis - but, like well behaved little children, they are supposed to be seen, not heard.

So, the player WILL see one (or will have a chance to see one ), once he is "encouraged" to try because of bombs suddenly exploding around him. And he will have a hard time hitting a heli so far high up, since even his RPGs aren't the heat-seeking type.

Generally, the thought is to usher him out of wooded areas onto a bridge or other open space further down the line by bombing, and there, loitering (or incoming) low flying, rocket spewing, and machine gunning helis shall have a go at him. Infact, they should be 3 or 4, because the player is already carrying the RPG and quite some ammo.

Thus , it would also be desirable that the high-flyer and the low-diver helis do not share variables between them/coordinate one another.

Quote: "In fact a far simpler script that just randomly simulates explosions near the player would do as well."


That would be considered cheating on the game's side, no ?

If you think you don't want to do it for this "community micro-project", it's perfectly ok for me.
I think for my own private use, I should be able now to effect those things that I have in mind, using the great scripts you already provided.

Thanks for the insight into the namespaces of scripts names and their effects, btw. I would certainly have stumbled over that.
Lives of great men all remind us we may make our lives sublime
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Apr 2017 19:59
Heads up on the redesign as it might solve all your issues in one go.

I'm going to have a trigger script which can be attached to an object that the player can either interact with or simply be close to.

The trigger script will call the helicopter script with bunch of parameters, for example number of helicopters, whether they are neutral, friendly or hostile, length of mission etc. The way you can scatter the trigger points around the map and only have to edit the trigger scripts (which will be really small so duplicating them isn't such a chore).

Been there, done that, got all the T-Shirts!
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 7th Apr 2017 09:01
Sounds fantastic, Amen Moses. But take your time.
Lives of great men all remind us we may make our lives sublime
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 8th Apr 2017 09:56 Edited at: 8th Apr 2017 09:57
So. here's an early version of the Heli Base, with helis, barracks, fuel tanks, ammo bunkers, trucks.
I'll probably have to enlarge the area a bit for a hangar that may take 6 Helis, and, thinking of the trucks, there should be a road or path to make them useful.
]
Lives of great men all remind us we may make our lives sublime

Attachments

Login to view attachments
PM
yrkoon
20
Years of Service
User Offline
Joined: 14th Jan 2004
Location:
Posted: 8th Apr 2017 14:09
Quote: "
You need to check out my Bod's Mods thread in the free models and media section, there are hangars and helipads amongst many other things."


Bod, ypu made great stuff, but could you possibly modify your sci-fi hangars so that they have ports on both the long sides ?
I experimented a bit with the way that the hangars are now, but it looks very unpractical for Helis, at least with the limited space we have with the heli base.

What I would be thinking of is to have a hangar more or less in the middle of the base, with concrete or asphalt spaces on both sides, and portals pointing to the left and to the right, one for each heli, so, the helis can be pulled sideways out of the building, in parallel, if need be.

With portals on the head or stern side, they would need to be queued up to get to the lift off areas.
I am positiive that, in real life, hangars exist with portals pointing sideway on the long sides, albeit, I have not seen them with portals on both long sides.

Concerning your landing platforms: I actually have taken a few (civil) helicopter flights in different parts of the world, and never have seen - let alone had to use - such constructs.

In a military context, I would be inclined to not expect them, because they make a quick mounting somewhat cumbersome, - even when they are not controlled by GG's AI ;] -, especially when the flight participants have unwieldy things like rifles or big rucksacks on/with them.
Best regards
y.
Lives of great men all remind us we may make our lives sublime
PM

Login to post a reply

Server time is: 2024-12-23 09:30:58
Your offset time is: 2024-12-23 09:30:58