Forum rules - please read before posting.

Using escape for skipping and turning on and off Options

I want to use the escape key for skipping a cutscene, the problem is that I also use this key for the menu, so when I press escape during a cutscene, it skips the cutscene accordingly but also shows the menu. How to solve this?

Comments

  • Untie the link between your Escape key to the menu, and use an Active Input instead.  Active Inputs are covered in section 2.14 of the manual, but essentially allow you to map input buttons to ActionLists, but only during the game state you choose.  Therefore, you can map the Escape key to enable the menu (using the Menu: Change state Action) only if you are during regular gameplay, and not in a Cutscene.
  • Thanks ! @ChrisIceBox, that worked! Can I use Active Input with Walk scale and Run Scale too? I runned it from code at first, but now I want to try it in this way. What I do now is: Run the Active inputs with an element Run (which is the left shift button) and then run an actionlist Character : Animate, custom, change walk and run speed. My problem now is that I have levels where I want to change the runspeed, and I cant make it work like it has to be. I check the level and then run an action list but than the character makes a stuttering movement, and something changes but not really (difficult to explain). If I put the walk and run speed simply in OnStart it is not beeing called(probably because OnStart doesnt Run via Update).
  • (its not custom but standard I use, sorry for the mistake)
  • The Active Inputs is intended for single button presses, rather than holding a button down - as this would cause an ActionList to be triggered every frame (not good!)

    If all you're looking to do is change the speed, it'd be much better to write that in a custom script.  It'd be very simple to do - after checking for the appropriate key, all you really need to do is something like:

    AC.KickStarter.player.walkSpeed = 10f;

  • Thanks Chris, that did the job!
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.