I am building a motorcycle jumping game. I allow the user to put in the angle of the ramp, which is then drawn on screen using the pen block. As the motorcycle travels toward the ramp the level scrolls. Is there any way to have a finished pen drawing scroll with the scene.
Offline
Wow... That's a hard one... I suppose you could continually redraw the line.
But personally I think you're better off having a sprite which is a straight line, and then when the angle is entered, it points in that direction.
Last edited by WeirdF (2010-12-23 10:12:13)
Offline
I guess you could do something like this...
[blocks]<when green flag clicked>
<forever>
<point in direction( angle
<pen down>
<repeat( 10
<move( 1 )steps>
<end>
<pen up>
<repeat( 10
<move( -1 )steps>
<end>
<end>
<when green flag clicked>
<forever>
<change x by( scrollx
<end>[/blocks]
This would make the sprite continually keep drawing the line, but in the place that scrollx is.
(this may not work very well, and if it dosent, replace the repeats with just 10x the move 1 steps blocks.
Hope I helped!
Offline
I'd go with WeirdF's solution of just making a sprite that's a line and having it rotate. Since things drawn with pen are static, you would have to constantly redraw the line, which only sometimes works. (Usually it tends to flash and look bad.)
Offline