-
Content Count
2494 -
Joined
-
Last visited
-
Medals
Everything posted by sarogahtyp
-
Why? I cant imagine that this is really needed. But you can crawl allGroups using findIf to get the group with the specific ID...
-
okay, I created a mod of it for testing purpose. Ill publish a later version on workshop when I fiddled out how to use a userconfig file with the mod to allow server owners to configure the behavior. Current mod version just deletes 33% of most stuff. I updated my first post here with the current script version used by the mod. Mod Download: tweakFPS Wish you happy testing 😉 PS.: there are no mod dependencies Edit: I tested it on my poor machine on Malden and I had without Mod: 46/47 FPS with Mod: 52/53 FPS
-
error [solved] error in config.cpp: "'{' encountered instead of '='"
sarogahtyp posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hey guys, Im trying to create my very first little addon. It just should execute a function on mission start. If I load the mod with arma then I get the error: .rpt config.cpp -
error [solved] error in config.cpp: "'{' encountered instead of '='"
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
sometimes one needs a second pair of eyes. thx a lot. this should be the issue. -
I cant do a mod cause I did never one before. But I can do 2 empty multiplayer missions of it (one with and one without the script) then you can test the difference yourself... which map would you prefer?
-
Issue with Exiting a Loop
sarogahtyp replied to HereIsJones's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The problem with posts of people posting pseudo code is the mostly missing important information. In your case i dont know when, where and how is HJ_TIMER changed and when, where and how your delays occur. Mostly its not needed to use an exitWith with the same condition (or inverted) as in the beginning of the while. If the change of HJ_TIMER occurs after the delay at the end of the while then you dont need an exitWith. But as said above. Hard to help with the information given. Edit: what you are doing in your 2nd snippet is double checking the while condition at nearly the same point of time. If the condition is false then the 2nd check will not occur cause the while is finished already. -
I personally prefer to register it as function to armas function library and use the preinit option to start it before everything else. For sure u could just use init.sqf to do this. Also I guess I used local variant to reduce network traffic. The hides should be some sort of rocks. See Demellion's comment on bikis entry for nearestTerrainObjects Edit: should be compatible to any map. Just dont use any 0 percentage because of zero divisor or edit the code yourself to handle this case.
-
For the same purpose on malden I wrote the following: /* Author: Sarogahtyp Description: hide (delete) terrain objects for better map performance License: MIT - License Copyright 2019 Sarogahtyp (sarogahtyp@web.de) Permission is hereby granted, free of charge, to any person obtaining a copy of this SQF-Script and associated documentation files (the "SQF-Script"), to deal in the SQF-Script without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the SQF-Script, and to permit persons to whom the SQF-Script is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the SQF-Script. THE SQF-SCRIPT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SQF-SCRIPT OR THE USE OR OTHER DEALINGS IN THE SQF-SCRIPT. */ diag_log "saroTweakFPS: started"; private _types_array = [ [ ["ROCK"], 33 ], [ ["TREE"], 33 ], [ ["BUSH"], 33 ], [ ["FENCE"], 0 ], [ ["WALL"], 0 ], [ ["HIDE"], 33 ] ]; private _world_half = worldSize / 2; private _world_diag_half = worldSize * 0.70711; private ["_type", "_var", "_dummy"]; //delete given percentage of terrain objects (not randomly cause it will be done on each machine locally and should be the same) _dummy = { _type = _x # 0; _var = _x # 1; _dummy = [_type, _var, _world_half, _world_diag_half ] spawn { private _type = _this select 0; private _var = _this select 1; private _world_half = _this select 2; private _world_diag_half = _this select 3; private _start_time = diag_tickTime; if(_var > 0) then { private _object_count = round (100 / _var); private _objects = nearestTerrainObjects [[_world_half, _world_half], _type, _world_diag_half , false, true]; { if((_forEachIndex + 1) % _object_count isEqualTo 0) then {_x hideObject true;}; } forEach _objects; }; diag_log format [ "saroTweakFPS: Processing %1s took %2 seconds", (_type # 0), ( diag_tickTime - _start_time ) ]; }; } count _types_array; Here you are able to set a percentage value to delete the chosen type of map object. Not deleting all of a type but some of some types should be less visible... Edit: There was a reason for not doing it globally but locally on each machine. But i forgot the reason... Edit: Mod version Download (for testing or for singleplayer only pls) : tweakFPS Edit: Steam Wokshop CBA-Version fully customizable through in-game CBA-Addon-Options
-
Question concerning command "removeAllActions"
sarogahtyp replied to olegreyghost's topic in ARMA 3 - MISSION EDITING & SCRIPTING
choice.sqf _act1 = Talon1 addAction ["Accept", "scripts\task2.sqf"]; _act2 = Talon1 addAction ["Decline", "scripts\task3.sqf"]; Talon1 setVariable ["act_IDs", [ _act1, _act2 ] ]; beginning of task2.sqf and task3.sqf _caller = _this select 1; _actIDs = _caller getVariable "act_IDs"; _caller removeAction (_actIDs select 0); _caller removeAction (_actIDs select 1); -
[solved] dynamic description in CfgTaskDescriptions
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
is it possible to have a dynamic description like described in Example 3 of localize command. There %1 is used to format a dynamic changable string. I know how this could be used to create the description directly with 3rd parameter of BIS_fnc_taskCreate _location = [] call my_function_to_get_location_string; [player, "destroy_fuel_supplies", format [localize "STR_Do_this_in", _location] call BIS_fnc_taskCreate; // string of STR_Do_this_in in stringtable.xml is "do this in %1" but how can I do this (use dynamically changing string) with the task description of CfgTaskDescriptions ? I know that I have to use $STR_Do_this_in in CfgTaskDescriptions, but how to get it dynamic? -
[solved] dynamic description in CfgTaskDescriptions
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
finally this is working: _location_name = [_location_trigger] call saro_fnc_get_name_of_location; [player, "destroy_fuel_supplies", ""] call BIS_fnc_taskCreate; _description_array = "destroy_fuel_supplies" call BIS_fnc_taskDescription; _description = format [ ( _description_array # 0 # 0), _location_name]; _title = _description_array # 1 # 0; _marker = _description_array # 2 # 0; [ "destroy_fuel_supplies", [_description, _title, _marker ] ] call BIS_fnc_taskSetDescription; -
[solved] dynamic description in CfgTaskDescriptions
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
does not work. diag_log "destroy_fuel_supplies" call BIS_fnc_taskDescription; //logs [] gives me an empty array. my CfgTaskDescriptions: class CfgTaskDescriptions { class destroy_fuel_supplies { title = $STR_TSK_destroy_fuel_supplies; description = $STR_TSK_destroy_fuel_supplies_description marker = "myTaskDestinationMarker"; }; }; I guess I need some help -
[solved] dynamic description in CfgTaskDescriptions
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok I guess I found the solution: _description_string = ("destroy_fuel_supplies" call BIS_fnc_taskDescription) select 0; [player, "destroy_fuel_supplies", format [_description_string, _location] call BIS_fnc_taskCreate; -
Question concerning command "removeAllActions"
sarogahtyp replied to olegreyghost's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@olegreyghost I tested this: Trigger: Activation: Any Player OnActivation: _dummy = player addAction ["Exec the file", "scriptFile.sqf"] scriptFile.sqf: params ["_target", "_caller", "_actionId", "_arguments"]; hint "Executed"; _caller removeAction _actionId; -
https://prnt.sc/ma5vmj Try to delete the .var. ... profile file/s there
-
look for moveInDriver and similar commands in biki. I guess there is also something like createVehicleCrew or similar. https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands Cant do more on mobile...
-
Help! How to force unit group stop and move again
sarogahtyp replied to ICE_PIC_JAPAN's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Look for disableAI in biki and use the PATH string. https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands Cant do more on mobile ... -
can be removed
sarogahtyp replied to steam-76561198069261992's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You do not have a clue of any command you use. Scripting begins with reading biki and tutorials... -
Dedicated server check for player within vehicle
sarogahtyp replied to Depressed-66022b82dea61fee's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi Either you're trying to annoy me a bit or you're harping on something completely irrelevant. What's wrong with you today? You're not usually like this. Just because he didn't write anything about a preset doesn't mean he won't use one. The other things had to be elicited from him first too. Anyway, it doesn't matter if there's a this && or not.- 11 replies
-
- 2
-
- multiplayer
- vehicle
- (and 4 more)
-
Dedicated server check for player within vehicle
sarogahtyp replied to Depressed-66022b82dea61fee's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Its just his choice to choose a preset or not. Why should I decide to not choose one?- 11 replies
-
- multiplayer
- vehicle
- (and 4 more)
-
Dedicated server check for player within vehicle
sarogahtyp replied to Depressed-66022b82dea61fee's topic in ARMA 3 - MISSION EDITING & SCRIPTING
this && allPlayers findIf {_x in crew aavc7a1} > -1 tested and working click for biki entry: this && allPlayers findIf _x in crew- 11 replies
-
- 2
-
- multiplayer
- vehicle
- (and 4 more)
-
Dedicated server check for player within vehicle
sarogahtyp replied to Depressed-66022b82dea61fee's topic in ARMA 3 - MISSION EDITING & SCRIPTING
fine, now what do you want to do? do you want to switch your mapa to true if all playable units are inside the car and those car should be inside trigger area? do your playable units have to be alive or just inside the car even as dead body? Edit: didnt see your edit open question is, the vehicle is inside trigger area already? a human player (or AI??) has just to get in that vehicle?- 11 replies
-
- multiplayer
- vehicle
- (and 4 more)
-
Dedicated server check for player within vehicle
sarogahtyp replied to Depressed-66022b82dea61fee's topic in ARMA 3 - MISSION EDITING & SCRIPTING
you have to describe a lot more. what vehicle are we talking 'bout? placed with eden or spawned by script. what do you want have? the number of players which are in that vehicle? An array with all player objects of players in the vehicle? just knowing if all connected players are in that vbehicle... so many quesdtions. what do you want to do?- 11 replies
-
- 1
-
- multiplayer
- vehicle
- (and 4 more)
-
Deleting Vehicle Crew
sarogahtyp replied to FredTche's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I did not miss that. what I missed was that vehicleVarName is nonsense in this context and that the alternative syntax of deleteVehicleCrew will only work after the next arma update (2-06). -
Run a Post Processing Effect on one player
sarogahtyp replied to LiderrGaming's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ppEffects are a local thing therefore what you are probably doing is executing it everywhere. But you do not show the calling function and not the complete EH. Because that EH should trigger effects on the client of _unit and _shooter only (probably) I would do this on the very beginning of the EH: if (player isNotEqualTo _unit && player isNotEqualTo _shooter) exitWith {}; Now you are sure that the code is run on the client which shot and on the client which was hit only.