Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Amo on August 18, 2006, 05:04:49 PM

Title: Query an 3d actors position
Post by: Amo on August 18, 2006, 05:04:49 PM
The title says it all I guess. How to?
Title: Re: Query an 3d actors position
Post by: odnorf on August 18, 2006, 05:13:09 PM
I guess you have read the wme docs but missed it. In this case open the wme docs.
The go to "Scipting in WME" -> "Script language reference" -> "3D actor object".
And check the PosX, PosY, PosZ attributes.

You can even find this page at the wme online docs.
http://docs.dead-code.org/wme/generated/scripting_ref_actor3d.html

Don't forget: Documentation is the best place to find a fast answer(tm)  ;)
Title: Re: Query an 3d actors position
Post by: Amo on August 18, 2006, 05:45:28 PM


Don't forget: Documentation is the best place to find a fast answer(tm)
Title: Re: Query an 3d actors position
Post by: odnorf on August 18, 2006, 05:58:28 PM
Well, I answered your question. A simple "thank you" will be much more appreciated that trying to offend me. Have you actually tried to script the behaviour you are after in your game or are you asking questions before you actually have a problem due to laziness problems?

How about trying actor.PosX; and see what this will return?

EDIT: I edited my script due to my own laziness problems ;)
Title: Re: Query an 3d actors position
Post by: Amo on August 18, 2006, 06:06:26 PM
Definetly we work on it since hours, our problem is, that we work on a commercial project under very hard time pressure without an full time programmer, changed the engine during the project realisation to WME and try to find our way through the mixture of 2D and 3D and no, I don't try to offend you, thank you for the snippet, but, as I hear from my back: Unfortunately it doesn't work, but it is a starting point.

Title: Re: Query an 3d actors position
Post by: odnorf on August 18, 2006, 06:10:51 PM
What is the error?
Have you tried actor.PosX; or actor.PosX(); as I accidentally typed before?
Title: Re: Query an 3d actors position
Post by: Amo on August 18, 2006, 06:13:23 PM
Thank you, know it works.
 ::thumbup
Title: Re: Query an 3d actors position
Post by: Mnemonic on August 18, 2006, 06:14:02 PM
Perhaps if you told us what *exactly* you need to achieve, we would be of more help. You asked how to query 3D actor's position, and odnorf answered the question. You query the position by using the actor.X and actor.Y properties (for 2D postion on screen) and by using the actor.PosX, actor.PosY and actor.PosZ properties (for 3D position in space). What more is there to say?
Title: Re: Query an 3d actors position
Post by: Amo on August 18, 2006, 07:39:09 PM
The last thing Odnorf said, is what we needed, now it works.