if (playerenters){
timereverywhere;
setimg door.png;
this.mode = 0;
}
if (playertouchsme && this.mode == 0){
this.mode = 1;
setimgpart ce_door.png,32,0,32,32;
sleep .15;
setimgpart ce_door.png,64,0,32,32;
sleep .15;
setimgpart ce_door.png,96,0,32,32;
sleep .15;
hide;
sleep 1;
show;
setimgpart ce_door.png,96,0,32,32;
sleep .15;
setimgpart ce_door.png,64,0,32,32;
sleep .15;
setimgpart ce_door.png,32,0,32,32;
sleep .15;
setimg door.png;
this.mode = 0;
}
I tried to make it shorter but it kept messing up. Too lazy to fix it so I kept it like this, enjoy.
if (playerenters){
timereverywhere;
setimg door.png;
this.mode = 0;
}
if (playertouchsme && this.mode == 0){
this.mode = 1;
setimgpart ce_door.png,32,0,32,32;
sleep .15;
setimgpart ce_door.png,64,0,32,32;
sleep .15;
setimgpart ce_door.png,96,0,32,32;
sleep .15;
hide;
sleep 1;
show;
setimgpart ce_door.png,96,0,32,32;
sleep .15;
setimgpart ce_door.png,64,0,32,32;
sleep .15;
setimgpart ce_door.png,32,0,32,32;
sleep .15;
setimg door.png;
this.mode = 0;
}
I tried to make it shorter but it kept messing up. Too lazy to fix it so I kept it like this, enjoy.
[/QUOTE]
Ima show you up!
[php]
// NPC made by tricxta
if (playerenters){
timereverywhere;
setimgpart ce_door.png,0,0,32,32;
blockagain;
}
if (playertouchsme){
for (this.i=-4;this.i<4;this.i++){
setimgpart ce_door.png,(3-abs(this.i))*32,0,32,32;
if (this.i==0){
dontblock;
sleep 2;
blockagain;
}
sleep .1;
}
}
[/php]
ez
[php]
// NPC made by tricxta
if (playerenters){
timereverywhere;
setimgpart ce_door.png,0,0,32,32;
blockagain;
}
if (playertouchsme){
for (this.i=-4;this.i<4;this.i++){
setimgpart ce_door.png,(3-abs(this.i))*32,0,32,32;
if (this.i==0){
dontblock;
sleep 2;
blockagain;
}
sleep .1;
}
}
[/php]
ez
[/QUOTE]
[php]
// NPC made by tricxta
if (playerenters){
timereverywhere;
setimgpart ce_door.png,0,0,32,32;
blockagain;
}
if (playertouchsme){
for (this.i=-4;this.i<4;this.i++){
setimgpart ce_door.png,(3-abs(this.i))*32,0,32,32;
if (this.i==0){
dontblock;
sleep 2;
blockagain;
}
sleep .1;
}
}
[/php]
ez
[/QUOTE]
yours doesnt work that well it stops at the 3rd image i tried messin witrh it but its even more messed up
[QUOTE=tricxta;85646]
Well…doors don’t exactly dissappear. I left it like that since it was a more logical way of viewing. Tell me, when you walk into a room and the doors shut do you have open it and push it so hard it’s ripped of its hinges and hence it disappears?
But yes if you must just change the for loop line to for (this.i=-4;this.i<=4;this.i++){ and you’re good.
[/QUOTE]
thanks and i just played around and i like this one; and can u lock this thread it could be very useful:)if (playerenters){
timereverywhere;
setimg ce_door2.png;
this.mode = 0;
}
if (playertouchsme && this.mode == 0){
this.mode = 15;
setimgpart ce_door.png,32,0,32,32;
sleep .05;
setimgpart ce_door.png,64,0,32,32;
sleep .05;
setimgpart ce_door.png,96,0,32,32;
sleep .05;
hide;
sleep 3;
show;
setimg ce_door2.png;
this.mode = 0;
}