Construct Time #6: One way doors

2

Stats

1,465 visits, 2,000 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.

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

Next Tutorial In Course

Construct Time #7: Tooltip System 02:25

The tooltip or infotip or a hint is a common graphical user interface element. It is used in conjunction with a cursor, usually a pointer. The user hovers the pointer over an item, without clicking it, and a tooltip may appear—a small "hover box" with information about the item being hovered over. Tooltips do not usually appear on mobile operating systems, because there is no cursor (though tooltips may be displayed when using a mouse).

  • 0 Comments

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