OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Resources Beta Testing & Submission => Topic started by: mikey on 29 Aug 2009, 02:02:24

Title: mk4_showInfo (seeing who's in your veh, and more)
Post by: mikey on 29 Aug 2009, 02:02:24
In the void of spooner leaving us without spon_recognize and other goodies for arma 2, and me not knowing people were working on porting it, I made this little script a week ago which combines 3 of spooners addons I loved most ( recognize, crewNotify and status (to an extend)).

Features:
- Get a list of crew and cargo in your vehicle (works for multi-turreted vehicles as well)
- Have you own team highlighted in the list
- Get a count on how many cargo slots you have, and how many you have left
- Being able to see the crew and cargo list inside and outside of the vehicle(upto 15m distance).
- You're also able to use this on infantry to get their name, groupname, and rank (upto 10m distance)

So all in all this is kinda an extension to the spacebar menu.

An addon will probably come as soon as I figure out how to make an one Done ;)

Screenshots:
one (http://i242.photobucket.com/albums/ff261/mikeymike888/showInfo1.jpg)
two (http://i242.photobucket.com/albums/ff261/mikeymike888/showInfo2.jpg)


Script Version Instructions:
Just add the showInfo folder to your mission root, and add teh following line to your init.sqf:
Code: [Select]
[] execVM "mk4_showInfo\init.sqf";

Addon Version Instructions:
Copy all folders from the addon archive to your arma2 game directory.


And then press and hold the spacebar while in a vehicle or looking at a vehicle or infantry.


Special thanks to Spooner for his addons in arma 1, and his awesome coding in those which taught me a lot.  :good:


Below an example mission, the script version, and the addon version (requires Extended EventHandlers). Readme's are included.

[DO NOT MIRROR]
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: Fincuan on 29 Aug 2009, 14:17:58
Nice one mikey, and works great :good:

Re: the addon-version, here's (http://users.hut.fi/~pstauffe/files/arma2/mk4_showInfo_v01.pbo) a "quick and dirty" one that works. CBA is needed, DO NOT MIRROR

The only things that had to be changed were:
Code: [Select]
class CfgPatches
{
class mk4_showInfo_v01
{
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {"Extended_EventHandlers"};

};
};

class Extended_PreInit_EventHandlers
{
mk4_showInfo_Init = "mk4_showInfo_Init_Var = [] execVM ""\mk4_showInfo_v01\init.sqf""";
};

Code: [Select]
if ( !isNil "mk4_showInfo_CLIENT" ) exitWith {};
mk4_showInfo_ADDON = true;

Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: mikey on 29 Aug 2009, 18:26:37
Thanks fincuan, much appreciated  :good:
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: kju on 29 Aug 2009, 19:30:11
Thanks to both of you.  :yes:

As always my key configuration conflicts with hardcoded key use.  :whistle:
Can you please make it configurable via an external file.
Here is a sample implementation.

Cheers  :good:

Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: mikey on 29 Aug 2009, 22:05:42
Yes, I will Q
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: kju on 30 Aug 2009, 11:59:06
From testing the addon version in the rpt:

Code: [Select]
Error in expression <_this call mk4_fKeyUpHandler>
  Error position: <_this call mk4_fKeyUpHandler>
  Error Type Script, expected Bool
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: Kremator on 30 Aug 2009, 19:11:12
The addon version works very well.  Nice one !  Could it be made into a GUI ?
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: mikey on 31 Aug 2009, 14:31:14
New release in opening post:
- Made a new config
- Added the userconfig folder, so you can set your own key now if using the addon
- Fixed the bug kju mentioned
- Signed the addon


Special thanks to kju, fincuan, lwlooz and killswitch  :good:


btw Kremator, what do you mean with a making it into a GUI?
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: Fincuan on 31 Aug 2009, 15:18:08
Is it ok to spread the word at this point? I know at least one community that would highly appreciate your addon.
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: mikey on 31 Aug 2009, 15:27:52
Yeh, go ahead. I tested this addon with 5 other guys last night, and beside the bug Kju had which was fixed by lwlooz, this is a stable release now.
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: Fincuan on 31 Aug 2009, 17:48:46
That's what I figured. Even after several hours of play my .rpt is completely clean what comes to your addon, no entries at all.
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: kju on 31 Aug 2009, 18:40:33
Thanks a lot. Will test tomorrow.  :good:
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: kju on 15 Dec 2009, 13:36:09
mikey the attachments were lost.
Can you please attach it again.

I want to integrate it into CB AAS.  :good:
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: JamesF1 on 18 Dec 2009, 20:32:25
Bump :)  I have need of this little script - would be great if someone still has the attachment, as kju says  :good:
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: Fincuan on 23 Dec 2009, 04:29:42
The original one doesn't work with 1.05 + latest CBA anymore. I didn't bother to look very deeply into it, so I just changed all displayAddEventHandler-commands to use CBA's CBA_fnc_addKeyHandler, and voila we're back in business.

In mikey's absence here's a slightly customized(don't have the original anymore), 1.05+CBA+ACE-tested working version

Do not mirror
edit: Link removed, the check for the correct one a few posts after this
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: kju on 25 Dec 2009, 08:29:34
Cheers Fincuan  :good:

Lets see how to make the built into a mission.  :scratch:
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: Fincuan on 26 Dec 2009, 22:00:49
Here's a new one. The only change is fixing an error related to the keyhandlers that didn't affect functionality but resulted in a bunch of messages in arma2.rpt.
Title: Re: mk4_showInfo (seeing who's in your veh, and more)
Post by: mikey on 08 Feb 2010, 17:32:02
Nice to see that people still like this addon (my first :))

Sorry that I've been absent btw when BIS decided to play with key EH's, but I'm up for making a new version of this which will fix quite some issues. First thing to fix will be getting rid of the dependency of assigned vehicle roles for crew + cargo data, as vehicle roles don't get broadcasted over the network.
I've already made a function that discovers all the turret paths for a given vehicle, so hopefully the new version should return the true crew and cargo of a vehicle, even in mp!

If any of you guys have any other requests or bugs to report, please do so.