x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Child Actor 'Event Tick' not executing

I have a script setup in child actor. It's using the 'Event Tick' node so it should run every frame. However, once I started game, I noticed that there is nothing happening at actor. I thought that I may have set something up wrongly so I added some string prints(for all the cases). However, nothing printed on screen. That made me sure that it's just not being executed. So now my problem is - how to get the child actor's blueprint code to get executed? Is there a specific node that I must use in the owner actor or some checkbox that I missed in child actor's settings or somewhere? Or is it just a bug?

Product Version: UE 4.12
Tags:
more ▼

asked Jul 29 '16 at 11:03 AM in Blueprint Scripting

avatar image

adriansnetlis
81 13 17 23

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Another problem may be that your parent class has an event tick function (empty or not) and that is overriding the child's event-tick function. Since you can only have one event-tick function, check to make sure there isn't both one in the child and one in the parent.

more ▼

answered Jul 29 '16 at 10:42 PM

avatar image

samnater
241 8 9 12

avatar image adriansnetlis Jul 30 '16 at 06:55 AM

What? And what to do to execute script every frame for both of graphs - child and parent?

avatar image NoobsDeSroobs Jul 30 '16 at 07:29 AM

Every tick in the parent, call a function MyTick in the child. You make this function MyTick yourself.

avatar image adriansnetlis Jul 30 '16 at 08:56 AM

So here comes my next question - can I execute a function that belongs to a children? If not, than can I get children actor's variables in parent?

avatar image NoobsDeSroobs Jul 30 '16 at 09:22 AM

Of course you can. Just drag out a reference from the child and write the name of the function. Then you have called it.

avatar image adriansnetlis Jul 30 '16 at 03:43 PM

The function doesn't show up there.

avatar image NoobsDeSroobs Jul 30 '16 at 06:16 PM

Di you make it public? If you did it should be there.

Remember that you cant call the actor component or just the actor. You have to cast the actor first.

avatar image adriansnetlis Jul 30 '16 at 09:48 PM

I'll look at it more and tell you how's it going;)

avatar image adriansnetlis Jul 31 '16 at 06:25 PM

Hi! Casting allowed me to get to the function, however - it still didn't solve it. I add the function to be executed every frame, but it just doesn't execute. The string isn't printing and line trace isn't showing the debug. I tried both - play and simulate modes.

avatar image NoobsDeSroobs Jul 31 '16 at 06:27 PM

Can you show me the functions? Full screen shot please. Just puush them and send link them here.

avatar image adriansnetlis Aug 10 '16 at 12:13 PM

I'll do it once I get a moment...

(comments are locked)
10|2000 characters needed characters left

Check if you have enabled the actor to tick. From EventBeginPlay execute setActorCanTick to true. It might also be called something like enableActorTick.

more ▼

answered Jul 29 '16 at 11:05 AM

avatar image

NoobsDeSroobs
2.7k 106 34 176

avatar image adriansnetlis Jul 29 '16 at 09:29 PM

Oh, that's something I didn't knew. I'll accept your answer once I get it tested;) EDIT. Nope, it still doesn't execute the tick.

(comments are locked)
10|2000 characters needed characters left
more ▼

answered Jan 14 '18 at 07:25 AM

avatar image

Katianie
151 27 20 29

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question