Jump to content
twistking

How to create empty groups in Eden

Recommended Posts

Hello,
i'm a fan of using huge amount of hold waypoints in long routes and then "group setcurrentwaypoint [group, selectrandom..." to randomize unit pathing (hold waypoints to seperate the parts of the route).
It would be even better if i could have multiple routes set-up in eden so that i could randomly path a group to a different set without having to build all possible routes in one long route with hold waypoints.
How could i do this? I would need to have an emtpy group in Eden so that i could give waypoints to it, but in Eden empty groups get deleted directly. Of course i could leave a single unit in the group and only delete that unit on mission start, but that's an ugly solution. There must be a way to create a group and waypoints without having units in it, no?
Thanks.

Share this post


Link to post
Share on other sites
18 hours ago, twistking said:

There must be a way to create a group and waypoints without having units in it, no?

No.

 

18 hours ago, twistking said:

Of course i could leave a single unit in the group and only delete that unit on mission start, but that's an ugly solution.

Why is it an ugly solution? Does what you need and is only there for an instance while you copy the waypoints information.

If you search this forum there are posts from me for branching waypoints that use this exact solution. I don't see a problem with it as long as you clean up properly.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Larrow said:

No.

 

Why is it an ugly solution? Does what you need and is only there for an instance while you copy the waypoints information.

If you search this forum there are posts from me for branching waypoints that use this exact solution. I don't see a problem with it as long as you clean up properly.

 

Ok. thanks for the reply. I was probably overthinking: I'm not super comfortable with scripting so i'm always a bit anxious about not making things messy and try to be super efficient with the little scripting i do.

My big dissappointment however is, that i realized that you cannot path a group to another groups waypoint. The "grp_A" will smply ignore "grp_A setcurrentwaypoint [grp_B, 2]". So sad! It would be a very intutitive way to do randomization. Maybe i will look up your solution to this you mentioned, but maybe i'll just keep my approach with different routes in one route seperated by hold-waypoints. It looks messy in Eden, but at least it's super quick to set-up...

Share this post


Link to post
Share on other sites

Why don't you make several arrays with you defined routes, where each waypoint will be created in place of the marker you put in the EDEN editor?

in the init of the mission , it can be written like this:

_route_1_markers = ["marker_1", "marker_2"];
_route_2_markers = ["marker_3", "marker_4"];

_all_routs = [_route_1_markers, _route_2_markers];

{
	_grp = _x;
	
	_random_route = selectRandom _all_routs;
	_all_routs = _all_routs - _random_route; /// If you want to exclude the possibility of the same route for two different groups.
	
	{
		_marker = _x;
		
		_wp = _grp addWaypoint [getMarkerPos _marker, 0];
		_wp setWaypointType "HOLD";
		
	} forEach _random_route;
	
} forEach [grp_A, grp_B];


 

  • Thanks 1

Share this post


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

Why don't you make several arrays with you defined routes, where each waypoint will be created in place of the marker you put in the EDEN editor?

in the init of the mission , it can be written like this:

 

Your solution is already too complicated for me to come up with on my own 😉 I did consider trying to do something similar, but found my approach "good enough" for the simple missions i build. It's probably mostly preference, but doing it all in Eden without scripting (only one line of code in groups init) also has it's benefits.

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

×