Jump to content
  • 0

Non-AGN Safe Zone Markers


Havoc302

Question

I'm trying to setup markers at varying distances from our traders, building blocked at 1000m. God mod enabled, weapons can't fire at 700m and no backpack stealing at 100m, I have separate markers for all these but how do you define what marker gets what effect? At present everything except the backpack seems to take effect at the 1000m mark. If anyone knows it'd be much appreciated.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

you could do something like -

while {true} do {

    if (player distance _trader_position < 700) then {
        variable1 = true;
    } else {
        variable1 = false;
    };

    if (player distance _trader_position < 100) then {
        variable1 = true;
    } else {
        variable1 = false;
    };

};

that way, the variables would tick on in sequence, and tick off in reverse.

 

then, in the mission.sqm file go to 'class Sensors' and change the radius of each sensor to the traders to 1000.

then go into AGN, find the parts relating to each subject and put them in an if statement.

 

so,

if (variable1) then { 
    disable firing of guns
};

if (variable2) then {
    enable backpack protection
};

you wouldn't need to adda variable for building as the 'canbuild' variable in the sensor already deals with that.

this is very simplified but hopefully it gives you an idea of how you can go about it

Link to comment
Share on other sites

  • 0

Effectively, yes.  I did something similar because I didn't want safe zones for all traders, just specific ones... I added a variable next to the canbuild call in mission.sqm and set it to true just for the zones I wanted as safe.  I then changed AGN to use the new variable instead of canbuild.

 

Since you are looking for different effects for different ranges, you could use canbuild for one and the new variable for another.  Etc.

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
  • Advertisement
  • Discord

×
×
  • Create New...