Jump to content
Sign in to follow this  
R3ality

[Script] Print debug info of player gear

Recommended Posts

Hi,

Here's a small script I originally posted on armaholic. It may be useful when debugging the gear player is holding/has equipped..

File source: debugGear.sqf

/*
@file Version: v0.1
@file name: debugGear.sqf
@file Author: R3
@file edit: 3/6/2013
@file Description: Print debug info of player gear through action menu item
@usage: Put in init field of some object: this addAction ["DEBUG GEAR INFO", "debugGear.sqf"];
*/

_obj = _this select 0; //the object that had the action
_caller = _this select 1; //unit that called the action
_id = _this select 2; //id of the action

_outp = "HEADGEAR  =  " + (headgear _caller)
+ "\n\nGOGGLES  =  " + (goggles _caller)
+ "\n\nPRIM. WEAPON  =  " + (primaryWeapon _caller) + "  =  " + (str primaryWeaponItems _caller)
+ "\n\nSEC. WEAPON  =  " + (secondaryWeapon _caller) + "  =  " + (str secondaryWeaponItems _caller)
+ "\n\nHANDGUN  =  " + (handgunWeapon _caller) + "  =  " + (str handgunItems _caller)
+ "\n\nASSIGNED ITEMS  =  " + (str assignedItems _caller)
+ "\n\nUNIFORM  =  " + (uniform _caller) + "  =  " + (str uniformItems _caller)
+ "\n\nVEST  =  " + (vest _caller) + "  =  " + (str vestItems _caller)
+ "\n\nBACKPACK  =  " + (backpack _caller) + "  =  " + (str backpackItems _caller);
//+ "\n\nALL WEAPONS  =  " + (str weapons _caller)
//+ "\n\nALL MAGAZINES  =  " + (str magazines _caller);

titleText [_outp, "BLACK IN", 30]; //print our info

Usage: Add the following into the "initialization" field of any object

this addAction ["DEBUG GEAR INFO", "debugGear.sqf"];

..then player just needs to use the action menu on that object by selecting "DEBUG GEAR INFO" - I added it to a ammo container but it should work on any object..

It should look something like this:

8V7vkgMl.png

It is also available for download by the armaholic guys :thumbsup: and listed on their forums

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×