The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Corridor scare and saw planks to open door
Peldan Offline
Junior Member

Posts: 16
Threads: 3
Joined: Mar 2012
Reputation: 0
#1
Corridor scare and saw planks to open door

Hello guys!

I am currently working on my first custom story, and I have tried to add a function where you find a bone saw, use it on a couple of planks barricading a door to make them fall off and play a sound. I tried for like an hour. Didn't work. I have deleted the code, but I believe it was something like:

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""bone_saw_1""planks_1""SawPlanks"true);
}

void SawPlanks(string &in asParentstring &in asChild)
{
SetEntityActive("planks_1"false);
PlaySoundAtEntity("","bla_bla_scare_sound","planks_1"0false);
SetSwingDoorLocked("mansion_1"falsetrue);    
RemoveItem("bone_saw_1");


Didn't use indentation in this example.
** I just wrote this code, there might by syntax errors. Also, the itemnames and soundnames aren't correct. I think it looked something like that. **

Also, I tried to make a corridor scare where you saw a statue (deformed man) standing in front of a window, and then the screen turns black, and he comes closer for every time. Couldn't figure it out. Tried for like 2 hours.

I used timers to set the first entity of the statue inactive, and at the same time the second entity active, for all 5 statues. When I came to the corridor, all of them were active, though. And the screen never really turned black, it just faded very dark, even if I set the FadeOut to like 5 seconds, and even 7. Any help, or advice?

Thanks in advance.
(This post was last modified: 03-08-2012, 03:55 PM by Peldan.)
03-07-2012, 07:17 PM
Find


Messages In This Thread
Corridor scare and saw planks to open door - by Peldan - 03-07-2012, 07:17 PM



Users browsing this thread: 2 Guest(s)