Hi everyone! I made a monster weapon but it only moves one speed and it's very slow even if I raise speed to maximum. I am using the ArcadePaltformBase module.
Here are my scripts:
The script I put for the monster action to shoot (ShootAtPlayer.asm):
LDA Object_x_hi,x
;; plus x offset
STA tempA
LDA Object_y_hi,x
;; plus y offset
STA tempB
LDA #$05 ;; game object to create.
STA tempC
LDA #$00 ;; action step for that object
STA tempD
LDA Object_screen,x
STA tempz
CreateObjectOnScreen tempA, tempB, tempC, tempD, tempz
The weapon creates itself no problem.
The script I put for the weapon action, I want the shot to go towards the player (MoveTowardsPlayer.asm)
;;; 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
In the details I selected monster weapon. I tried maximum speed but it always moves with the same slow speed. Also in actions I selected Ignore Gravity and the action is of course MoveTowardsPlayer. My weapon as no animations.
Please let me know what I can do so that the selected speed affects the monster weapon.
Here are my scripts:
The script I put for the monster action to shoot (ShootAtPlayer.asm):
LDA Object_x_hi,x
;; plus x offset
STA tempA
LDA Object_y_hi,x
;; plus y offset
STA tempB
LDA #$05 ;; game object to create.
STA tempC
LDA #$00 ;; action step for that object
STA tempD
LDA Object_screen,x
STA tempz
CreateObjectOnScreen tempA, tempB, tempC, tempD, tempz
The weapon creates itself no problem.
The script I put for the weapon action, I want the shot to go towards the player (MoveTowardsPlayer.asm)
;;; 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
In the details I selected monster weapon. I tried maximum speed but it always moves with the same slow speed. Also in actions I selected Ignore Gravity and the action is of course MoveTowardsPlayer. My weapon as no animations.
Please let me know what I can do so that the selected speed affects the monster weapon.
Last edited: