Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help with a Look at Area callback =/
Author Message
Simpanra Offline
Senior Member

Posts: 314
Joined: Mar 2011
Reputation: 0
Post: #1
Question Need Help with a Look at Area callback =/
Ok guys =) I had this awesome idea that i really want to include in my next video tutorial =D I can't give away the exact idea but i will explain what i need, i need to know how to make amnesia call a function when the character looks at an AREA not an entity or object, this area will cover a huge amount of the room to ensure it works but i dont know the callback i need or how to make it work, i want it to work the same way an AddEntityCollideCallback works but with you looking at an area not standing on an area =)


Thanks guys! =D

Edd,
05-03-2011 10:52 AM
Find all posts by this user Quote this message in a reply
Roenlond Offline
Senior Member

Posts: 331
Joined: Apr 2011
Reputation: 0
Post: #2
RE: Need Help with a Look at Area callback =/
A script area can be used as an entity, so

void SetEntityPlayerLookAtCallback("ScriptArea_1", "FunctionName", true);
{
}

will work Smile On the function you want to call, be sure to use the bold part:

void FunctionName(string &in entity, int alState)
{
DoStuff();
}
(This post was last modified: 05-03-2011 11:02 AM by Roenlond.)
05-03-2011 11:00 AM
Find all posts by this user Quote this message in a reply
Simpanra Offline
Senior Member

Posts: 314
Joined: Mar 2011
Reputation: 0
Post: #3
RE: Need Help with a Look at Area callback =/
(05-03-2011 11:00 AM)Roenlond Wrote:  A script area can be used as an entity, so

void SetEntityPlayerLookAtCallback("ScriptArea_1", "FunctionName", true);
{
}

will work Smile On the function you want to call, be sure to use the bold part:

void FunctionName(string &in entity, int alState)
{
DoStuff();
}

OMG YOU ROCK!!!! thanks dude! =DDDDDDD

*Uber not gay hugs*!!!! I shall make sure to give you credit in my video =DDDDD
05-03-2011 11:19 AM
Find all posts by this user Quote this message in a reply
Roenlond Offline
Senior Member

Posts: 331
Joined: Apr 2011
Reputation: 0
Post: #4
RE: Need Help with a Look at Area callback =/
You're welcome Smile Can't wait for the secret tutorial Wink
05-03-2011 11:21 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)