Forum rules - please read before posting.

Menu "missed click" issue

So I have a pretty complex combat arrangement that is done using the following steps (greatly simplified):

a) menu showing available attacks (via buttons) appears

b) player chooses desired attack, activates appropriate actionlist

c) enemy randomizes attack type, then animates said attack

d) immediately after, the timescale is reduced to around 0.2 or lower, and a "defense menu" appears

e) player selects defense button from defense menu based on the incoming attack, alternatively player does not select defense and does not try to defend, in which case 0.2 seconds pass (in "lowered timescale time", meaning it's more like 1.5 seconds) and then afterwards the menu disappears and the enemy's attack hits

f) timescale returns to 1 and player animates defense, dodges/blocks attack depending on chosen defense/incoming attack

So this works quite well the way I have it set up with (mostly asset-based) actionlists, however there is one small problem: If the player tries to click on a defense button in e) but "misses" (there is not much time available to select it, so the player needs to pick quickly) then the player can no longer select any defense types, thereby leading to the player not defending and getting hit (usually). 

In other words, if the player clicks once on an area of the menu in which there is no button, the menu buttons no longer become clickable.

The only thing I can think of is that this has to do with the timescale being lowered. Perhaps there can only be so many "clicks" on a menu during each period of time, and this amount is lowered while the timescale is lowered?

 Is there any other reason this could be happening? Just to add, all of the actionlists involved during part e) run in background so that the player can click menu buttons.


Also just FYI, the reason I'm not using QTE's for this is because I set this up long before QTE's were supported by AC. I'd rather keep the system I have now because I have it set up to be easily used in multiple battles throughout my project.

Comments

  • If you select the GameEngine prefab, and find the PlayerInput component, you'll find a couple of "hidden" variables you can play with: namely, the delay that has to pass between clicks for them to register.

    You could well be right about it being too high.  Try lowering the Click delay value and see if that makes a difference.  It may be that it has to be somehow tied to the timescale, but let's see how you get on, first.
  • So I tried changing the "Click Delay" to various lower values, starting with 0.2, 0.1, then 0.01, then 1E-6 and even 1E-11, but this problem persists regardless of the click delay value.

    I did a few experiments though:

    I tried removing the timescale step, keeping it at 1 the whole time, and I was able to "miss" click then click the defense button successfully, so it does seem to be a problem related to the timescale function.

    I also tried extending the "wait" period after the timescale is set to 0.2, and after a "missed" click, I attempted to click a defense button but the click was not recognized until after about 2 seconds of trying to click it, after which it did successfully recognize the click.

    So it seems that timescaling does affect the click delay, but for some reason changing the click delay in the GameEngine inspector does not carry over at least fully to the click delay when the timescale is set to 0.2.

    This sounds more like a Unity issue, so I'm not sure what can be done about it. Perhaps I'll just widen the buttons so that it's impossible to "miss" the click. Thanks for the help though!
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.