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
Looking at, or not looking at script
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Looking at, or not looking at script

Thats what i did in my script as shown above, now also below Tongue

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "OnPlayerCollide1", true, 1);

}


void OnPlayerCollide1(string &in asParent, string &in asChild, int alState)
{

AddBodyImpulse("iron_maiden_1_leftDoor", 0, 0, -10, "world");
AddBodyImpulse("iron_maiden_1_rightDoor", 0, 0, 10, "world");
SetEntityActive("corpse_male_1", true);
FadeRadialBlurTo(1, 0.3);
GiveSanityDamage(5.0, true);
StartPlayerLookAt("corpse_male_1", 10, 10, "");
AddTimer("", 2, "StopPlayerLookAt_2");

SetEntityPlayerLookAtCallback("corpse_male_1", "CorpseDisappear_1", false);

}

void CorpseDisappear_1(string &in asEntity, int alState)
{

if (alState == -1), but 1 is when you ARE looking at it Wink
{
SetEntityActive("corpse_male_1", false);
}

}

void StopPlayerLookAt_2(string &in asTimer)
{
StopPlayerLookAt();
FadeRadialBlurTo(0, 0.1);
}

Trying is the first step to success.
(This post was last modified: 05-06-2012, 02:24 PM by FlawlessHappiness.)
05-06-2012, 01:49 PM
Find


Messages In This Thread
RE: Looking at, or not looking at script - by FlawlessHappiness - 05-06-2012, 01:49 PM



Users browsing this thread: 1 Guest(s)