Forum rules - please read before posting.

A few questions...

Hello!
I apologize in advance for my English. I'm from Russia. We have a very poor education system in teaching foreign languages...
I have to say that AC is a wonderful asset - intuitive and accessible. But, nevertheless, something I could not figure out how it works. These things are:
I) Screen resolution.
I plan to use three resolutions in my game: the original 1980x1020 and two additional 1600x900 and 1280x720.
I did everything as described in this tutorial (https://adventurecreator.org/tutorials/adding-screen-resolution-option) and created a button in my menu that is responsible for screen resolution.
image
image
But what to do next? What code still needs to be inserted into the script for it to work? Sorry...

II) This item is not necessary for consideration, I just have such a desire: I want to make sure that a dark translucent texture is imposed on the scene screen when the options menu is called up. It looks a lot nicer.
image
image

III) The cursor.
I want to make a cursor with animation (when you mouse over a hotspot) that would replace the main non-animated cursor. I did not understand how to enable animation for the cursor. There is such an option in the settings, but I don’t know how it works. I created a cursor sprite list, dragged the sprite into the texture field and set the animation to settings.
image
But in game mode, when I hover over the hotspot, the game stops and the following error pops up:
image
Maybe I'm doing something wrong...

IV) Crafting.
Unfortunately, I could not find the right combination in the ActionList. Automatic crafting works, but I want to do this at the click of a button.
image
I have a three-item recipe, but my attempts to find the combination of the necessary actions to create the item on my own failed. The request to prompt the correct actions in ActionList.

Comments

  • Welcome to the community, @Ugor. I'm afraid your post was somehow locked in the spam queue for a little while, but your account is now approved so it shouldn't happen again.

    Screen resolution.

    The tutorial involves two scripts:

    1. SetupOptionsMenu, which is a new component that sets up the Cycle menu element's values, as well as the Global Variable to the correct value.
    2. ActionApplyResolution, which is a custom Action that takes the Global Variable value and uses it to set the correct resolution

    The first script should be placed in your game's first scene (or whichever scene your testing in), as a component on a GameObject. The second is a custom Action that needs to be installed via the Actions Manager, and then used in your "Set Resolution" ActionList. Are these scripts created and used correctly?

    Note that the tutorial was updated a few weeks ago, and that the SetupOptionsMenu script auto-generates the Cycle element's values for you, based on the Screen Resolutions you've defined in Unity's Player settings.

    Grey background

    You can create a new Menu that's just a full-screen transparent grey background, and turn it on and off when the Options menu is turned on and off. Inside your Options menu's properties, create new "ActionList when turn on / off" ActionLists, and use Menu: Change state Actions to turn this new menu on/off as well.

    If your menu is rendered using AC, rather than Unity UI, you'll need to make sure that the Options menu is listed beneath this new one in the Menu Manager - as this determines the drawing order of AC-rendered menus.

    Cursor

    You'll need to set the Columns field to 7 in the animation settings.

    Crafting

    Do attempt crafting via an ActionList, and not automatically, use the Inventory: Crafting Action with the Method set to Create Recipe. The recipe itself will also need to have its own Result is automatic? property unchecked.

    A sample Crafting menu with this functionality is available in the default interface. You can temporarily switch your Menu Manager asset file to Default_MenuManager to try it out.

  • ChrisIceBox,
    Thank you so much for the answers!
    With the cursor, the problem is now solved, thank you!

    I) Screen resolution.
    I will try again to carefully study this all ...

    II) Gray background.
    The method you proposed works, but there is a problem: the gray background menu is also superimposed on top of the main menu:
    image
    But this is not the right action. The gray background should be between the game scene and the main menu, that is, visually separate the game scene from the settings menu. In addition, aesthetically it also looks prettier...

    III) Crafting.
    I actually use default menus. The crafting menu is also defaulted. In my game, I do everything alone, including creating graphics, illustrations, animations, interfaces, and I also write the plot and dialogs myself (though everything is in my native language). Therefore, it was easy for me to adjust my previous interfaces to the interface of your amazing asset.
    But back to the crafting system ...
    I used the Inventory: Crafting Action function.
    If I put this function at the top of the ActionList, then Unity will crash with an error:
    image
    image
    Сигнатура проблемы:
    Имя события проблемы: APPCRASH
    Имя приложения: Unity.exe
    Версия приложения: 2019.2.10.15053
    Отметка времени приложения: 5dad92cb
    Имя модуля с ошибкой: ntdll.dll
    Версия модуля с ошибкой: 6.1.7601.18247
    Отметка времени модуля с ошибкой: 521eaf24
    Код исключения: c0000005
    Смещение исключения: 00000000000508c5
    Версия ОС: 6.1.7601.2.1.0.256.1
    Код языка: 1049
    Дополнительные сведения 1: 3989
    Дополнительные сведения 2: 39890c64589588970365dc6bc7dc0bf7
    Дополнительные сведения 3: 980d
    Дополнительные сведения 4: 980d68841e896c0c31e657b34b310e31

    If this function is used after other functions, then clicking on the item creation button does not happen.
    image

  • A small addition. I attached a slightly different screenshot. I did it after the crash, so I forgot to set the Create Recipe setting ...
    image

  • Grey background

    Are your Menus rendered with AC or Unity UI? See my earlier comment above about drawing order if they're rendered with AC. If you instead use Unity UI, then the drawing order depends on their Canvas properties (i.e. Z position etc), and is not determined by AC.

    Crafting

    Does the crash occur for all recipes, or just one in particular? What is your AC version?

    I will need more information to before I can try to recreate the issue. If you can create a .unitypackage file of your Managers and UI assets (prefabs / textures and ActionLists) PM it to me with instructions on how to recreate the issue, and I'll take a look.

    With the second ActionList with Actions before it: you are using three Inventory: Check selected Actions which each check if a different item is currently selected. As only one item can be selected at a time, the last Action will never be reached.

  • ChrisIceBox,
    Oh, thank you, I didn’t think about it and first created a gray background at the end of the menu list ... Now I moved it to the very beginning and everything works fine, thanks!

    Crafting....
    Yes, crash happens always and in all recipes, if I put Inventory: Crafting Action as the first function. I have version 1.69.4.
    I experimented with this function a little more myself and found the following solution.
    If I do something like this, then I can avoid Unity crash:
    image
    But when I create an item, the recipe is generated ad infinitum (and this cannot be stopped). This can be seen in the screenshot.
    Therefore, I decided to add two more actions: a) add the item that I need to create; b) close the Crafting function by selecting the Clear Recipe method.
    image
    Next, I add three more actions to this scenario: I remove from the inventory all the ingredients involved in creating the recipe:
    image
    This works, but it turns out that I bypass this script's "When click on result" function. I don’t know if all this is correct, but, most importantly, this method works and Unity does not crash.

    Sorry, I'm not sure which files I should send you exactly. I'm a newbie, I work with Unity for one month and a week with your asset ...
    But I can, for example, upload a folder with the game to Google and send a link if you want ...

  • Such extra Actions shouldn't be necessary - are the items being removed part of the recipe?

    My guess is that the crash occurs because the "Create Recipe" operation is running too many times. If the ingredients are being removed, this may prevent the operation from taking up too much memory, since there's no recipe to create.

    The ActionList shouldn't be called ad infinitum like that. As a test, try creating a new ActionList that just has the lone "Create Recipe" command. Then arrange the ingredients as normal in-game - but instead of clicking the Menu Button to run the ActionList - click the Run now button in the ActionList's Inspector. That should make sure it only runs once.

    Does it then perform as it should? If so, it may be a Menu issue. In which case, let's see some screenshot of the Menu's properties in the Menu Manager - both the Menu and the Button element that is used to perform the crafting.

  • When I click on the Run button in the Inspector: the same crash happens. Most likely the problem is here ...
    image

    These are my craft menu settings. I did not touch anything in them, I just replaced all the graphic elements of the default menu with my own and set it up:
    image
    image
    image
    image
    image

  • OK. It looks like the Menu is likely not the cause, in which I should be able to get by with just the Manager asset files.

    Select all 8 of your Manager files (they'll be inside the Managers subfolder in the directory AC made in your Project window upon using the New Game Wizard), and export them as an asset package:

    https://docs.unity3d.com/Manual/AssetPackages.html

    Be sure to uncheck Include dependencies so that other assets aren't included. If you can them PM me the resulting file, I'll take a look.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.