Crystal Space
Welcome, Guest. Please login or register.
September 18, 2014, 02:56:21 am

Login with username, password and session length
Search:     Advanced search
9018 Posts in 2051 Topics by 8474 Members
Latest Member: Icahlee5
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  Multiple flashing/changing lights?
« previous next »
Pages: [1] Print
Author Topic: Multiple flashing/changing lights?  (Read 3202 times)
Panch
Jr. Member
**
Posts: 80


View Profile Email
« on: June 21, 2007, 06:51:28 pm »

Hello all,

I'm using hardware lights for this.
I'm changing the attuenation of a few lights using light->SetAttenuationConstants((0,0,0)); but when I set one light (psuedo) to go completly dark, all other lights don't seem to shine light either afterwards. Also if I move a dynamic light with:

l1->GetMovable()->MovePosition(csVector3(0,4,0));
l1->GetMovable()->UpdateMove();
l1->Setup();

It just seems to zip out to nowhere.

Any ideas?

Eh, NM - I think I got it Smiley

Thanks!
« Last Edit: June 21, 2007, 06:54:31 pm by Panch » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: June 21, 2007, 09:31:59 pm »

Eh, NM - I think I got it Smiley

Thanks!

No problem. Glad we could help smiley

Greetings,
Logged
Panch
Jr. Member
**
Posts: 80


View Profile Email
« Reply #2 on: June 21, 2007, 10:32:26 pm »

Hey Jorrit,

Thanks for the quick reply Smiley, I answered my previous questions in the above post; but that still didn't lead me to something like a flashing or strobing light. Well without keyboard intervention anyways. I wrote a FlashOn function in which the attenuation was a positive csVector and then a FlashOff function with a attenuation of 0 but like I said I have to use the keyboard to get it to 'flash'.

Any idea?

Thanks Smiley
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: June 22, 2007, 05:30:44 am »

Hey Jorrit,

Thanks for the quick reply Smiley, I answered my previous questions in the above post; but that still didn't lead me to something like a flashing or strobing light. Well without keyboard intervention anyways. I wrote a FlashOn function in which the attenuation was a positive csVector and then a FlashOff function with a attenuation of 0 but like I said I have to use the keyboard to get it to 'flash'.

Any idea?

Thanks Smiley

Well you could use a timer event. Check out the csEventTimer utility class.

Greetings,
Logged
Panch
Jr. Member
**
Posts: 80


View Profile Email
« Reply #4 on: June 22, 2007, 12:34:33 pm »

Ah nice, I must have missed the timer in the documentation. I was toying with the idea of calling a rand(gloabal) and then doing something like FlashingOn(global /2) FlashingOff(global / 3), but i actually think the timer would suite me better.

Thank ya kindly Smiley
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.198 seconds with 16 queries.