Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Window Position over the actor's head  (Read 2679 times)

0 Members and 1 Guest are viewing this topic.

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Window Position over the actor's head
« on: March 18, 2012, 07:42:44 PM »

Sorry for the long title, I thought it would be more specific this way!
I'm using an Icon Based dialogue in my game, and I managed to do that using the guides I found here on the forum. The Window is correctly shown and I have the control over it, but there's something missing for which I could use some help:

The guide I used is great, but it sets the position for my dialogue window(with X and Y coordinates). What I want is the window to be positioned just over the head of my main character.
I searched the forum but couldn't find anything really specific for this question.

I hope somebody can help me! (But generally there's always somebody helpful around here!)
Logged

shuin

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 51
    • View Profile
Re: Window Position over the actor's head
« Reply #1 on: March 18, 2012, 10:03:53 PM »

Can't you just use actor.X instead of X and actor.Y instead of Y?
Logged
Untitled project status: production

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Window Position over the actor's head
« Reply #2 on: March 19, 2012, 02:01:21 PM »

Or rather "actor.Y - actor.Height".
And if you are using scrolling scenes, don't forget to subtract the scrolling offset.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.04 seconds with 21 queries.