Help accessing "Action Step Flags" through code

cargo

spam bots yandex
Hello. Does anybody know the name (under the hood) of the variable that holds these bits? (Assuming these are bits inside a byte)

11-11-2018-23-34-54bbb.jpg


I am helping forum member Redherring with his game and would like to use the unused flags (05 and 06) in a custom script. I've done a lot of text searching and testing but have not been able to figure it out. I've noticed a few things codewise about this particular checkbox group but I was wondering if anybody knew or has used these particular flags.

EDIT: Corrected the picture
 

dale_coop

Moderator
Staff member
The variable is "Object_vulnerability":
For example, to check the "Jump on Kills":
Code:
	LDA Object_vulnerability,x
	AND #%00001000  ;; check if "Jump on Kills"
	BNE jumpOnMonster  ;; if it IS 
	;; else if it is NOT
	;; ETC

or for the "ignore Solids":
Code:
	LDA Object_vulnerability,x
	AND #%10000000  ;; check if "Ignore Solids"
	BEQ doNormalCollision  ;; if it is NOT, do normal collision code
	;; else if it IS (do the ignore solids code);
	;; ETC
 

cargo

spam bots yandex
Oops guys. The arrow was just to point at the green box. I am trying to access "Action Step Flag 05" (and 06).

11-11-2018-23-34-54bbb.jpg
 

dale_coop

Moderator
Staff member
Hmm yes, it's the same. For the particular 05 or 06:
Code:
	LDA Object_vulnerability,x
	AND #%00100000  ;; check if "Action Step Flag 05"
	BNE doWhateverYouWantForFlag05  ;; if it IS 
	;; else if it is NOT
	;; ETC

Code:
	LDA Object_vulnerability,x
	AND #%01000000  ;; check if "Action Step Flag 06"
	BNE doWhateverYouWantForFlag06  ;; if it IS 
	;; else if it is NOT
	;; ETC
 

cargo

spam bots yandex
Thanks Dale. That works.
That said I don't have those code snippets in my NESMaker assembly files. It doesn't make sense. How did you figure this out?
 
Top Bottom