Jump to content
SteelShot

[SOLVED] Always show the map on respawn screen regardless of having the map

Recommended Posts

I'm new to Arma III, scenario editing and scripting, it's not too hard, but I've hit a stone. I've searched the forum, but couldn't find anything related.

 

I am trying to add the functionally during the Arma's respawn screen to be able to view the map regardles of having it or not before dying.

 

I have tried to give a player the map and assign it on his death but to no avail it does not work, or at least i'm doing it wrong.

Currently all of my respawn control is done via the editor.

 

The first joiners are fine as their loadouts are just the map, so upon joining they do see the map, but then after next death, I cannot guarantee that they will have it, and it being a Survival scenario, I don't want them to get the map on respawn, a compass is enough.

 

Any help would be really appreciated.

 

PS. I am using Ravage.

Edited by SteelShot
Actually solved my own shit

Share this post


Link to post
Share on other sites

Hello,

are you using the respawn module available in the editor (see: Systems --> Multiplayer --> Respawn Position)?

If this is the case then you can enable a functionality where players need to choose their respawn position. This way they will get to see the map after they have died.
You can enable this functionality in the multiplayer dialog (Attributes --> Multiplayer). While in the dialog select "Respawn on Custom Position" from the Respawn drop-down menu.
After that select both "Select respawn position" and "Show respawn counter" from the Rulesets portion.

Does this work for you or were you after something else?


EDIT: Nope, you don't get to see the map in the respawn screen if you don't have a map in your inventory

Share this post


Link to post
Share on other sites
11 minutes ago, Asmodeuz said:

Hello,

are you using the respawn module available in the editor (see: Systems --> Multiplayer --> Respawn Position)?

If this is the case then you can enable a functionality where players need to choose their respawn position. This way they will get to see the map after they have died.
You can enable this functionality in the multiplayer dialog (Attributes --> Multiplayer). While in the dialog select "Respawn on Custom Position" from the Respawn drop-down menu.
After that select both "Select respawn position" and "Show respawn counter" from the Rulesets portion.

Does this work for you or were you after something else?

 

This exactly what I am using but, once the player dies and does not have the map, the respawn screen does show the respawn options but the map is invisible.

Spoiler

rh08ibx.png

 

If I die with a map everything is fine, but without one = no map visibility during respawn screen

Spoiler

yXtrotY.png

 

Share this post


Link to post
Share on other sites

After many hours spent on this issue, I have finally found the perfect-ish solution. Also @Asmodeuz, thats for the help, even tho it was not the solution..

 

onPlayerKilled.sqf

//Get event params
params ["_oldUnit", "_killer", "_respawn", "_respawnDelay"];

//If a player had a map before death, we keep it, otherwise give temp map
if (!("ItemMap" in assignedItems _oldUnit)) then {
	waitUntil {
		if (isNull _oldUnit) exitWith {true};
		sleep 1;
		visibleMap
	};
	
	if(!isNull _oldUnit) then {
		_oldUnit linkItem "ItemMap";
		
		waitUntil {
			if (isNull _oldUnit) exitWith {true};
			sleep 1;
			not visibleMap
		};
		
		if(!isNull _oldUnit) then {
			_oldUnit unlinkItem "ItemMap";
		};		
	};
};

/*
	Problem 1: This allows players to loot the "free" map until player respawns
	Solution 1: Need to make the map unlootable.
*/

 

Edited by SteelShot
Improve script
  • Like 2

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

×