-
Content Count
147 -
Joined
-
Last visited
-
Medals
Community Reputation
27 ExcellentAbout MKD3
-
Rank
Sergeant
Profile Information
-
Gender
Male
Recent Profile Visitors
-
Done it hundreds of times. But to each their own.
-
Variable names failing in multiplayer
MKD3 replied to diehardfc's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Having done this sort of thing on a bigger scale, here's what I would use to temporarily debug players moving about. It'll tell you each time someone clicks the button, who it was, and where they're heading. Also try moveInAny as it allows the player to be put in any open seat. //Add this to function to init.sqf or just execute it locally using debug fn_diagnosis = { //params sent by player when button clicked params [_name, _targetvehicle]; //Exit if not you, comment this out if you wish it to be seen on all clients if !(getplayerUID player == "YOUR UID HERE") exitWith {false}; //You'll see this each time someone has a go at teleporting systemChat (format ["%1 has attempted teleporting to %2",_name,_targetVehicle]); }; //Add this to code when player clicks button to teleport. [(name player), _targetVehicle] remoteExec ["fn_Diagnosis", allPlayers]; -
Tried _plane enablesimulation false?
-
Need help with script for MP server (Resolved)
MKD3 replied to IGD Big Steve's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You would be better off creating a function that gets called by your event handler. The best way to do it is using getPlayerUID. Here is an example of how I might do this. Written on a laptop, unsure if this works or has errors. fn_playerKilled = { params ["_killed","_killer","_instigator"]; //Exit if not players involved if !((isPlayer _killed) OR (isPlayer _killer)) exitwith {}; //Exit if on same side if (side _killed == side _killer) exitiwith {}; //You cannot give individual players points here as this is now serverside, you must make a variable per player _playerVariable = format ["%1_points", getPlayerUID _killer]; //retrieve current points private _points = missionNamespace getvariable "_playerVariable"; //Throw error if points are set before game start. if (isNil _points) exitwith {"Problem, no points set"}; _updatePoints = _points + 500; //Set points missionNamespace setvariable ["playerVariable",_points]; }; //Eventhandler addMissionEventHandler ["EntityKilled", {_this call fn_playerKilled}]; //Set everyones points to 0 on mission start { private _playerVariable = format ["%1_points", getPlayerUID _x]; missionNamespace setVariable [_playerVariable, 0]; } foreach allPlayers; -
Need help with script for MP server (Resolved)
MKD3 replied to IGD Big Steve's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is a locality issue. The biggest sign is it not working on a dedicated server but working locally. What is the difference you ask? Player is not assigned on a dedicated server, but is assigned locally. You must have a variable instead of the player command, and assign it a unit object instead. if ( _owner isEqualTo (side player)) then { pointsPlayer = pointsPlayer + 1000; .... Needs to be _unit = blueTeamGuy1 or (code to find specific player unit); if ( _owner isEqualTo (side _unit)) then { pointsPlayer = pointsPlayer + 1000; .... -
Chat Showing multiple times
MKD3 replied to JohnKalo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Exactly Also I hope you're using a text editor such as notepad++, you could easily go replace and change ["sideChat", 0] into ["fn_displayChat", allplayers] for all of the instances in about 10 seconds. -
MKD3 started following Spawning boats spread out along shoreline, Chat Showing multiple times, Players start in heli, JiP-Players in Base (complex situation) and and 3 others
-
Chat Showing multiple times
MKD3 replied to JohnKalo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You just learned a good lesson about coding in general, if you've written it more than once make it a function. Here's a slightly less crappy way to make life easier. //Set globally, maybe in init.sqf //Now any changes can be quickly adjusted once, here. fn_displayChat = { _speaker = _this select 0; _text = _this select 1; _speaker sideChat _text; }; [BL, "I done goofed"] remoteExec ["fn_displayChat", allPlayers]; sleep 5; [BL, "this isnt tested"] remoteExec ["fn_displayChat", allPlayers]; sleep 2; -
Players start in heli, JiP-Players in Base (complex situation)
MKD3 replied to Purzel's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Id suggest learning a bit about locality in Arma for what this and player mean, especially in MP. Here is a little basic template you might want to give a try to get you heading the right direction. Create a file called initplayerLocal.sqf in your mission file, this will automatically execute on all clients on missions start. -
@gc8 Attach the camera to the helicopter, set the cameras target as the pilot or a unit within the helicopter. I accept donations and gifts.
-
Maybe @HazJ needs to relax a little. When a person doesnt understand the way arma functions and events happen, I wouldnt expect them to understand what a switch block or event a basic eventhandler do. Im pretty experienced with Arma but I wouldn't have got through this sort of thing without help from an actual programmer and hours of reading and asking seemingly stupid questions. Good luck @sbondo1234 EDIT: Not saying that hazJ hasnt been helpful, just saying a patience is a virtue
-
This code is client side so using this (setObjectTextureGlobal) will cause the texture to be set globally, this isn't that useful for init.sqf which executes globally anyway, but doesn't hurt anyone. As for your problem, my thoughts are that a good way to find your answer is in your question: Code works, however not in init.sqf. This means it is probably an initialisation order problem. Meaning this code is running before your units exist. Try this to test that. sleep 10; { _x setObjectTextureGlobal [0, "images\red.paa"]; } forEach (allUnits select {side _x == WEST});
-
Need solution for Saving and loading of container content between multiple editable Zeus missions
MKD3 replied to barto300's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Player loadouts can be saved via : https://community.bistudio.com/wiki/getUnitLoadout & https://community.bistudio.com/wiki/SetUnitLoadout Container contents are another thing. If youre not fussed about saving things inside containers... inside containers, then you can do it quite easily. If that matters to you, its a mess. There is 1000 examples of saving box contents on this platform so Ill leave that to you. To make it persistent you will want to save it to profilenamespace to be recalled later. -
Adding a weapon with attachments to a box
MKD3 replied to wyattwic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Only two things i can think of would be 1. Arma or 2. Locality of the AI. Leaning more towards 1, have you tried running a loop such as.. while {(currentWeapon _unit != "")} do {sleep 1; //put in box again}; Just to see if its just the AI ignoring you? -
Spawning boats spread out along shoreline
MKD3 replied to cklymowsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I had a bit of a play around from curiosity. Here's is a basic, find water position function I came up with. Not exactly what you want, but you might be able to use some of whats in it. //Number of positions private _boatCount = 10; //Settings private _minRange = 200; private _maxRange = 600; private _centrePos = getpos player; private _waterPosArray = []; //Generate Array for "_i" from 1 to _boatCount do { private _distance = floor random _maxRange; private _waterPos = [_centrePos, _minRange, _distance, 3, 2, 20, 0] call BIS_fnc_findSafePos; //Check if position is above water if (!(_waterPos isFlatEmpty [-1, -1, -1, -1, 2, false] isEqualTo [])) then { //Boat, not submarine _waterpos set [2, 0.5]; _waterPosArray pushback _waterpos; }; }; _waterPosArray; This is the sort of results I was getting, X being the centre and squares being the points. If it cant find anything, it returns an empty array. Good luck! -
Door Keypad [SCRIPT] Request
MKD3 replied to WarhammerActual's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thats a big red pill