

mrflay
Member-
Content Count
117 -
Joined
-
Last visited
-
Medals
-
Medals
-
Everything posted by mrflay
-
Request for very simple invisible model for AI suppression testing
mrflay replied to tpw's topic in ARMA 3 - MODELLING - (O2)
Not sure if it's a good idea, but this might work... https://github.com/mrflay/FLAY_FireGeom/ Example: _firegeo = "FLAY_FireGeom" createVehicle [0,0,0]; _firegeo attachTo [opfordude, [0,0,0]]; // _firegeo setObjectTexture [0, "#(argb,8,8,3)color(1,0,0,0.2,CA)"]; // <-- this makes the geometry visible I just noticed that there is an issue with deflections when hitting the geometry at an sharp angle... will have to look at that some more. -
Some suggestions... 1. The image size needs to be a power of 2, so change it to 64x64, 128x128, or 256x256. 2. Make the target white in the image. 3. Follow the BIS filename convention, eg. TargetGreen_ca.paa.
-
ArmA 3 Beta Editor - Help - How To Make An Alarm That Is In A Certain Position
mrflay replied to natanbrody's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can also try: Create new trigger with activation "BLUFOR" Click "Effects" button in trigger config (next to the "OK" button) Select "Alarm" in the Trigger dropdown list. Custom sounds can be added by editing description.ext. Eg. // description.ext class CfgSfx { class FOO_MyAlarm { sounds[] = {"sound1"}; name = "My Alarm"; sound1[] = {"sfx\myalarm.ogg",1.0,1,400,1,0.0,0.0,0.0}; empty[] = {"",0,0,0,0,0,0,0}; }; }; Provided myalarm.ogg is placed under "sfx" folder in mission folder. -
Fluid Door/Hatch Opening
mrflay replied to Sniperwolf572's topic in ARMA 3 - ADDONS & MODS: COMPLETE
There's a gesture for it... player playAction "PutDown"; Lean and clean addon, very nice! :) A couple of things I would like to add to it: The handle being pulled down before the door is opened. The door makes a sound if it is opened too quickly. Imagine hiding in a room anxiously watching the door, hearing foot steps outside, and then you see the handle turn... :) -
I think the Roadway LOD is still needed for infantry units. Walking straight on the geolod is glitchy, usually.
-
The model is probably missing a component in the geometry LOD for the ramp (or it's too thin). I don't think the Roadway LOD is used for physX enabled vehicles.
-
Also you may need to add simulation type in cfgvehicles. Eg. simulation="aircraft"; // or "airplane" To get it moving.
-
Finding Player Position Relative To Vehicle
mrflay replied to Mr_B_A_Baracus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Perhaps overkill, but you can use selectionPosition to get the position of memory points in model. Eg. _vehicle = ...; _memPointDriver = getText (configFile >> "cfgVehicles" >> _vehicle >> "memoryPointsGetInDriver"); // typically "pos driver"; _modelPos = _vehicle selectionPosition _memPointDriver; _worldPos = _vehicle modelToWorld _modelPos; These work as well: memoryPointsGetInDriver // typically "pos driver" memoryPointsGetInDriverDir // typically "pos driver dir" memoryPointsGetInGunner // typically "pos gunner" memoryPointsGetInGunnerDir // typically "pos gunner dir" -
I don't know if there's a way to fix this using the UI, but it is possible to fix this by editing the Arma3Profile manually. Close arma. Open your Arma3Profile file in a text editor. This file can be found under C:\Users\<USERNAME>\Documents\Arma 3\ or C:\Users\<USERNAME>\Documents\Arma 3 - Other Profiles\<USERNAME>\ if you have made a new profile. Find the following entries: keyHeliForward[]={17,200,1048579}; keyHeliFastForward[]={18}; And replace them with these: keyHeliForward[]={200,1048579}; keyHeliFastForward[]={}; Save and start Arma 3. Now you can bind controls to 'E' and 'Q' without having issues with the chopper pitching forward.
-
This looks awesome! Love the video, thanks for sharing! :D
-
Added stable branch version. archery_fetish_mod_alpha.zip (stable branch / alpha only) Note that this version has some issues with inventory that are not present in the beta version. Sorry about that! I'll look into adding CBA_XEH support in next update. Hopefully, that'll make things easier to use.
-
Cool, thanks! I just tested it in multiplayer by copying the single player mission to my MP mission folder and it seemed to be working. You need to add a GameLogic with the name "gamelogic" in order to use the Far Cry style of firing, though. I will try to fix this in an update so you don't have to add these things manually. The animations in use now are more or less sloppy placeholders. I haven't taken the time to do them properly yet, but I'll look into it soon. The removePrimaryWeaponItem is new for dev (beta) branch. It used to be call removeItemFromPrimaryWeapon in the stable (alpha) branch. I should have uploaded a version that works with stable branch, but forgot. I'll try to put one up soon. Correct. I'm using a tracer model because it makes it easier to see the trajectory. It's easy to change it to an arrow, as you said. I'll look into it for the next update. Thanks everyone for the feedback!
-
Ok, I've uploaded a test version of the mod on my dropbox (see link below). I would really appreciate some feedback on how it feels (forget how it looks for now). There's currently three different ways to load and fire the bow, which one would you prefer? Alt 1 (Far Cry): Press 'R' to load an arrow from the backpack or quiver. Press and hold the 'Fire' button to draw the bow. Release the 'Fire' button to release the arrow (press 'R' to abort). Alt 2 (Arma:ish): Press 'R' to load an arrow from the backpack or quiver. Press 'R' to draw the bow. Press 'Fire' to release the arrow (press 'R' to abort). Alt 3 (Mouse): Scroll down to load an arrow from the backpack or quiver. Scroll down to draw the bow. Press 'Fire' to release the arrow (scroll up to abort). Keys R: If the bow is empty, load an arrow from the backpack or quiver. If the bow is loaded, draws the bow. Shift+R: If the bow is loaded, unloads the arrow and puts it in either backpack or quiver. If bow is drawn, undraws the bow. If the bow is empty, switches between loading arrows from backpack or quiver. F: To switch between loading from backpack or quiver (bow must be empty). Scroll Down: Load an arrow (if bow is empty) or draw the bow (if bow is loaded). Scroll Up: Unload arrow (if bow is loaded), Undraw the bow (if bow is drawn), or Switch between loading from backpack or quiver (if bow is empty). Known Issues Order of inventory items is changed every time something is changed on the bow. Ammo count for quiver always shows 0. Magazine is not shown in inventory when bow quiver is selected. Cannot change magazine / arrow points when quiver is selected. Scope cannot be used while the bow is drawn. The target indicator is huge when interface size options is not set to "small". Download archery_fetish_mod.zip
-
Short status update. I'm almost finished with the rewrite and I'm pretty happy with how it works now. Instead of a single bow there's now one bow per state (i.e. empty, loaded, drawn). This made it a lot easier to manage states and it is far less glitchy now. The only important thing missing right now is the bow mounted quiver, but hopefully it should not be that difficult to make it work with the new implementation. Anyways, there probably be an alpha test very soon (today or tomorrow depending on the quiver).
-
Handling joystick/controller input events
mrflay posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hi, I'm wondering how to properly handle joystick/controller events from within a script. I would like to know when (for example) the player presses the "Forward" button and then handle/override the action with my own custom behavior. This is for a hang gliding mod I'm working on. When the glider is on the ground and the player pushes "Forward", I need to trigger an animation and update the velocity to make it look like the player is carrying the glider. I've got this working reasonably with keyboard input (see below), but I'm not sure how to support joystick or controller input (I don't own either a joystick or a controller). // fn_ground.sqf ... _KeyDownHandlerId = (findDisplay 46) displayAddEventHandler ["KeyDown","_this call FLAY_HangGlider_EH_GroundKeyDown"]; // ev_groundKeyDown.sqf ... _up = actionKeys "MoveForward"; _speedWalk = 2; _speedRun = 6.5; _maxSpeed = _speedWalk; if (_running) then { _maxSpeed = _speedRun; }; if (_key in _up) then { _anim = "AmovPercMwlkSnonWnonDf"; if (_running) then { _anim = "AmovPercMrunSnonWnonDf"; }; if (animationState player != _anim and _speed > 0) then { player playMoveNow _anim; }; _k = 0.2; if (_speed < 1.0) then { _k = 1.0; }; if (_speed > _maxSpeed) then { _k = 0; }; _glider setVelocity [(_v select 0) + _k * (_dir select 0), (_v select 1) + _k * (_dir select 1), (_v select 2) + _k * (_dir select 2)]; _handled=true; }; I'm assuming I should register joystickButton event handler, but how do I know when the button mapped to the "Forward" action is pressed? -
Was the removeItemFromPrimaryWeapon scripting command renamed to removePrimaryWeaponItem in the latest dev build? I didn't see it mentioned in the changelog. It's a good thing nonetheless.
-
Sorry for the lack of updates. I've come to ways end with the current implementation and are looking into other (less hacky) ways to make the bow work. I'm hesitant to release the current version of this hack because I think many will be disappointed in just how glitchy it is. I may consider releasing the sources, just not sure whether it's a good idea or not (the implementation is severely flawed). So in the meantime, I'll try to just explain how it works and hopefully someone will facepalm and make something better :) How it currently "works" tldr; muzzles, reloadAction, backgroundReload, and other horrible hacks. please don't ban me ;) This will probably be a little hard to follow as this is a really messy hack and I'm not very good at explaining stuff to begin with. My goal was to make the bow work using a single model and a single configuration. Since this didn't quite work out the way I wanted, my next attempt will probably be using multiple models and configs. Anyways, lets start with the simple stuff. Named selections (bones) As can be seen in the following images, the bow consists of two named selections (or bones); magazine and bolt. The arrow object and muzzle proxy makes out the magazine selection, and the vertices of the middle part of the string makes out the bolt selection. The magazine and bolt selections are animated together when the bow is drawn using two separate translation animations (i.e. one for the magazine and one for the bolt). When the bow is empty the magazine is hidden with an "revolving" animation. So, with this setup it is possible to get all the required states (i.e. empty, loaded, and drawn). See model.cfg for details. States This is where it gets messy. It may help to keep the following image in mind when reading the next part, no guarantees though. The image shows the three possible states the bow can be in (I've removed the bow quiver to make things easier). I'll refer to these states as 1="empty", 2="loaded", and 3="drawn". Now, one of problems with weapons in arma is the very limited way in which they can be animated. It isn't possible to add custom user controlled animations like there is for vehicles. Instead, one has to rely on the following (engine controlled) animation sources: revolving: Triggered after the weapon has been fired (usually used to animate the bolt action). reloadMagazine: Triggered when the user switches to a another magazine (i.e. not when loading magazine into an empty weapon). isEmpty: Triggered when there's no magazine loaded or the current magazine is empty (same thing?). One thing to note is that there can only be one reloadMagazine animation and it is used for all muzzles (this is why there are bugs like these #290, #255, #1791). Empty So here we have an empty/undrawn bow (1). When the player presses the reload key, the "load" animation should play and we should end up in the loaded state (2). Now keep in mind that there are at least two possible ways to load the bow; from the backpack and from the bow mounted quiver (and in the future, also from a belt quiver). Since we need different reload animations depending on where we are loading from (backpack or quiver), we have to use separate muzzles. So, for example, if we want to reload from the backpack we first switch to the DummyReloadBackQuiverMuzzle and add the associated 1Rnd_DummyArrow1 magazine. When the player presses the reload key, the reloadAction associated with the muzzle is played. There is also a hook added to the reload key, that adds a 1Rnd_RegularArrow magazine and switches to the RegularArrowMuzzle (i.e. the muzzle we are actually firing from). This muzzle is configured with autoReload=1 which means the arrow is loaded immediately without any animation playing. You can't tell the muzzle has been switched unless you look at the HUD in the top right corner. Loaded In this state (2), when the player presses the reload key, the "draw" animation should play and we should end up in the drawn state (3). It should also be possible to unload the bow (i.e. removing the arrow and putting it back in either the backpack or bow mounted quiver). So, here we have the RegularArrowMuzzle muzzle selected and a 1Rnd_RegularArrow auto loaded. Since this muzzle is configured with autoReload=1, it's not possible to trigger a reload animation. To workaround this another muzzle has been added, the DummyReloadArrowMuzzle. This muzzle is configured with backgroundReload=1 which allows us to reload it even when it's not selected. This is how the "draw" animation is played, then the player presses the reload key. Drawn In this state (3), when the player presses the fire button, the "fire" animation should play and we should end up in the empty state (1). Ok, so this isn't actually a real state. The reloadAction of the DummyReloadArrowMuzzle is just configured to have a very long timeout. This means we are stuck in a reload animation that make it look like the bow is drawn. The problem now is how do we fire the bow if its stuck in reload? Well, we can't. But we can terminate the reload animation using playActionNow with a special reset gesture and then use the UseWeapon action to force the player to fire the weapon. I.e., player playActionNow "ResetGesture"; gameLogic action ["UseWeapon", player, player, _muzzleIndex]; So this has been attached to the onMouseButtonDown event. Bugs Switching muzzles while the reload animation is playing will result in the weapon animation getting stuck (see image below). The only way to reset the weapon animation is to trigger another reload or remove the weapon and re-add it. Since reload cannot be triggered from within a script, the only option is to drop the weapon and re-add it. This has the unfortunate side effect of clearing the state of the flashlight / IR pointer (which are currently unusable). References config.cpp model.cfg
-
Handling joystick/controller input events
mrflay replied to mrflay's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I've looked at the configs, but don't really see anything that looks appropriate. Is there anything in particular I should look for? Thanks! -
Preventing aircraft from exploading on impact?
mrflay replied to mrflay's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Yep, that fixed the problem. Many thanks! Awesome! Yes it works great, thanks! -
Preventing aircraft from exploading on impact?
mrflay posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Is there a way to prevent an aircraft from exploading when it crashes into ground / obstacle? I have experimented with the following config entries, but not had any success so far. class DestructionEffects {}; explosionEffects = "NoExplosion"; CraterEffects = "NoCrater"; destrType = "DestructNo"; secondaryExplosion = -1; Another thing I would like to remove is the smoke effect that is applied when the aircraft is damaged. Is it possible? Thanks -
Preventing aircraft from exploading on impact?
mrflay replied to mrflay's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
It still expload when impacting the ground, even if I remove all ammo and fuel from both config and editor. Is there anything in my config.cpp that perhaps cancels that? -
Great feedback! I'll look into adding some sort of tutorial to the sample mission before the next update. As for marking the locations of thermals, there is a radio trigger ("charlie") that will show their location. I've added the possibility to increase the speed by pushing "Forward" key on the keyboard. It's cheating, but helps to stay in the air when there are no thermals around. I'll try to improve other input methods in the future. In the mean time, the recommend way to pilot the glider is with mouse and keyboard (it's the only thing I have tested). My preferred key mapping in spoiler. The only purpose of OPFOR is to stop you from having a good time ;) Thanks and will do.
-
I've been wanting something like that myself. I'll definetily add it for the next update. Thermals are not affected by weather or daytime currently, but you should be able to cook something up with a bit of scripting. See following example code: _thermals = (position player) nearObjects ["FLAY_Thermal", 20000]; while { true } do { { _thermal = _x; _strength = [overcast, daytime, rain, fog] call YOUR_thermal_strength_function; _radius = [overcast, daytime, rain, fog] call YOUR_thermal_radius_function; _thermal setVariable ["flay.hangglider.lift.thermal.strength", _strength]; _thermal setVariable ["flay.hangglider.lift.thermal.radius", _radius]; } forEach _thermals; sleep nextWeatherChange; // (default 30 minutes?) } After implementing the two functions, you should be able to stick that into a script in your mission folder and call it when the mission starts. Haven't tried it, but I it should work. The following variables are used in the fn_lift script to set the "thermal" effect. FLAY.HangGlider.lift.thermal.strength: How strong the thermal upwind is (default: 0.1) FLAY.HangGlider.lift.thermal.radius: Maximum distance this thermal has any effect on a glider (default: 500m) FLAY.HangGlider.lift.thermal.altitude_min: Minimum distance glider must be travelling at for thermal to be applied (default: 20m) FLAY.HangGlider.lift.thermal.altitude_max: Maximum distance glider must be travelling for thermal to be appled (default: 600m) FLAY.HangGlider.lift.thermal.speed_min: Thermal will not affect glider travelling slower than this value (default: 18 km/h) FLAY.HangGlider.lift.thermal.speed_max: Thermal will not affect glider travelling faster than this value (default: 200 km/h) FLAY.HangGlider.lift.thermal.falloff_coeff_horz: Shape of the horizontal fall off curve (default: 1.5) FLAY.HangGlider.lift.thermal.falloff_coeff_vert: Shape of the vertical fall off curve (default: 1.5) These scripting commands may also be useful to achieve what you are aiming for. overcast: Return the current overcast level. Zero is clear skies, one is maximum cloud cover. daytime: Returns the current ingame time in hours. rain: Return the current rain density. fog: Return the current fog. nextWeatherChange: Return the remaining time (in seconds) over which the current weather change will occur. This is a bug, I'll look into it. Thanks!
-
Everything in this mod is wip, but yes the wingsuit is probably the most wip in there :) Btw, shift+space will drop into the wingsuit from the hang glider, although not a good idea currently as there is no way to activate the parachute. Complete sources will be made available in the proper release. I don't have the skill to make textures, so I can't make a template. It's possible to disassemble the glider to a backpack right now. However, you don't get the option if you are already wearing another backpack. That being said, the way it works now is not what I have intended for the end result. In the future I would like it to be a bit more authentic (i.e should look like your carrying a glider bag and you should not be able to run while carrying it). Very nice! I like the second one more, the bugs are too noticeable in the first one :) Thanks for sharing. Haven't seen any feedback on the swooping yet. Personally, I feel it's maybe a bit challenging at the moment and I'm considering making some changes to it to make it easier. However, I'd love to get some feedback on it before I do. Here's a video of swooping with the hang glider. You need to be above water and below 2 meters to activate the effect. Going below 1.5 meters results in death.
-
Have you tried the sample "mission"? No cliffs, but I've added a "thermal" to the launch site to make it easier to gain some altitude. It also, has the ability to toggle the variometer and cheater vision on/off.