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
How to activate entities by looking at an area
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#1
How to activate entities by looking at an area

hey guys,

i need your help once again. i already checked the wiki but cant find the code for it...

and if you could give me the code for signs, you collide with... thanks

When you are looking for someone, to do the scripting for your Custom Story, ask me!
11-12-2012, 06:01 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: How to activate entities by looking at an area

There is an Playerlookatcallback thingy in the options of an area try working with that Wink

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
11-12-2012, 06:37 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#3
RE: How to activate entities by looking at an area

(11-12-2012, 06:37 PM)Steve Wrote: There is an Playerlookatcallback thingy in the options of an area try working with that Wink
yes i know but i dont know how to work with that Big Grin im a noob here Tongue

When you are looking for someone, to do the scripting for your Custom Story, ask me!
11-12-2012, 06:48 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: How to activate entities by looking at an area

It works like this:
When the cursor is inside the area, the function is calling.

Ex. if the function is "LookAtAreaFunc"

then it is:

void LookAtAreaFunc(string &in asEntity, int alState)
{
if(alState == 1) //Only if the player is look at the area
{
//Do stuff
}
}

Trying is the first step to success.
11-12-2012, 07:48 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: How to activate entities by looking at an area

(11-12-2012, 06:48 PM)tonitoni1998 Wrote:
(11-12-2012, 06:37 PM)Steve Wrote: There is an Playerlookatcallback thingy in the options of an area try working with that Wink
yes i know but i dont know how to work with that Big Grin im a noob here Tongue
SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);


Name: Name of the entity
Callback: Function

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-12-2012, 07:55 PM
Find




Users browsing this thread: 1 Guest(s)