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;
}
}