UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Light Power

broken avatar :(
Created 12 years ago
by pashan
0 Members and 1 Guest are viewing this topic.
2,758 views
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
Signature
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
How do i make a light turn on when the the player turns on the power?!?!
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
How do i make a light turn on when the the player turns on the power?!?!

Use the functions turn_on(intensity) and turn off() in _lights.gsc.
Marked as best answer by pashan 12 years ago
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 7 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
Code Snippet
Plaintext
power_lights = GetStructArray( "light_electric", "targetname" );
thats inside lights.csc
just select the light and tick primary scriptable and primary omni or spot depending on the light type you want and give it the targetname of light_electic
also remember that primary lights need to be connected to an info_null
that will make the light turn on when the power switch is used.
Last Edit: May 18, 2014, 01:23:47 am by jjbradman
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Code Snippet
Plaintext
power_lights = GetStructArray( "light_electric", "targetname" );
thats inside lights.csc
just select the light and tick primary scriptable and primary omni or spot depending on the light type you want and give it the targetname of light_electic
also remember that primary lights need to be connected to an info_null
that will make the light turn on when the power switch is used.

where do i place this in light.csc

Code Snippet
Plaintext
power_lights = GetStructArray( "light_electric", "targetname" );

and where can i find lights.csc
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
 ::)

Marked his reply as best answer when i already answered it. Seems legit.

Adding a light in _lights.csc would only affect the specific client, not the server. You need to use _lights.gsc like i said.

Last Edit: May 18, 2014, 01:57:20 am by daedra descent
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 7 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
pashan you dont need to place that anywhere xD just do the radiant instruction i gave. its code already written by activision so you dont need to edit anything just do the radient set-up

Post Merge: May 18, 2014, 01:59:36 am
::)

Marked his reply as best answer when i already answered it. Seems legit.

Adding a light in _lights.csc would only affect the specific client, not the server. You need to use _lights.gsc like i said.
dd you're drunk lol if you would mind looking at lights.csc you would notice that the code afftect each client at the same time. is the same a csc fx
Last Edit: May 18, 2014, 01:59:36 am by jjbradman
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
::)

Marked his reply as best answer when i already answered it. Seems legit.

Adding a light in _lights.csc would only affect the specific client, not the server. You need to use _lights.gsc like i said.

im sorry but jj's answer was more helpfull as im a noob :poker:

Post Merge: May 18, 2014, 02:07:56 am
Code Snippet
Plaintext
power_lights = GetStructArray( "light_electric", "targetname" );
thats inside lights.csc
just select the light and tick primary scriptable and primary omni or spot depending on the light type you want and give it the targetname of light_electic
also remember that primary lights need to be connected to an info_null
that will make the light turn on when the power switch is used.

how would i connect a info_null to the light
Last Edit: May 18, 2014, 02:07:56 am by pashan
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 7 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
1st select light, then the info null, press "w". nailed it xP

 
Loading ...