0
\$\begingroup\$

I want to create a modular weapon system. I already got most of it working, but I wonder how to make an improvement.

Weapons in my game have different firing modes (semi and auto) and "bullet" modes (projectile and hitscan). Each weapon is it's own blueprint, and there I can select proper one in editor, so for example an Uzi would be auto / histcan, while a rocket launcher would be semi / projectile. (the firing mode actor gets created at spawn from the class selected in editor).

I want to make it easier to edit by giving the weapon some variables, like spread and projectile blueprint. But not all of the variables apply to all the types of weapon...

TLDR: Can I create / show different variables in the editor, depending on other variables? If I choose projectile type of weapon, can I also select the projectile type, but not show the option if I chose hitscan?

\$\endgroup\$
0
\$\begingroup\$

Yes you can, Take a look at EditCondition meta specifier in UPROPERTY.

Here is a UE4 forum post about it. https://forums.unrealengine.com/development-discussion/c-gameplay-programming/25256-how-do-i-enable-disable-controls-in-my-blueprint-details-panel-via-c

\$\endgroup\$
  • \$\begingroup\$ Thank you very much. I will check it out in the morning! \$\endgroup\$ – lilKriT Apr 21 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.