Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadDelayed units not beeing handled by the editor correctly #749

Open
MiamiCenterPL opened this issue Jul 24, 2022 · 0 comments
Open

LoadDelayed units not beeing handled by the editor correctly #749

MiamiCenterPL opened this issue Jul 24, 2022 · 0 comments
Labels

Comments

@MiamiCenterPL
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant