Download

How to make function repeat inside the class

Hello guys,

I’m making a weapon system of classes as follows:

Pickup
[INDENT]MasterWeapon[/INDENT]
[INDENT][INDENT]BaseAR
[INDENT]M5A9
BaseSMG
BasePistol[/INDENT][/INDENT][/INDENT]

And each type of weapon is going to inherit from it’s proper parent. I have a function called Shoot that is overriden by each of the base classes where I want to define the base functionality for each type of weapon, or a weapon specifically.

So I set up a function to call a simple shot (RayCast) and it works fine. So I setup in my Character class to call the function with a delay when the mouse is held. But I want to put that functionality inside the Shoot() function in my BP but it seems I can’t call the “Retrigarable Delay” node inside my Weapon Class function.

I also plan on converting it to C++ code. Is it possible in C++ to create a timer inside a custom function?

You can’t call any delayed nodes in functions. But what you can do is call a custom event from a function which has a delay in it. Afaik at least.