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

[fixed] Spiker and Dispenser will work with away-facing Platforms at their exit #2026

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Apr 20, 2024

Status

  • IN DEVELOPMENT
  • Spiker will not work correctly as it shoots spike through any solid blobs.

Description

[fixed] Spiker will work when Platform is at its exit but only if it is not facing towards Spiker
[fixed] Dispenser will work when Platform is at its exit but only if it is not facing towards Dispenser
[changed] If Dispenser can't pop out items, don't make a Particle
[added] Dispenser will have a different sound effect if its exit was blocked

Fixes #1979

Previously, Spiker and Dispenser would not work if a Platform was placed at their exit. Since it looked odd that they wouldn't work even with away-facing platforms, I made this PR to make changes.

The CollidesWithPlatform() code from #1864 is used, this time separated in a new file PlatformCommon.as and added as an include in Spiker.as and Dispenser.as.
To make the ray correctly detect the platform, start position position + offset * map.tilesize/2; is used instead of position + offset * 5;

Previously, Dispenser would make a particle and sound without popping out item if its exit is blocked.
I changed it to not make the particle to better indicate that it is blocked.

Tested in offline. Should work the same in online.

screen-24-04-20-13-05-12
screen-24-04-20-13-31-16

Blocked by bridge
screen-24-04-20-13-07-59

but it works if it is opened (since it is non-solid)
screen-24-04-20-13-07-36

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

Successfully merging this pull request may close these issues.

Dispenser and Spiker don't work when platform is placed at their exit
1 participant