Jump to content
Sign in to follow this  
tj72

Airlift v1.51b

Recommended Posts

Airlift 1.73 -hotfixed!-

Airlift is a fully dynamic and repeatable chopper pickup service that mission editors can add to their mission with great ease.

These scripts are designed to be able to work with other scripts and script modifications with no conflict. The download is the template mission and you can add Airlift to your existing missions by copying the directory named TJ72_CPup into your target mission folder, adding the line from the init in the root of the template mission folder, and merging the template mission into your own mission.

After that your player must be added to a list in the file TJ_Init in the TJ72_CPUp directory as (leader group). NEW the players group must be added to the E_Grouplist array in the same order as the playerlist array. If the player is select 1 position on the playerlist array then they are select 1 on the grouplist array. This is covered in the readme and also commented in the .sqs file. So please read the readme.

Once your mission has Airlift included the group leader will be able to direct air transport with the UH60 for his group. The UH60 can be switched out with another type but the script is designed to have 1 pilot and two gunners so no littlebird support yet. This script is solely for Infantry transport purposes and is not involved with supply drops or reinforcement missions. Although the player could direct a remote pickup for distant AI to load into somehow and arrive at the players desination of choice. Something like this would be a usage of the dynamic features available in the system.

The scripts use six choppers and makes use of them dynamically.

Overall this script should help any SP or MP missions that the mission maker would like some kind of automated pickup service. The benefit being that the player will not have to manage any group AI or cumbersome menu array since the waypoints are set with map click and the rest is handled with the action menu. The advantage of this system over other chopper scripts would probably be the depth in the options to abort and advance takeoffs and to plan special flightplans aside from a normal beeline to the LZ which might put the chopper in danger en route. The system uses waypoints with adjusting calculations to reduce travel time over long distances but still preserve the flight plan. The system is perfectly capable of fast direct pickup as well.

Airlift is designed to work in MP but it is currently a public BETA state since it has only ben tested on a dedicated server with one player. The system needs to be used by multiple users and have no bugs reported before it moves up from BETA status.....

It was originally intended to have this script run smoothly for multiple human controlled groups in MP simultaneously.

I will be updating this thread with more notes and points and I would like to hear any feedback that any of you might have regarding this script/system.

Notes: There is a Action added during the Airlift to Advance to next LZ or Advance to home base. This is to allow the leaving behind of any one in your group should the script caller need. Due to the actions menu changes while on board vehicles, the caller will have to exit the vehicle to access these actions.

The transport chopper will takeoff for next position when entire group is loaded/unloaded by default.

Airlift still only supports one side per mission. This will be updated in the near future!

-NEW- Respawn friendly with action added back after respawn!

This is a test version of this mode since it has not ben tested in mulituser MP session but it works in MP dedicated test mode.

-Fixed- Bug where respawn initial version was broken.

-NEW- Water Rescue and drop off feature.

Chopper will spawn a boat if the caller is in the water. Also, chopper will spawn a boat if destination LZ is on the water.

-NEW- Precision Landing mode. Used for water landings. But by switching a variable in the TJ_Init file, can also be used for land.

Default is disabled for land as Precision landing is slower than default landing mode.

Enjoy !

IMPORTANT NOTE: I forgot to include in the Readme this info:

If you want more than one base you must update the etar and wtar arrays for that chopper with the correct base number. In the example missions you can see that trnspt03 has an etar03 (or wtar03 for WEST) select 3 value of 2 for ebas02. If you add another base logic ebas03 or wbas03 you must change the array value to 3. These arrays are listed in TJ_Init.

---------------------------------------------------------------

1.71

-FIXED- Some typos left in code

-FIXED- Precision Landing over water has been tweaked for better speed

-------------------------------------------------------------------------

1.73

-ADDED-Anti Crashing Code added, chopper will attempt to raise flying height if crash is imminent

-ADDED- Tweaks for cruising altitude to attempt better flights over hilly terrain and Long Range distance threshold

-FIXED- Improved Long Range code to avoid heli hanging in air before resuming next Waypoint

-ADDED- Vector markers are now arrows that point the direction of travel for chopper

Share this post


Link to post
Share on other sites

All works great except 1 thing smile_o.gif

if you are the leader of a group of players and you are killed and respawn you no longer get the option to call in pick up instead this option goes to the 2nd in command even if this is an AI controled player.

Have you any idead how to change this so you do not loose this option if respawn.

One thing i have noticed though is if you go back to your body you can then call in a heli but as soon as you walk away from your body this option is removed again.

Any ideas what could cause this or maybe a work around?

Share this post


Link to post
Share on other sites

There needs to be a script or trigger to give the call Airlift action back to the player after respawning.

