Hello AGS comunnity!
I really honestly tried to find a solution to my problem myself, the solution that works for me seems too weird.
So - I have two objects in a room located on same place (a cabinets with an open/closed door) and I want the door to open and close by clicking, by changing the visibility of the objects. I was try:
------------------------------------------------------------------------------------------------------------------------------------------
1: In this version, only the first part ("opening the cabinet") works, and the game does not respond to further clicks.
------------------------------------------------------------------------------------------------------------------------------------------
2: In this attempt, only the first part works again (again only "opened door"), but I suspect that this code is completely wrong.
-----------------------------------------------------------------------------------------------------------------------------------------
3: The only solution I came up with is to use a function on both objects.
This work, but I suspect the situation could be handled much more elegantly. I hope that you, experienced guys, can advise how to solve such situations.
I will also add that BaselineOverriden is false, oCabinedClose is visible after startup(on top of oCabinetOpen), I make sure that the visibility states in the properties correspond to the start of code.
Thank you
I really honestly tried to find a solution to my problem myself, the solution that works for me seems too weird.
So - I have two objects in a room located on same place (a cabinets with an open/closed door) and I want the door to open and close by clicking, by changing the visibility of the objects. I was try:
------------------------------------------------------------------------------------------------------------------------------------------
1: In this version, only the first part ("opening the cabinet") works, and the game does not respond to further clicks.
------------------------------------------------------------------------------------------------------------------------------------------
2: In this attempt, only the first part works again (again only "opened door"), but I suspect that this code is completely wrong.
-----------------------------------------------------------------------------------------------------------------------------------------
3: The only solution I came up with is to use a function on both objects.
This work, but I suspect the situation could be handled much more elegantly. I hope that you, experienced guys, can advise how to solve such situations.
I will also add that BaselineOverriden is false, oCabinedClose is visible after startup(on top of oCabinetOpen), I make sure that the visibility states in the properties correspond to the start of code.
Thank you