03-06-2011, 12:26 AM
So, my interact script still isn't working properly. I've read around that the type of "interaction" can depend on the item, but I'm not sure how I'd go about changing it if need be.
SetEntityPlayerInteractCallback("rock_small_1", "CorridorScream", true);
...
void CorridorScream(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "04_scream.snt", "ScriptArea_8", 0.0f, false);
StartScreenShake(0.025f, 2, 0, 1.5f);
GiveSanityDamage(5.0f, true);
}
I've tried setting the boolean to false, but that didn't help (not that I really expected it to). If I change this function to an entitycollide with player, it works. But I don't want collision with the rock to trigger this event, but when you move it around. I'm not sure if moving it around counts as "interaction" though.
SetEntityPlayerInteractCallback("rock_small_1", "CorridorScream", true);
...
void CorridorScream(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "04_scream.snt", "ScriptArea_8", 0.0f, false);
StartScreenShake(0.025f, 2, 0, 1.5f);
GiveSanityDamage(5.0f, true);
}
I've tried setting the boolean to false, but that didn't help (not that I really expected it to). If I change this function to an entitycollide with player, it works. But I don't want collision with the rock to trigger this event, but when you move it around. I'm not sure if moving it around counts as "interaction" though.