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
asAtTargetCallback???
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#4
RE: asAtTargetCallback???

PHP Code: (Select All)
void OnStart()
{
GiveItemFromFile("lantern""lantern.ent");
SetEntityPlayerInteractCallback("key_laboratory_1""ActivateMonster"true);
AddUseItemCallback("OpenDoor""key_laboratory_1""level_hub_1""UnlockLevelDoor"true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void ActivateMonster(string &in item)
{
StartPlayerLookAt("mansion_door_1"2020"");   // changed this line
StopPlayerLookAt();   // changed this line also
SetEntityActive("servant_brute_1"true);
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_1"0"Idle");
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_2"0"Idle");
}

void UnlockLevelDoor(string &in itemstring &in entity)
{
SetLevelDoorLocked(entityfalse); 

The way your script is set up right now, the player will look at the door, then instantly stop looking at it (the player's eyes may not even make it to the door). I would suggest adding a timer so that the player will stop looking after a certain amount of time.

One more thing. In this line:
PHP Code: (Select All)
StartPlayerLookAt("mansion_door_1"2020""); 
You can modify the values (20, 20 in this case) to different values. The lower the number, the slower the player will look.

In Ruins [WIP]
(This post was last modified: 01-16-2013, 05:42 AM by NaxEla.)
01-16-2013, 05:39 AM
Find


Messages In This Thread
asAtTargetCallback??? - by reper1210 - 01-16-2013, 03:51 AM
RE: asAtTargetCallback??? - by str4wberrypanic - 01-16-2013, 04:00 AM
RE: asAtTargetCallback??? - by reper1210 - 01-16-2013, 04:59 AM
RE: asAtTargetCallback??? - by NaxEla - 01-16-2013, 05:39 AM
RE: asAtTargetCallback??? - by reper1210 - 01-16-2013, 06:00 AM
RE: asAtTargetCallback??? - by NaxEla - 01-16-2013, 06:16 AM



Users browsing this thread: 1 Guest(s)