• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Automatic facing

Hello,

I've been working on an OpenBOR project the past few weeks, and I'm quite happy with how it is progressing.

What I would like to do is to have the player's character always face any bad guys, as in, never turns his back on them.

So, specifically:

If there are no enemies, behave normally. (i.e. face left when walking left, face right when walking right)
If there are enemies both to the left and right to the player, behave normally.
If all enemies are right to the player, face right.
If all enemies are left to the player, face left.

There is this:

facing {int}

  • This is for forcing the entity to face certain direction regardless where he/she is going.
    • 0 = no force (default).
    • 1 = force the entity to face right.
    • 2 = force the entity to face left.
    • 3 = force the entity to face same direction with level’s direction.
  • Setting this allows players to play BACKWALK.
But AFAIK this is a 'fixed' setting and thus of no use.

So can this be done via scripting?
 
Note if you do this, the engine will automatically handle walking by playing the walk animation in reverse, but I would highly recommend you add a true back walk animation.

DC
 
Back
Top Bottom