Support #19683

weapons on "SAFE" via init.sqf

Added by Megagoth1702 over 4 years ago. Updated about 4 years ago.

Status:Closed Start date:05/11/2011
Priority:Low Due date:
Assignee:- % Done:

100%

Category:-
Target version:-
Component: Affected Version:
Close Reason:

Description

Hey people!

It is already possible to put in earplugs on mission start.
I wonder if there is a way to force the players to have their weapons on "safe" when the mission starts. The amount of people alt tabbing in and out all the time and then shooting in the air/friendlies is HORRIBLE.

Thanks in advance!

History

Updated by Xeno over 4 years ago

  • Priority changed from Normal to Low
  • Target version set to Planned (Needs Contributors)

Updated by VKing over 4 years ago

Would

unit addWeapon "ace_safe"; unit selectWeapon "ace_safe" 

work?

Updated by Sandiford over 4 years ago

I tried to do it in the past and couldn't get it working, I think the weapon select code was running post init/after init.sqf and reseting to default fire mode

Updated by Xeno over 4 years ago

Post is not a problem.

Updated by Xeno over 4 years ago

  • Tracker changed from Bug to Feature

Updated by rocko over 4 years ago

  • Tracker changed from Feature to Support

Updated by rocko over 4 years ago

  • Target version deleted (Planned (Needs Contributors))

Updated by Sandiford over 4 years ago

Xeno wrote:

Post is not a problem.

Can you expand on that? I don't know what you mean

Updated by Sickboy over 4 years ago

This should work from mission description.ext:

class Extended_PostInit_EventHandlers {
   class my_player_weap_safe { clientInit = "player addWeapon 'ace_safe'; player selectWeapon 'ace_safe'" };
};

Otherwise the same works from a config, but at CfgPatches, add to required_addons: "ace_sys_weaponselect", "ace_sys_magazines"
(add any other addon that does things to player weapons at postinit :)

also added to acestack; http://ace.armastack.info/index.php/201/how-to-start-in-weapons-safe-mode

Updated by Sickboy over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF