Announcement

Collapse
No announcement yet.

Changing dodge controls

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing dodge controls

    Hi, I want to program a mutator that makes it so when you hold the walk button and press a movement key in any direction, you dodge in that direction instead of walking. However, I just cannot figure out how to accomplish this. Could someone point me in the right direction?

    #2
    You will at minimum need a new playercontroller class or pawn class. Switching out the playercontroller with a custom one is very easy through a mutator. Changing the pawn (and still retaining the selected character mesh) involves a somewhat larger amount of code. IIRC the unrealwiki has examples of how to do this. If you can't find it there, I can also post some code examples later (or search some of my other posts on this or the beyondunreal forums)
    EDIT: Ok here's the link with Parser's code sample for switching the pawn class. And then see my post here about switching the playercontroller class.

    Comment


      #3
      Thanks for replying. I'm very new at this, just finished playing around with the default properties of weapons and such, and I was looking for something a little bit harder. Looking through the playercontroller and pawn classes, I think it's possible I may have bitten off more than I can chew! If you could give me a better idea of what exactly I need to do with the new playercontroller class or pawn class without giving it all away (so I can work through some myself and learn more), that would be great.

      Comment


        #4
        mh, the problem with replacing the Pawn/PlayerController is, that this might break some other mutators.

        I think it would also work with an interaction: there you should be able to grap the key and trigger the dodge manually by calling the function in the PlayerController/Pawn (?) which starts the dodge (dunno what it is called )

        Comment

        Working...
        X