Thread: Item Spawn
View Single Post
  #1  
Old 09-05-2011, 05:21 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Item Spawn

I am trying to make an item spawner. I am making it create an NPC at my mouses x and y, and when it is touched, it adds the weapon to the player and destroys itself. However, I can't get it to work. When I fire the weapon, it puts the NPC with the image bcalarmclock.png, and it changes the chat to the players chat. That is all done on created. In the class, this is what I have...
PHP Code:
//Works
function onCreated() {
  
setimg("block.png");
  
this.chat text;
}
//Doesn't work
function onPlayerTouchsMe() {
  
addweapon(this.chat);
  
player.chat "Green";
  
destroy();

Any suggestions?
I think it is something to do with the PlayerTouchsMe
__________________
Reply With Quote