JFranco
New member
Hey gang,
If you're looking for AI Monster scripts to move your monster left, right, up or down -- here's a solution that worked for me:
MoveLeft.asm
MoveRight.asm
MoveUp.asm
MoveDown.asm
Cheers,
Justin
If you're looking for AI Monster scripts to move your monster left, right, up or down -- here's a solution that worked for me:
MoveLeft.asm
Code:
TXA
STA tempA
TAY
LDA DirectionTable,y
STA tempB
LDA FacingTable,y
STA tempC
StartMoving tempA, tempB, #$00
ChangeFacingDirection tempA, tempC
MoveRight.asm
Code:
TXA
STA tempA
LDA #%00000011 ;; "right"
TAY
LDA DirectionTable,y
STA tempB
LDA FacingTable,y
STA tempC
StartMoving tempA, tempB, #$00
ChangeFacingDirection tempA, tempC
MoveUp.asm
Code:
TXA
STA tempA
LDA #%00000001 ;; goes up
TAY
LDA DirectionTable,y
STA tempB
LDA FacingTable,y
STA tempC
StartMoving tempA, tempB, #$00
ChangeFacingDirection tempA, tempC
MoveDown.asm
Code:
TXA
STA tempA
LDA #%00000000 ;; "down"
TAY
LDA DirectionTable,y
STA tempB
LDA FacingTable,y
STA tempC
StartMoving tempA, tempB, #$00
ChangeFacingDirection tempA, tempC
Cheers,
Justin