I'm kinda toying around with scrolling and stuff, just using platform stuff from the TGF-library. I made several platforms that go up and outside the play-area, and as an event, I stated: "Always Center display at (0,0) from Player Object". This works fine in the Step-Through Editor, but when I choose "Run Level" or "Run Game", I only see the play area and the camera doesn't follow my character anymore. Can anyone help me?
Second problem: somehow my platforms outside the play area, which I have deemed to be "Platform obstacles", don't act like platforms. The character just falls through them for some reason. What can be wrong?
Thanks in advance and happy holidays,
Dreamsurfer
Gaming is fun... making others game is even more fun!
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd December, 2003 at 18:39:05 -
For problem 1: Maybe you should try using the "event editor" instead of the step-through, because in the stepthrough editor you cannot see what everything does and you cannot do alot of proper coding. So try to use the event editor and add the event "Always Center display at (0,0) from Player Object" in there.
2: You have to add the code:
Player collides with background - Player(Stop)
Nice answer andy-- I have no need to write something now. But as a abckup, if the scrolling doesn't work, replace "always" with "every .01 seconds". ANd it's nice to see someone help, instead of n00b-baashing.
Remember, there's a little darkness in all of us... we just express it best.
--Ragnarok Games
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
23rd December, 2003 at 01:10:25 -
What? I hang around the code-it boards a fair bit and I hardly ever see noob bashing. Where'd u see it?
Hello, Andy. Thanks for your nice reply. Of course I did use the event editor to program all events, and I use the S.T.-editor to test everything. There the scrolling works perfectly. However, when I try running the game in "Run this level" or "Run this game" mode, scrolling is somehow magically disabled. I also tried replacing it with "every .01 seconds" like Karnage said, but that doesn't work either. My guess is that there's somewhere an option that turns scrolling off, but I can't find it.
The problem with the platforms still exists too: the platforms inside the playfield work great, but once the character tries to get on a platform outside the playfield, he just falls through it. I do use "Player collides with background - Player(Stop)".
So could there be some hidden settings that I have to look at, or something?
Anyways... thanks alot for taking some time to help me. I appreciate it.
P.S: I uploaded the game at http://www.yellowtown.net/files/tgf/scrolling.gam so you can see for yourself. Test in Step-Trough and Run Game mode, and try to reach the upper platforms to see my problem.
Edited by the Author.
Gaming is fun... making others game is even more fun!
Your 'playfield' is still only 640x480 pixels in size. When TGF scrolls near an edge, it centers the screen the nearest to your character it can without showing anything beyond the borders of the playfield. As your playfield is only as big as the window, there's nowhere for it to scroll to.
I made the playfield 1280x1024 and it worked fine. And while you're at it, delete the black Quick Backdrop, as you can set the background colour yourself in Frame Properties.
Obvious now, eh?
gone fishin'
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
23rd December, 2003 at 04:10:46 -
I was just about to reply then I saw your post come up Shen
Shen, thanks a million! It solved both my problems, and now I understand stuff better. Now I can experiment with stuff some more. And Andy, thanks for thinking along too.
Merry Christmas and stuff.
Gaming is fun... making others game is even more fun!