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
I cant get my script to work :(
DnALANGE Offline
Banned

Posts: 1,550
Threads: 73
Joined: Jan 2012
#1
I cant get my script to work :(

Can someone please check this out for a little second...
I just want to make "daniel" to look back to an "unlocked" door.
so he opens the door and the door SLAMS back and close... { the door must stay UNLOCKED- need to get open still }
I jope some can help me PLEASE!
Here is my script so far...
////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "key_1", "monsterdoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_2", "door_1", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "key_3", "door_3", "UsedKeyOnDoor2", true);
AddEntityCollideCallback("Player" , "ScaryTrigger" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "ScaryTrigger" , "Func01" , true, 1);
AddEntityCollideCallback("Player" , "serge1" , "MonsterFunc2" , true , 1);
AddEntityCollideCallback("Player" , "serge1" , "Func02" , true, 1);
AddEntityCollideCallback("Player" , "RoomTwoArea" , "CollideRoomTwo" , true, 1);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
StartPlayerLookAt("mansion_2", "10.0f", "10.0f", "");
AddTimer("", 1,0f, "stoplook");
}
void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("key_1");
}
void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_2");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_3", false, true);
PlaySoundAtEntity("", "unlock_door", "door_3", 0, false);
RemoveItem("key_3");
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_1" , true);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("servant_brute_1", 2, 2, "");
AddTimer("", 2, "TimerFunc");
}
void TimerFunc(string &in asTimer)
{
StopPlayerLookAt();
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
}

void MonsterFunc2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_2" , true);
}

void Func02(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("servant_brute_2", 2, 2, "");
AddTimer("", 2, "TimerFunc");
}
void TimerFunc2(string &in asTimer)
{
StopPlayerLookAt();
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
}



////////////////////////////
// Run when leaving map
void OnLeave()
{

}
01-30-2012, 04:20 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: I cant get my script to work :(

Explain what isn't working.

Tutorials: From Noob to Pro
01-30-2012, 08:40 PM
Website Find Reply
DraKerZz97 Offline
Junior Member

Posts: 14
Threads: 5
Joined: Jan 2012
Reputation: 0
#3
RE: I cant get my script to work :(

What isnt working? all of it?????
02-03-2012, 07:22 PM
Find Reply
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#4
RE: I cant get my script to work :(

You better create an Area next to the door ans name it for example "look"
Then you replace mansion_2 with look
Then it should look like this

StartPlayerLookAt("look", "10.0f", "10.0f", "");

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-03-2012, 07:32 PM
Find Reply
BTOWN360 Offline
Junior Member

Posts: 8
Threads: 2
Joined: Mar 2012
Reputation: 0
#5
RE: I cant get my script to work :(

firstly you need the extra_english.lang file to get your keys to work properly...they should be unlocking doors tho just no name to them.
also i think if you get rid of the timer for mansion_2 it might work...it does for me


Allos i am the fake Stephano!!!
(This post was last modified: 03-20-2012, 06:48 AM by BTOWN360.)
03-20-2012, 06:37 AM
Find Reply
Ultimegastriker Offline
Member

Posts: 93
Threads: 5
Joined: Feb 2012
Reputation: 1
#6
RE: I cant get my script to work :(

(02-03-2012, 07:32 PM)Shives Wrote: You better create an Area next to the door ans name it for example "look"
Then you replace mansion_2 with look
Then it should look like this

StartPlayerLookAt("look", "10.0f", "10.0f", "");
thats it

On my YT Channel you can find all Storys from here.
05-05-2012, 04:14 AM
Find Reply




Users browsing this thread: 1 Guest(s)