Jump to content

Piloto_Spyke

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Community Reputation

5 Neutral

1 Follower

About Piloto_Spyke

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I open this thread so that people who search for it on the Internet can find it easier than I do. I have solved this with the help of the people who were in the Slack of the ACE (special mention to Schwaggot). 1. It have to be executed from an Addon (or at least it is the only way it worked for me) 2. Code executed from my addon config.cpp class ace_medical_treatment_actions { class Diagnose; class ExecuteMyCode: Diagnose { displayName = "EXECUTE MY CODE"; displayNameProgress = "EXECUTE MY CODE"; items[] = {}; category = "examine"; allowedSelections[] = {"All"}; allowSelfTreatment = 1; treatmentTime = 3; callbackSuccess = "true"; callbackFailure = ""; callbackProgress = ""; condition = "true"; itemConsumed = 0; litter[] = {}; }; }; Spyke.
  2. Hi, maybe this could be useful. init.sqf [] execVM "initSaveLoadouts.sqf"; initSaveLoadouts.sqf diag_log "initSaveLoadouts.sqf"; SPK_fnc_applyClient = { params ["_loadout", "_positionASL", "_dir"]; player setUnitLoadout _loadout; player setDir _dir; player setPosASL _positionASL; diag_log "(ClientData Load in client)"; }; SPK_fnc_resetClientData = { params["_uid"]; profileNamespace setVariable [format["Name_%1",_uid], nil]; profileNamespace setVariable [format["Loadout_%1",_uid], nil]; profileNamespace setVariable [format["Position_%1",_uid], nil]; profileNamespace setVariable [format["Direction_%1",_uid], nil]; }; SPK_fnc_saveClientData = { params["_unit","_uid","_name"]; profileNamespace setVariable [format["Name_%1",_uid], _name]; profileNamespace setVariable [format["Loadout_%1",_uid], getUnitLoadout _unit]; profileNamespace setVariable [format["Position_%1",_uid], getPos _unit]; profileNamespace setVariable [format["Direction_%1",_uid], getDir _unit]; saveprofileNamespace; diag_log format ["(ClientData Save) - ID: %1 | Name: %2 | Saved",_uid, _name]; }; SPK_fnc_loadClientData = { params["_uid","_name"]; _nameId = profileNamespace getVariable [format["Name_%1",_uid], ""]; _loadout = profileNamespace getVariable [format["Loadout_%1",_uid], []]; _position = profileNamespace getVariable [format["Position_%1",_uid], [0,0,0]]; _direction = profileNamespace getVariable [format["Direction_%1",_uid], 0]; diag_log format ["(ClientData Load) - ID: %1 | Name: %2 | Loaded",_uid, _name]; [_nameId,_loadout,_position,_direction] }; // Si esto se ejecuta en un servidor ... if(isServer) then { addMissionEventHandler [ "HandleDisconnect", { params ["_unit", "_id", "_uid", "_name"]; // Si la unidad existe ... if(!isNull _unit) then { // Guardamos la información del cliente [_unit,_uid,_name] spawn SPK_fnc_saveClientData; }; false } ]; addMissionEventHandler [ "PlayerConnected", { params ["_id", "_uid", "_name", "_jip", "_owner"]; // Si es un jugador en Join In Progres (JIP) ... if(_jip) then { // Cargamos la información que hemos guardado del cliente _loaded = [_uid,_name] spawn SPK_fnc_loadClientData; _loaded params ["_nameId","_loadout","_position","_direction"]; // Si no tenemos nada guardado de este cliente, no hacemos nada (EXIT). if(_nameId == "")exitWith{diag_log format ["Player %1 - Without saved data",_name]}; // Aplicamos el loadout, posición y dirección al jugador [_loadout,_position,_direction] remoteExec ["SPK_fnc_applyClient", _owner]; }; } ]; }; CONCLUSION after trying it: If you want to save variables: - It cannot be saved on the server unless a database is used. - They must be saved in the player's own profile with the profileNamespace or saveProfileNamespace commands. Therefore the scrip that I have put above does not serve to save remanent data. Spyke
  3. hi, I think there is no way to get variables or loadouts remaining after the mission has been terminated / canceled / aborted. The code you show works as long as the mission doesn't finish. Edit: I found this, maybe it works for you: profileNamespace --> To save it to the server saveProfileNamespace --> To make the data remain? I have never used them so I cannot help you much in how they work. Spyke.
  4. Piloto_Spyke

    Side Units/Vehicles Tree View

    Thank you very much Larrow you are my hero.
  5. Hello, I am trying to make a TreeView dialog that allows me to select units (in fact what I would like is exactly the same treeView of the Eden Editor) and I have been making filters and using the configClasses but I just did not like the result. Anyone know how I could get something like that? I'm using this to filter, but it doesn't seem to be a good approach I think, because some strange units still appear fn_load.sqf _cntrlTree = (findDisplay 1500) displayCtrl 0; _ManList = ("configName _x isKindOf 'Man' AND configName _x isKindOf 'SoldierWB' AND (getText (_x >> 'faction')=='BLU_F') AND (getText(_x >> 'editorSubcategory')=='EdSubcat_Personnel')" configClasses (configFile / "CfgVehicles")); { _text = getText(configFile >> "CfgVehicles" >> configName _x >> "displayName"); _text0 = getText(configFile >> "CfgVehicles" >> configName _x >> "editorSubcategory"); _cntrlTree tvAdd [[],_text]; _cntrlTree tvSetTooltip [[_forEachIndex], configName _x]; } forEach _ManList; _cntrlTree tvSort [[], false]; The following is in case someone serves as I am doing the treeVIew, although to solve the problem it may not be necessary. Thanks for the help.
  6. Hi, I just want to open this post for people who want to test with the New Rewrite of ACE Medical. It is a very simple script that can help you understand the states in which the new medical system alternates. I hope you find it useful. init.sqf addMissionEventHandler ["Draw3D", { { _unit = _x; if (!(isNil "_unit") AND ((side _unit) == west OR (side _unit) == civilian))then{ _pos = ASLToAGL getPosASL _unit; _headPos = [_pos select 0, _pos select 1, (_pos select 2) + 1.2]; _heartRate = _unit getVariable ["ace_medical_heartrate", 00]; _bloodPressure = _unit getVariable ["ace_medical_bloodpressure", [00,00]]; _bloodVolume = _unit getVariable ["ace_medical_bloodvolume", 00]; _Text = format ["HR: %1 | BP: %2 | BV: %3",_heartRate toFixed 1,_bloodPressure,_bloodVolume toFixed 1]; drawIcon3D ["", [1, 1, 1,1], _headPos, 0, 0, 0, _Text, 2, 0.03, "PuristaBold"]; _headPos = [_pos select 0, _pos select 1, (_pos select 2) + 0.5]; _state = _unit getVariable ["cba_statemachine_state0",""]; _text = ""; if(_state == "cardiacarrest")then{ _text = format["cardiacarrest (%1 s)", (_unit getVariable ["ace_medical_statemachine_cardiacarresttimeleft",0]) toFixed 1]; }else{ _text = _state; }; drawIcon3D ["", [0.1, 0.45, 1,1], _headPos, 0, 0, 0, _text , 2, 0.03, "PuristaBold"]; }; } forEach allUnits; }]; Spyke
  7. Piloto_Spyke

    Resource title not found

    Hello, I also got the same error and I have managed to solve it ERROR: 55 cutRsc ["", "PLAIN", - 1, false]; which seems to be not a possible combination. Solution: Option 1: Delete it (in my case it is not entirely necessary). Option 2: Create an RSCDefault (as Killzone_Kid says in the notes below this link: https://community.bistudio.com/wiki/cutRsc) class RscTitles { class Default { idd = -1; fadein = 0; fadeout = 0; duration = 0; }; }; in your code: 55 cutRsc ["Default", "PLAIN"]; Hope it helps. Spyke.
  8. Wow thank you very much for your help.
  9. Hi Larrow and atmo I had not seen your answer, thank you very much.
  10. Hello, I am trying to use the "Key Frame Animation" to make a little cinematic but I have a doubt that I have not found anywhere. Context: I already have all the modules of the "Key Frame Animation" ready and the camera moves well with the modes: Animation, Move, Nothing. Question: How should the objective to look at be introduced? I understand that it goes in the Rich Curve module, Look input. But I just didn't understand its syntax. The description says: <EdenId, TargetObject> As default: [-1, <NULL-object>] If I have an object called Target_0 which is what I want to look with the camera, what should I do? Thanks in advance. Spyke
  11. Hi everyone, I'm trying to make a script that allows you to cancel a mission by clicking on a text that says CANCEL in the description of the task. Script: _descript1 = "<execute expression=' [1] call compilefinal preprocessFileLineNumbers'DMG\functions\fn_CancelM.sqf' '>CANCEL</execute>"; And then in the task: [blufor, ["Tarea_"+_IDTarea], [_descript1,_titulo,_marker], _posicion, true, 1, true] call BIS_fnc_taskCreate; If I put it in this way the result is that nothing comes out. Thanks for your help Spyke is my first post in this forum, if I do not have to say it here please tell me. I found it here:
×