I wish to know if it is possible to use Blueprints in Widgets as well?
Like, in the scene I use actor Blueprints that have their variables, functions and so on.
Now I’m converting my prototype into a final game logic and I use widgets instead of the original 3D ugly meshes I quickly made to set things up.
One of my objects get coloured in respect to its state (using an enum) and I did this with BP of course (as I said). But inside my widgets I don’t seem to figure out if I can do that.
Thanks in advance.
Thanks for you answer.
What I meant is, can I use blueprints as widget elements? So I have images, scale boxes and whatnot on my widget, but I also have a blueprint, that contains an image and has variables and function?
Absolutely, if you open up your slate widgets, in the top right you should have ‘Designer’ highlighted with ‘Graph’ next to it. Simply select graph and hey presto! BP time!
Sod it, could manage with my experience in C. Got my code ugly with creating arrays for all the fields, but so is life.
greetings again, a regular saint you are
It went like this: I have some parts that have their own characteristics, so to speak and the game decides this and that based on their properties. Now, I have 5 of the exact same part, the player has to deal with them one after the other, typical array situation. I used actors before. Now I would need to have a “MechParts” named BP as an object on my widget, so it has a different BP than the widget BP. The result would be to have on the canvas e.g. a couple of images, 2 buttons and 5 MechParts blueprint. Is this doable, or rather use the old school way I mentioned?
Some “teeth” that changes their position continuosly and block the way of the sphere. They move up, down, up, down etc.
Another actor they were on my original scene, when I was prototyping. I would need an actor BP yes.
hi again @agiro ,
what are you basically trying to do? spawn widgets like actors? have widgets properties like actors(one actor is duplicated and inherits it’s features?)
yes you can do anything you want like that , they can be spawned variable changed on run time ,functions , macros ,event dispatchers and specially have touch events drag events.
@agiro i am having a few questions
what are mechparts exactly? what are they supposed to do in levels?
you said it’s different from widget blueprint, is it another widget or an actor?
do mech parts have same BP and are to be created/spawned 5 times?
what do you want arrays to do here?
this is possible but as i mentioned in other question hit events and overlap events are not possible in umg, if your actor(teeth) is in level and sphere an actor in level as well (can be sprites or 3d) will be possible .
as for deciding what to do when , level blueprint is nice as it can cast to anything in level even if it’s an widget.
actors can collide with each other not umg’s
I have everything on widgets. Those teeth are basically gates, trying to block the player out. The sphere, that is more of a circle, has to be clicked when facing the right direction. I had one actor array that contained the teeth. Now I have separate array for each property. Again, no collision. It can detect by position if it succeeded, if not, it sets the game back.
@agiro awesome idea , even low phones can run it with nice graphics,
it’s all possible , so what’s the problem here? you want to check if they have that property and fire event s,functions? it’s easy just check if enums are equal or not , i never go for Enums until someone tells me to, just get the level name and use save games or set properties in widgets or actors you want and check them as required ,
where are you stuck?
Nowhere, just wanted to make my BP code more simple.
I had one array and access all from that, now I have 4 arrays for the properties and access from those. This way it is more difficoult to edit later on, but all in all I can get it done
I’m bookmarking this page, it contains loads of useful info
Thanks for your help once again!
i am not sure if you need four properties to compare(4 arrays , 4 different properties ,right?) “for each loop” is nice here for arrays as your game seems interesting, and making interesting games is the part where work is required. what you are comparing is up to you and you want to do and want player to do is also up to you
see these links please ,they are based on arrays:
check the links related to ARRAYS AND STRUCTURES official docs
google search of video tuts on simple array functions
just keep testing game on devices to see whats supported and whats not(keep the power of 2 [256*256 ,512 *512 etc] in mind)
since the game is umg based i would like to tell you an advantage of “touch” node , it’s only for actors but by casting to widgets it can get them to function well and provides where screen is being touched. (touch node gets screen location so conversion of screen to world is not much required i guess)
you are welcome once again