playMaker

Author Topic: cInput Actions  (Read 11910 times)

vidjogamer

  • Playmaker Newbie
  • *
  • Posts: 10
cInput Actions
« on: February 20, 2014, 11:13:42 AM »
Hey guys, I made a slew of cInput actions. I tried to make them as easy to use as possible. I was going to put them up on the asset store, but I figured I'd give back to the community. Feel free to make improvements and share :)

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: cInput Actions
« Reply #1 on: February 26, 2014, 08:26:12 AM »
Hey, thanks for sharing, I've been looking forward to this.
Unfortunately I get this error when I import the package:
Quote
Assets/cInput PlayMaker Actions/Actions/CInputAddModifier.cs(17,13): error CS0103: The name `cInput' does not exist in the current context

Any idea what it might be? I am doing something wrong?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: cInput Actions
« Reply #2 on: February 26, 2014, 01:08:19 PM »
Hi,

 You do need to own cInput and have it installed on your project. So make sure you first go to the asset store and import cInput and PlayMaker, then you can import this support package.

bye,

 Jean

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: cInput Actions
« Reply #3 on: February 26, 2014, 03:39:30 PM »
Hi,

 You do need to own cInput and have it installed on your project. So make sure you first go to the asset store and import cInput and PlayMaker, then you can import this support package.

bye,

 Jean

ah, obviously, I'm such a dumbass sometimes
thanks jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: cInput Actions
« Reply #4 on: February 26, 2014, 11:42:28 PM »
Hi,

 no worries. I do think that something should be done here to explain the developor of what's missing as opposed to firing an error... Lot's of work to be done on that front for Unity. On the other hand, once you bump once into that kind of issue, then you know straight away what it is.

bye,

 Jean

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: cInput Actions
« Reply #5 on: February 27, 2014, 09:28:12 AM »
I made a tweak for the Cinput Get Text action, I wasn't sure how to use it that way so I made the values public so I could edit them in Playmaker.




terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: cInput Actions
« Reply #6 on: March 10, 2014, 12:05:20 PM »
Today I took some time to try to implement this in my game and it just doesn't seem to work well. Besides my previous comment, the "CInput change key" action doesn't trigger any events, like "finished", and using the "CInput get button down" will start giving me errors like infinite loops, even though the regular "get button down" action works without problems.

Is it working fine for everyone else?
That being said, I totally appreciate vidjogamer's work and know that the problem might be with my implementation, not with the actions themselves.

vidjogamer

  • Playmaker Newbie
  • *
  • Posts: 10
Re: cInput Actions
« Reply #7 on: March 12, 2014, 03:30:17 AM »
Hmm. cInputGetButtonDown should work. It could you are not using the same version of cInput that I made the actions with. Or perhaps I overlooked something. I'll be importing these into a new project soon. So I will test them out again.

As for the Change Key action, feel free to add "finished" events or anything else. I posted these to help others and so we can all improve/maintain them as a community.

Kid

  • Playmaker Newbie
  • *
  • Posts: 6
Re: cInput Actions
« Reply #8 on: March 15, 2014, 11:08:24 AM »
vidjogamer, many thanks for your scripts! Can you help me out a bit? Terri pointed out that "CInput change key" doesn't trigger events, like "finished". How can we alter this action, so it will launch transition on key pressed?

update. it seems that I've found a way around it. In the same state with ''change key" action inserted "string changed" action. And when the string changed, called "finish".

« Last Edit: March 15, 2014, 11:33:25 AM by Kid »

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: cInput Actions
« Reply #9 on: April 01, 2014, 09:55:51 AM »
My solution was based on Kid's but instead of using the string changed action, I just had a Any Key action on the same state. It works.

The CInputGetButtonDown was still giving me infinite loops and weird behavior so I changed it, it works like GetButtonDown now and fixed all my problems.

edit: nevermind, this version works but its laggy for some reason. I'd also need a GetAxisVector that works with cInput, but couldn't get that working myself


« Last Edit: April 01, 2014, 11:53:18 AM by terri »

Roger Lee

  • Playmaker Newbie
  • *
  • Posts: 31
Re: cInput Actions
« Reply #10 on: May 31, 2014, 03:08:25 PM »
Thank you so much for this!!

Those who are still having problems with infinite loops you can use the attached GetKeyDown action.  I was having the same problem and I took out the stuff associated with the every frame setting and now it works exactly like the standard Unity version.

I don't think the GetButtonDown is even part of cInput anymore as it's not in the documentation anywhere.
« Last Edit: May 31, 2014, 05:02:34 PM by Roger Lee »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: cInput Actions
« Reply #11 on: June 03, 2014, 08:02:32 AM »
Hi,

 With these kind of problems, use a next frame event action and only come back to the state checking for mousedown then. It will avoid infinite loop.

Bye,

 Jean

LogLady

  • Full Member
  • ***
  • Posts: 150
Re: cInput Actions
« Reply #12 on: August 11, 2014, 10:52:16 AM »
Hi!

I've configured the controls but can't get the cInput GetAxis working correctly. Sometimes it works randomly or don't do anything. The cInput GetAxis Raw works fine except that when using a generic usb controller the sensitivity ramps faster from 0 to 1 than using a Xbox360 controller. I tried to set the sensitivity lower than 0 but I can't see any difference from 0. Is there any way to lower the axis ramping value? I'd like do make it slower so I can make a configuration like the Xbox controller.

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: cInput Actions
« Reply #13 on: August 14, 2014, 08:34:44 AM »
Hi,

 I am using cInput, and I don't experience this. Are you sure you only set it up once and not everyframr or something?

bye,

 Jean

LogLady

  • Full Member
  • ***
  • Posts: 150
Re: cInput Actions
« Reply #14 on: August 14, 2014, 03:27:19 PM »
The config I made works fine for the xbox controller and I use the very same configuration for generic controllers.

Nice to know that you are using cInput, Jean. When I use the actions provided by vidjogamer, the editor gets slow only when I'm editing cInput stuff.