Thread: Npc Trigger
View Single Post
  #1  
Old 09-09-2011, 08:46 AM
blackbeltben blackbeltben is offline
Registered User
Join Date: Aug 2011
Posts: 83
blackbeltben is on a distinguished road
Npc Trigger

A while ago i posted a thread on How to set an "if" statement for a onPlayerTouchsMe and check the player gani to see if he is attacking.

Thread:
http://forums.graalonline.com/forums...t=blackbeltben

Thor told me i Should not do my collision like that so i changed it with the script he gave me but it doesnt seem to be working. I put it in a weapon added to the player.
I'm expecting it to trigger the action of "onWasDmg" of the baddie

PHP Code:
function onAttack()
{
  
temp.player.0.5 + (vecx(player.dir) * 2); 
  
temp.player.+ (vecy(player.dir) * 2); 
  
temp.tnpcs findareanpcs(temp.xtemp.y22); 
  for(
temp.temp.tnpcs){ 
    
temp.n.trigger("onWasDmg"player.clientr.power); 
  } 
Reply With Quote