Viba
Member-
Content Count
175 -
Joined
-
Last visited
-
Medals
Everything posted by Viba
-
AddEventHandler wrong side of Killer!?!?
Viba replied to HerrVorragend's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Corpses are registered as CIV units, just check the side of the player group. _correctSide = side (group player); -
Is there any way to get the player's keybindings?
Viba replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can find keynames from here: C:\Username\Documents\Arma 3\Username.Arma3Profile To disable the map key, add KeyDown EH and use this: _handled = false; if ((_this select 1) in actionKeys "ShowMap") then {_handled = true}; _handled; -
Having trouble understanding publicVariableClient/Server and addPublicVariableEventHa
Viba replied to dreadedentity's topic in ARMA 3 - MISSION EDITING & SCRIPTING
publicVariableClient requires the owner id of the player object so it knows who to send the data to, you can get it by doing: (owner playerobject). On your own client that would simply be (owner player). On the server you either have to find the desired player object by scripts or have the client send somekind of loadrequest that contains the clients player object, or you could use the mission.sqm defined name for the player slot the player is occupying. publicvariable broadcasts a variable and it's value across the network, a defined publicvariableeventhandler for that variable is triggered across all clients (and server), but not on the client/server that broadcasted it. So essentially publicvariable sends variable to everyone, publicvariableclient sends variable from server to a specific client, publicvariableserver sends variable from client to server only. -
Otherwise good, but that is NOT the dedicated servers FPS, hint is only working on the client and thus that is not running on the server.
-
Regarding Init & JIP
Viba replied to ezremake's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Whole thing is run. pubVars: if (isNil "mypubvar") then {//predefine mypubvar = "predefined"; }; -
if (100 > random 100 then
Viba replied to node's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Just try copying my version directly. -
if (100 > random 100 then
Viba replied to node's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
random 100 and check if the number is over 100? Logical error, you have to lower the number you are checking for. -
if (100 > random 100 then
Viba replied to node's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
if (!isDedicated) then { while {true} do { waitUntil {sleep 5; (alive player) && (isNull (finddisplay 49))}; // || any other things needed to take into account, respawn dialog and so on? _number = random 100; if (_number > 85) then { player addWeapon "DMR"; //player addMagazine... and so on }; //If you loop at fullspeed you'd get DMR's all the time, just modify the random chance and the sleep time so it's balanced. sleep 60; }; }; -
Arma 2OA kills internet connection since last past (video)
Viba replied to Deathnick's topic in ARMA 2 & OA - TROUBLESHOOTING
Sounds like the same thing I'm experiencing with a headless client -> http://forums.bistudio.com/showthread.php?182432-Headless-Client-troubles-since-1-63-amp-Steam -
#login adminpassword #monitor 5 The number after monitor is the interval in seconds it shows you server info. Diag_fps works also on server, you can send it to clients eg. with pubvars.
-
_vehicle_23094 = objNull; if (true) then { _this = createVehicle ["Infostand_2_EP1", [4057.35, 11662.7, 0.000128174], [], 0, "CAN_COLLIDE"]; _vehicle_23094 = _this; _this setDir 207.046; _this setPos [4057.35, 11662.7, 0.000128174]; }; ----> _vehicle_23094 = createVehicle ["Infostand_2_EP1", [4057.35, 11662.7, 0.000128174], [], 0, "CAN_COLLIDE"]; _vehicle_23094 setDir 207.046; _vehicle_23094 setPos [4057.35, 11662.7, 0.000128174];
-
Running dedicated server, headless and normal clients on same machine
Viba replied to Schatten's topic in ARMA 2 & OA - Servers & Administration
Well the new 1.63 patch kinda f*cks up the headless client. If I start it through steam with startup parameters in steam it fails to join the correct slot and doesn't initialize properly somehow. If I start it from the new ArmA2OA_BE.exe file with the same startup parameters it works fine, until at some point it starts lagging the WHOLE server, making it even hard to connect to it through RDP, shutting down the HC normalizes the situation immediately. No problems whatsoever in the previous builds pre-1.63. The "forceHeadlessClient=1;" should work, but as I stated above... -
Hard to say without the code.
-
Running dedicated server, headless and normal clients on same machine
Viba replied to Schatten's topic in ARMA 2 & OA - Servers & Administration
You need unique copies. Before steam you could just block a port on the server and be done with it, not sure how it is now. -
Changing the Teams Units.
Viba replied to BWalker's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Check this out for some basics about it: http://forums.bistudio.com/showthread.php?180345-Advanced-Uniform-Changing&p=2729183#post2729183 -
A quick mockup so that players can send their grid location to another player, worked fine for me when I tested it on a dedicated server: You can put everything in the main init.sqf except for the last part. Might not contain full functionality of what you are after but should provide a basic starting point at least. //Server relays the message from one sourceclient to the targetclient if (isServer) then { "relayPosMsg" addpublicvariableeventhandler { _arr = _this select 1; _source = _arr select 0; _destination = _arr select 1; receivePosMsg = _source; (owner _destination) publicvariableclient "receivePosMsg"; }; }; if (!isDedicated) then { //Sends the messageinformation to the server that relays it further, also removes the addactions and starts the main addaction. sendMessage = { relayPosMsg = [player, (_this select 0)]; publicvariableserver "relayPosMsg"; {player removeaction _x;} forEach actions; [] spawn addLocAction; }; //Removes the main addaction and compiles an addaction list of all the players on the server so the player can choose who to send the message to. compilePlayerList = { actions = []; player removeAction action1; _action = player addAction ["Cancel", "actionHandler.sqf", "{player removeaction _x;} forEach actions; [] spawn addLocAction;",0,false,true,"","alive player"]; actions = actions + [_action]; { _text = format ["Send gridlocation to %1",name _x]; _args = format ['[%1] spawn sendMessage;',_x]; _action = player addaction [_text, "actionHandler.sqf", _args,0,false,true,"","alive player"]; actions = actions + [_action]; } forEach playableUnits; }; //When server relays the message to the client this processes and shows it. "receivePosMsg" addpublicvariableeventhandler { _name = name (_this select 1); _gridpos = mapGridPosition (_this select 1); _message = format ["Transmission from %1 at grid %2...",_name,_gridpos]; titleText [_message, "PLAIN"]; }; //Just simply adds the main addaction to the player addLocAction = { action1 = player addAction ["Send gridlocation to a player...", "actionHandler.sqf", "[] spawn compilePlayerList;",0,false,true,"","alive player"]; }; [] spawn addLocAction; }; //Put this in actionHandler.sqf in the main mission folder call compile format ["%1", _this select 3]; Feel free to modify to your needs.
-
Need more information about what you are trying to accomplish? Do you want players to be able to send messages to each other containing their grid location?
-
if (100 > random 100 then
Viba replied to node's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Depends how you launch the script. If it runs on the client you can just use player. -
https://community.bistudio.com/wiki/mapGridPosition
-
if (100 > random 100 then
Viba replied to node's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well, your condition returns always true. Randomly upon joining or just randomly when playing? if (!isDedicated) then { _number = random 100; if (_number > 85) then { player addWeapon "DMR"; player addMagazine... and so on }; }; -
Putting marker on all units on map (for debugging purpose)
Viba replied to vincentz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This should work, you can loop it to have moving markers: number = 0; for "_i" from 0 to number do {deletemarkerlocal format ["Vehicle_%1",_i];}; { _markername = format ["Vehicle_%1",number]; _pos = getPos _x; _vpos = [_pos select 0, _pos select 1]; _marker = createMarkerLocal [_markername, _vpos]; _class = typeOf _x; _marker setMarkerTextLocal _class; _marker setMarkerTypeLocal "Dot"; _marker setMarkerSizeLocal [0.45, 0.45]; _marker setMarkerColorLocal "ColorGreen"; _marker setMarkerAlphaLocal 0.75; number = number + 1; } forEach playableUnits; -
Use this too: https://community.bistudio.com/wiki/enableSimulation
-
LHD Random placement different ASL. Cant place units on carrier...
Viba replied to vincentz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
https://community.bistudio.com/wiki/modelToWorld -
LHD Random placement different ASL. Cant place units on carrier...
Viba replied to vincentz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ASL height varies as the waves move. A bit like okurz suggested, you could just create a helipad at some coordinates on the map and attach the stuff to it. eg.: _helih = "HeliHEmpty" createVehicle [0, 0, 0]; //Either setpos the objects to desired locations and attach them immediately to the HeliHEmpty //Or fiddle around until you have the needed coordinates for the attachTo command _myvehicle setpos _desiredpos; _myvehicle attachTo [_helih]; //or _myvehicle attachTo [_helih, _myarrayofcoordinates]; -
Is it possible to add a addaction menu to a client that calls a SQF from the server ?
Viba replied to spitfire007's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I was assuming that only the server has the server/extraction.sqf script and folder, not included in the mission file.