# RPG: drag&drop problem

**URL:** <https://forum.kirupa.com/t/rpg-drag-drop-problem/270752>\
**Category:** programming\
**Created:** [September 13, 2008, 3:27pm UTC](https://forum.kirupa.com/t/rpg-drag-drop-problem/270752 "2008-09-13T15:27:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcogiannini](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@marcogiannini](https://forum.kirupa.com/u/marcogiannini)\
**Post date:** [September 13, 2008, 3:27pm UTC](https://forum.kirupa.com/t/rpg-drag-drop-problem/270752/1 "2008-09-13T15:27:56Z")

</div>

hi all,  
I’ve built this simple engine for Roleplaying game; it’s an engine that permits to store a coin in a backpack and retrieve it as soon as needed.  
It is fully usable, but the retrieveCoin function doesn’t go, maybe because of a targeting problem (???); I’m struggling on it since a few days, can any expert coder help me please? I’m full of endless gratitude to anyone will gimme a hint

Functions are scattered through different layers in order to make them recognizable and have the attachCoin function well separated… this introduce the second problem: it comes at the beginnig, I’m not sure how to handle the initial function that scatters coins all over the screen. I need to make them appear many time, in some different position, so I guess I need an array to drive each one at its position, via the attachCoin function

fla in attachment (CS3, but AS 2.0)

thank a lot you all in advance
