Flagpole issues

Anthrax101

New member
I'm following the normal scrolling patformer video, but whenever I get within a certain radius of the flag that ends the level, my character ceases to move. It can turn left and right, but only stays in place. Where did I mess up?
 

dale_coop

Moderator
Staff member
You follow exactly? Or did something different at some point then the tutorial?
When your player get the flag, your player should me replaced by the Victory animation object.... This object should "WarpToNewScreen" at the end of animation (check the Action Step of this object).
Do you have your Victory object set? (you imported it, like in the tutorial?)

Could you share screenshots?
 

dale_coop

Moderator
Staff member
It could, yep.
If you don't want to use music / sound now...
try commenting out the line :
Code:
	PlaySound #SND_VICTORY
(adding ";" at the beginning of the line)
...in the CreateVictoryObject.asm script (the one assigned to the "Tile Collision 13" element in your "Project Settings > Script Settings")
 

dale_coop

Moderator
Staff member
There is a TutorialMusic in the "TutorialAssets\TUTORIALS_4_1_0" folder, if you want.
To import it, in thr treeview, do a right-click on "Sound" and chose "Import Famitracker txt"

But when you import music file, you can't remove it... you will have to reimport a new one. And there no empty one with NESmaker.

So for your tests... maybe just commenting out the line... would be better, to check if it is the real issue here.
 

dale_coop

Moderator
Staff member
In NESmaker, when you import music... it will add a mbunch of musics and sfx. But then, you can't remove them.
So, if you're ok with the tutorial music, go for it. If the music become annoying... you will not be able to remove it :p

The only way to change music is to re-import a music famitracker txt file (to replace the current musics in your project).

So, if you want to import music, just to test if it's related to your flag issue... I'd suggest, first, to just comment out the line in the code.
If the issue remains, it means it's not related to the missing music.
 

Anthrax101

New member
CPX player1_object
BNE +
LDA Object_x_hi,x
STA temp
LDA Object_y_hi,x
STA temp1
CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, currentNametable
LDX player1_object
DeactivateCurrentObject
LDA #$01
STA loadObjectFlag
StopSound
LDA #$ff

PlaySound #SND_VICTORY
+
Which part do i change?
 

dale_coop

Moderator
Staff member
Try just commenting out the, like this:
Code:
	; PlaySound #SND_VICTORY

and maybe the:
Code:
	; StopSound
 

Anthrax101

New member
I wrote it like this,

CPX player1_object
BNE +
LDA Object_x_hi,x
STA temp
LDA Object_y_hi,x
STA temp1
CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, currentNametable
LDX player1_object
DeactivateCurrentObject
LDA #$01
STA loadObjectFlag
; StopSound
LDA #$ff

; PlaySound #SND_VICTORY
+
but it still did not work.
 

dale_coop

Moderator
Staff member
So it's not the sound.
Try replacing with this script:
Code:
	CPX player1_object
	BNE +
	LDA Object_x_hi,x
	STA temp
	LDA Object_y_hi,x
	STA temp1
	LDA Object_scroll,x
	SBC #$00
	STA temp3	
	CreateObject temp, temp1, #OBJ_PLAYER_VICTORY, #$00, temp3
	LDX player1_object
	DeactivateCurrentObject
	LDA #$01
	STA loadObjectFlag
	; StopSound
	LDA #$ff
	; PlaySound #SND_VICTORY
	+

Also make sure that your constant "OBJ_PLAYER_VICTORY" (in "Project Settings > User Constants") is set to "10".
 

dale_coop

Moderator
Staff member
Make sure the tile type of your flag is the assigned to the correct script. (check the flag type tile... with the "collision" button on the screen editor, for example) and check the script assigned to that tile_collision_?? in the project settings > Script Settings.
Else, have you try to remove that tile et place it somewhere else on the screen.
 
Top Bottom