Determining position

  • Apologies if this has been covered before or is in the quickref; I've had a scour of both and cannot find anything -- how would I go about getting the position of the user?


    We are trying to make a hidden-object type game and need to be able to run custom javascript when the user / player is at certain positions (or hotspots) and is looking at certain things. So we need to know where the user is (either an absolute location or a reference Id to which hotspot they are at). I believe we can use adjusthlookat to determine the direction we are looking.


    We could either set an interval to determine the user's hotspot / absolute location, or if there are events that fire when a user enters and leaves hotspots (reporting their ids at the same time), we could then run our necessary code.


    Any thoughts from anyone about how we can achieve this?

  • Din't get your point but from what is written I would suggest to use additional variable e.g. active_hotspot="1" or "house" or custom hotspot tag which you set on true when hotstpot clicked...
    Checking this you can determine "where" you are and trigger actions. Or I missed your question?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!