View Single Post
  #9  
Old 08-26-2009, 03:15 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Quote:
Originally Posted by Mark Sir Link View Post
I haven't done a whole lot of work lately so I can't say this for sure but onCreated() may not always be called when a player enters if they have entered previously (instances of a class maybe?)
Maybe because was a bad example, this is the script somebody said will work.

PHP Code:
function onTimeout() {
 if (
playerenters) {
  
setTimer(0.5);
   
setani("sit",NULL);
 }

Quote:
Originally Posted by fowlplay4 View Post
Well I believe that would be useless to put in there, because I assume you want to be called when you do both onCreated and onPlayerEnters.

If you need it to update/do script every time you enter a level you can get away with only using onPlayerEnters(), if it's only a one time thing use onCreated().
My example was bad, you would call both as a different function. It would work exactly the same if you used function onPlayerEnters() instead of calling it under onCreated().
Reply With Quote