Weird behavior

For questions about using Classic.

Post » Mon Nov 08, 2010 3:36 am

Hey guys,

In my game I'm trying to code an inventory system. Items can be picked up with the mouse when clicked and dropped when a click is made with an item on the mouse. A pic of the 'Drop' events is attached.

http://freeebayimagehost.com/images/nuh ... qccktg.png

When the item with ID OnMouse is not over an equipment slot and it's dropped, the code shown under that condition should run. For one of the items, it works fine. For all other items, the quantitytext is never destroyed even though the system message pops up with the correct private variable IDs for item and quantitytext. In addition, the Enable and Disable of the two groups never happens. If I click "OK" on the message boxes, it does work, but if i use spacebar on them to click OK, or if i take them out entirely it doesn't work. Any ideas?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Mon Nov 08, 2010 4:13 am

Ahh figured it out. Apparently the 'Drop' click also counted as a 'Pickup' click for the item that was being dragged on the mouse. Weird because the 'Pickup' group is disabled when the mouse click is made, and it is the mouse click that enables it so i didn't think it would do that. The items that worked happened to have transparencies at the mouse cursor so they didn't get picked up
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest