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
Examine script
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#15
RE: Examine script

(08-08-2013, 11:07 AM)Tomzzz Wrote: wait , wait.. so candle (as model) must be in code? cuz im using only Area Example in script
.. im touching the area not the model i think?
name of model is candlestick_tri_1... but i dont think i need to use it in code or i should? if yes can you show me where..

Glad it's solved and this may not have helped anyway, but in your previous script you had this line
SetEntityPlayerInteractCallback("InteractCandlestick", "InteractCandlestick", true);

That first parameter, the one you have as "InteractCandlestick", is the name of the entity that the interact callback is set to, so when you interact with 'InteractCandlestick' the function in the second parameter, in this case also called 'InteractCandlestick' is called. Obviously, if there is no entity called 'InteractCandlestick' then the callback will never be activated

So, if the name of your candlestick entity in the level ed is 'candlestick_tri_1' then the line should read
SetEntityPlayerInteractCallback("candlestick_tri_1", "InteractCandlestick", true);


Personally, I would always always set callbacks in the script rather than in the level editor - if you have the callbacks set in the level editor and the functions in the script it means you have to check 2 different places if something is not working, and it makes it way harder to keep track of what callbacks have been set where etc.
But then, I'm a programmer so I would say that Tongue

(This post was last modified: 08-08-2013, 12:25 PM by Adrianis.)
08-08-2013, 12:21 PM
Find


Messages In This Thread
Examine script - by Tomzzz - 08-08-2013, 07:41 AM
RE: Examine script - by The chaser - 08-08-2013, 10:00 AM
RE: Examine script - by Tomzzz - 08-08-2013, 10:19 AM
RE: Examine script - by Adrianis - 08-08-2013, 11:03 AM
RE: Examine script - by Tomzzz - 08-08-2013, 11:07 AM
RE: Examine script - by Adrianis - 08-08-2013, 12:21 PM
RE: Examine script - by The chaser - 08-08-2013, 11:07 AM
RE: Examine script - by Kreekakon - 08-08-2013, 11:12 AM
RE: Examine script - by The chaser - 08-08-2013, 11:15 AM
RE: Examine script - by The chaser - 08-08-2013, 11:14 AM
RE: Examine script - by Tomzzz - 08-08-2013, 11:14 AM
RE: Examine script - by The chaser - 08-08-2013, 11:19 AM
RE: Examine script - by Tomzzz - 08-08-2013, 11:19 AM
RE: Examine script - by Tomzzz - 08-08-2013, 11:25 AM
RE: Examine script - by The chaser - 08-08-2013, 11:36 AM



Users browsing this thread: 2 Guest(s)