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
Script Help Moving Walls
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Moving Walls

SetEntityConnectionStateChangeCallback("YOURLEVER", "StartMovingtheSecretDoor");//This is for a Lever
SetEntityPlayerInteractCallback("YOURBUTTON", "StartMovingtheSecretDoor", true);// This is for a Button
Spoiler below!

Quote:---
Quote:void StartMovingtheSecretDoor(string &in asEntity)//This is for a Button
{
SetMoveObjectState("YOUR_SECRETWALL_1", 1.0f);
SetMoveObjectState("YOUR_SECRETWALL_2", 1.0f);
SetEntityInteractionDisabled( "YOURBUTTON", true ); //This will set your Button so, that you can NOT interact with it anymore.
GiveSanityBoostSmall();
PlayGuiSound("quest_completed", 0.6f);//Adds a complete sound
}

void StartMovingtheSecretDoor(string &in asEntity, int alState) //This is for a Lever
{
if (alState == 1)
{
SetMoveObjectState("YOUR_SECRETWALL_1", 1.0f);
SetMoveObjectState("YOUR_SECRETWALL_2", 1.0f);
SetLeverStuckState("YOURLEVER", 1, true); //This will set your lever stuck
GiveSanityBoostSmall();
PlayGuiSound("quest_completed", 0.6f);//Adds a complete sound
}
}

-------
Then make a scriptarea called ClosePassage

AddEntityCollideCallback("Player", "ClosePassage", "Nowclosesecretpassage", true, 1);

Spoiler below!
Quote:void Nowclosesecretpassage(string &in asParent, string &in asChild, int alState)
{
SetMoveObjectState("YOUR_SECRETWALL_1", 0);
SetMoveObjectState("YOUR_SECRETWALL_2", 0);
}


This is for a both Lever and Button.
Some times you need to put a .ogg behind the musicfile. Just a reminder.
Hope this helps.
(This post was last modified: 03-01-2014, 02:56 PM by DnALANGE.)
03-01-2014, 02:20 PM
Find


Messages In This Thread
Moving Walls - by MsHannerBananer - 03-01-2014, 06:24 AM
RE: Moving Walls - by Statyk - 03-01-2014, 08:43 AM
RE: Moving Walls - by MsHannerBananer - 03-01-2014, 10:01 AM
RE: Moving Walls - by DnALANGE - 03-01-2014, 02:20 PM
RE: Moving Walls - by Mudbill - 03-01-2014, 07:20 PM
RE: Moving Walls - by DnALANGE - 03-01-2014, 07:28 PM
RE: Moving Walls - by Mudbill - 03-01-2014, 08:20 PM
RE: Moving Walls - by MsHannerBananer - 03-02-2014, 12:11 AM
RE: Moving Walls - by Mudbill - 03-02-2014, 12:41 AM
RE: Moving Walls - by DnALANGE - 03-02-2014, 03:01 AM



Users browsing this thread: 1 Guest(s)