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
Help needed! I can't find error in script.
Asphex Offline
Junior Member

Posts: 26
Threads: 2
Joined: Feb 2012
Reputation: 2
#9
RE: Help needed! I can't find error in script.

I think that the timer at the end of the script is ignored, because a new "part" isn't started like so:

Spoiler below!
void OnStart()
{
if(ScriptDebugOn())
}
GiveItemFromFile("lantern", "lantern.ent");
{
PlaySoundAtEntity("RockRumble", "general_rock_rumble.snt", "Player", 0, false);
StartScreenShake(0.05f, 1, 0.4, 0.6);
AddTimer("", 1, "StopRockRumble");
SetPlayerCrouching(true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "AOESanityDmg", false, 1);
}

void StopRockRumble(string &in asTimer)
{
StopSound("RockRumble", 1);
}

void Message1(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "Popup3", 0);
}

void AOESanityDmg(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5, false);
if(GetEntitiesCollide("Player", "ScriptArea_2"))
}
{
AddTimer("", 2, "AOESanityDmg");
}

I'm new to scripting, but wanted to add my 2 cents. Maybe I'll learn something from this thread Smile

My stories: The Haunted Stairwell v1.0
02-28-2012, 01:59 PM
Find


Messages In This Thread
RE: Help needed! I can't find error in script. - by Asphex - 02-28-2012, 01:59 PM



Users browsing this thread: 2 Guest(s)