Download

Multiple Scripts on 1 Actor ?

I like to seperate thing (Player Movement and Inventory etc). I could do that in Unity. But is there a way for Unreal ?

Not in quite the same way. Each Actor has only a single blueprint, so you can’t really separate it out component-wise (yet, some changes are coming). Most C++ classes simply derive from actor, although you CAN use components they don’t work the way you would expect normal component-based organizations to work. So I’d have a look at how components work in Unreal and decide how to proceed. Most everything starts by deriving a class from Actor in UE currently.

Well the Unreal way is to just subclass AActorfor gameplay stuff that lives in the world. Just Spawn an Actor and then reference it in your class and you should be fine.
You could also use UActorComponent as parent class for your logic and just attach it to an Actor, that would be pretty close to how Unity handles stuff.

am not sure if that what you want:
My Case is i have a PlayerCharacter with Inventory and Weapon.

i will create class form ACharacter. this will be the base class i will Call it CharBase. ACharBase : public ACharacter

UCLASS()
class MYGAME_API ACharBase : public ACharacter
{
GENERATED_BODY()
};

then i want to make some stuff related to movement i make class inherits Base. ACharMovement : public ABase
for the inventory i will do this AInventory : public ACharMovement

and so on.

the other way is to make inventory from AActor.

AInventory : public AActor

and then Make Pointer to the Character

// dont forget to include the Inventory Class
#include “YourInvnetory.h”

class MYGAME_API ACharBase : public ACharacter
{
GENERATED_BODY()

class AInventory* PlayerInventory;

};

let me know if this help

I think i have to trick the engine with actors a bit ^^. But thanks for the help guys !