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

Posts: 1,549
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


Messages In This Thread
I cant get my script to work :( - by DnALANGE - 01-30-2012, 04:20 PM
RE: I cant get my script to work :( - by Shives - 02-03-2012, 07:32 PM
RE: I cant get my script to work :( - by BTOWN360 - 03-20-2012, 06:37 AM



Users browsing this thread: 1 Guest(s)