Jump to content

chronicsilence

Member
  • Content Count

    143
  • Joined

  • Last visited

  • Medals

Posts posted by chronicsilence


  1. I have a Darter that I'm giving a waypoint through scripting commands. I need the waypoint to be very precise (i.e. I need it to reach those coordinates exactly). I'm using the addWaypoint scripting command for this. I've noted that in the comments for that scripting page, it says "The waypoint may not be created exactly at the center position even if radius is zero. The position will be moved away if there are e.g. rocks at the center position or if it is placed at the edge of water on a shore." Since I'm using a UAV, I don't really care about rocks or water and I want it to just go to the proper waypoint. However, the game is adjusting the waypoint when I create it, by as much as 50 meters. Here's the code I'm using:

    _waypointPos = [3800, 13000, 30];_wp = (group _vehicle) addWaypoint [_waypointPos, 0];
    _wp setWaypointType "HOLD";
    _wp setWaypointCompletionRadius 0;
    _vehicle flyInHeight (_waypointPos select 2);
    But if I do that, and then run the following code:
    systemChat format["Actual waypoint pos: %1", waypointPosition _wp];
    it shows that the new waypoint has actually been set at [3779,12989,30]. I have tried everything I can think of to force it to the correct position, including setWaypointPosition, setWPPos, and trying different waypoint types other than "HOLD". Nothing seems to be working. Does anyone have an idea of how to force it to use the specified waypoint and not let it make any adjustments? I'm going crazy here.

  2. There are several ways you can do this.

     

    If you are not very good with editing files you can load the mission in the editor and delete the Blufor units and replace them as Opfor.

     

    If you are confident with editing files then you can edit the mission.sqm and replace this line:

    side="WEST";

     with this line:

    side="EAST"; 

    for each unit.

     

    Sorry, I think I didn't explain the question well enough. I'll start with saying that I'm very comfortable with the editing, so don't worry about that.

     

    - I have 10 playable BluFor units

    - I have 10 playable Independent units

    - I have 10 playable OpFor units

    - players need to be able to select any of the above units (any of the 3 sides)

    - there is no AI. If any of the playable units don't get filled by a player, they don't exist in the mission

    - when a player joins the server, they should default to OpFor, but must be able to choose a BluFor slot if they desire to

     

    So changing the unit's side in the editor won't help, because I still need the option to play as a unit on each side.


  3. The createDiarySubject script command can apparently take a third parameter, which is named "picture". I have tried giving paths to an image file for that parameter, but it doesn't seem to be doing anything. Does anyone know if it's possible to have an icon/picture next to a diary subject?

     

    Alternatively, does anyone know if it's possible to change the color of the font for a diary subject (not the entry, just the subject title)?


  4. I have a diary entry with some information, created with the createDiarySubject and createDiaryRecord commands. I know that you can open the entry using the createDiaryLink and processDiaryLink commands from within a script. My question is, is there any way to open a diary entry using a hyperlink or similar within a structuredText control? You can have hyperlinks that open websites, but can you have a hyperlink that either a) opens a diary entry directly, or b) executes a script when clicked, so I can manually open the diary entry from within the script?

     

    Thanks!


  5. Hey folks,

    I'm trying to attach a camera object to a UAV. Essentially, I need the camera to act like it's strapped very securely to the bottom of a Darter. I am currently using the following code to do this:

    _vehicle = createVehicle ["B_UAV_01_F", getMarkerPos "UAV_spawn", [], 10, "NONE"];
    createVehicleCrew _vehicle;
    _camera = "camera" camCreate [0,0,0];
    _camera attachTo [_vehicle, [0,0,-0.3]];
    _camera setVectorDirAndUp _cameraOrientation; // where _cameraOrientation is the direction I want the camera pointed relative to the front of the Darter

    This is working for the most part, but the camera doesn't seem to be attached very well. When I bank or pitch the Darter, the camera kind of wobbles around a bit and doesn't follow the motion of the Darter very precisely. Even if I just pitch the Darter straight up or straight down, the camera wobbles side to side. I'm trying to find a way to make it stick to the Darter more securely so this doesn't happen. I've seen some scripts that use a loop with camSetRelPos to keep the camera in the right relative position, but I would much rather use the attachTo script command so that the camera view changes properly when the UAV rolls and pitches. Any thoughts on how to do this?

    Thanks!


  6. I'm setting a waypoint for my UAV (Darter) via script, using

    _wp = group _vehicle addWaypoint [[_xCoord, _yCoord, _zCoord], 0];

    When it gets to the waypoint, I need the Darter to be facing a specific direction. I know I can do this instantaneously with setDir, but I'm trying to find a way to have the UAV gradually turn itself to face that direction. I've tried using setFormDir, but that didn't have much of an effect. Any thoughts on how to make the UAV do this?


  7. Hey everyone,

    I've been working with ARMA for a while but have yet to make a substantial contribution of community content, so I thought this would be a good first step.

    I've recently been using ARMA 3 as a research tool (simulator), and that work required some tools that didn't yet exist in ARMA. Specifically, manipulation of matricies and standardized representations of orientation. As you may know, ARMA uses a rather odd system for orientation of objects (vectorDirAndUp), and that system is not very compatible with standardized formats. BIS has offered a couple functions to convert orientations to/from the more standard Euler angles (roll, pitch, yaw) in the BIS_fnc_getPitchBank and BIS_fnc_setPitchBank functions, but as stated in the notes for BIS_fnc_getPitchBank, "The bank returned by this command is not fully accurate, it can be off by up to 5% or so (depending on pitch), due to an unknown bug." In addition, Euler angles have issues with singularities (which is why quaternions were developed), and that was not acceptable for my research work. So, I decided to develop a small library of functions to help with orientation representation. In order to do so, I also had to develop a couple functions for matrix manipulation. These functions should avoid any issues that the BIS functions have with accuracy, and in theory should be a perfect representation.

    In this package, there are three representations of orientations:

    1) the ARMA "vectorDirAndUp" representation

    2) Euler angle (roll-pitch-yaw) representation

    3) direction cosine matrix (DCM) (a.k.a "rotation matrix") representation

    The ARMA representation isn't good for much at all, but it's what we have to work with. Euler angles are great, intuitive, and easy to learn/understand, but have limitations with singularities at certain angles. DCMs are a bit trickier to understand, but are a standardized representation that have no limitations and can be converted into anything with well-defined equations.

    In this library, all matricies (2-dimensional arrays) are represented in the following format:

    [
    [r1c1, r1c2, r1c3],
    [r2c1, r2c2, r2c3],
    [r3c1, r3c2, r3c3]
    ]
    

    Where "r1" is "row 1" and "c1" is "column 1".

    This library contains the following functions:

    MOP_fnc_getDCM: this function will get the direction cosine matrix for a given object

    MOP_fnc_vectorDirAndUp2DCM: this function will covert a given vectorDir and vectorUp to a DCM

    MOP_fnc_DCM2vectorDirAndUp: this function will convert a given DCM to a vectorDir and vectorUp

    MOP_fnc_DCM2RPY*: this function will convert a given DCM to an array of Euler angles [roll,pitch,yaw]

    MOP_fnc_RPY2DCM*: this function will convert a given array of Euler angles [roll,pitch,yaw] to a DCM

    MOP_matrixMultiply: this function will multiply two given matricies

    MOP_matrixTranspose: this function will return the transpose of the given matrix

    *Note: several of these functions (those marked by an asterisk) have an additional boolean parameter to determine if the Euler angles (roll-pitch-yaw) should be in degrees or radians.

    To get the current roll/pitch/yaw of your current vehicle, you might use a script that looks like this:

    _vehicle = vehicle player;
    _DCM = [_vehicle] call MOP_fnc_getDCM;
    _RPY = [_DCM] call MOP_fnc_DCM2RPY;
    hint format["Roll: %1, Pitch: %2, Yaw: %3", _RPY select 0, _RPY select 1, _RPY select 2]; 

    If you want to set your current vehicle to +5 degrees roll, you might do:

    _RPY = [5,0,0,false]; // false is to specify degrees, not radians (optional parameter that defaults to false)
    _DCM = [_RPY] call MOP_fnc_RPY2DCM;
    _vectorDirAndUp = [_DCM] call MOP_fnc_DCM2vectorDirAndUp;
    (vehicle player) setVectorDirAndUp _vectorDirAndUp;
    

    I have also included a description.ext file which has content that must be added to your description.ext in order for these functions to be recognized by the game.

    I have found this library to be invaluable for my work, but obviously it will be of very limited use to the casual scripter/missionmaker. If there's any community interest in this, I might add more mathematical functions that aren't currently available. So, if you have a request, post it here!

    Also, please let me know if there are any bugs/issues with getting these functions installed and I'll see if I can make it easier.

    Armaholic page: http://www.armaholic.com/page.php?id=29127

    • Like 3

  8. Consider a UAV, flying through the air. I need to find the roll, pitch, and yaw of this aircraft. Unfortunately, BIS's vectorDir and vectorUp commands do not make this easy. I noticed that there was a very handy function posted on the BIS_fnc_setPitchBank page in the comments that allows you to sett the roll-pitch-yaw of an aircraft, but does anyone know of a way to get the orientation of an aircraft in that format?

    Thanks!


  9. I'm having a bit of an issue here. Through the "keyDown" and "mouseButtonDown" handlers I can capture keystrokes and mouse clicks, but is there any way to capture input from other game controllers like a joystick? The User Interface Event Handlers page lists a "onJoystickButton" handler, but also says it's not in ARMA 3 (I tried it, no luck). Is there any way anyone knows of for having a handler of some sort fire when a joystick input is given?


  10. Just a quick question for you guys. I'm running on a very powerful computer, and the game runs great at Ultra settings. Ok. Now, I have several PiP views up at once (4), and each one shows the view from a camera I attached to a UAV. My question is, does anyone know of any methods for improving the framerate and/or resolution of the PiP displays? I cranked the "PiP" video setting up to Ultra, but didn't notice much of a difference. Any tips or tricks would be greatly appreciated.


  11. I'm relatively new to using the camera scripts, so a little help with this would be great. I'm trying to create a "Dashcam" on a vehicle. I would like to attach the camera to the front of the vehicle, and have it so it doesn't have a target but always just aims the way the vehicle is pointing. Is it possible to attach a camera to an object without giving it a target? If so, what "mode" would I use for the cameraEffect?

    Thanks!


  12. Hello,

    Is anyone here familiar with a mod for automatically capturing video/screenshots from the game and saving them? Specifically, I need to record a "liveFeed" that shows up on a dialog control on the player's screen.

    I know you could use screen capture software for it, but I would prefer a more integrated solution that can start/stop based on in-game script commands.

    Thanks!


  13. Hey folks,

    I'm trying to figure out how to make a live feed from a UAV appear on a control in a dialog. I know you can add live feeds to objects through the BIS_fnc_liveFeedModuleXXX functions, but how can you add it to a dialog control? Basically I need the feed to always be in the same position on the player's screen.

    I know this is possible because the MCC Sandbox has this feature, but I cannot find any way to do it through info on the wiki.

    Thanks!


  14. I don't get it OP. You want to immediately respawn and THEN have respawn menu shown? What would be the point if you have already respawned? Because 0 respawn means exactly that, immediate respawn.

    No, I don't want the player to respawn at all until he clicks the respawn button on the respawn menu. But, I want that respawn button to be available immediately, instead of having a count-down timer to when its available.

×