Warp problem between screen (version 4.1.1) platform

Subotai

Active member
Hi,

I'm actually working on my first project. It is fourth time that I restart it.
It is a scrolling platformer project.
I've already seen all the tutorials.
When I run through some screen with the main character like a normal platformer, it's work fine.
The problem is when for example, I add a warp zone (I have add some doors on the background) on another screen, I get stuck to a third screen with full of 00000 and 111111.

In previous forum, there was a problem that maybe the warp was teleporting the character underground even if the checkbox is not checked.

In HUD, I'm using Sprite 0 detection, delay : 1, X : 246, Y : 30
My character is Height : 4, Large : 2

Here somes screenshot to give you some idea.
Warp problem.png


Anyone has an idea to help me please ?
 

Subotai

Active member
Nice, that's works.
Great !!!

I was not sure to post that problem on the forum, I was thinking that my HUD disturbed the warp functionnality.

Merci Dale !!!
Bonne fin de journée !
 

dale_coop

Moderator
Staff member
Great! Glad it worked (^_^)

Suis content d’avoir pu t’aider.
N’hésite pas si besoin.
 

Subotai

Active member
I'm a apprentice in term of programmation but I try.

With the warp functionnal now, my next step is to be able to warp by pressing "UP" on the gamepad.
Here's the step that I've done yet :
1. Make copy of WarpToScreen.asm and rename the copy for : WarpToScreenDoor in the folder : GameEngineData\Routines\Basic\ModuleScripts\TileScripts\ScrollingPlatformer
2. Rename tile type #14 for => Door
3. In script settings, Tile Collision => I set : WarpToScreenDoor
4. Input editor, I've binded that script to the UP button.

Result :
- On screen, with type #14, it's warping automatically without pressing UP
- In Pressing UP anyway, it's warping too.

How can I do to be able to warp only by pressing UP on a certain case (#14 in my case) ?

Thanks !
 

dale_coop

Moderator
Staff member
Do you want your normal warp still works? or this is how you want your warps work for this game?

What you did:
1. Make copy of WarpToScreen.asm and rename the copy for : WarpToScreenDoor in the folder : GameEngineData\Routines\Basic\ModuleScripts\TileScripts\ScrollingPlatformer
2. Rename tile type #14 for => Door
3. In script settings, Tile Collision => I set : WarpToScreenDoor
Until here, it's correct!

Then, you should just modify your WarpToScreenDoor script:
Code:
  	LDA gamepad	;; check the gamepad
	AND #%00010000	;; UP pressed ?
	BNE +		;; if go next		
	RTS	;; we stop from here
+
	;; FROM MHERE THE NORMAL WARP CODE...

That's it! It would work.
No need to assign anything on the "input editor" (so remove the Press "UP" to WarpToScreenDoor if you did)
 

Subotai

Active member
Yes, it works with your code.

I appreciate your help Dale.

For your question :
Do you want your normal warp still works? or this is how you want your warps work for this game?
Yes, there will be too kind of warp, one with door, and the normal way.
Both are functionnal.
:)

Thanks a lot !
 
Top Bottom