My problem seems to be quite a simple one,
as my casts ALWAYS fail and I think its because I just dont really know what I am supposed to cast.
I am usually making a reference to self.
Example:
I want my weapon to start firing when the Action “InputActionFire” is called by the hero, and therefore I made a tick and then casted to the hero class ( self). After that I “got” the variable I set aside for that and checked it with a branch… the cast fails tho
If I could find one ■■■■■■■ decent explanation of casting I would have figured this out about a month ago. For one thing whatever your saying doesn’t work. The array goes somewhere, then you have a node out of that into “”. Well how do I even get that. How do I get from out actors to ? I’m becoming more and more convinced they make this hard on purpose so no one will compete with unreal tournament.
when I do that it comes up with this (The current value of the ’ Array ’ pin is invalid: Array inputs (like ‘Target Array’) must have an input wired into them (try connecting a MakeArray node).)please help
when I do that it comes up with this:
(The current value of the ’ Array ’ pin is invalid: Array inputs (like ‘Target Array’) must have an input wired into them (try connecting a MakeArray node).)
I think that this is the hardest concept to grasp, yet seems the most common sense, with oriented programming.
A lot of the struggles I have when I am trying to code on my own go back to casting. I know I need to cast to get a reference to another BP, I know that I can make a reference variable to call from once I have casted… But… Before you can truly cast… You need that ‘’ input taken care of.
Easy enough when it’s just ‘GetPlayerController’ or ‘GetPlayerCharacter’… But when you try to reference one of your custom objects… That’s where my brain shuts down.
, this helps me so much with so many situations. Thank you! Great post!
For more in depth look at this subject check out the first video about casting and the 2nd last one about creating references I think it will help clear some stuff up if you are having any other troubles
You took my “nobody explains this well” as me saying nobody put the effort into explaining this well but thats not the case. Truth is it’s a difficult concept to explain well as is evidenced by how many posts there are with the same question saying they all did the research but still cant understand it. But yeah be frustrated with us, makes us feel all warm and fuzzy opening up to the community for help!
Try these videos I made going over the whole concept of casting. First video I believe in the Playlist and the one about reference is also useful for understanding the concept.