Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: SetText Function  (Read 2679 times)

0 Members and 1 Guest are viewing this topic.

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
SetText Function
« on: November 20, 2008, 05:02:27 PM »

Is there a SetText function available that changes the text, for example, on a sign.

Or is there a similar function or method to do that?  I checked the scripting reference and couldn't find that particular one.

If I had a sign and it said "Beer 50 gold" and wanted to change it to "Free beer", what function would do that?

Thanks for any help.

Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

maze

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 59
  • Good news
    • View Profile
Re: SetText Function
« Reply #1 on: November 20, 2008, 06:37:18 PM »

You are talking about a window object? Maybe a static control?

Then this could give you the right idea

Code: [Select]
var signtext = this.GetControl("sign");
...
signtext.Text = "Free beer";

cheers  ::beer
Logged

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: SetText Function
« Reply #2 on: November 20, 2008, 06:55:21 PM »

That solves 2 of my problems actually and was very helpful.  Thanks.  Here is a virtual beer.  :  )  Unfortunately it's somewhere hidden on this page.  You'll have to point and click to find it.  :  )




[beer]
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  
 

Page created in 0.066 seconds with 21 queries.