david911
Abandoned Uranium Working

Posts: 17
|
Post by david911 on May 4, 2022 7:41:52 GMT
Hi, i created as a test 9 screens, i can go left and right between the screens but not up and down. i try to cut the floor away of room 2 and so i can just fall down into room 6, not nothing happens. any idea?
1234 5678 9
|
|
dvader
Wacky Amoebatron
 
Posts: 30
|
Post by dvader on May 4, 2022 14:10:34 GMT
I had a similar issue with a platformer I am tinkering with now and again. I wrote this code to get round it. IF SCREEN = 6 IF Y >= BOTTOMEDGE SCREENDOWN LET Y = 5 ;TOPEDGE EXIT ENDIF ENDIF Checking the screen number ensures it only does it on screens you want to jump up or down from. This example is dropping to a lower screen, you will just need to do the opposite to get it going up a screen, hope this helps. Oh the topedge was too high so the let y=5 bit is to lower it a little, I left the topedge in as a rem so easy to see what it's doing.
|
|
david911
Abandoned Uranium Working

Posts: 17
|
Post by david911 on May 4, 2022 14:42:53 GMT
Thanks alot friend, ive been using the following which works, IF Y >168 SCREENDOWN LET Y 8 FALL ENDIF but im going to try add yours for better results. Thanks for replying
|
|
dvader
Wacky Amoebatron
 
Posts: 30
|
Post by dvader on May 4, 2022 14:58:29 GMT
No problems, I know it's rare to get many answers on these forums  So as I knew I had managed your request, thought I'd post my solution. your little bit of code has given me an idea how to fix a bug as well so you may have helped me as well! Glad you had it working already and good luck with your project.
|
|
david911
Abandoned Uranium Working

Posts: 17
|
Post by david911 on May 4, 2022 15:36:41 GMT
Thats brilliant, great that we can help each other. Thanks again.
|
|
dvader
Wacky Amoebatron
 
Posts: 30
|
Post by dvader on May 4, 2022 17:54:59 GMT
No luck unfortunately. It's not game breaking (although can cause some issues) but so far nothing has solved the issue I have. There's something when switching screens that causes something in the jump code to reset, so it jumps again in mid air. I was hoping the fall command may fix it but no, still jumping on its own when switching screens  I think (hopefully) it's the last bug I can easily see that is left, but is for certain a nasty one for a greenhorn like me. Adding a loading screen and music are the final pieces of the puzzle, but no idea how to do that at present, but I digress lol.
|
|
david911
Abandoned Uranium Working

Posts: 17
|
Post by david911 on May 4, 2022 18:05:04 GMT
Here is what im using, im fine tuning , going direct to the room, rather than "SCREENUP".
IF SCREEN = 7 IF Y >170 LET SCREEN = 8 LET Y 8
ENDIF ENDIF
but was hoping you know a method from when i leave the bottom of SCREEN 1 to also go back up to screen 1?
|
|
david911
Abandoned Uranium Working

Posts: 17
|
Post by david911 on May 4, 2022 18:28:12 GMT
|
|
dvader
Wacky Amoebatron
 
Posts: 30
|
Post by dvader on May 4, 2022 20:10:24 GMT
Cool, will have a look. I know how to make load screen$ on an original speccy with a tape recorder, but find that sort of thing difficult with emulation. Tape options are normally limited. Not quite sure of your question but for up I did this. IF Y <= TOPEDGE SCREENUP LET Y = 130 ;BOTTOMEDGE EXIT ENDIF Minus the screen check. If you want to be able to jump back up, just make sure that you position the player below or above the check point for switching screens. Else you get a loop of death where they flip repeatedly. Edit Do you mean dropping from say, screen 1 to the top of screen 1? That would be just a matter of setting the co-ord's to the new position without using the SCREENDOWN command I would think. Not tried it myself, but should work for some sort of teleporters I imagine 
|
|
dvader
Wacky Amoebatron
 
Posts: 30
|
Post by dvader on May 5, 2022 0:37:33 GMT
Had a quick look at that guide. Seems the link to ZX BlockEditor doesn't work so not a great start 
|
|