Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-04-2014, 02:08 PM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
NPC checking for player

As you all know, the onPlayerTouchsMe() only works if the player runs into the NPC.

How would I script the NPC to check if the player is in the x, y of the object.
In this case, block.png

PHP Code:
function onCreated(){
 
setImg("block.png");
 
setTimer(1);
}

function 
onTimeOut(){
 
destroy();
}

function 
onPlayerTouchsMe(){
 
player.chat "HIT";

Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.