Home   Help Search Login Register  

Author Topic: (Accepted) Mando Heliroute ArmA  (Read 23354 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: (Accepted) Mando Heliroute ArmA
« Reply #45 on: 22 Jul 2008, 21:45:05 »
I mean the code that handles that single chopper in the demo may run in paralel, so you can execute more things in the init.sqf.
This is the code present in the demo:
Code: [Select]
titleText["Some soldiers are waiting for us inside Bagango stronghold", "PLAIN DOWN"];
[]spawn
{
   _scr = [heli1,[getPos dest1],50, true]execVM"mando_heliroute_arma.sqf";
   Sleep 1;
   waitUntil {heli1 getVariable "mando_heliroute" != "busy"};

   {_x assignAsCargo heli1} forEach units group soldier1;
   units group soldier1 orderGetIn true;
   waitUntil {{_x in heli1} count units group soldier1 == count units group soldier1};
   titleText["We'll bring them to Vallejos's hotel", "PLAIN DOWN"];

   _scr = [heli1,[getPos dest2],50, true]execVM"mando_heliroute_arma.sqf";
   Sleep 2;
   waitUntil {heli1 getVariable "mando_heliroute" != "busy"};

   {_x action ["GETOUT", heli1];unassignVehicle _x} forEach units group soldier1;
   Sleep 4;
   titleText["And now a long travel to Rahmadi", "PLAIN DOWN"];

   _scr = [heli1,[getPos dest3],50, true]execVM"mando_heliroute_arma.sqf";
   Sleep 2;
   waitUntil {heli1 getVariable "mando_heliroute" != "busy"};
   heli1 setVariable ["mando_heliroute", "free"];

   player action ["GETOUT", heli1];
   titleText["T H E   E N D ", "PLAIN"];
};

// Add here the code for a second chopper, if you do with spawn command you will be able to add more choppers below at will.

And dont forget to read what spawn command does.

Now, if you have scripting questions, feel free to use the general editing and scripting forum to ask there.

Offline Mille

  • Members
  • *
Re: (Accepted) Mando Heliroute ArmA
« Reply #46 on: 23 Jul 2008, 06:06:51 »
I say thank you for it I start taking the help already now. :)

Offline Aplion

  • Members
  • *
Re: (Accepted) Mando Heliroute ArmA
« Reply #47 on: 07 Sep 2008, 17:12:35 »
Problem solved.

Sorry for the post.

Aplion
« Last Edit: 07 Sep 2008, 19:29:33 by Aplion »

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: (Accepted) Mando Heliroute ArmA
« Reply #48 on: 18 Nov 2008, 21:21:23 »
Does the code have to be executed from the init.sqf?
TS3 IP: tor.zebgames.com:9992

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: (Accepted) Mando Heliroute ArmA
« Reply #49 on: 18 Nov 2008, 23:40:39 »
Not required, but init.sqf is always a good place to setup things like chopper routes.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: (Accepted) Mando Heliroute ArmA
« Reply #50 on: 22 Nov 2008, 10:23:16 »
on a dedi server I got a whaaa whaa about a local variable... any ideas?
TS3 IP: tor.zebgames.com:9992

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: (Accepted) Mando Heliroute ArmA
« Reply #51 on: 22 Nov 2008, 22:40:16 »
Probably you are executing the script there where the chopper is not local.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: (Accepted) Mando Heliroute ArmA
« Reply #52 on: 30 Nov 2008, 18:18:22 »
Hello again. So I am using this script on AVGANI. I have combatmode = Blue and setBehaviour = "careless" but the AI still want to land on the side of buildings and on a fence even though my choppers' markers are on the road to land. Would inserting a invisible H help them land on the road where they are suppose to?

The mission is in the MP beta/review board. It is called Desperate Defence.
TS3 IP: tor.zebgames.com:9992

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: (Accepted) Mando Heliroute ArmA
« Reply #53 on: 30 Nov 2008, 23:50:56 »
It is probably a locality problem, the script only takes fine control of the chopper when landing if the chopper is local where the script is executed.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: (Accepted) Mando Heliroute ArmA
« Reply #54 on: 01 Dec 2008, 06:13:03 »
I have gotten Spooners help on this matter before when they weren't localized a hint message appeared.... There is no hint msg now. They just simply do not land where I want them to. One chopper is off about 15m and the other about 7m. No errors on the dedi server log. No errors in game...


This is in the choppers init field:
heli1
Code: [Select]
if (local this) then { iron = [this] execVM "route1.sqf" }; this setBehaviour "Careless"; this setCombatMode "BLUE";
heli2
Code: [Select]
if (local this) then { iron = [this] execVM "route2.sqf" }; this setBehaviour "Careless"; this setCombatMode "BLUE";

If you download the mission and put it up on a dedi you will see this problem too... They land but not where I want them too which is on a street with buildings and walls close by it. When I run the mission on my local server they land exactly where I want them to.
TS3 IP: tor.zebgames.com:9992

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: (Accepted) Mando Heliroute ArmA
« Reply #55 on: 01 Dec 2008, 08:54:30 »
That means that the locality of the chopper is changing after the script is executed. Try to test the same scenary on SP, where the locality is always fixed.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: (Accepted) Mando Heliroute ArmA
« Reply #56 on: 01 Dec 2008, 20:13:03 »
Ok it works when there are no enemy around. But, if they are shot at they go beserk.... is there a way to force land them at that spot?

Also, if you can provide an example of what you are talking about with locality because obviously I showed you the scribbet of making it local. So, if there is something else you mean please provide an example.
« Last Edit: 01 Dec 2008, 20:16:27 by Ironman »
TS3 IP: tor.zebgames.com:9992

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: (Accepted) Mando Heliroute ArmA
« Reply #57 on: 02 Dec 2008, 01:52:15 »
For the first problem, the chopper needs to reach a destination where the fine landing code takes control over it. If the chopper doesnt reach that destination because it is fleeing away or fighting, the accurate landing code is not executed.

About the locality, for example, if you start inside a chopper piloed by AI, the first second of the mission the chopper is local to the server, after this, the chopper is local to the player (cargo) inside.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: (Accepted) Mando Heliroute ArmA
« Reply #58 on: 02 Dec 2008, 06:05:05 »
this is a exfil that I am trying to do. Like in your demo I believe you has a soldier named "soldier1" and you made his whole group get in the little bird. This is what I am trying to accomplish.... with AI flying of course.
TS3 IP: tor.zebgames.com:9992

Offline VanhA

  • Members
  • *
Re: (Accepted) Mando Heliroute ArmA
« Reply #59 on: 10 Mar 2009, 13:37:20 »
Hello.
I've used this script before and I'm working on a small scale stealth mission to capture & escort an officer.
In this case I was wondering could I somehow add it as "onMapSingleClick" function so that clicking moves the desired game logic on players current position?
I've never used the mapclick before so I'm a bit unsure how to proceed... :whistle:

I need an Mi17 to come when I have chosen the location via radio/mapclick.
(I could use just synched waypoints and commands but I've found them unreliable in hostile territory + I prefer not to have waypoints for players)

VanhA