Jump to content
Sign in to follow this  
norrin

Chopper/aerial taxi script

Recommended Posts

Is there a way to limit it back to 1 player i.e "s1" like when it starts as everyone gets it when i use the above

@psvialli- Try this

NORRNCustomExec1 ="if (_name == s1) then {[slick1] execVM ""scripts\heloGoTo\heloGoTo_init.sqf""};";

@adamcarolan2290 - in your init.sqf put an extra line of code something like:

if (player == s1) then {[slick1] execVM "reAddChopperEx.sqf"};

Then create an sqf script in the root directory of your mission folder and call it: reAddChopperEx.sqf. Then open this script and add the following code:

//reAddChopperEx.sqf

_chopper = _this select 0;

while {true} do 
{
while {alive player} do {sleep 1};
while {!alive player} do {sleep 1};
[player] execVM "scripts\heloGoTo\addExAction.sqf";
};

Hopefully, if I haven't made any syntax errors, it should work now when the player called s1 respawns.

Edited by norrin

Share this post


Link to post
Share on other sites

Turns out I had not fully tested this.

Again, I wish to only activate the chopper taxi after trigger is satisfied (which is working fine), AND after revive/respawn - but only for player named s1.

this seems to be working for me...

if ( (ChopperTaxiAdded) && (player == s1) ) then {[slick1] execVM "scripts\heloGoTo\heloGoTo_init.sqf"};

But...

after the trigger is satisfied, if other team members also get revived / respawned, than s1 ends up with multiple instances of the "call extraction chopper" in his action menu. Every time a teammate gets revived, a new instance shows up in the action menu.

If anyone can help I would be very grateful.

https://sites.google.com/site/rflaggtoc/wip-missions/Revive20Taxi.Takistan.7z?attredirects=0&d=1

Edited by R.Flagg
to be more clear

Share this post


Link to post
Share on other sites
after the trigger is satisfied, if other team members also get revived / respawned, than s1 ends up with multiple instances of the "call extraction chopper" in his action menu. Every time a teammate gets revived, a new instance shows up in the action menu.

You're very close to getting this right mate. Your revive_init code should look like this:

NORRNCustomExec1	="[_name] execvm 'afterRespawn.sqf'; nul = [player] exec 'legheal.sqs';"; 	// Exec1 occurs following being revived
NORRNCustomExec2	="";  									// Exec2 occurs when you team kill
NORRNCustomExec3 	="[_name] execvm 'afterRespawn.sqf'; nul = [player] exec 'legheal.sqs';"; 	// Exec3 occurs when you spawn at base

and the afterRespawn.sqf needs to look like this

_name = _this select 0;

if (_name == s2) then 
{
_actionId = player addAction["Fire Missile","launchMissile.sqf",[this, missilestart,"M_Hellfire_AT",200], 1, false, true, ""];  null=[s2, ULBM1, nil] execVM "TerminalBackpack.sqf";
};

if ( (ChopperTaxiAdded) && (_name == s1) ) then {[slick1] execVM "scripts\heloGoTo\heloGoTo_init.sqf"};

The reason being that any playable AI in your group are local to your PC - therefore cause you've used player and not _name it triggers this code whenever the playable AI are revived (as you are the player that is local to the AI) and hence multiple instances of the actions appear (sorry always have trouble explaining this).

Share this post


Link to post
Share on other sites

I love you man. :xmas:

Seriously though - thank you for being so generous with your time.

Share this post


Link to post
Share on other sites

As of version 1.57, when using these scripts, when you call the helicopter to any position, the helicopter will....

1. Fly to the position....

2. Smoke is deployed...

3. The helicopter travels to the point where it is called and just hovers there.

Has anyone seen anything similar?

-AD

Share this post


Link to post
Share on other sites

It works for me, just make sure that the terrain is actually flat and without many trees. The only problem for me is that I have 2 Call chopper extraction actions in my menu. Guess i need to read the manual completely^^

Share this post


Link to post
Share on other sites

I've seen this a couple times too. I am using the hotfix files (dated 11/16), and the latest BIS beta. I was in/around airports on Fallujah 1.0 (in other words, open/flat ground).

First time it was when we were in the choppper, so all I had to do was cancel the drop-off point, and make a new one, and it fixed itself. 2nd time though it was when we were on the ground waiting to be picked up... so there was nothing I could do to fix it. It just hovered. (I ended up shooting at the pilot for insubordination).

Share this post


