Jump to content

Recommended Posts

1 minute ago, Riksen said:

Please excuse my ignorance but how do I use the script? Any sample mission available? Thank you!

this is all work in progress. no release yet...

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I'm finally releasing an Alpha version of the script.  See top post for demo mission download link.  It ain't perfect, but its coming along.  Took a helluva alot of experimentation to get this far...

Latest video shows:

  • 4 man NATO stack clearing building
  • Simultaneously, 3 man bandit stack comes down stairs to fight.
  • @beno_83au's bad ass breaching charge
  • JBOY's bad ass shotgun breaching
  • Team leader uses hand signals and vanilla Arma voice files to command team (in unit's language, i.e., english, brit, french, persina, chinese, etc.)
  • Each team member covers different arc (leader looks forward, #2 looks left 45 degrees, #3 looks right 45 degrees, #4 watches the team's six (faces backwards).  Arcs can adjust with circumstances (see #2 and #3 both look left when climbing up stairs, and right when descending stairs.  (Not perfect, but its a start)
  • Leader crouches, while followers stand up-right.   Intent is #2 guy can hopefully see and shoot over leader adding more firepower to forward movement.
  • Team reforms dynamically
    • When leader killed, next guy becomes leader
    • When path reaches a dead end, stack reverses order:  Last guy becomes new leader and resumes path.  This reduces ai bumping into each other and going crazy.

Next steps:

  • Like 13
  • Thanks 3

Share this post


Link to post
Share on other sites

Amazing!! I love that you left that chat message in haha!

 

But for the love of god it's not Beano, it's Beno. As in, Ben-oh 🤪

I've only ever heard one other person call me that and it was some old dude about 20 years ago in a Delta Force clan I was in. But he was a bogan and it sounded sooooo bad 😆

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
8 minutes ago, beno_83au said:

But for the love of god it's not Beano, it's Beno. As in, Ben-oh 🤪

I've only ever heard one other person call me that and it was some old dude about 20 years ago in a Delta Force clan I was in. But he was a bogan and it sounded sooooo bad 😆

hahaha.  And thanks for teaching me a new Oz word:  bogan!  I get it now.  You aussie dudes like adding an Oh to names, so I get it now.  My uncle grew up partly in Oz and called me "John-o"...

  • Like 2
  • Haha 1

Share this post


Link to post
Share on other sites

Congrats on getting this out man, very impressive!

 

8 hours ago, johnnyboy said:

Simultaneously, 3 man bandit stack comes down stairs to fight.

 

^ Haha, just knew you were going to pop a crazy surprise in there somewhere.  Endless possibilities on tap here!

 

Btw - Feeling the pull back into the vector-node-space fray big-time now, because I can finally send troops through (proper johnnyboy style, instead of my hacky-ass way) and see how they do. :wiggle:

Share this post


Link to post
Share on other sites
9 minutes ago, madrussian said:

Btw - Feeling the pull back into the vector-node-space fray big-time now, because I can finally send troops through (proper johnnyboy style, instead of my hacky-ass way) and see how they do. :wiggle:

Right on man.  I'm thinking it can work like this:

  1. Get nodes for building per your function.
  2. Call saragahyp's function to get a path based on your nodes.
  3. New code that converts calculated node path to my path format.
  4. New code that reads your node library to flag nodes in my path with "door", "stairs", "roomCenter", "arcLeft", "arcRight".
  5. CopyToClipboard augmented path (so designer has option to take this path and edit it).
  6. Call my script to run dudes thru path

I can modify my script to not require hardcoded flagging for "benobreach", "gunbreach", and "grenade".  And instead have that be random, or dependent on conditions (if  door locked, or use grenades to be more aggressive if lose a team member, etc.).

  • Like 1

Share this post


Link to post
Share on other sites

Good master plan!  When there's a will, there's a way. 💪

Share this post


Link to post
Share on other sites

Script Updated (demo mission link in top post has latest).  June 15, 2019

If you downloaded the first alpha release, I advise you replace it with this one.  Fixed a few bad bugs, and speeded up the stack movement some by reducing some sleeps and using fewer nodes for same path.  It seemed to increase the stack's surviveability some also.

  • Like 3

Share this post


Link to post
Share on other sites

Take a bit of time away and come back to a different game... 

Froggyluv sent me here...

Very impressive... 

Especially the oil rig thing which destroyed a few great ideas ages back... 

Share this post


Link to post
Share on other sites

Cosmic lives!  Right on man.  Good to hear from you.  Hope all is well with you.   That rascally Froggy...  I wonder if he has a line on my lawyer DasAttorney also...

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, johnnyboy said:

Cosmic lives!  Right on man.  Good to hear from you.  Hope all is well with you.   That rascally Froggy...  I wonder if he has a line on my lawyer DasAttorney also...

 

On 4/12/2019 at 7:30 PM, froggyluv said:

Yeah we were once two free stylin carefree happy Cholos wandering South Central in search of more hardcore Mod ideas...

KpHOm5e.png

Last he was seen..

 

 

  • Like 3
  • Haha 2

Share this post


Link to post
Share on other sites

 

20 hours ago, johnnyboy said:

Cosmic lives!  Right on man.  Good to hear from you.  Hope all is well with you.   That rascally Froggy...  I wonder if he has a line on my lawyer DasAttorney also...

 

 

Haha... yeah...  I got the Arma bug again. Lots of cool stuff I have missed out on!

15 hours ago, GEORGE FLOROS GR said:

 

LOL... and there is that.

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

Im a super noob to scripting, but i love messing around in the editor, how could I use this? I know how to add scripts, but it doesnt work when i just put the .sqf's and folders into the mission file

Share this post


Link to post
Share on other sites
3 hours ago, TrickyTrance said:

Im a super noob to scripting, but i love messing around in the editor, how could I use this? I know how to add scripts, but it doesnt work when i just put the .sqf's and folders into the mission file

Hi Tricky, welcome to the forums.  Download the zip file and unzip the entire mission directory into your missions folder.  Then open the mission up in the editor.  To make a new mission on a new map, then create and save a mission, and then copy all the files (except the mission.sqm) into your new mission's directory.  You then will want to edit the init.sqf.  Here you can create new path arrays to use.   And modify the code that calls the main script to pass in units of your choice.  I recommend thoroughly understanding the init.sqf in the demo mission before trying to create a new mission with your own init.sqf.

 

I need to make an instructional video on how how to make your own move point array, so for now I suggest you just play around with my demo mission.  For the different move points in the path array you can add different keywords to make ai do different actions at different points in the path.  For example, see the path array assigned to variable _path2.  On the two move point rows that contain "door" in the second column of the array, you can add "gunbreach" or "benobreach" (or remove those) to get different entries (breaching charge, shoot the lock, or just open the door).  You can also add "grenade" to this keyword array in second column to have leader throw a grenade after reaching the move position.

 

How to create a custom move path array:

Spoiler

1. Open my demo mission in editor

2. Place a marker on a building you want to create a path for and name it.  In my case I named the marker "mrkBldg1".

3. At top of init.sqf change this line to use your marker name:


_house = nearestBuilding getMarkerPos "mrkBldg1";

4. At bottom of my init.sqf you see this line.  This creates a couple of Actions in Player Action menu for you to record your own building path.


// **********************************************************************
// Mission designer leaves this call active to use Fire event to record a path.
// Path stored in clipboard and path array variable named playerPath
// **********************************************************************
_n=[_house] execVM "JBOY_SnS\playerRecordPath.sqf";

5. Click Play Scenario.  Choose second action menu item titled "Record WORLD position (not relative to building))".  (I don't know if the first option works, as I haven't tested it yet).

 

6. Move your player to the first position you want in your movement array, and fire your weapon.  This creates the array and adds the first movepoint to it.  For this example I went to the backdoor of same building I use in demo mission, and fired about 10 feet from door.  its good to have first position away from building, which gives stack a better point form themselves up.

 

7.  Move to position just outside door, face the door, and fire your weapon.  A second point is created here.   Open door and go inside and fire again.  And a third point is created.  You can stop here just to see if the sucker works.  Your clipboard now contains the following array with 3 rows:


[[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],[""],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]]

8. Paste your new array into the init.sqf and assign it to a variable.  Put this below the arrays I have already created.  And add a call to augment_path to pre-process the array.  Your array and the call should now look like this in the init.sqf:


_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],[""],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

