I was wondering if someone could make an aquamentus that breathes fire.
Edit: I also need moving platforms that are 16x16 combos that carry link around the screen. I'm using changers by the way. :googly:
Printable View
I was wondering if someone could make an aquamentus that breathes fire.
Edit: I also need moving platforms that are 16x16 combos that carry link around the screen. I'm using changers by the way. :googly:
Um, subject line and topic divergance?
Fixed... Smack to the face.
Code:ffc script Platform{
void run(){
int counterx; int countery;
while(true){
if(Abs(Link->X-(this->X+8*(this->TileWidth-1))) <= 8*this->TileWidth
&& Abs(Link->Y-(this->Y+8*(this->TileHeight-1))) <= 8*this->TileHeight){
Link->X += move(this->Vx,counterx);
Link->Y += move(this->Vy,countery);
counterx = (counterx+1)%(100/factors100(Abs(this->Vx)));
countery = (countery+1)%(100/factors100(Abs(this->Vy)));
}
Waitframe();
}
}
int move(int s,int c){
int as = Abs(s);
int ret;
if(as < 1){
if(c < as*100/factors100(as)) ret = 1;
else ret = 0;
}else if(as < 2){
if(c < (as-1)*100/factors100(as-1)) ret = 2;
else ret = 1;
}
if(s < 0) ret = -ret;
return ret;
}
int factors100(int s){
for(int i=50;i>0;i--) if((s*100)%i == 0) return i;
}
}
How do you set this script up using your pit script?
Move the 'Falling' boolean from the pit script outside of the script, and put a line inside the if in the while loop in this script that says 'Falling = false;'.
Ah , very simple.
Thanks =)
Yeah, I mean it's not perfect but I'd say it's acceptable.
I'm quite proud of it though, took some thinking up.
There's a slight problem with the script. It only moves link if he's facing the same direction as the platforms path of movement. Is it possible to correct this?
There is nothing related to direction in that code at all.
Are you possibly walking against the direction of the platform?
Surprisingly enough that might cause some problems.