This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

@Nosson1459, I am not get that error message. I get words in the top left corner of window saying "Error, Click for details". Last time however, I got 'NullPointerException' even though I did not change the code. BTW, this scenario does not use the UserInfo class.
@ET78759, I no longer have the source as it was on a laptop that went kaput. Also, I am having trouble having this one run on the site right now. @ALL, can anyone get this to run at all?
@Nosson1459, apparently the counter is incremented when a bus leaves the world at zero x-coordinate value. You could conceivably be passed two or three busses that have not been scored yet.
@Nosson1459, I asked before, and I will ask once more, to please start a discussion thread on this issue (where codes can be show easier and the scenario comments are left for general comments on the specific scenario).
@Nosson1459, I guess you could create a second Scroller object for the same world and not include a background image so that you can scroll the actors only with it and have the first one scroll both.
@Nosson1459, I had to modify the codes you were interested in. Please note the changes in the 'selectable actor follow scrolling code' scroll methods.
@tkiesel, you suggested this: // find a similar positive value for scroll positions if (imageX < 0) { imageX %= wide; imageX += wide; } if (imageY < 0) { imageY %= high; imageY += high; } // get new starting positions for drawing 'scrollImage' imageX = imageX%wide; imageY = imageY%high; which does indeed work (I, for some reason, was under the impression that all mod returns were positive -- apparently, on negative values, when there is a remainder, the value returned is negative; hence, the confusion). Even better, then, would be this: // find a similar near-zero value for scroll positions imageX = imageX%wide; imageY = imageY%high; // adjust for negative values if (imageX < 0) imageX += wide if (imageY < 0) imageY += high;
@Nosson1459, the 'selectable actor follow scrolling code' example shows how to govern the scrolling speed while following an actor.
@Nosson, start a discussion thread on this. Be more detailed in your description. Also, if you could describe the platform scenario of which you mentioned (I do not believe that anything is "missing").