Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
40oz

Teleport Direction /w monsters

Recommended Posts

Does the direction the teleport destination face have any impact on monsters when they are teleported into a map? They just switch directions toward the player anyway right? Are there any specific situations where the direction the teleport destination is facing has any noticeable difference from the players perspective?

Share this post


Link to post
40oz said:

Does the direction the teleport destination face have any impact on monsters when they are teleported into a map? They just switch directions toward the player anyway right?


If you are using Boom (or ZDoom) you can teleport dormant enemies, and the direction they face it may be important.

Share this post


Link to post
40oz said:

Does the direction the teleport destination face have any impact on monsters when they are teleported into a map? They just switch directions toward the player anyway right?

When anything gets teleported, its direction is set to match the teleport destination's direction. But monsters also have their own internal variable "movedir" used by their AI for movement, and this variable isn't appropriately updated when they get teleported. As a result, they will immediately turn into the direction they were walking before being teleported. Then they continue their standard chasing logic, which almost never (but sometimes still) lets them walk away from the player with more than 90° angle deviation, in which case it usually turns them to face the player plus-minus 45° precisely. Particularly, if moving towards the player (without bumping into anything) would require the monster to perform a full 180° turn, the monster will rather continue walking into wrong direction than doing it.

Share this post


Link to post

My experience with this is that teleport destination facings do matter and the best way to make sure it works right is to test it.

Off the top of my head, from my most recent escapade into teleporting madness, teleport destinations seemed to be mirrored horizontally (east goes west, etc. Though north still goes north). Assuming monsters start facing north, that is. I forget if there are differences between ports'/formats' behaviors on these, but I'm speaking of Boom format.

Of course if the monster is alerted before teleporting the facing won't matter much.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×