The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Need help with multiple direction forcing.
Asphex Offline
Junior Member

Posts: 26
Threads: 2
Joined: Feb 2012
Reputation: 2
#1
Need help with multiple direction forcing.

Hey everybody! I want the player to look into a certain direction, then shortly after look in the other direction. I also need to display text on both of the actions when the player looks, but something as always fails on me. I seem to have a problem in my script, but I tried so many different variations, that I don't even know where I am now. Could you please enlighten me and help my way out of this mess? Working on my first custom story and still new to this. :p

Here's my script:

Spoiler below!
void OnEnter()
{

}

void Credits(string &in asParent, string &in asChild ,int alState)
{

}
//////////////////////////
///Starts here
void OnStart()
{
AddEntityCollideCallback("Player", "ScareLookArea", "LookAtDoor", true, 1);
AddEntityCollideCallback("Player", "ScareDoorArea", "CollideScareDoor", true, 1);
AddEntityCollideCallback("Player", "ScareLookWallArea", "LookAtWall", true, 1);

}

void LookAtDoor(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("mansion_1", 5, 50, "");
AddTimer("", 2, "TimerStopPlayerLook");
}

void LookAtWall(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("wall_default_short_13", 10, 50, "");
AddTimer("", 4, "TimerStopLook2");
}

void TimerStopPlayerLook(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(true);
StopPlayerLookAt();
SetMessage("LookAtDoor", "LookDoor", 2);
AddTimer("", 2, "LookAtWall");
}

void TimerStopLook2(string &in asTimer)
{
StopPlayerLookAt();
SetMessage("LookAtWall", "LookWall", 4);
}

void CollideScareDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("mansion_1", true, true);
}

void OnLeave()
{

}


Thank you in advance! (:

My stories: The Haunted Stairwell v1.0
02-18-2012, 03:43 PM
Find


Messages In This Thread
Need help with multiple direction forcing. - by Asphex - 02-18-2012, 03:43 PM



Users browsing this thread: 3 Guest(s)