Hi I am new in unreal and sorry about my english, I am trying to pass the score from save file to actor blueprint “scorepassing” but when I am casting in level blueprint to scorepassing the casting always failed and i do not know why. Please help.! I try almost everthing
Where did you set your “ScorePassing” variable?
Hi
I promote this variable from casting ! now type is score passing but I try with actor type as well and the result was the same
and its in level blueprint
Yea but this is just a variable. Think of it like in math.
Right now you have an X and try to calculate with it like a number. But X just stands for a number and isn’t actually one. So if you try to ask if that’s a 3 it will always say “No” because you only have the variable.
If you’d try to call a function from this variable it’d give you an error (“Accessed None from …”).
You have to fill this variable somewhere.
Thanks ,
I know what you mean but I have no idea how to do this
You probably should stick to tutorials and just modify those slightly before wandering off to your own projects.
Blueprint doesn’t require you to code in the traditional sense but it applies exactly the same principles and you need to know and learn the structure.
What you are trying to do and failing at is basically Object Orientated Programming (OOP). A common concept but it requires a bit of work wrap your head around it.
Since you’re completely coding inside of the level blueprint it’s probably better to first stick closer to working projects which you assemble piece by piece like someone else and then move on to something like this.
Really no offense but coding does require a certain degree of knowledge to do it properly.
If you still want to continue: Since your Score passing is an actor you have to spawn it in your level and save the reference. Though you probably want to use a savegame or something like that instead.
Hi!
Sometimes casts don’t work for me either, but I can usually get them to work when I do them with a loop like this:
I don’t know if this will help but I guess it’s worth a try.
Hi,
I solve the problem, thanks anyway.
PS
Do Not Stres