How can I make something draggable on a scrolling background, so when you place it, it sets it's ScrollX and ScrollY to wherever you placed the sprite?
Offline
Uhmmm... could you give some more detail? I can't figure out what you really need.
Offline
s_federici wrote:
Uhmmm... could you give some more detail? I can't figure out what you really need.
Alright. So you drag a sprite somewhere on a scrolling background. As soon as you place it, it changes it's ScrollX and ScrollY to whatever you moved it too, so it doesn't just stay in the middle of the screen.
Joeyman, I will try that, thought it might not work
Offline
I used:
[blocks]<when green flag clicked>
<forever>
<if><< <touching[ mouse-pointer <and> <mouse down?> >>
<go to[ mouse-pointer
<end>
<if><< <not> << <touching mouse pointer <and> mouse down? >>
<change x by( -3
<end> [/blocks]
The last script where it says to change the x by -3... that's only if your ScrollX is being changed by -3... if the ScrollX is being Changed by -10, than the red ball would be changed by -10... get it?
Last edited by joeyman (2008-07-05 09:50:22)
Offline