Jump to content

igneous01

Member
  • Content Count

    924
  • Joined

  • Last visited

  • Medals

Community Reputation

19 Good

1 Follower

About igneous01

  • Rank
    First Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm trying to revive a script that someone wrote in the mod section to allow the AI gunner in a helicopter to follow where the pilot player is looking. It used to work by creating a laser target, setting the gunner to target it via commandTarget, and then update the laser target position every few ms based on where the player is looking. The problem I've run into now is that when the player is in the driver/pilot seat of the helicopter, the gunner wont target anything. If the player leaves the helicopter, the gunner will target the laser. When the player jumps back in, he stops targeting. I've tried various things: - making gunner group leader - making gunner join another group - making the gunner captive - disableAI "ALL" on gunner - doWatch - doTarget - commandWatch Nothing works - I don't know if this is a bug with vehicles, but I cant get the gunner to target anything when I am inside the vehicle. Has anyone had any luck with getting this to work?
  2. Both of these methods do not work anymore. The first one doesn't do anything, and the second one causes the engine to shut off and crash into the ground. I tweaked this to make another version that does work (I can control the turret) but it's not possible to change weapons while controlling the turret (and it seems random what weapon is selected) - so it seems like there's no reliable way of getting this to work today at all. CH_fnc_controlGun = { _heli = vehicle player; _gunner = gunner _heli; player remoteControl _gunner; _heli switchCamera "GUNNER"; waitUntil {cameraView != "GUNNER"}; objNull remoteControl _gunner; };
  3. It's been a while since I last played Arma - before the Helicopters DLC at least. It's great to see the improvements made in the flight model with things like VRS and Overspeeding the rotors. But one thing I am dumbfounded by is the lack of being able to manually guide a Scalpel ATGM on a target. I understand that it requires another weapon lasing (or IR lock) but it's really unfortunate the gunner can't manually guide the missile. It would be nice to be able to do popup attacks on AA targets at a distance where you still have enough time to maneuver back into cover, but without a way to manually guide it in that makes all modern helicopter tactics unusable. Now I know most people will say that AA will always have the advantage in range, but that doesn't mean it's impossible to kill an AA unit. For example, in DCS Black Shark, the SA-8 OSA has an effective range of 10km, with the Ka-50 effective range for the Vikhr ATGM at about 7.2 - 7.5 km - even though the SA-8 has nearly 3km more range than the Ka-50, with proper positioning the Ka-50 can popup behind a mountain, fire off a missile, and destroy the SA-8 at about the same time the SA-8 has fired it's missile (now because the SA-8 is destroyed the missile goes ballistic because the radar is no longer actively tracking, but that's another story). All AAA weapons like the Shilka are outranged by the KA-50 because it's maximum AAA range is 4km. So it's not unrealistic for an attack helicopter to face against AAA or light Radar SAM platform. Obviously heavy duty SAMs like the BUK and S-300 will always win against an Attack Helo, but for lighter SAM threats (such as what's portrayed in Arma) can totally be handled by an attack pilot with enough skill. This is a bit off topic - but the possibility of adding in HARM (Homing Anti-Radiation Missiles) missiles would be great - some models of attack helicopters have been known to carry light to medium range HARMs in a SEAD role.
  4. igneous01

    Rsc Text

    If you want to change the position where the text is rendered, you need to use the 'style' property: // basic styles, generated through gui editor #define ST_POS 0x0F #define ST_HPOS 0x03 #define ST_VPOS 0x0C #define ST_LEFT 0x00 // Left aligned text #define ST_RIGHT 0x01 // Right aligned text #define ST_CENTER 0x02 // Center aligned text #define ST_DOWN 0x04 #define ST_UP 0x08 #define ST_VCENTER 0x0C #define ST_TYPE 0xF0 #define ST_SINGLE 0x00 // Single line textbox #define ST_MULTI 0x10 // Multi-line textbox (text will wrap, and newline character can be used). There is no scrollbar, but mouse wheel/arrows can scroll it. Control will be outlined with a line (color = text color). #define ST_TITLE_BAR 0x20 // Light gray background with 3D border #define ST_PICTURE 0x30 // 'Text' property is interpreted as an image path. class myText { style = ST_LEFT + ST_MULTI; // Text overflow will go to a new line }; class myCenterAlignedText { style = ST_CENTER + ST_MULTI; }; class myCenterBottomText { style = ST_DOWN + ST_MULTI; }; class myCenterTopText { style = ST_UP + ST_MULTI; }; The above code only shows the property you need to change - you still need to have the other properties set up in your text class for it to render properly. If you want to be able to format individual lines inside of a single text field, then you need to use a structured text class, not a text class: class ignStructuredText : ignBase { type = CT_STRUCTURED_TEXT; style = ST_UP + ST_MULTI; size = 1; }; afterwards in the .sqf for your dialog, you can format the text as html and use parseText: https://community.bistudio.com/wiki/parseText ^ this link above explains how you can change color, font size, etc using structured text.
  5. One of the winners of MANW took my mission, all the scripts inside it, then simply replaced the helicopters with UN helicopters, and presto.
  6. As Serena mentioned, those commands will help control individual targets. As for calculating accuracy, if the targets your using have selection support in the hitpart event, you can easily determine if the shot was accurate. Otherwise do what bis did in the COF - create gamelogics and attach them to the target spots, then on hitpart you can compare the hit position distance to the game logic.
  7. I'm a bit confused about the benefits of using missionConfigFile. On the one hand it is a nice place to define constants and paths to resources, but on the other config lookups are relatively slow compared to a global variable already in memory. If I have a bunch of constants that are being referenced (say on fired handler/hit handler/onEachFrame) does it make sense to even use missionConfig for this purpose?
  8. igneous01

    CQB Training

    Which changelog was this from?
  9. igneous01

    CQB Training

    Careful with this if you are using any railings for moving targets - they are also part of the "TargetBase" family. Interestingly enough, the swivel targets do not use "TargetBase" as a parent, so you need to get those through one of the parents.
  10. Do you have any mods installed that may be interfering? Do you have any other scripts running (like maybe an incognito/stealth script) that may be interfering with side alliances? It sounds like a 'fired' handler is changing the friendliness of resistance and altering the behavior you see in your script. Have you tried running just this code in an isolated test case? Another thing comes to mind - are the ai fleeing / surrendering? I believe that when ai are captive they change sides. It would be a good idea to check if the ai is not your captive / is fleeing / is surrendered
  11. igneous01

    while loop

    Recommend this wiki entry from BISim: https://resources.bisimulations.com/wiki/Script_Interruption In VBS case, spawn/execVM is threaded, and they have a command noInterrupt as a mutex to synchronize data access. It's probably the case for Arma as well.
  12. What you posted does not apply to my problem. Ok seriously, whats with the toxicity here? I remember this community was A LOT more well behaved than it is now. I was not expecting to be insulted and treated as incompetent when asking some questions (and the fact that you tried to insult me as being wrong about the single quotes is ridiculous - have you even tested this yourself?) Yes, I did try your original code, it worked, but it wasn't the problem or the use case I was describing. Don't be a hypocrite about not trying your code when you havn't even bothered testing what I deem as a bug in the parser. I think it's best we leave this thread here. There is nothing more to be said besides insults at this point. I'll say thanks for the brainstorming as it gave me an idea for working around this, but I am absolutely disgusted with your behavior.
  13. The script doesn't return true, it's meant to call handlers registered to my events. Although I suppose the workaround is to pass it as an argument to the function and return true if something is passed in. I think I'll just do that instead - thanks for the idea. Yes I did - same problem: #define MYMACRO(SCRIPT) \ onCanDestroy = ['IGN_Event_onCanDestroy', [ctrlParent (_this select 0), _this select 0, _this select 1]] execVM SCRIPT; true // Base control class class ignBase { access = 0; idc = -1; x = 0.5; y = 0.5; w = 0.2; h = 0.2; moving = IGN_DLG_Template_ControlMoving; font = IGN_DLG_Template_Font; sizeEx = IGN_DLG_Template_FontSize; colorText[] = IGN_DLG_Template_ColorText; colorBackground[] = IGN_DLG_Template_ColorBackground; text = ""; shadow = IGN_DLG_Template_Shadow; size = 1; // based on defaults provided in rscText tooltipColorText[] = IGN_DLG_Template_ToolTipColorText; tooltipColorBox[] = IGN_DLG_Template_ToolTipColorBox; tooltipColorShade[] = IGN_DLG_Template_ToolTipColorShade; // Events - all controls implement these two events MYMACRO("scripted\IGN_DLG\internal\IGN_DLG_raiseEvent.sqf"); // true is a new definition, not treated as part of same code.
  14. I made a typo with my example above try this in description.ext and you'll see what I mean: class myControl { onCanDestroy = '[] execVM ''Somescript.sqf''; true;'; }; // or class myControl { onCanDestroy = '[] execVM "Somescript.sqf"; true;'; }; This will not properly compile, it will think that true is a new property you are defining for the control. This is what you'll see when you do this: http://steamcommunity.com/sharedfiles/filedetails/?id=867939804 That was a typo - I'll correct it in my comment (should be execVM) I can get that working using the following as well: #define IGN_DLG_DIR scripted\IGN_DLG\internal\IGN_DLG_raiseEvent.sqf #define ctrlOnButtonClick \ onButtonClick = '[''IGN_Event_onButtonClick'', [ctrlParent (_this select 0), _this select 0]] execVM ''IGN_DLG_DIR''' The problem is when I need to add additional statements using ';' (such as returning true onCanDestroy) I had this, and it was not working: #define IGN_DLG_DIR scripted\IGN_DLG\internal\IGN_DLG_raiseEvent.sqf #define ctrlOnCanDestroy \ onCanDestroy = '[''IGN_Event_onCanDestroy'', [ctrlParent (_this select 0), _this select 0, _this select 1]] execVM ''IGN_DLG_DIR''; true;' class ignBase { access = 0; idc = -1; x = 0.5; y = 0.5; w = 0.2; h = 0.2; moving = IGN_DLG_Template_ControlMoving; font = IGN_DLG_Template_Font; sizeEx = IGN_DLG_Template_FontSize; colorText[] = IGN_DLG_Template_ColorText; colorBackground[] = IGN_DLG_Template_ColorBackground; text = ""; shadow = IGN_DLG_Template_Shadow; size = 1; // based on defaults provided in rscText tooltipColorText[] = IGN_DLG_Template_ToolTipColorText; tooltipColorBox[] = IGN_DLG_Template_ToolTipColorBox; tooltipColorShade[] = IGN_DLG_Template_ToolTipColorShade; // Events - all controls implement these events ctrlOnCanDestroy; // error here - ignBase.True missing definition };
×