Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-08-2004, 01:39 AM
billybob256 billybob256 is offline
Rainbow Fox
Join Date: Apr 2004
Location: b is for ENgland
Posts: 23
billybob256 is on a distinguished road
Send a message via ICQ to billybob256 Send a message via AIM to billybob256 Send a message via MSN to billybob256
for example

NPC Code:

if (created||timeout){
if (x in |x-1,x+1| && y in |y-1,y+|){ //Checks to see if mouse in position
message Rar!; //Commands Here
}
timeout=0.05
}

Reply With Quote
  #2  
Old 05-08-2004, 01:57 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by billybob256
for example

NPC Code:

if (created||timeout){
if (x in |x-1,x+1| && y in |y-1,y+|){ //Checks to see if mouse in position
message Rar!; //Commands Here
}
timeout=0.05
}

If you are going to use the code tag, at least use it properly - that is, format the code which you put within the tags.

That said, you are not using the proper variables - you want to check if mousex and mousey are within those ranges, not if the NPC's x and y are. You also lack an operand within your second range...
Reply With Quote
Reply

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 12:02 PM.


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