Quote:
Originally Posted by DustyPorViva
You'd get more help if you posted the script. It's hard to help people when you have to take a shot in the dark and guess what the problem could possibly be, if it could even possibly exist. Scripting can be complex, so there's a multitude of things that can be causing problems.
|
PHP Code:
function onCreated() {
//showcharacter();
setgani();
scheduleevent(20,"Destroy",NULL);
this.dontblock();
setshape(1,2,32);
}
function setgani(){
if(this.amount<=-1) temp.type = 10; //(Black)
elseif(this.amount==1) temp.type = 1; //(Green)
elseif(this.amount<=5) temp.type = 2; //(Blue)
elseif(this.amount<=10) temp.type = 3; //(Yellow)
elseif(this.amount<=20) temp.type = 4; //(Red)
elseif(this.amount<=50) temp.type = 5; //(Purple)
elseif(this.amount<=100) temp.type = 6; //(Orange)
elseif(this.amount<=200) temp.type = 7; //(Silver)
elseif(this.amount<=300) temp.type = 8; //(Gold)
elseif(this.amount<=500) temp.type = 9; //(Crystal)
setcharani("j7_rupees", temp.type);
}
function onDestroy(){
this.destroy();
}
function onPlayertouchsme(){
if(player.z >= this.z - 0.5 && player.z <= this.z + 0.5){
if(player.rupees == clientr.walletsize){player.chat = "I cannot hold any more!"; return;}
if(this.aniparams != 10){
player.rupees += this.amount;
player.chat = "I got" SPC this.amount @ "g!";
this.amount = 0;
this.destroy();
}
else{
player.chat = "Oh, no! I dropped" SPC abs(this.amount) SPC "g!";
this.destroy();
}
}
}
//#CLIENTSIDE
function onCreated(){
setshape(1,16,32);
this.canplay = 1;
play("item.wav");
setTimer(15);
}
function onPlayertouchsme(){
if(player.z >= this.z - 0.5 && player.z <= this.z + 0.5){
if(player.rupees == clientr.walletsize){return;}
if(this.canplay = 1){
this.canplay = 0;
play("extra.wav");
this.alpha = 0;
}
}
}
function onTimeout(){
if(this.canplay == 1){
if(this.alphaswitch == 0){this.alpha = 1;this.alphaswitch = 1;}
elseif(this.alphaswitch == 1){this.alpha = 0;this.alphaswitch = 0;}
setTimer(0.05);
}
}
when I use showcharacter() on it, the box will be far too large. but if I get rid of it, the smaller box seems to be shifted over to the left.
Quote:
Originally Posted by salesman
Make sure you position the sprite correctly in the gani. If it's not on the 0,0 spot, then you'll have the problem you're describing.
|
That did the trick!
edit: nevermind!