-
Content Count
2756 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by HazJ
-
Hi all, I have this little function that creates booby traps on doors. I can't seem to figure out how to return the direction of a door though. Any ideas? /* Code written by Haz */ scriptName "fn_doorBoobyTraps"; #define __FILENAME "fn_doorBoobyTraps.sqf" // #include "..\..\..\includes.sqf" // __tky_starts; CQBCleanupArr = []; pt_tripmines = []; // TODO: Code refactoring // (?) TODO: Switch to a blacklist approach rather than whitelist? _eligibleBuildings = [ /* "Land_building_Big_01_F", "Land_building_Small_01_F", "Land_building_Small_02_F", "Land_building_Small_03_F", "Land_building_Small_04_F", "Land_building_Small_05_F", "Land_building_Small_06_F", "Land_Shed_02_F", "Land_Shed_05_F", "Land_Shop_Town_01_F", "Land_Shop_Town_03_F", "Land_Slum_01_F", "Land_Slum_03_F", "Land_i_building_Big_01_V2_F", "Land_i_building_Big_02_V1_F", "Land_i_building_Big_02_V2_F", "Land_i_building_Big_02_V3_F", "Land_i_building_Small_02_V2_F", "Land_i_building_Small_02_V3_F", "Land_i_Shed_Ind_F", "Land_i_Stone_buildingSmall_V1_F", "Land_i_Stone_buildingSmall_V2_F", "Land_i_Stone_buildingSmall_V3_F", "Land_u_building_Big_01_V1_F", "Land_u_building_Small_02_V1_F" */ ]; _fnc_getDoors = { params ["_building"]; _buildingPositions = _building buildingPos -1; _buildingPosition = selectRandom _buildingPositions; hintSilent str selectionNames _building; { _arrow = "Sign_Arrow_Cyan_F" createVehicleLocal _x; _arrow setPosATL _x; } forEach _buildingPositions; _doors = []; _doorPositions = []; _worldPos = []; _inModelPosition = []; { if (_x find "door" >= 0 and _x find "handle" < 0) then { _doors pushBack _x; _inModelPosition = _building selectionPosition _x; hintSilent str _inModelPosition; _arrow = "Sign_Arrow_Yellow_F" createVehicleLocal [0, 0, 0]; _arrow setPos (_building modelToWorld _inModelPosition); // _doorPositions pushBack (getPosATL _arrow); _doorPositions pushBack [getPosATL _arrow, 0]; // TODO: Figure out how to return the direction of a door }; } forEach selectionNames _building; _doorPositions }; _fnc_createMine = { params ["_pos", "_dir"]; _building = nearestBuilding _pos; _m = createMine ["APERSTripMine", _pos, [], 0]; _m setDir _dir; CQBCleanupArr pushBack _m; pt_tripmines pushBack _m; // [_m, "mymine"] call fnc_setVehicleName; _m }; { _doors = _x call _fnc_getDoors; { _x params ["_pos", "_dir"]; systemChat format [":: %1", _x]; [_pos, _dir] spawn _fnc_createMine; } forEach _doors; } forEach nearestObjects [player, _eligibleBuildings, 500]; // __tky_ends; There are some elevation issues that I haven't addressed yet. Though that isn't the focus at the moment.
-
You could use a simple trigger. When the man is not inside, it completes. You could sync it to a task. I'm not sure how you have things setup. Could you provide some more information? I don't really use the Editor for anything other than playable units and respawn markers. I'm on mobile at the moment so I can't be much help. Search the Wiki for 'in' and 'list'. !unit1 in thislist
-
Hi all, I am using RscXListBox as you can see in the picture but it seems offset (not centered) so I am looking for a fix. If I change the text to say just "A" then you can see the issue more. Hopefully there is simple fix and I don't have to create invisible spacing. class RscXListBox { deletable = 0; fade = 0; idc = -1; type = CT_XLISTBOX; x = 0.1; y = 0.1; color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.25}; colorSelect[] = {0.95,0.95,0.95,1}; colorText[] = {1,1,1,1}; soundSelect[] = { "\A3\ui_f\data\sound\RscListbox\soundSelect", 0.09, 1 }; colorPicture[] = {1,1,1,1}; colorPictureSelected[] = {1,1,1,1}; colorPictureDisabled[] = {1,1,1,0.25}; colorPictureRight[] = {1,1,1,1}; colorPictureRightSelected[] = {1,1,1,1}; colorPictureRightDisabled[] = {1,1,1,0.25}; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; style = ST_CENTER + LB_TEXTURES + SL_HORZ; shadow = 2; arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; w = 0.14706; h = 0.039216; font = "RobotoCondensed"; sizeEx = GUI_TEXT_SIZE_MEDIUM; }; As you can see, it has ST_CENTER but it seems that there is more padding on the right side. class spawnType : RscXListBox { idc = idc_spawnSelection_spawnType; x = 0.2875 * safezoneW + safezoneX; y = 0.3 * safezoneH + safezoneY; w = 0.15 * safezoneW; h = 0.03 * safezoneH; text = ""; };
-
Teleport all players in trigger
HazJ replied to barn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not tested. For quick test, name your trigger say trg1 and inside init.sqf: player addAction [ "Teleport everyone to trigger", { _x setPos getPos trg1; } forEach allPlayers - entities "HeadlessClient_F"; ]; -
Teleport all players in trigger
HazJ replied to barn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
allUnits will move everyone. No need for the isPlayer check when you can do: { // setPos... } forEach allPlayers - entities "HeadlessClient_F"; // exclude Headless Clients https://community.bistudio.com/wiki/allPlayers -
Wah... lol. There will also be a parameter to turn the feature off completely.
-
Here is a video demonstrating the functionality. Still a work in progress. Video by @Tankbuster
-
We did some multiplayer tests and it's working pretty well so far. More work to do on it but generally it's coming along nicely so far.
-
Jotting ideas down with @Tankbuster Disclaimer: Left handed drawing with the mouse. Not that I'm good at drawing anyway. 😂
-
Default Authority Keys: User20 - Mission Status - Left Windows Key User19 - Earplugs - F1 User18 - Holster - H User17 - Location Finder - Ctrl + F These were changed in the latest build of the mission. Previously it used User1, User2, User3 and User4. Additional info: The key handler function was updated so now multiple key presses work.
-
Authority release version 1.08.3798. Release highlights.
-
Deleting vehicle (solved)
HazJ replied to Heidelberg's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You're welcome. If you have any other questions, let us know. 🙂 -
The teamleader always runaway????
HazJ replied to Kaede Takagaki's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Did you try: https://community.bistudio.com/wiki/allowFleeing -
Setting up a convoy ambush?
HazJ replied to panicsferd's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This may be of use: -
Fuel pumps don't pump in servers
HazJ replied to Bombstock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It seems like it is being disabled by the island or Exile. -
Deleting vehicle (solved)
HazJ replied to Heidelberg's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I meant select above. init.sqf { _x addAction ["Spawn Ifrit", { _vehicle = createVehicle ["O_MRAP_02_F", (player getRelPos [random 100, random 360]), [], 5, "NONE"]; _vehicle addEventHandler ["GetOut", { _this spawn { params ["_vehicle", "_role", "_unit", "_turret"]; sleep 10; if ( count (crew _vehicle select {alive _x}) == 0 ) then { deleteVehicle _vehicle; }; }; }]; }]; } forEach [ IfritSpawn, IfritSpawn1 ]; Example: https://we.tl/t-3g8c7mJwIM This doesn't account for all occasions such as where all crew die in vehicle before anyone disembarks, etc. I think it would be better in this case to just do: {alive _x} count (crew _vehicle) == 0 Though I was testing with select and forgot to change. -
Perhaps unload the dead crew then delete the vehicle? On phone atm so can't provide example.
-
Deleting vehicle (solved)
HazJ replied to Heidelberg's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@opusfmspol Good point on the count crew. @Heidelberg As opus said, you can't just add an action to multiple objects like that. { _x addAction ["Spawn Ifrit", {createVehicle ["O_MRAP_02_F", (getPosATL IfritSpawn), [], 5, "NONE"];}]; } forEach [ IfritSpawn, IfritSpawn1 ]; You could also do: count (crew _vehicle apply {!alive _x}) Not sure which is faster off the top of my head, I don't think it is much difference with just this snippet though I haven't ran any tests. -
Deleting vehicle (solved)
HazJ replied to Heidelberg's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tested and working. Can't run sleep in unscheduled. _vehicle addEventHandler ["GetOut", { _this spawn { params ["_vehicle", "_role", "_unit", "_turret"]; sleep 10; if (count crew _vehicle == 0) then { deleteVehicle _vehicle; }; }; }]; -
Please add a space between the : and $ dollar sign on the inventory screen, and perhaps remove the space after as well. Your money:$ 95 Your money: $95 Also, doesn't Tanoa use €?
-
Deleting vehicle (solved)
HazJ replied to Heidelberg's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You forgot ; after your sleep. You also want to check if the vehicle crew is 0. Something like this (not tested): _vehicle addEventHandler ["GetOut", { _this spawn { params ["_vehicle", "_role", "_unit", "_turret"]; sleep 10; if (count crew _vehicle == 0) then { deleteVehicle _vehicle; }; }; }]; Change _vehicle accordingly. -
Location finder 😉 https://imgur.com/a/5ainXW0
-
[GUI] trying to clear a structured text...
HazJ replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You aren't passing anything to format. Perhaps this would work but completely unnecessary. Not tested. _ctrltext ctrlSetStructuredText parseText format ["", nil]; -
[GUI] trying to clear a structured text...
HazJ replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@beno_83au's solution works. Also ctrlSetText "" works as well. Both tested. -
[GUI] trying to clear a structured text...
HazJ replied to Erwin23p's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If it doesn't work it doesn't work. Key words, try and I didn't say a string was structured text. Maybe instead of replying with such a pointless post, actually help contribute ?