Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP - SCRIPTING D:
Author Message
stinset2 Offline
Junior Member

Posts: 14
Joined: Dec 2011
Reputation: 0
Post: #1
HELP - SCRIPTING D:
I need some help with this. When I try to start the game I get "Unexpected end of file" error. this is the whole script:
////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("BreakDoor", "BreakTheDoor", true);
AddEntityCollideCallback("Player", "sawscare", saw", true, 1);
}
void BreakTheDoor(string &in asEntity)
{
SetPropHealth("BreakDoor", 0);
GiveSanityDamage(10, true);
}
void saw(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("man", true);
PlaySoundAtEntity("man", "24_burn3.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
AddTimer("", 0.8f, "Timer_1");
StartPlayerLookAt("man", 10, 50, "");
AddTimer("", 2, "TimerStopPlayerLook2");
}

void TimerStopPlayerLook2(string &in asTimer)
{
StopPlayerLookAt();
}
void Timer_1(string &in asTimer)
{
SetEntityActive("man", false);
GiveSanityDamage(5.0f, true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Please help D:
(This post was last modified: 02-20-2012 03:14 PM by stinset2.)
02-20-2012 03:13 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #2
RE: HELP - SCRIPTING D:
AddEntityCollideCallback in OnStart has an incomplete string.

Tutorials: From Noob to Pro
02-20-2012 03:31 PM
Visit this user's website Find all posts by this user Quote this message in a reply
GoranGaming Offline
Member

Posts: 174
Joined: Feb 2012
Reputation: 6
Post: #3
RE: HELP - SCRIPTING D:
The problem is:

AddEntityCollideCallback("Player", "sawscare", saw", true, 1);

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
02-20-2012 04:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
stinset2 Offline
Junior Member

Posts: 14
Joined: Dec 2011
Reputation: 0
Post: #4
RE: HELP - SCRIPTING D:
Thanks guys, it works Big Grin
02-20-2012 04:20 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)