Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Query an 3d actors position  (Read 4206 times)

0 Members and 1 Guest are viewing this topic.

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Query an 3d actors position
« on: August 18, 2006, 05:04:49 PM »

The title says it all I guess. How to?

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Query an 3d actors position
« Reply #1 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)  ;)
Logged
fl*p

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Query an 3d actors position
« Reply #2 on: August 18, 2006, 05:45:28 PM »



Don't forget: Documentation is the best place to find a fast answer(tm)

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Query an 3d actors position
« Reply #3 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 ;)
« Last Edit: August 18, 2006, 06:08:51 PM by odnorf »
Logged
fl*p

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Query an 3d actors position
« Reply #4 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.

« Last Edit: August 18, 2006, 06:11:53 PM by Amo »
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Query an 3d actors position
« Reply #5 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?
Logged
fl*p

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Query an 3d actors position
« Reply #6 on: August 18, 2006, 06:13:23 PM »

Thank you, know it works.
 ::thumbup

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Query an 3d actors position
« Reply #7 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?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: Query an 3d actors position
« Reply #8 on: August 18, 2006, 07:39:09 PM »

The last thing Odnorf said, is what we needed, now it works.
 

Page created in 0.04 seconds with 21 queries.