warping to the wrong screen

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
Post Reply
User avatar
SuperMar10Brothe
Posts: 59
Joined: Sat Aug 11, 2018 4:43 pm

warping to the wrong screen

Post by SuperMar10Brothe » Fri Sep 14, 2018 6:46 pm

Im having problems setting up warping, it warps me to the underworld even though the underworld checkbox is not marked.

I rememebr someone mentioning something in some thread about warping being broken in platformer module, is that it?
User avatar
SuperMar10Brothe
Posts: 59
Joined: Sat Aug 11, 2018 4:43 pm

Re: warping to the wrong screen

Post by SuperMar10Brothe » Fri Sep 14, 2018 6:50 pm

Oh it looks like its in reverse, if i check the underworld checkbox, it warps me to a screen in overworld
User avatar
dale_coop
Posts: 1084
Joined: Fri Feb 16, 2018 7:05 am

Re: warping to the wrong screen

Post by dale_coop » Fri Sep 14, 2018 9:03 pm

You use which version ? Which module ?
If you use the 4.0.11 with platform module, you need to add a "CLC" before the "ADC #$01":

Code: Select all

	cpx player1_object
	BNE dontDoWarp_tile
	LDA warpMap
	CLC
	adc #$01
	STA temp
	GoToScreen warpToScreen, temp

dontDoWarp_tile:
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
User avatar
chronosv2
Posts: 107
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: warping to the wrong screen

Post by chronosv2 » Fri Sep 14, 2018 9:48 pm

Yep. It's a dangerously easy thing to overlook. I was helping someone with a script problem for an Increase_X type script, forgot my CLC and when they went to test it they were gaining 2!
Turns out I wasn't aware that if you do an ADC (Add with Carry) command without CLC (Clear Carry) first it adds an extra 1 to account for Carry automatically!
User avatar
SuperMar10Brothe
Posts: 59
Joined: Sat Aug 11, 2018 4:43 pm

Re: warping to the wrong screen

Post by SuperMar10Brothe » Sat Sep 15, 2018 7:56 am

yeah its 4.0.11 with platform module, thanks.
Post Reply