Muzza
Member-
Content Count
105 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Muzza
-
Rank
Sergeant
-
interesting script problem: setwaypointstatement
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The g1, g2, etc refer to group names. This is mostly pointess if putting "this disableAI "AUTOTARGET"; this disableAI "TARGET"" in the init field of a soldier has no effect on his fire output when it did yesterday. Could an alpha release have broken this? does it work for anyone else? -
interesting script problem: setwaypointstatement
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Cant get anything to work at all anymore! No idea what has happened. Has the disableai feature been removed? I have tried soldiers with "this disableai "AUTOTARGET"; this disableAI "TARGET";" in their inits and the fire as per normal, help! Here is a concise version of the problem. I want the AI to dynamically stop caring about shooting things, run blindly to a waypoint aand then open fire. //groupnames _all = [g1, g2, g3, g4, g5, g6, g7, g8, g13, g9, g10, g11, g12, f1, f2, f3, f4, f5, f6, f7, f8, f13, f9, f10, f11, f12]; //disable the ai {{_x disableAI "AUTOTARGET"; _x disableAI "TARGET";} forEach units _x;} foreach _all; //give new waypoint {_wp2 = _x addWaypoint [getmarkerpos "entry_5", 0];} foreach _all; {[_x, 2] setWaypointType "MOVE";} foreach _all; {[_x, 2] setWaypointBehaviour "AWARE";} foreach _all; {[_x, 2] setWaypointSpeed "FULL";} foreach _all; {{[_x, 2] setWaypointStatements ["true", "_x enableAI ""AUTOTARGET""; _x enableAI ""TARGET""; hint ""wp completed"";"];} forEach units _x} forEach _all; -
interesting script problem: setwaypointstatement
Muzza posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
The players are trying to defend camp Rogain, in the final stages of the mission the players are surrounded, the enemy stop attacking after a few minutes and wait at nearby rally points. Artillery shells rain down on the camp and just as they stop enemies rush into the camp from all directions before opening fire on the few shell-shocked survivors. Or at least that is the plan. I have a code below that does most of that. I am using the disableAI command to encourage the AI to actually run straight to the objective instead of faffing about as they normally do. The trouble is in using the enableAI command, I would like it to be done when the units complete their move waypoints, however the syntax for setwaypoint statement is as follows: waypoint setWaypointStatements [condition, statement] which requires the name if the waypoint and not just the reference in relation to the group. so i cannot just use {{[_x, 3] setWaypointStatements ["true", "_x enableAI "AUTOTARGET"; _x enableAI "TARGET";"] forEach units _x} forEach _all; as I normally would. How can I code around this problem? Many thanks for help the community has provided me, I hope you find the scenario worth it! hint "beginning script"; _all = [g1, g2, g3, g4, g5, g6, g7, g8, g13, g9, g10, g11, g12, f1, f2, f3, f4, f5, f6, f7, f8, f13, f9, f10, f11, f12]; _1g = [g1, g2, g3, g4]; // Create an array with the names of all of the groups. _2g = [g5, g6, g7, g8, g13]; _3g = [g9, g10, g11, g12]; _1f = [f1, f2, f3, f4]; // Create an array with the names of all of the groups. _2f = [f5, f6, f7, f8, f13]; _3f = [f9, f10, f11, f12]; {deleteWaypoint [_x, 5];} foreach _all; {deleteWaypoint [_x, 4];} foreach _all; {deleteWaypoint [_x, 3];} foreach _all; {deleteWaypoint [_x, 2];} foreach _all; {deleteWaypoint [_x, 1];} foreach _all; //move to position {_wp = _x addWaypoint [getmarkerpos "rally_1", 0];} foreach _1g; {_wp = _x addWaypoint [getmarkerpos "rally_2", 0];} foreach _2g; {_wp = _x addWaypoint [getmarkerpos "rally_6", 0];} foreach _3g; {_wp = _x addWaypoint [getmarkerpos "rally_3", 0];} foreach _1f; {_wp = _x addWaypoint [getmarkerpos "rally_4", 0];} foreach _2f; {_wp = _x addWaypoint [getmarkerpos "rally_5", 0];} foreach _3f; ; {[_x, 1] setWaypointType "MOVE";} foreach _all; {[_x, 1] setWaypointBehaviour "AWARE";} foreach _all; {[_x, 1] setWaypointSpeed "FULL";} foreach _all; //wait for artillery hint "go go go!"; {{_x disableAI "AUTOTARGET"; _x disableAI "TARGET";} forEach units _x} foreach _all; {_wp2 = _x addWaypoint [getmarkerpos "entry_1", 0];} foreach _1g; {_wp2 = _x addWaypoint [getmarkerpos "entry_2", 0];} foreach _2g; {_wp2 = _x addWaypoint [getmarkerpos "entry_6", 0];} foreach _3g; {_wp2 = _x addWaypoint [getmarkerpos "entry_3", 0];} foreach _1f; {_wp2 = _x addWaypoint [getmarkerpos "entry_4", 0];} foreach _2f; {_wp2 = _x addWaypoint [getmarkerpos "entry_5", 0];} foreach _3f; {[_x, 2] setWaypointType "MOVE";} foreach _all; {[_x, 2] setWaypointBehaviour "AWARE";} foreach _all; {[_x, 2] setWaypointSpeed "FULL";} foreach _all; // ** THIS IS WHERE I NEED setWaypointStatements to enableAI*** {_wp3 = _x addWaypoint [getmarkerpos "attack", 10];} foreach _all; {[_x, 3] setWaypointType "SAD";} foreach _all; -
I need help with a Script issue! ( Scared Assault Boats )
Muzza replied to Sonicboom777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
very useful thread. working on a similar scenario but my assault boats are usually fine under fire! -
Invisible H - Getting choppers to land
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
durr. thanks for the help guys. -
Getting choppers to land under fire.
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the suggestion cobra but i seem to have found another way by experimentation. placing a trigger that activates when the helicopter is near its invisible H with on init: {unassignVehicle _x} forEach crew helicoptername; will work even when the chopper is under direct fire. -
I have a solution for when you want to bomb a specific known location the same way every time. 1) place a load of game logic markers, called t_0 t_1 ... etc. 2) have a trigger that activates on your conditions. Place the following in the init line. xhandler = [this] execVM "bombLoop.sqf"; 3) go to the mission folder through My Documents and create the following sqf file through notepad: hint "boom boom boom";// make sure the script is executes, remove this when you are sure it is. _logics = [t_0, t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8, t_09, t_10, t_11, t_12, t_13]; // Create an array with the names of all of the logics. {shell = "Sh_82mm_AMOS" createVehicle getpos _x; shell setVelocity [0,0,-45]; sleep 2;} foreach _logics; // Create an explosion at the position of each logic with a one second delay (change the number after sleep to change the delay). If you know how to set up the trigger that will set this in motion you have a simple programmable mortar strike. Thanks to Loyalguard for is help in making the script. ---------- Post added at 00:40 ---------- Previous post was at 00:35 ---------- if this seems too scripted (the bombs falling on exactly the same place every time) you can use placement radii to move the game logic around randomly.
-
Making BIG mortar explosions.
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
AWESOME. thanks bakerman! -
Getting choppers to land under fire.
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have tried careless to no affect. -
Change respawn timer mid game?
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thanks a lot man. -
How to get a friendly AI to follow you?
Muzza replied to Pred42's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am feeling slightly defeated by your solution cobra :D -
Getting choppers to land under fire.
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thanks i will try that -
Hi there. I am creating a mission where enemies establish a beachhead and then re-enforce their position with transport helicopters. I have given the choppers landing zones safe from enemy fire however they seem uninterested in landing with their cargo. This does not happen when there is no fighting going on. Is there a way to make the pilot AI oblivious to what is going on so that he can land, unload and move on as quickly as possible? Is it possible to get them to act with such determination? Thanks in advance.
-
Hi there. Any idea how to change the respawn timer for an MP game when a trigger is activated? thanks.
-
Making BIG mortar explosions.
Muzza replied to Muzza's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have tried all that looked relevant in the SIX wiki, and i used the 'this addEventhandler ["fired",{hint format["%1",_this]}]' init on the mortar to find out what it fired.