yoannis1995
Member-
Content Count
95 -
Joined
-
Last visited
-
Medals
Everything posted by yoannis1995
-
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I tried to make the IA look around randomly at each positions but it doesn't seem to work. Also I deleted the reveal command because it makes the IA look at one enemy through the walls and then they don't look at any other targets on their way. So is it possible to use the reveal command only for the nearest enemy of the current position the IA are moving ? -
how can i make a fighter aircraft fire its canon at a specific ground position ??
yoannis1995 replied to dimdic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well I tried that: _avion = _this select 0; _cible = _this select 1; _pilot = driver _avion; _groupe = group _pilot; _wp = _groupe addWaypoint [position _cible, 0]; _wp setWaypointType "DESTROY"; _pilot reveal [_cible, 4]; sleep 2; waitUntil { (_pilot distance _cible) < 400}; _pilot selectweapon "GAU8"; _pilot lookAt _cible; _pilot doTarget _cible; _pilot dofire _cible; _pilot fire "GAU8"; But it still doesn't work :/ -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah it seems to be working, thanks :) Any ideas how to know if a position is occupied or not ? I don't really know how we could do it but maybe combine the "if" and "forEach" commands to check if the position of each unit contained in the array _listEnemy is equal to one of the entries in the building positions array ?! -
how can i make a fighter aircraft fire its canon at a specific ground position ??
yoannis1995 replied to dimdic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I tried that: _avion = _this select 0; _cible = _this select 1; _pilot = driver _avion; _avion doMove (position _cible); _pilot doMove (position _cible); sleep 1; waitUntil {(_avion distance _cible) < 300}; sleep 1; _avion selectWeapon "GAU8"; _avion doTarget _cible; _avion doWatch _cible; _pilot doTarget _cible; _pilot doWatch _cible; sleep 1; _avion doFire _cible; _pilot doFire _cible; _avion fire "GAU8"; _pilot fire "GAU8"; but it doesn't work.... :/ -
how can i make a fighter aircraft fire its canon at a specific ground position ??
yoannis1995 replied to dimdic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Any ideas ?! -
how can i make a fighter aircraft fire its canon at a specific ground position ??
yoannis1995 replied to dimdic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I don't really know if there's another possibility than use the unitCapture and unitPlay commands... ?! -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Any ideas ?! -
Hi ! I wonder if it's possible to know if an object, like a smokeshell or a mine or c4 from ACE, is inside a zone definided by a trigger or a marker or whatever ?! Thanks :)
-
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, I had a look at the scripts but it doesn't allow the player to order IA to clear a building. And I couldn't find anything about an occupied position... :/ Is there any posibility to know wheter a position is occupied or not ?! ---------- Post added at 11:29 AM ---------- Previous post was at 10:15 AM ---------- I've added that to the script: _listEnemy = []; _listEnemy = (position _build) nearEntities ["Man",25]; {_unitL reveal [_x, 3.5];} forEach _listEnemy; it helps to avoid that the IAs get killed too easily in the building. But is there any possibility to select only the units of one side (EAST) in the _listEnemy ?! -
Position of object
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, but the fonctions are for units or objects but i would like to check if the player has placed a object like smokeshell or mines or C4 from ACE in the trigger. So how can i do that ? -
I found the answer there, if someone is interrested.
-
A very Open World mission
yoannis1995 replied to colinm9991's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think you can use the secops module ?! And I think you can add your own mission scripts to the module to do what you want. But you need to check... -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes thanks, i'm gonna try :) I tried to make the IA a bit better but now the script doesn't work anymore, the units don't move. What's the problem in that: _cnt = 0; _posarray = []; _unitL = _this select 0; // player _unitS = _this select 1; // Units selected //_id = _this select 2; //_unit removeAction _id; _GroupLeader = leader (group _unitL); _build = cursortarget; //as long as building position _cnt not equal to "[0,0,0]" keep looping while {format ["%1", _build buildingpos _cnt] != "[0,0,0]" } do { _pos = _build buildingpos _cnt; //select building position _cnt _posarray = _posarray + [_pos]; //add the position to the list _cnt = _cnt + 1; //increment counter sleep 0.01; }; { { // adjust Unit Skills sleep 0.01; _x setBehaviour "AWARE"; _x setCombatMode "YELLOW"; _x setSpeedMode "LIMITED"; _x setSkill ["aimingAccuracy",1]; _x setSkill ["aimingShake",1]; _x setSkill ["endurance",1]; _x setSkill ["aimingSpeed",1]; _x setSkill ["spotDistance",1]; _x setSkill ["spotTime",1]; _x setSkill ["courage",1]; _x setSkill ["reloadSpeed",1]; _x setSkill ["commanding",1]; _x setSkill ["general",1]; ////////////////////// _temp_x = _x; _x doMove _temp_x; // all units selected // this needs work as it's only checking one unit waitUntil {sleep 1; (unitReady (_x select 0) || moveToCompleted (_x select 0) || moveToFailed (_x select 0))}; } foreach _units; sleep 0.5; } forEach _posarray; sleep 2; if (alive _units) then { _unit groupChat "Building clear !"; sleep 1; // _unit addAction ["Clear house", "clear.sqf"]; sleep 1; _units doMove position _GroupLeader; }; -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, quite helpful :) Is there any possibility to list the OPFOR inside the building ? Then we could add them at the known target of the selected units before making then going into the building, which could help no ?! -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks guy, works well :) I'm now reading some more about "BIS_fnc_commsMenuCreate" fonctions and stuff to improve the script. But there's still on main problem left.... the IA sucks at clearing building :p they get killed really easily after comming in a building even if they're 3 and there's only 1 ofpor inside.... -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
oh yes thanks :) Any idea to fix the other problems ? -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh yes thanks :) didn't see that ^^ Well I found the command http://community.bistudio.com/wiki/groupSelectedUnits but the matter is how can we add a command in the commande menu ?! or should I put the call script command in a radio trigger ?! This is my code now: _cnt = 0; _posarray = []; _unit = _this select 0; _caller = _this select 1; _id = _this select 2; _unit removeAction _id; _GroupLeader = leader (group _unit); _build = cursortarget; //as long as building position _cnt not equal to "[0,0,0]" keep looping while {format ["%1", _build buildingpos _cnt] != "[0,0,0]" } do { _pos = _build buildingpos _cnt; //select building position _cnt _posarray = _posarray + [_pos]; //add the position to the list _cnt = _cnt + 1; //increment counter sleep 0.01; }; sleep 0.01; _unit setBehaviour "COMBAT"; _unit setCombatMode "RED"; _unit setSpeedMode "LIMITED"; { _unit doMove _x; waitUntil {moveToCompleted _unit}; sleep 0.5; } forEach _posarray; sleep 2; if (alive _unit) then { _unit groupChat "Building clear !"; sleep 1; _unit addAction ["Clear house", "clear.sqf"]; sleep 1; _unit doMove (postition _GroupLeader); }; And I put that in the init of the player {_x addAction ["Clear house", "clear.sqf"]} forEach units group this; Then to activate the script you select the unit and you go to the action menu of that unit and it works :) But it would be goob to be able to use directly the command menu to be able to send more than one unit. And there's another problem, I tried to put an ennemy unit inside a building and even in combat mode, the unit that clears the building get killed really easily. I don't know how to fix that ?! -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks :) it works :) but there's still one problem left, the loop never ends so the guy just walk from the 1st position to the last and then back again to the 1st.... So is there any possibility to know what's the last building's position ?! Or another way to stop that ? -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So now the "_buidingpositions" is an array and I can use it to make a unit go to each positions of the building with the command "forEach" ?! I just tried that: _building = cursorTarget; if (((_building buildingpos 0) select 0) != 0) then { hint format['ID: %1',_building]; _buildingpositions = _building buildingpos _x; {s1 doMove buildingPos _x; waitUntil {moveToCompleted s1;}} forEach _buildingpositions; } else {hint"The selected object is not available.";}; but it doesn't really work... :/ -
Clear house script
yoannis1995 replied to yoannis1995's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks :) but it doesn't seem to work if i do: _building = cursorTarget; _buildingpositions = _building buildingpos; Because it seems that the "CursorTarget" doesn't return only the ID of the object but also the class of the object when I try to make an "hint" with it. So how can I just get the ID of the building ?