Jump to content
Sign in to follow this  
Jahve

Side visible markers

Recommended Posts

I'm wondering how to make certain markers only visible to east, and not west, and others not visible to east but only west..

The ofp-way I've heard of one can use to group markers with a unit on a side like an officer doesnt seem to work in arma...

Share this post


Link to post
Share on other sites

In ofp i used to do it this way:

you put in your init.sqs the following line:

? side player == west : goto "west"

and then have a the #west just setmarkertype "empty" all the east markers. That way the guys on west wont see any east markers.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

? side player == west : goto "west"

? side player == east : goto "east"

exit

#west

"eastmarker1" setmarkertype "empty"

exit

#east

"westmarker1" setmarkertype "empty"

exit

Share this post


Link to post
Share on other sites

That doesnt work. Because it only does it once, and it doesnt change it back. so if I look at the map as an US soldier, I wont see the East marker, but if then an SLA player looks at the map, he wont see the east marker OR the US marker. After that, noone will see the marker.

I did this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop

? side player == west : goto "west"

? side player == east : goto "east"

goto "loop"

#west

"bringflag2" setmarkertype "empty"

"b1" setmarkertype "empty"

"b2" setmarkertype "empty"

"b3" setmarkertype "empty"

"b4" setmarkertype "empty"

"b5" setmarkertype "empty"

"bringflag" setmarkertype "flag"

"a1" setmarkertype "dot"

"a2" setmarkertype "dot"

"a3" setmarkertype "dot"

"a4" setmarkertype "dot"

"a5" setmarkertype "dot"

gogo "loop"

#east

"bringflag" setmarkertype "empty"

"a1" setmarkertype "empty"

"a2" setmarkertype "empty"

"a3" setmarkertype "empty"

"a4" setmarkertype "empty"

"a5" setmarkertype "empty"

"bringflag2" setmarkertype "flag"

"b1" setmarkertype "dot"

"b2" setmarkertype "dot"

"b3" setmarkertype "dot"

"b4" setmarkertype "dot"

"b5" setmarkertype "dot"

goto "loop"

but then ArmA used to much processor power i had to reboot.

They did it in a way that works in MFCTI but I dont know how. Anyone know?

Share this post


Link to post
Share on other sites
Quote[/b] ]gogo "loop"

Now thats a funny command  whistle.gif

I assume thats a typo and U mean goto  wink_o.gif

And the reason U bring down ArmA is looping without delay...

In .sqs use " ~1"  or in .sqf use "sleep 1" to loop every second.

Share this post


Link to post
Share on other sites
biggrin_o.gif but then it should return an error not reckognizing "gogo"

Share this post


Link to post
Share on other sites
That doesnt work. Because it only does it once, and it doesnt change it back. so if I look at the map as an US soldier, I wont see the East marker, but if then an SLA player looks at the map, he wont see the east marker OR the US marker. After that, noone will see the marker.

I did this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop

? side player == west : goto "west"

? side player == east : goto "east"

goto "loop"

#west

"bringflag2" setmarkertype "empty"

"b1" setmarkertype "empty"

"b2" setmarkertype "empty"

"b3" setmarkertype "empty"

"b4" setmarkertype "empty"

"b5" setmarkertype "empty"

"bringflag" setmarkertype "flag"

"a1" setmarkertype "dot"

"a2" setmarkertype "dot"

"a3" setmarkertype "dot"

"a4" setmarkertype "dot"

"a5" setmarkertype "dot"

gogo "loop"

#east

"bringflag" setmarkertype "empty"

"a1" setmarkertype "empty"

"a2" setmarkertype "empty"

"a3" setmarkertype "empty"

"a4" setmarkertype "empty"

"a5" setmarkertype "empty"

"bringflag2" setmarkertype "flag"

"b1" setmarkertype "dot"

"b2" setmarkertype "dot"

"b3" setmarkertype "dot"

"b4" setmarkertype "dot"

"b5" setmarkertype "dot"

goto "loop"

but then ArmA used to much processor power i had to reboot.

They did it in a way that works in MFCTI but I dont know how. Anyone know?

Isn't setMarkerType only local effect?

In which case The Itch's technique works, Markers are changed locally only

Share this post


Link to post
Share on other sites

Using the .sqf format for scripts in ArmA:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">while{1 == 1}do{

if(side player == west)then{

if(markertype "bringflag" == "empty")then{"bringflag" setmarkertype "flag"};

"if(markertype _X == ""empty"")then{_X setmarkertype ""dot""}" foreach ["a1","a2","a3","a4","a5"];

}else{

if(markertype "bringflag" == "flag")then{"bringflag" setmarkertype "empty"};

"if(markertype _X == ""dot"")then{_X setmarkertype ""empty""}" foreach ["a1","a2","a3","a4","a5"];

};

if(side player == east)then{

if(markertype "bringflag2" == "empty")then{"bringflag2" setmarkertype "flag"};

"if(markertype _X == ""empty"")then{_X setmarkertype ""dot""}" foreach ["b1","b2","b3","b4","b5"];

}else{

if(markertype "bringflag2" == "flag")then{"bringflag2" setmarkertype "empty"};

"if(markertype _X == ""dot"")then{_X setmarkertype ""empty""}" foreach ["b1","b2","b3","b4","b5"];

};

sleep 5;

};

I have no idea if it works, and if it does how well it works. But you must run it locally (same goes for the .sqs style script you used), which means it has to run seperately for each player. The best way to do this is in the init.sqs (not sure how the init.sqs works in ArmA though, this script would have to be .sqf). If it's run globally (like from an init field in the editor - though again that may be different in ArmA) the script won't work correctly.

Also, I'm not sure about the foreach command, the biki says the first parameter is string, but in OFP you couldn't tell because both {} and "" worked interchangibly, and in ArmA code needs to be in {} and string in "". But anyway let me know if it works because I'd like to see how well I'm prepared for scripting in ArmA. tounge2.gif

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
Sign in to follow this  

×