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
Add End Credits Timer
Gladoshatesyou Offline
Junior Member

Posts: 20
Threads: 5
Joined: Apr 2014
Reputation: 0
#1
Add End Credits Timer

Yo! I got a script to work where after I pick up a note entities appear and I turn around, easy. After that I set up a script for the End Credits which works, but its when I click on the note. How would I use a timer to make it like after I read the note and turn then it starts? Here is my script:

void OnStart()
{
AddUseItemCallback("", "acid_container", "padlock_acid_1", "unlock_prison_section_1", true);
SetEntityPlayerInteractCallback("notesuicide", "PickNote", true);
}
void unlock_prison_section_1(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_acid_1", 0.0f);
RemoveItem("acid_container");
SetEntityActive("padlock_acid_1", false);
}
void PickNote(string &in item)
{
SetEntityActive("Enemy1", true);
SetEntityActive("Enemy2", true);
SetEntityActive("Enemy3", true);
SetEntityActive("Enemy4", true);
SetEntityActive("Enemy5", true);
SetEntityActive("Enemy6", true);
SetEntityActive("Enemy7", true);
SetEntityActive("Enemy8", true);
SetEntityActive("Enemy9", true);
StartPlayerLookAt("Enemy5", 2.0f, 2.0f, "StopPlayerLookAt");
StartCredits("ending_alexander.ogg", false, "Ending", "MainCredits", 9000);
}
04-27-2014, 04:55 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Add End Credits Timer

Spoiler below!

PHP Code: (Select All)
void OnStart() 
{
AddUseItemCallback("""acid_container""padlock_acid_1""unlock_prison_section_1"true);
SetEntityPlayerInteractCallback("notesuicide""PickNote"true);
}
void unlock_prison_section_1(string &in asItemstring &in asEntity)
{
SetPropHealth("padlock_acid_1"0.0f);
RemoveItem("acid_container");
SetEntityActive("padlock_acid_1"false);
}
void PickNote(string &in item)
{
SetEntityActive("Enemy1"true);
SetEntityActive("Enemy2"true);
SetEntityActive("Enemy3"true);   
SetEntityActive("Enemy4"true);
SetEntityActive("Enemy5"true);
SetEntityActive("Enemy6"true);   
SetEntityActive("Enemy7"true);
SetEntityActive("Enemy8"true);
SetEntityActive("Enemy9"true);  
StartPlayerLookAt("Enemy5"2.0f2.0f"StopPlayerLookAt");
AddTimer("StartCredit"5"StartCredits"); //Change 5 to how many seconds you want it to last.
}

void StartCredits(string &in asTimer)
{
StartCredits("ending_alexander.ogg"false"Ending""MainCredits"9000);
AddDebugMessage("OVER 9000!!!1!!"false);



"Veni, vidi, vici."
"I came, I saw, I conquered."
04-27-2014, 05:14 AM
Find
Gladoshatesyou Offline
Junior Member

Posts: 20
Threads: 5
Joined: Apr 2014
Reputation: 0
#3
RE: Add End Credits Timer

(04-27-2014, 05:14 AM)SomethingRidiculous Wrote:
Spoiler below!

PHP Code: (Select All)
void OnStart() 
{
AddUseItemCallback("""acid_container""padlock_acid_1""unlock_prison_section_1"true);
SetEntityPlayerInteractCallback("notesuicide""PickNote"true);
}
void unlock_prison_section_1(string &in asItemstring &in asEntity)
{
SetPropHealth("padlock_acid_1"0.0f);
RemoveItem("acid_container");
SetEntityActive("padlock_acid_1"false);
}
void PickNote(string &in item)
{
SetEntityActive("Enemy1"true);
SetEntityActive("Enemy2"true);
SetEntityActive("Enemy3"true);   
SetEntityActive("Enemy4"true);
SetEntityActive("Enemy5"true);
SetEntityActive("Enemy6"true);   
SetEntityActive("Enemy7"true);
SetEntityActive("Enemy8"true);
SetEntityActive("Enemy9"true);  
StartPlayerLookAt("Enemy5"2.0f2.0f"StopPlayerLookAt");
AddTimer("StartCredit"5"StartCredits"); //Change 5 to how many seconds you want it to last.
}

void StartCredits(string &in asTimer)
{
StartCredits("ending_alexander.ogg"false"Ending""MainCredits"9000);
AddDebugMessage("OVER 9000!!!1!!"false);


Thank you a butt munch Big Grin I appreciate it!
04-27-2014, 05:34 AM
Find




Users browsing this thread: 1 Guest(s)