#blueprint
1 messages · Page 57 of 1
anyone got idea on this please
either way my answers wont solve the issue im having, ill test some other ways and see the best one
And based on what I said earlier, you can't specify an interface class as a property of a structure, you can only use an "Object Class" reference which means you could select basically anything. You probably could make the structure in C++ and support it correctly.
I'm still struggling to understand to be fair haha
Blueprint comms Iive training video pinned here is pretty damn important to watch
Strangely enough, you can promote an interface class to a variable in a blueprint, so I'm not sure why they don't allow you to just select it as a variable type from the get go.
yup thats weird
Maybe because it’s not necessary the way interfaces work
@dawn gazelle
https://gyazo.com/f4d1954bd79af34113eb9eae1394e39c
Do You know whats causing this like "anim interuption" ?
it happens all the time kinda im using blendspace for the anim*
If you’re gonna do that you might as well just use a cast
Animation is the thing I'm the worst at @_@
@dawn gazelle im guessing your better then most either way <.<
im unable to find any info on the web or here from anyone about it.. it really ruins the exsperience
My brand of character animation is to slap ALS in a project and use montages for everything else.
XD
yeah me 2 basicly...
also, this works but this shows the floating text for every player, thats not what i want i want it locally i suppose
Perhaps check the actor location is within a certain distance from the local character / check for line of sight, etc.
well if i would only wanna create it locally
i dont get it why this wouldent work ?
You need some kind of RPC to communicate to the local client to do it.
i didnt understand how to solve the velocity problem, this is the result with only arrays... its not that bad :x
I'm dense, how the f am I supposed to get some values from an enum.
convert it?
how?
I setup a list of global constants to read from
but cant find a single node that allows me to read the values from it
Enum is just a human readable byte. It'll be a value from 0-255, and you can use switch or == or selects with them.
all I want is to be able to read the "2" from there, and use it.
exactly
Then?
why are u writing 2 on the description?
Global_Speed_MUlti is 0
Global_spawn_rate is 1
the next one u add is 2
and so on
wait, ur saying I cant modifyt that?
"Description" is not a usable value.
uh..
I see, what could be a way to have a simple list of global constants I could read anywhere in the game from?
When you want to make a number meaningful.
Imagine if u want to have a state, instead of writing if state == 0 , if state == 1 , u write if state == walk, if state == run. It's more readable
You can probably have a variable in Game Instance
can't even do constant in blueprint afaik
static class would be subsystem
even to make them need CPP anyway
so not that I know
your go to is probably game instance at this point
Game mode is not really global
it's tied to level
Game instance on the other hand lives through the duration of the game
how do you write stuff in it? cant seem to be able to create a blueprint to subclass it
@frosty heron Did you generate the cat from your avatar or its from anime...?
It looks nice
ah, yeah, saw it.
took it from internet
can I use reflection in blueprints?
its probably already used when having to fill up strings with classes and whatnot
so I can avoid having to cast it all the time
right, but do blueprints allow me?
havent found a way
if through C++ probably possible
passing a string of a class, var or function to run on demand
without typechecking
and awesome 😄
if I know my GameInstance will have a GLOBAL_SPEED_MULTI would be cool to not have to cast it
thats about it
yes there is one reason
its less verbose
what do you mean
well, in BP is not
sure thats an option
Im not alone! 🤷♂️
hiii everyone
why im getting the error
it prints the transform
but it cannot apply
is there any solution
log :
LogBlueprintUserMessages: [ALS_AnimMan_CharacterBP_C_0] Translation: X=1365.286 Y=1853.853 Z=50.062 Rotation: P=0.000088 Y=-167.613149 R=-0.000059 Scale: X=1.000 Y=1.000 Z=1.000
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Node: Set Actor Transform Graph: EventGraph Function: Execute Ubergraph ALS Base Character BP Blueprint: ALS_Base_CharacterBP
LogBlueprintUserMessages: [ALS_AnimMan_CharacterBP_C_0] Translation: X=2307.049 Y=1534.044 Z=50.062 Rotation: P=0.000004 Y=46.132271 R=-179.999994 Scale: X=1.000 Y=1.000 Z=1.000
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Node: Set Actor Transform Graph: EventGraph Function: Execute Ubergraph ALS Base Character BP Blueprint: ALS_Base_CharacterBP
LogBlueprintUserMessages: [ALS_AnimMan_CharacterBP_C_0] Translation: X=991.666 Y=2635.836 Z=50.062 Rotation: P=-90.000000 Y=167.660913 R=33.526933 Scale: X=1.000 Y=1.000 Z=1.000
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Node: Set Actor Transform Graph: EventGraph Function: Execute Ubergraph ALS Base Character BP Blueprint: ALS_Base_CharacterBP
Anyone know how I can make duration just be infinite until radius changes or object deletes, etc
The error isn't about the transform, it's about the target from your map.
currently if I move it after setting it to 500 the debug sphere remains in same spot and draws a new one in new position
how i can fix it 😦
Make sure your map has valid keys.
And that's why it's not valid... You can't save actor references.
They stop existing once they are removed from memory.
If you want to save actors, you have to save details about them and reconstruct them.
GUID of the actor
awsomee let me tryyyy
Anyone knows why all my physical controllers are set to Player 1 for a local multiplayer
thankkkks a lot
4 players spawn
i only have 2 controllers at hands right now
1 Ps3, 1 Ps4
They both work but controlPlayer1
how i can use guids to get actor can you help mee
You'd probably need to use Get All Actors of class, loop through them and get its GUID and look it up in the map, if it's found, then it has save data available. This would be for any placed actors in the level.
You'd probably then want to store all the GUIDs for the actors that you've "loaded" in an array.
Next, you may need to handle any additional actors in your map that aren't part of the level, such as those you've spawned at run time. To do these ones, you'd need get all the values from your map and loop through them, checking if the array element is contained in the "loaded" array I mentioned, and if not, then it's an actor you spawned and not placed in the map.
oh really thanks for your help 🤗 🤗 🤗
So this works for a singular object fine.
Does anyone know if there is a way to delete debug lines for a singular object?
without deleting other active ones?
Create an actor component that has a map var where your GUID is the key and actor is the value.
Create a few functions for adding and removing from the map. Then place the actor component on your game state.
Then any actor you want to be accessible from this list, have it register itself by getting the component from the game state and calling the relevant function. Some something similar on end play so it unregisters itself.
When you want to get an actor using a GUID, get the component from the game state and look from the GUID in the map.
when im trying to delete a function ue5 says "the function is still in use" but if i check the references via alt+shift+f it shows that there are no references to the fucntion
so how do i find where the function is used then?
Try using fix redirectors
Can anyone help me figure out why I'm unable to get any array in my Sequencer trigger endpoint? Thanks!
rather than drawing them for a long time, draw them on tick, but only for a single frame, i..e 0 duration. then you can guard it with various booleans
i.e. in the object you have an instance editable "Draw Debug" bool, and if it's true, draw the debug every frame for a second
Somebody made a blueprint to make it possible to identify foliage meshes painted in the foliage tool. It uses line trace to a string. They made it for 4.26 here:
https://blueprintue.com/blueprint/ia3nvub2/
I adapted it to compile in 5.3 here
https://blueprintue.com/blueprint/ktt-25f7/
but nothing happens when I try to use it. The only info I can get from output log is these 4 warnings.
Can anyone please advise me how to get it working?
Can you on tick and make it in editor only?
You can make a hacky tick, or you can do this in c++ (the superior choice :P)
Teach me hacky tick. I'm busy on c++ side with important stuff
This is just debug shit so I can see my spawn zones all over map lmao
Set a timer for a really small amount of time, that calls a function
On my construct stuff?
Mhm
(in cpp you can override ShouldTickInViewportsOnly)
Hell you could try overriding that in BP 🤔
Ooo
question - is their anyway to stop a delay? Like in Unity you can cancel Invokes and Coroutines, is there anything like that in UE5?
I'm working on an energy system that will start recharging 5 seconds after the enemy receives damage. So if the enemy is hit during that time, the timer will reset
Delays are not cancellable.
You could use timers for this. Ideally you want the Gameplay Ability System. Your c# knowledge should be more than enough for the c++ setup needed
last time I tried to set up the GAS it just flat out killed my project, so I honestly try to avoid it
*it's been a while, but iirc I followed a tutorial on it and when I tried to boot up my game again it said something was out of date, or something else like that and wouldn't let me back in 🤷♂️
You can just use events lol
looks like Live Link plugin
might be easiest method
Yea that is working perfect
minus the fact it shows in game lol
There. Ended since its a component of my spawner, setting the components tick enabled to False on BeginPlay event
So while I'm in editor mode its drawing my debug spheres based on radius of the object
And if I update radius it adjusts just fine
BeginGameplay makes it stop and no longer shows them
So adding a boolean object to map that will go through all MobSpawners on map and if its set to debug = true, then they will all enable tick or disable tick.
I've a question about animation notify state.
Basically, I'd like to spawn an actor on Notify begin and destroy it on Notify End. But how do I get the reference? I can't save the variable in the notify state blueprint. Or any better suggestion?
One potential way is that you can get a reference to the owner of the mesh component that is performing the animation, and store the actor reference on the owner.
You could use any other actors in the game too, like storing it on gamestate in a Map of MeshComponent > Spawned Actor then on the notify end read the map to find the actor reference.
Hmmm, thanks. But how do I make sure this actor is spawned by the specific notify state?
It could be two ANS has overlapping in the timeline to spawn two different instances
Guys i want to save input mapping context, but it didn't work on standalone
Hello!
I apologize for the basic question, however the documentation isn’t really helping nor is the comments in the First Person Template helping either.
In the BP_Weapon_Component, in the shooting event,
There is this set of nodes:
Most of is it is self explanatory to me except for the RotateVector node with the projectile offset and the camera rotation.
Why does unlinking the GetCameraRotation from the RotateVector node make the balls spawn in a different position based on the rotation?
While Linking that node makes them spawn in a static location.
Thanks!
Spawning takes a world location. The nodes are trying to offset(i think forward) the spawn location based on the camera rotation. The offset is defined in a LocalSpace manner so it would always offset a fix amount in the correct direction. Since offset is localspace, you need to convert it to a worldspace. RotateVector rotates the vector to the correct direction, then added to the spawn point(the socket location)
is it possible to set up funcs such as this with pass through variables? im trying to replicate some blueprint code that is singeplayer to no avail but im probably just going about this the wrong way 😅
For some reason the event graph of Unreal Engine 5 is not allowing me to make an "on-actor begin overlap trigger volume" even when I'm typing it out so is there another way to get it?
Do you have a collision component called trigger volume?
Show your component heirarchy
yes
just select the component then click one of these dispatchers to add an event for it
I create a new third person map and when I open it I get this
I have tried rebuilding the lighting but still the same
it's not allowing me to make a fourth one
there is only one begin overlap event per trigger volume
I want to make a bullet ricochet effect for my sniper rifle. The way it's currently set up, the line trace for the ricochet goes from the impact point of the original bullet trace to the nearest enemy, but what I'd like is for it to go from the impact point through the enemy. How do I take the line trace and basically extend it through the enemy an arbitrary amount so it can potentially hit a wall and ricochet again?
So essentially taking the start vector which is the impact point from the first bullet, and using the actor location which is for the nearest enemy, and making a line trace that goes from that start point through the actor
normalize EnemyLocation - FirstHitLocation to get hte new traces direction
multiply that by how far you want to go
You want to ask in #multiplayer
Hey, anyone know whats up with Launch Character feeling a little off when launching upwards compared to forwards? I figure its probably something to do with air drag but for a character movement component I dont see such a way to adjust that
Gravity scale
I tried adjusting that, it doesnt help much
There’s friction too, but I doubt that’s the issue
Anything too high and it negatively affects the forward dash, and 0 doesnt feel much different from 3 (what i currently have it set to)
I did not understand the question. What don't you like about your launch character?
Left and right feel great, its fast and "zippy" to put it in a way. Upwards, however, is very slow.
Now partly I know thats because when I launch my character upward, I use less velocity than left or right, but if i used the same amount it would launch them waaaaay too far. I'd like for them to go the same distance and speed as left and right does.
Hi whats the best trace logic for fps melee using the traditional method of a separate FP arm mesh (smaller but within the capsule) and full body mesh for lower body and full body shadows. I would.have wanted the trace to be on the fps.weapon itself but its scaled down to prevent clipping outside the capsule. Not sure if just using a sphere mesh in front of the player and time the hit on the animation is adequate.
Other alternative is to use full scale fps arms with a different z depth? on the material to override. But it causes shadow issues on the weapon.
Thanks
I found a solution :-)
I decided to forgo launching my character entirely and instead I launch a projectile and after 0.1 seconds I get its location and lerp the character there with the Set Actor Location node
how do i get the and/or nodes? cant find them in the right click menu with context relative off
if you're talking about booleans search for 'and boolean'/'or boolean'
Thanks
why is this blueprint not working?
Use a timer
You can also probably tick that less frequently. Having a chance every 0.2 seconds isn't great
i had done that for testing if the time gap was tooo long or else it was at 5
Anyway use a timer, the delay feeding itself is a bad move
and , your Random number for the Printed number and your == 2 wont be the same
It will pick a different number on each Exec
Someone said you should never make random owl noises, either
Who? :P
To add on to why, pure nodes get called once for every outgoing pin. The output isn't cached
also RandomBoolWithWeight(0.333)
At the risk of asking a stupid question here:
Is "Game" and "GPU" not two different things? (CPU and GPU)
They seem to follow each other very closely.
Just optimized a bunch of texture size which seems to help GPU get lower. But the "Game" (CPU) just seems to follow down and now they are about the same again?
Not that it is bad that "Game" ms also came down, but I'm confused as to why they are somehow linked/influencing each other. Is that a thing?
Game is specifically the game thread. As a guess I would say loading textures is handled by the game thread before being passed to the GPU.
So that might be why it affected both is what you are saying?
In other words, in general you can have a big difference between GPU and Game depending on what your bottleneck is?
Well, the real reason I'm asking is to get certainly around what my bottleneck actually is and therefore where I should look for optimization.
the other thing may be the game thread simply waiting on the render thread
use unreal insights to get an actual breakdown of things
I see. Thank you.
is it possible to "disable" blueprint editor functionalities for childs of a given blueprint or cpp classes? ie let peoples create a child, change properties and add component but not let them edit events or functions on them
Why would you want to do that?
to let designers make new actors from a base actor class & add gameplay systems to it in a modular way but preventing them from changing the behaviour of actors or components in an open ended way that would be impossible for me to predict
would also be cool to be able to limit the types of components they can add too
I mean if they mess it up it's their issue and not yours right?
the goal is to ship a game so it's everyone's issue
You are shipping a game that allows people to do blueprint editing??
no?
I am shipping a game period
mistakes make it harder and longer to reach that goal
and letting designers do absolutely whatever they want would result in many of those
I'd much rather prevent them from messing up than wasting their time letting them figure out how they couldve screwed up or mine constantly telling them what not to do
Oh you mean designers in your team
yeah
Where can i get a list documentation of all the nodes and a basic explanation for each one. I need this in pdf.
I see
so far the best I've found to limit functionalities is hide categories, and you have to add categories one by one and there's like hundreds
make the methods private?
I think maybe just box the nodes and comment "Do not change"
I can't make unreal's own methods private
without a source build and a ridiculous amount of time at least
Yeah it;;s easier to tell them to not make any event. A designer should at least know that
that adds to the pretty large pile of other things that they should know what to do because unreal won't let us disable or limit editor functionalities based on context
& more stuff will get added as they just find new things in unreal that we weren't aware of
based on our experience so far it's not
i just work with small team
unreal has a lot of "break game" buttons & it's practically impossible to make any gameplay code that's truly isolated and impossible to break by a ton of other stuff you're not aware of
can u give examples
a lot of our gameplay components rely on other unreal physics related components being present & set up in a specific way and there's no clean way to prevent designers from touching the physics components (which they have on occasion to try to customize some actor's behaviour, reasonably expecting it to work ok because they had no reason to believe otherwise)
most of those components also only work when they're on actors of a specific class which has led to designers trying to put components on static meshes in the level & not getting why it doesn't work
they also regularly want to prototype/make variants of mechanics which would be reasonable if we could limit & control how they access these mechanics
& also frankly even if telling them what not to touch was viable we still end up with an editor window that's 80% random buttons & properties that should not be there
sounds like stuff needs to be set to private a lot more
I can't set engine functionalities private
we're already limiting access wherever we can within our own code
there's like thousands of them
unfortunately you can either have a data only blueprint or you can have a blueprint with components.
I reccomend working for an alternative uobject based solution, similar to how enhanced input or the likes work.
You have a data asset, that lets you assign uobjects for "functionality nuggets"
Or a data only bp with functionality nuggets
is tick any more efficent then using a timer ?
we're kinda heading towards that direction but that also means like, needing to make our own custom 3D editor for it to have remotely ok UI
I'm bassically doing a day night cylce thing and on what I'm watching their using tick
a timer does not replace tick. if it needs an exceedingly small amount of time, its a tick
if it's a larger amount, i.e. > 0.1 seconds, it's a timer
since some of those components (which would not actually be component themselves if we go 100% with that solution) have spatial properties that need a proper 3D preview and editing tool for the UX to not be rancid
well it's day night cycle so I would think tick would be better option for this one ?
would you agree there ?
it really sounds like you're askign for the impossible. you want an data oriented thing, but with some of the aspects of oop, but not all of the oop?
You're just gonna have to fork the engine
I would probably use tick, yes.
I want blueprint edition but with parts of the editor just removed
like I don't care if it still exists in code I just don't want them in the editor
that's what an engine fork is for then
editing source engine/editor code is way way out of my skill level
you could enforce it by a precommit check of "did you add any events or override a function"
- probably
oh yeah we're looking into that too, I've heard of peoples doing it
Hey, I have a question. Im making a catapult that shoots an projectile in an arc (for AI).
I try to use this node and it works, but the projectile goes really slow. Is there a way to let the projectile go faster, or should I use an other way to do this?
ok it seems like slate might allow for what I'm trying to do?
how can I make a macro to be available globally?
How can I make it when I set my yaw it does not just snap me like make it smoother? 🙂
God bless you all! 🙂 Jesus loves you all! 🙂 Have an amazing night/day!!! 🙂 Everybody! 🙂
I never used macro but isn't there macro library?
yeah there is
Library? how do you access it
Im talking macros I create
https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/BP_HowTo/MacroLibraries/
Macros inside a Macro Library are used to increase the health and scale of an Actor.
Yes you make your macro in the macro libary
instead isolating it in a blueprint
Right click on empty space in content browser, blueprints -> blueprint macro library
uh, weird, when I click there it prompts me with the normal window
as if its bugged or not recognized or something
right I mean that it doesnt create the blueprint
it goes back to select parent class
Yeah can you follow the docs
it tells you to select actor afterward
it's literary step 2
maybe it will only work for a class that is selected, just my guess
but actor is as generic as it can be
so you probably cant use the macro on objects but actors are fine (Never used or test so don't quote me on that)
Have I done this right at all ?
I've bassically trying to do it so at night it's not pitch black but there a bit of light still like a small amount
currently when sun goes down so underneath it's pitch black
Macros are meant to be used within a certain class' scope and that is the class you are selecting when creating a macro library.
For example, if you create a macro library with the scope set to "Character" then all the functions and variables that are normally available to the "Character" class would then be available within the library.
If you want it to be able to be used everywhere, then you define "Object" as the class.
how can i store button array in BP ?? so that i can change its style or color by index ?
Make array and plug in all the buttons into it, promote the array to a variable. You could also use a "Select" node and feed in the button values into it, then you can feed in a number to select the appropriate one.
Then you could also make a handy pure function to get the button you want...
I would spawn the button dynamically and add it to an array for every single custom button created
Clan, I added a child to a scrollbox, and now I needed to change a variable in that child. Someone help me?
Note: I have several children in this widget, and I need to change the value of just one
On the first picture, cast the return value to w/e widget it is, then change the variable
I'm probably just imaging this, but need to ask, could this be more responsive than the "jump" and "stop jump" when I use it like this? It feels like it, but I might also just feel it because my brain is like "of-course this is better".
I have said this before but I'm working on a platformer and I want the jump to feel super responsive (think old Mega Man more than Inside) and I don't feel like the standard jump is that good for that type of jumping (I have tried a gazillion settings but none that got me the result I wanted). So I'm curios if this could actually be better and would love if anyone know more than me about it.
Like this? When I do this, it changes the variable value of all the children, not just the one I need
ah I see, is this impacted by unchecking the context sensitivity or unrelated?
I don't know what you are doing on your end but that code on the very far right alone just getting the first widget (index 0) from your quest scroll box
So when I have a UObject derived Blueprint Class it can't access any functions in a Blueprint Function Library that is defined in blueprints but it can access functions from a C++ Blueprint Function Library. Why is that?
Macros for a defined class can't be use in a different heirarchy at all. If it's not available for the class, it won't show up at all regardless of the context sensitivity option being checked.
I believe blueprint defined Blueprint Function Libraries require world context.
A C++ blueprint function library is just static functions that can be defined to require their own world context or not.
Yea but when I call a BFL function inside a BFL I can do that when I provide the world context as a parameter
So I'm wondering why that wouldn't be possible in UObject derived classes
Hello! UE ver. 5.3
I am very new in Unreal and now trying to make 2d platformer.
Created the character and her movement thanks to this video (https://www.youtube.com/watch?v=tVH0VTY-c8o), but after my attempt to add a double jump (just all I did was almost completely copy a version of single jumping) I have a problem with movement: my hero moves with... idk flashes/blinking/interruptions (?). I can't even imagine what the problem. So I will much appreciate any help
Objects don't have world context by default. If you gave your object a world context, then you can use a blueprint defined blueprint function library.
Blueprint defined BPFLs require a world context.
C++ ones don't have that same requirement and you can actually define whether or not the function itself requires any world context.
In order for Objects to use a bluerint BPFL then, you must give it a world context so it can appropriately use that BPFL.
Okay so when I try to find these functions by typing names it doesn't work. But I've copy pasted a node in there and provided a world context and it compiles, but it does give me a warning that "isn't safe to call from blueprints of class -thisClass-". So it seems to me that you're not supposed to be doing this?
Exactly.
I understand that the C++ ones are just static functions though
I'm trying to understand which baseclasses work best for which application. A UObject derived class seems ideal if you want it to have a custom lifespan that transcends levels and also just something that doesn't require any actor related stuff. But then the lack of access to all these handy functions is annoying.
Actor - Anything that needs to replicate and exist as something in the world with a transform.
Object - Anything else, though can be made to replicate while still not existing in the world. Objects are the most basic thing that can exist in the engine, and yeah, by creating your own UObjects you're then in control of basically all aspects of what it does - any other class you could use has some management being done in the engine already.
Yup that matches with my understanding of it. The thing is that I'm currently working in a mostly BP codebase and it feels more strange to derive from UObject there. I guess because of the lack of access to certain things that feel normal in BP or would be possible in C++ if you just name the function library.
Thanks for your insights 🙂
Anyone know how I can sort that
my sun looks like it's a square
That one you can see it better
Haven’t you heard? The earth is flat and the sun is a square 🙃
I much prefer a round sun haha
Idk tbh, maybe something in the skybox settings?
I'm think the fog thing might have something to do with it but not sure
#level-design might know
Omg you used the exact asset of the game I made for my senior project
at 1 hour and 3 minutes into this they discuss this topic a bit. https://www.youtube.com/watch?v=3iIAcOtPJZg
With the Epic MegaJam just around the corner, this week we wanted to focus on the groundwork - how to prototype quickly so you can get to the detail work faster. Time is of the essence when it comes to jam events and to make you feel better prepared we're bringing on Chris Murphy to discuss some tips and tricks on smashing through the busy work ...
Perfect! thank you!
you can now also set the number of times you can jump in the character BP which would be a quick way to add a double jump IMO
Is it possible to know if an actor was spawned or already in world?
Depends™
A real specific unique actor? or you just want to check if there is an actor with certain class in the world
each actor has a GUID id that you can use. if you want to see if that type of actor already exists then ig a GetActorOfClass node will work
Yes, I know... But when I do it I have problems with flipbooks. I think It would be helpful to try another way to add movement 🤔 In the video, that I have attached before, the author made complicated enough method (as I know). Thanks for your help anyway ❤️
nope not what I'm looking for 😉
lmao is this gonna be a guessing game then, to find what you want?
The question was I have a BP in world or I spawn the BP at some point
I want to know at begin play if it was spawned or there all along. I can put some variable of course expose on spawn or whatever... The question was more how to identify a blueprint that was spawned from an already there blueprint without make this kind of stuff. Thx anyway
if i understand you properly, you want to know if an actor was spawned at edit time or runtime?
yep
yeah you'll need a variable for that 🙃
UE doesnt keep track of that afaik
at least it doesnt for shipping build
We have creationmethod for components... checking with this->IsActorInitialized() ...
Thanks by the way
Hey guys
Im still new to the unreal engine but if i would want to make an item right? Lets call it bottle of water and would want to be pickable and useable but also animated and appear on my screen i mean on the firstperson blueprint one how would i make it
like this lets say
and it can be used
dropped
and picked up
one way to do it is to make it a whole different actor. it has it's own animations and stuff but doesnt have anything that would trigger them. when it overlaps the player it will get attached to a socket (that could be the player's hand or just infront of the camera) and the player will interact with it either by using an interface or a delegate (event dispatcher)
right and i did that
i attached it to the first person socked
wich turned out to be glitchy and it wouldn t remain still
playing the firstperson arm animation
what do you mean "glitchy"?
i couldn't walk properly, it launched me in air sometime
oh yeah you'll want to disable collision for the bottle
and enable it back when it's thrown again
just throw it with physich
just make them? either in blender or whatever you're using
you said it would get attached to socket in front of the camera, how exactly, not using the skeletal mesh
no i said you could either attach it infront of your camera or your character's hand
the socket could be anywhere really
does anyone know if there is a free way to use midjourney?
how would i attach it in front of the camera
no but DALL-E is free
Don't say stuff like that in this server 😄
you can use microsoft bing new image generator
oops
#generative-ai i suppose..?
I heard steam banned AI generated content in their platform 😡
real
you could either use a scene component. or just attach the actor to the camera (with keep relative option) and add a relative offset to the object
attach actor to component?
yeah,i tried it now the results are super
thanks
no problem
my gamemode beginplay event not working 🥲
ye
check if you set the game mode to the game mode you want in the world setting of the level
yes in world setting i already add that gamemode
then it should work
it attaches to the player camera in a weird rotation
Show full picture of the 2nd bp
keep relative options
wdym?
Yeah, so what happend? It doesn't print hello?
yes , it doesnt print hello
just change the rules to "keep relative"
Confusing name btw
u might not use the BP version
Add some prefix for your Bp one
Im kinda convienced you are not running the game mode with the begin play
i am using bp version
again the name is confusing, I suggest to fix that first
yes changed the BP name , but still didnt work
the bp name and the parent is the same
Show?
it just dissapears
not even the shadows
How can I possess a pawn via blueprint interface?
did you set the relative location like i told you to?
make sure that it's derived from Game mode class, other than that I have no idea. It's working on my end tho
yes
i feel like i cant find how to do it
been working on hours
There's a lot of them in market place btw
i derive froom gamemodebase
can always spend some money to understand how others do it
Ye I have no idea then, if your print string is set to print on screen and you choose the right game mode and play that level. It should print
i am calling an different event from c++ and it worked , but wht happenign with beginplay of BP
such strange error
No idea, my game mode also derived from C++ class, my Blueprint version print on begin play just fine
I would try to debug print on event begin play in C++ class.
Then in your bp version, have a begin play without calling call to parent. If it print the debug then you are using the cpp version
i found a solution
thanks for the help tho
i was thinking about creating a spring arm then putting the actor there and make it hidden in game
and it can only be activated when i touch or something like that or press e
cant be dropped tho
i find the error
Super::BeginPlay();
i am not calling this🥲
You shouldn't have to tho?
u are overriding it in blueprint anyway
it should print hello regardless
but when i call this it worked successfully
same
Hey Slavical, very late but I had a search in the server and saw you encountered the same issue with Lyra's approach to threadsafe updating Root Yaw Offset causing jitter/lag with multiple clients.
Did you by any chance figure out the reason behind that and/or how to fix?
I did it!
I used another method to add movement and decided to start with simplicity: I added only one axis, without jumps. And, as expected, I had this (the first video). I tried a lot of parameters and I was lucky - the "Max Step Height" was the needed one (the second video) 🥺 Sorry for sharing it, but I was so upset and maybe it can be useful for somebody, because I have found nothing how to fix it.
I did actually. You need to set the NetworkSmoothingMode on the character movement component to linear.
Oh you are using character movement component. Now that make sense why the character get snapped when hitting a step
I know this is basic but can anyone please help as to why this input action isnt event returning a basic print string
does it work if you pin to the "Started" versus the Triggered?
is this for the player?
the idea is for any PlayerController but atm i cant even get it to register as a click happening
well the default third person gets the player controller obviously..
I used the topdown example
so no cast for the custom player controller but can add it in and try
Print strings as valid
brothers,how can i remove this scene preview in viewport?
white spheres
they are annoing,cant see the sprites
change the visibility on them and they will go away
i changed both in parent item and it didnt work
i ticked both to be invisible,
i dont think its here
youve done scene root not sphere mesh?
click the mesh not the scene root
dude
i dont have the mesh
i have a sprite and collision
i see the scene root in viewport
how to turn it off
perhaps #enhanced-input-system is the place to ask amigo
if you hit G does it change the view in the viewport?
thanks ill give it a go after verifying files as i lost all mesh attributes from a character last week so wondering if its something liek that
If I add a sprite and turn off visible it disappears..
brother,its a blueprint,in root it has a sprite and collision,i see the root
how do i turn the root visibility off
you can drag the Sprite on top of the scene root and it will replace it.. but I don't think that its the scene root that is actually showing..
what is the sprite set to ? a white sphere?
is it possible?
yeah thx,helped
Thank you! <3 Excited to try that out as soon as I'm back at my pc. I'll let you know how it goes.
Wasn't even sure if I'd still get a response since it had been such a long time since your post, let alone in a few minutes.
Out of curiosity, how did you debug/find the solution? Compared the Mesh component and Movement component settings in Lyra vs. your project? 🤔 Always useful to find better ways to debug.
Haha well I'm glad I was able to help. You must've been searching for awhile because that post is 2 years old lol.
And yes, you're correct. I discovered it by looking at character movement component settings on B_Hero_Shooter in Lyra's ShooterCore content plugin.
Are functions in blueprints virtual by default?
So if i'll override them and call from the base class (but instance is derived) - it'll call derived version?
Yeah I'd probably lost about 2 days debugging so scoured the internet more thoroughly before going deeper down the networking rabbit hole.
Glad to know comparing settings might've eventually led to figuring it out on my own. But way more glad that you could just point out the setting for me xD
Yes. If you call a BP function from a parent BP then instantiate a child BP that overrides the parent's function, the child's function will be called. Make sure you call the function's parent inside your child BP to execute the parent BP's logic, too (it's the same as calling Super:: in C++).
Haha you're welcome man. Hope it works for you. I know it did for me.
someone?
How do I access the static meshes inside a Blueprint? For a normal parent actor with child actors this example (see image) works great, but it doesn't in case the SM are inside a BP.
Get component by type or whatever
Something like "Get Root Component" and then getting the child components from that should work
Thank you, I will try right now :-).
Can you help me to plug things right so I can print a list of all child actors of my BP?
There's a Get Children Components node (like in my screenshot). It gives you an array of components which you could feed into the For Each Loop.
Though I do want to point out that there is a distinction between 'child actors' and 'components'
They're similar but not the same thing.
working fine, thank you.
How can I find out how long until this animation is finished?
On previous tests of mine I think both objects need to overlap
Cant have 1 objet to ignore everything, apparently.
I could be wrong though.
I think so.
but I couldnt make it work that way, only setting the objectType and ignore all in the channels.
that was my way of thinking but couldnt get any overlap events that way.
someone with more experience should chime in.
dont wanna give misleading advice, just commenting on my experience.
yeah cpp's being play calls blueprint's being play
every event in blueprints is always being called by cpp. if you dont call the super function then nothing will call the bp counterpart and you'll seemingly have an unfunctining being play or tick or whatever
when im trying to delete a function ue5 says "the function is still in use" but if i check the references via alt+shift+f it shows that there are no references to the fucntion
i tried using fix up redirectors but nothing happened
Is it possible to create a component in a blueprint that isn't an Actor? I want to create a Shape inside a component blueprint.
I c. Thx 👍
I have an animation that needs to have custom logic
When the start signal is sent - it starts looping
When the stop signal is sent - it's stopping looping and continue play animation to the end. If less than half animation played (on the stop moment) - it plays in reverse direction to the first frame of animation
Do i need to implement this via Animation Blueprints?
Quick question if anyone can help, or at the very least point me in the right direction, I'm working on a space rts project and I've been having some issues with getting the pawns (ships) to move correctly, my goal is to get the ships to move similar to like the ships in Battlefleet Gothic 2, like with acceleration, smooth turning, ramming, ect, I've already got combat working just need to get the ships to move now, I expect I'll have to do a bunch of stuff to achieve this just need a bit of help, also if possible I'd like to do all of it or at least most of it using BP as I'm pretty bad with C++
Is it possible to find where a variable is first modified?
this project has a variable of Character type. And it is referenced once in the project. I am trying to find where it is getting set at
ctrl F on any blueprint. Type the character type, then click on the binocusular icon. It will iterate to all blueprints to find the keyword
Yeah I do that and I see only 1 reference to it
i found it. it was on a spawn actor node
Is there a way that I can add mapping context when I start a level without having a player character? I need to use Input keys to a Main Menu Level
Do it in the player controller
what should I connect the target to?
Not sure what you're talking about. When adding mapping contexts it's usually the enhanced input subsystem as the target.
do you mean this one?
We also have a channel for #enhanced-input-system if you need more help
oh I didn't know that thank you
In my game i control a tank and i fight other tanks.
Some of these tanks are destroyed, others surrender and get captured.
So when i capture them, i get their mesh, and all their variables stored in a struct, and store this struct in an array called CapturedTanks_Array. So now i destroy the tank.
Whenever i need to change to one of the CapturedTanks i just go on the CapturedTanks_Array and get the necessary data and update each variable of my current tank, including the mesh, etc...
The other alternative is to not destroy the enemy tank when capturing it, and instead, turn off its AI functionalities, and hide it from the game.
Then when i need to cycle through my tanks and select one of the Captured tanks, i simply unhide it and place them in front of my camera
this is so confusing
Does anyone here have done something similar to this?
Is there anyway at all to do my tick event for setting rotation on my widget component from the actual widget components blueprint?
Seems like the set rotation is scene component but it says it will never be able to cast to that
I have it working on my creature object blueprint. Just wanted to see if I could store the logic in my widget instead
why not? casting is just a type check.
What are you trying to do here?
I know what it is lol. It just said it will always fail
it will only fail when u are feeding something that it's not
I never have any cast fail cuz I know what im casting
what are you trying to cast vs what u are casting?
then u are not casting the right type
can u just show what u are trying to cast
a screen shoot preferably
Sec. In car. Let me pull laptop out
wut, nvm lol
Wifes driving so I'm good lol
ahh ok
Hi all, is there a node that 'logs errors'? like log if the owner is not a Character
So cold on pc now
bumpy road ug
Currently where its at, where I can run it fine
I was curious if I could run it from the uh UMG.UserWidget
somehow
Yeah, just print something on cast failed
@carmine palm So what are you trying to cast here?
what don't work?
you can do that in your widget bp
I don't know if there is a way to use set world rotation
but u will still need to get proper reference
why not
u don't want to rotate the widget, you want to rotate the widget component
Your UserWidget is not a widget component
so you need to get a reference to the HealthBarWidget Widget component
In your HealthBarWidget UserWidget -> Get a reference to the HealthBarWidget WidgetComponent -> Set the World rotation to w/e you calculate
Thanks! I was a little worried that Log String and Print String only works in development build, and after some searching i found that to enable it in Shipping build we need to build the engine from source 🥲
In blueprint, inside a function with a return (e.g. a boolean return), I assume the return value for execution paths that do not lead to a Return Node are just the default value for the return type? So in the case of a bool, it would be 'false'? 
test it 🙂
Seems to be correct*** for bools at least 
it should be the default value, what magic changed it?
And is the logical thing to happen -- that or it should refuse to compile with uncapped execution paths 
imma check quickly
I found issue lol
See my edit
I meant true like correct not true like "the boolean returned true" 
It was true that it was false 
What
gotchya
should be for everything imo, not just bools
Si
any one know how to manually change the angle of the third person CameraBoom? (with something other than player input lol ) ( such as stepping on a trigger)
this has been bugging me for a while lol
yeah it is, ptr expects to be looking at some other object, and if that object is missing its "null"
pure guess but if u are using controller rotation, you can call the set Control Rotation node
by angle I assumed you mean where the camera is looking at?
Im working off the default 3rd person BP so if that is what they used I can give it a try
Get Player Controller -> Set Control rotation
yeah in relation to the player , so im looking to lock it to there left or to a top down perspective etc
thanks I will take a look
hmm then we might be thingking something different
ah lol , i will give it a shot. but after a short brake , my vision is getting blurry 😅
if u want to switch between tps and top down perspective
u probably should just change the socket offset (the spring arm)
Ye i havent sleep for 27 hours too
getting coffe
"top down perspective" is an example im looking to set the character to some spleens were they move in 3D untill they hit a 2.5D zone
I beleve "nier automata" and "sonic fronters" did this huh sonic was made in unreal as well lol
but yeah I have my character locking and unlocking from the spelean but my forward direction is still set by the camera angle so i have ben trying to lock that in .
I have not noticed the "socket offset" so I will look at that too when I get back
I cant see what ime typing now so defiantly need a brake lol
thanks
So I have a Mob Spawner that has a struct that takes in class ref of my Creatures blueprint
(This is creatures blueprint)
Where ACreatureObject is the main info of it. (Model, attributes, debugModel, Alternate materials,etc)
From class how can I access that component?
Because right now Im using it for spawn actor by class
But I need the info pre-spawn also lol
Get class default
If the variable is not private, you should be able to see it
Show screen shoot
Sec
Im reworking it
to see if its why
Right now I have it set in struct to accept Object Class Reference
Since what I need is a bp
yea its because its not casted to a specific class and is just object class ref
I don't get how this works. This is supposed to be some code for adding a Roll to a spaceship
What I don't get is that the Lerp is taking 2 vectors that (seem to me) are constant ? So why not write Constant*ForwardVector directly ?
Yeah lerp in this case is completely useless.
It's constantly converting 10% of whatever the value is from the earlier calculations.
Yeah that's what I though too. Such a weird piece of code. It's from a youtube tutorial and nobody in the comment seems to care, so I wonder if I'm missing something
Can you modify a class in blueprint? Or use one as a template and create a soft instance of it to build a temporary version of it before you use it
No delegate for this event 😮
Other than the official unreal ones does anyone have some links on how to keep references down/using soft references effectivly/reducing memory use?
I'm trying really hard to fully understand this stuff but I'm feeling that I only partially get it just watching the official unreal tutorials
I have found a solution to this
Think soft references as an address. That's basically it in nut shell
i get that much
If the issue is about casting that produce hard ref, there isn't much you can do in bp land imo. It's just the overhead that comes with bp.
Interface isn't really the answer and most of the time ppl end up creating hard ref in the interface which defeat the purpose.
Casting to cpp class is free
it's the appropriate use I'm struggling with
or the limitations
So I need more reading material really
or some advanced guidance maybe
The use is straight forward. It's only a path. You can tell the engine to load w.e the path is pointing at
I've used them successfully sometimes
but i'm at a loss others
maybe I don't understand some basic concepts
but it always comes out an object?
You mostly use it for textures, materials etc
but how do I get more specific?
No point to load them when not needed
Take example data table
U don't want to point to an actual texture
Because doing so will load every texture in the project
that's what I've used it for
but I still have a lot of hard references
and I'm not sure how to use it or if it's usable in many cases
What's wrong with hard ref?
The point is for the material to not be loaded
Or w.e the soft pointer points to
I'm looking at this
and trying to wrap my head around more easy places to apply soft references
some of these I think I can tackle like I hard reference some assets at construction
others I'm a bit lost on
For me, I use soft ref to load just about everything on the end
Anim blueprint is soft ref, skeletal mesh is soft ref, texture is soft ref
Don't want to have a chain reaction that loads
I was trying to decouple gamemode from questgiver
You can't really escape casting
Casting is not a problem tho
so I should have focused on making quest giver small?
The problem is the hard ref it created
yes
Casting to cpp class is free and doesn't load it to memory
So Ur option if you care soo much about what's load to memory is to cast to cpp class
ah yeah I am seeing the use of CPP here
Yup totally. My old project is bp only
I pretty much load the entire game in main menu
I read today that C++ variables are free to reference or something along those lines?
Casting to cpp class doesn't come with the overhead vs when casting to bp class
so is it unrealistic to make a game with a lot of assets without some C++
as it would become very memory heavy?
Ideally I want to make a fun somewhat large game with many objects
Depends. If you want to make a pacman then you wouldn't need to optimise
but I also want it to take under 4gb ram running
Yeah I wish my dreams were packman
Maybe sometime
My old game is 5 gb. Took me a min to load the main menu because it loads the whole game.
My new project uses soft ref. I load under a second
but right now my dreams are more a small breath of the wild
or like an old zelda title with open world
so that's still quite a lot of stuff
lots of monsters and outfits
those seem ok unless I need to make events happen in them
then i'm very confused
how big was your 5gb game?
like conceptually
Is it naive to think I can extend my current work into c++ or does it really call for a restart?
Hmm quiet big. It's not an open world but the assets folder is about 50 gb
ah yeah that's the size I'm looking at eventually I think
Everything is doable I don't know the scope or qualified to give such advice
fair
But I'm sure as he'll not gonna rewrite my old game
thanks a bunch
I'm still early on
but i've been building out systems for a year so it'd suck to restart too hard
I'm sure a lot of it is salvagable
I'm feeling that
I don't even know soft ref till last year
I do want to get into c++ at least for the GAS system
so I should probably just bite the bullet soon
mm
well that might be what I do in the new year
maybe it can be my new years resolution
Best of luck to your proj
@small relic https://80.lv/articles/tutorial-recreating-zelda-s-climbing-mechanic-in-unreal-engine-5/
Just wanna leave it here incase you are interested
Imo makes rpg game soo much neater
I just updated from 5.2.1 to 5.3.2 and for some reason I can no longer use "Set Actor Rotation" for Y rotations or set the Capsule rotation on the same axis, I tried using control rotation but it only changes where the camera seems to be aiming at, I did try it on third person template as well but I still have the same issues.
Ah yes I actually already have a climbing system!
thanks!
this might be useful though I'll look at it later
soon i'm going to upgrade it into a colide and slide system so hopefully it'll be even more robust
That is amazing
Hello, Is there anyway to convert FString to GUID type?
I want to convert file path as a FString and then turn string into GUID
@coral star https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Guid/ParseStringtoGuid/
Try this
Parse String to Guid
I tried that one already but it seems that it only converts into guid when the string has the right format..
Perhaps as it should
So I just made a hash function to generate integer
when I try that it gives me 000000000.. like this
return TextKeyUtil::HashString(FilePath);
Ye prob need to give it right format. I never try string to guid only guid to string
@coral star why don't u ask in #cpp ? Got bright minds there
If no one answered you yet, you can bump your question there. Mind the #rules on cross-posting
Hi I have 2 Camera Actors in my Level and I'm Activating Both Cameras for Player 1 and Player 0. These cameras gets set when i preview in standalone but when i test a an android packaged build they do not gets set. Any clue what might be the issue. Trying to figure out the problem from last 2 days, So it will be much appreciated.
Anyone know how I can force input to only be 1 or -1? When I use the keyboard and jump switch direction on my jump, the speed is instantly changed, but when I try the same with controller it is not. Even for the D-Pad which is a bit weird, as that feel more like a "button"
You can snap the value before passing it to add input node
If less than 0 pass -1 if higher than 0 pass 1
hi there how can i make a simple clock timer from this ?
What is this even suppose to do?
Like this? (Just wanna make sure I'm not dumb and doing something wrong here)
U are adding one to hour min and second
nothing yet
Try it I guess
Well it doesn't make sense atm
yeah no i want to get a working clock with hours and minutes
but i'll figure out i think i found something
yeah no definetly ahah
Just run a timer that add 1 second every second
You can convert total seconds to date
Seems to work
ok thanks i'll do that ! and i guess say that if it reaches 60 sec go to the next minute
You just need the total seconds afaik. So if u feed 300 seconds to convert to date node. The output would be 5 minutes 0 second
oh ok right
So all u need here is a timer that increment a variable every second
Forgot the node name, hope u find it
There is also modulo for quick conversion but you want to use the in built date type because it converts to days and beyond
Hello, how to verify if a player has Internet ?
cools damn yeah i'll try to find this node
For what purpose? If you need to do http request just do that and check if it succseed or failed
My http request crash because I dont have internet
That will never fire
U reset the timer every frame
it works when i plugged in delta time
Don't?
yeah haha it doesnt work properly
Run the timer when you want. On begin play or on some custom event where you can call
Calling the timer again before the timer expired will reset it
It affray me
ok i'll do that
Event construct is the equivalent of event begin play in a widget?
oh ok i got it thanks didn't get that
Not sure, but more or less I suppose
If the timer needs to exist outside the widget don't place in the widget
ok thanks
Any way to know if a Blueprint was duplicated in editor? In cpp there is PostDuplicate...
is there an inbuilt way to convert catmull rom to regular (spline component) splines?
I asked in #materials but im curious if anyone know if I can get the material attributes of a static mesh in blue prints? Such as Base color / diffuse, specularity, normal, ao, etc.
I'm working off a situation where I cant access the materials of the static mesh so i need to get their attributes, pipe it into a replacement material ans apply that in BP
Is it not possible to set custom animation attributes?
if i need to weapon aim at place of my crosshair (in third person), do i need to trace ray every frame?
cuz it looks kinda expensive
its not expensive
am i insane? So i want something pretty simple.
If the hand didn't collide i want the branch to change the bar color anyway
but if i put the "collided" to false at the start then the branch just goes with it
why the main mesh is showing?
Hello, does anyone know whether it's possible to make gameplay tag property show only a certain hierarchy using just blueprints? In C++ it's usually done by using meta=(Categories="X.Y.Z"), but I can't find anything like that in blueprints
Try ticking owner no see on the red mesh component
Or actor hidden in game or untick all of the vissibility flags
Looking for a good method To dynamically scale the collision capsule based on the standing heigh of the VR player and them crouching . Anyone got any good ideas before I overcomplicate it ; ) This is what Im planning to run on tick. I was thinking of a distance to ground from the camera?
Or This?
work, but the aniamtion stop, because the main mesh not tick the bone
i solve this, make material transulen
How to change this default actor icon? Cant find any icon-like property
Seems like thats DefaultSceneRoot's renderer
I personally won't do that in my game. Too heavy, you also have an extra skeleton
yeah this is not like a profesional
Billboard?
Well that thing you see is a billboard I think
Kind of internal one
How do i set the class to be selected at runtime.
As is its BP_M2E2, but sometimes i need it to be something else depending on the output, is this possible?
Child actor is known to be buggy and broken anyway. I personally don't use any soo far
Only in c++ sadly
yup that did it 👍
now i just need to figure out what info i can get from the spline to keep it locked to the corrects angle as the player turns corners
that will wait untill after work lol
yeah I crashed after my last message last night
thanks
this is what the BP looks like and it locks it in behind me so looks like I want an offset for this rotator that it gave me when plunging in the spline tangent
can i add interface to animation blueprint?
or i should just make a base class and derive from it?
reeally? why though? its working great here
it makes an actor behave like a component, kind of
so when you delete the parent actor it also deletes the child actor
It's been repeatedly said by the wise people on this server. I never personally use it my self but repeated statement about it is enough to not make me touch it
2 broken things in unreal is bp struct and child actor
okay maybe thats why i was having some super weird unexplainable crashes
I'm not sure if that's the reason. I never asked them what can actually go wrong
yeah, well im using both lol. but the struct is defined in c++. but im making an instance of it in bp. is this fine?
Yeah struct declared in cpp is the way to go.
That's totally fine yeah
And what u suppose to do
Hard to make game without struct
How would I go about selecting a static mesh based on a string input?
basically I want to set the mesh based on the actors name
cant find a way
You can use switch on string but I won't recommend it
One way is to also use data table
I tried using "select" node
but how do you output something different
Switch not select
ah, let me check
With switch is a way but I won't do that
I would use data table for something big
what option makes sense for you
Data table and just feed name. The output would be the mesh. Just make sure it's a soft object ref
U don't want to load all the mesh when you don't have to
Unless Ur game is small and the mesh gonna be loaded always anyway then that don't matter
I don't see why not but it doesn't make sense to do it
What's the point of the interface when communication is only between the owner and the anim instance.
Just cast and call it a day
why one ask min max and the other center and extent?
One is comparing the distance between two boxes. The other is attempting to draw a box. You could probably make your own function to convert between using min/max and extent as needed.
Is there any way to open a level in editor through an editor utility blueprint?
how do I make my own custom table?
Right click on empty space and create data table. You will need to choose a struct. Make one beforehand
Your struct can be just a soft pointer to mesh
So, something like this:
Hello! I'd like to build an item interaction system from scratch. Does anyone know of any good examples of this? I tried Ryan Laley's before but didn't feel very comprehensive.
Not quite, you have to load soft ref
load?
On row found. Do async load or blocking load
it returns an "object" though, incompatible with mesh
U cast the object to static mesh
Then plug it to the set static mesh node
by any chance the beginPlay of the parent class is overriden by default by the children?
Say u have a parent class called animal
And a child called fish
If you have begin play in fish, it will run the begin play version in the fish
If you decide to override begin play in fish, fish will play its own version.
You can always call to parent function tho.
So if u have print animal in begin play in animal class and print fish in fish class
If you spawn a fish to the world. You will get animal fish printed
Have you got this to work?
Launch break right now, I'll continue in a few mins
What I think noticed is that beginplay in parent class doesn't get called
So the whole mesh assignment doesn't happen since it's there
Will check it out
You will need to call to parent function if you want the parent begin play
Right click the begin play and select call to parent
In cpp it's called super
@frosty heron if Add Child Actor is bugged. Then what do i do to add an actor attached to my actor, that also destroys when my actor destroys?
Not sure with the use case. But for things like weapon or armour, I just add skeletal or static mesh component and attach it
The constructors do get called by default I assume
So maybe I can put that there
There's no constructor in blueprint
Construction script is not constructor
Constructor get called first
Not sure what u want to do but you can probably just call to parent function if u have things set there and need the whole code
Construction script is the same anyway, you will need to call your parent construction script
Ah so the inheritance doesn't automatically run construction script you say
Good to know
Afaik it should
I would've assumed the opposite
well yeah but my guns are Blueprint actors because they behave in specific manners... so using Add Child Actor, destroys them if you destroy the parent actor. Whereas if i spawn and use the node Attach Actor to Actor, this doesnt destroy the attached actors
so only the Add Child Actor works for this
So this will not destroy your attached actor
but this will destroy the actor and the child actor
While I don't do fps, I seen credible tutorial not using child actor.
Same with rpg system that I used
So indeed each weapon have different behaviour. But those behaviour are stored in object class
The only thing you need to attach is the visual part
Functionality can be derived from weapon class
in the parent, meaning the character class?
Not quite
so what if you have 100 different gun types
Weapon would be item
And item can have object class that define its behavior
So each item can have different behaviour depending on its class
ahh
Take a look at usable item for example
well i kind of see it
For health potion when used, u will play drink anim
For door u want to play open door anim
so you attach a mesh, and then spawn an object that deals with the behavior?
and you create an object for each behavior
So for usable class u can have child for consumable. Then consumable can have attributes like hp gain or other attribute gain
but most tuts i watch, they create a different blueprint actor for door and for potion
Hmm I would do it like this. To have structs of item as the inventory. When I want to use one of the item , I will select a particular item from the inventory
From there I can get the type, the class and the mesh it has to be used as attachment
Depend on the design
Item-> usable | equipment then branch off from there for example
"From there I can get the type, the class and the mesh it has to be used as attachment"
Usable would be keys, potion etc.
working👍
Component
That's how dynamic combat system from market place does it as well
so you are still spawning a component
Yup but not child actor component. They are not the same
I'm spawning static mesh component.
Or skel mesh
yeah
and then you spawn the object that controls the behavior of this static mesh?
That's cursed I heard. And all of the system I used and learn from doesn't use them
U can spawn as static or skel mesh. Depend on your game
because child actor is bugged. okay. but i prefer actors than components. components are weird, have no constructor and no timeline etc
If your gun have anim then use skel mesh
Nono
U spawn the skel mesh component only for the visual part. The logic is driven by the weapon or item class
That's why they come in one packet
A struct of data
Use item -> call use function in the item -> do the logic to add visual stuff and gameplay logic ( add hp for example )
this is what i dont understand. as of now i have BP_Gun, and in there i have things like input move forward, input shoot
its very convenient
Thats cursed too, u don't normally want to pass input like that
then when i want to switch to a grenade launcher i load BP_GrenadeLauncher that is a child of BP_Gun
But u can still so that with object class anyway
So basically move the logic to the object class
And tie the object class to the static mesh in a data table???
Do you know how to use struct?
Because I would start with inventory then work my way to equipment
yeah
Yeah so u can just have a struct that defines an item
Which can have the object class, the static mesh description, price yada2
yeah
and the object class is the behavior
Exactly

