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
What is wrong with this script! *Different script problem*
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: What is wrong with this script!

(05-07-2011, 01:33 AM)Apjjm Wrote:
(05-07-2011, 01:27 AM)flamez3 Wrote: i have no idea what i did wrong, can you or anyone help me with this script?
try the following:
void OnStart()
{
  AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}

void OnEnter()
{
  StartPlayerLookAt("ScriptArea_3", 9.0, 9.0, onlook);
  AddTimer("", 5.5f, "TimerDoneLookAt");
}

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
  SetEntityActive("servant_grunt_2" , true);
}

void TimerDoneLookAt(string &in asTimer)
{
  StopPlayerLookAt();
}

I am assuming here you want the timer to start when you call the StartPlayerLookAt function. Remember that everything you want to happen in a function must be wrapped in the {}'s, and anything you want to happen at the start of the map called in either onStart() or onEnter():
//Example:
void SomeFunction()
{
   function1("function 1");
   function2(0.1f);
   int x = 10;
   function3(x);
  }

I think that disabled the other problems, now it just says
main (8,47) Onlook is not decalared


any ideas?
(This post was last modified: 05-07-2011, 01:44 AM by flamez3.)
05-07-2011, 01:41 AM
Find


Messages In This Thread
RE: What is wrong with this script! - by Apjjm - 05-07-2011, 01:22 AM
RE: What is wrong with this script! - by flamez3 - 05-07-2011, 01:27 AM
RE: What is wrong with this script! - by Apjjm - 05-07-2011, 01:33 AM
RE: What is wrong with this script! - by flamez3 - 05-07-2011, 01:41 AM
RE: What is wrong with this script! - by Apjjm - 05-07-2011, 01:53 AM
RE: What is wrong with this script! - by flamez3 - 05-07-2011, 02:00 AM
RE: What is wrong with this script! - by Apjjm - 05-07-2011, 02:08 AM
RE: What is wrong with this script! - by flamez3 - 05-07-2011, 02:21 AM
RE: What is wrong with this script! - by Apjjm - 05-07-2011, 02:29 AM
RE: What is wrong with this script! - by flamez3 - 05-07-2011, 02:31 AM
RE: What is wrong with this script! - by Apjjm - 05-07-2011, 02:38 AM



Users browsing this thread: 1 Guest(s)