Thread: ;[
View Single Post
  #2  
Old 09-23-2001, 09:37 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: ;[

Quote:
Originally posted by Merlin
what is wrong with this i replaced the actions with actions here;
but i don't know why it's not triggering,

// NPC made by Merlin
if (playerenters) {
timeout = .5;
}
if (timeout) {
getxy();
dance();
timeout = .5;
}

function getxy() {
client.x = playerx;
client.y = playery;
timeout = .5;
}
function dance() {
if (client.x > 20) {
if (client.x < 32) {
if (client.y > 7) {
if (client.y < 17) {
actions here;
}
}
}
}
}
I am not totally sure what you want in the action here or whatever... But I fixed up the coding so it is a little more readable and understandable
NPC Code:

// NPC made by Merlin
if (playerenters)
timeout = .5;
if (timeout) {
dance();
timeout = .5;
}
function dance() {
if (playerx>20&&playerx<32&&playery>7&&playeryy<17){
actions here;
}
}

__________________
Thanks,
-KJL
Reply With Quote