Jump to content

potentially stupid question


Raisuli

Recommended Posts

I'm having fun playing with moose lately, carving my initials with the sharpened end of a toothbrush and doing all those things...

 

Now I want to change the local environment, but to do that I need to know who I am, or more specifically an object handle for whoever opened the communications menu and selected F10->MENU_MISSION_COMMAND:Whatever.  I've found ways to step through every client, figure out if the client is controlled by a player, then checking the player name.  Is there no function to identify the unit that triggered the menu command?

Link to comment
Share on other sites

I'm pretty sure that menu commands can only be sent to everyone, or all members of a particular coalition, or all members of a  particular group. You can't direct menu commands to individual units. The only way around that is to put each client aircraft in its own group. Then by identifying the group, you've effectively identified the unit. That may or may not be workable for you depending on your scenario.


Edited by scrapple
Link to comment
Share on other sites

Maybe...I'm still wrapping my head around menus.  :Refresh() didn't do what I wanted and I ended up deleting and recreating a menu item that changed based on user input.  Not as pretty as I like.

 

At the end of the day the menu allows the pilot to set up an A2A engagement, and I wanted the pilot object (whoever that might be) to use as a reference for spawning the bandit.  A Fox3 engagement will need to be farther out than a guns-only fight.  There's a menu item to "Engage <plane type> <loadout> <skill level>" that changes as you select all of the above, but the sticking point is where the spawn happens and what the AI aircraft does once it spawns.

 

Really it's just a coding challenge since I decided to learn .lua and mission editing. 

 

Until I solve this there are other things to do, such as the logic that an F-5E can't do a Fox2HOBS loadout, or Fox1, or Fox3...and the user should be so informed.  I should just change the way the menus work...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...