How do I increase myScore (4.5)

I have a variable called myScore, but I can't seem to figure out how to make it so that every time a monster is destroyed, it adds to the score. Looking at my player hurt script, I saw something like
Code:
DEC myLives
LDA myLives
So I assumed for the score I could do something similar in the monster hurt script, like
Code:
INC myScore
LDA myScore
But that doesn't seem to do anything. I'm sure I'm on the right track, but I must be missing something.
 

smilehero65

Active member
I have a variable called myScore, but I can't seem to figure out how to make it so that every time a monster is destroyed, it adds to the score. Looking at my player hurt script, I saw something like
Code:
DEC myLives
LDA myLives
So I assumed for the score I could do something similar in the monster hurt script, like
Code:
INC myScore
LDA myScore
But that doesn't seem to do anything. I'm sure I'm on the right track, but I must be missing something.
Two things to take into account.
-----------------------------------

  1. When you INCrease something, there is no need to LDA it afterwards. You just put it there
  2. When you go for an Arcade Score Approach... you handle the score very differently.

    First of all, you need to create more myScore variables, depending on the number of zero places you want your score to have.

    For example, if your score has 7 places, you would be:

myScore_0
myScore_00
myScore_000
myScore_0000
myScore_00000
myScore_000000
myScore_0000000
 

RMiao

New member
I dont know where you have your myScore stored, but here is an example:

;MACRO AddValue arg0, arg1, arg2, arg3
;arg0 = how many places this value has.
;arg1 = home variable
;arg2 = amount to add
;arg3 = what place value is receiving the addition?
;;; 0 = ones place, 1 = tens place, 2 = hundreds place, etc.

AddValue #$06, myScore, #$5, #$02
UpdateHudElement #$03
edit: i dont know if this could be added to your script or not to increase the score, but just something that might lead to something, or maybe not.
 
Top Bottom