Protective domes

tayamart

New Member
Code:
class Sensors
{
items=2;
class Item0
{
position[]={867.911,0.001,5644.67};
a=100;
b=150;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""Drewdome.sqf"";";
expDesactiv="terminate dome; titleText [""You are now out of restricted area, you may proceed playing."", ""PLAIN DOWN"", 3];";
class Effects
{
class Item1
{
position[]={1841.15,0.001,8618.25};
a=100;
b=150;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""puffmellowdome.sqf"";";
expDesactiv="terminate dome; titleText [""You are now out of restricted area, you may proceed playing."", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};
};

Hello,

I'm trying to add a second dome I followed the dayz.ST tutorial, but my question being is: How do I add a second dome? I know my problem is the closing brackets but I have no clue where to correctly place them since my coding experience is fairly limited.
Could someone please explain to me in a simple way how to do this?

Thanks in advanced.

(The first dome worked, just adding the second one has been a pain.)

Tayamart.
 
You need to create a second dome script and name it...dome, for example.

Take these lines here:
interruptable=1;
age="UNKNOWN";
name="dome1"; <---- Make the name "dome1";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome1.sqf"";"; <---- ""dome1.sqf"";";

Now this is a peice of the first dome. You have it done.

To make a second dome you need to do this.
Use the dome script again...but change the coords for the new dome, and name it differently.
Example:
interruptable=1;
age="UNKNOWN";
name="dome2"; <---- Make the name "dome2";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome2.sqf"";"; <---- Make this ""dome2.sqf"";";

You only need to make sure you name the second dome differently from the first
and add the new coordinates for the next dome.

You can name the dome(s) anything you like, but yo have to have a separate/individual script(s) for each dome.
 
So if I just change the names everything should be working correctly? ( I ofcourse have seperate scripts for them, I just need to change the name of the dome). The brackets I mentioned earlier are good too? All of them are closed properly? Because my RPT gave me this error: [13-12-2013 23:22:49] Syphron: 22:17:31 File mpmissions\__cur_mp.chernarus\mission.sqm, line 969: '/Mission/Sensors/Item0/Effects/Item1.rectangular': Missing ';' at the end of line

Line 969 being: Class effects ( the class effects of the new dome I want to add). I know it means that the brackets are not closed off properly or something like that.

I hope you can help me

Tayamart.
 
Also understand you have to execute all scripts separately, i.e.:

In your init.sqf:
[] execVM "dome1.sqf";
[] execVM "dome2.sqf";
[] execVM "dome3.sqf";
etc.
etc.

Here is mine, I have 8 domes all in a folder called "dome"....:

Code:
class Sensors
    {
        items=8;
        class Item0        //Echo Base, West of Zelenogorsk
        {
            position[]={2062.7261,50.00,5254.9678};
            a=30;
            b=35;
            angle=27.797501;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="dome1";
            expCond="(vehicle player) in thislist;";
            expActiv="dome = [] execVM ""dome\dome1.sqf"";";
            expDesactiv="terminate dome; titleText [""Stay safe and come back alive."", ""PLAIN DOWN"", 3];";
            class Effects
            {
            };
        };
        class Item1        //Delta Base, East Coast, near 3 Valleys
        {
            position[]={13379.92,50.00,4943.6489};
            a=30
            b=35;
            angle=35;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="dome2";
            expCond="(vehicle player) in thislist;";
            expActiv="dome = [] execVM ""dome\dome2.sqf"";";
            expDesactiv="terminate dome; titleText [""Stay safe and come back alive."", ""PLAIN DOWN"", 3];";
            class Effects
            {
            };
        };
        class Item2        //Charlie Base, North of NWAF
        {
            position[]={3987.2581,50.00,11649.839};
            a=30;
            b=35;
            angle=50;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="dome3";
            expCond="(vehicle player) in thislist;";
            expActiv="dome = [] execVM ""dome\dome3.sqf"";";
            expDesactiv="terminate dome; titleText [""Stay safe and come back alive."", ""PLAIN DOWN"", 3];";
            class Effects
            {
            };
        };

This is just a snippet from 3 of my domes.

Compare yours to mine. You should be able to find the error. Don't forget to look over the actual dome script also. Refer to here if you need to: http://dayz.st/w/Protected_Dome

This dome script works perfect if you follow the instructions.

Also, realize you must have the "class Sensors" starting ahead of "class Markers". If you review your work and refer to the link provided, you will find your mistake or error.

Cheers.
 
@Tayamart
check your log and look at your sensors again, then you will see the errror you have ... as rpt says, you are missing a ";".

@Chris Atkins
you are actually wrong here, there is no need to exec these scripts in the init and you can without problems use same script for multiple domes if the sensor is setup right.
also you have a small "error/mistake" while execing your domes, (it might never happend, but) if someone was to go to one dome first and then another, he could possibly get the effect of the first dome.
to prevent this from happending, you wanna change the dome exec variable on each dome to something uniqe or to same as script name maybe ... like dome1 for dome1.sqf and so on ...

also i dont think it actually matters if class sensor is before or after markers ... on epoch sensors are now placed after markers by default!
 
@Halvhjearne
Yeah, I keep all my domes separate for organizational purposes. I know they can be ran from one script. I'm was trying to keep it simple in my explanation for tayamart.

to prevent this from happending, you wanna change the dome exec variable on each dome to something uniqe or to same as script name maybe ... like dome1 for dome1.sqf and so on ...

If you look at my code, I have dome1, dome2, and dome3, all being executed from their own individual sqf.
 
If you look at my code, I have dome1, dome2, and dome3, all being executed from their own individual sqf.

not exactly ... you changed the script name, yes ... but your neglected to change the variable name that execs the dome in the first place.
it can be the same if all domes are the same (and script can be same script aswell) but else it might exec first dome script if first dome is entered and left and second dome is entered after.
(even tho script names are diffrent)
not saying this will ever happend, but personally i would change that, just in case ...
 
Back
Top