BeardLib-Editor icon indicating copy to clipboard operation
BeardLib-Editor copied to clipboard

LoadDelayed units not beeing handled by the editor correctly

Open MiamiCenterPL opened this issue 2 years ago • 0 comments

Describe the bug

Normally all LoadDelayed units are not spawned when you start the heist, unless LoadDelayed element tells them to spawn. This editor-only issue is that all LoadDelayed units are beeing spawned when entering the editor (Which is good) but should despawn when entering a Play Test mode, soo all the randomization done with LoadDelayed actually works fine.

I wrote a simple mod that checks the game_state_machine for current state, in case script picks an Editor state changed to in_game_waiting_for_players (or any other) and disables all the LoadDelayed units, and enables them with a PostHook on function LoadDelayed:on_executed().

However this doesn't handle sequences - In case your loaddelayed unit has interaction sequence, it will stay there even with the unit beeing disabled. In normal run, the unit won't even spawn soo there will not be an interaction in there, soo I don't really know how to handle this.

Anyways, this mod I wrote is pretty helpful when dealing with LoadDelayed stuff, as you can test most of the stuff in the editor, not having to test it in the normal run.

Link to the mod in case you'd like to see it; https://www.dropbox.com/s/bdp3t3qjue3kk12/LoadDelayedFix.zip?dl=0

Steps to reproduce the issue

Add some DelayLoaded units to your map, and compare it in normal run (by buying the contract in contract broker) with the in-editor run (Play test). When you install the mod I linked above you'll get pretty close behaviour to what's should happen in editor.

Log file

No response

Minimal reproduction

No response

MiamiCenterPL avatar Jul 24 '22 20:07 MiamiCenterPL