Settextcolor

All about writing scripts for Celestia in Lua and the .cel system
Topic author
thefallenghost
Posts: 42
Joined: 08.05.2009
With us: 15 years 6 months

Settextcolor

Post #1by thefallenghost » 11.03.2010, 05:52

I am having issues with the celestia:settextcolor(r, g, b) function. Celestia returns this error when I run my script: Attempt to call method 'settextcolor' (a nil value). The same happens with gettextcolor. Help!
This is the end of the script:

Code: Select all

--starcount = celestia:getstarcount()
celestia:settextcolor(1,0,1)
obs = celestia:getobserver()
hd47536 = celestia:find("HD 47536")
obs:gotodistance(hd47536, 4, 5) --travel to within 4 km of HD 47536
sol = celestia:find("Sol")
obs = celestia:getobserver()
obs:track(sol)
obs:follow(sol)
wait (7.0)
celestia:setfaintestvisible(25)
celestia:setstardistancelimit(800)
celestia:hidelabel("stars","galaxies","nebulae","globulars")
celestia:setstarstyle("disc")
celestia:print("On voit en ce moment environ 67 000 etoiles.", 10.0)
wait (10.0)

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Re: Settextcolor

Post #2by Vincent » 11.03.2010, 08:19

These are new methods which will be available in Celestia 1.6.1.
Meanwhile, you can compile the 1.6.1 SVN development version
or get a Win32 pre-compiled package (revision 4996) from:
http://gvince.perso.sfr.fr/celestia/dev ... 61_SVN.zip
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
thefallenghost
Posts: 42
Joined: 08.05.2009
With us: 15 years 6 months

Re: Settextcolor

Post #3by thefallenghost » 11.03.2010, 17:55

Thanks!


Return to “Scripting”