Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turn PointLight off with switch
Ananaias Offline
Junior Member

Posts: 20
Threads: 7
Joined: Jun 2012
Reputation: 0
#5
RE: Turn PointLight off with switch

This is my coding so far:

PHP Code: (Select All)
void OnStart()
{
    
SetEntityConnectionStateChangeCallback("lever""func_shelf");
}

void func_shelf(string &in asEntityint alState)
{
    if (
alState == 1)
{
    
SetSwingDoorLocked("lockthisshit"truetrue);
    
SetLampLit("light1room2"falsetrue);
    
SetLampLit("light2room2"falsetrue);
    
SetLampLit("light3room2"falsetrue);
    
SetLampLit("light4room2"falsetrue);
    
SetLampLit("light5room2"falsetrue);
    
SetLampLit("light6room2"falsetrue);
    
SetLampLit("light7room2"falsetrue);
    
SetLampLit("light8room2"falsetrue);
    
SetLampLit("light9room2"falsetrue);
    
SetMoveObjectState("shelf"1.0f);
    
PlaySoundAtEntity("""quest_completed.snt""rotatearea"0false);
        return;
    }


I'm assuming I would replace "SetLampLit" with "SetLightVisible"?

EDIT: decided to try that, and I guess that's wrong. Got this error:

[Image: zCmE]

Sorry if this is an easy fix, I'm still very new to this stuff. Sad

EDIT2: Awesome, I figured it out.

SetLightVisible("point1room2", false); is what I was looking for. Thanks Smile
(This post was last modified: 06-08-2012, 08:38 PM by Ananaias.)
06-08-2012, 08:26 PM
Find


Messages In This Thread
Turn PointLight off with switch - by Ananaias - 06-08-2012, 08:55 AM
RE: Turn PointLight off with switch - by Dutton - 06-08-2012, 09:16 AM
RE: Turn PointLight off with switch - by Traggey - 06-08-2012, 09:37 AM
RE: Turn PointLight off with switch - by Ananaias - 06-08-2012, 08:26 PM



Users browsing this thread: 1 Guest(s)