OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Mandoble on 06 Jan 2008, 13:29:17

Title: Mando Move (ACCEPTED)
Post by: Mandoble on 06 Jan 2008, 13:29:17
Quite accurate vehicle movements for land vehicles and ships.
See usage in script header.

YouTube example (http://www.youtube.com/watch?v=BzaR1D8XVfU)

Get Mando Move 0.2 (http://www.ofpec.com/ed_depot/index.php?action=details&id=604)
Title: Re: Mando Move
Post by: LeeHunt on 09 Jan 2008, 00:44:24
Great-- very useful not only for convoys but making vehicles "behave" properly during cutscenes.
Title: Re: Mando Move
Post by: ARMAVIDZ on 15 Feb 2008, 10:50:38
What a great script. A question, after the end of the preset markers, the unit(in this case a HMMWV) turns around and races back to the original marker. Is there any way to terminate the script after x markers is reached, or perhaps make the unit keep the kph speed on its way back?
Title: Re: Mando Move
Post by: Mandoble on 15 Feb 2008, 11:43:15
The script doesnt move the unit to the first marker after last one has been reached, the vehicle will keep at that last position unless there is some waypoint taking the control.

Check it.
Title: Re: Mando Move (ACCEPTED)
Post by: johnnyboy on 07 Feb 2009, 03:16:43
Somehow I missed this script.

I spent hours modifying Mando_Chaser to use a path of markers instead of a list of units to chase.  It works great.  I was going to post this on the Mando_Chaser beta thread this week as a useful mod to the brilliant mando_chaser routine... too funny.

Oh well.

Mando, a few suggestions:

1. When you force vehicles through rough terrain or tight corners so they bump objects sometimes, its very possible to have a unit tip on its side or flip upside down.  In my modified version of Mando_Chaser, this would happen, but the code would happily keep the vehicle following its path forever (upside down or on its side).  This Mando Move script may have the same problem.  Here's the code I used to fix it:

Code: [Select]
// If vehicle is flipped over, then wait ten seconds.  If still flipped (or on its side)
   // then end the script.  Otherwise vehicles keep following path even if upside down.
   if ((vectorUp (vehicle _unit)) select 2 < 0.5) then
   {
        player globalchat "vehicle flipped, wait a bit to see if it rights itself...";
        sleep 10;
if ((vectorUp (vehicle _unit)) select 2 < 0.5) then
{
_continue = false;
player globalchat "vehicle flipped, so end script";
};
};

2. It would be great if you could add a "reverse" flag, so units would move to a marker in reverse also.  This would be great for having units back out of parking places or garages, etc.

3. I'm not sure if its true of mando_move, but my version will allow a vehicle to get stuck heading straight on against against a solid object (building, wall, etc.).  The code should sense this, and either end the script, or attempt to back up at an angle, and re-attempt a move forward to next marker. 

I'm attaching my modified version of mando_chaser, called mando_chaser_path, just for the hell of it...

But it does illustrate the following well (which is probably true of Mando Move also):

1. Gunners in moving vehicles will engage enemy while moving through their path of markers.
2. Vehicles are relentless in moving through their paths (will plow through units in their way).
3. Player can be a gunner in a vehicle, making for great chase and shoot game play (I turn off the w,a,s,d keys when you switch to gunner, so the driver only follows the path, but you as gunner are free to shoot...this makes making a mission like  the humvees blazing through towns in "Generation Kill" very possible.
Title: Re: Mando Move (ACCEPTED)
Post by: schuler on 07 Feb 2009, 04:56:17
very impressive  :yes:
is there any plans for it with use of soldiers?  like LeeHunt said. with cut scenes, and civis might be nice!
Title: Re: Mando Move (ACCEPTED)
Post by: Mandoble on 07 Feb 2009, 20:11:54
Updated to v0.2 including some suggestions by johnnyboy:

- You can set an array of classes to be considered obstacles to avoid (Ex. ["House", "Man"]).
- The script checks for vehicle flipped condition, if flipped for 10 secs the script stops.
- The vehicle will start evasive maneouvers if damage increases.
- Each position now includes a minimum distance to accomplish (check script header for more details)
Title: Re: Mando Move (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 16 Apr 2009, 12:32:28
Hey guys, sorry for dragging this up, but i have a question...

Could anyone give me an example of what the init.sqf would look like, if i wanted a vehicle to move through say 4 markers positioned on the map.

I have tried to modify the example mission, played around with the script, but cannot get it to work.

Any help would be greatly appreciated.
Title: Re: Mando Move (ACCEPTED)
Post by: Mandoble on 17 Apr 2009, 11:00:41
Code: [Select]
_wps = [[getMarkerPos "mk_1", 0, 5],[getMarkerPos "mk_2", 0, 5],[getMarkerPos "mk_3", 0, 5],[getMarkerPos "mk_4", 0, 5]];

_script = [your_vehicle, 20, 0.1, 1, _wps, ["House"]]execVM"mando_move.sqf";

waitUntil {scriptDone _script};
hint "Route finished";
Title: Re: Mando Move (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 17 Apr 2009, 20:49:29
Thanks Mandoble, sorry another quick question...  Would it be possible to get the vehicle to stop at say marker 3, and load the players squad before continuing?

Fantastic script, cant believe i missed it.
Title: Re: Mando Move (ACCEPTED)
Post by: johnnyboy on 18 Apr 2009, 00:56:11
You could run the move script once with 3 markers only.  Upon completion, do your boarding via another script or waypoints.  After boarding completed, run the move script again with a second set of markers to resume the journey.

Title: Re: Mando Move (ACCEPTED)
Post by: Shadow.D. ^BOB^ on 18 Apr 2009, 01:51:49
Now there's an idea...
Title: Re: Mando Move (ACCEPTED)
Post by: Vengeance on 18 Jul 2009, 22:43:41
Mandoble,

I can't seem to find Mando Land to ask the Question so hope you see this.

I have inserted Mando Land in ARMA 2 and it does work. I get two errors that pop up that I don't know how to get rid of.  Below are the links to pictures of these errors, I believe they both have to to with the Mando_Land_Titles.hpp.  

http://img213.imageshack.us/img213/74/mandolanderror1.jpg

http://img31.imageshack.us/img31/4250/mandolanderror2.jpg


Thanks
Title: Re: Mando Move (ACCEPTED)
Post by: Spooner on 19 Jul 2009, 19:14:29
Please don't attach full screenshots when recording errors. The text of every error is easily copied from your arma.rpt file.

Both those errors were caused by changes to the way dialogs operate in A2 (as you probably guessed). I have no idea if Mandoble even owns A2 or intends to support this script in A2 (he isn't very active any more, but does check the board occassionally), so please be patient waiting for a reply.
Title: Re: Mando Move (ACCEPTED)
Post by: johnnyboy on 27 Jul 2009, 07:10:13
Like Spooner said, no way of knowing if Mando is supporting Mando_Move for ARMA2, but here goes anyway...

Mando_move is causing flying in ARMA2 for land units.  I made 40 markers along a road, and run mando_move for a bmp2 to folllow the markers.  For awhile the BMP2 acts as desired, but then it begins flying!   ???  The route in question is from Polana to Orlovets.

Since ARMA2 driving AI is pretty bad I was hoping to use this to make a well behaved convoy...

Note that on flat land on Utes, I have successfully used mando_move for mountain bikes and motorcycles.  I also have successfully used mando_move in ARMA2 for boats.

My only problem so far is in Chernarus.  Maybe it is the elevation changes between markers that cause a problem...

Edit: Solution to Flying problem

The problem occurs when path has sudden down dip in terrain.  I fixed it by changing this code:

Code: [Select]
        if ((_posp select 2) > 0.1) then
         {
           _vz = -0.5;
          }
else
{
        _vz = velocity _veh select 2;
         }

to this code:

Code: [Select]
      if ((_posp select 2) > 0.6) then
      {
         _vz = -3;
    player sidechat "z down -3";
       }
      else
      {
         if ((_posp select 2) > 0.1) then
         {
           _vz = -0.5;
          }
else
{
        _vz = velocity _veh select 2;
         }
      };

Down velocity is now greater when vehicle is suddenly high off the ground.
Title: Re: Mando Move (ACCEPTED)
Post by: Mandoble on 02 Aug 2009, 20:43:58
More than probably I'll support it, installing the game now btw  :P
Lately my free time has been almost null, hope this gets better in the near future.
Title: Re: Mando Move (ACCEPTED)
Post by: bedges on 02 Aug 2009, 21:13:49
Good to see you back Mr. Mandoble Sir, we have indeed missed you :good:
Title: Re: Mando Move (ACCEPTED)
Post by: johnnyboy on 03 Aug 2009, 02:55:31
Very glad to see Mando the Magnificent is back!

I learned something else about Mando Move in ARMA2.  Light vehicles (trucks and smaller) will go very slow down hill unless they have a larger negative Z velocity value.  -3 seems to work.  But -5 guarantees all vehicles go the input speed.

It seems you need to have sufficient road friction in order for the setvelocity command to go full speed?   Strange.

Title: Re: Mando Move (ACCEPTED)
Post by: kju on 03 Aug 2009, 07:32:29
Welcome back Mandoble.  :)
Title: Re: Mando Move (ACCEPTED)
Post by: johnnyboy on 14 Apr 2010, 06:06:36
Does anyone have the Mando_Chaser_Path.Intro.zip file I uploaded in 3rd post on this topic? 

I see 33 people downloaded it over time.

I lost my hard drive awhile back with no backup.  And the link is no longer valid.  :weeping:

I had various modifications to Mando's original script in this file that would be useful to me on a new project, and I hope I don't have to re-invent that logic. 

This would greatly help me out.  Thanks in advance!
Title: Re: Mando Move (ACCEPTED)
Post by: Mandoble on 20 Apr 2010, 01:31:12
I lost my HD too, but was able to recover these two chaser missions included in the attached file.
Title: Re: Mando Move (ACCEPTED)
Post by: johnnyboy on 10 May 2010, 03:49:56
Hola Mando.  Thanks for posting this, it helped me out.  I was just slow in replying to say gracias!