Frictional Games Forum (read-only)

Full Version: It just doesn't work! <-[SOLVED] 1 more thing...[SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm at the edge of my nerve system now because I am JUST ABOUT to finish my custom story and I have 4 script areas left.
3 of them is to display a message (to close the plot, of course) and the last 1 is the credits area.


I have set them up and everything is correct
(otherwise the game would display errors and the map wont open entirely) and etc.

Soooo what's the problem?

They. Simply. Refuse. To work.

Here's the HPS (its not a complete hps, of course. just the 4 areas):

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "TruthOne", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "TruthTwo", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "TruthThree", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "credits", true, 1);
}

void TruthOne(string &in asEntity, int alState)
{
SetMessage("Truth", "One", 0);
SetPlayerRunSpeedMul(0.1);
StopSound("01_amb_darkness.ogg", 3);
}

void TruthTwo(string &in asEntity, int alState)
{
SetMessage("Truth", "Two", 0);
PlayMusic("01_paper_self.ogg", true, 1.0, 0, 0, false);
}

void TruthThree(string &in asEntity, int alState)
{
SetMessage("Truth", "Three", 0);
}

void credits(string &in asEntity, int alState)
{
FadeOut(0.1);
StartCredits("ending.ogg", true, "Ending", "MainCredits", 0);
}

Any ideas on why aren't they working?

PS: the 'ending.ogg' is in my CustomStoryName>music file. I guess it will work?

Thanks in advance :]
You have the callback syntax wrong.
To clarify:

(string &in asEntity, int alState) Isn't the right syntax for AddEntityColideCallback c:
LOL okay im mentally retarded..... well whats the right one then?
Oh found it! Thank you very much! Ill go and set it up now and report if it works Big Grin
Yep. Works now! Thank you both for helping me Big Grin
1 More thing - and hopefully this will be my last question to annoy you guys:

This is the most retarded question you will get and you will probably laugh too, but how to Save? I mean, for example you enter a map and I want to save just there. So probably the Save command will go on Void OnStart?

I guess the command is " AutoSave(); "? But still when I put it, it still just says 'Exit'

If you didn't understand entirely: when I want to quit, I want it to say 'Save And Exit' instead of 'Exit'.

My map is quite long (~1-2hrs) so its kinda important for me. Thanks!
Make sure ExitMenuDirectly is false: http://wiki.frictionalgames.com/hpl2/amn...evenvguide
Ahh thank you very much! I'm so sorry for taking your time at these retarded things!