Opening door help

yes i need help making this sript like i’ve tried many ways but still nothing works when i touch the door i want it to open with the images i chose.

image1:[ATTACH=CONFIG]2609[/ATTACH]

image2:[ATTACH=CONFIG]2608[/ATTACH] i want this image to be still but when the player touches it iwant it be open like[ATTACH=CONFIG]2609[/ATTACH]

If you could help me i would most aprrechate it.

It’s honestly one of the easiest scripts you could make.

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=Kondie;85635]

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

[QUOTE=tricxta;85637]
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
[/QUOTE]

Fuck. You.

[QUOTE=tricxta;85637]
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
[/QUOTE]

yours doesnt work that well it stops at the 3rd image i tried messin witrh it but its even more messed up

change the < in the for-loop to <=

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

Ok, better doors for me.

At least make that mode paramater an attribute since everthing else is serverside -_-

rofl