Luffyyy / BeardLib-Editor

Editor for PAYDAY 2 using the power of BeardLib.
MIT License
37 stars 28 forks source link

InstanceSetParams applies value to instance params variables even when they're set to not use. #780

Closed sooooosh closed 9 months ago

sooooosh commented 9 months ago

Describe the bug

InstanceSetParam elements applies values to all variables in the instance, even when unchecking the "using variable" setting. image image In this example, the variable's default values where 1 for yellow, 2 for orange and 3 for blue. They have all been overwritten even tho only the orange value should have been updated. For testing I also ticked the checkbox, changed the value to "69" and unticked it again, which means they wouldn't get saved in the .mission file and reset back to 0 after a restart. However the element will still update the variables to be "0" after restarting.

Steps to reproduce the issue

Place a InstanceParam element in a custom instance and create some variables. (Using Number variables in my case.) In the level place a InstanceSetParams element and apply values to one of the variables with the "use variable" setting toggled off for the rest. The unused variables will still get their values overwritten.

Log file

No response

Minimal reproduction

No response