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!
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)
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?
on drag&drop drop: set drag and drop disabled
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
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.
Develop games in your browser. Powerful, performant & highly capable.
mindfaQ gave u the answer already---
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?
Where did the option to post an attachment go? I tried posting another post and I don't see the option anymore.