TobiasRp
Member-
Content Count
17 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout TobiasRp
-
Rank
Private First Class
-
How to identify nearestObjects
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
1) finding enemy static weapon (EAST). 2) check death (crew) static weapon. -
How to identify nearestObjects
TobiasRp posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have this script and I do not know how to identify death _mgpos? Can you advise me? Thanks. _group = _this select 0; _mgpos = nearestObjects [_group,["StaticWeapon"], 230]; If (side _mgpos == EAST) Then { If !(alive _mgpos) Then { hint format ["%1 is down", _mgpos]; }; }; Exit -
Threats HandGrenade script
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Works perfectly! Much you have helped me! Thank you. -
Threats HandGrenade script
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I did not know that the loop has 10k. Script calls the init file: [Grp1] execVM "HandGrenade.sqf"; I tried to run the script without my modification, the value array is empty. How do I please the script to run correctly? -
Threats HandGrenade script
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well, I tried this and the array is empty. _group = this select 0; _unitsWhoSawAGrenade = []; while {true} do { { if (count ((getPos _x) nearObjects ["GrenadeHand", 20]) > 0) then { _unitsWhoSawAGrenade set [count _unitsWhoSawAGrenade, _x]; }; } forEach units _group; hint format["%1", _unitsWhoSawAGrenade]; If (count _unitsWhoSawAGrenade > 0) Then { leader _group say "GerIncomingGrenade01"; }; sleep 2; }; }; -
Threats HandGrenade script
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
A array "_unitsWhoSawAGrenade" to be added itself? Because it is empty. -
RemoveAction issue
TobiasRp replied to blacknite3d's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try this, not tested: //init.sqf in mission folder [officer] execVM "actID.sqf"; //actID.sqf _officer = _this select 0; _ReportIn = Officer addAction ["Report In", "ReportIn.sqf"]; //ReportIn.sqf _officer = _this select 0; _id = _this select 2; Bob action ["salute", bob]; _Officer action ["salute", _Officer]; _Officer playmove "AidlPercSnonWnonDnon_talk1"; _Officer removeaction _id; -
Hi, 1) can you advise me please, how to modify this script to go apply for all units in a group? 2) Can somehow select all units that meet the condition _grenTrig? Thanks _group = this select 0; _grenTrig = count (getPos leader _group nearObjects ["GrenadeHand", 100]) > 0; If (_grenTrig > 0) Then { leader _group say "GerIncomingGrenade01"; };
-
Random selection of units
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Perhaps resolved: _randomSoldier = objNull; _units = units grp1; _alivecount = ({alive _x} count units grp1); while {isNull _randomSoldier || (_alivecount > 1) || (vehicle _randomSoldier) != _randomSoldier || isPlayer _randomSoldier} do { _randomSoldier = _units call BIS_fnc_selectRandom; }; -
Random selection of units
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is this correct? Thanks. _randomSoldier = objNull; _units = units grp1; while {isNull _randomSoldier || (vehicle _randomSoldier) != _randomSoldier} do { while {(isPlayer _randomSoldier)} do { _randomSoldier = _units call BIS_fnc_selectRandom; }; _randomSoldier say "USMove_01" }; -
Random selection of units
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry for the bad translation... Yes, I need to modify this script to _randomSoldier not a player, but always AI. It is possible that the condition (I do not know where to add it in the script): if (isPlayer _randomSoldier) Then ... -
How to set a condition in the script in Events Handler "killed"
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It's for the Arma 2 OA. This is the beginning of my script US_tank_destroyed.sqf (the next thing you need advice). _obj = _this select 0; _wepn = _this select 1; _wep = _this select 4; _ms = getPos _obj nearEntities [["Man"] , 250]; if (west countSide _ms == 0 and Resistance countSide _ms == 0) exitWith {}; if (vehicle _obj!= _obj) exitWith {}; if (vehicle player!= player) exitWith {}; if ( ( (_wepn == "I44_M1A1Bazooka") or (_wepn == "I44_PIAT") ) and (_obj distance player < 350)) then { Switch (floor (random 7)) do { case 0: {_obj say "USATFire1"}; case 1: {_obj say "USATFire2"}; case 2: {_obj say "USATFire3"}; case 3: {_obj say "USATFire4"}; case 4: {_obj say "USATFire5"}; case 5: {_obj say "USATFire6"}; } }; exit ---------- Post added at 18:28 ---------- Previous post was at 18:14 ---------- I'm sorry, I placed my mistake in OFP, should be in ARMA 2 OA. -
Random selection of units
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
She would please the script to add the condition that the player has not been selected (if a group member) but the other unit? -
How to set a condition in the script in Events Handler "killed"
TobiasRp posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hello, Do you need help with a script with EventHandler "killed". When a soldier destroys tank, has this soldier (_killer) say "tank_destroyed_01". I am only beginning: _EH = _x AddEventHandler ["fired",{_this execvm "scripts\US_tank_destroyed.sqf"}]; Thank you in advance for any help! TR -
Random selection of units
TobiasRp replied to TobiasRp's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Works! Thanks a lot!