Euflorium: The Eufloria Community

Eufloria => Eufloria Classic => Eufloria Classic Mods => Topic started by: annikk.exe on March 28, 2010, 10:49:31 PM

Title: Three scripting questions
Post by: annikk.exe on March 28, 2010, 10:49:31 PM
1.  How do I set an empire's ingame colour?  Is it possible to specify this in the level?  For example if I want Empire 2 to always be red..

2.  How does the SetVignetteAlpha command work?  Can anyone show me the correct syntax?

3.  How do I set an asteroid name?  GetAsteriod(0).Name = "Fluffy" doesn't seem to work..
Title: Re: Three scripting questions
Post by: Alex on March 29, 2010, 06:41:36 PM
1. Don't think this is possible at the moment, will investigumate

2. Pretty sure it's a value from 0 to 1, need to clarify that though... will check it out and post back

3. I'll see what's up, it should work...
Title: Re: Three scripting questions
Post by: annikk.exe on March 29, 2010, 07:15:05 PM
RE 2..... aha!!!  I didn't realise that :>  I was using values between 0 and 255, and wondered why the vignette never changed from maximum.  Sweet!

Thanks dude!
Title: Re: Three scripting questions
Post by: annikk.exe on March 30, 2010, 12:19:04 AM
You should probably change the Scripting Reference RE point number 2, by the way...


Quote
SetVignetteAlpha   nil   Set the darkness of the vignette (value from 0 - 255)


I will try vignette again tonight using 0-1 as the value, and hopefully it will work.  :>
Title: Re: Three scripting questions
Post by: Alex on March 30, 2010, 02:13:32 AM
What's actually occurring when you use it?
Title: Re: Three scripting questions
Post by: annikk.exe on March 30, 2010, 02:42:34 AM
eh..
Title: Re: Three scripting questions
Post by: annikk.exe on March 30, 2010, 06:07:14 AM
Ah... never mind... it turns out I had completely forgotten what the problem was :P  It was a while ago now that I tried to get it to work.

Anyway I tried it again this evening, and basically the command doesn't work...or maybe I don't have the syntax right, it's hard to tell.

I get this error:

(http://img710.imageshack.us/img710/2144/errorsc.png)


...when I try to run this code:

(http://img163.imageshack.us/img163/944/codenr.png)

Title: Re: Three scripting questions
Post by: annikk.exe on March 30, 2010, 06:15:31 AM
Also, this code:

(http://img41.imageshack.us/img41/6470/fluffyerror.png)


...results in:

(http://img716.imageshack.us/img716/6065/nameerror.png)

It doesn't give a line number, but the level loads up fine before this command is added....
Title: Re: Three scripting questions
Post by: Alex on March 30, 2010, 07:37:58 PM
OK looks like the asteroid name needs to be exposed. It's read-only.

SetVignetteAlpha should be global scope, not asteroid-scope :)
Title: Re: Three scripting questions
Post by: annikk.exe on March 30, 2010, 08:37:51 PM
Oh right... so SetVignetteAlpha(210) instead of a:SetVignetteAlpha(210) ?  You can't set different vignettes for different asteroids?

Well in that case now I know why it wasn't working...but all the same, it would have been nice to be able to set the vignette for each asteroid seperately.  Hmm, I will try this again tonight :>


For the asteroid name, is that something you would have to fix or is there something else I can do to make it work?
Title: Re: Three scripting questions
Post by: Alex on March 31, 2010, 12:03:33 AM
I'll have to fix it, yeah.

The vignette is the thing that makes the screen look like it's inside a picture frame or whatever, the darkening around the edges. The asteroid atmosphere density is something I'd have to actually add :)
Title: Re: Three scripting questions
Post by: annikk.exe on March 31, 2010, 12:28:26 AM
Ah right :>  Can't quite picture in my head what that looks like... I'll have a look tonight
Title: Re: Three scripting questions
Post by: annikk.exe on March 31, 2010, 08:57:15 AM
Bah, I ended up getting too involved with the AI map I'm working on and forgot about this.  Sleep time now.  Eh..
I'll try it tomorrow.  Honest.  Hey, at least the AI should be good ! :>