Jump to content
Sign in to follow this  
ashton324

Dialogue only working for one player?

Recommended Posts

Hey guys,

I have a made a dialogue in which you can control a firing range.. I.e putting the targets up and down and running target sequences etc. So me and a couple of other clan members were testing it lastnight on a server (on my machine) but for some reason only i could use the dialogue controls. They could see the dialogue and click the buttons but nothing would happen for them. If i click the buttons they would work i.e the targets would fall and they would see that etc..

I included:

if(!isServer)exitWith{};

in all of the scripts so i dont know if thats the problem or what.

Also one last thing the dialogue+scripts are called from a notebook on a table.

The notebook has this in its init line..

lap12 attachTo [tab12,[0,0,0.6]]; _lap12 = lap12 addAction ["Range Control", "dialogs\range1\create.sqf"];

create.sqf

_ranegcontrol1Dialog = createDialog "Range_Control"

Description.ext

Respawn = "BASE";
RespawnDelay = 3;
DisabledAI = true;

#include "R3F_ARTY_AND_LOG\desc_include.h"
#include "mission_settings\dialog\common.hpp"
#include "mission_settings\dialog\mission_settings.hpp"
#include "dialogs\range1\common.hpp"

class RscTitles
{
#include "R3F_ARTY_AND_LOG\desc_rsct_include.h"
};

#include "dialogs\range1\Range_Control.hpp"
#include "dialogs\range2\Range_Control_2.hpp"

Note: I have to ranges therefore 2 separate dialogues for each range. Same problem on both ranges.

Range_Control.hpp


