(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