Frictional Games Forum (read-only)
Need help again T_T - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Need help again T_T (/thread-12843.html)



Need help again T_T - Quotentote - 01-24-2012

hey guys^^

PHP Code:
onstart stuff:
SetEntityConnectionStateChangeCallback("lever_open_01""openbigdoor");

void openbigdoor(string &in asEntityint alState)
     {
         if (
alState == 1)
         {
            
SetMoveObjectState("door_valve_open",0.8f);
            
SetPlayerActive(false);
            
StartPlayerLookAt("door_valve_open"2.0f2.5f"");
            
AddTimer(""9"doortimer");
            
AddTimer(""7"messagetimer");            
        }
    }

void messagetimer(string &in asTimer)
    {
        
SetMessage("Screen""SlideDoor"5.0f);
    }
    
void doortimer(string &in asTimer)
    {
        
StopPlayerLookAt();
        
SetPlayerActive(true);
    } 

well everything works fine but i want to force the player to look there only the first time using the lever (same with the message) is there a possibility to make this? or do i have to delete the stuff :/



RE: Need help again T_T - Elven - 01-24-2012

use: SetMultiSliderCallback instead Smile

Find about it from wiki!



RE: Need help again T_T - Quotentote - 01-25-2012

im out of this T_T cya



RE: Need help again T_T - Elven - 01-25-2012

o.0? I am confused...


RE: Need help again T_T - Shadowfied - 01-26-2012

Just add a SetLeverStuckState function. Like this:

PHP Code:
void openbigdoor(string &in asEntityint alState)
     {
         if (
alState == 1)
         {

            
SetMoveObjectState("door_valve_open",0.8f);
            
SetPlayerActive(false);
            
StartPlayerLookAt("door_valve_open"2.0f2.5f"");
            
AddTimer(""9"doortimer");
            
AddTimer(""7"messagetimer");    
            
SetLeverStuckState("lever_open_01"1false);       
        }
    } 

I think this shall work.