For a short story project I'm working on, I need a sprite to dissapear when it changes scenes. How do I go about making it move off screen? I've tried having it move 1,000 steps so it should in theory go off screen but it doesn't.
Help? D:
Offline
Yeah, you can't make them move off the screen entirely. Instead, use the "Hide" block under the "Looks" tab. If you want them to come back, use the "Show" block.
Offline
prasannab, before moving your sprite to the new position, remember the old/current one by storing it into a set of variables, e.g. like this:
[blocks]
<set{ oldX }to( <x position>
<set{ oldY }to( <y position>
<set{ oldDir }to( <direction>
[/blocks]
If you want your sprite to come back to this position afterwards, you can just reverse the code like this:
[blocks]
<go to x <{ oldX }> )y <{ oldY }>
<point in direction( <{ oldDir }>
[/blocks]
Does this answer your question?
Offline
Jens wrote:
prasannab, before moving your sprite to the new position, remember the old/current one by storing it into a set of variables, e.g. like this:
[blocks]
<set{ oldX }to( <x position>
<set{ oldY }to( <y position>
<set{ oldDir }to( <direction>
[/blocks]
If you want your sprite to come back to this position afterwards, you can just reverse the code like this:
[blocks]
<go to x <{ oldX }> )y <{ oldY }>
<point in direction( <{ oldDir }>
[/blocks]
Does this answer your question?
That's the same as my undoing project!
Offline
jamie wrote:
<set[ Ghost ]effect to( 100
"Set Ghost Effect to 100" is in the "looks" tab, "Ghost" is in a drop-down menu.
I prefer to use show/hide as ghost effect slows your game.
Offline
prasannab wrote:
I want to bring my sprite back to its old position after trying out a new position. How ???
here's what you should do:
put the sprite in the place you want it to be before it moves around. Then give it these scripts:
<when green flag clicked>
<go to x 0 )y 0
<when I receive[ move around
<go to x 17 )y -5
<when I receive[ go back
<go to x 0 )y 0
but change the x and y positions to what you want
Last edited by funkymonkey (2008-05-06 19:55:22)
Offline
MiniWolf wrote:
For a short story project I'm working on, I need a sprite to dissapear when it changes scenes. How do I go about making it move off screen? I've tried having it move 1,000 steps so it should in theory go off screen but it doesn't.
Help? D:
<when green flag clicked>
<show>
<when I receive[ scene 2
<hide>
Offline