Would it be at all possible, strictly from a code standpoint, to have a world.ColourPick function that brought up the colour picker and returned the RGB number that the user chose? This'd be quite handy.
Colour Picker
Posted by Beale on Wed 10 Aug 2005 07:20 PM — 5 posts, 19,763 views.
Sounds good, but the problem is the script would pause the client indefinitely while you choose a colour.
Hmmm. But would this actually be a problem?
I mean, VBScript already does this for things like InputBox and MsgBox, but I guess it can do that because it's an external component, and the functionality is built in. It might be more of a problem for, say, Lua.
Would the main program thread keep running while the script paused?
And I guess the other issue is working out what kind of value to return...
I mean, VBScript already does this for things like InputBox and MsgBox, but I guess it can do that because it's an external component, and the functionality is built in. It might be more of a problem for, say, Lua.
Would the main program thread keep running while the script paused?
And I guess the other issue is working out what kind of value to return...
It probably can be done easily enough, if you are prepared to accept the pause. If the script pauses then basically the client pauses, which isn't a great thing if you have multiple worlds.
As for returning the value, a single number would do it, that is how RGB values are stored internally anyway (one byte each for red, green and blue).
As for returning the value, a single number would do it, that is how RGB values are stored internally anyway (one byte each for red, green and blue).
Added PickColour script function to version 3.67.