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: Quit the entities name when the mouse is over them  (Read 3705 times)

0 Members and 1 Guest are viewing this topic.

gato salvaje

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
    • View Profile
Quit the entities name when the mouse is over them
« on: August 16, 2010, 03:20:08 PM »

Hello,

We have a similar problem than megane on his topic:

http://forum.dead-code.org/index.php?topic=4267.0

What we want to do it's to keep the name of the entities under the mouse pointer when the mouse is over them, like the wme_demo does. We compared all the script codes of both project (game, game_loop, entities scripts...) and we cannot find where the code to do that is. Also, we didn't find anything on the Wme Documentation. Our solution, for now, is:

on "MouseEntry"{
   this.Talk("Escritorio","",3000,"");
   
}

on "MouseLeave"{

   this.Talk("Escritorio");
}

Any subjection? Thank for all  :)

Best Regards

Gato Salvaje
Logged

Darky

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 109
    • View Profile
    • Spreadcamp
Re: Quit the entities name when the mouse is over them
« Reply #1 on: August 16, 2010, 04:15:38 PM »

It should be default behavior to have the name under the mouse pointer. The position of the text is defined in game_loop.script, but the name itself comes through a so called "Caption" that you defined for example in SceneEdit. In SceneEdit there's a "Entity Properties" menu where you can enter the Caption. You should always define it there if you can.
Also you don't need MouseEntry and MouseLeave events to define it. Just make sure you gave the objects in question a "Caption" as said.

If for some reason you can't do it in the SceneEdit (sometimes you load objects via script instead of placing them via SceneEdit) you can write in the script to that object:

this.Caption = "Escritorio";

And get the same result as well.

Don't use "this.Talk" other than to make things really Talk ;)
Hope that helped.
Logged

gato salvaje

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
    • View Profile
Re: Quit the entities name when the mouse is over them
« Reply #2 on: August 17, 2010, 02:26:09 PM »

Thank you so much.

We made the tutorials long time ago and we didn't remember this option in the scene Editor. We used and it works perfectly. Now, we're going to delete of the this.Talks, MouseEntry and MouseLeave of the entities :)

Best Regards and Thank you.

Gato Salvaje
Logged
 

Page created in 0.024 seconds with 23 queries.