Jump to content
Sign in to follow this  
dkraver

Removing map

Recommended Posts

Is it possible to remove the map completely from a player??

I tried ingame to drop the map but when using "m" key i still get the map. I also tried it on all diffuculties.

Also what would the line be to remove it? i know the map is called itemmap but couldnt remove it with removeweapons and removemagazines.

And last for those thinking why. I want to create a patrol group map for me and my friends where only the patrol leader, scout and fac can see the map. Its not like all members of a group in real life has a map.

Share this post


Link to post
Share on other sites

Disable for everyone:

In your Description.ext:

showMap = 0;

Disable for single unit:

In unit's init field:

this removeWeapon "ItemMap";

Edited by kylania

Share this post


Link to post
Share on other sites

thx for the help. tried the this removeweapon before but must have had a missspell

Edited by dkraver

Share this post


Link to post
Share on other sites

Found two minor problems...

1. The people with no map cant see the map doing briefing :confused: I want them to see it doing briefing but not when they are ingame. So they can get briefed about the mission.

2. When they respawn the get respawn kit with both gps and map. Is there a way to remove that or even is there a way to decide what respawn kit is??

Share this post


Link to post
Share on other sites

1. waituntil {time > 5}; OR a trigger with time > 5 cond, then just run: player removeweapon "ItemMap";

2. Init.sqf:

player addEventHandler ["killed", 
{ 
	[] spawn {
		waitUntil { alive player };
		execVM "respawn.sqf";
	};	
}];

In the respawn.sqf, just readd the eventhandler and remove/add whatever gear you want.

Share this post


Link to post
Share on other sites

In the respawn.sqf, just readd the eventhandler and remove/add whatever gear you want.

Is it possible to script it in the respawn.sqf so a killed will respawn with the gear he had on him when he died and the corps gone?

If not what should the respawn.sqf look like if i only want a respawn person to have a m9 with two magazines and nothing else (since you would have to pick up all your gear from corps.)

Share this post


Link to post
Share on other sites

Simple version:

player addEventHandler ["killed", 
{ 
	[] spawn {
		waitUntil { alive player };
		execVM "respawn.sqf";
	};	
}];

removeallweapons player;
player addmagazine "15Rnd_9x19_M9";
player addmagazine "15Rnd_9x19_M9";
player addweapon "M9";

I'm quite sure there are plenty of scripts to respawn with previous gear. General idea probably is to pass the info from command weapons and magazines to the respawn.sqf and have it remove & add them.

Share this post


Link to post
Share on other sites

It sux that you have the always have aces to the map when having a GPS.

I wanted to have soldier which had just a GPS to know their grid coordinates and have a black map.

Share this post


Link to post
Share on other sites

Why do you not want people to have the map at all?

If it's because they can see the enemy on it, just run in veteran mode.

Share this post


Link to post
Share on other sites
Why do you not want people to have the map at all?

If it's because they can see the enemy on it, just run in veteran mode.

Its not so i cant see the enemy. The map is for me and my friends. And to have it as realistic as possible. We only want the group leader and scout in our group to have the map and gps. So they have to lead the group. Make reference points like stop at a point and explain that this is the withdrawel point target is 200m to the north. And so on :)

Share this post


Link to post
Share on other sites

Just a small and simple update as an answer to a question earlier in this thread, it is pretty easy to remove maps after the briefing, but letting units have them during it.

For the select units to remove the map from after the briefing, do as follows:

Put nul = [this] execVM "removeMap.sqf"; into the unit's init line

removeMap.sqf

sleep 0.1;
(_this select 0) removeWeapon "ItemMap";

The sleep is there to make the code after it run after the briefing is done and one enters the 3D world.

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  

×