-
Content Count
23 -
Joined
-
Last visited
-
Medals
Community Reputation
6 NeutralAbout Joshua9797
-
Rank
Private First Class
Profile Information
-
Gender
Male
-
Location
Germany
Contact Methods
-
Steam url id
https://steamcommunity.com/id/Joshua9797/myworkshopfiles/?appid=107410
-
Need help with unit capture
Joshua9797 replied to TysonGamer678's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can you please send us the code you are using and the name of the helicopter? Are you using a helicopter from a mod? -
-
Need help with unit capture
Joshua9797 replied to TysonGamer678's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have you used BIS_fnc_unitPlayFiring to play back the recorded weapon data? _movementdata = [[0,[11484.9,6405.11,1.36345],[-0.443961,-0.895987,0.0103379],....]; _firingdata = [[2.828,"vnrocket_ffar_275in_launcher_m229"],[4.682,"vn_rocket_ffar_275in_launcher_m229"]]; [MyHelicopter, _movementdata] spawn BIS_fnc_unitPlay; [MyHelicopter, _firingdata] spawn BIS_fnc_unitPlayFiring; Otherwise, I could imagine that you might need to assign the driver as a gunner. If your driver doesn't have control over the weapons, the BIS_fnc_unitPlayFiring function won't be able to play back the data. You can switch control under the pylons-tab using the small icons. -
Showing injury texture on unit.
Joshua9797 replied to mcnools's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe you could deal damage to an NPC, then use getObjectTextures to copy the .paa paths and apply them with setObjectTextureGlobal. At least, that's what I would try. But I suspect that the wounded texture is applied differently, so this approach probably won't work. -
How do i use unit capture for tanks??
Joshua9797 replied to TysonGamer678's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Unfortunately, it is not possible to capture the orientation of a turret with "unitcapure." I use the "lockCameraTo" function for this issue, which I call when the turret should pivot towards the target. If you don't have a target, I recommend using an invisible object as a target. -
hay there, please explain further what you are trying to achieve. Are you trying to consistently check if a civilian is in front of you? And if you've found one, then there should be a 33% probability of creating a 'stay in place' action for them? And once you've activated the 'stay in place' action, another 'surrender' action should be created for that civilian? And if you've activated the 'surrender' action, should they surrender through ACE?
-
Help needed with creating kill counter for each BLUFOR character
Joshua9797 replied to Mahagar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh, the idea of using a Mission Event Handler is brilliant. I was trying to find a solution yesterday and attempted to use a regular event handler ("Killed"). However, I couldn't come up with a good solution for the problem when an enemy is spawned mid mission because the "Killed" EH needs to be associated with a specific unit. Now I need to take a look at some of my scripts and see if I can improve them with a Mission Event Handler. 😄- 14 replies
-
- kill counter
- debrief
-
(and 1 more)
Tagged with:
-
UnitCapture and landing gear down?
Joshua9797 replied to Lopalmcivet _'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah, okay, I think I see the problem now. The "action" function only works on a unit. So either a player or an AI. In your case, you'll need to place an AI in the driver's seat. You can achieve this through a script by doing the following: //inside e.g. Trigger _crew = createGroup [civilian, true]; _unit = _crew createUnit ["B_helicrew_F", [0,0,0], [], 0, "NONE"]; _unit moveInDriver vehicleName; _unit action ["LandGear", vehicleName]; -
UnitCapture and landing gear down?
Joshua9797 replied to Lopalmcivet _'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Apart from the onEachFrame. Have you tried: unitName action ["LandGear", vehicleName]; //Alternatively driver vehicleName action ["LandGear", vehicleName]; //or unitName action ["LandGear", vehicle unitName]; In your example, you used unit (unitName) instead of vehicleName. By the way, the command works for me even without an onEachFrame. But in multiplayer, it still doesn't work every time, even though it has a global effect. Maybe I'm missing the onEachFrame there. -
animations Animations not working properly
Joshua9797 replied to Jaroslav Verner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can then loop all of this in a while loop. I recommend executing it within a "spawn" to allow the script to continue running afterward. Moreover, a while loop or sleep wouldn't be permissible in a trigger without a spawn. 0 spawn { while { alive bot1 } do { bot1 switchMove "Acts_hubTalk_salute1"; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_1b"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_1"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_2"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_3"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_4"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_5"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_6"; sleep 2.45; }; }; -
animations Animations not working properly
Joshua9797 replied to Jaroslav Verner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, one idea would be to execute all animations using "switchMove" and incorporate an appropriate sleep. I assume you obtained the animations from the Animations Viewer? There, in the bottom left corner, you can always see the duration of the animation. You can then use that for the sleeps. (For example, 2.45 seconds per animation <- please replace with the correct duration): bot1 switchMove "Acts_hubTalk_salute1"; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_1b"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_1"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_2"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_3"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_4"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_5"; sleep 2.45; bot1 switchMove "Acts_welcomeOnHUB01_AIWalk_6"; Although most animations also work with "playMove," in my experience, there are exceptions. (I think there's a naming convention for the animations that indicates this, but I usually just try things out.) I am still a beginner in SQF, so please take my statements with a grain of salt. -
I just tested the code and updated it in my previous post, and as they say, it works on my machine.😉
-
It's just an idea, and nothing has been tested (it probably won't work this way), but I thought that an approach involving calculations with 'time' and using an array could work. Here's a version using the variable 'time' (time since the start of the mission) and an array. inside initServer.sqf JFR_ShotsTime = []; publicVariable "JFR_ShotsTime"; JFR_fnc_ShotTimer = { params ["_thePlayer"]; _initialTime = time; _index = _thePlayer addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; JFR_ShotsTime pushBack time; publicVariable "JFR_ShotsTime"; }]; sleep 5; _thePlayer removeEventHandler ["Fired", _index]; _result = "Number of shots fired: " + str (count JFR_ShotsTime) + " timestamps: "; { _result = _result + (str (_x - _initialTime)) + "sec, "; } forEach JFR_ShotsTime; JFR_ShotsTime = []; // reset publicVariable "JFR_ShotsTime"; hint _result; }; publicVariable "JFR_fnc_ShotTimer"; inside init of Obj with addAction: this addAction ["5 sec timer", { params ["_target", "_caller", "_actionId", "_arguments"]; [_caller] call JFR_fnc_ShotTimer; }]; I am still a beginner in SQF, so please take my statements with a grain of salt.
-
Export a value from variable in function
Joshua9797 replied to EtherNight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh, right. I don't know how I overlooked that. It's even the step right above the publicVariable. thanks for pointing that out.😅 -
Export a value from variable in function
Joshua9797 replied to EtherNight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi. I'm not sure if this helps, but if you just want to have an enemy who can endure more than an ordinary enemy, you could alternatively reduce the incoming damage instead of managing a separate variable for the HP. If I understand the documentation for 'HandleDamage' correctly, you can override the received damage value by overriding the '_damage' parameter and returning this value: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage this addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint", "_directHit"]; _damage = _damage * 0.1; _damage; }]; (This is not tested!) The following are just tips: A small tip that I can give is that it's not necessary to receive the parameters using 'select.' After you have received the parameters using 'params,' you can simply access them by their names. For example: params ["_unit", "_damage"]; _unit setDamage 0; Another thing I noticed is that the variable you are trying to publish with 'publicVariable' (dommage) is not the same as _dommage. Notice the underscore (_) before the name. The underscore indicates that it's a private variable and is only known within your script's scope. You cannot publish a private variable with 'publicVariable.' This can only be done with public variables, which are the ones without an underscore. However, public variables have the disadvantage that they can only exist once and will be overwritten in any other script. I'd like to mention that I am still a beginner in SQF, so please take my statements with a grain of salt. -
Add shake effects to custom camera
Joshua9797 replied to Davide Terenzi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I would like to add that although I tested the scenario in singleplayer and therefore a remoteExec should not make any difference, the following execution of addCamShake does not work either: //old: enableCamShake true; addCamShake [20, 4, 25]; //replaced by: [true] remoteExec ["enableCamShake"]; [[20, 4, 25]] remoteExec ["addCamShake"];