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
Script Help SetPlayerLookAt Questions
BadCoverMan Offline
Junior Member

Posts: 27
Threads: 7
Joined: Feb 2012
Reputation: 0
#1
SetPlayerLookAt Questions

Hello there. What I am hoping to achieve is that I have the player enter a room with a living entity in it. He then pulls a lever, which plays the "guardian activate" sound, and activates a Script Area in the doorway. As soon as he tries to leave and collides with it, he is forced to look back at the entity. The entity then warns him about something.

This is what I have so far, it's pretty much everything except the functions to be executed when leaving through the door.

Edit: Also, the sound file to played will be "warning_1.snt"

Spoiler below!

void ShelfSwing(string &in asEntity, int alState)
{
if (alState == -1)
{
SetMoveObjectState("shelf_1",1.0f);
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
StartScreenShake(.4, 4, 1, 1);
SetEntityActive("Warning_1", true);
return;
}


void OnStart()
{
SetEntityConnectionStateChangeCallback("lever_1", "ShelfSwing");
AddEntityCollideCallback("Player", "Warning_1", "EntityTalk", true, 1);
}

void EntityTalk(string &in asParent, string &in asChild, int alState)
{
//Function needed for Player to look at entity and have entity speak to him. Then possibly fade to dust? Something like that.
}


I appreciate the help, thank you.
(This post was last modified: 02-25-2012, 08:05 PM by BadCoverMan.)
02-25-2012, 08:00 PM
Find


Messages In This Thread
SetPlayerLookAt Questions - by BadCoverMan - 02-25-2012, 08:00 PM
RE: SetPlayerLookAt Questions - by BadCoverMan - 02-25-2012, 09:14 PM
RE: SetPlayerLookAt Questions - by BadCoverMan - 02-25-2012, 09:36 PM
RE: SetPlayerLookAt Questions - by BadCoverMan - 02-26-2012, 01:15 AM



Users browsing this thread: 1 Guest(s)