How do I make drag and drop only work once? (Unanswered)

Get help using Construct 2

Post » Sat Apr 25, 2015 1:38 am

I have an event where you buy the item, it goes to the game layout and you can drag and drop the item you bought, but only once. But it ends up to where you can drag and drop the object as much times as you want. How do i fix this? Thanks for help in advance!
Last edited by firezombie444 on Tue Apr 28, 2015 12:52 am, edited 1 time in total.
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Sat Apr 25, 2015 1:51 am

there's many ways to deal with this..

I would set a boolean instance on the object. Something like.. HasBeenPicked

set it to true after you buy it.. and only allows selecting it if HasBeenPicked = false (or rather invert it.....X HasBeenPicked)
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715

Post » Sat Apr 25, 2015 2:23 am

It still doesn't work though because I can't destroy a specific instance since it might vary since the player may have a different amount of the objects. Is there any other way?
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Sat Apr 25, 2015 8:21 am

on drag&drop drop: set drag and drop disabled
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sat Apr 25, 2015 9:56 am

use global variables and set value to object that you wanna drop and drag it to 0 and when object in drag system add one to variable , in addition to when variable be = 1 ; disable the object
B
55
S
18
G
10
Posts: 209
Reputation: 8,546

Post » Sat Apr 25, 2015 4:20 pm

Ok but i only need it to disable/destroy the one object that was initially spawned after you dragged and dropped the object you want.
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Sat Apr 25, 2015 10:55 pm

mindfaQ gave u the answer already---
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Sun Apr 26, 2015 12:35 am

I know, but when the object is created from the start of the layout, i can drag a 2nd instance of the same object so i can make as much instances of the object as i want, but i only want want to destroy the object initially created. This is a bit hard to explain in words though, is there a way to post a capx file in a reply?
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Mon Apr 27, 2015 7:55 pm

Where did the option to post an attachment go? I tried posting another post and I don't see the option anymore.
B
12
S
3
Posts: 129
Reputation: 1,131


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Phacanu, richcoz81, Txchaser, Yahoo [Bot] and 29 guests