Does someone know how to get access to another script, so i can (for example) edit the variables in another script? I tried to make it a public class, but it doesn’t work. UE4 scripting is almost completely different from other Engines i know ^^
Ok, i think that’s a bit too little information. So here is my situation:
I have a key in my level that the player needs to pick up. So i made another script for this key and gave it a mesh, a sphere collider and a text component. Now I want, that the player can pick up the key, only if he overlaps with the sphere collider. Then he should press ‘E’ and pick up the key. ‘E’ is considered here as a general action button (open doors, pick up things, and so on).
So how would I achieve this the “Unreal Engine” way? The player + keys are written entirely in C++. No Blueprints were used.
Everything works fine, but i don’t understand how to handle this with the action key. I made a test in Blueprint and it worked, but i want this game to be more C++
If you need more information let me know please!
Thanks in advance!