Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / My floor tles scroll but why wont the ROOf tiles scroll, please help??????????

Author
Message
PowerMan
19
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 7th May 2005 00:53
now that i have the tile scrolling i keep getting an error when i want to load the roof data, i get an illegal number error at the line in the snipet below (sprite bs,x,y,im)
In my full code it is line 224 and commented out for the scroll to work at the moment. I have updated the download link if you want to look at it.

http://homepage.ntlworld.com/j.power40/html/mega.zip

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 7th May 2005 02:59 Edited at: 7th May 2005 03:20
PowerMan, I am in the process of downloading your entire source, to get a better picture of what is going on, and the logic behind it. Also the data values for IM and such etc...

The obvious error that stands out is the for loop. You accidentally typed 200 instead of 20 as your comment suggests it should be. I am guessing that 1, 2, or both, things are happening.

1. you are running out of data to read
2. since x is being increased by 112 dependent on IM; X is going out of range.

I'll comment later after looking at the full source. But try changing the for loop to read
for t=0 to 20

~zenassem

edit:
Ok! I took a quick look at the source. You have 77 data elements before you get to the roof tiles. So, the first for loop t=1 to 77 is ok.

you then have 23 data elements in the roof section. As it stands your second for loop is going from 0 to 200 for a total of 201. Definately not good.

But what confuses me is even if the second loop is changed to t=0 to 20 that would equal 21 elements. So I'm not sure what the other two elements are for. Perhaps you are working on this still.

I don't have time right now to go through all of your logic, but I hope this helps.
======

I would like to suggest that you put labels before each seperate data group.


lvl1floor:
data 13,13,12,13...

lvl2roof:
data 74,75,76,77...

This way if you ever need to read the values again you can use the restore command

restore lvl2roof

This will tell the read commands pointer - where to begin reading data.

=====================================================================
P.S.
If you would like... I can look at the rest of the code later. Upon first glance it appears you might be making your scrolling engine more difficult/convoluted than it needs to be.

Though, I could be wrong. If you are open to suggestions I will post them. Just let me know.

~zen


PowerMan
19
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 7th May 2005 07:38
Hi zenassem, thankyou very much anything that you sugest would be really helpful i appriciate this very very much. all of the data is there for the loading the the tiles. i origanally used it in dbc and it worked fine, but in dbpro i just get this one error for loading the roof of the tiles.
PowerMan
19
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 7th May 2005 08:20
I have got the roof working now, you pointed me in the right direction, i decreased it to 23 elements of data instead of 200, and i have use the labels this will help with calling alien ships in an array.

i dont know if you have noticed but i have 3 particle systems that i use for my volcano, i have tried to attach one of them to the volcanoe sprite (140) and the particle system is no(2). It does attach to the sprite but it scrolls at a diferent speed and then it stays on screen when the sprite has been deleted of the screen have you any ideas on this. i have added my updated code below.



Login to post a reply

Server time is: 2024-09-23 19:23:46
Your offset time is: 2024-09-23 19:23:46