Sign in to follow this  
Followers 0
Stoll

Waypoints

2 posts in this topic

I'm playing around with spawning some AI and let them patrol a small area.
So, this is working so far:

Spoiler

_waypoints = 	[
				[4777,10292,0],
				[4807,10343,0],
				[4827,10330,0],
				[4846,10328,0],
				[4914,10279,0],
				[4759,10198,0],
				[4731,10246,0]
				];
{
	
_wp1  = 	_x select 0;
_wp2  = 	_x select 1;
_wp3  = 	_x select 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = 	_x select 6;

	_wp = _x;
    _wp = _group1 addWaypoint [_wp, 0];
    _wp setWaypointType "MOVE";
    _wp setWaypointBehaviour "AWARE";
	_wp setWaypointCombatMode "YELLOW";
	_wp setWaypointFormation "WEDGE";
    _wp setWaypointspeed "NORMAL";

} forEach _waypoints;

//Close the cycle for Group 1 with first waypoint				
    _wp = _group1 addWaypoint [[4777,10292,0], 0];
    _wp setWaypointType "CYCLE";
    _wp setWaypointBehaviour "AWARE";
	_wp setWaypointCombatMode "YELLOW";
	_wp setWaypointFormation "WEDGE";
    _wp setWaypointspeed "NORMAL";

 

The AI spawns and patrols as it should, but I'm getting a RPT error for this:
 

Spoiler

19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191
19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191
19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191
19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191
19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191
19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191
19:01:13 Error in expression <ct 2;
_wp4  = 	_x select 3;
_wp5  = 	_x select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error position: <select 4;
_wp6  = 	_x select 5;
_wp7  = >
19:01:13   Error Zero divisor
19:01:13 File a3_custom\mapcontent\Patrol.sqf, line 191

 

I used this already one year ago and I'm sure that I didn't get an error in the past.
Any ideas?

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.