Thread: Scorpion Engine
View Single Post
Old 26 January 2022, 11:12   #1751
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Quote:
Originally Posted by earok View Post
@mixel my suggestion would simply be to do something like

if actor_x < player_x
actor move right
else
actor move left
endif

The move towards player does take into account all eight directions by design, it's agnostic to the type of actor actually doing the movement (and it could be useful as is for enemies that jump at the player).
That absolutely makes sense, TY.. What's odd is I'm pretty sure I was having the zombies standing around issue before moveatplayer even existed so I was clearly doing something very silly!

Acidbottle: I missed text string variables too?
Mixel is offline  
 
Page generated in 0.04658 seconds with 11 queries