Thread: Finding Params
View Single Post
  #4  
Old 05-28-2014, 05:08 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 354
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
Quote:
Originally Posted by i8bit View Post
I just fixed my thread post...
The "dmged" was a typo.. I rewrite some stuff to make it easier to read on forums.. I just forgot to change that.


With that being said, I want to do the chat within the "class" script. Not in the creation of the NPC.

So I would need a
PHP Code:
this.chat params[1]; 
But it doesn't recognize params[1]... THAT'S my issue
well then theres a lot of ways you can do it, a few examples:

PHP Code:
  /*
    weapon
  */

  
temp.npc this.level.putNPC2(player.xplayer.y+1"");
  
temp.npc.join("combat_dmgdisplay");
  
temp.npc.chatParam params[1]; 
PHP Code:
  /*
    npc
  */

  
function onCreated() {
    
this.chat this.chatParam;
  } 
PHP Code:
  /*
    weapon
  */

  
temp.npc this.level.putNPC2(player.xplayer.y+1"");
  
temp.npc.join("combat_dmgdisplay");
  
temp.npc.trigger("SetChat"params[1]); 
PHP Code:
  /*
    npc
  */

  
function onSetChat(temp.chat) {
    
this.chat temp.chat;
  } 
but you wont be able to access the original params[1] outside of the onActionServerSide() event they were passed to
__________________
This signature has been deleted by Darlene159.
Reply With Quote