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

Dispensers scripting is broken! #2837

Open
Rusty-Box opened this issue Mar 18, 2024 · 7 comments
Open

Dispensers scripting is broken! #2837

Rusty-Box opened this issue Mar 18, 2024 · 7 comments
Labels
category:code priority:urgent status:needs-work In progress, but no one is currently working on it (New volunteers welcome) type:bug
Milestone

Comments

@Rusty-Box
Copy link
Member

Example script: Dispenser.deactivate();

When you run the deactivate script for dispensers and they are not loaded in the level (i.e. being close to them) when that script runs they will ignore the script and remain activated. However, if they are loaded in during the time the script runs it will work but unload them and load them in again (i.e. going far enough away and come back), the dispenser is activated again.

I have the theory that it acts this way because Dispenser might be coded as badguys, as moving sprites such as Platform objects never unload so never run into that issue with scripting

@Rusty-Box Rusty-Box added type:bug priority:urgent category:code status:needs-work In progress, but no one is currently working on it (New volunteers welcome) labels Mar 18, 2024
@Rusty-Box Rusty-Box added this to the 0.7.0 milestone Mar 18, 2024
@Vankata453
Copy link
Member

Dispensers would have to ignore the badguy off-screen checks.

@Rusty-Box
Copy link
Member Author

@Vankata453 Also, can we have an option in the editor to set them off by default?

@tobbi tobbi changed the title Dispensers scipting is broken! Dispensers scripting is broken! Mar 20, 2024
@mrkubax10
Copy link
Member

Off-screen deactivation improves performance because off-screen objects don't have to be updated. Disabling this doesn't seem like a good idea.

@Vankata453
Copy link
Member

Off-screen deactivation improves performance because off-screen objects don't have to be updated. Disabling this doesn't seem like a good idea.

No non-enemy objects are disabled when off-screen, so why should dispensers? Also keeping in mind it breaks their functionality.

@mrkubax10
Copy link
Member

Ah alright, then yeah Dispensers shouldn't be disabled too.

@weluvgoatz
Copy link
Member

So how does anyone propose this being fixed?

@Rusty-Box
Copy link
Member Author

Dispensers should remember what state they are in. If you turn them on/off via scripting, it should remember that so that when it unloads and loads back in it won't just change back to default. Shouldn't be that hard to do, then again I ain't a coder so that's that. Though it would be rather nice to see this fixed asap somehow, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code priority:urgent status:needs-work In progress, but no one is currently working on it (New volunteers welcome) type:bug
Projects
None yet
Development

No branches or pull requests

4 participants