Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help New Question: How to create a door
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#58
RE: 3 Questions: Cave In and Destroying bookshelf

(06-30-2012, 12:36 PM)FastHunteR Wrote: I don't see any problem with that script. Dobule check if the script area is named "pot_area" and if the thing you want to look at is named "table_nice_round_1".
I did, it couldn't be the problem though, since that StartLookingAt is the only thing that doesn't work and the SetEntityActive does works. I'll try to rename the table and see if it works.

EDIT:
It doesn't. Maybe the problem is in some other place?
Here's the full script:

Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "pot_area", "PotBreaks", true, 1);
AddEntityCollideCallback("Player", "wind_area", "Wind", true, 1);
AddEntityCollideCallback("Player", "SeeTorsoSound", "React", true, 1);
}
void PotBreaks(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("pot_plant_small01_4", false);
SetEntityActive("pot_plant_small01_3", true);
SetEntityActive("wind_area", true);
GiveSanityDamage(5, false);
StartPlayerLookAt("table", 10, 100, "");
}
void Wind(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_torso_1", true);
SetEntityActive("corpse_male_arm_1", true);
SetEntityActive("blood_spatter01_2", true);
SetEntityActive("SeeTorsoSound", true);
SetEntityActive("Insanity", true);
SetLampLit("candlestick_tri_1", false, true);
SetLampLit("chandelier_nice_1", false, true);
SetLampLit("candlestick_floor_2", false, true);
SetLampLit("candlestick_floor_1", false, true);
SetLampLit("candle_floor_1", false, true);
SetLampLit("candle_floor_small_1", false, true);
SetLampLit("candlestick01_2", false, true);
SetLampLit("candlestick01_1", false, true);
FadeLightTo("PointLight_1", 0, 0, 0, 0, 0, 1);
CreateParticleSystemAtEntity("ParticleSystem_2", "ps_break_cavein_local.ps", "level_celler_1", false);
PlaySoundAtEntity("", "general_wind_whirl.snt", "level_celler_1", 0, false);
}
void React(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
StartScreenShake(0.003f,0.25f, 1,1);
GiveSanityDamage(50, true);
FadePlayerFOVMulTo(RandFloat(0.7f,1.3f), RandFloat(0.05f,0.1f));
}

Everything is working except for the StartLookingAt.

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
(This post was last modified: 06-30-2012, 12:46 PM by Nervly.)
06-30-2012, 12:44 PM
Find


Messages In This Thread
New Question: How to create a door - by Nervly - 06-20-2012, 12:55 PM
RE: 3 Questions: Cave In and Destroying bookshelf - by Nervly - 06-30-2012, 12:44 PM



Users browsing this thread: 1 Guest(s)