Jump to content

Fastfood4Bigfoot

Member
  • Content Count

    20
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Fastfood4Bigfoot

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Fastfood4Bigfoot

    "PutWeapon" into unit's backpack.

    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!
  2. Fastfood4Bigfoot

    "PutWeapon" into unit's backpack.

    @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.
  3. 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.
  4. 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?
  5. 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!
  6. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    @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.
  7. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    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...
  8. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    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".
  9. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    Nothing happens. I don't really understand AnimChanged yet.
  10. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    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; };
  11. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    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?
  12. Fastfood4Bigfoot

    [SOLVED] eventHandler for opening the parachute

    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.
  13. 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 ;)
  14. That one is equivalent to the boiled down version I posted at the beginning. How can I close this thread now?
×