Thread: Help
View Single Post
  #12  
Old 02-08-2007, 08:41 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Quote:
Originally Posted by Gambet View Post
If you can't explain it, then it's the same as not understanding.


Ok, consider:

a:
PHP Code:
function onPlayerEnters()
{
  
onCreated();

b:
PHP Code:
function onCreated()
{
  
onPlayerEnters();


Now, if a player enters the level with

a: onPlayerEnters() gets called and onCreated() gets called then the rest of the script gets executed

b: onPlayerEnters() gets called and the rest of the script executes.

Since onPlayerEnters will get called more than onCreated() b is the most efficient.

I don't think i can explain it any clearer than that.
__________________

Coming soon (Hopefully:P)
Reply With Quote