Link to post
Share on other sites

Thanks for the additional info R.Flagg, I'm planning to start working on these scripts again in the not too distant future, so I'll take a close look then. In the mean time, if you come across anything else that may help me track down the issue please let me know.

norrin

Share this post


Link to post
Share on other sites

Um for me it keeps saying that scripts\heloGoTo_init cannot be found, I've never run a script before, and the wiki's and guides don't make any sense to me, a person who's never done this before..

Share this post


Link to post
Share on other sites
As of version 1.57, when using these scripts, when you call the helicopter to any position, the helicopter will....

1. Fly to the position....

2. Smoke is deployed...

3. The helicopter travels to the point where it is called and just hovers there.

Has anyone seen anything similar?

-AD

I see the same thing. Half the time the scripts works fine and the chopper deploys smoke and lands perfectly. Other times, it's frozen hovering after deploying smoke as described by AD. Similarly, sometimes it freezes hovering before landing when flying the squad to its destination (requiring an explicit disembark to teh squad to get it to land).

Might be terrain dependent, it works 100% of the time on desert. On eg Isla Duala which has plenty of flat treeless terrain, it still glitches.

I'm using CO, latest beta 77068 and the hotfixes.

I'd really love to see this 100% reliable as it's otherwise a beautifully done script. Thanks Norrin.

Share this post


Link to post
Share on other sites
no one?

OK I'll hazard a guess and say you've put the scripts in a place where your mission can't find them.

I put mine in a folder called "scripts" in my main arma directory eg

d:\arma2\scripts\helogoto

If you then create a crewed chopper in the editor and give it the name "slick", and in its init paste this:

null = [slick1] execVM "scripts\heloGoTo\heloGoTo_init.sqf";

then it should work for you.

Good luck.

Share this post


Link to post
Share on other sites

Why would you not put the script into the actual mission directory? Seems bonkers to me!

Didn't norrin release a mission with the script? Use that and see what happens.

Share this post


Link to post
Share on other sites
Why would you not put the script into the actual mission directory? Seems bonkers to me

Why does it matter where I put them as long as they are correctly referenced?

Anyway moving on. I've found that for those missions where the chopper refuses to land at the extraction point after dropping smoke, if I point my cursor at it and order all my squad to board the chopper, it will land and on they get.

Additionally, after clearing the chopper to take off after we've all loaded in, often it will climb to 50m or so and just sit there indefinitely. I find that a quick click of the middle mouse button is enough to get the chopper moving again.

I hope this info helps in some way Norrin.

Share this post


Link to post
Share on other sites

Of course it doesn't make a difference.

Did you try the taxi fixes that were posted a page or so back? They seem to work well for me. Perhaps thatbwill help you too?

Share this post


Link to post
Share on other sites

Haven't tried any of the respawn fixes suggested in the last few pages because I only play SP in the editor, and don't use any respawn scripts. I did add the hotfixes as suggested in the 1st post. Thanks anyway Kremator .

Share this post


Link to post
Share on other sites
@ADuke - Hi mate, have you tried dikkeduif's hotfix available here: http://forums.bistudio.com/showpost.php?p=1736477&postcount=1

Hey Norrin, long time no see,

I recently had a GPU failure and am waiting for my new one to come in the mail but I will take a look at that hotfix when I am back up and running. Thanks for the work you are doing...

BTW this also happens on that "other" version you had made for me that uses the fastrope scripts within my addon.

Cheers,

-AD

Share this post


Link to post
Share on other sites
Can someone try this and let me know if it fixes the problem: http://norrin.org/downloads/OA/HeliTaxi/ChopperTaxi_02.Takistan.rar

Hi Norrin. That seems to pretty much have done the trick. I tried it out on a few different islands and a few different landing surfaces (grass, tarmac etc) and it worked every time.

The only slight bug is related to ACE. When the chopper extracts you, you get in and give it the all clear for take off. It rises to 50m and then just pauses indefinitely with no message on screen. If you click the middle mouse button it returns to base. If not using ACE, after the chopper takes off you can click the middle button to bring up a menu to return to base or cancel. It's only a small thing but might cause ACE users to think the script is broken.

Thanks for this great script.

Share this post


Link to post
Share on other sites

Nice one Norrin, thank you.

Just some ideas though, any chance of making it with a chance to drop an ammo box

too if needed once you land, (with options). Also how about making it respawn if its

shotdown? lol... Thanks again mate.

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  

×