question 1
Let's say I have a NPC on a looping TimeOut(). What is the code to check to see if a player is near by? I think it would go SOMETHING like this.
PHP Code:
funtion onTimeOut()
{
if (player.x <= this.x +10)
{
if (this.x < player.x -10)
{
//what ever i want it to do//
setTimer(1);
That's not right but i suck at math
Question 2
I am a little confused on the placeNpc function.
How do I place a NPC that joins a certain class?