OK so I got regular ammo to shoot but for some reason it wont switch to super: here are my codes
Weapon select:
;;; Change weapon
PlaySound #sfx_index_sfx_cursor
LDA activeWeapon
CMP #3 ;; Super weapon object
BEQ loadFirstWeapon
LDA #1
STA activeWeapon
JMP doneWithWeaponChange
loadFirstWeapon:
LDA #1
STA activeWeapon
doneWithWeaponChange:
RTS
Shoot projectile script:
HTML clipboard ;;; Create a Projectile.
;;; Assumes that the projectile you want to create is in GameObject Slot 01.
;;; Assumes variable called myAmmo exists.
LDA activeWeapon
CMP #1 ;;; Normal weapon
BEQ +shootNormal
PlaySound #sfx_index_sfx_laser
CMP #3 ;;; Super weapon
BEQ +shootSuper
PlaySound #sfx_index_sfx_laser
JMP +canNotShoot
+shootSuper:
LDA myAmmo
BNE +canShootSuperWeapon
PlaySound #sfx_index_sfx_damage
JMP +canNotShoot
+canShootSuperWeapon:
DEC myAmmo
+shootNormal:
TXA
PHA
TYA
PHA
LDX player1_object
LDA Object_x_hi,x
CLC
ADC #$04
STA tempA
LDA Object_screen,x
ADC #$00
STA tempD
LDA Object_y_hi,x
CLC
ADC #$04
STA tempB
LDA Object_direction,x
AND #%00000111
STA tempC
CreateObjectOnScreen tempA, tempB, activeWeapon, #$00, tempD
;;; x, y, object, starting action.
;;; and now with that object, copy the player's
;;; direction and start it moving that way.
LDA tempC
STA Object_direction,x
TAY
LDA DirectionTableOrdered,y
STA temp1
TXA
STA temp
StartMoving temp, temp1
PLA
TAY
PLA
TAX
+canNotShoot:
RTS