Frictional Games Forum (read-only)

Full Version: Game crashes when entering a script area?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need help!
My game crashes every time i enter a specific script area in the map
it's just a black box popping up everytime help!
Can you paste your .hps code file involving the script?
(11-25-2013, 08:10 PM)DamnNoHtml Wrote: [ -> ]Can you paste your .hps code file involving the script?

AddEntityCollideCallback("Player", "SoundArea", "EventSounds", true, 1);

void EventSounds(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "05_event_door_bang.snt", "Scream", 0, false);
AddTimer("fagit", 1, "fagit");
}
is that what you wanted?
Yep! That's the .hps Smile

Your issue is you haven't declared the CollideCallback correctly. Assuming you want it there from the beginning, you need to place it in an OnStart() routine.

This should fix that!
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player""SoundArea""EventSounds"true1);
}

void EventSounds(string &in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("""05_event_door_bang.snt""Scream"0false);
AddTimer("fagit"1"fagit");