Jump to content
Sign in to follow this  
Impavido

Hiding the map

Recommended Posts

I want to use the "showmap false" command for specific sides or players. How would I do this, so that one side has map and other doesn't. I guess it might have something to do with local variables but I'm not familiar with those confused.gif

Share this post


Link to post
Share on other sites

maybe put this into units init ?

or if that wont work setup triggers for the units you dont want to have map and put it into OnActivation.

Share this post


Link to post
Share on other sites

I don't think you can change the showmap value once the game has begun, but I could be wrong. If I am wrong, and you CAN change it in-game:

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

? (!local): exit

? _this == player1: showmap true

<span id='postcolor'>

You get the idea...

Share this post


Link to post
Share on other sites

hehehee confused.gif actually I don't get it. Please clarify on your suggestion smile.gif how exactly would that code sample work?

Share this post


Link to post
Share on other sites

Maybe I need to be more specific, i want to be able for a team to blow up a radio tower. When that tower is down the oposing team is blind on their map, How would you do this?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Impavido @ Nov. 20 2002,19:51)</td></tr><tr><td id="QUOTE">Maybe I need to be more specific, i want to be able for a team to blow up a radio tower. When that tower is down the oposing team is blind on their map, How would you do this?<span id='postcolor'>

Well, assuming you CAN disable the map (I would test that first - put it in your init field and see if you can see the map).

TRIGGER: (once)

CONDITION: !alive mytower

ACTIVATION: player1 showmap false; player2 showmap false

But the 'showmap' may not take that, so you'd have to check the player names in a script:

? (!local): exit

? _this == player1: showmap false

? _this == player2: showmap false

So then your trigger would look more like:

TRIGGER: (once)

CONDITION: !alive mytower

ACTIVATION: player1 exec "myscript.sqs"; player2 exec "myscript.sqs"

Share this post


Link to post
Share on other sites

Makes good sense, thanks but how exactly does that keep only one side from not seeing map? would I have to add some sort of "?(player1==east): showmap false"

I get the impression that the code you gave would remove map for everyone, or am I wrong?

PS- the Map can be removed and restored ingame, i tested it

Share this post


Link to post
Share on other sites

I think it can be done by executing one-line script after destroying radio tower :

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

?(side player==east): showmap false

<span id='postcolor'>

From official scripting reference :

player

Type of returned value:

   Object

Description:

   person controled by player. In MP this value is different on each computer.

But I have no oportunity to test if showmap false disables map only for local player or for all units in game.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Bart.Jan @ Nov. 20 2002,22:16)</td></tr><tr><td id="QUOTE">I think it can be done by executing one-line script after destroying radio tower :

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

?(side player==east): showmap false

<span id='postcolor'>

From official scripting reference :

player

Type of returned value:

Object

Description:

person controled by player. In MP this value is different on each computer.

But I have no oportunity to test if showmap false disables map only for local player or for all units in game.<span id='postcolor'>

EVEN BETTER! Geeze I am such a script newbie compared to guys like this!

Share this post


Link to post
Share on other sites

I'm afraid showMap, showCompass, showGPS, showWatch are only working in description.ext, where you can't even check the side of the player.

It has to be tested, but this behaviour, I have never been able to have.

Whis'

Share this post


Link to post
Share on other sites

All of them work during the game as well, but the syntax is different. While in description.ext you should use

showMap = true (you are setting a variable)

in the game correct usage is

showMap true (you are calling a function)

Share this post


Link to post
Share on other sites

There is another way to do it. You dont hide the map but you make it black.

Just create markers that are black solid and very large.

Its not the prettiest way of doing it but atleast those players wount be able to see the map and you only need about 10 black markers ontop of eachother.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suma @ Nov. 21 2002,15:17)</td></tr><tr><td id="QUOTE">All of them work during the game as well, but the syntax is different. While in description.ext you should use

showMap = true (you are setting a variable)

in the game correct usage is

showMap true (you are calling a function)<span id='postcolor'>

Wow - I tested all this last night, including showgps, etc, and they all worked flawlessly! Heh, heh, the possibilities are endless:

if(daylight or (player distance fire1 < 2)) then {showmap true} else {showmap false}

Heh, heh, can't see the map at night unless you get up by the fire!

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  

×