Killed By Actor Set Node is not compatible with ON DEATH CALL EVENT, what do I do?

I’m using Version 4.14 of the engine, upgraded from 4.12… The Problem in Detail:

I’ve Come across a strange issue. The Blue Pin on my Set Killed By Actor Node is not linking up with the ON DEATH CALL EVENT node and I don’t
understand why because the Set Killed Actor node has been set to actor for the variable type so the pin should work. But why is On Death Call Event
not accepting the set actor pin ?

Does anyone know how I can fix this type of problem?

The On death node is found under Call Function so I don’t think its a custom made node.

On Death appears to be a custom made function or event within the Master Enemy.

On death says “Target is Master Enemy”, so it’s a function of the Master Enemy class.
The event AnyDamage returns an actor, so you must cast the actor to Master Enemy.

The Set Killed By Actor pin will not link up with the On Death Custom Event. .So to try to fix that I clicked on the On Death Custom Event
function to see what is going on with the pins. There was no inputs on the node so I added in another input pin and called this pin Actors
and set it type to actor. Now that fixed the Problem with set node now links up with the set killed actors pin, whether that’s fixed the problem i don’t know because its no longer using the default blue Target pin no more because I don’t know how to change the default target pin, it dosen’t
show up under the inputs.

Compiled and saved, another Error pops up, further down in the blueprint where the On Death Red Event node starts I and found now the actors Pin being incompatible now with the Get Current Montage node. So I fixed the Montage by adding in another pin input to the On Death custom Node and Changing the Pin type to Third Character Reference Type. Now the Montage pin connects up to it. I hope that I picked the right type pin.

But now that I added in the extra pin inputs to the On Death node, now a nasty red cast error has shown up on Third Person Character node which I don’t know how to fix because I don’t know how to fix up cast errors yet.

Stelnar1, I don’t don’t know anything about fixing up errors in cast nodes,

Its giving me a whole load of technical jumbo that I don’t fully understand. So i will just show the screeenshot.with the cast error.

I don’t know how to fix that specific error.

I suggest you undo everything you wrote in reply #4 because it doesn’t make any sense.
I’m not sure where to start, but let’s start with calling functions.
Lets say you have a ball class which has a function (or event) called Bounce. You set it up so that when ball A collides with ball B, you want to call the bounce function of ball B.
(note that in your setup, it’s kind of the reverse, ball B - the hit ball, calling ball A, but let’s forget about that for a bit).
This is where the Target node comes in. It is there to determine what instance the function is called on.
As Ball A collides with ball B, ball A gets the reference to ball B and can then call the Bounce function on ball B. In order to do that, you would connect the ball B reference to the bounce function. It would now execute on ball B.
If you did not connect ball B to the bounce function, the bounce function would execute on ball A, because the target is self.

But there is a step I am leaving out. Let’s say that we use this “event any damage” event to call the Bounce function. Well, the event provides the damage causer, but it is an actor. We can not drag the actor pin to the Bounce function because the Actor class does not have a bounce function. In order for us to get the ball B reference, which is currently being treated as an Actor, and access any functions or variables inside the ball class, we must cast the reference as that class, Ball.
Exactly what goes on under the hood I don’t know, I’m not a programmer. It’s something called polyphormism.
So we grab the “damage causer” node, and cast it to ball. Now we can call the Bounce function.
That is what casting is for, to access variables or functions inside that specific class… But there are a couple of problems.

First of all, maybe there are other classes out there in the game that can do damage to the ball. In those cases, we then cast to ball, it will fail. Maybe we can add a query, asking, well is it a football player? then cast to football player. but then maybe there are more classes and it becomes a mess.
In these cases, you would use an interface.
So whenever a ball takes damage, send a message (which is something the interface does) and execute the bounce function. If there is a bounce function, execute it. If not, then fail silently without any errors. For more information on interfaces, go to the docs because I’d be typing all night if I were to go into interfaces.

Still, there are two more important point I want to give. Say you have a character that shoots a bullet, that hits a character thus triggering the event any damage. The Damage Causer is the bullet. The instigator is the controller that shot - assuming you passed that controller reference into the instigator when you spawned the bullet.
If you want to give the killer +1 to kills and a lootbox, then you want to use the instigator.

So, let’s look at what you’re doing here. You’re taking what I assume is the instigator, and… call the death function? that does not make sense. You would want to run the death function on the actor that was hit, ie this actor that has the event any damage. So the target should remain empty. Unless I’m missing something from your setup.
Now, about adding these pins to the event. Why? what are you doing with them? I mean, it works to pass a reference into a function, so you can do stuff with that reference. But it’s just sitting there empty, right? Just undo the actions done in that reply. As for the cast node, you’d have to show the full setup, I have no idea where that input is supposed to lead. Did you just add that cast node or was it there before?

Well, don’t wait for a reply from me for at least 9 hours.

The code was done in following the set up in the Video Quest Series tutorial on you tube, but I ran into a problem. The cast pin on the Cast to first Person Character was not compatible to the blue target pin that’s on the Add Experience Points Node Function next to it. So I had to change the Cast from First Person to Third Person in order to make the pin fit… That solved the pin target problem, it now links up, but when I hit compile, up pops an error saying it won’t cast to third person pawn. i don’t understand why this cast error is popping up. Because I am not technical with this engine. I only know how to follow what I see shown in the video tutorials. But something went wrong somewhere.

Under project settings My game is using third person pawn class not the first person pawn class
because most of my widget stuff is all in the third person blueprint and that’s why I changed
the cast to third person.

That error is caused because you are casting to the character bp but haven’t specified the character object . Whenever you do a cast you always have to specify an object type that matches what it is you’re trying to cast to. For instance if I wanted to cast to a gameInstance class the object would be “get gameinstance” in you’re case Drag out from the pin and type get player character . That should fix the error . And maybe do a google search for casting both c++ and bp so you can try to understand what is going on it will help you to Avoid these simple bugs in the future another good tip is to always put a print string on the cast failed node that way when you get these type of errors it is easier to see why because when the cast failed it will fire off you’re custom print string node message

Ok I dragged get player character off from the object wildcard pin on the cast node and that has now fixed the error, thanks for helping me fix that error…

The other frustrating problem I’m still having which hasn’t yet been resolved, I can’t get a simple data text table to read into my widget, the widget only works with reading text only in from within an array struct list. I do not understand why the data text table node is not reading it in.

Something stopping the widget from displaying the text, because all I get is a blank screen with no text.
.