Jump to content
Moerderhoschi

UnitAreasOnMap Script // Easy to use

Recommended Posts

Great idea

working with it now

Edited by redarmy

Share this post


Link to post
Share on other sites

Hey, very nice script! Great work!

I am trying to put it into a TDM match in an enclosed space. Is there a way to display different markers to East and West and is there a way to reduce the size of the boxes that enemies are displayed in?

Thanks! I know its not quite what is was designed for but thought I'd ask :D

Share this post


Link to post
Share on other sites

Hello, im new to this stuff so please be forgiving. So far i havent got any script runing and i tried the easy ones, but also its my first day of working with these files. Everyone seems to find this easy.... so please help me out here...

did i understand correctly that the code can be pasted into the init.sqf?

for a start i would like this effect all over the map quite simply. i have the following code in the init.sqf otherwise it is empty:

0=[ [ [0,0],[20000,20000]],1,[0,0], "blue", 0.6,"east"] spawn ........

i dont understand exactly what the starting position is for so i chose [0,0] because i thought that is the buttom left corner of the map...

next the size is [20000,20000], i use AlRayak and that has 20kmx20km. so all over the map i presumed...

refresh at 1 second... i tried to use the [10,5,30] as well as [10,5,0] no effect...

east and west i both tried.

so when ive got this going i would like to know how the other thing here works, i guess thats possible using this in the init of a trigger in the editor?:

Thanks for the update, works great!

I found a neat little way of using this, I attachTo the trigger to a UAV Greyhawk and kind of think of it like a UAV operator relaying the information, that way I can get this funcion anywhere on the map and still have some limitations to it :)

Again, many thanks.

as mentioned i got nothing really working so far (although some scripts showed some effects, but not workable). i must be doing something wrong in principle

edit: the version in the trigger works fine with all parameters. really nice. just would like how to include this in the init.sqf of my maps or potentially add this function to triggered spawns sqf files. maybe in similar ways as was described above. i would find recon troups great that could cover a certain area and would announce enemy movement on the map and maybe even announce the grid in the side channel.

edit2: i would also appreciate if anyone had an idea how to combine this with a proximity trigger so it only works if a unit (of a certain side) is in reach of that other trigger. Maybe like a radar station.... and how to make this visible only to one side

Edited by Fetzen

Share this post


Link to post
Share on other sites
Is there a way to display different markers to East and West

The markers are created global by the Server, so everybody sees the same on the map. If two sides in the same area two markers are created by the server. If you want that different sides see different markers, you have to change some parts of the script, like the isServer check and change it to a unit side check and you have to use createMarkerLocal instead of createMarker.

is there a way to reduce the size of the boxes that enemies are displayed in?

no, this is currently not possible

did i understand correctly that the code can be pasted into the init.sqf?

yes and no, the nonTrigger version like - 0 = [ [ [3000 , 4000] , [1000 , 2000] ] ] spawn {...} - yes, the Trigger version like - 0 = [ ThisTrigger ] spawn {...} - no

just would like how to include this in the init.sqf

this works for me in the init - 0 = [ [ [0,0] , [20000,20000] ] ] spawn {...}

how to make this visible only to one side

like above described you have to create the marker local and change the server check with an side check

i also added the readable version of the script in the start post.

regards

Moerderhoschi

Share this post


Link to post
Share on other sites

Thanks for your reply Moerderhoschi! And thanks again, its a great script - and I understand i'm trying to do things with it it wasn't designed for! :rolleyes:

Sorry for another question/suggestion but I was wondering if there was a good way to enter/exit from the script while scriptLife=0.

I was going to use it in a trigger so when your in a trigger it works and when you leave it stops. Maybe create a variable or change one in the script.

So for example:

On act: nul = execVM "MoerderhoschisGreatScript.sqf"; scriptContinueVariable = true;

On deact: scriptContinueVariable = false;

(The idea came from messing with your _exitScript variable and making it global with no success. My very limited knowledge probably didn't help!)

Thanks! :rthumb:

Share this post


Link to post
Share on other sites
I was wondering if there was a good way to enter/exit from the script while scriptLife=0.

I was going to use it in a trigger so when your in a trigger it works and when you leave it stops. Maybe create a variable or change one in the script.

So for example:

On act: nul = execVM "MoerderhoschisGreatScript.sqf"; scriptContinueVariable = true;

On deact: scriptContinueVariable = false;

(The idea came from messing with your _exitScript variable and making it global with no success. My very limited knowledge probably didn't help!)

add the following lines, and you should get what you want.

 

        if (_scriptLifeTime > 0) then
        {
            if (time > (_scriptStartTime + _scriptLifeTime)) then
            {
                _exitScript = true;
            };
        };
        
        // ADD THE FOLLOWING LINES - START
        if ( !isNil "scriptContinueVariable" && {!scriptContinueVariable} ) then
        {
            _exitScript = true;
        };
        // END

        if (_exitScript) exitWith
        {
            {deleteMarker _x} forEach _markers;
        };

regards

Moerderhoschi

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×