Hi,
Another thing found when doing "strange things" was a error message that I think shouldn't be shown. Follow the description below to get it..
1) Start the About-example
2) Add the code:
CurrentModel.Material.Color = 12345;
to the OnSpawn.ZExpression
The error message I get is:
"Unknown iname Color (d:\Data\Delphi32\ZzDC\tools\ZDesigner\ExprEdit.pas, line 68)
I'll keep hacking and keep reporting.
Unclear Error Message
Moderator: Moderators
It can't be easy writing expressions when there are not yet any documentation, this is a high priority for me!
When you assign values to a color, you must assign the red, blue, green, and alpha values seperately, like this:
The range is 0.0 to 1.0.
Next, there is not yet support for accessing objects through their parents.
So instead of writing:
CurrentModel.Material.Color = 12345;
You must give the Material a name like "PlayerMaterial", and write:
Another way of changing the color is to use a RenderSetColor command, give it a name (playercolor), and write:
When you assign values to a color, you must assign the red, blue, green, and alpha values seperately, like this:
Code: Select all
MyMaterial.Color.R = 0.5;
Next, there is not yet support for accessing objects through their parents.
So instead of writing:
CurrentModel.Material.Color = 12345;
You must give the Material a name like "PlayerMaterial", and write:
Code: Select all
PlayerMaterial.Color.R = 0.5;
Code: Select all
PlayerColor.Color.R = 0.5;
-
- Posts: 4
- Joined: Fri Feb 02, 2007 5:24 pm
Yep, that error message you got wasn't very informative
I'll put it on my todo-list.
Also check out the new help topic: Writing expressions.

I'll put it on my todo-list.
Also check out the new help topic: Writing expressions.