PDA

View Full Version : This should be stupid simple



Lelouche Vi Britannia
03-29-2016, 08:26 AM
More of a aesthetic gripe but I've noticed that if I want the bow and arrow working I need to actually either start Link with wooden arrows or have them bought separately from the bow, and that's a bit retarded for having true arrows available now.




item script BowAndArrow
{
void run ()
{
Link->Item[15]=true;
Link->Item[13]=true;
}
}


Added to the on pick up script entry of another item like the bow and arrow combination item in the editor so when it is picked up / purchased it adds both the first bow (item 15) and the wooden arrow (item 13) to Link's inventory. I also created medals that are effectively "attached" to the quiver that transforms all of your arrows into a new form (ie a silver token turns arrows into Silver Arrows, etc) which explains why a separate item is needed to enhance arrows and how the same old arrow ammo still works despite the upgrade... All using a single custom item class and three short scripts as show below...



item script SilverToken
{
void run()
{
Link->Item[14]=true;
}
}

item script Goldentoken
{
void run()
{
Link->Item[57]=true;
}
}

item script LightEssence
{
void run()
{
Link->Item[141]=true;
}
}


I've compiled but not tested the code above as well as created the items that enable them; Silver Token, Golden Token, and Essence of Light. Still debating if I should show the essence/tokens on the sub screen, right now not seeing a need since the items are a means to an end and the arrow portion of the bow and arrow icon reflects the current arrow.

So the question now is not if it will work (pretty sure it will), but rather is there a way to combine the coding in all four scripts together into one, or should I leave it as is?