ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

SwitchUnits conflicts with MenuPosition respawn template

Open JudahHarvey opened this issue 10 years ago • 8 comments

  1. Run mission with respawnTemplate "menuposition" enabled for one side.
  2. Create 1 unit for that side, and use ACE Switch unit to select this unit.

Upon death, you will notice the following -Player take a ticket from that side, and will have to respawn at one of that side's respawn positions. If no positions have been setup, you will not be able to respawn and come back.

-If you manually add an extra life to the player AFTER he switches to the new Unit, this issue will resolve itself after the first death. However, you must also create a respawn position for the player to spawn on for this to work. You will notice that you can die as many times as you want after taking control of units, but you will not be prompted with the respawn menu.

It would be better to ensure that units that die this way do not take tickets, will not send players to the respawn menu the first time.

Description.EXT respawnTemplates[] = {"Tickets", "MenuPosition"}; respawnTemplatesWest[] = {"Tickets", "MenuPosition"}; respawnTemplatesEast[] = {"Tickets", "MenuPosition"}; respawnTemplatesGuer[] = {"Tickets", "MenuPosition"};

Using after I switch units using debug console [player, 5] call BIS_FNC_respawntickets; spectatePosition = [player, [0,0,150]] call BIS_fnc_addRespawnPosition;

As previously stated. Without taking these steps, players who use switch unit will be pushed into the menuposition screen without a respawn or tickets if they die in their switched unit.

JudahHarvey avatar Jan 06 '16 10:01 JudahHarvey

Pinging our respawn template wizard @SilentSpike

thojkooi avatar Jan 06 '16 13:01 thojkooi

I'm honestly not sure there's anything we can do about this without hacking up the respawn template (which is bad for compatibility) or requiring an event handler of some kind that fires before death.

kymckay avatar Jan 07 '16 15:01 kymckay

Can't we just ammend the switch units function to add a personal lives to the switched unit as well as a respawn point? Once the unit respawns there, it's all fixed and this never needs to happen again.

JudahHarvey avatar Jan 10 '16 08:01 JudahHarvey

Hmm, that's not a bad suggestion. Although it would mean altering the scenario without the designer's knowledge. Primarily:

  • That AI unit switched to would respawn (I'm a little unfamiliar with our switch unit stuff, is it intended to control AI temporarily or to act as a new player unit?)
  • That side would now have a respawn marker (probably wouldn't matter in most cases, but they might intentionally not have added one for whatever reason).

kymckay avatar Jan 10 '16 16:01 kymckay

I could try removing the switch back from the Respawn event and add it to the Killed event instead. https://github.com/acemod/ACE3/blob/master/addons/switchunits/functions/fnc_switchUnit.sqf#L67

bux avatar Jan 10 '16 18:01 bux

If that fits within the design scope then that seems like the most preferable solution :smile:

kymckay avatar Jan 10 '16 20:01 kymckay

I thought you could assign respawn positions to players specifically. If you just added the respawn position to the player as soon as they switch, the side shouldn't have that extra marker. In my trials in the debug console, the AI with the player did not respawn even when the player used the respawn point.

JudahHarvey avatar Jan 11 '16 00:01 JudahHarvey

Fixed

nicolasbadano avatar Feb 23 '16 17:02 nicolasbadano