Author Topic: [Help Needed] menu script question  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

aUh2dwftdtCJ

  • Fresh Meat
  • *
  • Posts: 4
    • View Profile
    • Awards
[Help Needed] menu script question
« on: April 10, 2018, 06:44:43 PM »
Lets say there are 3 potions.( Po1, po2, and po3.)
Is there a way to make option of the menu script change based on the history you have?

Ex: player1 has po1 and po2. Player 2 has po 3.
can player1 see po1 and po2 as option 1 and 2 while player 2 sees
 po3 as option 1? Can there be a system where the
options change based on what potions the player has? Can there be
an efficent way to add more potions into that script?

Sorry if its confusing, im making turn based combat and i
want an option to use items from the menu.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6649
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: menu script question
« Reply #1 on: April 10, 2018, 07:16:53 PM »
Yes that should be reasonably easy to do. See the HasHistory command.

aUh2dwftdtCJ

  • Fresh Meat
  • *
  • Posts: 4
    • View Profile
    • Awards
Re: menu script question
« Reply #2 on: April 10, 2018, 08:04:17 PM »
Thank you for commenting but i'm sorry, I'm not sure i understand.

Basically i want to use the menu command.

If
then
    Menu [[option1][script]] [[option2][script]

Can i make option1 be po1 if the player has history:po1 and make it
po2 if the player has history:po2 but not history:po1? And have option 2
po2 if the player has history:po1 and history:po2? I would like to know if
the "potions" could be expanded to any number. For example: making
option 1 po6 and option 2 po13.


Marked as best answer by aUh2dwftdtCJ on April 11, 2018, 01:01:54 AM

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6649
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: menu script question
« Reply #3 on: April 10, 2018, 09:13:04 PM »
Ah ok, I see what you mean now. Currently there is no way to parameterize the options like that. You'd have to do a HasHistory/Menu pair for each combination, which as you know would quickly become out of control as more potions are added.

One solution I can think of would be something like this:

menu [[option1][script][show=var]] and the menu option is only shown if var > 0.

Then you could do something like:

var [pot1] = [history:potion1]
var [pot2] = [history:potion2]
etc.
menu [[Potion 1][Potion1Script][show=pot1]]  [[Potion 2][Potion2Script][show=pot2]] etc




aUh2dwftdtCJ

  • Fresh Meat
  • *
  • Posts: 4
    • View Profile
    • Awards
Re: menu script question
« Reply #4 on: April 10, 2018, 10:02:16 PM »
Thank you so much :D

aUh2dwftdtCJ

  • Fresh Meat
  • *
  • Posts: 4
    • View Profile
    • Awards
Re: menu script question
« Reply #5 on: April 10, 2018, 10:30:24 PM »
1 more question, ive made the script but it doesnt work. Is the [show=] in the 360 version of the game?

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6649
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: menu script question
« Reply #6 on: April 11, 2018, 12:05:02 AM »
No. I've just added it. It will be in the next PC update.