My light doesn't want to bind!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Shuriken1
Corporal
Posts: 28
Joined: Thu Sep 02, 2004 3:05 pm
Contact:

My light doesn't want to bind!

Post by Shuriken1 »

Ok, I am officially stumped.

I've made a lift in my map by following the tutorial over at rjukan project. Before I go on I'd like to thank them for doing that tutorial, very useful. Anyway, I want to add a light to the lift comprising of a static_lamp_lightbulb-caged, a static_corona_util and the light.

Obviously I need to bind those objects to the lift otherwise they won't move together.

First attempt: Give the corona and the light bulb the targetname "lift_cab_light" then, in the elevator_preparation thread;

Code: Select all

$lift_cab_light bind $lift_cab
This didn't work, when the lift starts moving, the light does not.

Second attempt: Give the corona the targetname "lift_cab_corona" and the lightbulb the targetname "lift_cab_light" then, in the same thread:

Code: Select all

$lift_cab_light bind $lift_cab
$lift_cab_corona bind $lift_cab
Same result.

I cannot believe that such a simple operation has confused me so much, I presume I have overlooked something so blatently obvious that I will need to do a ritual dance to make up for my stupidity. Anyway, any and all help is appreciated.

Thanks.
Shuriken1
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

i just recently had that problem on one of my maps with a trigger and a switch. i had them perfectly scripted to bind to the elevator but no matter what i did it didnt bind. i even deleted the two things and even the elevator and redid them. same thing. so i had to chooses a didfferent option :-\ my first idea looked great but my new one isnt too bad.
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

did you make them script_models?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Script_model

Post by tltrude »

Yep, change the classname of both to "script_model". Be sure to make a backup of your .map first because script_models have a bad habbit of getting lost.
Tom Trude,

Image
Shuriken1
Corporal
Posts: 28
Joined: Thu Sep 02, 2004 3:05 pm
Contact:

Post by Shuriken1 »

Ok, that seems to have done the trick, on a slightly different note, I want the light to be notsolid so it doesn't get in the way. Is this the right code:

Code: Select all

$lift_cab_light notsolid
Also, all of my other lights seem to have disappeared, but I'm not sure that is directly related to the lift light at the moment. I will look into that before posting on here about it.
Thanks again.
Shuriken1
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

You can mark the NOT_SOLID checkbox for the script_model in Radiant ( will result in spawnflags = 1 ).
Admin .MAP Forums
Image
Head above heels.
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

I have a cable car that I fixed a corona to like this:

Code: Select all

  local.gl2 = spawn script_model model models/fx/corona_green_bright.tik scale 2.0 origin ( 4705 905 1600 ) spawnflags 1 targetname "green2" bind $platvator
All done on the one line, I get lazy and try to avoid typing Local.this and local.that all the time ;-)

Grassy
Shuriken1
Corporal
Posts: 28
Joined: Thu Sep 02, 2004 3:05 pm
Contact:

Post by Shuriken1 »

Ok, thanks for the info guys. I've decided to redo the lighting in my map as it doesn't suit what I want it to do, so that will fix the missing lights at the same time. :)
Shuriken1
Post Reply