mkjake63
Member
Was playing around with some of the Ai_Scripts and was curious if anyone else has tested the Follow Action type in the current build? I was hoping to use it for a small game but as you can see in the video it's not really working. Was curious if there was something I could edit in the script itself to get it functioning
[media]https://youtu.be/J9Bvcwcxl_A[/media]
Look's like it's only aiming towards me but not actually following
[media]https://youtu.be/J9Bvcwcxl_A[/media]
Look's like it's only aiming towards me but not actually following
Code:
;;; aim towards player.
TYA
PHA
TXA
PHA
STA tempx
LDA Object_x_hi,x
STA tempA
LDA Object_y_hi,x
STA tempB
LDX player1_object
LDA Object_x_hi,x
STA tempC
LDA Object_y_hi,x
STA tempD
LDX tempx
MoveTowardsPoint tempA, tempC, tempB, tempD
LDA Object_direction,x
AND #%00000111
ORA #%00001000
STA Object_direction,x
PLA
TAX
PLA
TAY