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"

Tick is never being called even though CanEverTick and StartWithTickEnables is true

Hi all. I have been having this incredibly annoying issue where it seems that my tick for an actor is never called. I have a function called within the tick that is never triggered and a print statement in there also which never prints saying the tick is being called. I've been searching online for days and everyone says to enable CanEverTick and StartWithTickEnabled but nothing seems to be working with my project. I have even created a new project and tryed just printing out a line and it doesn't even work in there either. If anyone has any ideas or has a method of checking to see if something has finished every frame that would be amazing!

Thanks in advance

Louis ,

Product Version: UE 4.11
more ▼

asked Jun 04 '16 at 01:51 PM in C++ Programming

avatar image

18 3 5 9

avatar image ryanjon2040 Jun 04 '16 at 01:59 PM

Are you trying to make the actor tick in game or editor?

avatar image Muffinlasher Jun 04 '16 at 02:04 PM

In game when I run the game. Not getting any prints to the screen or anything when I run the game that are called in the tick.

avatar image ryanjon2040 Jun 04 '16 at 02:09 PM

Can you post your header file and source?

avatar image Muffinlasher Jun 04 '16 at 02:34 PM

Unfortunately my internet is down ( Having to use mobile ATM ) so not able to send full source but I have taken some photos of the code. Please find the link attacked to them :) https://imgur.com/a/soWsi![alt text][1]

[1]: https://imgur.com/a/soWsi

avatar image Muffinlasher Jun 04 '16 at 03:12 PM

I did try attaching the images direct to the page but it keeps erroring when I press accept in the image.

avatar image ryanjon2040 Jun 04 '16 at 03:17 PM

Maybe try changing float DeltaTime to float DeltaSeconds in source file? Other than that everything seems to be good.

avatar image Muffinlasher Jun 04 '16 at 03:21 PM

This didn't work unfortunately. Like I say I have tried even using a different project and the same issue occurs so not sure what exactly is causing it not to run.

avatar image Gigantoad Jun 07 '16 at 02:49 AM

Same here. Just converted an old prototype to 4.12 and my custom C++ pawn's tick method is never reached. Tried

     PrimaryActorTick.bCanEverTick = true;
     PrimaryActorTick.bStartWithTickEnabled = true;

but nothing. Pawn works fine otherwise, gets input and my movement methods are being called. I have a BP inheriting from this C++ pawn and on that i have set "Start with Tick Enabled" as well.

Not sure if this a bug? Although if it's been there since 4.11, surely people would have noticed long ago.

avatar image Gigantoad Jun 07 '16 at 03:08 AM

So I tried a Tick node in the BP and that doesn't work either. What does one have to do these days to get there actors ticking?

avatar image Muffinlasher Jun 17 '16 at 08:01 AM

Still now work around yet!! Really need a work around for this as its stopping me from do anything that i need to do!! Does anyone know any other way to have a function called every frame? PLEASE

avatar image rantrod Jun 17 '16 at 09:48 PM

The above link doesn't work anymore. Can you share the code? Normally those two calls is all you need (along with the declaration "virtual void Tick( float DeltaSeconds ) override;"). Is it a spawned actor or a placed actor? As a long shot, you can try deleting the actor from the level and placing him there again, then run it and see if it works.

avatar image Muffinlasher Jun 19 '16 at 01:19 PM

Yeah no worries the code i am using to call the tick function are below


     PrimaryActorTick.bCanEverTick = true;
     PrimaryActorTick.bStartWithTickEnabled = true;
     PrimaryActorTick.bAllowTickOnDedicatedServer = true;
     Mesh = CreateDefaultSubobject<UProceduralMeshComponent>(TEXT("Terrain Mesh"));

Tick Function its self:

void ATerrainActor::Tick( float DeltaSeconds) { Super::Tick( DeltaSeconds );

 FString floatval = FString::SanitizeFloat(DeltaSeconds);
 GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, *floatval);

 GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, TEXT("Ticking"));


avatar image rantrod Jun 21 '16 at 09:54 PM

If you're using a blueprint which derives from this actor, did you check the BP "Class Defaults"->"Actor Tick" section? The BP has its own checkboxes for "Start with Tick Enabled", "Allow Tick on Dedicated Server", and "Allow Tick Before Begin Play"; make sure they're all checked.

avatar image Gigantoad Jun 19 '16 at 03:15 PM

Just fixed it for my project. Turns out "Allow Tick Before Begin Play" was the culprit. In my BP derived from my custom C++ pawn I had to set that to true or else neither BP nor C++ would ever tick.

A bug or by design? I don't really get what sense it makes to tick before BeginPlay, but then to have it result in not ticking at all unless set to true is another level of strange.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

If you're overriding BeginPlay, make sure you put Super::BeginPlay() in you're overridden BeginPlay() function. Also do the same for Tick(DeltaSeconds) with Super::Tick(DeltaSeconds).

It fixed my actor not ticking for me inexplicably.

more ▼

answered Jun 21 '16 at 10:22 PM

avatar image

210 12 17 24

avatar image xiuxiu Aug 17 '16 at 02:36 AM

Your reply helped!

Thanks, brandelan and everyone here.

avatar image Kory Feb 13 '17 at 12:58 AM

Geez, I'm an idiot, if I had to cut off a finger for every time not calling Super has wasted an hour of my time I would not have anymore fingers, thanks for the obvious!

avatar image jbl2kz Dec 09 '17 at 03:41 PM

I just had the same issue, but everything mentioned above checked.

In my case, my Blueprint subclass, the one that is actually being spawned in the world, had its tick disabled in BP. Worth checking if you're googling this.

avatar image Katianie Jan 14 '18 at 07:25 AM

Solved my problem, In my case I was calling super for every other function BUT begin play. Once I added that, the Tick stated working.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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