Crawl/prone to crouch with multiple keys

Larsson24

Member
Hi,

Today I have crouch input set to "C" and crawl to "Ctrl" and everything work as expected. However, I want to go from crawl to crouch by pressing the crouch button, i.e. Ctrl to crawl then from here press C to go to crouch.

I'm using the ability pack but with changed animations so there is already a crawl to crouch animation setup, driven by the "Height" animator value.

1. Main issue - If I active Height Change (crouch) first and then crawl, then I just need to deactivate crawl with the second input (C) and it should work. However, I can't go directly to crawl and then crouch as I cant activate Height Change when crawl is all ready activated. I can move Change Height ability over crawl but that just switches the working order, i.e. I can then crawl to crouch but not crouch to crawl.

2. I'm having difficulties coming up with a good solution for how to monitor for the C input when in crawl state. Right now I'm listening to the OnCharacterAbilityActive event and then use the update function to check for input C (Rewired player get button down). Is there a better way of doing it without the update method? I have no clue but trying to use the update method as little as possible for resource reasons. I'm a noob and this is a pc game so maybe thats negligible?

I''m on UCC version 2.

Thanks! :)
 
Top