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.
I'm using 4 of them joined together like so. That way it looks like a single combo, since it glitches if you try to use a single 32x32 combo.
XX
XX
Define 'glitches'.
Note that a large FFC uses the surrounding tiles, not combos.
Big moving ffcs: Incorrect render. Renders only one tile, not the entire combo.
Big animated wide ffcs: Incorrect animation.
About the animation, you have to keep in mind about the tiles thing. You need to put the tiles in the animation order, and then use the Skip X option to do the animation. I'll put together an example tonight when I get home.
It works well for me.
And it probably works great for the creator also.
Confirmed. Although I haven't done any extensive testing, I ran into the same problem when writing my own version of this script.
I think it has something to do with Link's NES style movement code. It resists moving him in certain ways via script. But, when I enabled Diagonal Movement, suddenly it worked properly.
(I then ran into an issue with a platform moving at a fractional speed, but Link's position not storing decimals! I think Link's position should include the fraction, even if it's truncated for the purpose of determining his position)
(sorry about the double post, this is a reply to a different post)
Make sure your changers have the same TileWidth/Height and EffectWidth/Height settings. This is important, because any FFC that gets changed will inherit those settings!
Here's how you have to layout your tiles:
http://zctut.com/other/ffc1.png
Note that they're all side-by-side.
And, here's how you lay out the combos:
http://zctut.com/other/ffc2.png
Note there's only one combo for the whole FFC. Let's take a closer look at that combo, hmm?
http://zctut.com/other/ffc3.png
Ah, there! A.Skip X! Use that so the animation will jump from tile 0 to tile 2 to tile 4, etc, thus giving you the proper animation.
It's not buggy.
Never mind...
I'm just going to hope they fix the ladder bugs involving diagonal movement.
I managed to fix the problem I was having with the diagonal movement by making it so when link tries to scroll off the screen in some of my cavern rooms it stops by using the Cancel Warp/Sidewarp Trick. ;)
A more complicated platform script should probably check for obstruction before moving Link, something I might add to my platform script. That way, you can't scroll Link off the screen unless it's walkable.
Yes, I like to see it use the ffc variables to give it different properties. If your going to make a platform script, make it as versatile as possible.
Mine works for what I wanted it to do, I posted it to help you out.
If you want to make more versatile I'm quite happy for you to, but I have no need to.
It's that it scrolls link off the screen onto the adjacent screen that caused me problems man. That was all, not really a bug. Just a limitation of the script which I've fixed.