im new to Scratch, and any kind of game programming, and iv been trying for 2 days to get this simple thing to work.
i want my sprite to able to walk around and pick up these little black box sprites and then drop them where he needs, he can have a max of 5 at a time, and needs to have picked some up before he can drop them, they need to disapear when he picks them up.
i got the picking up part, when hes touching the color, they dispear, and then i go to place it, and it sort of works, but they ALL go to the spot wheres hes at, not just the one i "picked up"".
any helps or tips would be a appreciated
Offline
Knowing how you've scripted it it would help.
Assuming you are using 5 sprites for the black boxes I imagine that you have a script in each for if touching pick up. I also imagine that you have something like 'if I receive [Space Key] then drop on all sprites; the problem with that being that there is nothing telling it which to drop.
The simplest solution I can see is to have a list that you store the name of the sprite in when you pick it up and when you press the space key (to drop the item) it says 'if item [1] of List is SpriteName then drop and delete SpriteName from List.
---
Example Project: Link to Project
Last edited by Smozzick (2012-10-02 07:19:03)
Offline