9. When you created the move points, the second one was just outside a door.  So let's modify the second column in the second row to contain "door".


_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

 

10.  Your first path is set up.  Now you need some units to run through the path.  Create two new units and place them near the first position, and name them tricky1 and tricky2.  Then add the following code to the init.sqf.  This code will have your two units tricky1 and tricky2 run through the path called _trickys_path.  Play the mission through the editor and watch the units move to the door, open it, shoot anybody they see, and go inside. 


_n = [_trickys_path] spawn
{
	params["_path"];
	sleep 1; // give time for house positions, doors, etc. to initialize
	_stackMembers = [tricky1, tricky2];

	// If you start team in Stealth mode, they start slow and quiet.  But with first shot fired or breach, they then
	// switch to combat, speak loudly, and move fast.
	{_x setBehaviour "Stealth"; _x setUnitPOS "UP";} foreach _stackMembers; 
	
	sleep 1;
	[_stackMembers, _path, house, doorPositions, doors, 0,0,getpos (_stackMembers select 0), group (_stackMembers select 0), true] execVM "JBOY_SnS\stackManager.sqf";
	// **********************************************************************
	// Set team INVINCIBLE for testing path movement.  Remove or comment out for real mission.
	// **********************************************************************
	//{_x allowDamage false;} foreach _stackMembers; 
};

