ysaie

31 / ⚧ / code, music, art, games

──────────────────────────────
🌸 many-shaped creature
✨ too many projects
🚀 cannot be stopped
🌙 stayed up too late
:eggbug: eggbug enjoyer
──────────────────────────────
header image: chapter 8 complete from celeste
avatar: made using this character builder


📩 email
contact@echowritescode.dev
You must log in to comment.

in reply to @ysaie's post:

or do you mean in C++ code?

For C++ you can mark the delegate UPROPERTY as BlueprintAssignable to make it available. It also has to be a DYNAMIC delegate specifically (and maybe multicast only? Ive worked around the single cast version by making custom accessors / modifiers):

https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/GameplayArchitecture/Properties/Specifiers/

https://docs.unrealengine.com/5.3/en-US/multicast-delegates-in-unreal-engine/

so event dispatchers are what led me to make the post actually - i made one and hooked it all up so it would fire when a thing happened, and then i realized you couldn't assign anything to it from the hierarchy like you can with other blueprint variables. they seem to be private by definition, which feels strange to me because in my mind the whole purpose of a callback type structure is so unrelated objects can talk to each other

Ah! Hmm... At best, you can add event hooks for the object that owns the current hierarchy - cant assign a different object to be the handler or pick a preexisting function (without a custom editor). So instead you'd have the hierarchy owner bind a new event and forward the call

There's a way to get the events to show in the bottom of the inspector in the hierarchy view (in an Events section). I can hop on UE rq and see what it needs if they're not showing by default o.O

This page makes it sound like they should be available by default tho: (I dont think they're only UMG? could be wrong)
https://docs.unrealengine.com/5.2/en-US/umg-events-in-unreal-engine/

it feels like the intended workflow in this engine is to fire off events from the input end and consume them from the output end, without any specific link between those objects. do i have that right?

and if you want to target the event to just a single consumer... i guess you include an id or something?

like, the part that's confusing me is that this is a really basic thing to want a game engine to do (i step on this button -> that door opens), so UE must have an idiomatic way to do it, i just can't figure out what it is...