Set Player Background Color

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Set Player Background Color // Scriptorium

1  |  

Post by trueBlue // Oct 23, 2006, 4:03pm

trueBlue
Total Posts: 1761
pic
UPDATE: NEVERMIND I FIGURED THIS OUT. THIS WAS TOO SIMPLE!
Posted both of them in the Garage.
This script works in trueSpace7 and it changes the color of the background upon entry. I would like to make it more user friendly, by which a user could double click on the Pick Color Control and then select the Set Color button. Right now the only way you can change colors is to modify the script, for an example change the number in Color.SetRed8(0) to a different number like to (255). I have the Pick Color Control linked to the Color attribute. Secondly and or be able to change those numbers by an Edit Control.
And third but last find a way to use something simular for truePlay scenes. I have blindly tried several different paths to that node but no luck.


Edit: 10-27-2006______________________________________________ ___

Thanks to Dele!
He explained to me how to change the values from an Edit Control.
Simply add a Attribute for each number.


RedNum = params.conValue('RedNum');
GreenNum = params.conValue('GreenNum');
BlueNum = params.conValue('BlueNum');


Then change the number (0) to that Attribute: Color.SetRed8(BlueNum);
__________________________________________________ _____________



// Name: Set Player Background Color
// Author: David A.Egan (trueBlue)
// Date: October 2006
function Execute(params)
{
Color = params.conValue('Color');
Color = System.CreateDO("Common Data Package/Color Data");
Color.SetRed8(0);
Color.SetGreen8(0);
Color.SetBlue8(0);
Node.Value("/Project/Windows Manager Space/Frame Window/Split Docking Place/Frame Window/Split Docking Place/Frame Window, 2/Border Docking Place/Frame Window, 2/Player - Window", "BackgroundColor") = Color
}

Post by Asem // Oct 23, 2006, 4:18pm

Asem
Total Posts: 255
For the path problem, look for a node under Systems/Kernal and use the node 'owner name'.

This automatically gets the current location of itself which you could use to your advantage. It should let you export without having the user specify where it is located.

Hope this picture explains it.

Post by trueBlue // Oct 23, 2006, 8:34pm

trueBlue
Total Posts: 1761
pic
Thank you Asem, I found the path in truePlay by looking at it's Rosetta.log. I was trying to do this with a script. If I am following you right with your example you are using various components. I have been interested to learning about OwnerName but it is Greek to me at this point. Maybe you could come up with a soution to install something (toolbar, widget, find a certain item) that would work globaly with all layouts. That would be a really great!
Peterma "Caligari Developer" made a script "Recursive" Search (I believe thats the word) Script:
http://forums1.caligari.com/truespace/showpost.php?p=15482&postcount=43 (http://forums1.caligari.com/truespace/showpost.php?p=15482&postcount=43)
This thread may help to explain the difficulties in installing/seeking items.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn