I am struggling to understand logic of blueprints. I am completely new to coding and did very basic coding in C++ long time ago. I have watched many courses and trying to follow Pinball game course but unable to understand most of the logic. Can learning C++ first will help to understand logic better? Can anyone recommend me better learning path.
Bump.
any one? any course which you recommend?
I am completely sure that unreal is a really cool place to learn to code.
A lot of tutorials lack of global informations and a proper path of understanding, its normal,
i watched a whole 75 tutorial playlist on youtube for ending "Not Understand the Basis " XD
Sometimes people suggest to pick up a little project and study to make it,
face problems and solve them will take time but you will understand a piece at time.
Whats the hard part for you?
The blueprint in unreal is very simple once you understand them
You have the Flow nodes (that choose what part of code is done)
the Function and Event nodes (that define what happend and when)
the variables nodes (that contain the variables)
last but not last, the inputs (The keyboard or mouse signal to interactively use the program)
Well is pretty simplify but its almost all here XD
Let me know if i can help you with something
It is a unique question. We each have different backgrounds. I wouldn’t approach a full game from the get go if you are having trouble wrapping your head around the logic implementation. Try small projects of getting things to function and expand from there. The best way to learn is to try giving yourself a small challenge. Sometimes it takes a few visits to the drawing board before we realize the simplest idea that the engine can achieve.
There are plenty of YT videos by epic and other experts. Try one that looks easy, then see if you can do it (not a full game). You’ll learn about lot with simple things like getting a light switch to work or spawning an object. Don’t sweat full on courses for now, get familiar with the engine by playing around.
Thanks Guys. Sometimes it feels like piece of cake with simple lights turning on and off. But when it comes to adding scores and referencing it with multiple objects like in Pinball game i lost my self and feel like i am at wrong place.
Hold on man,
the path is difficult but the price is a pile of methaforic gold
Referencing is quite the whole thing. think to unreal as a Box playground,
the level is a box,
every actor-blueprint you drop in, is still a box.
Actors, pointlights, skybox, staticmeshes, all become Pointlight-Actor , StaticmeshActor…
But all them share something,
The base class of Actor.
So there is a Generic Actor, ** and a lot of sub-type of actors**… pointlight_actors… StaticmeshActor…
and all these actor can be “spawned” multiple times, so you will have **Specific Actors **, of some type actor.
You can get the reference to these actors , by :
"Get all actor of class " is a node that will search in the level , all actor of a certain type (giving you an array, search this !)
“Collisions” … you can seet up collisions to detect when 2 actors touch, and release a event hit or overlap (Search for them)
“Linetracing” … you can ask unreal if there is something along an imaginary line, like path of a bullet of a gun, if unreal find something will give you the reference (search linetrace !)
“Variable” … when you spawn an actor in the realtime of the game, you can save him in a variable, so that everytime you want to do somwthing to him, you just use that variable as reference.
here an example https://docs.unrealengine.com/en-US/ProgrammingAndScripting/ProgrammingWithCPP/ReferenceAssets/index.html
Some of these ways, will give you an Generic Actor reference,
So you will have to check what “” Type of actor is “” or use the** " Cast to CustomActor" **node to execute the rest of the code only if the actor is of “CustomActor” type
That node will release you a reference of the right type, where you can access all variable inside that actor, or call his events, or functions…
For example if you make a collision box, with a collision and cast to actor - Alien - print “Its an Alien”… only if an actor of type Alien will touch the collision , the game will print “its an alien”
So all these actors can have some type and some will be present in the level, some will be generated.
You can talk, to any of these gettin a reference to them in one of the way i said before.
Since all these actors can be destroyed, or change… And even the level can be unloaded,
You have to store some variables in a place that will not be deleted while you are playng,
**The Gameinstance is an invisible box, **Secretly wired to everything, so any actor and level can just type Get GameInstance, and will have the reference to read or set values.
the Gameinstance will live until you close the game, so if you want your score to be there next time you open the game you can use Gameslots and Savegames
Gameslots are Literally files that unreal can write to store data.
They will be stored in your Hardisk, so you will be able to load them at every game launch.
So , this should provide a lot of situations…
How i make my rocket bounce on wall ? Collision, check if is a wall, rotatte the rocket
How i get point when i shot a enemy? If gun-linetrace hit an enemy, cast to player and add points
How i know if there is a coin to get? Get all actor of class, Coin , if the array is not empty you still have to find coin
How can i grab a weapon when i am close? Make the weapon a Collision, when the player overlap it, make this “pickable”, cast to the player and show the text " press F to pick up"
PS: Quote people to let them know you reply
Thanks for brief explanation. really appreciate it.
Just check this problem when i add event dispatcher my event hit stop working, when i unplug event dispatcher it start working again and tiles drop when hit by a ball. but when i add event dispatcher to reset tiles on game reset. Event hit stop working. i checked everything with print string.
Hi man,
yep , dispatcher and that create event are a bit confusing sometimes!
by the way , are you making the binding in the construct , i am not sure about the behaviour of that.
I have some lack of knowledge about signature and delegate but here some stuff to try
1, Try to move the binding in the “event begin play”
2, Delete the “Create event” and use bind a Custom Event for call whatever you need.
Here a simple video about the dispatchers
[quote=“Est_engine, post:9, topic:156239”]
Hi man,
yep , dispatcher and that create event are a bit confusing sometimes!
by the way , are you making the binding in the construct , i am not sure about the behaviour of that.
I have some lack of knowledge about signature and delegate but here some stuff to try
1, Try to move the binding in the “event begin play”
2, Delete the “Create event” and use bind a Custom Event for call whatever you need.
Here a simple video about the dispatchershttps://youtube.com/watch?v=HLHueQLKcGc[/QUOTE]
Thanks again. I will check this video and also lot of other cool videos on his channel. Going to subscribe.