it doesn’t seem to work online… here’s my script:
if (playerenters&&diedatspider){
removecompus;
this.i = 0;
this.goingup = 0;
putnpc shadow.gif,shadow.txt,x+.5,y+3.5;
this.flasher = 0;
// Initialize the attributes
showcharacter;
setcharprop #3,head0.png;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
say2 The spider can't stand fire, #bhere are some bombs.;
if (playerbombs < 6){playerbombs += 6}
unset diedatspider;
timeout = 0.05;
}
if(timeout&&this.flasher%5==4&&this.goingup==0){
y += 0.1;
this.i += 1;
if (this.i==5){this.goingup = 1;}
}
if(timeout&&this.flasher%5==4&&this.goingup==1){
y -= 0.1;
this.i -= 1;
if (this.i==0){this.goingup = 0;}
}
if (timeout&&!this.flasher%2==0){
show;
timeout = 0.05;
this.flasher += 1;
return;
}
if(timeout&&!this.flasher%2==1){
hide;
timeout = 0.05;
this.flasher += 1;
flash = 0;
}
Would hitcompu work instead?
2ndwolf:
it doesn’t seem to work online… here’s my script:
if (playerenters&&diedatspider){
removecompus;
this.i = 0;
this.goingup = 0;
putnpc shadow.gif,shadow.txt,x+.5,y+3.5;
this.flasher = 0;
// Initialize the attributes
showcharacter;
setcharprop #3,head0.png;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
say2 The spider can't stand fire, #bhere are some bombs.;
if (playerbombs < 6){playerbombs += 6}
unset diedatspider;
timeout = 0.05;
}
if(timeout&&this.flasher%5==4&&this.goingup==0){
y += 0.1;
this.i += 1;
if (this.i==5){this.goingup = 1;}
}
if(timeout&&this.flasher%5==4&&this.goingup==1){
y -= 0.1;
this.i -= 1;
if (this.i==0){this.goingup = 0;}
}
if (timeout&&!this.flasher%2==0){
show;
timeout = 0.05;
this.flasher += 1;
return;
}
if(timeout&&!this.flasher%2==1){
hide;
timeout = 0.05;
this.flasher += 1;
flash = 0;
}
Would hitcompu work instead?
removecompus does work. What server version are you using o_0 and also, have you made sure your script is even reaching removecompus? I see you’ve got a condition there(‘diedatspider’)
Yes it does, the guy appears.
I might be using an old version…
is 2.4.0 the latest?
Also this is on a setmapped level… could it be the cause?
Eroz
October 7, 2012, 7:52am
4
2ndwolf:
Yes it does, the guy appears.
I might be using an old version…
is 2.4.0 the latest?
Also this is on a setmapped level… could it be the cause?
it should work in bmap. i think the problem is the condition.
2ndwolf:
It works offline though.
There’s often a bit of lag associated with scripts online. Therefore this makes somethings work while others don’t.
Try
if (playerenters){
sleep 1.5;
removecompus;
}
If that then works then you’ll know it’s lag so then you could do something like
if (playerenters){
this.clearedBaddies = 0;
timeout = 0.05;
}
if (timeout){
if (compuscount > 0 && this.clearedBaddies == 0){
removecompus;
this.clearedBaddies = 1;
}
timeout = 0.05;
}
2ndwolf:
Tnx, i’ll try that.
Let us know if it was the issue for future reference please.
2ndwolf
October 10, 2012, 11:20pm
9
This should do it but it doesn’t remove compus…
// Graal2002 NPC by Stefan Knorr
if (playerenters&&diedatdragon){
removecompus;
timeout = 0.05;
// Initialize the attributes
showcharacter;
setcharprop #3,head0.png;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
setcharani gurufloating,;
say2 The dragon spits fire but learns #b soon not to swallow it;
}
if(timeout&&compuscount>0){
removecompus;
timeout = .05;
}
This happens after a player dies and is warped to another level… that must be why.
EDIT:
It worked now, no idea why.