The TJ_Init file runs the loop and adds the action for each player in the player list at the start. The air lift script replaces the Call Airlift action at the end of the cycle.

A refresh of this process will replace the action. Not sure exactly how to implement it offhand though but Ill work on it. But you can see in that file where Im adding the action to start the process.

Share this post


Link to post
Share on other sites

Thanks for that i will also take a look and let you know of any work around i find.  You can download my beta test version of the mission with your script in at the following URL:

Morticus Beta Test Missions

The mission is using the XAM1.3 English Add on.

Please feel free to take a look. and comment to me via E-mail all enclosed in the readme.txt in the download.

The mission is still in development and changes daily at the moment. smile_o.gif

Share this post


Link to post
Share on other sites

I hope to try out your mission soon. I have ben testing it out on Sahrani and trying to find bugs or breaks and there are a couple.

I have to try combining the script with other script projects out there as well.

Next version will have a Parachute mode where you can click an LZ position past the drop zone, if the group ejects out during the flight then the BH will return to base instead of landing an empty chopper.

Please note that Airlift will break if your LZ winds up far over the water and you dont click to reroute before the LZ threshold has ben reached. Once you are onboard the system expects you to click your LZ and reroutes properly.

For the respawn problem. I was thinking of making a trigger that will add back the action if the player goes to it. Like a marker that says request Airlift. Then the list of leaders from the mission start is checked and if that player is in the original list of players then they get the Airlift option back. Other players would not get the action. But I dont want to add the action back more than once so your action menu gets multiple options, argh. So I have to check if you allready have the action before it is added. Hmm have to figure all that out....

This would require respawning back to base to get the action and not in the field. If your next in command is not AI then they will get the action in the field if the script is still running which would make sense as if the next in command picked up the radio and now can call Airlift for next time. But I realize if the Airlift is enroute and the leader dies it will ABORT mission so the rest of the team is SOL so I need to rethink this logic damn....

If Airlift isnt RTB while leader dies then I dont expect the action to be put on the next leader since its added after the current Airlift has landed.

Share this post


Link to post
Share on other sites

Looking at the script you have the only thing i can think of is to place a bit of code in that if player not alive then remove the action, then i suppose in the init put reference back to your script?  not right up on scripting yet.

Mybe this will work but not tested it or sure about it.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #Start

_alive = alive _player

_player = Playerlist select _i

if (_alive) then {_Action1 = _player addaction ["call for Airlift", "TJ72_CPUp\SET_AR_VAR.sqs"]}

if(!_alive) then goto "1"

? _i >= _countplayers - 1: goto "End"

_i = _i + 1

goto "Start"

#END

#1

_player removeaction _Action1

goto "Start"

Then is suppose you could call the script in the player init field, Dont get me wrong i am no expert at scripting so if this wrong then it will not work.

Share this post


Link to post
Share on other sites

I tested the scrip does not work sad_o.gif I have tried the trigger calling th script again, that does not work either and i have tried to put some code in the init of the player and that does not work. I will keep looking though. Its a strange one indeed. maybe if we tied the menu up with a obj(player) maybe then would get the menu all time just all the players would have the option.

So did you like the mission so far ? needs a lot of refining but its bloody hard to do sector 1 never mind the rest of the island. need to iron out some bugs though but gettig there.

Share this post


Link to post
Share on other sites

I just had an idea you may be able to put in your airlift script. I was thinking that maybe the call airlift is done through a item, that the players can pick up from a body in order to call the airlift? as i noticed in the grouplink2 mod you get a first aid kit and you can carry this about even though it is not physicly seen in your pack. Maybe make it a radio of types, so when dead it stays on the players boby until it is removed then you have to get another from a ammo dump.

Not sure how to do this though but would work like the medikits except not heal you of coarse smile_o.gif

Share this post


Link to post
Share on other sites

Found Bug

Airlift was not repeating an allready used transport. Only new transports. Update for this is complete

1.52

also direct route was not being taken over long distances. Fixed both.

Link in original post has ben updated.

Still need to implement respawn system and PvP mode.

Found new bug: Chopper is crashing into high mountains during transit. The script will need failure code for this event since the service becomes disabled if the chopper never dies but also never returns to base. Result is a transport request to a downed chopper and no way to break out of the loop.

Also need to fix the flight behaviour to avoid mountain crashing :P.

Working on it.....

Share this post


Link to post
Share on other sites

New version of mission available including new version of the 1.52b airlift.

Great work TJ72 but still few bugs to iron out for MP

Share this post


Link to post
Share on other sites

Hi trying to use script in MP but when you respawn you lose the ability to Call for Airlift???

Share this post


Link to post
Share on other sites
Hi trying to use script in MP but when you respawn you lose the ability to Call for Airlift???

