Hi!
I'm trying to do simple drag & drop puzzle. I have a room (without characters), and some objects that you are supposed to drag to right places. Currently i'm using following script:
Code: ags
That works for dragging the item around (even though my item "jumps" a bit annoyingly every time it's clicked). But how can I drop the item in the right place so that new command is activated? For example if my puzzle had a draggable key and I would drop it over a lock, what is the best way to make it work? I have read the forums, but haven't found an answer (many of the old links are not working anymore...)
Anyway, all help is welcome, thanks in advance!
I'm trying to do simple drag & drop puzzle. I have a room (without characters), and some objects that you are supposed to drag to right places. Currently i'm using following script:
function oMyItem_Interact(){
while(mouse.IsButtonDown(eMouseLeft)){
oMyItem.X = mouse.x;
oMyItem.Y = mouse.y;
Wait(1);
That works for dragging the item around (even though my item "jumps" a bit annoyingly every time it's clicked). But how can I drop the item in the right place so that new command is activated? For example if my puzzle had a draggable key and I would drop it over a lock, what is the best way to make it work? I have read the forums, but haven't found an answer (many of the old links are not working anymore...)
Anyway, all help is welcome, thanks in advance!