Download

Noob BP question about making a simple power-up.

Got a noob question pertaining to Blueprints.

I’m doing this tutorial on a simple pickup. It allows the player to run over a pickup and increase their speed and jump height…

I modified it a bit from the tutorial…

Here’s my BP.

b52ae4dc0b4c22ad440e98afc433aee1c2e3dc34.jpeg

My question is; what nodes would I use to make the power-up reset itself? For example, like this pickup only lasts for 10 seconds??

Looks like I found a solution:

Well, sort of, I still don’t know how to make the whole thing respawn again…

Not the cleanest version though.

Also: You only need to cast ONCE. Casting is kinda expensive if you do it that often everywhere.

Cast once and set all variables from that one CastNode Return. Even better would be having a Variable that you
fill from the Return Value of the CastNode and then using the Variable to avoid all these nasty wires.

Though make sure to use “IsValid” on the Variable, because it could be that the Character got destroyed during the time the
power takes before resetting the Players stuff.

You could also have a look at Timers instead of a delay. Just to make things cleaner.

And don’t Destroy the component. This will just get rid of the Mesh and not of the Actor.
Hid the Mesh and destroy the actor once the Power resetted the Players stuff.

Check out Marcos Romero’s Blueprint Compendium for a few awesome nodes (like Timer):

Hey, Thanks for the help, it’s much appreciated.

I’m attaching a screencap of my updated BP.

Keep in mind, I’m super new to BP, so a lot of what you’re writing is a bit Greek to me at the moment.

I circled in red the timer. I did a search and found a bunch of timers and wasn’t really sure which one to use…

I’m also a bit stumped on how to make the power up reset itself?? :confused:

Sorry for my noobness. :slight_smile:

I will post you a small solution + explanation tomorrow. (3:49am in Germany right now).

Just tag me here with @eXi, so I don’t forget it.

Danke. :slight_smile: Will do… @eXi

Here you go. Hope that helps. If something isn’t clear, just tell me.

http://puu.sh/ptvCj/19946f3f87.jpg

Awesome! Thanks so much for doing this, I appreciate you explaining what each node is doing, some of the tutorials I’ve been watching never really explain the reasoning behind them…

Here’s what I got. I made it respawn again after the Custom Event node… It works in game. So, I think I did it right. :slight_smile:

f1755cdc0f45651f281e504b260ec73187509530.jpeg

Exi, dude, big thumbs up for that level of help. Nicely done.