Search the Community
Showing results for tags 'setwaypoint'.
Found 2 results
-
Setting Spawned AI waypoints attributes
viperBAT44 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok... I have searched for a solution to my problem to no avail (nothing specific to what I am trying to achieve anyhow). What I'm doing: Spawning AI BLUFOR group from trigger when my player group is present:working I place this code in on Activation of trigger to appear at marker:_wpt1 = _fireteam addWaypoint [getMarkerPos"WEST_WP1",0];_wpt1 setWaypointType "MOVE"; working... however I don't want group to be running to WP marker, so I put this after said code:_wpt1 setWaypointSpeed "LIMITED"; Group doesn't move at all. I also want the group to be in column formation not wedge. How would I go about making this work? It's simply for base ambiance as my squad lands at base. Thank you in advance! -
[SOLVED] addWaypoint breaks when requested multiple times
paranoid_giraffe posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am going to start off and say I've been trying to troubleshoot this code for several hours. Basically I have a market set up and I want a lot of AI to walk to different points of interest. Right now I have several flagpoles set up with variable names set as "POI_1" to "POI_15". The Code: _pois = [POI_1,POI_2,POI_3,POI_4,POI_5,POI_6,POI_7,POI_8,POI_9,POI_10,POI_11,POI_12,POI_13,POI_14,POI_15]; _rtime = 5; // random time for completion of waypoint _spd = (random (2))+1; // decude whether to walk to sprint _wpradius = 0; // waypoint radius _wp = (group (_this select 0)) addWaypoint [getPos (_pois select (random (count _pois))), _wpradius]; // create waypoint _wp setWaypointBehaviour "CARELESS"; _wp setWaypointCombatMode "BLUE"; _wp setWaypointCompletionRadius 3; _wp setWaypointForceBehaviour true; // _wp setWaypointPosition // _wp setWaypointScript if (_spd==1) then { _wp setWaypointSpeed "NORMAL"} else { _wp setWaypointSpeed "LIMITED"}; _wp setWaypointStatements ["true","_null = [this]execVM('ai_behavior.sqf');"]; _wp setWaypointTimeout [1, _rtime/2, _rtime]; _wp setWaypointType "MOVE"; Additionally, this is set up in the init box of the AI: _null = [this]execVM('ai_behavior.sqf'); And the problem is that this script works absolutely perfectly when there is one AI. I can set it to fast-forward and let it run for a very long time and the AI will walk to different flagpoles either walking or jogging to each, and the script will never hang up. The problem stems from having multiple AI. Then I get errors saying the following: '...ius = 0; _wp = (group (_this select 0)) |#|addWaypoint [getPos (_pois select (random (count _pois))), _wpradius]; Error 0 elements provided, 3 expected File C:\Users\****\Documents\Arma 3 - Other Profiles\Giraffe%20PVT%2e\missions\black_market.pja305\ai_behavior.sqf, line 38 Ignore the fact that is says line 38 - I have a lot of comments at the top of the script. This is for a multiplayer mission. Thanks for reading. EDIT: Oh yeah, and this isn't for a "life" server. (I know that carries a negative stigma for many people.) It's for a new PvP gamemode I am working on. EDIT2: CORRECTED CODE- 6 replies
-
- waypoint
- addwaypoint
-
(and 1 more)
Tagged with: