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
PlayerLookAtCallback not working
Entih Offline
Junior Member

Posts: 47
Threads: 4
Joined: Sep 2010
Reputation: 0
#6
RE: PlayerLookAtCallback not working

Nope, putting something in there will make the game fail to understand it completely. You see, to the game 'LookAtCorpses' is the same as a function like 'RemoveItem' or 'SetSwingDoorClosed'.

These functions are defined as 'void RemoveItem(string& asName)', or 'void SetSwingDoorClosed(string& asName, bool abClosed, bool abEffects)', just as your function is 'void LookAtCorpses(string &in entity, int alState)'.

What happens is these variables in the parameter list are filled in by the game itself when it comes to the time the game runs, and putting a constant like '1' in there instead of a variable name will cause it to say "wait, that's not right, I was expecting a variable name, not a value".

For example, when you actually use the function 'RemoveItem' is when you fill in a value. By typing something like 'RemoveItem("key");' you're telling it "I'm running RemoveItem. asName will become the string 'key'."

When the game runs LookAtCorpses because the view went onto the corpses, it automatically says "Alright, the player fulfilled the callback by looking at entity 'corpse'. Since the view went onto 'corpse' and the player is looking at it, alState is 1."
10-16-2010, 08:25 PM
Find


Messages In This Thread
PlayerLookAtCallback not working - by Frontcannon - 10-16-2010, 04:14 PM
RE: PlayerLookAtCallback not working - by Entih - 10-16-2010, 06:04 PM
RE: PlayerLookAtCallback not working - by Entih - 10-16-2010, 08:25 PM



Users browsing this thread: 1 Guest(s)