Jump to content
Sign in to follow this  
smacker909

way to tell group type

Recommended Posts

I have created some groups using code similar to below.;

_insGrp=[getMarkerPos _mkr, EAST, (configFile >> "CfgGroups" >> "EAST" >> "BIS_TK_INS" >> "Infantry" >> "TK_INS_Patrol")] call BIS_fnc_spawnGroup;

is there a way , sometime after, to tell if the group is type "Infantry" or other?

Share this post


Link to post
Share on other sites

This may not be the best way but I've done it before.

_insGrp=[getMarkerPos _mkr, EAST, (configFile >> "CfgGroups" >> "EAST" >> "BIS_TK_INS" >> "Infantry" >> "TK_INS_Patrol")] call BIS_fnc_spawnGroup;
{_x setVariable ["type","Infantry"];} foreach units insGrp;

That should place the details into each units name space.

later you could have a trigger to recall the info

Trigger set up

Opfor present repeating

Cond

 this

on act

hint format ["%1", (thislist select 0) getvariable "type" ]

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Forgive me if I'm wrong.... but are you not selecting an "Infantry" group to be spawned? So you already know!

Share this post


Link to post
Share on other sites
Forgive me if I'm wrong.... but are you not selecting an "Infantry" group to be spawned? So you already know!

He wanna retrieve it after spawning.

Share this post


Link to post
Share on other sites
He wanna retrieve it after spawning.

Ahhh...my bad.

Share this post


Link to post
Share on other sites

I changed the getmarkerpos to a getpos for testing, I've changed it back now to how you had it.

Share this post


Link to post
Share on other sites

Thanks for the tips.. I tried the trigger and getting null returned. :(

Share this post


Link to post
Share on other sites

It should have worked, it will display null if unit has no variable set.

Here's an example of two ways to do it without the null being seen, there are two groups spawned.

1. Is just a trigger placed over the spawn area.

2. Uses Cursortarget, just aim your weapon at a unit to reveal the Type.

http://www.sendspace.com/file/jqoufg

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  

×