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 if not looking
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#6
RE: Script if not looking

(04-27-2012, 06:32 PM)Sazureth Wrote:
(04-26-2012, 07:38 AM)Your Computer Wrote: Have you ever considered keeping track of whether or not the player is looking at the area with either a local map variable or a global script variable?
..And how would that be possible? Is there a faster way than having a timer function to check it every second?
Whenever the player looks at the area, set a local variable to 1, when the player looks away set it to -1.
Then when the timer function calls, check the value of the local variable with
if(GetLocalVarInt("varName")==1){}
else if(GetLocalVarInt("varName")==-1){}


(This post was last modified: 04-27-2012, 06:36 PM by DRedshot.)
04-27-2012, 06:35 PM
Find


Messages In This Thread
Script if not looking - by Damascus - 04-26-2012, 07:09 AM
RE: Script if not looking - by Your Computer - 04-26-2012, 07:38 AM
RE: Script if not looking - by Sazureth - 04-27-2012, 06:32 PM
RE: Script if not looking - by DRedshot - 04-27-2012, 06:35 PM
RE: Script if not looking - by Damascus - 04-26-2012, 08:13 AM
RE: Script if not looking - by DRedshot - 04-27-2012, 06:13 PM
RE: Script if not looking - by Homicide13 - 04-27-2012, 06:41 PM



Users browsing this thread: 1 Guest(s)