OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Cheetah on 25 Sep 2007, 20:16:55
-
General information
Looking for a method to enable the player to conceal weapons? Look no further, with this method - consisting of three script files, you will be able to do just that!
Check the readme and demo mission for more information.
Update: version 1.01 released!
Update: version 1.02 released!
Update: version 1.03 released!
-
I'm glad you didn't allow AK-74 swallowing with this script, since you limited it to hiding pistols. Hmm, though it would have been fun to create a spray of vomit particles ;P
Instead of having an array of pistol classes, check that the weapon inherits from PistolCore, using the method I explained in another thread (http://www.ofpec.com/forum/index.php?topic=30301.msg207726#msg207726). This will allow the script to holster any pistol from any addon.
-
Hi Cheetah. Cool script. This will be useful.
I think I solved the issue of having to select the weapon again before you can fire, by adding SelectWeapon command to this line of code:
if ((isHolster select 2) != 0) then { _unit addWeapon _saveWeapon; _unit selectWeapon _saveWeapon; };
Try it out.
-
Hey johnnyboy, sounds good!
Going to start rescripting it now to prevent the use of multiple scriptfiles. Should make it even easier to use ::)
-
Alright, new version attached.
Only one file required to make it work now. Other info is in the readme.
@Spooner,
Next up: checking if the config file can be used to get pistol classes.
EDIT: can't find a way to use the config file.. so it is ready for release.
-
Couldn't make it easier than this - just use something like:
_gun = "M9";
if ([_gun] call isPistol) then...
This is the function:
isPistol =
{
_unknownWeaponClass = _this select 0;
_unknownConfig = configFile >> "CfgWeapons" >> _unknownWeaponClass;
_pistolConfig = configFile >> "CfgWeapons" >> "PistolCore";
_isPistol = false;
while {isClass _unknownConfig} do
{
if (_unknownConfig == _pistolConfig) exitWith
{
_isPistol = true;
};
_unknownConfig = inheritsFrom _unknownConfig;
};
_isPistol; // Return.
};
-
Updated to v1.02
Fixed a bug and added the config file pistol check (thanks Spooner!) - see readme, download in first post.
-
ED updated with new version ;)
-
Updated to 1.03.
Improved demo mission and added info to the readme and script header.
-
Nice script but in some situations there's a little problem. (that can be solved with a timer or so)
Unholster the weapon, kill one soldier, holster the weapon before the second soldeir can see you and you will be captive again.
Anyway, nice script :)
-
Ahh well, that has more to do with a simple 'show-how-to-implement-it' ;).
There are a lot more and better ways to do it, as you say you can cheat now.
-
can some one tell me where to place this so my units can holster their sidearm splease help
-
The download link is down, will this script work in Arma2? will it ported to A2?