Fastfood4Bigfoot
Member-
Content Count
20 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Fastfood4Bigfoot
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
"PutWeapon" into unit's backpack.
Fastfood4Bigfoot replied to ImperialAlex's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Read already in the meantime about that issue at https://community.bistudio.com/wiki/action: This is was what I came up in the meantime, I will test your new revision soon. Looks like you added some checks to verify the animation is over etc. Thanks a lot, @Larrow! -
"PutWeapon" into unit's backpack.
Fastfood4Bigfoot replied to ImperialAlex's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@LarrowTrying to get your code running - without success so far. Can you provide a full mission file? Would be great! I'm interested to use this "spawn a temporary unit to add weapon attachments" method to add fully equipped weapons to vehicle loadouts so one can directly grab the weapon from there. -
[SOLVED by bypassing] get roleDescription of vehicle
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thx killzone_kid, that's exactly what I was looking for, had problems with the scope. I was working on loadout script to initialize vehicles. To use it, create a Init.sqf: // Quadbike, all variants { if (_x getVariable "replaceLoadout" == "true") then { clearBackpackCargoGlobal _x; clearMagazineCargoGlobal _x; clearItemCargoGlobal _x; clearWeaponCargoGlobal _x; }; if (_x getVariable "vehicleRole" == "loadoutAT") then { _x addItemCargoGlobal ["FirstAidKit", 2]; _x addItemCargoGlobal ["launch_NLAW_F", 1]; // PCML launcher _x addItemCargoGlobal ["NLAW_F", 6]; // PCML missile }; if (_x getVariable "vehicleRole" == "loadoutMG") then { _x addItemCargoGlobal ["FirstAidKit", 4]; // First Aid Kit _x addItemCargoGlobal ["MMG_02_sand_F", 1]; // SPMG (Sand) _x addItemCargoGlobal ["optic_DMS", 1]; // DMS scope _x addItemCargoGlobal ["muzzle_snds_338_sand", 1]; // Silencer .338 (Sand) _x addItemCargoGlobal ["acc_pointer_IR", 1]; // Laser pointer _x addItemCargoGlobal ["optic_Hamr", 1]; // RCO scope _x addItemCargoGlobal ["130Rnd_338_Mag", 3]; // SPMG mag }; //... } forEach nearestObjects [[worldSize / 2, worldsize / 2, 0], ["B_Quadbike_01_F", "B_G_Quadbike_01_F", "B_T_Quadbike_01_F"], 1000000]; // Prowler, all variants { if (_x getVariable "replaceLoadout" == "true") then { clearBackpackCargoGlobal _x; clearMagazineCargoGlobal _x; clearItemCargoGlobal _x; clearWeaponCargoGlobal _x; }; if (_x getVariable "vehicleRole" == "loadoutAT") then { _x addItemCargoGlobal ["launch_NLAW_F", 2]; // PCML launcher _x addItemCargoGlobal ["NLAW_F", 4]; // PCML missile }; //... } forEach nearestObjects [[worldSize / 2, worldsize / 2, 0], ["B_T_LSV_01_armed_F", "B_T_LSV_01_AT_F", "B_T_LSV_01_armed_CTRG_F", "B_T_LSV_01_unarmed_F", "B_T_LSV_01_unarmed_CTRG_F", "B_LSV_01_armed_F", "B_LSV_01_AT_F", "B_LSV_01_unarmed_F", "B_CTRG_LSV_01_light_F", "B_LSV_01_armed_black_F", "B_LSV_01_armed_olive_F", "B_LSV_01_armed_sand_F", "B_LSV_01_unarmed_black_F", "B_LSV_01_unarmed_olive_F", "B_LSV_01_unarmed_sand_F", "B_T_LSV_01_armed_black_F", "B_T_LSV_01_armed_olive_F", "B_T_LSV_01_armed_sand_F", "B_T_LSV_01_unarmed_black_F", "B_T_LSV_01_unarmed_olive_F", "B_T_LSV_01_unarmed_sand_F"], 1000000]; Afterwards you can add e.g. this setVariable ["vehicleRole", "loadoutAT"]; this setVariable ["replaceLoadout", "false"]; to the Init textbox of a vehicle and the choosen loadout gets applied (instead or on top of the default inventory). Still thinking about how to use this for Zeus mode. Best would be an event handler which opens a GUI dialog box (with a combo where you can select one of the predefined loadouts) as soon as you spawn a vehicle. Better ideas? I'm just a complete beginner regarding scripting in Arma. -
[SOLVED by bypassing] get roleDescription of vehicle
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Don't think that's what I'm looking for. Rightclick on a quad bike for example. "Attributes..." > "Object: Control" > "Role Description". It's explained in hover overlay as "Multiplayer role description visible in the multiplayer lobby. When undefined, the object type name will be used by default." Because https://community.bistudio.com/wiki/roleDescription says "Returns unit description set in Editor and visible on role selection screen in MP. Works in MP and SP.", I hoped to be able to access the value in any game mode from a script. The value can be set in editor also for unplayable objects like vehicles. Any idea what I could instead use to determine an assigned vehicle class? I want to be able to define to which class a vehicle belongs to react with a script function. Until now I use if (vehicleVarName _x find "loadoutMG" >= 0) then {...} but wanted to avoid using the variable name field to store that info. Maybe some custom variable in the Init text field? -
[SOLVED by bypassing] get roleDescription of vehicle
Fastfood4Bigfoot posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I'm currently trying to get the "Role Description" attribute of a vehicle. Would like to get this value for a script, but as one of the comments on https://community.bistudio.com/wiki/roleDescription says: "roleDescription works for playableUnits only. [...]" Using it on a vehicle return an empty string. Is there any way to optain this value? Thx! -
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Harzach: Nice offsets for the smoke grenades, although in already saw in videos the smoke grenade to be tied to to a leg: @Larrow: Nice solution, works until the landing - probably I will further improve the smoke grenade with automatically respawning smoke shells. Maybe a little bit too much smoke, thinking about tweaking the parameters.- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Code works for me, too, but is also creating new problems. inGameUISetEventHandler [ "Action", " params[ '', '_caller', '', '_actionName' ]; if ( _actionName == 'OpenParachute' ) then { ('SmokeShell' createVehicle (position player)) attachto [(vehicle player)]; }; "]; If I'm using the code above, there's the clicking sound of a thrown grenade when I open the parachute. But nothing happens... until I touch the ground - then the grenade immediately starts producing smoke. I don't know at all what's going on there, quite weird...- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No mods, newest version. Nothing on the screen, no hint, no error. When I'm landing and walking on the ground, it prints some letters, like "amovpercmstpsraswrfldnon".- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nope. Nothing yet.- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nothing happens. I don't really understand AnimChanged yet.- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nope. Both don't seem to work. Best working code until now is while {true} do { if (animationState player == "para_pilot") then { ("SmokeShell" createVehicle (position player)) attachto [(vehicle player)]; }; sleep 0.1; };- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yep, that code works - but I still don't know whats the best way of checking the current state again and again. player addEventHandler ["AnimChanged", { params ["player", "para_pilot"]; hint "hello"; }]; didn't worked. Shall I just use a dumb while-loop?- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's not what I'm searching for. I know how to open the parachute. I want to react with a script on opening the parachute. So when the player uses the default mouse wheel menu entry "open parachute", something should happen.- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] eventHandler for opening the parachute
Fastfood4Bigfoot posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I need help to get this running. I want to call some code on opening the parachute. I didn't found anything matching in the list: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers. I even tried the GetIn-Handlers because the parachute seems to be handled as a vehicle. Any ideas? Thx in advance ;)- 23 replies
-
- parachute
- eventhandler
-
(and 3 more)
Tagged with:
-
[SOLVED] Attaching smoke grenade to parachute fails
Fastfood4Bigfoot replied to Fastfood4Bigfoot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That one is equivalent to the boiled down version I posted at the beginning. How can I close this thread now?