Jump to content
Sign in to follow this  
mad rabbit

Target list transfer when not in same group

Recommended Posts

Is there a way to tranfer the list of targets (and corresponding "knowsAbout" lvls if also possible) that the leader of group A can see, to the leader/unit in group B?

I'm working on a CTI map and I need to do this without using triggers (or "nearestObject" as this would be unfair). This is so that helo support units can see the same enemy units as the group leader that called the support, with the same knowsAbout level.

I noticed that in the default radio menu that a whole list of targets that can be seen by the player is present. I assume that this list also corresponds to the "knowsAbout" level that the player has for these targets as some appear in this menu as 'Man' or 'Unknown'....I might be wrong about the last one...also houses appear in there as well. So if this list/array can be accessed that would solve a lot of my problems.

Thanks in advance.

P.S. BAS please contact me as I have been trying to reach you guys for some time now!

Share this post


Link to post
Share on other sites

Yes there is;

have a look into the comref, where it says: group reveal unit

~S~ CD

Share this post


Link to post
Share on other sites

Thankyou for the quick reply.  

Unfortunately I already thought of that but it won't work because you have to define what the enemy unit is i.e. this is always changing because in a CTI this can be a host of objects/units from either west/res (if leader of group A & B were East).

I need to be able to transfer the current list of enemy objects that the leader from group A knowsAbout above a certain lvl (usually listed with corresponding knowledge in relation to knowsAbout lvl in radio menu) to the helo group B.  

Now if this target list, comprising of all targets including buidlings, was retrievable in the form of an array I could to a forEach command to reveal the units in that array from group A leader to group B helo.

I don't want to run a script for every CVed unit in the CTI to check whether group leader from group A knowsAbout lvl reaches x = exec of script to reveal to group B helo.  

I don't want to use triggers because of the bugginess involved with moving them and they are not specific enough to the group leader from A in IMHO.

I also don't want to use nearest object and an array of enemy inf units as that would be unfair if these enemy units have properly hidden from the group leader from A.

Hope that clarifies the problem.

Share this post


Link to post
Share on other sites

Hi, this is untested, cause I can't test it now, but I would do something like this:

Take a soldier from Group A and let him join Group B with the join-command. His knowsAbout-values should be transferred to the new group; Then you can let this soldier rejoin Group A again.

Share this post


Link to post
Share on other sites

Thats sounds like a really good idea Vektorboson, thanks. I could get the gunner of the helo in group B to join group A leader then join group B pilot again. Hopefully this will transfer the targets like you said. The only thing off the top of my head that I think could stuff it up would be unit rank. i.e. gunner rank lower than pilots upon rejoin = erases target list 'retrieved' from group A leader ?!

This is messy in terms of solutions (flash joining!) and like you said needs to be tested. I'll post the results when I have a go at it. Thanks for the repsonse!

Here's a question that might yield a more elegant solution:

How is the target list accessed by the player radio menu [2 (Targets) then 0 (more)] populated?

Share this post


Link to post
Share on other sites

I'm messing around with some scripts to track the position, speed and direction of every unit on the map using array pointers. Plus the average position,speed and direction of each group. ATM I can track 200 individual men without any noticable delay every 0.1 seconds.

It's going to be very array heavy, and not as accurate as OFP's triggers. I have not even though about MP yet, and I've still to come up with an efficent way of simulating Detect triggers.

If I'm correct in thinking you want a list of who has detected what, to alert AI to detected units. You could just as easily create a couple of giant detect triggers for both sides and check knowsabout of the group leader against all the enemy units in the other trigger?

Quote[/b] ]How is the target list accessed by the player radio menu [2 (Targets) then 0 (more)] populated?

It's annoying having to do any of this, as OFP must already have this info. I just dont think you can get access to it, without recreating the entire process yourself?

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  

×