Jump to content
Sign in to follow this  
Jubal Savid

Menu based missions

Recommended Posts

I have a idea for something akin to "altis life" but with two waring factions whose fighting hinders  the civilian player's goals 

I want the game to be based around a UN peace keeping mission.

The UN players try to counter the actions of the terrorist factions while the civilians try to earn money to arm themselves against the terrorists or make there own cause etc. 

I want the terrorist leader to be able to issue mission objects via a computer, similar to the altis life shop menus. 

The leader will see options like "Terrorize Villiage 1, kidnap 10 slaves from village 2, destroy the church in village 3 "

When he selects one of these it will create a objective on the map for the terrorist team. 

Ideally they could only do one at a time and they would be awarded funds for completing each mission to by better shit or ai friends. 

How would one go about creating a menu, like the shops in altis life?

 

Share this post


Link to post
Share on other sites

Honestly, this is the sort of thing you should be trying to work through one step at a time. There's a number of things in your brief description that you are asking for help with, and each of them can very easily become a rather complex challenge if you don't understand sqf. There's literally (well, figuratively) tonnes of topics on each of the tasks you're going to need help with. So google/learn/google/learn until you hit a brick wall and then ask around for some help. 

 

But, to help you get started, menus are dialogs. Research how to create an in-game menu and try to work from there (there are a few good dialog tutorials out there), but I'll put an example below of a fairly simple dialog/menu I made which shows a few weapon pictures and allows players to pick one of two roles:

Spoiler

class loadoutMenu
{
	idd = 2000;
	movingenable = false;
	onLoad = "[] spawn MIL_fnc_weaponPictures";

	class Controls
	{

