Jump to content
Sign in to follow this  
tpw

How to detect if a squad member is controlling a UAV?

Recommended Posts

Hi all. This is one of those problems where I can think of a very long winded solution, when in fact there's probably a very simple way to do it. So on the off chance that there is a simple way to detect if a given squad member is driving a UAV, I'd really appreciate it if someone would let me know. Thanks in advance!

Share this post


Link to post
Share on other sites

Are you referring to a player actively controlling a UAV at any one point or just has possession of the connection?

Share this post


Link to post
Share on other sites
You could loop through all of the UAVs with allUnitsUAV checking for connected players with isUavConnected.

Or loops through all the player units checking for getConnectedUav.

Perfect! Thanks so much for that Fight9. LKincheloe, was just basically trying to determine if anyone in a given squad was connected to / controlling a UAV.

Share this post


Link to post
Share on other sites
Perfect! Thanks so much for that Fight9. LKincheloe, was just basically trying to determine if anyone in a given squad was connected to / controlling a UAV.

I just looked at those commands again. You are better off using getConnectedUav while looping through the squad members/players. The first loop I explained, using isUavConnected, would only return true if its connected to a unit. The former will return that specific UAV while the latter will only give you a boolean.

Share this post


Link to post
Share on other sites
I just looked at those commands again. You are better off using getConnectedUav while looping through the squad members/players. The first loop I explained, using isUavConnected, would only return true if its connected to a unit. The former will return that specific UAV while the latter will only give you a boolean.

Even better. I have implemented this into a HUD script of mine, works beautifully thanks!

Share this post


Link to post
Share on other sites

Woohoo ! Thanks tpw, and Fight9.

Now for the camera (ie within Zeus or VTS or MCC ?)

Share this post


Link to post
Share on other sites

A HUD with built in UAV monitors would be cool. I hope that is what you are creating. I've seen a couple addons/scripts lately that make use of the tactical glasses to add special HUD elements to the game. It's very 2035; so it fits well with Arma 3s style. I was surprised BIS didn't make use of those glasses from the start.

Use the command getConnectedUAV and then display that vehicles cameras with on screen resources. Very nice sounding concept. BIS did a similar thing in one of the showcase missions, but it wasn't exactly a HUD. If that isn't what you are creating, then I might do so myself. It sounds like a fun project.

I already have once UAV based script being worked on, I just need to find the motivation to finish it.

Share this post


Link to post
Share on other sites
A HUD with built in UAV monitors would be cool. I hope that is what you are creating. I've seen a couple addons/scripts lately that make use of the tactical glasses to add special HUD elements to the game. It's very 2035; so it fits well with Arma 3s style. I was surprised BIS didn't make use of those glasses from the start.

Use the command getConnectedUAV and then display that vehicles cameras with on screen resources. Very nice sounding concept. BIS did a similar thing in one of the showcase missions, but it wasn't exactly a HUD. If that isn't what you are creating, then I might do so myself. It sounds like a fun project.

I already have once UAV based script being worked on, I just need to find the motivation to finish it.

Have a look at TPW MODS, the 2035 HUD is the latest addition to that suite. Thanks to your help I've been able to add UAV functionality to the system. The HUD is networked, meaning that squad members wearing tac glasses share their target information. Adding a UAV to the mix means that the ground based squaddies will be aware of any targets that the UAV sees from its improved vantage point.

Share this post


Link to post
Share on other sites

Oh wow. And here I was trying to explain the return from these commands. You look to be leagues ahead of me in scripting abilities and knowledge. :o

Share this post


Link to post
Share on other sites

The topic is a bit old, but for future reference - there's a command called uavControl, which returns array with NULL at position 0 if player is not currently controlling a UAV (even if he's connected) - just in case somebody needs that.

Edited by DarkWanderer

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  

×