![]() |
|
#1
|
|||
|
|||
![]()
Now you can include any custom menu into your mission for players to use. See code example from naryv below.
The menu is called by pressing <Tab> +<4> I am thinking about some usage examples. I assume it allows for instance: - assign new waypoints to AI - request fighter support - request bomber missions - report recon mission results over recon target - spot enemy units, sending their pos to MP chat - vote for commander and officers in MP missions - allow officers to select next target, mission type, etc. for a side in MP - get any other feedback from players that a mission script may need Post your ideas below please ![]() Code:
using System; using System.Collections; using maddox.game; using maddox.game.world; public class Mission : AMission { private void setMainMenu( Player player ) { GamePlay.gpSetOrderMissionMenu( player, false, 0, new string[] { "1", "2", "3" }, new bool[] { true, false, false } ); } private void setSubMenu( Player player ) { GamePlay.gpSetOrderMissionMenu( player, true, 1, new string[] { "1-1", "1-2", "1-3" }, new bool[] { false, false, false } ); } public override void OnOrderMissionMenuSelected( Player player, int ID, int menuItemIndex ) { if( ID == 0 ) { // main menu if( menuItemIndex == 1 ) { GamePlay.gpHUDLogCenter("Menu selected Loading mission aaa2.mis"); GamePlay.gpPostMissionLoad("missions\\aaa2.mis"); setSubMenu( player ); } } else if( ID == 1 ) { // sub menu setMainMenu( player ); } } public override void OnPlayerConnected( Player player ) { if( MissionNumber == 0 ) { setMainMenu( player ); } } public override void Inited() { if( MissionNumber == 0 ) { setMainMenu(GamePlay.gpPlayer()); } } } |
#2
|
|||
|
|||
![]()
This opens up alot of possibilities. It would be nice if MG provided us with some examples to learn from.
![]() |
#3
|
|||
|
|||
![]()
Very interesting! +1
|
#4
|
|||
|
|||
![]()
maybe this is the secret new feature?
Battlefield commanding? Would be awesome! Have 1 comm on each side launch waves of attackers etc ![]() |
#5
|
|||
|
|||
![]()
Absolutely fantastic. That's exactly the "under the hood" features i was referring to.
Up till now the map had to populated via the FMB and depending on MP mode (coop or DF), the missions were either completely free form ad hoc sorties to some predefined targets in DF mode or completely predetermined sorties also made in the FMB in the case of coop mode. Currently we see that it's possible for the map to be populated by scripts that spawn AI ground units in a dynamic sandbox environment. Within a year of this game's release (and it's not that far away, we're 6 months in already) we might very well be able to plan our own sorties from within the server lobby to fly in such an environment. You return from a fighter sweep sortie and spot enemy movement on the ground? Mark the location on your map and upload it to your team. Another player sees that and throws down some waypoints to fly a photo reccon sortie. Assuming he returns home safely, a script with a time delay function produces a black and white screenshot that can be annotated via a custom menu. The player marks targets and compass points on the photo, attaches it as a slide to a map marked with the last known location of the enemy ground units and uploads it to his team again. Another player decides to fly an attack on that target, he draws up his waypoints, selects a loadout and spawns an aircraft group inviting other players to fly with him, if nobody does then the AI will fly with him. Of course aircraft are not unlimited, each base has a supply of total aircraft, usable aircraft, aircraft in the maintenance hangar, as well as ammo stores and fuel supplies, all replenished via AI ground columns, trains, transport planes, etc...if the supplies get attacked and destroyed on the way to the airfield you might not be able to use everything. But let's assume there is enough aircraft and supplies and enough players. So, they get invited to fly that raid, they spawn inside the previously AI aircraft and go fly. Then, the results of the sortie are tracked server side and this also influences supplies or frontline movement for the defending team. And so on... Fantasy? It was and still is, but i'm not sure it will be for much longer ![]() That's exactly the kind of stuff that can make this sim great in the long run and why it was worth it weathering through the initial storm of a rocky release and bugs. |
#6
|
|||
|
|||
![]()
Thanks Ataros, I'll have a play around.
One initial idea is that it would be great to be able to land in MP and then request a re-fuel and re-arm. I might try something simple in a SP mission first though. Edit: Here's one I did very quickly - all seems to work. Good job devs! http://simhq.com/forum/ubbthreads.ph...s/3385237.html Last edited by fearlessfrog; 09-08-2011 at 03:51 AM. Reason: Add code link |
![]() |
|
|