How can I get access to projectile movement when character use some item?



Hi, I’m recently learning UE4 at youtube. First, sorry for poor English.
I was trying to follow the UMG UI Inventory( UMG UI Inventory: Project Overview | 01 | v4.8 Tutorial Series | Unreal Engine - YouTube) and thought that I have to make bullet boost item to improve my UE4 ability.

So I tried to make it but it doesn’t work. First, I made my own projectile(Mybullet) and then tried to get its reference in my item(powerBoost) eventgraph, but when I simulate this, it doesn’t work and error occured.

This is error log : [Blueprint runtime error: “None was approached while trying to read MyBulletRef property.” Blueprint: PowerBoost Functions: Execute Ubergraph PowerBoost Graph: EventGraph Node: ProjectileSpeed Settings]

Can anyone help me to solve this?
What should I use to get my bullet reference?
Is my way to access projectile movement wrong?

Hey there @Rek0916! Welcome to the community! So that bullet ref variable you have is basically pointing at a specific bullet, such so if you don’t pass a specific bullet reference in to that, it won’t be able to access it as it’s not changing your bullet BP, it’s only looking to one actor, and then you’ll need to cast to it.

The way I’d go about applying buffs to outgoing bullets is to reference them and apply the changes on spawn. I don’t see your mechanism for spawning the bullets but I’ll give you an example of mine that let’s me get a reference to the bullet itself that’s spawned.

That basically instantiates a bullet, plays a sound, and then returns that bullet’s projectile movement. From there you can make whatever calls on the projectile movement you’d like.

1 Like

Thank you for the great answer, man!

1 Like