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
(SOLVED) StartCredits script confusion.
G510s Offline
Banned

Posts: 58
Threads: 32
Joined: Jun 2014
#8
RE: (SOLVED) StartCredits script confusion.

(01-05-2015, 10:02 AM)Julius Caesar Wrote: Try using an InteractCallback to initiate the credits rather than using OnLeave.


void OnStart()
{

AddEntityCollideCallback("Player", "Sutior_1", "AreaCollide", true, 1);

PlayMusic("18_amb", true, 5, 2.0, 4, true);

AddEntityCollideCallback("Player", "Script_1", "ActivateStatue", true, 1);

AddEntityCollideCallback("Player", "PlaySound", "Sound", true, 1);

AddUseItemCallback("", "Storage", "StorageDoor", "UseKey", true);

AddEntityCollideCallback("Player", "ActivateDoor", "DoorAppear", true, 1);

AddEntityCollideCallback("Player", "QuestArea", "AddQuest", true, 1);

}




void AddQuest(string &in asParent, string &in asChild, int alState)
{

AddQuest("QuestArea", "Add");

}




void Move(string &in asEntity, int alState)
{
if (GetLocalVarInt("check") == 0)
{
if (alState == 1)
{
SetMoveObjectState("ShelfRotate_1", 1.0f);

PlaySoundAtEntity("", "quest_completed.snt", "ShelfRotate_1", 0, false);

PlayMusic("01_puzzle_passage", false, 3, 0, 10, false);

SetLocalVarInt("check", 1);

GiveSanityBoost();

return;
}
}
}




void DemoEnd(string &in asEntity)
{

AddTimer("Credits", 3, "EndDemo");

FadeOut(5.2);

StartCredits("ending_daniel", true, "Levels", "EndDemoCreits", 3);

}




void UseKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("StorageDoor", false, true);

PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);

RemoveItem("Storage");
}




void DoorAppear(string &in asParent, string &in asChild, int alState)
{

SetEntityActive("StorageDoor", true);

}




void ActivateStatue(string &in asParent, string &in asChild, int alState)
{

SetEntityActive("CreepyStatue", true);

PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0.0, false);

}




void AreaCollide(string &in asParent, string &in asChild, int alState)
{

SetEntityActive("Sutior", true);


AddEnemyPatrolNode("Sutior", "Node_1", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_5", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_6", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_8", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_10", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_16", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_20", 0.001, "");
AddEnemyPatrolNode("Sutior", "Node_26", 0.001, "");

}








void OnEnter()
{



}





void OnLeave()
{



}


------------------------------------------------------------------------------------------------------
This is my fixed script/hps file.
01-05-2015, 10:10 AM
Find


Messages In This Thread
RE: StartCredits script confusion. - by Romulator - 01-04-2015, 01:41 AM
RE: StartCredits script confusion. - by G510s - 01-04-2015, 08:05 AM
RE: StartCredits script confusion. - by Romulator - 01-04-2015, 08:31 AM
RE: StartCredits script confusion. - by DnALANGE - 01-04-2015, 07:06 PM
RE: StartCredits script confusion. - by G510s - 01-05-2015, 06:46 AM
RE: (SOLVED) StartCredits script confusion. - by G510s - 01-05-2015, 10:10 AM



Users browsing this thread: 1 Guest(s)