Event Begin Play + Get All Actors Of Class + GET + Cast to My Character.

I was watching this:

At 6:48 he starts a reference from “My Character” in another blueprint and puts in:

Event Begin Play + Get All Actors Of Class (Chooses “My Character”) + GET + Cast to My Character.

Joins them up.

If I do, I can not get the reference “Set ##### Alive”, but can if I replicate this in “My Character” BP.

Any Ideas?

in 4.6 you need to set variables to public, do this by clicking & opening the eye to the right of the variable making it a public variable. (something new for casting in 4.6, they probably did this because casting was accessing private (or local) variables)

also @7:12 make sure you pull off the blue pin of cast to mycharacter & promote to variable so it’s an object of the MyCharacter class as well.
(he also moves down in the event graph to set the Boolean variable ‘BisDiscAlive’, so make sure you are pulling/putting it in the right spot)

mainly check to see variable is set to public first, just from a quick look that might be the problem. (4.6 thing)

I haven’t done this tutorial but I hope this helps, n good luck

Thank you . Will go through that when I get home from work.


Seem to be able to get “Get” but not set. May need to look into it further

Weird, can’t really think of any case that should happen, but…

just in case look back and step thru starting around 6:50:
***make sure you used GetAllActorsOfClass (not just some actors, lol) & check the drop down list & make sure you have it set to the ‘MyCharacter’ Class(‘Or’ whatever you named your character or class that has the variable in it)
this is an easy mistake to make if you click out of it too fast etc. it doesn’t get set and the rest fails.
***and make sure you use whatever your character class is in the cast to the name of your character, if it’s actually MyCharacter BP then use that, the reason I said to check it is because I used another name & still had the MyCharacter BP in a project I was messing around in the other day & actually made this mistake and casted to the original MyCharacter BP instead of mine.
*** make sure you drag out from the blue pin of the cast to mycharacter node and promote to variable (or I think you can just right click on it & promote to variable too) this sets this variable to the MyCharacter object type
*** when you right click n get the character reference (the promote to variable from the cast you just made) pull off of it and just type DiscAlive (this way if there is any misspelling->whatever variable you did create should show up)

I know this sounds redundant and a pain but best way to step back thru it, often it’s just a mistype or some little thing that messes stuff up. It’s really easy to do especially when trying to follow someone else’s work. Also take your time when you are stepping back thru your code, it’s so frustrating when something doesn’t work right that we get in a rush & I have even overlooked some simple mistake 2 or 3 times.

It’s always the little things that get ya! :wink:

Seems I have applied all theory correctly.



This is what I get


But I do get this every time I change a node before I compile and did not see this in Tutorial. Example, I made a random Variable.





Delete a fake Variable

Forgot this one


are you talking about those errors popping up when you add that variable but they disappear after you compile & save your BP?
(other than that it does looks setup right -> note: after you pull off that character & set the character object reference if you click on same variable on the left you should see it set to that class you created it from, in this case probably should be MyCharacter type variable)

but if those go away after compile just continue with the tutorial. if you can now set that variable from the (get) character reference around 7:20 in that video ya should be fine

let me show you something:
is this what you are worried about - TADA :slight_smile:

it happens while it’s trying to figure out what i’m trying to do, lol. already existing/ working project added variable & this happens until I compile & save.
Lights up like a Christmas Tree!
And Just in Time For Christmas too! lol :cool:

Ok, that help, I thought it was nothing, just was not sure if it was a noob mistake.

hopefully you should be fine now

yeah those errors Christmas Tree’n like that will scare ya to death, I felt better after I saw it happening to the UE4 devs doing tutorials tho’. lol

ps: always be careful when you change names or something while doing tutorials I do it all the time but it’s the first place that mistakes can happen

Still unsure why I can get “Get” but not set. Redoing the entire TUT again :frowning: