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: Custom Properties?  (Read 2539 times)

0 Members and 1 Guest are viewing this topic.

ninjagear

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Custom Properties?
« on: September 17, 2013, 10:13:40 PM »

when i create a new sprite or region inside a scene, there is a button labeled "Custom..." inside the inspector for said sprite or region. when i click on this button a window called "Properties of the 'OBJECT_NAME_HERE' object" opens up. this window has three buttons: new, edit, and delete. clicking the new lets u add a name and value key combination to any given sprite or region scene object.

when i put the name as pathto, the key will stay saved and will be there when i close and reopen the scene

when i enter the value of above key as "scenes/room_south/room_south.scene", the key will erase itself and not be there after i have saved the scene, closed the scene in the editor, and reopen the scene in the same editor. the key erasing itself happens whether i save the project first, and/or attempt to just build and run the project.

can anyone help? any thanks in advance
Logged

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Custom Properties?
« Reply #1 on: September 18, 2013, 12:34:59 AM »

Use as a value your string without quotes, i.e. simply scenes/room_south/room_south.scene
Also keep in mind that all custom parameters - string variables, and if you will use they for numbers, before using do type conversion.
For example if you custom parameter SomeValue equals 2:

Code: WME Script
  1. var CorrectValue1 = this.SomeValue; //CorrectValue1 = "2"
  2. var CorrectValue2 = ToInt(this.SomeValue); //CorrectValue2 = 2
Logged

ninjagear

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Custom Properties?
« Reply #2 on: September 18, 2013, 01:10:35 AM »

Use as a value your string without quotes, i.e. simply scenes/room_south/room_south.scene
Also keep in mind that all custom parameters - string variables, and if you will use they for numbers, before using do type conversion.


thanks for the help and the heads up about casting
Logged
 

Page created in 0.036 seconds with 20 queries.