Hello, i got a bit stuck on how to call a function from another actor in my blueprint…
idea being u pick up items, add then to ur inventory, deppending on their order in the array, their repective functions should be applied (preferably with settings on items too such as customizeable timers)
then my idea was(but i cant figure out how to do it ofc :D): player shoots a projectile > projectile blueprint feeds infomation into a function from an actor attached to the player, that represents the item with the function in its blueprint, and execute the function > then calling the next item, and so and so on, until no more items exists in the array of items to activate
would really appreciate any help, if u guys have any
So! As far as calling a function from another actor, you can use “GetParent” if the calling actor is spawned by another actor that you actually need the function from, and I really suggest using an Event Dispatcher for this! Event dispatchers are the #1 thing I think everyone should learn extremely early for this reason alone. I’m not quite understanding what it is you’re trying to do so I can’t really walk you through it, but please, read the documentation on them and if you feel you don’t have a handle on it, do the quick start tutorial! I can’t stress enough how important these are, and I didn’t learn them until far too late!
Thanks a bunch pretty sure u gave me an idea thats gonna work with spawning the next item as a child, then activating its function, spawning the next item as a child to do the same
in case ur curious, im trying to make a “programable” projectile sort of, where u pick up items doing things to the projectile midflight after a time/distance… pretty much any imaginable effect u could put on a projectile in any imagineable way for example if u like many explosions, u could put this on ur glock and just “25 bombs appeared”