I don’t believe you’re going to be able to see that function outside of a blueprint of the LevelScriptActor itself. To do what you want, a class based off blueprint function library may be more suited. The functions from the library should be available across all blueprints.
Thanks, “blueprint function library” was the keyword I need to know to answer the question. However, I stumbled across this custom gravity code link text
I’m trying to understand how this works and from what I saw he only changed the default gravity float value and made it an FVector. He went to all other classes where the gravity was used and made adjustments. However, I don’t see him making a “blueprint function library”, he added the code/UFUNCTION under LevelSciptActor.h and .cpp, so I wonder why this is not possible for me? <3
Ah, I see. I was under the impression that you were creating a class based off LevelScriptActor, not editing the existing base class itself. I’ll need to test that myself but it should work as he has it listed there.
I think he downloaded the source and he changed the source code, before running the 2 .bat files (see steps when installing UE4 from source code). When I wrote stuff in LevelScriptActor.h and .cpp, it was set to read-only and I had to change it. It still didn’t work, seems like the standard classes are some kind of protected.
If you’re trying to edit the source code from within a Binary build (pulled from the launcher) it won’t work as you won’t be able to build it.
You’ll need to download the source code from Github as he has and if you do so, you should be able to create your own fork of the source and then integrate his changes into your repository instead of trying to change it yourself. I will say that trying to compile with just that function will fail due to the logic inside of the function’s definition. It must be reliant on the rest of the changes listed in that github commit.
I can say however, after putting in the definition and a blank definition and compiling the source, the function does show up in the level blueprint.
Thanks for all the information. Really helped a lot <3. But one last question, when you are talking about compiling, is it when you 1st time Build in Visual Studio? <3
Compiling is synonymous with building when it comes to code terminology. Whenever you make any changes to code, you’ll need to compile/build to have those changes affect the end result, otherwise the changes won’t do anything.