dlder
-
Content Count
89 -
Joined
-
Last visited
-
Medals
Posts posted by dlder
-
-
I've currently added a "player only" heal action to an object which works quite well:
SpoileraddAction [
"<t color='#ff0000'>Heal Player</t>",
"_heal.sqf",
nil,
6,
true,
true,
"",
"damage _this > 0",
5
];_heal.sqf
_unit = _this select 1;
_unit playMove "ainvpknlmstpslaywrfldnon_healed2";
_health = getdammage _unit;
waitUntil {animationstate _unit == "ainvpknlmstpslaywrfldnon_healed2"};
while {damage _unit > 0} do
{
_health = _health - 0.1;
_unit setDamage _health;
sleep 1;
};_unit playMove "AidlPercMstpSlowWrflDnon_AI";
hint "You're fully patched up!";
But this does not work for AI...
Is it possible to add the heal function from the medical truck to an object, so that you get the same action for your ai team members ("Heal at ....").
Thanks!
-
No... I mean, the way I know it from typical Arma play is this: you have a vehicle with driver and tell a group to embark.
But this means, that the soldiers are in a different group then the crew.
- Did you check? Was the driver/rest of the crew in the same group?
- Did you only get them engaged in combat, so combat mode would kick in? Because then the driver usually does stay inside the vehicle; even if it is the same group (I do have to test that more though!)
- But what if you command such a vehicle - where the driver is of course part of the soldier group - to drive to a waypoint and set this waypoint to "Get Out"? THATs when I even want the driver to stay inside, so he doesn't go running around getting killed... he shouldn't even go to combat mode, though I'm sure in this situation that won't help, as he still get the command to leave the vehicle
Thanks!!
-
Hi,
so, I'm currently creating a "spawn vehicle + crew + soldiers in High-Command" mission script. And it works as it's supposed to.
But, when I order for instance a truck full of soldiers to a waypoint which has "Unload" as the type (so they'll properly attack enemies), the driver also disembarks... is it possible to force the driver/crew to stay inside the vehicle (no matter what)?
I've tried:
- allowCrewInImmobile true;
- disableAI "FSM";
- disableAI "ANIM";
- setBehaviour "CARELESS";
disableai "move" unfortunately can't be used, as this will stop the driver from moveing the vehicle...
Any ideas on how to accomplish this?
Cheers!
-
On 9/9/2020 at 12:31 PM, kingofnuthin1980 said:[group player, true] call BIS_fnc_groupVehicles;
That's fucking golden, ty!!!
-
THANKS, I've searched quite a couple of times and never found out how to open BiS Arsenal with custom text 🙂
-
Thanks; I already got it (should've refreshed this page^^)
onSliderPosChanged = " params ['_control', '_newValue']; _ctrl = _this select 0; _ctrl ctrlSetTooltip format ['Skill set to: %1%2', _this select 1, '%'];";
Thanks for your help!
- 1
-
Thanks; what I did manage was to display the set skill level into the chat area:
onSliderPosChanged = " params ['_control', '_newValue']; systemchat format ['Set skill = %1', _this select 1]; ";
But setting the tooltip of the control doesn't seem to work (this way at least):
onSliderPosChanged = " params ['_control', '_newValue']; _Text = format ['Set skill = %1', _this select 1]; 20006 ctrlSetTooltip _Text;";
20006 = idc of the slider
-
Hi there!
I've created a slider to set the skill of recruited units and it works as intended.
BUT: I'd like to display the current skill level from the slider as it's tooltip:
https://steamcommunity.com/sharedfiles/filedetails/?id=2382225926
Current code:
class SkillSlider { idc = Hotshot_RECRUITING_SKILL; type = CT_XSLIDER; style = "0x400 + 0x10"; x = 0.11; y = 0.73; w = 0.389; h = 0.05; sliderPosition = 50; sliderRange[] = {10, 100}; sliderStep = 10; color[] = {1, 1, 1, 1}; colorActive[] = {1, 1, 1, 1}; tooltipColorText[] = {1, 1, 1, 1}; tooltipColorBox[] = {0, 0, 0, 1}; tooltipColorShade[] = {0, 0, 0, 0.75}; //tooltip = "Skill"; _testvar = 10; tooltip = format ["Skill: %1", _testvar]; arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; };
Oh, and why don't the arrows work? I can only use the slider itself to move it... sliderSetSpeed has two values for that, but in the class (sliderStep) I can only use one number!?
Cheers and thanks!
-
-
And if you want custom names for those units, I did it this quick'n'easy way:
In recruitable_units_static.sqf I've created a new variable with the names of the soldier-classes defined before:
bon_recruit_recruitableunits_name = ["Grenadier", "Light MG", ...];
And then I replaced "_displname" in build_unitlist.sqf with this:
_displname = bon_recruit_recruitableunits_name select _forEachIndex;
-
If anyone is still interested in this script; here's how you'd add Customized Loadouts for the spawned AI units (exported from Arsenal).
- use a static list with known classes!
- recruitable_units_static.sqf
-
bon_recruit_recruitableunits = ["B_Soldier_GL_F", "B_Patrol_Soldier_MG_F", ...];
init_newunit.sqf
/***************************************************************** Set Custom Loadout ******************************************************************/ _unit setUnitLoadout (configFile >> "EmptyLoadout"); switch (typeOf _unit) do { case "B_Soldier_GL_F": { _unit addWeapon "arifle_MX_GL_F"; _unit addPrimaryWeaponItem "muzzle_snds_H_snd_F"; _unit addPrimaryWeaponItem "acc_pointer_IR"; _unit addPrimaryWeaponItem "optic_Hamr"; _unit addPrimaryWeaponItem "30Rnd_65x39_caseless_mag_Tracer"; _unit addWeapon "hgun_P07_F"; _unit addHandgunItem "16Rnd_9x21_Mag"; _unit forceAddUniform "U_B_CombatUniform_mcam"; _unit addVest "V_PlateCarrierSpec_mtp"; _unit addBackpack "B_AssaultPack_mcamo"; for "_i" from 1 to 2 do {_unit addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_unit addItemToUniform "HandGrenade";}; _unit addItemToUniform "SmokeShellBlue"; for "_i" from 1 to 9 do {_unit addItemToVest "30Rnd_65x39_caseless_mag_Tracer";}; for "_i" from 1 to 2 do {_unit addItemToVest "SmokeShell";}; for "_i" from 1 to 37 do {_unit addItemToBackpack "1Rnd_HE_Grenade_shell";}; _unit addItemToBackpack "16Rnd_9x21_Mag"; _unit addHeadgear "H_HelmetSpecB_snakeskin"; _unit addGoggles "G_Tactical_Clear"; _unit linkItem "ItemMap"; _unit linkItem "ItemCompass"; _unit linkItem "ItemWatch"; _unit linkItem "ItemRadio"; _unit linkItem "NVGoggles"; }; case "B_Patrol_Soldier_MG_F": { _unit addWeapon "LMG_Mk200_F"; _unit addPrimaryWeaponItem "muzzle_snds_H_MG"; _unit addPrimaryWeaponItem "acc_pointer_IR"; _unit addPrimaryWeaponItem "optic_Hamr"; _unit addPrimaryWeaponItem "200Rnd_65x39_cased_Box_Tracer_Red"; _unit addPrimaryWeaponItem "bipod_01_F_snd"; _unit addWeapon "hgun_P07_F"; _unit addHandgunItem "16Rnd_9x21_Mag"; _unit forceAddUniform "U_B_CombatUniform_mcam"; _unit addVest "V_PlateCarrierSpec_mtp"; _unit addBackpack "B_AssaultPack_mcamo"; for "_i" from 1 to 2 do {_unit addItemToUniform "FirstAidKit";}; for "_i" from 1 to 2 do {_unit addItemToUniform "HandGrenade";}; _unit addItemToUniform "SmokeShellBlue"; for "_i" from 1 to 2 do {_unit addItemToVest "200Rnd_65x39_cased_Box_Tracer_Red";}; for "_i" from 1 to 2 do {_unit addItemToBackpack "SmokeShell";}; for "_i" from 1 to 3 do {_unit addItemToBackpack "200Rnd_65x39_cased_Box_Tracer_Red";}; _unit addHeadgear "H_HelmetB_light_snakeskin"; _unit addGoggles "G_Tactical_Clear"; _unit linkItem "ItemMap"; _unit linkItem "ItemCompass"; _unit linkItem "ItemWatch"; _unit linkItem "ItemRadio"; _unit linkItem "NVGoggles"; }; };
cheers!
-
Thanks a lot guys!
You are part of the reason why this community rocks 🙂
On 1/26/2021 at 11:11 AM, pierremgi said:deleteVehicle nameOfYourModule
Naming the module and using "deleteVehicle" really does work... but it messes with the other respawn positions, so it's not viable to do it this way.
On 1/26/2021 at 3:37 PM, Larrow said:{ _x call BIS_fnc_removeRespawnPosition; }forEach ( nameOfRespawnModule getVariable[ "respawn", [] ] );
Where nameOfRespawnModule is the variable name given to the respawn module in its attributes in Eden.
Works like a charm, ty very much!!!
- 1
-
The problem is: how do I get the IDs of my respawn points, which is needed for this command:
https://community.bistudio.com/wiki/BIS_fnc_removeRespawnPosition
🤔
-
2 hours ago, pierremgi said:This should work...
I dunno... it works with layers it seems, so I work with that now. But thx anyway!
-
Yep, works like a charm! 🙂
-
Sry, I should've looked first; the idea with layers should work:
https://community.bistudio.com/wiki/getMissionLayerEntities
- 1
-
22 hours ago, Larrow said:No, Eden IDs are not available during a mission, only during an editing session.
Hm, do you know of any other possibility to quickly select a bunch of placed objects? Can I delete Eden layers via script?
-
Ok, thanks!
-
Is it possible to use the Eden IDs inside scripts? If I want to delete a whole bunch of objects via trigger for instance?
https://community.bistudio.com/wiki/Eden_ID
This Number remains the same even after saving and loading the scenario.
-> so this seems to be the "safest" way to do that, but:
_nObject = [0,0,0] nearestObject 123456;
doesnt work(?)
-
LOL, not a bad idea 😄
stupid me, thx!
- 1
-
Sry, I should've written it more clearly... the code to "awaken" / enabling the enemies work.
But disabling the AI won't keep planes on the ground; even with "MOVE", "SAFE", "TARGET", "AUTOTARGET", "AUTOCOMBAT", "WEAPONAIM" disabled, they will take off and attack you. Everything else seems to work just fine.
-
A) Ok, I've tinkered with it a bit...
- disabling simulation on a (group of) Man or on a Vehicle in Eden, then enabling simulation via trigger works (I wrongly used foreach units before)
Code to enable: _Obj = [Opfor_AATurrent1, Opfor_AATurrent2, Opfor_AATurrent3, Opfor_AATurrent4]; { _x enableSimulationGlobal true; }forEach _Obj;
B) Disabling the AI works too, although it's a bit more trouble (but at least the enemy can be destroyed)
Men
- group has variable name
- disable ANIM
Code to enable: { _x enableAI "ANIM"; }forEach units GrpMen;
Vehicle
-
Group
- behaviour = SAFE
-
Unit
- variable name
-
Crew
- disable AI = "MOVE", "SAFE", "TARGET", "AUTOTARGET", "AUTOCOMBAT", "WEAPONAIM";
Code to enable: _Obj = [Opfor_AA1, Opfor_AA2, Opfor_AA3, Opfor_AA4]; { { _x setBehaviour "AWARE"; _x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x enableAI "AUTOCOMBAT"; _x enableAI "WEAPONAIM"; }forEach units _x; }forEach _Obj;
This works for tanks and choppers; but not for planes!?!
Any ideas why that might be the case and more importantly, what to do about it / change?
-
On 1/8/2021 at 4:24 PM, pierremgi said:1 are you sure your trigger in fine?
2 that's the name of units/vehicles?
3 disableAI for "autoCombat" is fine but the behaviour must be "safe" before. "aware" is not a peaceful state.
4 At last, don't play with dynamic simulation on script. Do it in editor. For script, use enableSimulation and hideObject(global) commands.
Thanks mate!
I'm sorry it took so long to respond... I somehow never find enough time for Arma3 as I'd like or hope 😞
1) I don't have a trigger to enable them yet (as I haven't found a way to disable them^^)
2) well... actually that's the name of the groups
3) behaviour? good call, gonna try that next!
4) will look into that, thx!
- 1
-
Nope, unfortunately not; but I am gonna try it again and see what's what.
Thx for your help!
Add "Bis" heal action to object?
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Ok, thank you guys for conferming what I feared 🙂