User Tag List

Results 1 to 1 of 1

Thread: This should be stupid simple

  1. #1
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,109
    Level
    11
    vBActivity - Bars
    Lv. Percent
    44.95%

    This should be stupid simple

    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.

    Code:
    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...

    Code:
    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?
    Last edited by Lelouche Vi Britannia; 03-30-2016 at 01:08 AM. Reason: Edited code and added to it, different question
    Lost my wings and grew 8 tentacles... I've seen enough Hentai to know where this is going....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social