Jump to content

class Sensors


khalcifer

Recommended Posts

Why i cant see Entering PVP Area, where have error (position cherno)

class Item15
        {
            position[]={6723.59,0.00143862,2583.92};
            a=450;b=450;
            TRGDEF
            name="PVP Area";
            expCond="(player distance zonePVPArea) < 450;";
            expActiv="TitleText[""Entering PVP Area"",""PLAIN DOWN""]; canbuild = false;";
            expDesactiv="TitleText[""Exiting PVP Area"",""PLAIN DOWN""]; canbuild = true;";
        };

Link to comment
Share on other sites

sqm files uses "reverse" coords. for example if u took your coords from a sqf file: 6723.59,0.00143862,2583.92 

to put this coords in a sqm file lime mission.sqm  you need change the pos of the coords by:  6723.59,2583.92, 0.00143862

If it is not your problem and the coords are right.. take a look on your class Item 15.  If is your last sensor then take a look on the top of class sensor you should be have this:

class Sensors
    {
        items=16;

Link to comment
Share on other sites

@khalcifer

other thing that you can try is replace your sensor by this:

 class Item15
        {
            position[]={6723.59,0.00143862,2583.92};
            a=400;
            b=400;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="PVPArea";
            expCond="(vehicle player) in thislist;";
            expActiv="PVPArea = [] execVM ""scripts\pvparea_enter.sqf"";";
            expDesactiv="terminate PVPArea; [] execVM ""scripts\pvparea_leave.sqf"";";
            class Effects
            {
            };
        };

 

pvparea_enter.sqf (mpmissions\your instance\scripts\ )

Spoiler

//pvparea_enter

private ["_txt"];
_txt = "<br/><t size='0.7' color='#ea2828' align='center'>PVP AREA!</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

canbuild = false;

//other code if u want

 

pvparea_leave.sqf (mpmissions\your instance\scripts\ )

Spoiler

private ["_txt"];
_txt = "<br/><t size='0.7' color='#eaa728' align='center'>LEAVING PVP AREA!</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

canbuild = true;

 

Link to comment
Share on other sites

btw my cords from infistar show pos 6723.59,2583.92,0.00143862

can you tell me what is 210?

class Item5
        {
            position[]={12944,210,12766};
            a=100;b=100;
            TRGDEF
            name="zonehero";
            expCond="(player distance zonehero) < 100;";
            expActiv="[""Heroes Trade Zone"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Heroes Trade Zone"",true,""leave""] call player_traderCity;";
        };

Link to comment
Share on other sites

Just now, khalcifer said:

thx i try it after restart, i dont have test server:(

{12944,210,12766     the value 210 in sqm means the altitude of this sensor..  in sqf  go at last this value  12944,12766,210

 

Others things to see.. im not 100% sure but i feel that you cannot use PVP AREA,  should be PVPAREA.

and here:

   a=450;b=450;
 TRGDEF

TRGDEF is defined at top of class sensors..

class Sensors
	{
		items=¿?¿?;
#define TRGDEF a=100;b=100;activationBy="ANY";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};

then youre overwriting it to set your own ratio. a=450;b=450;

but below you call again TRGDEF.. so im not sure if this works.

should be

class Item15
        {
            position[]={6723.59,0.00143862,2583.92};      
            TRGDEF
            a=450;b=450;
            name="PVPArea";

if u can paste your whole mission.sqm whould be much more easier help you.   use pastebin.com to paste it

Link to comment
Share on other sites

1 hour ago, juandayz said:

{12944,210,12766     the value 210 in sqm means the altitude of this sensor..  in sqf  go at last this value  12944,12766,210

 

Others things to see.. im not 100% sure but i feel that you cannot use PVP AREA,  should be PVPAREA.

and here:

   a=450;b=450;
 TRGDEF

TRGDEF is defined at top of class sensors..


class Sensors
	{
		items=¿?¿?;
#define TRGDEF a=100;b=100;activationBy="ANY";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};

then youre overwriting it to set your own ratio. a=450;b=450;

but below you call again TRGDEF.. so im not sure if this works.

should be


class Item15
        {
            position[]={6723.59,0.00143862,2583.92};      
            TRGDEF
            a=450;b=450;
            name="PVPArea";

if u can paste your whole mission.sqm whould be much more easier help you.   use pastebin.com to paste it

still not working:(

here is my class Sensors

Spoiler

class Sensors
    {
        items=16;
#define TRGDEF activationBy="WEST";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};
        class Item0
        {
            position[]={6325,304,7807};
            a=100;b=100;
            TRGDEF
            name="zonestary";
            expCond="(player distance zonestary) < 150;";
            expActiv="[""Trader City Stary!"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Trader City Stary!"",true,""leave""] call player_traderCity;";
        };
        class Item1
        {
            position[]={4063,365,11664};
            a=100;b=100;
            TRGDEF
            name="zonebash";
            expCond="(player distance zonebash) < 150;";
            expActiv="[""Trader City Bash!"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Trader City Bash!"",true,""leave""] call player_traderCity;";
        };
        class Item2
        {
            position[]={11447,317,11364};
            a=100;b=100;
            TRGDEF
            name="zoneklen";
            expCond="(player distance zoneklen) < 150;";
            expActiv="[""Trader City Klen!"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Trader City Klen!"",true,""leave""] call player_traderCity;";
        };
        class Item3
        {
            position[]={10049.321,304,5429.9766};
            a=100;b=100;
            TRGDEF
            name="zonestaroye";
            expCond="(player distance zonestaroye) < 150;";
            expActiv="[""Trader City Staroye!"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Trader City Staroye!"",true,""leave""] call player_traderCity;";
        };
        class Item4
        {
            position[]={1606,289,7803};
            a=100;b=100;
            TRGDEF
            name="zonebandit";
            expCond="(player distance zonebandit) < 100;";
            expActiv="[""Bandit Trade Zone"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Bandit Trade Zone"",true,""leave""] call player_traderCity;";
        };
        class Item5
        {
            position[]={12944,210,12766};
            a=100;b=100;
            TRGDEF
            name="zonehero";
            expCond="(player distance zonehero) < 100;";
            expActiv="[""Heroes Trade Zone"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Heroes Trade Zone"",true,""leave""] call player_traderCity;";
        };
        class Item6
        {
            position[]={12060,158,12638};
            a=100;b=100;
            TRGDEF
            name="zoneaircraft";
            expCond="(player distance zoneaircraft) < 100;";
            expActiv="[""Aviation trade area"",true,""enter""] call player_traderCity;";
            expDesactiv="[""Aviation trade area"",true,""leave""] call player_traderCity;";
        };
        //BLOCK BUILDINGS NEAR SAFEZONE
        class Item7
        {
            position[]={6325,304,7807};
            a=750;b=750;
            TRGDEF
            name="zonestaryblock";
            expCond="(player distance zonestaryblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item8
        {
            position[]={4063,365,11664};
            a=750;b=750;
            TRGDEF
            name="zonebashblock";
            expCond="(player distance zonebashblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item9
        {
            position[]={11447,317,11364};
            a=750;b=750;
            TRGDEF
            name="zoneklenblock";
            expCond="(player distance zoneklenblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item10
        {
            position[]={10049.321,304,5429.9766};
            a=750;b=750;
            TRGDEF
            name="zonestaroyeblock";
            expCond="(player distance zonestaroyeblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item11
        {
            position[]={1606,289,7803};
            a=750;b=750;
            TRGDEF
            name="zonebanditblock";
            expCond="(player distance zonebanditblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item12
        {
            position[]={12944,210,12766};
            a=750;b=750;
            TRGDEF
            name="zoneheroblock";
            expCond="(player distance zoneheroblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item13
        {
            position[]={12060,158,12638};
            a=750;b=750;
            TRGDEF
            name="zoneNEaircraftblock";
            expCond="(player distance zoneNEaircraftblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item14
        {
            position[]={4928.18,158,2393.08};
            a=750;b=750;
            TRGDEF
            name="zoneBalotablock";
            expCond="(player distance zoneBalotablock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
        class Item15
        {
            position[]={6723.59,0.00143862,2583.92};      
            TRGDEF
            a=450;b=450;
            name="PVPArea";
            expCond="(vehicle player) in thislist;";
            expActiv="PVPArea = [] execVM ""scripts\pvparea_enter.sqf"";";
            expDesactiv="terminate PVPArea; [] execVM ""scripts\pvparea_leave.sqf"";";
        };
        class Item16
        {
            position[]={4537.67,158,10270.7};
            a=750;b=750;
            TRGDEF
            name="zoneNWAirblock";
            expCond="(player distance zoneNWAirblock) < 750;";
            expActiv="canbuild = false;";
            expDesactiv="canbuild = true;";
        };
    };

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...