If the unit does not open the door, and walks through it instead, then the position recorded is not close enough to the door.  It's important to make this position just outside the door and centered so when the unit opens the door he can see inside.  If he is off to the side he will ghost thru the wall some, or get shot by an enemy inside that he didn't see (but should have if he was lined up with center of door).  You may need to adjust your door position until he looks good opening door and entering.  To record another position, just use the action menu again as described in step 6 and shoot once to record one position into your clipboard.

 

If that all works you have the basics down to create your own path for any building.  With the above path, the lead unit will simply open the door.  To have the unit breach and/or use grenades, try the following.

 

To make the door entry more dynamic, you can modify the second row flagged with "door" with various combinations.  Edit the path like below, save, and play to see the different actions take place.

 

11. Edit path to make first unit use breaching charge to open door by adding "benobreach" to second row second column:


_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door","benobreach"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

12 Edit path to make first unit use gun breach.


_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door","gunbreach"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

13 Edit path to make first unit use gun breach and toss a grenade in.


_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door","gunbreach","grenade"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

That should be enough to get you started.

 

And note that flashbangs (thanks to Phronk) will be supported in next release!!! (they're working great in my dev branch).  🙂

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

 

Fookin awesome Johnny! havent had a chance to mess around with yet but oh yeah, im gonna fondle her! erhm him.. cough *It* (gender neutral)

  • Like 2

Share this post


Link to post
Share on other sites
On 6/16/2019 at 12:58 AM, johnnyboy said:

Script Updated (demo mission link in top post has latest).  June 15, 2019

If you downloaded the first alpha release, I advise you replace it with this one.  Fixed a few bad bugs, and speeded up the stack movement some by reducing some sleeps and using fewer nodes for same path.  It seemed to increase the stack's surviveability some also.

Yummy ma man....this script rock!!!

  • Thanks 1

Share this post


Link to post
Share on other sites
On 6/18/2019 at 4:16 PM, johnnyboy said:

Hi Tricky, welcome to the forums.  Download the zip file and unzip the entire mission directory into your missions folder.  Then open the mission up in the editor.  To make a new mission on a new map, then create and save a mission, and then copy all the files (except the mission.sqm) into your new mission's directory.  You then will want to edit the init.sqf.  Here you can create new path arrays to use.   And modify the code that calls the main script to pass in units of your choice.  I recommend thoroughly understanding the init.sqf in the demo mission before trying to create a new mission with your own init.sqf.

 

I need to make an instructional video on how how to make your own move point array, so for now I suggest you just play around with my demo mission.  For the different move points in the path array you can add different keywords to make ai do different actions at different points in the path.  For example, see the path array assigned to variable _path2.  On the two move point rows that contain "door" in the second column of the array, you can add "gunbreach" or "benobreach" (or remove those) to get different entries (breaching charge, shoot the lock, or just open the door).  You can also add "grenade" to this keyword array in second column to have leader throw a grenade after reaching the move position.

 

How to create a custom move path array:

  Hide contents

1. Open my demo mission in editor

2. Place a marker on a building you want to create a path for and name it.  In my case I named the marker "mrkBldg1".

3. At top of init.sqf change this line to use your marker name:



_house = nearestBuilding getMarkerPos "mrkBldg1";

4. At bottom of my init.sqf you see this line.  This creates a couple of Actions in Player Action menu for you to record your own building path.



// **********************************************************************
// Mission designer leaves this call active to use Fire event to record a path.
// Path stored in clipboard and path array variable named playerPath
// **********************************************************************
_n=[_house] execVM "JBOY_SnS\playerRecordPath.sqf";

5. Click Play Scenario.  Choose second action menu item titled "Record WORLD position (not relative to building))".  (I don't know if the first option works, as I haven't tested it yet).

 

6. Move your player to the first position you want in your movement array, and fire your weapon.  This creates the array and adds the first movepoint to it.  For this example I went to the backdoor of same building I use in demo mission, and fired about 10 feet from door.  its good to have first position away from building, which gives stack a better point form themselves up.

 

7.  Move to position just outside door, face the door, and fire your weapon.  A second point is created here.   Open door and go inside and fire again.  And a third point is created.  You can stop here just to see if the sucker works.  Your clipboard now contains the following array with 3 rows:



[[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],[""],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]]

8. Paste your new array into the init.sqf and assign it to a variable.  Put this below the arrays I have already created.  And add a call to augment_path to pre-process the array.  Your array and the call should now look like this in the init.sqf:



_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],[""],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

9. When you created the move points, the second one was just outside a door.  So let's modify the second column in the second row to contain "door".



_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

 