class Range_Control
{
name=Range Control;
idd=-1;
movingEnable=1;
controlsBackground[]={frame, bg};
objects[]={};
controls[]={ra, lbn3, r4, r3, r2, r1, raise, close, ln43, ln44, ln22, ln1, L129A1, ln4, lan2, lane1, lsw, l85l4, l85l3, l85l2, l85, rset, l851, rsa, rs4, rs3, rs2, l1r};

class ra:RscButton
{
	idc=-1;
	text="Raise All";
	onButtonClick ="[] execVM 'range\raise1a.sqf';";
	x=0.429166666666667;
	y=0.735555555555556;
	w=0.0888888888888889;
	h=0.0388888888888889;
};

class lbn3:RscButton
{
	idc=-1;
	text="Lane 3";
	onButtonClick ="[] execVM 'range\lsw\slane3lsw.sqf';";
	x=0.322222222222222;
	y=0.525555555555556;
	w=0.0611111111111111;
	h=0.03;
};

class r4:RscButton
{
	idc=-1;
	text="Lane 4";
	onButtonClick ="[] execVM 'range\raise14.sqf';";
	x=0.480555555555556;
	y=0.691111111111111;
	w=0.0722222222222222;
	h=0.0344444444444444;
};

class r3:RscButton
{
	idc=-1;
	text="Lane 3";
	onButtonClick ="[] execVM 'range\raise13.sqf';";
	x=0.479861111111111;
	y=0.642222222222222;
	w=0.0708333333333333;
	h=0.0355555555555556;
};

class r2:RscButton
{
	idc=-1;
	text="Lane 2";
	onButtonClick ="[] execVM 'range\raise12.sqf';";
	x=0.375694444444444;
	y=0.691111111111111;
	w=0.075;
	h=0.0366666666666667;
};

class r1:RscButton
{
	idc=-1;
	text="Lane 1";
	onButtonClick ="[] execVM 'range\raise11.sqf';";
	x=0.377083333333333;
	y=0.642222222222222;
	w=0.0736111111111111;
	h=0.0355555555555556;
};

class raise:RscText
{
	idc=-1;
	text="Raise Targets";
	x=0.43125;
	y=0.6;
	w=0.0819444444444444;
	h=0.0333333333333333;
};

class close:RscButton
{
	idc=-1;
	text="Close";
	action="closeDialog 0;";
	x=0.561111111111111;
	y=0.737777777777778;
	w=0.0625;
	h=0.0311111111111111;
};

class ln43:RscButton
{
	idc=-1;
	text="Lane 4";
	onButtonClick ="[] execVM 'range\lsw\slane4lsw.sqf';";
	x=0.55;
	y=0.521111111111111;
	w=0.0534722222222222;
	h=0.0311111111111111;
};

class ln44:RscButton
{
	idc=-1;
	text="Lane 2";
	onButtonClick ="[] execVM 'range\lsw\slane2lsw.sqf';";
	x=0.479861111111111;
	y=0.524444444444444;
	w=0.0569444444444444;
	h=0.0311111111111111;
};

class ln22:RscButton
{
	idc=-1;
	text="Lane 3";
	onButtonClick ="[] execVM 'range\lsw\slane3lsw.sqf';";
	x=0.548611111111111;
	y=0.481111111111111;
	w=0.0541666666666667;
	h=0.0288888888888889;
};

class ln1:RscButton
{
	idc=-1;
	text="Lane 1";
	onButtonClick ="[] execVM 'range\lsw\slane1lsw.sqf';";
	x=0.479861111111111;
	y=0.481111111111111;
	w=0.0555555555555556;
	h=0.0288888888888889;
};

class L129A1:RscText
{
	idc=-1;
	text="L129A1";
	x=0.513194444444444;
	y=0.43;
	w=0.0638888888888889;
	h=0.0322222222222222;
};

class ln4:RscButton
{
	idc=-1;
	text="Lane 4";
	onButtonClick ="[] execVM 'range\lsw\slane4lsw.sqf';";
	x=0.39375;
	y=0.525555555555556;
	w=0.0618055555555556;
	h=0.03;
};

class lan2:RscButton
{
	idc=-1;
	text="Lane 2";
	onButtonClick ="[] execVM 'range\lsw\slane2lsw.sqf';";
	x=0.397222222222222;
	y=0.483333333333333;
	w=0.05625;
	h=0.0288888888888889;
};

class lane1:RscButton
{
	idc=-1;
	text="Lane 1";
	onButtonClick ="[] execVM 'range\lsw\slane1lsw.sqf';";
	x=0.324305555555556;
	y=0.483333333333333;
	w=0.0590277777777778;
	h=0.0288888888888889;
};

class lsw:RscText
{
	idc=-1;
	text="LSW";
	x=0.370138888888889;
	y=0.43;
	w=0.0618055555555556;
	h=0.0322222222222222;
};

class l85l4:RscButton
{
	idc=-1;
	text="Lane 4";
	onButtonClick ="[] execVM 'range\l85\slane4l85.sqf';";
	x=0.527777777777778;
	y=0.361111111111111;
	w=0.0701388888888889;
	h=0.0311111111111111;
};

class l85l3:RscButton
{
	idc=-1;
	text="Lane 3";
	onButtonClick ="[] execVM 'range\l85\slane3l85.sqf';";
	x=0.528472222222222;
	y=0.322222222222222;
	w=0.06875;
	h=0.0288888888888889;
};

class l85l2:RscButton
{
	idc=-1;
	text="Lane 2";
	onButtonClick ="[] execVM 'range\l85\slane2l85.sqf';";
	x=0.529166666666667;
	y=0.286666666666667;
	w=0.06875;
	h=0.0277777777777778;
};

class l85:RscText
{
	idc=-1;
	text="L85A2";
	x=0.530555555555556;
	y=0.2;
	w=0.0652777777777778;
	h=0.0355555555555556;
};

class rset:RscText
{
	idc=-1;
	text="Lower Targets";
	x=0.370138888888889;
	y=0.196666666666667;
	w=0.0972222222222222;
	h=0.0411111111111111;
};

class l851:RscButton
{
	idc=-1;
	text="Lane 1";
	onButtonClick ="[] execVM 'range\l85\slane1l85.sqf';";
	x=0.529166666666667;
	y=0.244444444444444;
	w=0.0673611111111111;
	h=0.0311111111111111;
};

class rsa:RscButton
{
	idc=-1;
	text="All Lanes";
	onButtonClick= "[] execVM 'range\reset1a.sqf';";
	x=0.365277777777778;
	y=0.323333333333333;
	w=0.102777777777778;
	h=0.0433333333333333;
};

class rs4:RscButton
{
	idc=-1;
	text="Lane 4";
	onButtonClick= "[] execVM 'range\reset14.sqf';";
	x=0.433333333333333;
	y=0.281111111111111;
	w=0.0645833333333333;
	h=0.0333333333333333;
};

class rs3:RscButton
{
	idc=-1;
	text="Lane 3";
	onButtonClick="[] execVM 'range\reset13.sqf';";
	x=0.432638888888889;
	y=0.246666666666667;
	w=0.0652777777777778;
	h=0.0322222222222222;
};

class rs2:RscButton
{
	idc=-1;
	text="Lane 2";
	onButtonClick= "[] execVM 'range\reset12.sqf';";
	x=0.332638888888889;
	y=0.282222222222222;
	w=0.0631944444444444;
	h=0.0355555555555556;
};

class l1r:RscButton
{
	idc=-1;
	text="Lane 1";
	onButtonClick="[] execVM 'range\reset11.sqf';";
	x=0.332638888888889;
	y=0.243333333333333;
	w=0.0645833333333333;
	h=0.0344444444444444;
};

class frame:RscBgFrame
{
	idc=-1;
	text="Lane 1";
	x=0.301388888888889;
	y=0.164444444444444;
	w=0.338194444444444;
	h=0.617777777777778;
};

class bg:RscBackground
{
	idc=-1;
	x=0.301388888888889;
	y=0.166666666666667;
	w=0.338888888888889;
	h=0.616666666666667;
};
};

init.sqf (not the main init.sqf this is for the dialogue)

lap12 addAction [
("<t color='#FFFFFF'>" + "Range Control" + "</t>"), 
"dialogs\range1\create.sqf", [], 0, false
];

As i said if you need to see the range scripts just ask.

Thanks,

Ashton.

Edited by ashton324

Share this post


Link to post
Share on other sites

If you were running the mission from your machine as a local host, it is possible (I have not checked or verified) that popups have to be controlled where they are local (on the server) so even though your mates can open the dialog, the popups are not local on their machines so they cannot control them.

Share this post


Link to post
Share on other sites

Well this will eventually be run on a dedi server. So how would i go about making this dialogue run so that anybody can control it?

Would removing the

if(!isServer)exitWith{};

make a difference?

Thanks for the fast reply btw!

Share this post


Link to post
Share on other sites

Try removing the !isServer check first and see if that works. If it does not, you will need to ensure remote execution via BIS_fnc_MP or manually via public variables and event handlers.

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  

×