Hi,
I have a flame torch in the inventory. This inventory object animates whilst in the inventory.
When the player selects the flame torch I have imitated a flashing flame torch cursor by allowing an object(animated flame torch) to become visible and have positioned it to sit nicely with the inventory flame torch so it looks like it is animating. At the moment I am using mouse. x mouse.y.
However, seeing as the room (res 800 x 600) is longer the flame torch object does not always line up correctly.
I have tried using Object.GetAtScreenXY but to no avail at the moment.
What would be a sure fire way to make sure that the flame torch object always positions itself with the inventory flame torch cursor.. variable + - mouse x y...
Basically I wanted the flame torch to animate in the inventory (done), on the cusor and of course when the character receives the flame torch inventory another objects animates as well like the player is carrying it, naturally(done).
Hope this is understandable and that you will assist me..
Thanks
How is Object.GetAtScreenXY() going to help here? Even conceptually, why would you need it for this...?
All you need to do is add GetViewportX/Y() to the mouse coordinates, since the mouse uses screen coords and objects are positioned using room coords.
Hi Khris
QuoteHow is Object.GetAtScreenXY() going to help here?
Brain cells diminishing... GetViewportX/Y() of course...silly me...
cheers Khris ;)