Majora/SUCCESSOR/CJC Script Collaboration Thread
@Majora
@SUCCESSOR
and of course
@CJC
There, now that the tags are out of the way.
Majora is trying to get his shield script to work without the muck of Link Tile Modifiers. I've begun to brainstorm a script for this, but I've hit a wall with all the possible actions Link can take while holding a shield.
Code:
int WoodenShield = # //Replace with the item number for your wooden shield
int WoodShieldRaised = ### //Replace with the tile number that corresponds to the wooden shield
//When Link is blocking with it.
//Make sure you arrange the tiles in the following order:
//Face Up, Face Down, Face Left, Face Right. Keep the two frame-animations together
int WoodShieldRest = ### //Replace with the tile number that corresponds to the wooden shield
//When Link has it at his side.
//Use the same arrangement as Raised.
If(Link->Item[WoodenShield]){ //Checks if Link has the Wooden Shield
If(Link->InputEx1){ //Button Assigned to the Shield
//Insert the block code for your script here
FastTile(0, Link->X, Link->Y, WoodShieldRaised + Link->Dir*2, WoodShieldCset, 128) //Draws the shield on
//Link's Layer. It should automatically adjust for direction.
}
Elseif(Link->Action == 0){ //Standing Still
FastTile(0, Link->X, Link->Y, WoodShieldRest + Link->Dir*2, WoodShieldCset, 128) //Draws the shield on
//Link's Layer. It should automatically adjust for direction.
Elseif(Link->Action == 1){ //Walking
FastTile(0, Link->X, Link->Y, WoodShieldRest + Link->Dir*2 + 1, WoodShieldCset, 128) //
}
}//And so on in that manner. You've got your work cut out for you on this.
//Also, we'll have to figure out how to handle moving while the shield is raised.
//Perhaps Action == 0 and Action == 1 need to be the uppermost IF statements.
If either of you can work out how to make this script better/more functional/less bloated, give me a tag. I'm stumped.
EDIT: Copy the code into a notepad so you can actually read it.