-
Content Count
2494 -
Joined
-
Last visited
-
Medals
Everything posted by sarogahtyp
-
The _mySteamProfileName = profileNameSteam;
sarogahtyp replied to nickcage's topic in ARMA 3 - MISSION EDITING & SCRIPTING
depends on your purpose but I guess a global variable would be enough: //local - known on the scope ("script") where defined only _mySteamProfileName = profileNameSteam; //global - known in every script on the machine (client/server) where defined mySteamProfileName = profileNameSteam; //public - known in every script on every connected machine missionNamespace setVariable [ "mySteamProfileName", profileNameSteam, true ]; -
The _mySteamProfileName = profileNameSteam;
sarogahtyp replied to nickcage's topic in ARMA 3 - MISSION EDITING & SCRIPTING
U linked the biki entry ... it returns a string. I have no clue bout dialogs but i guess u cant use a local variable there which was set in init.sqf -
Assigning a group within a variable.
sarogahtyp replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_x is a magic variable and represents the current element in some loops. the count command as I used it counts all elements of the given array for which the condition inside the curly brackets is true. so it should count every object of the array _units which is inside the heli. https://community.bistudio.com/wiki/count -
Assigning a group within a variable.
sarogahtyp replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
how you know that playable units are inside of the heli? Or are we are talking about players spawning inside the heli - not embarking? -
Assigning a group within a variable.
sarogahtyp replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
maybe you would need some braces there: _in_heli_num = { (_x in heli1) } count _units; you should just post error messages if a code does not work ... " couldn't get ... to work." is not enough in a scripting forum. Also the code you posted in your last post should be complete nonsense. At least if your purpose is what you told - to check if all embarking group members are inside the heli already. -
Assigning a group within a variable.
sarogahtyp replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
what you do with this is that the group of the last player who is inited will be stored in playergroup. I guess what you really want is to assign all players to the same group, right? -
Assigning a group within a variable.
sarogahtyp replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Made a little mistake. Will correct it in a few minutes. Edit: but should work in singleplayer Edit2: correction done -
Assigning a group within a variable.
sarogahtyp replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
heli1 addEventHandler ["GetIn", { //get group members of embarked unit private _units = units (_this select 2); //get number of group members private _units_num = count _units; //get number of group members in heli _in_heli_num = { _x in heli1 } count _units; if (in_heli_num isEqualTo _units_num) then { _heli1 engineOn true; _heli1 enableAI "Move"; }; }]; heli1 addEventHandler ["GetOut", { hint "Meet up with Sergeant Riley."; }]; -
trigger shell/rocket explosion mid-air
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
He guys, I m struggeling on a part of the next version of my Arena Script. I want to get missiles, rockets, shells explode in mid-air but I don't know how to trigger that. I tried _round setDamage 1; but that doesn't work. What I don't like to have is a solution which spawns an object in front of the round... -
Help on Waypaths Script
sarogahtyp replied to vonlugar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_x is a special or "magic" variable which exist inside of some loops only. There it represents the current element that is treated. The command apply creates such a loop therefore _x exists inside of its curly brackets. you are trying to use _x outside of such a loop but there its just not existing. instead of _x in the line _x doMove _mrk; you have to use the object or variablename of your opfor unit. Also your condition field seems completely wrong to me. thisList is an array where all objects are stored (by trigger) which have activated the trigger currently. You can't just store your squad unit members there. You have to look if your squad members are stored in thisList. If thats the case than you know which squad member/s did activate the trigger. Maybe you don't need that. You should read this to understand triggers, its fields and variables better: https://community.bistudio.com/wiki/Eden_Editor:_Trigger the condition field is as it says a condition which must be true to activate a trigger. if u are able to activate the trigger by avtivation field and if that is enough for your purpose then the condition field contains just this. this is here the result of your activation condition. if it is true then your trigger is activated. -
[Release] GOM - Aircraft Loadout V1.35
sarogahtyp replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Until @Grumpy Old Man does anything here all I can do is to provide a version I found on my harddisk. I used it in summer 2019 but the last file change seems to be in may 2017. So ... its somewhat old ... but there is no version information in it. https://www.dropbox.com/s/gqevp5zilkiuq8j/GOM_fnc_aircraftLoadout.Stratis.rar @Mr. Rad @[evo] dan @preserver833 -
Control structure script issue
sarogahtyp replied to Personal Best's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For me all looks good. U should check ur code for invisible characters. Maybe there is such nearby the else. Invisible chars are a common problem when copying code out of forums. You can use a software which is able to show invisible chars like some office applications. Maybe notepad++ has an option for it as well. -
u r lucky ... downloaded on 05/21/21: https://www.dropbox.com/s/1qt179h629cyy6d/pbo_manager_v14.7z?dl=0
-
just not true! 不符合事实
-
"Include file x\cba\addons\main\script_macros.hpp not found"
sarogahtyp replied to HeroesandvillainsOS's topic in ARMA 3 - TROUBLESHOOTING
After starting a dedicated windows server I had the same error today. After setting @CBA_A3 as first loaded mod the error was gone. Thx @Nemanjic for posting that solution. It helped me to solve the problem fast. -
What?
-
Where is the problem? Just set allowDammage true after a short sleep.
-
Help with Tigris AA script
sarogahtyp replied to Fleepherder's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I guess u are using a wrong turret path in the command: https://community.bistudio.com/wiki/removeMagazinesTurret you can check for available paths of your vehicle with: https://community.bistudio.com/wiki/allTurrets PS.: your command has an invisible character in it which would lead to an error during runtime. Copy the command again from wiki page and try again ... remov<INVISIBLE CHAR HERE>eMagazinesTurret- 1 reply
-
- 3
-
[Preview] Arena APS a russian countermeasure for tank threats
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://en.wikipedia.org/wiki/Arena_(countermeasure) Today just a preview video of my current scripting experience. Maybe released in some days/weeks/months. Have fun with it and gift me your suggestions, please: -
checkVisibility + Sort Nearest each unit
sarogahtyp replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
private _enemyGroup = [_pos, EAST, 7 ] call BIS_fnc_spawnGroup; private _enemyUnits = units _enemyGroup; { _x disableAI "Target"; } count _enemyGroup; private _players = allPlayers select {alive _x}; private _playerDistances = _players apply { private _plyr = _x; private _groupDistances = _enemyGroup apply { [_x distanceSqr _plyr, _x] }; _groupDistances sort true; [_groupDistances#0#1, _x, _groupDistances] }; _playerDistances sort true; private _enemyUnitsNotUsed = +_enemyUnits; scopeName "OutOfLoop"; { private _plyr = _x#1; _d = { if ( (_x in _enemyUnitsNotUsed) && { [_x, "VIEW"] checkVisibility [eyePos _x, eyePos _plyr] > 0 } ) then { _x doTarget _plyr; _enemyUnitsNotUsed = _enemyUnitsNotUsed - _x; }; if (_enemyUnitsNotUsed isEqualTo [] ) then {breakTo "OutOfLoop"}; } count _x#2; }count _playerDistances; WORK IN PROGRESS! -
checkVisibility + Sort Nearest each unit
sarogahtyp replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
not tested: private _group = [_pos, EAST, 7 ] call BIS_fnc_spawnGroup; private _units = units _group; private _unitIndex = _units findIf {["VIEW"] checkVisibility [eyePos _x,(AGLToASL _markerpos) vectorAdd [0,0,1.5]] > 0}; if (_unitIndex > -1) then { private _unit = _units select _unitIndex; _unit do something; }; -
Help with creating a array.
sarogahtyp replied to razzored's topic in ARMA 3 - MISSION EDITING & SCRIPTING
myWantedCoolValue is a placeholder for whatever value u want those variable to have on init -
Help with creating a array.
sarogahtyp replied to razzored's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_checkTime = 30; //check all 30 seconds for new objects allNeededObjectsAreSpawned = false; // set this to true to stop searching for private _classNames = ["land_sandbag_F", "Concretewall_long", "other_classname"] apply {toLower _x}; while {!allNeededObjectsAreSpawned} do { private _newObjects = allMissionObjects select { private _objClass = toLower (typeOf _x); private _obj =_x; (_classNames findIf { _x isEqualTo _objClass } > -1) && isNil {_obj getVariable "coolStuffVariableAsIWantItToHaveOnCoolObjects"} }; _d = {_x setVariable ["coolStuffVariableAsIWantItToHaveOnCoolObjects", myWantedCoolValue, true]} count _newObjects; sleep _checkTime; }; not tested but should set that variable to all new spawned objects -
Help with creating a array.
sarogahtyp replied to razzored's topic in ARMA 3 - MISSION EDITING & SCRIPTING
this can be used to set/get a variable on/of an object: https://community.bistudio.com/wiki/setVariable https://community.bistudio.com/wiki/getVariable you should just set those variable in ur sandbag-spawning-script... -
checkVisibility + Sort Nearest each unit
sarogahtyp replied to Robustcolor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Your findif searches for the first player in the array which is in the area and does not see the object. At this point findif returns a value greater -1. You should search for the first player which sees it and show ur hint if the return value is -1 Also for performance reasons u should not use allPlayers but (allPlayers select {_x inArea ...}) if ( (allPlayers select { _x inArea [_marker,550,550,0,false] }) findIf { [objectParent _x, "VIEW"] checkVisibility [eyePos _x, (AGLToASL _marker) vectorAdd [0,0,1.5]] > 0 } isEqualTo -1) then { "x don't see the location" remoteExec ["hint"]; }; not tested