	////////////////////////////////////////////////////////
	// GUI EDITOR OUTPUT START (by Millenwise, v1.063, #Belagy)
	////////////////////////////////////////////////////////
	class background: RscPicture
	{
		idc = 1998;
		text = "pics\background.jpg";
		x = 4 * GUI_GRID_W + GUI_GRID_X;
		y = 5 * GUI_GRID_H + GUI_GRID_Y;
		w = 32 * GUI_GRID_W;
		h = 19.5 * GUI_GRID_H;
		moving = false;
	};
	class Border: RscFrame
	{
		idc = 1999;
		x = 4 * GUI_GRID_W + GUI_GRID_X;
		y = 5 * GUI_GRID_H + GUI_GRID_Y;
		w = 32 * GUI_GRID_W;
		h = 19.5 * GUI_GRID_H;
		colorText[] = {0,0,0,1};
		colorBackground[] = {0,0,0,1};
		colorActive[] = {0,0,0,1};
	};
	class loadoutMenu_Heading: RscStructuredText
	{
		idc = 2001;
		text = "<br/><t shadow='1'><t size='1.9'><t align='center'>Loadout Menu</t></t></t>"; //--- ToDo: Localize;
		x = 11 * GUI_GRID_W + GUI_GRID_X;
		y = 0 * GUI_GRID_H + GUI_GRID_Y;
		w = 18 * GUI_GRID_W;
		h = 4 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
	};
	class MainRole_Optics: RscPicture
	{
		idc = 2002;
		text = "";
		x = 7 * GUI_GRID_W + GUI_GRID_X;	//7
		y = 7 * GUI_GRID_H + GUI_GRID_Y;	//8.5
		w = 4 * GUI_GRID_W;	//4
		h = 4 * GUI_GRID_H;	//2
	};
	class MainRole_Primary: RscPicture
	{
		idc = 2003;
		text = "";
		x = 4 * GUI_GRID_W + GUI_GRID_X;
		y = 9.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 10 * GUI_GRID_W;
		h = 5 * GUI_GRID_H;
	};
	class MainRole_Secondary: RscPicture
	{
		idc = 2004;
		text = "";
		x = 5 * GUI_GRID_W + GUI_GRID_X;
		y = 16.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 8 * GUI_GRID_W;
		h = 8 * GUI_GRID_H;
	};
	class AlternateRole_Optics: RscPicture
	{
		idc = 2005;
		text = "";
		x = 29 * GUI_GRID_W + GUI_GRID_X;	//29
		y = 7 * GUI_GRID_H + GUI_GRID_Y;	//8.5
		w = 4 * GUI_GRID_W;	//4
		h = 4 * GUI_GRID_H;	//2
	};
	class AlternateRole_Primary: RscPicture
	{
		idc = 2006;
		text = "";
		x = 26 * GUI_GRID_W + GUI_GRID_X;
		y = 9.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 10 * GUI_GRID_W;
		h = 5 * GUI_GRID_H;
	};
	class AlternateRole_Secondary: RscPicture
	{
		idc = 2007;
		text = "";
		x = 27 * GUI_GRID_W + GUI_GRID_X;
		y = 16.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 8 * GUI_GRID_W;
		h = 8 * GUI_GRID_H;
	};
	class DescriptionRole_Heading: RscStructuredText
	{
		idc = 2008;
		text = "<t shadow='1'><t size='1'><t align='center'>&lt; - - - - - Role - - - - - &gt;<br/>(click to choose)</t></t></t>"; //--- ToDo: Localize;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 5 * GUI_GRID_H + GUI_GRID_Y;
		w = 11 * GUI_GRID_W;
		h = 2 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
	};
	class Description_Primary: RscStructuredText
	{
		idc = 2009;
		text = "<t shadow='1'><t size='1'><t align='center'>&lt; - - - - - Primary - - - - - &gt;</t></t></t>"; //--- ToDo: Localize;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 11 * GUI_GRID_H + GUI_GRID_Y;
		w = 11 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
	};
	class Description_Secondary: RscStructuredText
	{
		idc = 2010;
		text = "<t shadow='1'><t size='1'><t align='center'>&lt; - - - - - Secondary - - - - - &gt;</t></t></t>"; //--- ToDo: Localize;
		x = 14.5 * GUI_GRID_W + GUI_GRID_X;
		y = 20 * GUI_GRID_H + GUI_GRID_Y;
		w = 11 * GUI_GRID_W;
		h = 1 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
	};
	class MainRole_Button: RscButton
	{
		idc = 2011;
		text = "Main"; //--- ToDo: Localize;
		x = 4 * GUI_GRID_W + GUI_GRID_X;
		y = 5 * GUI_GRID_H + GUI_GRID_Y;
		w = 10 * GUI_GRID_W;
		h = 2 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
		sizeEx = 1.5 * GUI_GRID_H;
		action = "player setVariable ['loadout',1,false]; player setVariable ['chatLoadout',true,false]; [] call MIL_fnc_loadoutType; closeDialog 0;";
	};
	class AlternateRole_Button: RscButton
	{
		idc = 2012;
		text = "Alternate"; //--- ToDo: Localize;
		x = 26 * GUI_GRID_W + GUI_GRID_X;
		y = 5 * GUI_GRID_H + GUI_GRID_Y;
		w = 10 * GUI_GRID_W;
		h = 2 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
		sizeEx = 1.5 * GUI_GRID_H;
		action = "player setVariable ['loadout',2,false]; player setVariable ['chatLoadout',true,false]; [] call MIL_fnc_loadoutType; closeDialog 0;";
	};
	class Exit_Button: RscButton
	{
		idc = 2013;
		text = "Exit (keep current)"; //--- ToDo: Localize;
		action = "closeDialog 0";
		x = 30 * GUI_GRID_W + GUI_GRID_X;
		y = 1 * GUI_GRID_H + GUI_GRID_Y;
		w = 9 * GUI_GRID_W;
		h = 2 * GUI_GRID_H;
		colorText[] = {1,1,1,1};
		colorBackground[] = {0,0.2,0,1};
		colorActive[] = {0,0.2,0,1};
		sizeEx = 1 * GUI_GRID_H;
	};
	////////////////////////////////////////////////////////
	// GUI EDITOR OUTPUT END
	////////////////////////////////////////////////////////
	};
};

 

 

Not trying to discourage you, but just giving you an understanding that making something like what you are talking about has a lot of variables that need to be considered, that is beyond a mere "Help me make this" kind of request. If you want to make something like what you're asking for, you're going to need to start wrapping your head around the basics. Just think, what happens after you've selected the mission you want spawned:

- What 2D/3D position will the mission take place at?

- How big of an area needs to be selected for what type of mission is being created?

- Does the area need to be flat?

- Do you need to search through each city/town location to find a class of building instead of using an area?

- How far away from what player/s, position/s do you want the mission to potentially spawn?

- How many/what class of enemy?

- Are they enemy going to occupy available buildings?

- etc, etc, etc

 

There's a lot more to consider, but that's just some stuff off the top of my head, that you should really try to work out yourself first. Otherwise you'll only be asking generic questions and probably not getting the answers you're looking for. But, like I said, a google search will work wonders if you put some thought and planning in and think work through things one step at a time. It's how I had to learn, I never had a background in IT/coding/software development. But it is certainly doable.

  • Like 1

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  

×