Light From a Script_Mover Not Working!


(LaggingTom) #1

It seems like every day I come here with one problem or another :smiley:

This time, it’s light. I have a script_mover:

{
"targetname" "light_norm"
"scriptname" "light_norm"
"classname" "script_mover"

My script:

light_norm
(
	spawn
	{
		wait 200
		setstate light_norm default
	}
}

The shader that the script mover is textured by:

textures/train/light_norm
{
	surfaceparm glass
	implicitMap -
	q3map_lightrgb 226 230 171
	q3map_surfacelight 50
}

I do a -meta compile, then a -light -fast compile, and when I devmap the map, I get pitch black (Not the map Pitch Black, which is awesome, yet confusing. Love that train.), but complete and utter darkness. Makes me so sad. When I put a normal light entity in the map it works however. Any clues?


(nUllSkillZ) #2

Hmm, as answered in this thread:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8223

Try to use “attachtotag”.


(LaggingTom) #3

I’m quite unsure how. I tried using

white   //name of the light
{
	spawn
	{
		wait 200
		attachtotag light_norm tag_norm
	}
}

but all I got was flickering.


(LaggingTom) #4

Alright, I’m so lost on this topic, that I think I should start anew. The script is gone, the shaders are gone, all I have is the following entities:

// entity 2
{
"_color" "0.983333 1.000000 0.757036"
"targetname" "white"
"scriptname" "white"
"light" "250"
"origin" "628 -540 248"
"classname" "light"
}
// entity 3
{
"classname" "light"
"origin" "628 -540 248"
"light" "250"
"scriptname" "red"
"targetname" "red"
"_color" "1.000000 0.085319 0.096375"
}
// entity 4
{
"spawnflags" "2"
"targetname" "light_red"
"scriptname" "light_red"
"classname" "script_mover"
// entity 5
{
"scriptname" "light_white"
"spawnflags" "2"
"targetname" "light_white"
"classname" "script_mover"

I have no knowledge of how to make tags. I know what they do, but not how to make them do it. I am in need of a step by step on what to do.

The two light entities are in the same exact position as eachother, and the script_movers are the same. The lights and script_movers don’t overlap, however. How might I make it so light_red and red show up, while light_white and white do not, and vis versa.

Remember, I’m a newbie, so I have pretty much no knowledge. Period. Compared to other mappers, I’m pretty much in preschool. Just would like to learn how to do it, rather than just “here’s a script! shove it in and it’ll work.”.


(LaggingTom) #5

:bump:

I know, I’m being extremely demanding about this, but it’s so very much needed.


(LaggingTom) #6

Alrighty, I made the script_movers into MD3s and the lights into dlights, so they flash the way I want. Woo!

But I realized that only the lights are… lighted. The rest of the room remains dark. Any ideas (I’m hoping no one says change the room shaders to red, because I’m hoping there’s an easy way out).


(MadJack) #7

To use dlight you have to use “alertentity targername” this will toggle the dynamic light. There is a catch though… For a dlight to work correctly, they need some already lighted/lightmapped surface meaning if you alertentity a dlight that is beside a dark/black wall (that is receiveing no light at all) you probably won’t see its effect.

Just for testing purpose, you might want to try a _minlight of… 30 or so and see if that helps.