Insta kill people who enters an area?

Jonassm

Well-Known Member
Hi everyone

I wanna insta kill, (first give some warnings obviously)
when my players enter Skalisty Island.
I'm doing this since i haven't added AI over there yet, which means that right now people can go over there and just... well, get good ol' weapons.
 
I would use a sensor in the mission.sqm

Make a new file in mission.pbo called skalistydie.sqf with this in it:
Code:
titleText ["Warning this area is out of bounds. If you do not turn back you will be killed.", "PLAIN DOWN", 3];
sleep 5;
titleText ["this is no joke", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 10;
titleText ["goodbye", "PLAIN DOWN", 3];
player setDamage 1;
};

Pretty simple to figure out, tells them to go away. If they don't it takes away all their stuff... if they still don't leave it auto kills them.

Then in your mission.sqm you need a sensor that looks like:

Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={put coords of middle of skalisty NOT database cords... editor coords};
            a=600;
            b=500;
            activationBy="west";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Skalisty";
            expCond="(vehicle player) in thislist;";
            expActiv="Skalisty = [] execVM ""skalistydie.sqf"";";
            expDesactiv="terminate Skalisty; titleText [""Thankyou for turning back from skalisty island"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="If you see this, the skalistydie.sqf is not working right but the sensor is!!";               
            };
        };
    };

Change the position to the middle of skalisty (need to get map editor coords not database ones. )

Change the a= and b= to w/e size the zone of skalitsy needs to be... not sure what the distances are just keep increasing decreasing until it covers skalisty but doesnt kick people on mainland
 
I would use a sensor in the mission.sqm

Make a new file in mission.pbo called skalistydie.sqf with this in it:
Code:
titleText ["Warning this area is out of bounds. If you do not turn back you will be killed.", "PLAIN DOWN", 3];
sleep 5;
titleText ["this is no joke", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 10;
titleText ["goodbye", "PLAIN DOWN", 3];
player setDamage 1;
};

Pretty simple to figure out, tells them to go away. If they don't it takes away all their stuff... if they still don't leave it auto kills them.

Then in your mission.sqm you need a sensor that looks like:

Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={put coords of middle of skalisty NOT database cords... editor coords};
            a=600;
            b=500;
            activationBy="west";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Skalisty";
            expCond="(vehicle player) in thislist;";
            expActiv="Skalisty = [] execVM ""skalistydie.sqf"";";
            expDesactiv="terminate Skalisty; titleText [""Thankyou for turning back from skalisty island"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="If you see this, the skalistydie.sqf is not working right but the sensor is!!";             
            };
        };
    };

Change the position to the middle of skalisty (need to get map editor coords not database ones. )

Change the a= and b= to w/e size the zone of skalitsy needs to be... not sure what the distances are just keep increasing decreasing until it covers skalisty but doesnt kick people on mainland


Okay...
In RPT log, nothing even shows up with sensor.
Nothing happens when i fly over.
expCond="(vehicle player) in thislist;";
thislist?

Also, why all the double "" and ;
 
Nothing should show up I don't think. I cant remember I never had to check it for this type of thing.

Did you put in the right coordinates? Should have gone into 3d editor made a item on skalisty. saved, changed to sqm, got the position of that item and copied it into the position part on this script.

Should work for flyovers since it only does xy rectangle thingies. Not sure how high though, i remember someone telling me they could fly over very high and halo onto, but triggered the sensor mid jump.

thislist is a list of people inside the sensor area.

Double "" for PLAIN DOWN is because it is already inside some " s so it escapes them and goes back in.

double ;'s are there because one ends the line inside the "" and the other ends the line outside the ""

ALSO in the .sqf i noticed I put }; at the end... remove that I was doing it quick and most of thought it was inside a statement for some reason.

faulty8 skype if it doesnt work and you want me to check it.
 
I tried this..

Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={[22.89,[5062.71,2477.97]]};
            a=600;
            b=500;
            activationBy="west";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Balota_alert";
            expCond="(vehicle player) in thislist;";
            expActiv="Balota_alert = [] execVM ""alerts/balota.sqf"";";
            expDesactiv="terminate Balota_alert; titleText [""Thankyou for turning back from Balota"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="If you see this, the Balota.sqf is not working right but the sensor is!!";               
            };
        };
    };

at the bottom of my mission.sqm file and I added

alerts/balota.sqf
Code:
titleText [">>>> WARNING <<<<<", "PLAIN DOWN", 3];
sleep 5;
titleText ["Entering C.Bandits Controlled Area..", "PLAIN DOWN", 3];
sleep 5;
titleText ["Alert us now or be shot!.", "PLAIN DOWN", 3];

but it didnt alert me when I went into the area, did I miss something ?
 
{[22.89,[5062.71,2477.97]]}; this looks wrong to me. Try getting the position by setting a marker in the 2d editor and saving the mission. Then find the mission and copy paste.
 
Yeah Tai, your position should look like this: {3685.94, 0.002, 14198.3}

You just put in a position from your sql database, that will not work. You need to place an item in the 3d editor. Save it. Convert to SQM (2D map) open it in notepad and find its position. :) that will look like something like what I posted above.
 
Back
Top