|
Post by jk350z on Feb 28, 2018 5:30:26 GMT
First off, this is a fantastic controller and package for Unity.. I've been playing around with it a lot and I'm using the latest versions... But where can I change the v Trigger Generic Action button or add additional action buttons? If I wanted to change from the "E" key to the "U" key for example. or Use "E" Key for one thing and "U" key for another?
Thanks!
|
|
|
Post by tharindu on Feb 28, 2018 5:44:57 GMT
if you expand the options under the generic action script you'll see there are input mappings.
|
|
|
Post by jk350z on Feb 28, 2018 5:49:13 GMT
Beautiful... and there they are. That's the result of programming after midnight. Thanks alot!
|
|
|
Post by jk350z on Feb 28, 2018 14:44:52 GMT
Now that I'm awake... that seems to be for the vGenericAction key bindings which can be accessed and changed in the GUI. I'm more curious about the vTriggerGenericAction which seems to be set on "E" without ability to change in the GUI.
Thanks again!
|
|
|
Post by tharindu on Feb 28, 2018 16:22:25 GMT
Not sure I understand what you're talking about. are you talking about the UI text appears with the E button ? do you want to change that text ?
The trigger action script isn't written to accept different input keys for different keys. It's just that your generic action script on the controller is set to a specific action button that's common hence the word "generic". The trigger action's you place around the map will actually accept inputs on behalf of that script. So you will only be able to bind a key to a generic action and use it. Unless of course you write your own code with some modifications to do what you want.
|
|
|
Post by jk350z on Feb 28, 2018 16:31:53 GMT
Understood and thank you for the clarification. I guess I was trying to use vTriggerGenericAction as opposed to vGenericAction because vTriggerGenericAction has the built in GUI support for OnDoAction, OnEnter, OnLeave, OnStay.. While vGenericAction has OnDoAction only (with check mark options at the top for OnEnter, etc.)
I'll play around a bit more with vGenericAction. Thanks!
|
|
|
Post by tharindu on Feb 28, 2018 16:37:46 GMT
They are both linked really. You could consider it this way. The triggers you play all over your map to do certain things. The central location to setup the input for those is your generic action script. I think these two videos are what you need
|
|
|
Post by jk350z on Feb 28, 2018 17:55:50 GMT
Excellent.. Your last sentiment about how they work together led me in the right direction.. I was thinking they somewhat did the same thing (which they do not).
I then created 2 vGenericAction scripts in the Character Controller assigning different buttons to different TAGS. It didn't work initially until, commenting out the below in vTriggerGenericAction
//this.gameObject.tag = "Action";
now works perfectly and makes sense.
|
|
|
Post by tharindu on Mar 1, 2018 2:28:20 GMT
Nicely handled. But I wouldn't recommend adding lots of generic action scripts for different buttons ;)
It's generally a good gameplay decision to have generic actions like breaching, opening doors, pick ups and everything to correspond to one generic action or one key rather.
|
|