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
What function returns the players position?
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#7
RE: What function returns the players position?

It's possible, but it would take forever to script it Tongue


For example you make a timer to scare the player at random times.
You have to place not too big, maybe 5x...x5 areas to overlap the whole map.
When the timer reaches zero, it has to make an addentitycollidecallback for EVERY area
In the function, you have to remove all other addentitycollidecallbacks, and make setentityplayerlookatcallbacks for all areas, that surround the area which the player stands in.
The rest is easy, for each function for the setentityplayerlookatcallbacks you have to remove the other setentityplayerlookatcallbacks, and play a sound at the opposite area which the player looks at.I try to draw this part:
x - player
0 - other areas
1 - looked at area
2 - area which plays the sound


Top view:


000000
01x200
000000


So it's possible, but takes forever to script, escpecially with huge maps. Tongue


(This post was last modified: 03-15-2013, 08:04 PM by Akos115.)
03-15-2013, 08:04 PM
Find


Messages In This Thread
RE: What function returns the players position? - by Akos115 - 03-15-2013, 08:04 PM



Users browsing this thread: 3 Guest(s)