A Tricky Carnie
Member
Posts: 72
Threads: 15
Joined: Sep 2011
Reputation:
0
Need Help with credits.
Ok, so I set my credits to its own map and have it so the player will spawn on an area and it will start the credits, anyway here is my script for it:
Spoiler below!
////////////////////////////// Run when entering map
void OnStart()
//OnEnter
{
AddEntityCollideCallback("Player", "ending_area", "StartCredits", true, 1);
}
void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)
{
StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", "1");
}
// Run when leaving map
void OnLeave()
{
}
also, the error message I'm receiving when the game crashes is this:
If you need anymore information, just tell me, and thanks for any help in advance.
10-17-2011, 09:28 PM
schmupper
Junior Member
Posts: 23
Threads: 1
Joined: Aug 2011
Reputation:
2
RE: Need Help with credits.
void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)
should be:
void StartCredits(string &in asParent, string &in asChild, int alState)
''Oh. My. God. He's DEAD. Quickly, if he hasnt started to smell, give him the kiss of life!''
Clarence - The monkey hater
10-17-2011, 09:46 PM
A Tricky Carnie
Member
Posts: 72
Threads: 15
Joined: Sep 2011
Reputation:
0
RE: Need Help with credits.
(10-17-2011, 09:46 PM) schmupper Wrote: void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)
should be:
void StartCredits(string &in asParent, string &in asChild, int alState)
That seemed to work for the first error, but I'm still getting the second error in (9,2).
10-18-2011, 08:46 PM
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
RE: Need Help with credits.
(10-18-2011, 08:46 PM) A Tricky Carnie Wrote: That seemed to work for the first error, but I'm still getting the second error in (9,2).
For the HPL2 StartCredits function, you're supposed to provide an integer for the last parameter, not a string.
10-18-2011, 09:04 PM
A Tricky Carnie
Member
Posts: 72
Threads: 15
Joined: Sep 2011
Reputation:
0
RE: Need Help with credits.
(10-18-2011, 09:04 PM) Your Computer Wrote: (10-18-2011, 08:46 PM) A Tricky Carnie Wrote: That seemed to work for the first error, but I'm still getting the second error in (9,2).
For the HPL2 StartCredits function, you're supposed to provide an integer for the last parameter, not a string.so I should change the last @&string to a @&int?
10-18-2011, 09:08 PM
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
RE: Need Help with credits.
(10-18-2011, 09:08 PM) A Tricky Carnie Wrote: so I should change the last @&string to a @&int?
Simply remove the quotation marks around the number 1 from:
StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", "1");
10-18-2011, 09:16 PM
A Tricky Carnie
Member
Posts: 72
Threads: 15
Joined: Sep 2011
Reputation:
0
RE: Need Help with credits.
(10-18-2011, 09:16 PM) Your Computer Wrote: (10-18-2011, 09:08 PM) A Tricky Carnie Wrote: so I should change the last @&string to a @&int?
Simply remove the quotation marks around the number 1 from:
StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", "1");
Oh, thanks, didn't realize those didnt belong there.
10-18-2011, 09:27 PM
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
RE: Need Help with credits.
Hi I'm trying this script atm. but it gives me an error message:
main(198,1) : ERR : Unexpected token '{'
void OnStart()
{
AddEntityCollideCallback("Player", "Ending_Area_1", "StartCredits", true, 1);
}
"197" void StartCredits(string &in asParent, string &in asChild, int alState);
"198" {
"199" StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", 1);
"200" }
Help plox so close to wrapping my custom story up.
10-19-2011, 06:40 PM