How to create random parameters in override function


I want a struct (ST_GunInfo) to put the variables of another struct (ST_GunParmInfo) to create a random parameter system.
However, I’m having trouble because the structure (ST_GunInfo) is left as default.
What should I do? I’m Japanese and I use a translator, so I’m sorry if it’s hard to understand.

It looks like you never actually set it. Instead of making a struct, try Setting Members in one:

Not only will it assign value, but will also allow you to expose fewer pins → less mess. The ones not exposed are left unmodified.


Are you satisfied with this? But I’m having trouble with the same result.

Looks fine at a glance.

  • how are you testing it?
  • how are you accessing data of this struct?
  • how is this function executed?

・Tests are based on whether the type of bullet fired is a rocket launcher or a grenade launcher. (ST_GunParmInfo is Rocket Launcher)


・I think you are accessing it with an interface. This blueprint is a child. I don’t quite get it…

・It is set in the event beginning play of the event graph.

But you’re not accessing the struct variable you set:

image

・It is set in the event beginning play of the event graph.

It is not. The function never runs. This script does not do anything. This would set the value:

But if you’re doing this:

image

It’s enough to:

image

There’s no need to even return value.

1 Like

For some reason, it becomes Null and an error occurs. Is it because the target is an interface? What should I do?

Fixed the target! But it didn’t change…why…

I made it! ! ! ! thank you very much! ! ! ! !

1 Like

These are different:

Run the blueprint one, under Call Function.


More info:

1 Like