Yeah that has been reported! smile_o.gif

This does work nicely btw

Share this post


Link to post
Share on other sites

@TJ72 M8, I've got a script system that allows you to assign actions to units, such as your air lift script, which can reassign the action after the unit respawns - let me know if you need some help with this. smile_o.gif

Share this post


Link to post
Share on other sites

Thanks for the offer norrin. There is an idea I got just this weekend (simple) which should work, but if not I will take you up on it.

I noticed the chopper lands away from base instead of its starting position which it didnt do on the small island so im redoing the base landing code and testing by riding back with the chopper. Hopefully not a big holdup because usually very small changes are only needed to complete the main cycle of the scripts.

Morticus has set up a test mission with XAM which is the first combo of the script with other mods/scrips. I hope it works with any script system allready out there without issue such as your revive script norrin. Hopefully will work with GL and other things.

I fully intend to make any changes the script needs to be more compatible with other script systems. I hope other people release some missions using it but if not thats cool. Ill have to make a release mission using it and maybe a preview of my next script as well.

Paradrop mode works great btw! Chopper will fly to LZ2 but if you put the marker past the intended drop zone and eject the group the chopper will fly back to base instead of doing landing sequence. This will be available next update. The PvP code may have to wait although Id like to get it done with this update it seems this respawn issue is now top priority.

Glad to get good feedback from all. I hope the script feels like a natural addition to the game and any quirks or breaks reported are a great help.

Share this post


Link to post
Share on other sites

Nice work!, I am currently developing a Mission using both Norrin's Revive Script, Dynamic Weather and your Airlift, assuming you will get the resqawn issue figure out and then I will release the map.  

Once again this is great work! Really adds better game play.

Vengeance Out!

Share this post


Link to post
Share on other sites

Hi,

Thanks alot. Im working on it now and I hope to have the respawn problem resolved very soon indeed.

One additional note about this script(s) is that in SP the time accel may break the script. In order to prevent this break only use time accel during flight and not when loading or unloading or setting markers. If the action menu does not update or leaves actions like abort after youve ben picked up then you know that time accell has broken the script. Id like to fix it but hopefully that workaround will do since this respawn item is now the main problem in the system. norrin you might be hearin from me real soon.... smile_o.gif

Share this post


Link to post
Share on other sites

Yes you are right I have just ran into that tonight during testing.  I did notice that during MP testing on a Server I lost the HQ messages?  No big deal as I understand resqawn is the most important issue now, just thought I would mention it, Helo did complete pickup and drop off. I have worked with Norrin on other issues he is really good.

smile_o.gif

Share this post


Link to post
Share on other sites

Yeah no messages from HQ in MP yet. See first post for details.

I hope I can get the respawn thing done this weekend if not sooner. Heres hopin.

Share this post


Link to post
Share on other sites

I have the action adding back after player is killed now. Just finished this minute.

I assume the EH is local only so that in that script I can reference player and that player alone will be given the action back and not every player in game. Can anyone confirm this? Hope so.....

EDIT:

OOPS nevermind. The action comes back but I get further errors where group is not found. Sorry! I will work to fix it. Hopefully this evening have it all worked out.

Share this post


Link to post
Share on other sites

Thanks TJ72, looking forward to releasing my map with your Airlift. Works Great, solving the resqawn will do it!

By the way what is the purpose of the Radio "Debug_Test"

Share this post


Link to post
Share on other sites

great news, hope you solve the last little problems thumbs-up.gif

I have a nice mission where i have a really great usage for the airlift script. It would be really handy to move vehicles from one small island to another or to the mainland smile_o.gif I got a coop mission where bluefor is going to retake whole island from opfor and the bluefor starts off the mainland in rahmadi and have to launch their first attacks from that island by sea or air.

Share this post


Link to post
Share on other sites

OK I got rid of the bug and uploaded the newest version. It worked in my tests and gives back the action to the player by use of event handler killed seems to work.

Fingers crossed

The DEBUG_TEXT is multiplayer hint code. Basically its a global variable that is meant for Publicvariable so it usually a string that can be anything but usually a variable value or array being checked, With Publicvariable command the string is sent over the network in MP and if a client is listening for a change to the variable it can hint on the machine there for the check. Any hint you want to see running on server will need this for testing to see if the code is working as it should in MP.

The Taurus helped me with that and the knowledge applied to other problems getting this to work in MP so his help and others was invaluable. Again thanks to all for your help and interest.

The script only transports infantry at this time and I think the ability to transport vehicles by air would be a great addition to the game. I would love to make these changes but theres another script I want to develop first. So hopefully its current features will be usefull for your mission still.

Let me know if any problems!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×