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
#9
RE: What is wrong with this script!

(05-07-2011, 02:08 AM)Apjjm Wrote:
(05-07-2011, 02:00 AM)flamez3 Wrote: THANK YOU, One problem, How do i make it so after you go past a point in the game, it looks where i made the scriptarea_3, because now it's just looking at it the start of the game.

You would have to create a new script area, which like your monster one, is triggered when the player collides with it, though triggers a different callback function. This can then make the player look at a different area. If you called this new script area "CollisionLookAt_1" (as I strongly suggest giving your objects names that summise their function a little), then you could try changing your code as follows:

//Add to the onStart() routine
AddEntityCollideCallback("Player" , "CollisionLookAt_1" , "LookatArea_1" , true , 1);

//Place outside of any existing functions:
void LookatArea_1(string &in asParent , string &in asChild , int alState)
{
   StartPlayerLookAt("ScriptArea_3", 9.0, 9.0, "");
   AddTimer("", 5.5f, "TimerDoneLookAt");
}
If you understand what is going on here, you should be able to apply this approach to any number of areas, and make the callback function do other things if you need it to.

Thanks for this help you gave me, it did the job(it still looks at it in the start but it does look at it when i walk over the script. If there was a reputation button, i would spam it on you lol. thanks
05-07-2011, 02:21 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)