Jump to content
AeroPostal

Spawning Units That Follow Waypoints With Triggers

Recommended Posts

Hello again. 

Today I'm in a situation where I want the player to move to a certain spot/trigger location where an enemy patrol (2 units, variable name patrol1) will spawn down the road a ways and follow a set of waypoints. How would I go about doing this? 

 

Again new to all of this, please be understanding! 

Share this post


Link to post
Share on other sites

What do you wanna know?!?

I mean, you could just put a npc on the map and make him the player, set 3 enemy units up where u want them to be, hold shift while they are active and click somewhere on the map, now you got you'r waypoint.

(make 3 move waypoints and the last make it a cycle, then move that close to the enemy AI so after the 3 waypoints he will cycle everything all over again, use the first waypoint to set how they handle with a situation safe/combat/etc etc...)

Spawning makes me think you wanna spawn it in with a script, which makes things more complicated and therfor also the question because this isn't needed at all.

In the 3D editor you can do everything just fine...

 

contact1 = [getMarkerPos "con1", Independent, ["I_soldier_F", "I_soldier_F","I_Soldier_AR_F","I_Soldier_GL_F"],[],[],[],[],[],330] call BIS_fnc_spawnGroup;

Simple script which spawns 4 independent soldiers...

More info : https://www.reddit.com/r/armadev/comments/1z8xph/spawning_units_for_dummies/

Share this post


Link to post
Share on other sites

It's going to be a script, I know it is. I already know there is a script for spawning units via trigger and giving them a destination, but I want to give them waypoints so they will follow the direction of the road, rather than just move straight to a destination. Sure I could place them on the map the simple way, but I wouldn't be able to have them walking at the exact time and place I'd need them to for this scene in the mission to work as I envision it.

Share this post


Link to post
Share on other sites
On 2017-5-22 at 3:22 AM, AeroPostal said:

It's going to be a script, I know it is. I already know there is a script for spawning units via trigger and giving them a destination, but I want to give them waypoints so they will follow the direction of the road, rather than just move straight to a destination. Sure I could place them on the map the simple way, but I wouldn't be able to have them walking at the exact time and place I'd need them to for this scene in the mission to work as I envision it.

 

That is where a loiter comes in.

When you make a LOITER waypoint and then right click on the waypoint and click on trigger activate, now connect this loiter to the trigger you want to be used to let them walk.

But also can you hide the units without using a script, in this mode the AI is kinda offline, it is still on the map but no one can interact with it.

Here some quick things:

 

[Video deleted from YT]

[Video deleted from YT]

 

Hope it helps

 

 

the script works but you gotta fill in the variables

_mrk = ["mrk1","mrk2","mrk3","mrk4"] call BIS_fnc_selectRandom;
wp =(_this select 0) addWaypoint [(getMarkerPos _mrk),0]

 

Share this post


Link to post
Share on other sites

CfgGroups entries are a lot easier to use unless you absolutely need specific units. 

 

Share this post


Link to post
Share on other sites
5 hours ago, theo1143 said:

 

That is where a loiter comes in.

When you make a LOITER waypoint and then right click on the waypoint and click on trigger activate, now connect this loiter to the trigger you want to be used to let them walk.

But also can you hide the units without using a script, in this mode the AI is kinda offline, it is still on the map but no one can interact with it.

Here some quick things:

 

 

 

 

Hope it helps

 

 

the script works but you gotta fill in the variables


_mrk = ["mrk1","mrk2","mrk3","mrk4"] call BIS_fnc_selectRandom;
wp =(_this select 0) addWaypoint [(getMarkerPos _mrk),0]

 

This did it, thanks a bunch

  • Like 1

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

×