I didn't mean to offend you, if I did.
No, I was making the point that you've been doing it longer than I have.
Um, by the way, if this doesn't work, and you work on the code some more, will you please test it before you let me have it? I have the Block itself set up as another script so the solidity code doesn't conflict with that of the Cane itself.
Edit: DARN IT!!! I was SOOOOO close to getting the solidity working! But if I put the solidity script in the item script part, it prevents you from moving AT ALL when you use the cane! Oh, by the way, would you mind explaining to me why this is in there:
What good is that going to do? And PLEASE don't respond with "It was in std.zh, so I put it in there". That's just wrong, seeing as that thing was just an example and probably didn't have the same end result I/we want.Code:position = (ffcy & 240)+(ffcx>>4)
Pinpointing the combo. That was the formula I was talking about, and it is not just an example. May I see the script?
Okay. I'll only give you version 1 (the one that's just an item script and no FFC script) since version 2 (with both an item and FFC script) doesn't work...
Notes:Code:// Cane of Somaria- Changes certain attributes of an FFC on the // current screen "Player" is on. It modifies the combo used, // combo type, flags, etc. In the end, it looks like a block. // This item will also change the location of the FFC so it // always "spawns" 2 tiles away from Link in the direction he // is currently facing. Becuase of limited knowledge, this // script currently does not prevent you from walking onto the // block. Any mention of "SomariaBlock" in the script refers to // the Freeform Combo. Have fun. // Note: Due to limitations (and the SomariaBlock script (see below // this script)), only FFC 1 can be used as the Somaria Block // until the FFC script bug is destroyed. import "std.zh" item script CaneSomaria { void run() { ffc SomariaBlock = Screen->LoadFFC(1); if(Link->Dir == 0) { SomariaBlock->X = Link->X; SomariaBlock->Y = Link->Y - 32; } else if(Link->Dir == 1) { SomariaBlock->X = Link->X; SomariaBlock->Y = Link->Y + 32; } else if(Link->Dir == 2) { SomariaBlock->X = Link->X - 32; SomariaBlock->Y = Link->Y; } else if(Link->Dir == 3) { SomariaBlock->X = Link->X + 32; SomariaBlock->Y = Link->Y; } float remainder = SomariaBlock->X % 16; if ( remainder <= 8 ) { SomariaBlock->X = SomariaBlock->X - remainder; } else { SomariaBlock->X = SomariaBlock->X + 16 - remainder; } float remainderY = SomariaBlock->Y % 16; if ( remainderY <= 8 ) { SomariaBlock->Y = SomariaBlock->Y - remainderY; } else { SomariaBlock->Y = SomariaBlock->Y + 16 - remainderY; } SomariaBlock->Data = 2123; SomariaBlock->CSet = 10; int ffcy = SomariaBlock->Y; int ffcx = SomariaBlock->X; int position = (ffcy & 240)+(ffcx>>4); Screen->ComboS [position] = 15; } }
-I had to change float to int at the last lines because the compiler expected a semicolon after float.
-I also had to rearrange everything so I could declare variables.
-I WANT TO KNOW WHAT THE HECK THAT LINE I MENTIONED BEFORE DOES.
Edit: By the way, if I don't post very often, it's because I'm watching Supernanny. Yes, I like that show. It proves exactly how chaotic this world really is, and it all begins with the children and irresponsible parents.... Sigh...
Please show me the one that doesn't works.
The line preforms bitwise opperation AND with the Y coordinate and >> shifts the bits in the X coordinate by 4 places, otherwise dividing it by 16.
So, if X was 16, it would equal one. AND returns the same values that goes in for multiples of 16. If Y is 0, it will be 0, and if it is 16, it will be 16 and so forth.
The combo 1 tile right of the left hand corner would be labeled as 1. (16,0) The combo below it would be labeled as 17.(16,16) When the values of X and Y are added, it tells ComboS[] looks for these combos in this grid-like pattern.
Okay.
The code is attached to the FFC script here, but... Either the code isn't working, on the script gets turned off because I'm modifying it through the item script. Is there a command to modify the script number a FFC uses?Code:// Cane of Somaria- Changes certain attributes of an FFC on the // current screen "Player" is on. It modifies the combo used, // combo type, flags, etc. In the end, it looks like a block. // This item will also change the location of the FFC so it // always "spawns" 2 tiles away from Link in the direction he // is currently facing. Becuase of limited knowledge, this // script currently does not prevent you from walking onto the // block. Any mention of "SomariaBlock" in the script refers to // the Freeform Combo. Have fun. // Note: Due to limitations (and the SomariaBlock script (see below // this script)), only FFC 1 can be used as the Somaria Block // until the FFC script bug is destroyed. import "std.zh" item script CaneSomaria { void run() { ffc SomariaBlock = Screen->LoadFFC(1); if(Link->Dir == 0) { SomariaBlock->X = Link->X; SomariaBlock->Y = Link->Y - 32; } else if(Link->Dir == 1) { SomariaBlock->X = Link->X; SomariaBlock->Y = Link->Y + 32; } else if(Link->Dir == 2) { SomariaBlock->X = Link->X - 32; SomariaBlock->Y = Link->Y; } else if(Link->Dir == 3) { SomariaBlock->X = Link->X + 32; SomariaBlock->Y = Link->Y; } float remainder = SomariaBlock->X % 16; if ( remainder <= 8 ) { SomariaBlock->X = SomariaBlock->X - remainder; } else { SomariaBlock->X = SomariaBlock->X + 16 - remainder; } float remainderY = SomariaBlock->Y % 16; if ( remainderY <= 8 ) { SomariaBlock->Y = SomariaBlock->Y - remainderY; } else { SomariaBlock->Y = SomariaBlock->Y + 16 - remainderY; } SomariaBlock->Data = 2123; SomariaBlock->CSet = 10; } } // SomariaBlock- Script for the solidity of the block "created" by the Cane of Somaria. ffc script SomariaBlock { void run() { ffc SomariaBlock = Screen->LoadFFC(1); float ffcy = SomariaBlock->Y; float ffcx = SomariaBlock->X; float position = (ffcy & 240)+(ffcx>>4); Screen->ComboS [position] = 15; void waitframe; } }
Screen->LoadFFC(2);
It's the number between the brackets.
Just combine the two scripts. The number in between the bracket refers to the number of the FFC that the command loads.
It doesn't directly change the script number. I read your question too fast.
There are currently 1 users browsing this thread. (0 members and 1 guests)