Please someone explain this to me!

I’m a programming for 10 years, I created android apps using Android Studio, Python AI and ML; I know how to code in Java, C#, C++ and many more but i really need some explaining that tutorials seem to skip or they just simply cant explain!!

I worked on unity for 3 years! I created some of the most advanced game and indie games that are featured in Xbox and Nintendo show case

HOWEVER

I’m having a really hard time transitioning to Unreal Engine:

  1. I know that Scripts in unity are some code that you add to a game object (Actor) so they give them Functionality… I think I know now that Scripts here are not like that because their the Actor them selves, The code is the core of the object if you want to give them like shape or something you need to drive a Blueprint class or the hard way initiate them in begin play. There is no object to place in world before you create the class, the code IS the game object (Actor), Is it correct?

  2. How Actors talk to each other? in unity you say whatever you collide with, get a reference to that and then call some function! OR you would give it the direct reference like exposing it to editor and dragging and dropping the Prefab(BP Actor) so it knows what to instantiate etc… now I really cant understand how this works in Unreal Engine Like i want to tell the Code in an Actor that player shot you go and reduce your health by this amount, how this really works? how 2 actors talk to each other? also where is this master script (Game Manager in Unity) that controls the flow of game and like spawns other actors or so on…

tutorials seem to reach to end before explaining this every time, It may seem basic but when there is no explanation this happens!

Hi! the method in C++ is the same as blueprints.

You can use interfaces

or for example if you use the OnHit or OnOverlap events you will get an ‘other actor’ parameter and you can take it and cast to its class so you can expose its functionality.

2 Likes

Hi @LegendOfDarkOne!

To add on here, here is a tutorial series from Epic Games on transitioning from Unity to Unreal:

Introduction To Make The Switch From Unity To Unreal Engine

Here also is a live training on blueprint communication which will let several blueprint actors talk to each other:

Blueprint Communications | Live Training | Unreal Engine

I hope the above solutions are what you are looking for!

3 Likes

Collision and other events also give you a reference to whatever you collide with.

Example reacting to collision/overlap events :

Example performing a line trace and applying damage to the hit actor (if any) :

Damage is abstract, there is no Health concept in UE4, so applying damage alone won’t do much out of the box. In the actors you want to implement a health system, create a Health variable and implement damage handlers in their code :

1 Like

Really Thank you everyone :yellow_heart: :100:

1 Like

really thank you, Nice explanation :100:

Thanks for the resources :bomb:

1 Like

Happy to help! :slight_smile: