Thanks guys.
It now looks like I wanted. A little bit messy, but I think I can work with it
I didnt expect it to be this flexible (Parameters display immediately after selecting the Data Asset of a Condition for example)
Thanks guys.
It now looks like I wanted. A little bit messy, but I think I can work with it
I didnt expect it to be this flexible (Parameters display immediately after selecting the Data Asset of a Condition for example)
Could look better in editor with a class details panel customization, but that is a whole different complex topic ^^
I’ve got another but related question.
I now have a Class
UBattleEvent
. This Event again consists of a Condition and the actual Event.
Is there are way to have a Simple Function as a DataAsset that can be implemented inline?
I could create an Abstract class or an Interface with a single virtual function, but that again would mean to create the Object beforehand.
We are using multiple DataTables to store different parts of data, they are synchronized by row’s Name. So instead of inheritance we use aggregation.
Yes, but it’s a far more complex topic. It would involve a mixture of adding a custom blueprint type and making a custom editor (even if it’s just a thin wrapper around the current editor).
I would do instead something that AnimBPs do…
Instead of storing reference to the Blueprint, store in *BattleEvent *the name of the event to call then in game code get the FString and process the event with a code reflection call:
http://api.unrealengine.com/INT/API/…nts/index.html
Could be something like this:
UCLASS(EditInlineNew)
class UBattleEvent : public UDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(...)
/// Conditions...
UPROPERTY(...)
FString EventName;
};
void AMonsterTroop::BattleEvent()
{
FOutputDeviceNull Out;
CallFunctionByNameWithArguments( *Events[0]->EventName, Out, nullptr, true );
}
That would execute any “red” Custom Event in the Blueprint that matches the name of *EventName *stored in your UBattleEvent instance.
HI, look nice, could you please share some code with explanation , how did you make this to work ? Thanks