Jump to content

lawman_actual

Member
  • Content Count

    258
  • Joined

  • Last visited

  • Medals

Everything posted by lawman_actual

  1. Hi Johnny My apologies. When I went to post this originally my browser messed up and ended up going back by accident I was under the impression it had not posted the first time so I posted again (thinking I was doing so for the first time) Thanks for bringing this to my attention. Also thank you for the script you provided. It looks great and when i get around to testing it I'm sure it will prove incredibly useful
  2. Hey all. Fairly simple request but I can't see how to do it right now. I need a way to execute some code any time ANY blueFor unit enters or exits an area regardless of if there's one already in it. Currently I have a trigger placed to fire on bluFor present with act and deact, but this only fires for the first unit to enter or the last unit to leave.
  3. Hey I need a way to fire a trigger any time ANY blueFor unit enters or exits an area regardless of if there's one already in it. And of course the reverse for opFor. I've just spent a while modifying my scripts to run on the basis that a variable gets +1 each time a US unit enters the area, or -1 each time CSAT enter the area. Similarly, each time a US unit leaves the area, it gets -1, and each time CSAT leave it gets +1. So in the end, when there are no units present the variable is neutral (at 0). When there are more US units it will be positive (the number reflective the number of units) and the opposite for CSAT. Trouble is, I then went back to the game and remembered that my triggers don't work like that. Oops.
  4. As I'm sure I'm not the only one to discover, the flares under cfg_ammo could barely illuminate a shed, let alone a battlefield. I can just about achieve some useful diffuse illumination by creating 20 flares where my single flare is supposed to be, but it kills me a little bit inside every time I use such a crude by-pass. So I'm wondering if there's a way of creating a custom light effect. Perhaps modifying the parameters of the existing flare? I have absolutely zero experience creating objects and effects myself...I'm just a scripter! But something tells me there much be a way. I saw a nuke on the workshop recently, and if someone can create that then surely you must be able to make a half decent flare somehow. Any help much appreciated.
  5. lawman_actual

    Create brighter flare effect?

    Worked a beut, thanks Larrow!
  6. Excellent, thanks again Panda This nicely bypasses the arty module, which is perfect except for one useful feature I wanted from it.... If you decide to spawn shells rather than track from start to finish you can manually set the spread. My GUI has a field for spread (tight, scattered or normal - like in operation flashpoint dragon rising) so I kind of wanted to play with this. I think it would be cool to be able to select different spreads for different applications. I could toy with applying a modifier that "wobbles" the target position by a random bearing and set distance for different scatterings, but the most accurate you could get would be standard fire on a fixed point. I have a feeling that over large distances this might not feel very "tight", even if it is realistic.... Any thoughts on If I wanted to make the fire of real units slightly (but not too) more accurate? ________________________________________________________________________________________________ EDIT: having field tested a Mk6 mortar, perhaps the standard could be considered close enough. I will think on this I'd still like to hear your thoughts though if there may be a way to alter accuracy
  7. Hello I am trying to understand how to get a virtual artillery battery to fire on a designated position. I've read through the biki page on artillery modules but it all seems to relate to Arma 2. When I attempted to follow the example in Arma 3 I just got "undefined variable" errors for the functions mentioned (such as BIS_ARTY_F_ExecuteTemplateMission) The following I have trialled with a virtual support provider module: //Arty test _heTemplate = ["IMMEDIATE", "HE", 0, 15]; _targetPos = getPosASL target1; ["arty1", _targetPos, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission; player sideChat "Requesting firemission."; But again...undefined variable. Problems I have encountered: 1) Can't find a list of arty related functions in the functions viewer. 2) No idea how to find out what to type in the "vehicle types" field of the virtual module. I tried a simple "MLRS" but it said undefined.... General advice on how to proceed welcome. Failing this I'm thinking of spawning in the shells myself without the Arty module.
  8. Ah, thanks MagicPanda (amazing name). This sort of example is what I needed, but couldn't seem to find. I'm exhausted now but I'll be sure to analyse it in detail over the next few days and see if I can get this thing rolling.
  9. Afternoon I'm curious about where the guided element comes in with a "Guided" shell. (Please note I'm not referring to laser guided here) I don't see any facility to set a GPS location or anything. Is it simply that the shell hits the specified target location with greater accuracy?
  10. lawman_actual

    Fine tuning Support Request GUI

    Thanks very much Entity. I've made some modifications to suit my application a little better: if (thisIdc == 1400) then { //only run if the correct control is edited _string = ctrlText 1400; _number = parseNumber _string; //parse into number _string = str _number; //turn back into string, but a leading zero should be added in the event that the player did not have one. eg. ".1" should now be "0.1" _output = "Invalid coordinate."; if ([".", _string, false] call BIS_fnc_inString) then {} else {textDecimal = 0; textInteger = _string; _string = (format ["%1.%2",textInteger,textDecimal]);}; //correction if no decimal is entered _split = [_string, "."] call BIS_fnc_splitString; textInteger = +_split select 0; //re-obtain integer textDecimal = +_split select 1; //re-obtain decimal if ((count (format["%1",textInteger])) > 3) then { //hint "Integer piece too long."; ctrlSetText [1400, (format["%1",lastGoodEntry])]; } else { player sideChat (format ["%1",textDecimal]); if ((count (format ["%1",textDecimal])) > 1) then { ctrlSetText [1400, (format["%1",lastGoodEntry])]; } else { lastGoodEntry = _string; }; }; }; ///END OF TEXT CHECKER Now it stores your 'last good entry' as a variable and auto-corrects if you exceed the integer or decimal limit as you type. Since this is fired each time a readable character is typed in the Idc, it should correct to the last thing you entered before breaching the limit. Also I have converted some local variables to global because I was encountering "undefined variable" errors and got fed up trying to make it work with locals. Lazy scripting perhaps, but it works....for now. The only remaining problem (aside from still not knowing how to hide the radio channels) is that 0 isn't being picked up in the length checking. For example: If i enter 123.45 it is corrected to 123.4 But if I enter 123.04, the 0 isn't picked up and for some reason it allows it. I can't spot why this might be at the moment
  11. Greetings Nearly finished building a UI for requesting various fire missions and so fourth. I still haven't figured out the following: 1) How can I close the radio channel menu after the dialog is called? Pretty simple; the dialog is called via radio alpha. Trouble is, while it is being displayed you can still see the menu for selecting different radio channels. I'd rather this wasn't the case. 2) How can I limit user input within an rscEdit control? Ideally I want the user to only ever be able to enter (for example) a maximum of 4 digits (5 characters): e.g. 123.4 But those 5 characters can't be 1234 or 1.234 or 12.34 etc. Only ever 1 character after the decimal point, but anything up to 3 before I could achieve this more easily by splitting up the whole and half digits, but I really don't want to. It would look ghastly. Thanks in advance. Lawman
  12. Greetings I'm creating a GUI for calling support/fire missions and I have a field for selecting the number of rounds fired in artillery or air strikes. Previously this was a simple combo box, but it would look a lot better if this was a slider* (I haven't yet figured out how to upload a picture on here) I've successfully created a default slider, but I haven't yet found out how to set the number of 'ticks', or what these correspond to. For example; Suppose you choose MLRS from a combo; I would want five increments on the scale corresponding to: [1,2,4,8,12]; If you chose an air strike using Hydra 70 rockets however, I would only want three increments, corresponding to [7,14,28]; There are some examples I only want 1 option (i.e. with a 1000lb JDAM strike), but I guess I can 'grey out' the slider and make it have no effect in these cases. Thanks in advance, Lawman *I'm assuming here that a slider is a scale of options, rather than a scroll bar. Although weirdly the biki suggests that "slider" and "scroll bar" are synonymous, even though to me the rscSlider looks more like a way of selecting a scale of options
  13. lawman_actual

    Dynamic numbered Rsc Slider

    Other points: - How might I go about 'hiding' the slider in cases where it's not relevant? - How can I change the value of an rscText control when the slider is set to certain values?
  14. lawman_actual

    Dynamic numbered Rsc Slider

    Thanks very much!
  15. Hey world I've been attempting to get my head around creating a user interface for a couple of days now and I just haven't managed it yet. The two resources I've mostly drawn upon are: Kilzone Kid's website tutorials: http://killzonekid.com/arma-scripting-tutorials-gui-part-1/ And this here YouTube video: https://www.youtube.com/watch?v=x3wqgJ1JncY As I understand it I am looking for a dialogue, rather than a resource - as I want users to be able to click on stuff to make stuff happen. Sadly, Killzone's (better) tutorial is aimed more at resources, although to be honest I've had difficulty making either method work. So here's my questions: 1. H8ermaker uses a 'defines.hpp' to define some stuff. What do I need to put in here? My current attempts have just copied presets from the cfg viewer but I have also tried just a straight copy/paste from a standard example 2. What do I then need to include in the dialogues file (dialogues.hpp in the video)? When I took data straight from the GUI builder I was given errors along the lines of "no background colour defined" When I tried to add fields to "more fully define" my frames etc. I was given errors like "shadow already defined" 3. Can someone please explain rsc Titles a bit more? Am I right in thinking these don't apply when using the dialogue method like H8ermaker does? 4. General advice on the process of creating dialogues much appreciated. Thanks a bunch; this one's not making much sense to me right now. - Lawman
  16. lawman_actual

    Help: Basics of GUI building

    Still searching for help with (1) and (2) please!
  17. lawman_actual

    Help: Basics of GUI building

    Solved (3) :) In case future viewers need the solution: onLBSelChanged = "if ((_this select 1) == 0) then {player sideChat ""Air Strike""} else {if ((_this select 1)==1) then {player sideChat ""Artillery""} else {player sideChat ""CAS""}}";
  18. lawman_actual

    Help: Basics of GUI building

    Three queries remaining: 1) How can I limit the format that the player can type into an edit control? I want them to only be able to input a number in the format xxx.x (e.g. 125.5 is ok but 1250 is not, and neither is 125.50) 2) How can I close the radio menu when the dialog is opened? At the moment the player calls the dialog via radio alpha, but the radio channel selection menu remains open while they select their options. 3) How can I change the content of another control when an option in a combo box is chosen. At the moment I'm experimenting with the following: onLBSelChanged = "if ((_this select 1) == 0)then{call hint ""Air Strike""} else {call """"}"; But I can't seem to get the if/then/else working in this scripting language. Once I have 1 working I then need to find a way of calling multiple lines of code so I can have: if (_this select 0) == 0 then.... else.... if (_this select 0) == 1 then.... else.... if (_this select 0) == 2 then.... else.... It don't think I'm correctly incorporating sqf language in this .hpp file though...
  19. lawman_actual

    Help: Basics of GUI building

    Update: It works! The problems with size and position not behaving as expected seemed to be for rscPicture only. I experimented with changing the object to header and set the rgba and it positioned and sized itself exactly as I expected. 10 minutes of tweaking later and it's exactly as I wanted it. Not ideal if I do need a picture, but it will do for the background I wanted. Thanks to all for your contributions. Your advise made it much easier to finish my GUI once I had figured out how to get controls into the size and position I wanted. Now just to write the scripts for the buttons and I'm done :D
  20. lawman_actual

    Help: Basics of GUI building

    @Entity: Thanks for the reminder about getResolution. I'll be checking that out tonight now I know a little more about defining dialogs @Austin: Pleased to hear it's not just me misunderstanding something! How would I use an .sqf for this? Previously I've been modifying the exported script from the in-game GUI editor within dialogs.hpp Also, is there a bug-report I can up-vote for the defined dialog controls not acting as expected (with respect to defining size in particular)? Thanks again for your help Lawman
  21. lawman_actual

    Help: Basics of GUI building

    This is hopeless. The fields don't seem to determine size by however they damn feel like it. I spent hours getting the width of a picture the correct width but then as soon as I try and make it the right height everything changes! It gets thinner, shifts position. Width and Height also seem to move it's position. But you lot all make it sound so easy! X is X Y is Y Width is W and Height is H. SO WHY DOESN'T MINE DO THAT?!?! Is it possible my grid is messed up?
  22. lawman_actual

    Help: Basics of GUI building

    Also; how come the size and position of objects changes sometimes when copy code straight out the GUI editor? I spent hours last night trying to resize a picture back to the full height of the GUI grid and it never seemed to get any bigger no matter what number I put in
  23. lawman_actual

    Help: Basics of GUI building

    Alright, I'm getting better at this. What's the best format to define the position and height/width of objects? The script I pulled out the in-game editor was in the format: idc = 1200; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 10 * GUI_GRID_W + GUI_GRID_X; y = 0 * GUI_GRID_H + GUI_GRID_Y; w = 19 * GUI_GRID_W; h = 25 * GUI_GRID_H; colorText[] = {0,0,0,0.35}; colorBackground[] = {1,1,1,0.35}; colorActive[] = {1,1,1,0.35}; Whereas the defines Kingsley gave me is just numbers. Then there's Wiggum who seems to be defining the size relative to screen resolution (?) What's easiest?
  24. lawman_actual

    Help: Basics of GUI building

    Ok, so I'm trying to make a button with smaller text than usual. From the in-game editor I figured that "sizeex" controlledtext size, but changing this seems to have no effect on my button, even though it does on controls exported from the editor. What am I doing wrong? class button_myPos: RscButton { idc = 1600; text = "Use Current Position"; //--- ToDo: Localize; sizeEx = 0.05 * safezoneH; x = 0.5 * safezoneW + safezoneX; y = 0.566 * safezoneH + safezoneY; w = 0.0876563 * safezoneW; h = 0.05 * safezoneH; colorBackground[] = {0,0,0,0.35}; colorActive[] = {-1,-1,-1,0.5}; };
  25. lawman_actual

    Help: Basics of GUI building

    Well I'm slowly adding items 1 by 1 and they seem to be working fine. I have a feeling the descriptions file I copied had a flaw somewhere, so thank you for yours Kingsley One small, very stupid thing I haven't been able to find. How do I close the radio trigger menu when the dialog is opened?
×