I have been able to increase the speed by set amounts per item, for example if you pick up Item 1 the speed increases to 200 and if you pick up Item 5 the speed increases to 400, but in doing this if you pick up Item 5 first the speed will jump to 400 and then picking up item 1 will slow the NPC down to 200
Does anybody know which nodes I can use or anything similar to achieve this?
inside of your custom pawn/character class:
if you right click anywhere in the event graph, you get a search box with a list of nodes. if you type an asterisk * it will narrow down the search options to all the different multiplication nodes. the one you want is:
float * float
then you can make a new variable called speed. on the left of the event graph, there is a list of the member variables of the current blueprint, and under the compile button, there is an “add variable” button. click on that, type in the name “speed”, then in the details panel below the variable list, you can change the variable type to a float. then you can drag the variable from the list into the event graph working area, and it will ask if you want to get or set the variable. you want 1 of each, so you can get it, multiply it, and then set it.
now you just need the overlap event… and you will need some casting to make sure its the right type of pickup, and there may be some setup that is hard to explain with words, so here is a video instead: