Jump to content

Larrow

Member
  • Content count

    2218
  • Joined

  • Last visited

  • Medals

Community Reputation

721 Excellent

About Larrow

  • Rank
    Warrant Officer

Profile Information

  • Gender
    Male
  • Location
    LAR setpos (you getpos [-2,getdir you]);LAR say3d["BOO!"]
  1. Just make the progress bar transparent (no background fill) and then use RscPictures behind it with a procedural texture of a solid color, one the whole length color orange and then another on top of that which is the blue bit. @HazJ I think he is talking about something like, for example, Tiger Woods where the swing meter goes up and down but you have to stop the meter in the blue area. So, not shown in his image, the progress would go up and down separately above what he has shown, with just images behind (coloured areas) to mark where the user has to stop the progress.
  2. There have been a few changes to BI's functions since this thread, you can now just pass the marker name without having to specify the extra params. Once you have the position returned from BIS_fnc_randomPosTrigger, just use this in your call to BIS_fnc_findSafePos, the params needed are explained on the functions wiki page, TBH I very rarely use the function so maybe someone else can help you out. Well could be a number of things. Is it constant lag or only for the first couple of minutes after the function spawns its AI? You create 25 groups of various size all within 0.05 seconds of each other. Maybe spread them out a little. You also create 25 threads in the scheduler. Use a Killed EH instead. _grp setVariable[ "callBack", [ 1, 0, 0, 0, 0 ] ]; //fnc_patrols params { _x addEventHandler [ "Killed", { params[ "_killed" ]; if ( { alive _x }count units group _killed isEqualTo 0 ) then { _callBack = group _killed getVariable "callBack"; deleteGroup group _killed; _callBack call fnc_patrols; }; }]; }forEach units _grp;
  3. Works fine here, just setup a mission as per my picture in my previous post. DOWNLOAD
  4. You could also store the dynamic text alongside the units/mode each in their own array, then use params to retrieve the info. Saves switching or multiple if statements. You can also get Arma to create a static texture for you using procedural textures.
  5. Just... current = testArray deleteAt 0; testArray pushBack current; DeleteAt returns the deleted element. Ready to be pushed to the end of the array. Could even be shortened to testArray pushBack ( testArray deleteAt 0 ); h = [] spawn { testArray = [ "A", "B", "C", "D", "E", "F", "G" ]; while { true } do { current = testArray select ( testArray pushBack ( testArray deleteAt 0 )); hint format[ "%1\n%2", testArray, current ]; sleep 1; }; };
  6. Well if your using my example then the only thing that expects a display/dialog is the displayCtrl command, but there is no way it can be a bool as even if its a timing issue and the display is not yet initialised _display would be displayNull which is not of type bool. As Das says show us your complete code and error. There are other ways to do this, by using the displays/ctrls onLoad event or the buttons onButtonClick event or action parameter. display onLoad //UI class MyAwesomeDisplay { idd = IDD_ofYourDisplay; onLoad = "_this call TAG_fnc_onDisplayLoad"; class controls { class MyAwesomeButton: ctrlButton { idc = IDC_ofYourCtrl; }; }; }; //initPlayerLocal.sqf TAG_fnc_onDisplayLoad = { disableSerialization; params[ "_display" ]; _ctrl = _display displayCtrl IDC_ofYourCtrl; _ctrl addEventHandler [ "Event", { /*code*/ }]; }; ctrl onLoad //UI class MyAwesomeDisplay { idd = IDD_ofYourDisplay; class controls { class MyAwesomeButton: ctrlButton { idc = IDC_ofYourCtrl; onLoad = "_this call TAG_fnc_onCtrlLoad"; }; }; }; //initPlayerLocal.sqf TAG_fnc_onCtrlLoad = { disableSerialization; params[ "_ctrl" ]; _ctrl addEventHandler [ "Event", { /*code*/ }]; }; ctrl onButtonClick //UI class MyAwesomeDisplay { idd = IDD_ofYourDisplay; class controls { class MyAwesomeButton: ctrlButton { idc = IDC_ofYourCtrl; onButtonClick = "_this call TAG_fnc_onButtonClicked"; }; }; }; //initPlayerLocal.sqf TAG_fnc_onButtonClicked = { disableSerialization; params[ "_button" ]; //Do whatever true }; ctrl button action //UI class MyAwesomeDisplay { idd = IDD_ofYourDisplay; class controls { class MyAwesomeButton: ctrlButton { idc = IDC_ofYourCtrl; action = "this call TAG_fnc_onButtonAction"; }; }; }; //initPlayerLocal.sqf TAG_fnc_onButtonAction = { params[ "_user" ]; //Do whatever }; Take your pick. Three variations on the same theme.
  7. _display = findDisplay IDD_ofYourDisplay; _ctrl = _display displayCtrl IDC_ofYourCtrl; _eventID = _ctrl ctrlAddEventHandler[ "Event", { /*code*/ }];
  8. As Das says I would of imagined just from looking at your video that its a difference between render time and simulation time, although from my tests I do not see the same behaviour. How are you calculating your line positions? Can you show me your code.
  9. Apex Dialog Buttons

    As @HazJ says use the ctrl# variants as these are what Eden are built from. ctrlButton is what I used in the crate logistics example with no extra styling needed. There is currently a problem with the export of the ctrl# defines and the hierarchy is broken and needs manually reordering. Which is of no use to beginners and is something I have reported in the development branch forums. Just use the baseDefines.hpp HazJ provided a link to.
  10. Functions viewer A2OA > SCENES In functions_f.pbo The reason you cannot terminate the script handle to stop the playback is that it starts up a MEH of EachFrame. To stop the playback you need to set the variable BIS_fnc_unitPlay_terminate on the object playing back the recording to true. Before the recording is terminated you can get the current playback info from the missionNamespace variable of.. _playbackVar = ("bis_fnc_unitPlay" + str ("bis_fnc_unitPlay_counter" call BIS_fnc_counter)); _playbackData = missionNamespace getVariable _playbackVar; _playbackData params [ "_object", //--- 0: Object "_recording", //--- 1: Recording "_recordingCount", //--- 2: Recording count - size of playback array "_ignoreDisabled", //--- 3: Ignore disabled "_startRecordingTime", //--- 4: Start time - time to start playback from "_startPlaybackTime", //--- 5: Start playback time - actual time playback started //** updated each loop "_step", //--- 6: Step - current index from recording that is playing "_currentTime", //--- 7: Current time - actual time currently playing( from recording ) "_nextTime", //--- 8: Next time - next recorded time to play next "_velocityTransformation" //--- 9: Velocity transformation //** "_endParams" //--- 10: End params - [ namespace, variable ] to set once playback has finished ]; The variable name will need to be retrieved as you start the recording as any other started recording will increase the counter. To start the playback where it left off use the _nextTime, as retrieved from the data just before you stop the recording, in your call to BIS_fnc_unitPlay. [ _object, _recording, _endParams, _ignoreDisabled, nil, nil, _nextTime ] spawn BIS_fnc_UnitPlay;
  11. Do not know if this has already been reported but currently BIS_fnc_exportGuiBaseClasses in both dev and stable build, output classes in the wrong order. Mainly the Eden style controls "ctrl" variant. Which means using the output creates errors due to inheritance and you have to go through and reorder everything. Was fine in previous releases.
  12. Using BIS' Sector UI

    You can already do this by using Unlock gameLogics synced to the sector and then a trigger sync to the unlock, the triggers Activation type(side) represents who must capture the sector for the unlock trigger to activate, then just sync this to the next sector in the order. You can also use the unlock triggers OnActivation to finalise the sector by disabling the secors simualtion. Open the editor and press ctrl+O on the map selection screen to bring up the old editor. Place down a sector and use the Show Info button to give you an overview of what can be attached to a sector to enhance it usage.
  13. You selectRandomWeighted of only (_gearRandom_1/_2 select 0) which means you will only ever get _rifles, _backpacks or _pistols. As mentioned above you do not use addBackpackCargo for backpacks, addItemCargo only works for weapons, magazines and items You do not use addItemCargoGlobal which could cause you problems if this is for MP // By TheGeneral // Script to spawn crates and a random weighted type of gear / ammo in each one. //******* //NO CHANGES TO GEAR DATA //******* // ARRAYS FOR CATEGORIES OF GEAR TO BE DECIDED AND THEIR WEIGHTS. THE CODE WILL SELECT 2 OF THE 3 "GEARTYPES" TO BE SELECTED AND USED TO ADD TO CRATES _gearType_1 = [_rifles, 0.18, _mgs, 0.24, _vests, 0.25]; _gearType_2 = [_backpacks, 0.10, _helmets, 0.10, _grenades, 0.95]; _gearType_3 = [_pistols, 0.15, _medical, 0.15, _accessories, 0.10]; _gearTypes = [_gearType_1, _gearType_2,_gearType_3]; // Array of all scrate spawn positions marked as pencils //_prefix = "cratespawn_"; _prefix = "test_"; _crateLocs = allMissionObjects "" select { vehicleVarName _x select [ 0, count _prefix ] == _prefix }; // STARTING LOOP TO CREATE CRATES AND DO CHECKS { // Selects random pos _equipmentCratePos = getPosATL ( _crateLocs deleteAt ( floor( random count _crateLocs ))); // Created Ammo crate at the marker location _crate = createVehicle ["Box_NATO_Ammo_F", _equipmentCratePos, [], 0, "CAN_COLLIDE"]; clearBackpackCargoGlobal _crate; clearItemCargoGlobal _crate; clearMagazineCargo _crate; clearWeaponCargo _crate; // Choose which 2 gear types are going to be used: _gearRandom_1 = selectRandom _gearTypes; _gearRandom_2 = selectRandom ( _gearTypes - [ _gearRandom_1 ] ); { { _x call BIS_fnc_itemType params[ "_itemType", "_itemSubType" ]; switch ( toUpper _itemType ) do { case "MINE"; case "MAGAZINE" : { _crate addMagazineCargoGlobal [ _x, selectRandom [2,3,4] ]; }; case "ITEM" : { if ( [ _x ] in _medical ) then { _crate addItemCargoGlobal [ _x, selectRandom [2,3,4] ]; }else{ _crate addItemCargoGlobal [ _x, 1 ]; }; }; case "WEAPON" : { _crate addWeaponCargoGlobal [ _x, 1 ]; }; case "EQUIPMENT" : { if ( _itemSubType == "backpack" ) then { _crate addBackpackCargoGlobal [ _x, 1 ]; }else{ _crate addItemCargoGlobal [ _x, 1 ]; }; }; }; }forEach _x; //[ _item, _mag( possible ) ] }forEach [ // INTENTION IS TO SELECT THE SPECIFIC GEAR FROM THE RANDOMED GEAR TYPE //select weighted ( _rifles, _mgs, _vests ) then again select weighted of result ( _rifles ) selectRandomWeighted selectRandomWeighted _gearRandom_1, selectRandomWeighted selectRandomWeighted _gearRandom_2 ]; }forEach +_crateLocs;
  14. As R3vo said it adds to the side score of the side that captured it. scoreSide . It even states this in the tooltip when you hover over the words 'Seize Reward' in the sector modules attributes.
  15. Using BIS' Sector UI

    Is this a custom sector Or a custom script to work on top of vanilla sectors? I would suggest to unpack ui_f.pbo and look at both the classes I mentioned above in the config.cpp as well as \ui_f\scripts\igui\rscmissionstatus.sqf. The script will provide you with a good overview of how to manipulate the ui's elements and create 3DIcons and what variables you have to conform to to get the system to work with custom sectors.
×