Connecting an interface into set timer by event

I have an interface named launch

That is connected to a timer by event.
Begin play call the launch event.

But: launch interface cant connect the red delegate into the set timer by event. which seems to cause it to not work.

How do i connect the interface event into a set timer by event ? thank you.

you can’t connect a declared interface event to a new event, but create a new one simply.

Event Lauch is already connected to interface and will fire, you want a delay and after that what happens is a new event.

1 Like

I did as your example but it still only fired once
Do i have to call DoLaunch from the outside or do anything else?

There is a loop option if you want over the timer.

Not at all calling Launch at begin play example will fire DoLaunch as expected.

What exactly are you tring to do? :smiley:

1 Like

Its a logic placed on an arrow. right now i focus on moving the arrow using launch interface (different arrows have different fly behaviors)

For this part, Arrows is being spawn, staring the timer which movs it (moves works with tick for testing)

This is the only thing that works and makes the event repeat itself (setting looping in timer dose not help). is this even ok to do ?

any other connection will not work.

I don’t use timers, but this probably means a signature mismatch in function.
Meaning: the “event” on SetTimerByEvent has different function parameters than “EventLaunch”.
(a timer does not provide argument FRotator SetTargetRotation)

2 Likes

What is happening in launch sequence? you adding force etc?

1 Like

Can you elaborate on that? SetTimerByEvent has no parameters at all. i removed the rotator input, just to simply things, make it move on a given rotator. if i connect that code to tick it will work (fly forward). Or, if i connect both events to it like in this screen shot

Only the connections i showed above are working and i dont know if that is valid unreal-wise.

just adding movement over frames. It is working if i connect both pins or tick ofc

So I just felt that maybe you are trying to add physics impulse to arrow projectile, with very little (almost tick) timer loops.

If thats the case you don’t have to telling just to get you ongoing with your quest.


You can just make an actor arrow.. add a projectile movement component and its speed.

You can do many more things with ease, you can extend its logic and so on.
If you want an accelerating arrow lets say you can add velocity etc on tick but you don’t have to make flight movement by hand ( if you want to make it by hand its ok too)

You can shoot to look target like this as example assuming its first person.

PS : just saw your last message and yes you are making a projectile trajectory flight with basically no gravity manually. You can just add velocity and set gravity zero at the component.

The method (event) “Launch” has a parameter SetTargetRotation of type FRotator. If you want to call that method anywhere in your code, that method expects to be given an argument (the value, of type FRotator) for parameter “SetTargetRotation”. The timer does not provide this value, so trying to bind it as event to the timer is rejected. This is what’s called a signature mismatch in Unreal.

1 Like

(post deleted by author)

Thank you for the detailed reply.
But even after i removed the parameter from the interface, its still does not play constantly, only if i connect 2 of them

Thank you for the suggestion. for this game i dont need the arrow to be a projectile. I just need to be able to write any behavior i want after the timerEvent and have it play over time. this arrow is simple and just fly on the direction given. Other arrows will be “magic” and could do things that are not common for a straight direction projectile

What I see is that you try to create a loop with two events, (valid, not proper), because the timer offers a looping checkbox. What confused me is that you say checking “looping” does not work. Question is, is that the case and why?

1 Like

you can do like this, I just copied your variable names etc. Hope it helps.

Still suggesting to look on movement component sometime when you have.

1 Like

Now that the parameter is removed, i tried again it didn’t worked.
But this did worked for some reason, i really don’t know why:

I just did the same and posted without looking at this image. apologies. why this do work tho ? its kinda confusing

this is correct

  • Edit, for that example, you also want to multiply speed by World Delta Seconds to make it FPS independent.

  • Edit 2 oh yikes, I apologize for the confusion I caused here. The timer runs per X second (not frame based), so my previous edit does not apply.

2 Likes

I know that delta time is output from tick’s output, but, how can i use that to multiply the movement ?

Thank you both @Roy_Wierer.Seda145 and @RedGrimnir for your kind help.