Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: ninjagear on September 17, 2013, 10:13:40 PM

Title: Custom Properties?
Post by: ninjagear 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
Title: Re: Custom Properties?
Post by: 2.0 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
Title: Re: Custom Properties?
Post by: ninjagear 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