Author Topic: get_variant in inventory  (Read 319 times)

ponderitus

  • Newbie
  • *
  • Posts: 25
    • View Profile
get_variant in inventory
« on: March 16, 2017, 02:25:51 am »
Im making changes to my inventory names table and i was wondering whether it is possible to call a variant of an item from there? Could i call tunic variant 1 from there so i can also call variant 2/3 to be able to change tunic on pressed? Or would i have to just make 3 seperate tunic items? I know making the 3 seperate tunics would be easier.

Everything i have tried so far has resulted in errors

Diarandor

  • Hero Member
  • *****
  • Posts: 758
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: get_variant in inventory
« Reply #1 on: March 16, 2017, 02:09:40 pm »
You can make all these things and many others, but you may need to modify the inventory script. I don't really understand what you mean by "calling" an item; is your tunic item gonna be assignable to command buttons? or will you switch tunics directly from inside the inventory menu? and in the latter case, will you open a submenu to choose the tunic (like the one in LA to choose ocarina songs) or will you switch the tunic directly when selecting it (and pressing a command) from the menu? If you are getting errors that means you are doing something wrong. If you give us more info (or post that code here) we will may be able to help you more, but first be more clear about what you exactly want to do.

ponderitus

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: get_variant in inventory
« Reply #2 on: March 17, 2017, 01:08:36 am »
I hadnt even though of having a sub menu on selection, thats a great idea. To be honest im just playing around at the moment as i really dont understand lua. I only really started understanding the inventory script i have been reading yesterday. I was just trying to figure a way to switch between them.

Id eventually like to have them all on on the screen at the same time on the quest screen, wearable on selection, not assignable to a key...same as id like the sword and shield. Basically i eventually want the oot menu (plus an extra screen for reassigning keys), that probably makes more sense.

(Im on a phone so cant post any code)

Diarandor

  • Hero Member
  • *****
  • Posts: 758
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: get_variant in inventory
« Reply #3 on: March 17, 2017, 01:26:57 am »
I remember that it took me several months to understand Christopho's scripts and learn Lua, so take your time to learn all of it. If you are still testing the engine features and learning Lua, it is probably quite soon to make this menu.