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
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: Corridor scare and saw planks to open door

string &in asItem, string &in asEntity is the syntax you're looking for.
I also advise you set the planks to inactive, and set broken planks in it's place to active. Or SetPropHealth. Whichever.

03-07-2012, 08:29 PM
Find
Peldan Offline
Junior Member

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

(03-07-2012, 08:29 PM)Obliviator27 Wrote: string &in asItem, string &in asEntity is the syntax you're looking for.
I also advise you set the planks to inactive, and set broken planks in it's place to active. Or SetPropHealth. Whichever.
Alright, will try that later! thanks brony Smile
03-07-2012, 09:30 PM
Find
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#4
RE: Corridor scare and saw planks to open door

(03-07-2012, 09:30 PM)Peldan Wrote:
(03-07-2012, 08:29 PM)Obliviator27 Wrote: string &in asItem, string &in asEntity is the syntax you're looking for.
I also advise you set the planks to inactive, and set broken planks in it's place to active. Or SetPropHealth. Whichever.
Alright, will try that later! thanks brony Smile
I seriously laughed at: Thanks brony Big Grin!




Signature to awesome to be displayed.
(This post was last modified: 03-08-2012, 11:58 AM by Stepper321.)
03-08-2012, 11:57 AM
Find




Users browsing this thread: 2 Guest(s)