-
Content Count
176 -
Joined
-
Last visited
-
Medals
Posts posted by cybercoco
-
-
-
I doesn't work because mhq is not the name of the vehicle. It's the name of "C_Offroad_01_F" createVehicle getMarkerPos "mk1";
Set the vehicle name when it spawn. Not tested :
mhq = "C_Offroad_01_F" createVehicle getMarkerPos "mk1"; deploy = [[mhq,["Deploy MHQ",{execVM "mhq.sqf"} ]],"addAction",true] call BIS_fnc_MP; mhq SetVehicleVarName vehicle_name; // set the name
marker1 = createMarker ["respawn_guerrila1", position mhq]; marker1 setMarkerType "Empty"; marker1 SetMarkerPos GetPos mhq; vehicle_name removeAction deploy; undeploy = [[mhq,["UnDeploy MHQ",{execVM "undeploymhq.sqf"} ]],"addAction",true] call BIS_fnc_MP;
-
This doesn't work, because the if-condition has assignments ("="), but must have comparisons ("==").
Corrected it ! ;)
-EDIT-
I didn't notice it at first but nice code there !
if (1 == { if (1 == _vehicle getHit ("wheel_" + _x + "_steering")) exitWith {1}; } count ["1_1", "1_2", "2_1", "2_2"]) then { hintSilent "Vehicle does not have all wheels anymore."; } else { hintSilent "Vehicle still has all wheels."; };
-
No worries Interectic !
I don't if you've noticed but on the page I gave you, there is another link pointing to another thread. This one : http://www.ofpec.com/forum/index.php/topic,32707.0.html?PHPSESSID=093683e5cf62dc9beb864e73697369e5
-
You can spawn a object (laptop, files or other) on the map, set a objective to get it (with/without marker). The item (intel) will have to have an addAction.
When the player will find the item, he will be able to click action. The addAction will execute file.
All is explained in details here :
Spawning it randomly in a certain area would require a little more.
-
1
-
-
I'm saying that because his code doesn't utilise the sleep cmmand. So it won't be desync,and will be 20 sec, right ?
-
is'nt Larrow's way better then ?
-
This code lasts longer than expected. I would like a total duration of 20 sec (the duration of the animation played at the same time). How ?
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_progressBar ctrlSetTextColor [0.4,0.804,0,1]; }; _counter = 200; for "_i" from 0 to _counter do { (uiNamespace getVariable "my_awesome_progressBar") progressSetPosition (_i/_counter); //hintSilent format ["%1%2", _i * 100 /_counter, "%"]; with uiNamespace do { x = safezoneX + 0 * safezoneW; y = safezoneY + 0 * safezoneH; w = safezoneW * 0.8; h = safezoneH * 0.8; my_awesome_text = findDisplay 46 ctrlCreate ["RscStructuredText", -1]; my_awesome_text ctrlSetPosition [x,y,w,h]; my_awesome_text ctrlCommit 0; my_awesome_text ctrlSetStructuredText parseText format["%1%2", round(_i * 100 /_counter), "%"]; }; sleep 0.1; ctrlDelete (uiNamespace getVariable "my_awesome_text"); }; ctrlDelete (uiNamespace getVariable "my_awesome_progressBar");
-
I get the counter from 0 to 100 % in ~46 secs
Then if I do it again without restarting the scenario, I get 20sec ???!!!
-
I can't get the bar to be more fluid. Looks like the sleep command doesn't work bellow 1...
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_progressBar ctrlSetTextColor [0.4,0.804,0,1]; }; for "_i" from 1 to 20 do { (uiNamespace getVariable "my_awesome_progressBar") progressSetPosition (_i/20); hintsilent format ["%1%2", round(5*_i), "%"]; //debugg sleep 1; //interval }; ctrlDelete (uiNamespace getVariable "my_awesome_progressBar");
If I set _counter = 20*100 and sleep 0.01 it won't work.
-
with uiNamespace do
{
picture = findDisplay 46 ctrlCreate ["RscPicture", -1];
picture ctrlSetPosition [ 0.345, 0.3,1,1 ];
picture ctrlSetText "images\loadScreen.jpg";
picture ctrlCommit 0;
};
sleep 5;
ctrlDelete (uiNamespace getVariable "picture"); // removes it after 5 secs
-
1
-
-
I tried to paste it into the LOCAL EXEC, just to get excited, with the following path:C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Mods\m1.png
But the interpreter gave me the following error:
You should add the code in a sqf file in the mission directory.
I don't think you can use absolute path in a code like that.
-
1
-
-
Is there any possibility to define if vehicle has all wheels or not_1 = _vehicle gethit "wheel_1_1_steering"; _2 = _vehicle gethit "wheel_1_2_steering"; _3 = _vehicle gethit "wheel_2_1_steering"; _4 = _vehicle gethit "wheel_2_2_steering"; if (_1 == 0 && _2 == 0 && _3 == 0 && _4 == 0) then {hint "Vehicle has lost all wheels"} else {hint "Vehicle has all wheels"};
Each wheel has it's own damage level, going from 0 to 1, like all other vehicle parts.
-
Very nice tutorial this. Thanks for sharing !
-
Ok, i deleted the class ItemInfo.
If I set the mass to 100, will it take more space in the unit's backpack ?
-
mass = 10; //weight of the object
That sets the number of "slots" it's going to take in the inventory, right ?
I don't understand, because when I set it to 20, it doesn't make any difference !
-
did you include class cfgPatches in your config.cpp?Also you wouldn't need binarization so try without binarizing.The issue came from the fact that I had the game opened while I was trying to pack it.
When I pack the folder with the game closed, it works.
-
So, do I use this function "fnc_rgbaToColorArray" ?
-
Do you know how to use the code showed here : https://community.bistudio.com/wiki/BIS_fnc_ambientAnim ?
-
Pump !
When I try to use the animations (found using the animation viewer - ingame) most of the time, they don't work.
Where can I find the correct ones, like this one : AinvPknlMstpSnonWnonDnon_medic_1 ?
-
Also, I think you should be posting this in here : https://forums.bistudio.com/forum/154-arma-3-mission-editing-scripting/
-
Inherhit from ItemCore then.
I actually used class cfgMagazines and removed ItemWatch.
It's now working properly !
But I don't understand the use of this part :
class CfgPatches { class testinggear { units[] = {"testinggear"}; weapons[] = {}; requiredVersion = 1.0; }; };
Does it create a new class ?
-
The config.cpp was missing CfgPatches because while I was trying without it it didn't work.
Final code :
class CfgPatches { class testinggear { units[] = {"testinggear"}; weapons[] = {}; requiredVersion = 1.0; }; }; class cfgMagazines { class CA_Magazine; class sc_bandage: CA_Magazine { displayName = "Bandage"; count = 1; class ItemInfo { mass = 1; }; picture = "\testinggear\images\bandage.paa"; model="\A3\structures_f_epa\Items\medical\antibiotic_F"; descriptionShort = "Hey Wonno"; }; };
-
It's all strange...
I took some files from a different mod, and it works. This is config.cpp
class CfgPatches { class scorch_invitems { units[] = {"scorch_invitems"}; weapons[] = {}; requiredVersion = 1.0; }; }; class CfgWeapons { class ItemWatch; class sc_bandage: ItemWatch { displayName = "Bandage"; count = 1; class ItemInfo { mass = 1; }; picture = "\scorch_invitems\images\bandage.paa"; model="\A3\structures_f_epa\Items\medical\antibiotic_F"; descriptionShort = ""; };
However the author has set it to the "ItemWatch", I need it to be a inventory item, like the FAK.
Do I change "ItemWatch" with "FirstAidKit" ?
How to place INTELS about randomly placed target?
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Maybe make the intel's description random or cycle through on every start (don't think the latter is possible though ;)
I'll post something in a bit !