I'm having a click on the window to open but not sure how to have it closed if clicked on again ?
Would you hide the first hotspot and show the 2 hotspot and then repeat ?
If you have 2 separate objects for open and closed, each object turns itself off, and the other one on. If you have one moving object, set a variable for whether or not the window is open.
Anyway to do it with DD ? (drag&drop)
He means that you have two separate objects: one an open window and another a closed window. You would have to have sprites on it and yes, to move objects it is drag and drop. Try to figure out a script. I may help you tomorrow on the script though.
This is what I've used for opening/closing a drawer, it should work for you too:
// Where ever you want is triggered from (Object interaction or Hotspot interaction)
if (GetObjectGraphic (0) == xx) { // where x is the sprite number of the 'open window' graphic
Ã, AnimateObjectEx (0,0,3,0,0,1); // You could use AnimateObject, but I wanted it blocking.
}
else if (GetObjectGraphic (0) == yy) {// where yy is the sprite number of the 'closed window' graphic
Ã, AnimateObjectEx (0,0,3,0,1,1); // runs the loop backwards
}
Check the parameters for AnimateObjectEx (..)to make it run how you want (e.g. delay, blocking)
Thank you all try to get this to work .