Drag&drop icon

Get help using Construct 2

Post » Sat Nov 17, 2012 3:22 pm

Hi guys! Here is the question:
- i need to create icon of item? and user can pick this item and palce on a game field, but icon of this object need to stay in item menu.
Example: Plants vs Zombie - when you drag a seed to plant, icon of that seed stay on place, but under cursor you get a copy of this item.

So.. i tried many times.. but failed... Who can solved me that problem?
B
10
S
1
G
2
Posts: 2
Reputation: 1,866

Post » Sat Nov 17, 2012 5:47 pm

Well ... You can place two different objects ( NonDragNDrop *Insert your item name here* and DragNDrop *Insert your item name here* ) of one item in the same position ... Then Attribute the Drag-N-Drop behavior to the top one ( DragNDrop *Insert your item name here* )
And add this little event :

If (NonDragNDrop *Insert your item name here*) is not overlapping (DragNDrop *Insert your item name here*) : (NonDragNDrop *Insert your item name here*) | Spawn (DragNDrop *Insert your item name here*)

And you are done !
Cheers !
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests