Forum rules - please read before posting.

How do I make a clickable button while speech text is on the screen?

Hi! I'm new with this asset and Im wondering how the hell do I make the button to open the inventory clickable during a speech? Whenever the character is speaking I want to click the inventory to show "evidence" to contradict what the character is saying, but when I click anything on the screen it just skips the speech text until it ends. I hope you can help me!

Comments

  • Welcome to the community, @Panchoman77.

    Speech text will be skipped with input if you have Subtitles can be skipped? checked in the Speech Manager. The input it responds to will be a mouse click if you then, also, have Can skip with mouse clicks? checked.

    If this is unchecked, then speech will only be skipped when an input button named "SkipSpeech" is pressed.

    When you trigger an ActionList to display speech, that ActionList's default behaviour is to block gameplay - placing the game in "Cutscene" mode, and thus prevent regular interactivity.

    To prevent this - and allow for regular gameplay while the ActionList runs - set its When running property to Run In Background. This field can be found at the top of its Inspector.

    Though, you may want to limit the player's ability to move or interact with Hotspots during this time. The Engine: Manage systems Action can be used to disable the Movement and Interaction systems. A pair of these Actions (one at the start to disable them, one at the end to re-enable them) should allow you to limit what the Player can do during this time.

    It's also worth mentioning that Menus themselves can be made clickable during cutscenes - though this option is limited to Menus that have an Appear type of When Speech Plays, Manual, and During Cutscene. Also, InventoryBox elements are not interactive during cutscenes regardless of this option.

    Perhaps if you'd like to share more details on the exact situation, I can try to think of how best you might implement what it is you're after.

  • Thank you very much @ChrisIceBox for your response. I will try yo explain a little bit what I want to do.
    I would like to show some text (some description or comment about the object) when I talk to an object. When this text is displayed I would like to be able to contradict the statement shown by presenting items that I have in my inventory. Thats when the problem comes, I can't seem to be able to click on my selfmade inventory button (that I made using an image and a hotspot) without skipping the text that I need to disproof. Sorry if that doesnt make that much sense, english is not my first language.
  • Ok, I solved this. I just had to remove some code from the speech script, where basically said that if the subtitle was "in the background" it will skip the text automatically. Now I can have it in the background and skip it with a menu-button made in the subtitles menu, that button is linked to the skipspeech input, so when I click it it simulates the SkipSpeech. Then I re-made the "open inventory" button with menus aswell and disabled all hotspots when subtitles where shown so only one object description is clickable at the time but the inventory button is still usable. I hope you understand and it can help others in the future.

  • I'm glad you've sorted it, but I'm not totally clear on what you did, exactly - could you elaborate on what code you changed?

    Though you may want to move on from this, from your description I think I myself would approach this with the use of a Conversation instead. A Conversation's dialogue options can be limited by an inventory item's display - meaning you could make an option for each item, so that you can control what happens when clicked to just this situation.

    Dialogue options can also be given icons, and you can lock your "regular" Conversation menu with a separate one for this mechanic by locking/unlocking them with a pair of Menu: Change state Actions.

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.