10.  Your first path is set up.  Now you need some units to run through the path.  Create two new units and place them near the first position, and name them tricky1 and tricky2.  Then add the following code to the init.sqf.  This code will have your two units tricky1 and tricky2 run through the path called _trickys_path.  Play the mission through the editor and watch the units move to the door, open it, shoot anybody they see, and go inside. 



_n = [_trickys_path] spawn
{
	params["_path"];
	sleep 1; // give time for house positions, doors, etc. to initialize
	_stackMembers = [tricky1, tricky2];

	// If you start team in Stealth mode, they start slow and quiet.  But with first shot fired or breach, they then
	// switch to combat, speak loudly, and move fast.
	{_x setBehaviour "Stealth"; _x setUnitPOS "UP";} foreach _stackMembers; 
	
	sleep 1;
	[_stackMembers, _path, house, doorPositions, doors, 0,0,getpos (_stackMembers select 0), group (_stackMembers select 0), true] execVM "JBOY_SnS\stackManager.sqf";
	// **********************************************************************
	// Set team INVINCIBLE for testing path movement.  Remove or comment out for real mission.
	// **********************************************************************
	//{_x allowDamage false;} foreach _stackMembers; 
};

If the unit does not open the door, and walks through it instead, then the position recorded is not close enough to the door.  It's important to make this position just outside the door and centered so when the unit opens the door he can see inside.  If he is off to the side he will ghost thru the wall some, or get shot by an enemy inside that he didn't see (but should have if he was lined up with center of door).  You may need to adjust your door position until he looks good opening door and entering.  To record another position, just use the action menu again as described in step 6 and shoot once to record one position into your clipboard.

 

If that all works you have the basics down to create your own path for any building.  With the above path, the lead unit will simply open the door.  To have the unit breach and/or use grenades, try the following.

 

To make the door entry more dynamic, you can modify the second row flagged with "door" with various combinations.  Edit the path like below, save, and play to see the different actions take place.

 

11. Edit path to make first unit use breaching charge to open door by adding "benobreach" to second row second column:



_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door","benobreach"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

12 Edit path to make first unit use gun breach.



_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door","gunbreach"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

13 Edit path to make first unit use gun breach and toss a grenade in.



_trickys_path = [
[[2892.1,5995.19,0.00143886],[""],"amovpercmtacsraswrfldf",29.4404,"UP",1,false,2],
[[2895.4,6003.49,0.00143886],["door","gunbreach","grenade"],"amovpercmtacsraswrfldf",303.207,"UP",1,false,2],
[[2891.25,6006.07,0.18121],[""],"amovpercmtacsraswrfldf",298.216,"UP",1,false,2]
];
_trickys_path = [_trickys_path,_house] call JBOY_augmentPath;

That should be enough to get you started.

 

And note that flashbangs (thanks to Phronk) will be supported in next release!!! (they're working great in my dev branch).  🙂

Thanks man!

  • Like 2

Share this post


Link to post
Share on other sites

@phronk's flashbang implemented.  AI pretty effective with this.  Flash stuns players also, so if you were in that room, that AI would have lit you up!

 

  • Like 7
  • Thanks 1

Share this post


Link to post
Share on other sites

Wow. I need a cigarette, and I don't even smoke.

  • Like 2
  • Haha 3

Share this post


Link to post
Share on other sites

New features:

  • Player can order AI teams to execute entry paths on buildings.
  • AI will wait for breaching order from player before entering.
  • Player can synchronize breaching team entries by waiting until all teams in place, then ordering All Go!

Thanks much to @RCA3 for help with the action menus!

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

If Arma4 had a trailer with this happening Id be so pumped - your doing the Lawd's work JohnnyBoy. So can the AI do this to Player as well -im imagining a mission where player has to search houses maybe do some computer code mini-games all the while enemy AI police patrols are actively searching the neighborhood house to house like such above. Man that's be sweet.

 

"Toc to Entry Team.."

  • Like 3

Share this post


Link to post
Share on other sites

@froggyluvExactly.  I think the AI using teams against player is the most exciting use case actually.  But it was simple enough to add in player controlled teams also.  As a player, you have to be careful not to block the entry teams, as you can bump them off course and make them clip.  But it is fun to follow a one or 2 man team and fight with them.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, johnnyboy said:

New features:

  • Player can order AI teams to execute entry paths on buildings.
  • AI will wait for breaching order from player before entering.
  • Player can synchronize breaching team entries by waiting until all teams in place, then ordering All Go!

Thanks much to @RCA3 for help with the action menus!

:icon_dj: job as usual J-Boy!!!

PS: something went through my mind.....how difficult will be to get a "stack SIDE" and/or "stack FRONT" option work? Sometimes a bad guy is just behind the entry door pointing out his weapon, and if AI opens for flashbang (thank you and phronk for that, BTW) it gets blasted...

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

×