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"

Anim Blueprint Cast BP message error but works?

Hi,

I have some issue, well, it is working but I still got error message (telling me it is not working...). It is for a AI character.

I have an anim blueprint, in which when actor is moving turn on some particles/lights, when it stops turn them off. See screen, but what I do is in the anim blueprint I get the owning pawn cast to my BP actor and from there get my light/particles then on condition isMoving turn them on or off.

If I put my character BP inside the level, and play it, all works and no error. The AI pawn is acting and working with no error message. Lights/Particles turn on and off when needed.

If I spawn the BP after the level is loaded - when the player request a spawn - the AI pawn is still acting excactly how it should, lights/particles turn on and off when needed BUT i got an error message (see attached screenshot).

I am not quite sure why, it seems it can't load the particles and lights from the variables of my cast. But even thought there is the error message, IT WORKS.

Wondering if anybody has any idea why. Should I just disregard the error?

Also, if it helps, the error only show once. The first time it spawn.

Thanks.

Product Version: UE 4.13
Tags:
animbp_001.jpg (222.9 kB)
animbp_002.jpg (102.4 kB)
error.jpg (33.6 kB)
more ▼

asked Jan 16 '17 at 10:02 PM in Blueprint Scripting

avatar image

CAPTGameEngine
3 2

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

2 answers: sort voted first

Firstly: Never disregard errors and warnings. Always fix your project errors and gracefully handle them. Very little warnings could be considered OK, but fix them if you can.

Secondly: "Also, if it helps, the error only show once. The first time it spawn."

That tells me it's a race condition or you are trying to use variables before they are properly set.

The error in your screenshot says it all. Your two variables, PointLight and FX_Robot_Reactor are not set to object instances when you attempt to access them (you're calling SetVisibility and SetActive on them.

Before you call SetVisibility and SetActive on those two variables you shoudl pass them through an IsValid? node to make sure they are valid objects before you use them.

more ▼

answered Jan 17 '17 at 01:59 AM

avatar image

elitereloaded
694 24 24 55

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

Hi Elitereloaded,

You were right! Using the IsValid? fixed the error. I believe you are right, it is just going through it before it is setup.

Thanks for the quick reply and help!

more ▼

answered Jan 17 '17 at 02:31 AM

avatar image

CAPTGameEngine
3 2

(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