Quote:
Originally Posted by Crow
No  But this line:
PHP Code:
if (player.x in | this.x, this.x + this.width | && player.y in | this.y, this.y + this.height|) {
Doesn't make sense if you have width/height as 32, which you did.
|
Finally fixed this :P Thanks for your help crow (+rep)
PHP Code:
/*
Timer is the amount of time it takes
to warp around the room. The higher the
timer, the longer the warp session is.
*/
function onPlayerChats() {
if (player.guild != "Events Team") {
return;
}
if (player.chat == ":warp") {
triggeraction(this.x,this.y,"start",NULL);
}
}
//#CLIENTSIDE
const TIMER = 50;
function onCreated() {
setTimer(0.05);
setshape(1,32,32);
dontblock();
this.ox = this.x;
this.oy = this.y;
}
function onTimeout() {
if (this.on == 1) {
this.timer -= 1;
this.x = random(3.5,57.5);
this.y = random(18,46);
if (player.x in | this.x - 1, this.x + 1 | && player.y in | this.y - 1, this.y + 1 |) {
player.x = 30;
player.y = 7;
}
}
if (this.timer == 0) {
this.on = 0;
// Set back to original positions.
this.x = this.ox;
this.y = this.oy;
}
setTimer(0.05);
}
function onActionstart() {
this.on = 1;
this.timer = TIMER;
}