How to edit existing UE4 Blueprints in C++?

I posted something similar to this on the blueprints forum but realized I may have posted on the wrong forum. Since it involves both blueprints and C++ not sure which is best, but it seems to me that if you know C++ you will likely be comfortable with BP, where if your a BP user you may not know C++, so I thought this may be a better place for it.

I was wondering how you could edit the functions for existing blueprints? For example if I want to edit the Jump function in the basic character controller, how would I go about doing that?

I’m sure there is an easy way, just need some guidance please!

Thanks!

Jump function from ACharacter class is marked as virtual, this means that you can inherit from ACharacter (by creating new class - AModifiedCharacterBase) and override this function:


virtual void Jump() OVERRIDE;

Then, if you create blueprint (BP_CharacterBase) that uses your type (AModifiedCharacterBase) as a base type, you can use your new Jump implementation.


ACharacter
     ^
     |
AModifiedCharacterBase
     ^
     |
BP_CharacterBase

This could help you:
https://docs.unrealengine.com/latest/INT/Programming/QuickStart/3/index.html
https://docs.unrealengine.com/latest/INT/Engine/Blueprints/TechnicalGuide/ExtendingBlueprints/index.html

Cheers!

Thanks for the response!

Question about this…

Would this completely be remaking a new jump function? Because at the moment I’m “mostly” satisfied with the current jump function. My goal is actually that I just want to do some minor tweaks and add some variance to it. Is there a way to retrieve the current function to just add to it? Or is it only possible to create a new one?

Thanks again.

Yes, this would overwrite existing Jump function (http://en.wikipedia.org/wiki/Method_overriding).

You can copy/paste the same code and then make your tweaks or modify base Jump method.

Cheers!

Thanks.

I understand the concept of overriding (used C# for last few years, but my C++ is rusty as I haven’t used it since early 2008). But when you mention you can copy/paste the same code, do you mean the code from the original jump method?

That’s basically what I’m looking for. I’m installing 4.2 source right now and like a ***** I uninstalled the 4.1 source install first, but if I remmeber correctly, when I was searching for the jump function, the jump function in ACharacter only changed a variable, and I couldn’t quite find the exact class or function that contained the actual coding for the jump method.