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
Gandalf's scripting questions thread
gandalf91 Offline
Senior Member

Posts: 439
Threads: 13
Joined: Feb 2011
Reputation: 0
#11
RE: Gandalf's scripting questions thread

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.
03-06-2011, 12:26 AM
Find


Messages In This Thread
RE: Gandalf's scripting questions thread - by gandalf91 - 03-06-2011, 12:26 AM



Users browsing this thread: 1 Guest(s)