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
script fail
klacke Offline
Junior Member

Posts: 7
Threads: 4
Joined: May 2011
Reputation: 0
#1
script fail

Hello, i got a help with a script, but when i tries to load my custom it just ends up with an error,

Here is the script

void MakePrisonerDisapear_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "leather_walk.snt", "prisoner", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
StartPlayerLookAt("LookAtPrisoner", 5.0f, 5.0f, "");
Addtimer("", 1.0f, "MakePrisonerDisappear_2");
}
void MakePrisonerDisappear_2(string &in asTimer);
{
GiveSanityDamage(5, true);
SetEntityActive("prisoner", false);
SetPlayerActive(true);

Do you see anything wrong with it?
Plz reply with a fix it would be awesome! Big Grin
06-05-2011, 12:58 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: script fail

(06-05-2011, 12:58 PM)klacke Wrote: void MakePrisonerDisappear_2(string &in asTimer);
You shouldn't have a semi-colon at the end of that line.
06-05-2011, 01:16 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: script fail

Is this your complete script? If not, here is the modified version:

void MakePrisonerDisapear_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "leather_walk.snt", "prisoner", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
StartPlayerLookAt("LookAtPrisoner", 5.0f, 5.0f, "");
AddTimer("", 1.0f, "MakePrisonerDisappear_2");
}
void MakePrisonerDisappear_2(string &in asTimer)
{
GiveSanityDamage(5, true);
SetEntityActive("prisoner", false);
SetPlayerActive(true);
}

06-05-2011, 01:16 PM
Find
klacke Offline
Junior Member

Posts: 7
Threads: 4
Joined: May 2011
Reputation: 0
#4
RE: script fail

(06-05-2011, 01:16 PM)Kyle Wrote: Is this your complete script? If not, here is the modified version:

void MakePrisonerDisapear_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "leather_walk.snt", "prisoner", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
StartPlayerLookAt("LookAtPrisoner", 5.0f, 5.0f, "");
AddTimer("", 1.0f, "MakePrisonerDisappear_2");
}
void MakePrisonerDisappear_2(string &in asTimer)
{
GiveSanityDamage(5, true);
SetEntityActive("prisoner", false);
SetPlayerActive(true);
}

Saw now that i forgot 1 line

AddEntityCollideCallback("Player", "DisapearGuy1", "MakePrisonerDisappear_1", true, 1);

cuz when i copied yours i still got that error message...
06-05-2011, 02:24 PM
Find
ferryadams10 Offline
Senior Member

Posts: 288
Threads: 40
Joined: Apr 2011
Reputation: 19
#5
RE: script fail

Dude, I had fixed that allready before u posted this thread Big Grin

Got a nice sofa
Please come and have a seat for a while

06-08-2011, 01:21 PM
Find




Users browsing this thread: 2 Guest(s)