[COLOR=#333333][FONT=Verdana]Hi all![/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]I`m making a simple escape game. [/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]It has an inventory also to store found stuff.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]When you select an object from this inventory , it starts drag in scale of 50%.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]When you click on its empty space in inventory it stops drag and go back to 100%.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]I used swapDepths to bring selected object to the top, cause it´s strange you move it under other objects.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]It works ok till you move to second room and goes back to first. After that, the dragged object doesn´t scale back to 100% and doesn´t center where it should.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]The problem is the swapDepth, cause if I remove this action it works fine.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]Don´t know if I could explain the problem, so I attached an example file of my game with 2 rooms and 2 objects (a ball and a key).[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]You´ll notice that after pick up the objects from scene and go to the second room and back to first, after few clicks selecting them and put them back in inventory, the functions _xscale / _yscale and _x / _y stops working.[/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]Any help will be welcome![/FONT][/COLOR]
[COLOR=#333333][FONT=Verdana]Thanks.
[/FONT][/COLOR]