Quote:
Originally Posted by Pelikano
Why "this.ower"?
|
You can name it whatever you want, I chose owner to represent it's the person who spawned it.
Quote:
Originally Posted by Pelikano
"temp.proj.owner = player;"
|
As I said, you can't access "player" in a serversided onCreated(), since it's not an event related to a player but rather when the script is executed the first time.
Quote:
Originally Posted by Pelikano
Why "NULL"?!
|
NULL and "" is the same thing, more or less. In this case it doesn't matter which you use.
Quote:
Originally Posted by Pelikano
Wtf?! temp.proj.join("bullet");
|
Yes, let me explain:
temp.npc = putnpc(x, y, ""); - This spawns an NPC on the coordinates x and y. By doing it like this you can change the values of the spawned NPC by accessing "temp.npc".
npc.owner = player - This sets the this.owner in the projectile to the player object, so you can access data from the player who spawned the projectile.
npc.join("bullet"); - This joins the newly spawned NPC to your projectile class.
Just try the code I gave you man, it'll work.