Jump to content
  • 0

How can I add another safezone with infistar?


Link

Question

So ive tried modifying my safezone.sql script inside of my safezones\safezones.sql inside of my mission file to add a custom safe zone at the aircraft dealer but im not having any luck. Has anyone been able to achieve this? If so could you explain how I can add a custom safe zone at the aircraft dealer, thanks.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

1. Set "USE_POSITIONS" to true so it looks like:

USE_POSITIONS = true;

2. Add your coords into _infiSZ:

_infiSZ =
[
        [[6325.6772,7807.7412],200,true],
        [[4063.4226,11664.19],200,true],
        [[11447.472,11364.504],200,true],
        [[1606.6443,7803.5156],150,true],
        [[12944.227,12766.889],150,true],
        [[5068.6636,9723.4248],100,true], //<-- do not forget, last one NO COMMA but this isn't the last one anymore so COMMA
        [[Your,Position],RADIUS,true]
];

Remeber if a coordinate looks like:

[5068.6636,9723.4248,0.12345]

You have to take the Z out, so it looks like:

[5068.6636,9723.4248]

Optional: you can get the position using mission.sqm; search for the marker of the trader city, and copy paste it ;)

Have fun!

 

These coordinates that are inside of the mission file for the aircraft dealer don't work, could you reviser them for me? :)

12060.471,158.85699,12638.533

I have this in my mission.sqm file too in an attempt to set-up a sensor for the aircraft dealer, but it doesn't work because the "Now entering trading Zone" ,message isn't showing in-game and neither is the safe zone working itself.

		class Item5
		{
			position[]={12060.471,158.85699,12638.533};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonekrasnostav";
			expCond="(player distance zonekrasnostav) < 100;";
			expActiv="[""trader city Aircraft Dealer"",true,""enter""] spawn player_traderCity;";
			expDesactiv="[""trader city Aircraft Dealer"",true,""leave""] spawn player_traderCity;";
			class Effects
			{
			};
Link to comment
Share on other sites

  • 0

I think, it might be 

12060.471,12638.533

  :)

 

Okay I will try these, does this automatically create the entering and leaving message by adding this inside of the safezone sql file?

 

Nevermind, I got it working, thank you :)

Edited by EpiGamer
Link to comment
Share on other sites

  • 0

Here's mine (don't forget to change radius)

        [[6325.6772,7807.7412],100,true], //stary
        [[4063.4226,11664.19],60,true], //bash
        [[11447.472,11364.504],100,true], //klen
        [[1606.6443,7803.5156],100,true], //bandit
        [[12944.227,12766.889],100,true], //hero
	[[12066.9,12659.3],100,true] // aircraft
Link to comment
Share on other sites

  • 0

 

Here's mine (don't forget to change radius)

        [[6325.6772,7807.7412],100,true], //stary
        [[4063.4226,11664.19],60,true], //bash
        [[11447.472,11364.504],100,true], //klen
        [[1606.6443,7803.5156],100,true], //bandit
        [[12944.227,12766.889],100,true], //hero
	[[12066.9,12659.3],100,true] // aircraft

Thanks, do you have any idea how to make custom safezones locations where you can't build? I made one at the airfield and you can still build plotpoles inside of it :S

Link to comment
Share on other sites

  • 0

Thanks, do you have any idea how to make custom safezones locations where you can't build? I made one at the airfield and you can still build plotpoles inside of it :S

you edit mission.sqm for that found in your mission file.

Link to comment
Share on other sites

  • 0

you edit mission.sqm for that found in your mission file.

 

I tried adding it like so but it doesn't work like the others do, their sensors work and you can't build inside of them, the one I added is Item5

		};
		class Item4
		{
			position[]={12944.227,210.19823,12766.889};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonehero";
			expCond="(player distance zonehero) < 100;";
			expActiv="[""Hero Trader"",false,""enter""] spawn player_traderCity;";
			expDesactiv="[""Hero Trader"",false,""leave""] spawn player_traderCity;";
			class Effects
			{
                            soundDet="arabian_market_1";
			};
		};
		
		class Item5
		{
			position[]={12060.471,12638.533};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zoneaircraft_trader";
			expCond="(player distance zoneaircraft_trader) < 100;";
			expActiv="[""Aircraft Trader"",false,""enter""] spawn player_traderCity;";
			expDesactiv="[""Aircraft Trader"",false,""leave""] spawn player_traderCity;";
			class Effects
			{
                         soundDet="arabian_market_1";
			};
		};
	};
Link to comment
Share on other sites

  • 0

Make sure you also add item count on top of these classes

class Sensors
	{
		items=6;

You need to up an item count +1 from original for each sensor you add.

 

This is exactly what I have and the aircraft sensor is not working;

 

Edit: I have this as the right amount and the sensor still isn't triggering

Edited by Link
Link to comment
Share on other sites

  • 0

oh lol, you missed coords there. Infistar SZ script automatically does Z axis, since it's always 0 for these things anyway. Just so you know, in SQF files, coords are XYZ, but in mission.sqm coords are written as XZY (also in this case Z always has to be defined, too).

 

so for this to work you need to have it like this:

class Item5
		{
			position[]={12060.471,0,12638.533};
Link to comment
Share on other sites

  • 0

 

oh lol, you missed coords there. Infistar SZ script automatically does Z axis, since it's always 0 for these things anyway. Just so you know, in SQF files, coords are XYZ, but in mission.sqm coords are written as XZY (also in this case Z always has to be defined, too).

 

so for this to work you need to have it like this:

class Item5
		{
			position[]={12060.471,0,12638.533};

Ok thanks I wil try that out.Another quick question, why doesn't this music play whern I enter safe zones that do have sensors that are working e.g. hero trader

			class Effects
			{
                            soundDet="arabian_market_1";
			};

Ok it's working, the sound plays and it now says im in a trader city, the only porblem imhaving now is that the message "Now entering Trader City blah blah" isn't appearing at all, I have this in my code, is this right?

expCond="(player distance zoneaircraft_trader) < 100;";
			expActiv="[""Aircraft Trader"",false,""enter""] spawn player_traderCity;";
			expDesactiv="[""Aircraft Trader"",false,""leave""] spawn player_traderCity;"
Link to comment
Share on other sites

  • 0

Look at actual function

This is how it works:

 

You are sending and receiving 3 arguments to that function/file. In this case:

["Aircraft Trader",false,"enter"] spawn player_traderCity;

The receiving file will look for these 3 variables you send:

_traderName = _this select 0; //string
_showText = _this select 1; //boolean
_enterORleave = _this select 2; //string

So what this means is, if you change second argument to true, it will be showing the text. Get the idea?  :ph34r:

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...