Jump to content

sarogahtyp

Member
  • Content Count

    2494
  • Joined

  • Last visited

  • Medals

Everything posted by sarogahtyp

  1. sarogahtyp

    Looking for help with FSM and sleep

    Here is an example I did: Init Driver sets _driver_null_time = diag_tickTime; if the driver of the vehicle is empty then "Driver Null" condition (isNull _driver) gets true and "Get New Driver" gets processed. "Get New Driver": _driver = driver _vehicle; _current_time = diag_tickTime; "Driver Timeout" is the condition with the highest priority on "Get New Driver". Therefore its checked all the time. "Driver Timeout": _current_time - _driver_null_time > 5 If 5 seconds are passed then it leads to the state after "Driver Timeout" in this case it ends the FSM but thats not shown here. Before these 5 seconds are reched the condition state "Driver Null" gets checked and even if its true it leads back to "Get New Driver". The sense is that the state "Get New Driver" gets executed all the time by the condition "Driver Null" until timeout happens. Therefore the double arrows between "Get New Driver" and "Driver Null" are important. these are basically doing the sleep. Hope this is understandable and help... Cheers
  2. sarogahtyp

    Garbage collector question

    Here https://community.bistudio.com/wiki/Description.ext#Corpse_.26_Wreck_Management is stated this Therefore I guess that it is not just crawling arrays as you would do it by script. It should use engine functions to achieve it and therefore it should be faster as a scripted garbage collecting.
  3. sarogahtyp

    Looking for help with FSM and sleep

    you just can't use sleep in FSMs. but you can delay by using conditions which wait for a certain point of time. This guy teaches how that works:
  4. Also I think this thread could be very usefull for you during porting:
  5. Okay, I was wrong with mods paths. But you do not need a config.cpp in a user mission thats for sure. I guess you have to clean the misssion.sqm out of arma 2 addon entries. the part of mission.sqm Im talking bout should be this (but this is taken from an Arma 3 on CUP depending mission) addons[]= { "CUP_Creatures_Military_Germany", "CUP_Creatures_Military_BAF", "CUP_Creatures_Military_USMC", "A3_Characters_F_Enoch", "A3_Characters_F", "CUP_Creatures_Military_Russia", "CUP_Creatures_Military_Taki", "CUP_Creatures_Military_SLA", "rhsgref_c_troops", "CUP_Creatures_Military_RACS", "A3_Ui_F" }; class AddonsMetaData { class List { items=11; class Item0 { className="CUP_Creatures_Military_Germany"; name="CUP_Creatures_Military_Germany"; }; class Item1 { className="CUP_Creatures_Military_BAF"; name="CUP_Creatures_Military_BAF"; }; class Item2 { className="CUP_Creatures_Military_USMC"; name="CUP_Creatures_Military_USMC"; }; class Item3 { className="A3_Characters_F_Enoch"; name="Arma 3 Contact Platform - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; class Item4 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; class Item5 { className="CUP_Creatures_Military_Russia"; name="CUP_Creatures_Military_Russia"; }; class Item6 { className="CUP_Creatures_Military_Taki"; name="CUP_Creatures_Military_Taki"; }; class Item7 { className="CUP_Creatures_Military_SLA"; name="CUP_Creatures_Military_SLA"; }; class Item8 { className="rhsgref_c_troops"; name="GREF Infantry & Equipment"; author="Red Hammer Studios"; url="http://www.rhsmods.org/"; }; class Item9 { className="CUP_Creatures_Military_RACS"; name="CUP_Creatures_Military_RACS"; }; class Item10 { className="A3_Ui_F"; name="Arma 3 - User Interface"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; }; }; dlcs[]= { "CUP_Units", "Enoch", "RHS_GREF" }; Idk if that is all which you have to clean there. maybe there is more in mission.sqm to do...
  6. nevermind then. on SP it does not matter
  7. sarogahtyp

    Help with trigger script

    setTriggerActivation and the condition set in setTriggerStatements define when the trigger activates. It deactivates if those settings are not fullfilled anymore. You can define what happens on activation and deactivation with setTriggerStatements as well.
  8. addmagazinecargo is a command with local effects only. Read its biki entry.
  9. Many of those paths are mod paths. Did u use a mission which depends on mods? The other files should be in the mission folder, or not? Also u should not need to modify any cpp files while editing a mission...
  10. sarogahtyp

    TitleText dissapears too fast

    I guess we get closer. show al_vehicle_fire.sqf !
  11. sarogahtyp

    TitleText dissapears too fast

    I don't like to quote myself, but sometimes there is no way around it.
  12. sarogahtyp

    TitleText dissapears too fast

    As I already told you. Your shown code is working perfectly. Try it yourself in debug console! This is working there: private _dummy = [] spawn { if(!isDedicated) then { addCamShake [2, 2.5, 20]; sleep 0.05; titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 1</t>", "PLAIN DOWN", -1, true, true]; sleep 8; titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", -1, true, true]; }; }; There is no problem with your shown code. Maybe it is the code you did not show, who knows?
  13. sarogahtyp

    TitleText dissapears too fast

    titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 1</t>", "PLAIN DOWN", 0.5, true, true]; titleText ["<t align = 'center' shadow = '2' color='#00ff00' size='1.5' font='PuristaSemiBold' >General Demitri</t><br /><t color='#ffffff' size='1.5' font='PuristaSemiBold' shadow = '2' >Testing 2</t>", "PLAIN DOWN", 0.5, true, true]; I tested above in debug console and it works well. displays both texts about 5 seconds as it should with speed set to 0.5
  14. sarogahtyp

    TitleText dissapears too fast

    Read DreadedEntity's comment bout 3rd parameter in biki: https://community.bistudio.com/wiki/titleText Reading biki is a general rule during scripting...
  15. Are you sure it will not break out? Try shorter sleep times like sleep (random [1,3,5]);
  16. After all these years of hating Arma's dialogue system, I have now decided to get involved with it. At the moment, I'm having a lot of trouble integrating a texture as a background into a control element. Here is what I have so far: defines.h my dialog which gets included by description.ext class saroWarfare_dialog_choose_spawn { idd = -1; movingEnable = true; class ControlsBackground { }; class Controls { class Control828470542 { type = CT_BUTTON; idc = 42002; x = safeZoneX + safeZoneW * 0.54375; y = safeZoneY + safeZoneH * 0.37111112; w = safeZoneW * 0.0375; h = safeZoneH * 0.03666667; style = ST_CENTER; text = "Vote"; action = "hint 'Clicked'"; borderSize = 0; colorBackground[] = {0.086,0.208,0.486,0.7}; colorBackgroundActive[] = {0.067,0.208,0.51,0.7}; colorBackgroundDisabled[] = {0.2,0.2,0.2,1}; colorBorder[] = {0.051,0.145,0.345,0.7}; colorDisabled[] = {0.2,0.2,0.2,1}; colorFocused[] = {0.067,0.208,0.51,0.7}; colorShadow[] = {0.024,0.063,0.153,0.7}; colorText[] = {0.639,0.639,0.639,0.8}; font = "TahomaB"; offsetPressedX = 0.01; offsetPressedY = 0.01; offsetX = 0.01; offsetY = 0.01; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1.0}; soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1.0}; soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1.0}; soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1.0}; }; class Control462188694: RscPicture { type = CT_STRUCTURED_TEXT; idc = 420001; x = safeZoneX + safeZoneW * 0.466875; y = safeZoneY + safeZoneH * 0.24888889; w = safeZoneW * 0.19375; h = safeZoneH * 0.11111112; style = ST_PICTURE; text = "textures\dialog_background.paa"; moving = true; size = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); colorBackground[] = {0.165,0.271,0.529,1}; class Attributes { }; }; }; }; This is how I create it: _ok = createDialog "saroWarfare_dialog_choose_spawn"; if (!_ok) then {hint "Dialog couldn't be opened!"}; _ok = createDialog "saroWarfare_dialog_choose_spawn"; if (!_ok) then {hint "Dialog couldn't be opened!"}; Screenshot https://imgur.com/L5ka4XW What ever I tried upto now. I never got the texture working on control Control462188694... Some help would be appreciated.
  17. thx a lot. It's working now 🙂
  18. idk if you mean it like this, but it did not work:
  19. nul = [] spawn { _array = [spot_1,spot_2,spot_3,spot_4,spot_5]; while { isNull (gunner1 findNearestEnemy gunner1) } do { { gunner1 doTarget _x; sleep (random [5,10,15]); } forEach _array; } }; you just have to define how long that while loop has to run. Above I used findNearestEnemy. The while loop should run as long as objNull is returned by this command. Not tested.
  20. I did this on Altis builings: getText (configFile >> "Vehicles" >> (typeOf cursorObject) >> "DestructionEffects" >> "Ruin1" >> "type") giving me back empty strings: "" I tried that code I posted in biki on those buidlings and it is working. Maybe the behaviour you describe is not a problem anymore? Also the wreck models are deleted automatically after setting damage to 0. Edit:I did a mistake with crawling the config. I will try it again later.
  21. As this is the first post coming up with google on "arma 3 repair houses" and I had to fiddle out how it works, I now digging this up and referring to the solution which is now added as comment in biki: https://community.bistudio.com/wiki/setDamage
  22. private _classnames = ["your_object_type_1_classname", "your_object_type_2_classname", "your_object_type_3_classname", "your_object_type_4_classname" ]; creates a local array named _classnames which contents have to be strings which should be the classnames of your specific object types. You can get those classnames if you start your mission, go to such object, point on it and open debug console and execute this: copyToClipboard ( typeOf cursorObject ); now you have the classname of the object in your clipboard and you can just paste it in the array. For some random houses on Altis it would look like this: private _classnames = ["Land_u_House_Big_02_V1_F", "Land_Metal_Shed_F", "Land_i_Stone_HouseBig_V2_F", "Land_u_Addon_02_V1_F" ]; private _position_trigger = position your_trigger_name; here you just have to substitute your_trigger_name with the variable name of your trigger. It defines just the center position for the circle within nearestObjects looks for the given object types. private _radius = your_search_radius; same but with search radius. Read the link bout nearestObjects I posted. Its all explained there. If you have questions after that then just ask.
  23. https://community.bistudio.com/wiki/nearestObjects private _classnames = ["your_object_type_1_classname", "your_object_type_2_classname", "your_object_type_3_classname", "your_object_type_4_classname" ]; private _position_trigger = position your_trigger_name; private _radius = your_search_radius; if ( nearestObjects [_position_trigger, _classnames, _radius, true] isEqualTo [] ) then { hint "Everything is clean now."; };
  24. sarogahtyp

    About distances

    I tried to measure the difference between distance, distanceSqr and distance2D in the debug console but without success. I could not see any difference in performance between these 3 commands.
  25. the file is damaged, I cant open it ...
×