Construct Time #6: One way doors

2

Features on these Courses

Stats

1,762 visits, 2,381 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 1 May, 2020.

Two Construct Times in two days, what's happening?

yeah from now on, I decided I won't stick to a "schedule" and just release whatever the hell I want whenever the hell I want. Nobody can stop me.

This one is a very simple one in hindsight but that got me stuck for days: One way doors.

Listen man, not cool... This is hard ok?

These 3 lines contain a few things that are not 100% obvious and will be a nightmare if not done correctly.

But the biggest of these is by far this expression:

anglediff(angle(Player.X, Player.Y, OneWayDoor.X, OneWayDoor.Y), OneWayDoor.Angle)

In my last Construct Time I used a similar formula to know what menu buttons where in a cone from the current position.

This is the same thing, but the cone is 180 degrees, so this will pick any one way door that has the player "behind" it.

I also added an "Is Overlapping" so one way doors won't change solid state while you're going though them.

Note that this also works with topdown and is not restricted by the platform behavior.

Anyway. That's it. As always, file is up for free on my Patreon: patreon.com/posts/36628130

  • 0 Comments

Want to leave a comment? Login or Register an account!