-
Content Count
176 -
Joined
-
Last visited
-
Medals
Community Reputation
16 GoodAbout cybercoco
-
Rank
Sergeant
Profile Information
-
Gender
Male
-
Location
Chokory - Esseker
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Create a progress bar depending on a var's value
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_test = "hello"; with uiNamespace do { my_awesome_progressBar = findDisplay 46 ctrlCreate ["RscProgress", -1]; my_awesome_progressBar ctrlSetPosition [ 0.345, 0.3 ]; my_awesome_progressBar progressSetPosition 0; my_awesome_progressBar ctrlCommit 0; my_awesome_text = findDisplay 46 ctrlCreate ["RscStructuredText", -1]; my_awesome_text ctrlSetPosition [ 0.345, 0.3 ]; my_awesome_text ctrlCommit 0; }; [ "TIMER", "onEachFrame", { params[ "_start", "_end" ]; _progress = linearConversion[ _start, _end, time, 0, 1 ]; (uiNamespace getVariable "my_awesome_progressBar") progressSetPosition _progress; (uiNamespace getVariable "my_awesome_text") ctrlSetStructuredText parseText format["%1%2", round(100*_progress), "%"]; if ( _progress > 1 ) then { [ "TIMER", "onEachFrame" ] call BIS_fnc_removeStackedEventHandler; ctrlDelete (uiNamespace getVariable "my_awesome_progressBar"); ctrlDelete (uiNamespace getVariable "my_awesome_text"); ///// hint format ["%1", _test]; // HERE ! ///// }; }, [ time, time + 20 ] ] call BIS_fnc_addStackedEventHandler; How can I present the var as a param and make the hint format work properly ? -
[SOLVED] if (magazines player find _varContainingObjectId > 0)
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_id = "FirstAidKit" // _id is holding the name : "FirstAidKit" if (magazines player find _id > 0) -
[SOLVED] if (magazines player find _varContainingObjectId > 0)
cybercoco posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I would like to search if the player has a certain object in his person. If so, code will be executed. I've used the following : if (magazines player find FirstAidKit > 0) It works fine, but I would like to have a variable instead containing the object's id. I tried the code bellow, and it didn't work : _id = """FirstAidKit""" // _id is holding the name : "FirstAidKit" if (magazines player find _id > 0) Is it actually possible to make it work that way ? -
addAction for each vehicle that's 3m from a player
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you, I just realised that I was actually using this double condition on my version but I didn't notice that the thing was working. -
addAction for each vehicle that's 3m from a player
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is there a way to delete the addAction if someone gets in the vehicle (only remove the addAction from this one vehicle) ? But then add it back when the player gets out... Tried it, but doesn't work : _type = "C_Offroad_01_F"; { if (typeOf _x isEqualTo _type) then { while { alive _x} do { if (!player in _x) then { _x addaction ["Hello","jack.sqf","",11, true, true, "", "_this distance _target < 3"]; } else { removeallactions _x; }; sleep 2; }; }; } foreach vehicles; -
Take an array through a function [easy ?]
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I get how it's working now, thank you Greenfist. That will be very handy indeed ! Thanks for the solution Heeeere's johnny!, it's a quick way to solve the problem. -
Adding a border to a dialog box
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, I think I'll have to leave this problem for now... -
Add background video
cybercoco replied to _.Dardo._'s topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Thank you very much Kaysio, that's nice ! -
Take an array through a function [easy ?]
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_fnc_Hp = { params ["_array", "_return", "_i"]; _return = []; _array select _i from 0 to 2 do { round (((_array * -100) + 100)); _return set [_i, _array]; }; _return; }; _all = [0,0,0]; _alldamage = [_all] call _fnc_Hp; // tested _all and [_all] and [0,0,0] hint format ["%1", _alldamage]; Tried with an array of [0,0,0], still doesn't work... -
Take an array through a function [easy ?]
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It is already defined as the vehicle name... -
Take an array through a function [easy ?]
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks Davidoss, however the code doesn't work yet : _all outputs [0,0,0] _alldamage outputs [] _fnc_Hp = { params ["_array", "_return", "_i"]; _return = []; _array select _i from 0 to 2 do { round (((_array * -100) + 100)); _return set [_i, _array]; }; _return; }; _all = [_won getHit "motor",_won getHit "palivo",_won getHit "karoserie"]; _alldamage = [_all] call _fnc_Hp; // debugg hint format ["%1", _all]; sleep 2; hint format ["%1", _alldamage]; -
Is there a way to set a border and border color of a dialog on the fly (without using a .hpp file). Do I use ctrlSetTooltipColorBox ? Thanks in advance, C.Coco
-
Create a progress bar depending on a var's value
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you very much, that's awesome ! -
Determine is unit a medic | engineer , determining , checking .
cybercoco replied to Ilias38rus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think there are only three types of medic : "B_medic_F" "B_recon_medic_F" "B_G_medic_F" if ( (typeOf player == "B_medic_F") or (typeOf player == "B_recon_medic_F") or (typeOf == "B_G_medic_F") ) then {hint "I'm a medic"} else {hint "I'm not a medic"}; -
addAction for each vehicle that's 3m from a player
cybercoco replied to cybercoco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks mate !