-
Content Count
769 -
Joined
-
Last visited
-
Medals
Everything posted by Schatten
-
How to use unit classname in addaction title
Schatten replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Looks like you haven't tried my code. Try it -- replace forEach's body. Pay attention to the second arg for addAction -- just passing the path to the script is enough. -
How to use unit classname in addaction title
Schatten replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can do it the same way I did. -
How to use unit classname in addaction title
Schatten replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just get unit class name and use it in the title: _Object addAction [format ["How do I add the %1 here", typeOf _x], "Scripts\Blah.sqf"]; -
["X" in thisList]; not working
Schatten replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can use this instead: ([unit1, unit2, unit3] findIf { _x inArea thisTrigger }) < 0 There is no command all. -
["X" in thisList]; not working
Schatten replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Be careful, findIf returns index of the unit found, not quantity! So your condition, ([unit1, unit2, unit3] findIf {!(_x inArea thisTrigger)}) isEqualTo 0 will be true if only the first unit is not in area. -
Unit/Object Present activates trigger
Schatten replied to BikerJoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Slight improvement: (thisList findIf { (objectParent _x) == CHINOOK }) >= 0 😁 -
["X" in thisList]; not working
Schatten replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What if another unit appears? Better solution: ([unit1, unit2, unit3] findIf { !(_x inArea thisTrigger) }) < 0 😉 -
Saving player position with profilenamespace
Schatten replied to kibaBG's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just remotely execute your function on server side whenever you need this. -
Unit/Object Present activates trigger
Schatten replied to BikerJoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can set your CHINOOK to trigger owner and change trigger activation condition to this and { player in (thisList select 0) } -
Saving player position with profilenamespace
Schatten replied to kibaBG's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The problem is that a server and clients have their own profile namespaces, therefore you should request data from the server: // initServer.sqf sendDataToClient = { private ["_data", "_varNames"]; params ["_player"]; _data = []; _varNames = switch (vehicleVarName _player) do { case "kiba3x": { ["KIB_kibaPos", "KIB_kibaRating"] }; case "kavhan": { ["KIB_kavhanPos", "KIB_kavhanRating"] }; default { ["KIB_konalPos", "KIB_konalRating"] }; }; { _data pushBack (profileNamespace getVariable _x); } forEach _varNames; missionNamespace setVariable ["clientData", _data, if (_player == player) then { false } else { owner _player }]; }; // initPlayerLocal.sqf if (isServer) then { [player] call sendDataToClient; } else { [player] remoteExecCall ["sendDataToClient", 2]; }; waitUntil { !(isNil "clientData") }; clientData params ["_position", "_rating"]; clientData = nil; player setPosATL _position; player addRating _rating; -
draw that eliminates the used options
Schatten replied to hectrol's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I didn't quite understand what you want, but this is simplified version of your code: _varName = format ["Pos_Reh_Namuvaka_%1", (floor (random 9)) + 1]; (leader CIV_REHEN_NAMUVAKA_1) setPos (getPos (missionNamespace getVariable _varName)); -
[SOLVED] Spawn civilian hostage with init, and problem with addAction
Schatten replied to hectrol's topic in ARMA 3 - MISSION EDITING & SCRIPTING
CIV_REHEN_NAMUVAKA_1 is not an array, but a group. Revert this code as it was originally. -
[SOLVED] Spawn civilian hostage with init, and problem with addAction
Schatten replied to hectrol's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's because your code is wrong. I guess it should be like this (pay attention to the formatting and readability): _x addAction [ ":: Rescue - Rescatar :: ", { ["Task_CIV_REHEN_NAMUVAKA_1", "SUCCEEDED"] call BIS_fnc_taskSetState; { _x setCaptive false; _x enableAI "PATH"; _x setUnitPos "AUTO"; } forEach (units CIV_REHEN_NAMUVAKA_1); (units CIV_REHEN_NAMUVAKA_1) joinSilent (group player); } ]; -
Need clarification how the joinSilent command works for spawned groups.
Schatten replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is because there is no such event script. -
Need help with keeping modified faces and voices to carry over after respawn of editor placed units.
Schatten replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you were able to highlight the code, then you can remove it. This code should be executed once, therefore it should be placed, for instance, in initServer.sqf event script. Make the code readable, don't use strings with code (since code highlighting doesn't work in strings), as I demonstrated, and use programmer's editor with code highlighting. -
Soldier Tracker ( Map and GPS Icons )
Schatten replied to fn_Quiksilver's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Remove/comment out lines 977-979. -
ARMA3 server difficulty setting
Schatten replied to narcissu's topic in ARMA 3 - SERVERS & ADMINISTRATION
Do you mean this? If so then this is the bug. -
sending strings to fnc_initvehicle
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I guess that's because of quotes and apostrophes. Try to invert them. -
sending strings to fnc_initvehicle
Schatten replied to Tankbuster's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's because BIS_fnc_initVehicle doesn't work with string. Try this code snippet: if (_initstring isEqualType "") then { ([_cargo] + (parseSimpleArray (format ["[%1]", _initstring]))) call BIS_fnc_initVehicle; }; -
Need help combining these code lines together.
Schatten replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You already did so in the second piece of code, just change other params. The same for me. -
Need help combining these code lines together.
Schatten replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@avibird 1, just modify my code: [ this, "DELAY=", 300, "START=", 60, "PAUSE=", 100, "EXIT=", myExitTrigger2, "INIT=", toString { { doStop _x; } forEach (units _proxyThis); } ] spawn jebus_fnc_main; -
ARMA3 server difficulty setting
Schatten replied to narcissu's topic in ARMA 3 - SERVERS & ADMINISTRATION
https://community.bistudio.com/wiki/Arma_3:_Server_Config_File#Server_Options -- forceRotorLibSimulation parameter. -
Need help combining these code lines together.
Schatten replied to avibird 1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
[ this, "DELAY=", 300, "START=", 60, "PAUSE=", 100, "EXIT=", myExitTrigger2, "INIT=", toString { _actionParameters = [ "On Knees", { (_this select 0) playMove "Acts_ExecutionVictim_Loop"; }, nil, 1.5, true, true, "", "true", 1.5 ]; { _x disableAI "PATH"; _x addAction _actionParameters; } forEach (units _proxyThis); } ] spawn jebus_fnc_main; -
Add waypoint function/for random pos in marker
Schatten replied to redarmy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Don't know for sure -- I just write scripts in accordance to the BIKI, and it says that if radius is zero or positive, then you should use PositionAGL, otherwise you should use PositionASL. -
Add waypoint function/for random pos in marker
Schatten replied to redarmy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No, according to the BIKI: Just noticed, that PositionASL should be used if radius is negative, so this is fixed version: _wp = BB addWaypoint [AGLToASL (randomPoint call BIS_fnc_randomPosTrigger), -1];