Search the Community
Showing results for tags 'addwaypoint'.
Found 5 results
-
I want the script to be executed only when wp is reached, but this script activates sqf one after another no waiting for the helicopter's arrival at the waypoint. Even worse, it repeats the process after the last script is executed. So the question is: how to execute the script only if the helicopter reaches a specific point (waypoint)? //radio centers PATROL - ch47 wptow0 = group pil1 addWaypoint [position rc_01, 0]; wptow0 setWaypointBehaviour "SAFE"; wptow0 setWaypointCombatMode "YELLOW"; wptow0 setWaypointSpeed "FULL"; wptow0 setWaypointType "SCRIPTED"; wptow0 setWaypointScript "skripte\wp0.sqf"; sleep 0.2; wptow1 = group pil1 addWaypoint [position rc_02, 1]; wptow1 setWaypointBehaviour "SAFE"; wptow1 setWaypointCombatMode "YELLOW"; wptow1 setWaypointSpeed "FULL"; wptow1 setWaypointType "SCRIPTED"; wptow1 setWaypointScript "skripte\wp1.sqf"; sleep 0.2; wptow2 = group pil1 addWaypoint [position rc_03, 2]; wptow2 setWaypointBehaviour "SAFE"; wptow2 setWaypointCombatMode "YELLOW"; wptow2 setWaypointSpeed "FULL"; wptow2 setWaypointType "SCRIPTED"; wptow2 setWaypointScript "skripte\wp2.sqf"; sleep 0.2; wptow3 = group pil1 addWaypoint [position rc_01, 3]; wptow3 setWaypointBehaviour "SAFE"; wptow3 setWaypointCombatMode "YELLOW"; wptow3 setWaypointSpeed "FULL"; wptow3 setWaypointType "SCRIPTED"; wptow3 setWaypointScript "skripte\wp3.sqf"; wptow3 setWaypointType "CYCLE"; SQF example (only one line and only difference is tower numbers..): systemChat "Helicopter loiter Tower 1";
- 9 replies
-
- addwaypoint
- addwaypointtype
-
(and 1 more)
Tagged with:
-
I want a unit to move in a vehicle after respawn but it shows that error code: 17:52:36 Error in expression <_wp = _unit addWaypoint [_pos1, 0];> 17:52:36 Error position: <_unit addWaypoint [_pos1, 0];> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointType "MOVE";> 17:52:36 Error position: <_unit setWaypointType "MOVE";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointSpeed "Full";> 17:52:36 Error position: <_unit setWaypointSpeed "Full";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointBehaviour "Combat";> 17:52:36 Error position: <_unit setWaypointBehaviour "Combat";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointType "GETIN NEAREST";> 17:52:36 Error position: <_unit setWaypointType "GETIN NEAREST";> 17:52:36 Error Undefined variable in expression: _unit the script is activated with this in the unit's init:this addMPEventHandler ["MPRespawn", {[_unit] exec "respawnvehiclescript.sqf"}]; the script: _unit = _this select 0; _pos1 = getMarkerPos "Marker1"; _wp = _unit addWaypoint _pos1 _unit setWaypointType "MOVE"; _unit setWaypointSpeed "Full"; _unit setWaypointBehaviour "Combat"; _unit setWaypointType "GETIN NEAREST"; hint "%1 respawned!!!"
- 16 replies
-
Hello, _grp = group _this; _wp = _grp addWaypoint [_rndDest, 0]; _wp setwaypointtype "MOVE"; I have this to add a waypoint from an array (_rndDest) to a unit (playable). This code is executed via execVM when the unit spawn for first time and when die. All is working fine when spawn for first time, but when respawn i get and error in _grp = group _this; The error say something about missing vector. Any help, please? Thanks!
-
- group
- addwaypoint
-
(and 1 more)
Tagged with:
-
I am using LARS compositions spawn-er and it has stopped working. The creator is not currently responding and hasn't be active since July. here is the error message _wp |#|setWaypointCombatMode _mode; _wp setWayp... Error Foreign error: Unknown enum value: "" File LaRs\Functions\fn_createComp.sqf [LaRs_fnc_createComp], line 1201 ----------------------------------------------------------------------------------------------------------------------------- here is the code from LaRs\Functions\fn_createComp.sqf. Line 1201 is highlighted. Let me know if the whole file is required. //***** //WAYPOINTS //***** private _fnc_spawnWaypoint = { private [ "_position", "_ATLOffset", "_placement", "_compRadius", "_mode", "_formation", "_speed", "_behaviour", "_description", "_condition" ]; params[ "_cfg", "_group" ]; _position = getArray( _cfg >> "position" ); _ATLOffset = getNumber( _cfg >> "atlOffset" ); //_position = [ _position, _ATLOffset ] call _fnc_getPosition; _position = [ objNull, _position, [0,0,0], _ATLOffset ] call _fnc_setPositionandRotation; _placement = getNumber( _cfg >> "placement" ); _compRadius = getNumber( _cfg >> "completitionRadius" ); _mode = getText( _cfg >> "combatMode" ); _formation = getText( _cfg >> "formation" ); _speed = getText( _cfg >> "speed" ); _behaviour = getText( _cfg >> "combat" ); _description = getText( _cfg >> "description" ); _condition = [ ( _cfg >> "expCond" ), "TXT", "true" ] call _fnc_getCfgValue; //TODO: does this need defering private [ "_onAct", "_name", "_script", "_timeout", "_show", "_type" ]; _onAct = getText( _cfg >> "expActiv" ); _name = getText( _cfg >> "name" ); _script = getText( _cfg >> "script" ); _timeout = [ getNumber( _cfg >> "timeoutMin" ), getNumber( _cfg >> "timeoutMid" ), getNumber( _cfg >> "timeoutMax" ) ]; _show = getText( _cfg >> "showWP" ); _type = getText( _cfg >> "type" ); private [ "_effectCondition", "_effectSound", "_effectVoice", "_effectSoundEnvironment", "_effectMusic", "_effectTitle", "_wp" ]; _effectCondition = getText( _cfg >> "Effects" >> "condition" ); //TODO: does this need defering _effectSound = getText( _cfg >> "Effects" >> "sound" ); _effectVoice = getText( _cfg >> "Effects" >> "voice" ); _effectSoundEnvironment = getText( _cfg >> "Effects" >> "soundEnv" ); _effectMusic = getText( _cfg >> "Effects" >> "track" ); _effectTitle = getText( _cfg >> "Effects" >> "title" ); _wp = _group addWaypoint[ ASLToATL _position, _placement, count waypoints _group, _name]; _wp setWaypointType _type; _wp setWaypointCompletionRadius _compRadius; _wp setWaypointCombatMode _mode; _wp setWaypointFormation _formation; _wp setWaypointSpeed _speed; _wp setWaypointBehaviour _behaviour; _wp setWaypointDescription _description; _wp setWaypointStatements[ _condition, _onAct ]; _wp setWaypointTimeout _timeout; _wp showWaypoint _show; _wp setWaypointScript _script; //TODO: Effects need testing _wp setEffectCondition _effectCondition; _wp setSoundEffect [ _effectSound, _effectVoice, _effectSoundEnvironment, "" ]; _wp setMusicEffect _effectMusic; switch ( true ) do { case ( isClass( missionConfigFile >> "RscTitles" >> _effectTitle ) ) : { _wp setTitleEffect [ "RES", "", _effectTitle ]; }; case ( isClass( configFile >> "CfgTitles" >> _effectTitle ) ) : { _wp setTitleEffect [ "OBJECT", "", _effectTitle ]; }; default { if ( _effectTitle != "" ) then { _wp setTitleEffect [ "TEXT", "PLAIN", _effectTitle ]; }; }; }; _wp }; //**********
- 1 reply
-
- enum
- addwaypoint
-
(and 4 more)
Tagged with:
-
[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: