Page MenuHomeFeedback Tracker

Medical system interferes with allowdamage false script
New, NormalPublic

Description

I often make single player missions and for cutscenes and other related reasons such as AI poor driving skills I temporarily set allowdamage false for players/playable so they don't get hurt. Unfortunately, the new medical system automatically sets allowdamage back to true.

Is it possible that the medical system does not interfere with the allowdamage function/script?

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Create a new scenario.
  2. place a player/playable and give it a name
  3. place an activation trigger with on activation (player name) allowDamage false;
  4. save the mission and exit the editor
  5. Go to single player and open the scenario
  6. activate the trigger
  7. die ;(
Additional Information

See the BI wiki for the script https://community.bistudio.com/wiki/allowDamage

This situation only applies when I load the Spearhead 1944 DLC I've tried all difficulty settings and the medical system turned on or off, but it happens always.

Event Timeline

lala00 created this task.Nov 15 2023, 8:46 PM
kju-PvPscene edited Additional Information. (Show Details)
kju-PvPscene added a subscriber: kju-PvPscene.EditedDec 4 2023, 7:46 PM

@lala00 sorry or the belated response!

for now you can try setting: SPE_CDA_DifficultyUnitMonitoringActive = false; and/or SPE_CDA_PlayerInvincible = true;

however the code design is limited so far. so it depends code timing execution..

you could try via init.sqf (defined at the very start)

0 = [] spawn
{
 waitUntil {(!(isNil "SPE_CDA_DifficultyUnitMonitoringActive"))};
 
 SPE_CDA_DifficultyUnitMonitoringActive = false;
};

for the next update, i've changed the coding for these and made extra skipping via:

player/_unit setVariable ["SPE_CDA_SkipAllowDamageModification",true];

That would be fantastic, thank you

This comment was removed by LouMontana.