LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Block Script

Root / Programming Questions / [.]

16bitcoderCreated:
(Now that my thousand projects have turned into 2 and almost 1) I am glad to announce that SmileIndie (Coding epic and I) are going to make something like scrath (A drag and place language) ! But we need help through tutorials on how to: Click to drag a sprite, connect two sprites and a delete button for sprites. (If someones an have an example for all of those things that'll be amazing) Oh and it must be able to scroll vertically.

(Now that my thousand projects have turned into 2 and almost 1) I am glad to announce that SmileIndie (Coding epic and I) are going to make something like scrath (A drag and place language) ! But we need help through tutorials on how to: Click to drag a sprite, connect two sprites and a delete button for sprites. (If someones an have an example for all of those things that'll be amazing) Oh and it must be able to scroll vertically.
I can set up the commands and them running!

You can connect two sprites with SPLINK

Something like this: Use TOUCH OUT TM,TX,TY to get touch information. If TM = 0 then the screen isn't being touched. Set a variable, "drag_threshold" to a number between 10 and 30. When TM > 0 then place a small invisible sprite at TX,TY and check what it's colliding with. The colliding sprite is your selected sprite. When TM > drag_threshold then SPLINK the selected sprite to your invisible sprite. When TM = 0 then the stylus has been lifted and you can SPUNLINK your dragged sprite. Remember to set and check flags for the state of your drag and drop operation. Your input handler will get called on every frame, but you only want it to SPLINK once, for example.