#blueprint
1 messages · Page 98 of 1
Generates CRC hash of the memory area
You'd need something that convert any non-numeric characters in the string to a number. You can use a free plugin like Low Entry Extended Standard that can convert strings to bytes which you can then work with.
This here is an example of a recursive function that should take a string of any length, and continually compact it by summing the values of each string character until only 4 bytes remain (the size of an int32). The array of bytes can then be used to convert to a number.
Though I wonder if you have a string long enough if you'd always end up with the same seed
thank you!
Point is, you need to convert the string to a numeric value to work with, once you are working with numbers you can use math to do whatever you want to get your seed.
You could do it a bit differently, like say, if you have letters and numbers, you could make a MAP of character (string) > value. Then parse through your string's characters look up the value, and then just add them up to a total.
Okay I know that AddForce is the per-tick one, but on my life I can't remember what the OTHER one is called, the one that's a single big push?
Hello! Is there a way in BP to get the optional level name of an instanced level? Not the outer>level, but the unique instanced level name of an object is part of that sublevel. Thanks!
U might want to check both Launch and Impulse.
@wispy badger game mode if u want to spawn your character with the game mode.
Game mode base if u dont
What's Launch I'm not seeing that one
Drag from character movement component
Hmm. I'd want to spawn my character but manually after some UI animations (Start Game -> Info about the story, etc. -> screen fades -> spawn player)
Would I be able to spawn player via BeginPlay from GameMode or how would it look like?
Oh I'm not using that for this pawn it's all custom movement
You can, I think game mode base is a stripped down version of game mode. I haven't really use it my self.
Alternatively can always override the spawn function and just do your own spawn logic there.
If u want to spawn later then begin gameplay is not the place. You spawn it after Ur story is finished
Hi, I just wanted to share a fundamental knowledge that I missed from UE documentation regarding how Trace Channel works with Block and Overlap settings.
Trace channel on a collision object (static mesh, collision shapes, etc.) must be set to Block for the TraceLineByChannel to pick it up. It will not work if it is set to Overlap.
On the other hand, channel set to Overlap will work with Multi Trace Line By Channel, it will also work for when set to Block. The difference here is that Overlap allows the trace to pass through, reporting the hit, and potentially reporting other hits along the trace, up until an object set to Block is hit - this stops the trace.
I have read through the docs few times and I was unable to locate it, and I figured it out by trial and error. If at least one of you finds it useful, it was worth the effort (doing the screenshots 😉 ).
So a custom event would be best I guess?
Hi I have a question, I want to use loading page till all shaders and texture are ready , but it seems that it always fire the event before all loaded .
Yup
How do u even detect it in the first place?
Streaming is what make the loading faster
Does BP have a verison of "Final" for methods? That makes them so they can be called by child classes but NOT overridden?
I would check what's available on pawn movement. Not sure what's on the menu, only used cmc soo far
Because why not just collapse to function instead?
Honestly I find it collapse to node makes the graph LOOK better, but the price is that both the outer graph AND the inner graph are harder to work with
Collapsed nodes occupy this weird in-between, where they're SORT OF their own function but also not, and it ends up being the worst of both worlds in my opinion.
I tried some plugins and follow after videos
didnt find the way that work
No idea with plugin. Gl tho
is there a way to check if the collsion box overlaps with an actor ? and i dont mean evnt begin overlap i mean like if box overlaps with character do something
That's what begin overlap is?
Okay so I'm making a system where a pawn tries to jump at the player, and basically turns into a projectile until it hits something. The problem is that the pawn starts off touching something, whatever surface it's currently on, and my "on hit" just instantly collides with whatever that starting surface is. How do I fix this?
I've tried adding the currently-colliding actor to the ignore list for collisions, but sometimes there are multiple actors involved (EG a floor with a carpet on it, it could hit either). I've considered making it wait a moment before enabling collision, but the jump is pretty fast so dialing in that wait time is really tough and can result in bad behavior too, where it feels like it SHOULD have hit something but doesn't.
You can use is overlapping actor node to check
If a comp overlap with something
whats the node called?
dnag im stupid thnaks will try
Is this seriously the best way to check whether an actor has a component? Or am I missing a cleaner function?
theres no better way, although testing if an actor has a component seems counterintuitive (unless its a component that only works on a specific actor)
then you could do what character do, and create a function to get its component, or an interface
Basically this is a little bug that jumps at you and explodes. But if it misses, it goes back to crawling around. So it needs a way to know what's a potential victim and what's just a wall it hit. I do that by checking whether the impacted actor has my health component, meaning it can take damage
Tags?
I could use tags but this is easier
Let your health component add a health tag to owner
Win win win
Well if you've made up your mind then...
please can someone give me a video from youtube how to set up curency system ,i want to spend and add money from different events and the money need to be the same on other levels
i searched in youtube and didnt find
this is not what i need
also you'd usually just do isvalid on it
Custom collision channel
I'd use an IsValid check on the component rather than checking if != null.
maybe the request is not good enough
is it just in-game currency or real life etc aswell ?
if its just copper,silver,gold in-game it should be fairly easy
Wait but that wouldn't work because the wall it's jumping FROM would be a valid landing spot if it was jumping TO there
Its always nice when details are added after an attempted solution is presented
did you ask me or no?
You can have no collision for the first ~second or so? to get off ground
use a smaller collision volume so there's no colliding elements
nobody else is talking about currency atm ^^
))
Help...
#blueprint message
so it will be a simple type of coin,when you exit the game it will not save it,when you go to another level it will save,i want to have a shop where i can buy abilities,skins,and to be able to spend and earn money from different events
show code. Bet you're not setting rotation according to rotation at spline point
you gotta do that for it to follow
This is what I'm trying first, we'll see how it goes. The problem with this thing is it realllly doesn't respect collision normally very much at all lol but that's it's own issue.
@gentle urchin
sounds like you want a currency you can trade with real money
they would be two very different concepts...
Thanks...
here...
i believe you need a set rotation aswell
What is the most versatile spot to perform calculations between stats and multipliers to affect things like gameplay abilities? What about the most performant spot?
I'm more comfortable with blueprints but if there's a simple way method with C++ I'm happy to try that too.
Done, but I need the previous and latter points lo rotate as well but with less intensity to bend it a little without separaring the meshes.
Soo... add that ? 😄
personally I'd probably use ISM's for this
c++ will be more performant, thats for sure especially if your doing a lot of calculations
not a big fan of the spline meshes
but bp can handle most stuff
Alright, can you help with an example using insranced static meshes?
am I doing it wrong? My progress bar isnt updating but i tested return values of all of them and they work just fine
Thanks, I don't know a clean way to handle something like that yet, especially with C++. Wondering if there's a semi-standard data structure/blueprint type to use.
the event is firing ?
it is but widget progress bar isnt updating
i put print string at end of percent
it fires everytime
sounds like MaxHealth is 0
I prefer passing both current and max with these events
ensures that the calc is correct,
and not relying on secondary stored variables
Hello, I'm wondering something how can I make an AI backpeddle for like 30m ?
Does it have to do with
that just tells you a a direction actor is facing i dont think thats it
hello guys I would ask you what it the best course for Beginners in blueprint It doesn't matter if it's paid or free
and then there are some more by epic with example projects etc.
plenty of learning content
||I think if you pay Ben, he might give you lessons aswell||
you ever programmed before ?
guys, how do I make it so my actor attaches to the socket? It just stays floating mid air if I disable simulate physics on the fly when its already spawned
why is that?
ok, so lets say I want 15 guns in my game, what is the best way to implement them with blueprints that doesnt take up much storage
do I put them all in the player? or do I make seperate blueprints per gun that the players blueprint can access?
separate bp's
what storage are you concerend about
most storage comes from assets used
not the bp / script files
oh okay
yeah no I was just tyring to keep download size smaller
since the overall game is a smaller game
use low vert meshes, low res textures, etc
so how should I connect the BPS to the player?
im using 1024x1024 textures for the environment and probably lower res for guns, the games going to have a comic book look
but thers going to be a upgrade system that gives the players new guns as they progress, so they can spend points to upgrade, how should I give the players the next gun?
did anyone have this issue with foliage?When i re open the level or open another level and then this,foliage disappears,it says failed to load
Its just a matter of placing a bunch of ism's at decent distances along the spline
hey so for the gun blueprints, should I put all the variables of the gun into the gun blueprint or player blueprint? things like mag cap size, animations, audio?
man now im confused what do you mean master gun bp?
you'd want to use inheritance to avoid doing the logic several times
so there's gonna be commonalities between all guns
All of them can "Fire"
all of them can "Reload"
all of them got some projectile type
etc etc
all common things go into a parent blueprint
okay? next question do I make the blueprint a pawn or actor?
all specific things (common things specified) goes into child
Actor
It's not directly controllable (as a pawn would be)
okay, and the master gun BP is basically a template to copy paste?
pawns and characters are ment to be possessed by players
not copy paste. Avoid copy paste 🙂
you create one master gun
yeah?
and all other guns are a child of master gun
and if they need some unique things, they simply override what the master gun provides
how would that work? would it all be in one bp or many BP's?
many bps
okay so how do I make child bp's?
so 16 bps for 15 guns
1 master gun
15 child of master gun
Right click the asset -> Make child blueprint
okay, so in the master bp make all the variables, then in the child bps put assets like the model, animations what not, make sure they are children of the master gun?
yepp
master gun also provides a default implementation for the basic events
like Fire
Reload
StopFire
ChangeFireMode (?)
ADS. who knows 😄
only you know
there is going to be ADSing, ill tell you if I Run into any issues
okay
wait one more thing, how do I link sounds and animations to variables?
you create a variable of the correct type in the master_gun,
can leave their defaults to nothing
then in a child bp, you simply select the asset in the details panel
what would be the correct variable type for a animation / sound effect exactly?
how do I communicate that the player clicked left mouse button between the gun and player scripts?
Player BP has some variable for the current gun
which is connected to the LMB click event
LMB -> If Gun.IsValid -> Gun.Fire()
so how do I get the script to tell the gun when to fire? do I have to use a event dispatcher or something
You simply call the event on the gun reference
also how do I get the gun in the players hands to begin with? do I just drag it into the playercharacter bp?
Hi! curious if someone could solve my issue. Im trying to get an object to follow a spline path, and while it does that, it always moves to zero world location when in play mode. Even though i set the spline path at specific points in the environment. Any suggestions?
This really is tutorial material
wdym?
any thing peculiar about these points
My car runs smoothly, but it's a rather short track
theres a spinning blade that should move along the path, however when i go into play mode the whole system appears to move to the 0 world location where the cube is. For clarity, the blade does move and rotate .. its just in the wrong world position, not where the points are on the path.
I actually cant find any tutorial on implementing multiple weapons into a game
I just need to know how im supposed to attach the gun to the player and get the scripts communicating with each other
and then how to switch through guns as the game progresses
is the ref valid ?
you get that from any gun tutorial
wrong
errrr
I just tried watching one and it straight up had no possible way to do multiple guns, the m4 that the tutorial was showing was linked directly to the player, there was no blueprint connections, both the arm and gun models where just part of the controller
im so irritated and I dont know what to od
also watch the pinned link for blueprint communications
yup, appears to be.
And the distance is within the limitd of the spline?
You're using local vectors
Not world
You want world
Is it possible to reverse the direction of the fade on a niagra beam? Currently the origin is solid with it getting more transparent towards the beam end. Ideally I want it the other way around.
Cant you do a 1- to it
Are you talking about within the material itself?
I've searched through the whole Niagra system and I couldn't find an option for it, however, the material already had a 1- in it. Removing it solved it. Thank you.
I'm building a closed captioning system by spawning Text3D components (for reasons) - 1 for each word - but then after a full line has been built, I'd like to animate the entire line to scroll it upward.
My question is how would you structure this so that you don't have to animate each word individually, but just animate the whole line as an entity. Would you group them (programatically in BP) or parent them, or merge the meshes? What's the simplest approach that lets you transform the entire line as a unit?
is there anything else in the actor besides the captions?
you can just move the root component
if not then you attach the text to a scene component that is not the root and move that
The caption actor spawner has to handle multiple individual lines. Like 3 at a time. So it needs to remain fixed.
yea so 1 scene component per line
I'll need to figure out how to dynamically create these "parent" components (and then destroy them later so I only have like 4 at a time). Is there a base kind of dummy container that's best suited for this?
you just add component by class, grab your array of text then attach every index to the scene component you just made
however
you will probably want to make an actor per line or create components you spawn in and destroy to manage individual lines
in blueprints your only real options to animate the upwards movement are tick events and timelines
you cannot make a timeline at runtime
I like the idea of making a "line" component that you spwan in dynamically and then have a kind of addWord() function that dynamically attaches the word and positions it correctly.
yea make a caption manager that spawns caption actors per line
it will make your life much easier for the movement
I was really hoping to avoid hand-bombing the animation using tick events. Since the movement will always be a fixed distance (like up 100 pixels), I think I can create that timeline and then maybe attach it programmatically...? Never tried that before
Can you just attach various actors to a timeline when you want to animate them and then detach / dispose of them when the animation is done and reuse that timeline for the next ones?
I still am lost trying to setup guns in my game, I am trying to make support for upwards of 15 guns
all the timeline does is scale a value over time using a curve
Or maybe your original idea of moving the whole dang text spawner - it will just get higher and higher but that's prolly ok, since I will be destroying the lines once they should not be visible anymore....
you can do that with event tick too, (in fact it's often the better approach)
but the issue is
you need to animate the lines independently
oh wait
only one will move up at a time right?
forget what I said then, silly oversight
no, your instinct is right. It's kind of a "rolling" 3 lines of text....
The next challenge will be - how do you create a "window" that clips or crops the lines so that when they go outside the window they are no longer visible....
yea this is simple
(don't forget I'm not doing this in UI but as Text3D actors)
this is a good usecase of event tick
move all your scene components up a bit every frame and check if they exceed a certain value on their z position, if so destroy them and the attached text components
hand-bomb it is then
Yes, that is a good approach. The only thing is that the text should get "cropped" by its "window". Like you move the text up and then the tops of the letters are cut off and you move it up some more and more of the letters are cut off and then when the letters are no longer visible you destroy the line. Rinse and repeat. I just don't know how to achieve that 'crop" effect.
Think of scrolling through a web page on your mobile phone or web browser.
that has to be done with a shader
it should be fairly simple though
You've given me a good start. Appreciat ethe time and the advice
Hello,
A quick question.
I watched a tutorial on keep persistent information like color material choices stored in variables in the Gamestate and in a GameInstance.
I just dont fully understand why the info would be split up between the Gamestate and the GameInstance.
Why not keep all the info stored in either the GameInstance or the Gamestate?
Does anyone know the answer to this? 🙂
TY 🙂
Does it matter?
I am using event dispatchers to pass on the info to a gamesaveobject.
gamestate is just a kind of global gamemode for multiplayer games.
gameinstance is a class that persists from the moment you open the game to the moment you close it, it is where you handle things like saving, loading and level transitions.
I see
So no disatvantage if I have variables that store info in either or?
It seems you can store it in both
well if the level is unloaded so is the gamemode/gamestate
Or is one better for this use than the other one
I see I have only one level
So if I have only one level in the game it shouldn't matter right?
Just wondering.... whats the best practice for having blueprints communicate with each other? Creating a function? so for instance i want up and down buttons for an elevator. The elevator will only go 2 floors. one button on the bottom floor, one button on the top floor and 2 buttons in the elevator. now for this should i be creating blue prints for the buttons with instances or do i make the buttons in the elevator blueprint?
I don't know what you are doing, but the color choices, that I presume are dynamic material parameters, should only be relevant to the actors in which they are used
if you want saving/loading then the instance and those actors will be relevant
but I don't see how the gamemode or gamestate are
I have a customization thing going where the player chooses matrials and colors it builds in a structure.
I see so the game instance would be a better choice to store all those variables in then?
yea then the structure should keep its colors, if you, say, have a wall, and you make it red, then that only concerns the wall
it should be keeping its own color
for saving and loading yes
I see ok that answers my question thank you
but you'd not really store it there, just use it to manage them
they'd be stored in a savegame object
Yup I am storing them in the game instance and then it fires over to the savegame object via event dispatchers
So I am using material interfaces
As outputs on the event dispatchers
you can probably make the whole elevator a single actor, if that works for you. If you want separate actor buttons you'd use a blueprint interface function that sends over an integer with the floor the button is on to tell it to move there
though if the buttons are only ever used with the elevator and you don't want them for anything else
you can really just cast
have an elevator reference as a public variable on the buttons as well as the floor and you're good to go
the buttons in the elevator should be part of the elevator
Thanks for the input appriate it 🙂
I'm wanting to figure out how actors can interact with each other for learning purposes. honestly i want it to only work when the power is activated and then work from buttons on each floor.
The buttons in the elevator are part of the elevator BP but its hard to figure out placement for the ones outside. I really just want to figure out BP interactions
if you have like a power generator, give it an array to store all the things it powers and if it is shut on or off you can use a blueprint interface or event dispatcher to notify the connected blueprints
then they can store whether they are powered in a boolean locally
or you can go the other way around and make everything query if it has a valid power source
TY i've checked it out but its a little greek to me, i learn much better when having guidance and asking questions
ADHD brain
what isn't covered here is actor components
they are also a vital communication tool
I'll read it over again after my class
because you can pretty safely hard reference those
kinda like interfaces but you can handle implementation
I'm doing druid mechanics courses on udemy and a few courses on youtube and GameDev.tv
It's nice having so many different ways to achieve things. but its a bit overwhelming lol
yea it takes some experience to know what to do when
Hello!
New to Overlay materials. I was trying to simply set an Overlay material via blueprint using the mesh as target.
Nothing seems to happen.
So I manually add the over material on the mesh, still nothing.
If I add an index in the Overlay Materials and then add it, that seems to work
Just not sure I understand why / how to make it work via blueprints
I did some stuff for functionality of a basic elevator for my level design class because i've only been working with box collision triggers. he told me to use flip flop instead of = for up and down
One of my bps never seems to leave the unsaved state. When I close and save all it does not lose anything but once launched it's unsaved again. Should i be worried?
I'm trying to make a d20 physically in the game. I want to be able to roll the dice In a 3d space but also have it calculate a number for combat
Kinda specific because it needs to be able to be rolled to tabulate a few different things
I'd disregard a lot of what you learn from gamedev.tv.
They're notoriously one of the worst if not the worst creator for unreal
which is ironic because they're great for Unity
Explains a lot about Unity 😈
Question for anyone familiar with the Common UI plugin. I have 3 common activateable widget stacks for adding and removing different menu types (game, menu, and modal). When I trigger my button to open my pause menu im pushing a common activateable widget to my menu stack. This all works fine. Im running into an issue however where in my pause menu I have a button to open my settings. I was just going to push another common activatable widget to my menu stack once the button was pressed, however for some reason its displaying it behind my pause menu (the activatable widget I had already pushed to the stack). I was under the impression the last pushed widget of a stack would display on top of the other widgets in the same stack? I can deactivate my pause menu, but then you get the weird fade in and out transitions from the activatable stack for both widgets when you close the settings menu (which I want, just not in this specific situation as it looks weird).
I was pushing it to the wrong stack. I even checked it like 5+ times too. Thats an hour I'll never get back
Is there a way to prevent the CharacterMovement Component from randomly corrupting? I am in UE5 and this keeps happening
oh really?
Anyone know how to go about making a pressure plate that works with a physics simulated cube, not with playing a timeline on the cube hitting it, but like actual physics when placing the cube on the pressure plate itll weigh it down which will activate the door at a certain point and when you lift it the pressure plate will rise up as your lifting it. I tried looking for some tutorials about it and coundn't seem to find anything
Is there a good way to add additional collision spheres to body parts or weapons to block characters from phasing through walls? I can get a static sphere to block movement, but I can't attach it to anything and get a good result.
Anyone tried to set Chat GBT up to do repetitive coding in BP?
I have miles of code I have to do with saving and loading in UE4 and just wondering how I can create some kind of "macro" that just changes variables but repeats code in BP.
A lot of it is copy and paste but I have to change variables and a few nodes here and there.
No. Chat GPT is crap at UE
If you have to repeat yourself that many times, you should prly look into learning inheritance, bp function libraries, and so on
Your'e right I should use more functions.
Prob is there is so much change I have to do with each repeat that it would create massive functions with so many variables that I might as well just code it without a function.
I knew this when I started the project though I was one the fence weather I should create bigger functions or break things up into more "sections" of code.
yea, I do lots of physics stuff like that in my game, including proper pressure plates
unfortunately I could never get those to really work 100% reliably
the force actually exerted on it can vary a good bit
and I was never able to calculate what to set the physics constraints to based on target weight
Where are public variables in a level blueprint located in the editer?
I'd think nowhere
there isn't really any per instance editing for levels afaik
hm, is there any point to making a variable public in the level bp?
no, not really
though I don't think there is any point to make a variable in the level bp at all
Refactoring is life
does anyone know how is this node called?
Increment @dusty flint
If you are looking for the opposite , that would be decrement
OMG!! thank you so much <3
Shouldn't even use level bp 99% of the time
I only found out about increment in blueprints recently
immediately went to replace all my add 1 > set nodes
What should I use to mess around with my directional sunlight?
I would make a bp with a directional light component
And just drop it to the level I want
I like putting all the sky and atmosphere stuff in a single actor
like coldsummer suggested
but you can make a separate manager too
Man I'm dumb completely forgot you can do that. Prob cuz unreal just has it built in the level
Less nods is soo much better. Bp become spaghetti monster fairly quickly
which is why I still don't get why we use get nodes
control rig did away with them mostly
I actually have 2 directional light for my purpose. So I make a bp that also tell my directional light to be rotated according to player control rotation for my need.
Saves me time copy pasting logic by having it in a single bp. I just drop my custom directional light bp to every level
Yea that's a good idea. Thanks!
Hi! i have one question, could i end a simulation with a node?
Simulation is just playing without possessing any character
You can exit play with a bp node
https://www.youtube.com/watch?v=WiDWeb89W58&t=111s anyone know how to make a item slot system that generates an output when the item is in the slot like the one shown at 0:13 in this video?
GRAB THE ASSET HERE: https://www.unrealengine.com/marketplace/en-US/product/interaction-system-starter-pack
Join the community discord! https://discord.gg/QrQwt5aGSq
Watch the SETUP GUIDE: https://youtu.be/HTso3l65ff4
This starter kit can be imported into any Unreal Engine 5 project within a matter of minutes!
Make sure to follow the Intera...
Did world space fix it ?
I am using this BP to throw a ball and to trigger ragdoll to the actor that gets hit. The ragdoll only seems to get triggered when the character walks into it, but not when it was hit by it from the throw :/ Anyone know why?
Throw:
I tried having the collision set up to ragdoll and block all. Still have the same issue. It doesn't work when it's hit by the ball. Only when they hit it by walking into it.
I've made this little blueprint setup where I get the angle distance between two rotators
it works ok, but the issue is that the values only go into positive
I need to make it go to positive and negative depending on the rotation direction
make sure the actor that is hit has "Simulate Hit Events" enabled
same for the thrown actor
yeah I have this checked
oh maybe I didn't for the thrown actor
First you have to watch a tutorial to learn how to do the system where you can pick objects in front of you. For the slot, it's easy, it's just an actor with a collision box in it that checks (cast) to your "cube" actor when it begin overlap with it, if the cast succeed that means you put the right actor, then you can call your logic to open the door
maybe if I multiply the acos result with the right vector?
I have it enabled on all of them X(
try using the print strings to debug the functionalities
ok, i have a pickup system where it lets me pick up any object with physics, and i have a cube bp called physics cube which i have placed. Do u know how i can make it check to see which specific item actor is grabbed and then if that specific actor enters the slot bp collision it will automatically make me stop grabbing it and smoothly move it to the targeted spot
hmmm, nop, didn't work
also this is the main code i have for my grabbing system
Let's say that I have 9 separate Blueprints all placed into a level, all basically the same save for different static meshes; how much performance impact is it compared to having 1 single parent BP placed 9 times in the level?
When the object enter the "begin overlap" of the collision box, you :
0 - Cast to see if the actor who overlapped the box collision is your cube
1 - Disable its physics
2 - You set the boolean "IsGrabbingObject" on your player to "false"
3 - You get the reference of the actor who entered the box collision from the "begin overlap event" and you set its position to the final position inside the slot
Nothing to ever talk about again unless some stat shows you that its an issue
It depends on the assets usedmim the bp, how they are loaded, and so on. Script in isolation takes up virtually no space at all
With that being said, im a fan of not repeating work so i'd have 1 placed 9 times.
You forgot to divide by the (mag a * mag b) https://youtu.be/WDdR5s0C4cY
Thanks to all of you who support me on Patreon. You da real mvps! $1 per month helps!! :) https://www.patreon.com/patrickjmt !! Dot Product : Find Angle Between Two Vectors.
Here I do another quick example of using the dot product to find the angle between two vectors.
yeah same; i'm just updating some outdated assets in the team project i'm working on
just wondering if it's worth the hassle at all of asking the environment artist to make sure everything's fine after i consolidate the BPs
i'll still just do it; makes the workflow of updating the code in them much easier
Worth the hassle almost every day
there's no mag in blueprint
im pretty sure its magnitude but im not sure if that node exists either
its what I just said
What's the shortcut key to navigate to the content browser of the bp class that im currently in?
just remember that there is a button right next to the save icon
Lmfao
I went in the editor settings and looked through the shortcut key and did not find any
And it was there the whole time
It's called "Vector Length"
all I want is to get the angle distance between the two rotators and also want the angle distance result to go negative aswell, not just positive depending on the direction which the control rotation is rotating to
In the video they don't use the "GetFowardVector" so maybe that's the cause of your issue ?
ok thanks! I'm pretty sure i got it working good now, only thing is since i set simulate physics to false it will not let me pick it back up since it isn't simulating physics and i can only pickup objects that are simulating physics.
Then I guess don't disable simulating physics
got it working nice and fine with this
the only problem is if i keep simulating physics on when it goes into the slot it kinda glitches out and pops out cause its colliding with the slot im putting it into a little bit, and i also dont want to be able the player to be able to knock it out by accidentally walking into it
do u have any ideas for a possible fix?
you simply need to disable the physics when you don't want them to work
yeah but my cube can only be grabbed if it is simulating physics, so i wont be able to grab it again to take it out
to fix it you will need to change your code to let you pick objects even if they don't have physics on the first place like for instance by creating a parent class that will be the base class of all your pickable actors that you will derive from and cast to that class when you want to pick up that object and enable physics only when you release your mouse to release the actor
you might need this
unless its that what you're using?
i dont think so im just using E key event when held down my objects is being held and as soon as i let go it drops
and whats the slot?
is this code in its own bp with a few cubes to make up the model and box collision
Do what I told you to do 🙂
im not exactly sure how to make it so it doesn't need physics to grab it though, i watched a tutorial and it just says that it wont work if simulate physics isnt on for the cube
Do you understand inheritence ?
uh not really
Do you have other actors that you want to pickup besides your "Cubes" ?
no, well i originally had it so i could pickup any thing that i placed in my scene that had simulate physics on, but now its just an actor i have called BP_PhysicsCube and i might add more different ones that server different purposed like BP_PhysicsBattery which are batteries i can grab
Then do you know how to use tags ?
no
is it like the trace responses?
so if the trace response comes back as an item that is grabable then i can grab it?
In this episode we take a look at tags, how to use them and what they can be used for in Unreal engine 4 and Unreal engine 5.
Support me on Patreon here: https://www.patreon.com/LeafBranchGames
Join the Discord server here: https://discord.gg/zBeebU7uv3
You can use this and you put tags on your pickable objects and when you press E to do the raycast it checks if the actor it hits has the tag you set, if yes then you can call your logic like you're doing above, so that way you don't use physics as criteria to pick up objects
and this will solve your issue with the slot where you will need to disable physics
but with tags you will be able to pick it up again and then you will be able to enable its physics again
ok i added a tag to my BP_PhysicsCube and make it check first to see if the hit actor has tag and if it does then it will grab the component, but it still only seems to work if i have physics set to on
Enable the physics first before grabbing
wait where like after my 2nd branch node there?
yes on the true of the second branch
how do i get a reference to change it on my main bp?
or do i just drag out from the hit component or hit actor?
get the hit actor
or hit the component rather
as the physics is applied on the component if I'm not mistaking
the physics is on your component or the root of the BP ?
on the static mesh which is a cube so yah
nice it works now thanks!
only weird thing is i have a delay until i can pick it back up again
the slot part works too ?
im pretty sure yeah
if i get in range of the slot collision it smoothly lerps to the location
and then if i press e to pick it back up it lets me do it
there is just a short delay though
I have no clue what's the reason of the delay
maybe it's because you're enabling physics too fast as it's still colliding with the slot
could it be cause the timeline is 2 second long so it needs to finish that out fully before it can let me grab it
yeah maybe
alr yeah that was it, everything should be fully sorted out now, only thing i need to do now is make sure i cant put in an actor if one is already inside but i should be able to figure that out.
thanks for all the help!
Does anyone has/know a blueprint tutorial about inventory system with auto pickup instead of using button like [E]?
You know, just like minecraft when they autopick the loot
In this video I teach you how to create your very own inventory system. I also give you the choice to download it for free
★ Come join the Team Beard Discord: https://discord.com/invite/hhv4qBs ★
⚜️Check out my Marketplace Asset ⚜️
🗡️ Mele 🗡️ https://www.unrealengine.com/marketplace/en-US/product/flexible-combat-system
🏹 Ranged - https://www...
Oooh! That's good and thanks for that!
Auto pickup is just entering the pickuprange and instead of presenting the option you simply try to add it to the inventory
General question : I keep seeing on most (if not every) tutorial about inventory, that when they're displaying the items in your inventory, they always clear the whole inventory icons before adding the icons back again with the new added item. Is it the only and best solution to do inventories ?
No
Its lazy
But its also 'safe'
In case you failed updating some slot somewhere
There's no issues doing delta updates
@main lake in case you wanted a tag
It depends what you're doing. Event dispatchers are useful in enabling you to only update a single slot.
yes please I like tags, what are "delta updates" ?
How ? Do you need 1 event dispatcher per slot ?
No, just a dispatcher with slot id
Delta - only update the things that changed
The difference
Have an 'OnSlotUpdated' event dispatcher on your inventory component that is called when a slot is updated. Make it have an input of the slot id.
When you create the slot, have it bind to event dispatcher. The event it calls should check the updated slot id, if it matches it's assigned slot id, it can then call a function to update the slot.
Something along those lines.
^ i just let the inventory bins to it
Then route it to the correct slot
Avoids x amount of bindings
Saving that performance 😎
Yea, still early for me lol but yea, if you have a slot container, you could just have the slot container bind to it and call the update slot function on the relevant slot, assuming the container is keeping track of the widgets and its slot.
Both methods are imo superior to clearing and recreating the entire inventory everh time
I would agree. Unless you actually need to update a large portion of the slots, updating only the slot that changes is much more efficient and allows for a more responsive UI.
Having said that though if you only have a small number of slots (a handful) you might as well just clear them all haha. This probably isn't the case for most games though.
I have a really strange issue. So I made a some BP structs (I know it's recommended to make them in C++, but I did it anyway for now) to be able to have a map of maps. The key value of the map is a struct with 2 enums. Whenever I set something to "None" which is the first value of that enum and I compile the BP, it's being set to "Metal" which is the last enum value...
yea pretty sure I found a bug in the editor... (4.25)
yes
I'll probably try to reduce the nested structs first and if that doesn't work, declare everything in c++
Yeah, no clue with 4.25, sorry
lol I seem to have found another bug. By making a map of those types straight up (not putting the map in a struct). Now when I add a second element to the map, save and compile. It suddenly only has one element lol.
pretty astounding
it only happens when one of the enum values are "None"
I guess it's related
If the enum seems to lose track of itself like that it makes sense that it'd also happen when used as a key.
Do you think moving it to C++ would solve it?
I'd say chances are good but not guaranteed.
At least you have the enum and struct clearly defined in front of you, not relying on some BP autogen mumbo jumbo
If we unpossess a character and destroy it, and then later spawn a new one and possess it, would it reset to default all the variables on the player or will it keep the values of the variables on the player ?
true
I'll try it, it's my best bet
I started with Structs in C++
Felt much better, now working on my project from BP to C++
It's going great for now, previous stuff that didn't really work as expected, worked well in C++
And much cleaner
If you destroy the character and spawn a new one, the new one will be set to the defaults from the archetype.
Unless you save it somehow.
I generally prefer C++ but I'm working in an old BP project and am the only one on the project that knows C++ so I can't just put everything in C++.
So I guess that's where PlayerControllers and PlayerState come into play ?
It's also very nice not to have to worry that you'll need access to the struct in C++ much later on in the project, and have to refactor.
yup
I haven't worked much with PlayerState since our game is singleplayer. We save the player state using SPUD (https://github.com/sinbad/SPUD).
something else: Whenever I edit a map like this, it collapses all of its elements which is annoying. Is there a way to disable this?
That drove me nuts too.
Same here. Been working on this project for 2 years, but I just wanted C++
Because, stuff felt like, laggy? And idk. BP is great but C++ is better. Ifc nothing for everything. And I'm working alone as well. Learning quite a lot
I haven't found a reason to edit pure maps for a long time, though. Used Datatables or Assets for most things as of late.
Exactly, I'm redoing my Structs and enums and other static data in C++
Handling them in C++ and other places where they remain in BP.
When compiling the BP graph takes a second or two it feels so... icky. BP is great for some things but having a C++ base gives me peace of mind.
Not much fan of DataTables, since they're read only. Sometimes I kinda wanna tweak that value, but resulted in just using the Struct.
I don't like DataTables either since they're binary blobs, instead I prefer Data Assets (the new hot thing).
I'm making a data structure that stores the impact sounds by material pairs (sounds of 2 material types colliding). So the key value is a pair and then the value is 2 sounds. This I'm putting in another map keyed by item type. Is that something you'd put in a DataTable instead?
But you can use the base values from the Data Asset and populate a map automatically, that you can then tweak.
Exactly. I did a base c++ class for my player and my enemies. Easier to deal with. Redoing functions in C++ and just hooking up things in my player.
Doesn't always work, but sometimes it does.
Yea I like Data Assets. But seemed more like a thing you'd use if you want more than one instance of it?
Never had a chance to use Data Assets. But more and more I kinda wanna start using it
Ah, cool. I don't know, actually, maybe having a DA system would just overcomplicate things.
The way you're doing it sounds fine.
Apart from the bugs!
DataTables are just general tables where it just defines something for an object. Like weight or anything else that won't be edited anywhere
That's what I like to do know. I've seen some videos about Data Assets but I just can't find a place where to use that
Yea I kind of understand the use case. But whenever I considered using them there was a missing feature or like you said the fact that it can't be edited
The common "first use case" is inventory item definitions.
Like how you can define all the parameters of an item using the DA.
I've been using Data Assets for content creation. For instance we have shop recipes that determine how the shop gets populated, the different recipes are in data assets which makes it easy to create content in separate assets and refer to them.
And can be edited?
Not at runtime
It can't be edited at runtime (or at least shouldn't).
Afaik the intended use case is to create content
Usually you create some container to hold a reference to the base DA, then any metadata that should be unique to that instance.
So, I have weapons 13 of them. All different usages
And I'm handling their data in a struct. When I need to fire, I just call that struct and get the, let's say Ammo Type or Trave distance or Ammo Amount... Etc, there's quite a lot of stuff. Plus these values can be upgraded or changed.
Is it fine??
Now I have an Inventory System and I think Data Assets with me are the best for that system.
Anyone know a tutorial for making list-based inventory system? I always find slot-based instead and since I new to this I can't modify or convert the slot-based to list-based
Though a use case I've tried is to have some data that doesn't exist at runtime. I have an editor widget that can toggle debug settings at edit time, I store these in a data asset so I don't have to toggle everything when I run the game, just once when I launch the editor.
ListView?
Kind of like only the item name, like in many JRPG
Also, if I have 13 weapons, some of em just small differences, like damage for instance.
Is it worth having 13 Data Assets for that?
The main advantage of DA over DT here is that you don't have all your weapons in one big chunk. Say you have another person on your team that also need to edit item definitions. If you have a DT you need to check out the whole thing and only one person can edit it at once -- but with a DA you only need the item definition of the specific item you want to touch.
You could put the struct in a Data Asset. This is where you would create the content. Then in gameplay you can just get the struct from it and use the data. Any data that changes though, you'd have to store separately. Like whether it's upgraded or not.
Yea and maybe linking BP's to data by referencing one DA. I guess if it's in a DT, your BP still has to extract the correct data from the DT no?
Yes, and you need a reference to the correct DT somehow, too.
Hmm
Unreal has a wonderful thing for DA:s called PrimaryDataAssets.
That's definitely over to #cpp territory, but the gist is that you can request them by name.
You give the data asset an ID which you can then use to load it.
You can also load it asynchronously very easily, and what's more you can request Unreal to also load all soft references contained within the DA if desired.
Ah, maybe too in-depth, but it's a very nice thing to look into if you're interested in a more data driven system!
(the idea being that if you only want to show some text from a DA, for instance in a inventory screen, you don't need to load the meshes for it -- but if you want to show the entire item you can automatically request them to be loaded at the same time)
I'm sorry, I'm still blank about Data Assets.
I created a Primary Data Asset
Added the Struct. If I have 13 weapons, do I have to have 13 PDA? And how would I retrieve that information?
Sure, have 13 instances of that PDA.
Ehh
You create them using the right click menu (Create Advanced Asset -> Miscellaneous -> Data Asset).
For instance here's some junk DA:s from our game.
Well. If the weapons also still have their own BP. Maybe this isn't the best use case? Unless you want the DA's to get data for your inventory without having to instantiate the BP's?
The item definition can include the base class of the item to spawn.
Weapons do have their own BP yes. I was thinking mostly of the weapon data like damage, range, traces... Etc
Maybe you're right, not the best use case for Data Assets. Will definitely use it for my Inventory system tho.
Every usage of a Data Table is better suited as a Data Asset.
Don't need a PRIMARY data asset in this case.
Just create a DA property on your weapon that you can slot a weapon data definition inside.
Got these. Apologies for phone picture, I don't have discord on my laptop
You'll need to define your data asset format too.
With a class that inherits from I believe UDataAsset
Then inside that, just like a DT row struct, you define all your damage stats and such
Create it in C++ then use it as the base in BP
No no im not using DT. I do NOT have my weapon data as DT. Just as C++ struct.
Aha.
Slipped a bit there.
Well, the Data Asset is just like a slottable struct.
That you can create and edit separately from the BP it resides in.
It can be nice, in your case, perhaps, if you want to have many weapons that share the same stats.
When I think of DA's, I think mostly of cases where the only difference between objects is data. I guess the way you propose to do it @dry sleet is to put the base class for the item in the DA as well and then when a weapon is instantiated from a DA, it populates that base class object with the data from the DA? So you don't need a separate BP for each?
They do share the same states, maybe 90% same 10% different. Some have BP some don't.
Also this!
Mostly damage, range
That could be a way of doing it. We do it that way when spawning inventory items. That way you can have a lot of variations that just edit some aspects of the weapon.
But it's equally fine to just have BP:s with slots for the DA that can be queried for damage stats :)
Created 13 different Data assets for weapons is same is creating 13 rows in Data table you can't avoid that but I am guessing you don't want to put shared values (for example sounds) in all 13 of them separately. You can do this by creating a separate Data Asset specific for Gun sounds and put a variable for it in your main weapon structure for Gun Sound asset. This way you can share some properties. Like here I can share Abilities and Cosmetics in my weapons.
I see
Haha, I got a little carried away in this discussion and I should probably get back to work, but holler if you have any DA questions and I can maybe answer them later. Also the folks in #cpp love discussing DA:s :)
That would be a lot of data assets then.
Not a problem. They're only loaded on demand.
And file size is teensy
Indeed, a DT with lots of structs takes up more memory when loaded because it must load all the rows no matter what.
I'll see what's best for my weapon. I'll mostly remain on the Struct. But for my Inventory System I'll definitely be using Data Assets.
Thanks Olaxan, take care)
Yeah, no need to refactor before you get the hang of it! Trying it on something new and then going back to use the newfound knowledge is probably best!
You too!
Will do 🍻
The issue occure because we have 2 sets of Logitech wheels, the G920 and the G25, and I want to set my IMC accordingly., so I get the Product ID to test things.
update @dry sleet . I declared the structs and enum in C++ and now it seems to work as expected lol
pretty crazy that it's just broken though lol. But maybe not anymore in modern engine versions
A lot of things are broken in Unreal haha, but yeah, that's an old version for sure
the more you try to do more advanced stuff in Unreal the more the cracks start to show
still an amazing piece of software though
Most of the modern systems feel fairly robust*, but some of the very fundamental things are janky
Like attachment
Oh blueprint structs and enums are super broken and have been for years.
Epic like to pretend they aren't though
*) Exceptions apply
component attachment?
Yea i keep hearing it. But the only evidence of it I had seen was loss of data. I didn't know there were also bugs like these. And I guess the fact that structs can't have functions in BP sucks a lot too.
Yeah, comp. attachment and mobility.
I've flat out had them irreversibly destroy a project (when I wasn't using source control)
There's a annoying bug where you can't edit mobility on instances of BP:s that are mixed C++ and BP added comps.
Nothing like using a struct and boom, your project can't load anymore
@thin panther what could happen with enum?
The amount of packaging errors can be insane too
sounds awful
Pretty much the same as structs, they are flawed in the same way.
You normally notice it less as people don't change it use them as often though
lol now I'm trying to delete the BP structs and the editor keeps freezing, they don't want me to move to cpp
Id like to point out that's only for BP ones, c++ ones are safe
Was working on C++
And it just suddenly doesn't wanna work anymore, lol. Had to get my backup.
at least it's freezing consistently lol
I still use bp enums when I just want to make enums for my page since I do widgets in blueprint
wouldn't use it for any other purpose tho
cuz I can't access the enum from cpp class
but it takes no effort to declare them enum in cpp too 🤷♂️ . Should have done that I guess
Been there, but it seemed okay with it afterwards
Yeah I don't. I just copy paste backups. I know it's sucky but
I definitely will someday have version control tho. I used backups because my internet was garbage and sometimes it doesn't work
But thanks for the pin
just do it man, you'll never go back
You don't need internet to use git
Aha
You don't have to have a remote on the cloud, your remote could just be another location on your computer
I'm pretty sure Laura uses a local remote right?
In my case my source control somehow 'broke' midway through the project and idk how to get it setup again maybe in a different form
I had to disable it
hey guys i have a question, for my internship i need to make a cube that moves based on if you move a slider. i have tried a couple of things but i'm actually giving up. I cant seem to get it working
this is my current setup but it just gives me this error: User
Blueprint Runtime Error: "Accessed None trying to read property ScalableCube". Node: Set Actor Scale 3D Graph: EventGraph Function: Execute Ubergraph Scale Control Widget Blueprint: ScaleControlWidget
i made a variable and i chose it as an actor in the variable type
Yeah but you need something to reference your cube from the world
It can't know which one
i have a blueprint with a cube in it
and i referenced the actor in the variable type
You have the cube here, which is public or instance editable.
When you open your widget, show me how you're opening the widget and what cube you're passing through it
i'm still new in all this. i usually work in blender
Send pictures
okay wait
Pins of #ue5-general if you're new :)
There's a learning portal with official materials to get you down with the basics
No. How are you opening the widget
double clicking the widget blueprint and then i go into graph
Create widget, where are you calling it
By node I mean.
Ok, when you start the game. Does the widget appears directly? Or when you press a button?
it appears when i click one time
Is that on an input ?
yeah
Why
on enhanced input action blablab
i am not sure
If you want it to open once directly, just use your BeginPlay
And, if there's only one instance of the cube is the world, GetActorOfClass and reference your cube
Back to your widget, click on your Variable cube, expose on spawn
Then back to your character, plug your GetActorOfClass Object into your Cube from the create widget
Just throwing this one here for visibility again
okay im going to try this
Alright
Hey yall, kinda first time using animations in ue5, so i followed a tutorial and most things are working. My character just has a idle animation and a walking blend space. For the blendspace im using the speed and direction of the character to determine which animation should be displayed. Ive already checked if both variables getting changed, both do. The speed gets recognized, so the right animation for forward and backwards gets displayed. The problem is that the blendspace doesnt get the direction. In the animation blueprint the value of the direction is getting changed, but the blendspace somehow doesnt recieve it. Does anyone know why or could help me somehow? Btw i dont really get why the speed and the direction is zero while its not zero, as if the variable has two values at the same time. I think that might be the problem, that the correct value gets overwritten by zero, but no clue why that is happening.
will this fix that my cube isnt scaling?
Check if you have more than one instance of w/e use that anim instance class in your world
It will get rid of your error
And will probably scale
How do i do that? I assumed the anim instance would instantly be coupled with my character
I'm saying you might have multiple character in the world, hence the existance of multiple anim instance
where one is having it's direction changed (because you control it with input for example) and where the other one is stationary, hence 0
Play in editor and check if u only have 1 character
I only have one, but the thing is the game is gonna be a local coop game so at some point there will be multiple characters, but right now there was only one
Hmm. Try adding GetOwner and see what it give you.
Go play in pie and go to outliner and filter it with your character name
screen shoot the result
or this #blueprint message
When i click on it nothing happens...
looks like there isn't multiple instance of the character. So no more idea at this point
best bet is probably to debug and find out why you don't get the values you wanted
does anyone know why the camera shifts like this?
Hi, I'm not sure it's cpp issue or blueprint issue.
I've registered a lot of abilities to the default character's character controller, including moving, jumping, and moving the view, and in game I'm trying to possess this controller to another spawned pawn via a key event, at which point the pawn loses all of previous abilities and is able to simply move via WASD/space movement (not triggered by ability), and so far everything worked fine.
But when I triggered the key event again, trying to re-possess the controller to the previous character, the ability to move/jump/move the viewp, etc., that it was supposed to have, disappeared, and I was unable to do anything.
What do you guys think this might be and any ideas on how to fix it?
Is your camera colliding with something?
nope
Your cam has no collision?
can't find any collision settings for mycamera only forthe camera boom
Why handling it in the Controller instead of your Character?
And it's set to NoColllision?
Where are you changing your camera location other than following the player
hmm okay, still appreciate the help
im not, its only following the player
because I want to move a temporary pawn like a movable camera. and I need keep character there but not change the meshes/location/etc..
so I possess the controller to the pawn I want to controll, am I wrong?
Try using your player state instead of contrôler
Could you please be more details? what should I do?
Test
Couldn't send messages for some reason
I'd ask in #gameplay-ability-system
I'm not good with GAS
But I'd use Player State for that.
Discord's literal one job and they still can't do it right 😔
:( mobile discord be like
Heyo, I want to make it to where the player can remap the keys to anything they want, but I've watched countless tutorials and I can't get anything to work, nor understand how what works and what doesn't and why. I would love some help with this.
I already have an options/controls widget, with InputKeySelectors in it, and mappings for the inital keybinds, (enhanced input mappings), I'm just not sure where to go from here
My Straight to the point Question: I want to know how to allow the player to change their keybinds during runtime, and have them persist on a Widget and mapping context after exiting and opening the game again
Is there a way to resize behaviour tree nodes so that if i have large annotations they dont extend to the end of the known universe?
How can I move an actor along a path? for example, If I have the formula of a circle, How can I get the actor to move along that path?
how can I assign skeletal mesh as variable. I want to set several skeletal meshes as array.
why do you need the make array explicitly for that
just make an variable of skeletal mesh reference, and change it to an array
though you'll probably want a soft ref
what does 'soft' mean?
This week Christian Allen will provide an overview of Hard & Soft Object references in Blueprints, why the differences are important to know about, and how you can utilize Soft Object references in your project to help with memory management.
Watch Inside Unreal live at twitch.tv/unrealengine, Thursdays @ 2PM ET
DISCUSSION THREAD
https://forum...
Do you guys have different naming tendencies in BP compared to BP? You could argue that specifying arguments in your function name is obsolete, but the autocomplete in BP doesn't show you the arguments like it would in C++ so more specific names can be helpful. So I name my function something like GetArmorFromType, whereas in C++ you could argue that GetArmor(type) suffices.
hi guys why does the widget still showing event if i called the remove from parent in hud
the most obvious reason would be you didn't remove the target widget
thats how i removed it dkw it didnt work
you mean print string right?
the Get Registered Devices make my game crash
with a "Fatal Error" message on Package
and a "EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000070" error on Launch Game
There's, however, no issue while launching via editor.
I'm not really sure what the issue is tho?
The issue occure because we have 2 sets of Logitech wheels, the G920 and the G25, and I want to set my IMC accordingly., so I get the Product ID to test things.
it didnt print anything 😦
I can't debug for you from here, you have to figure out what u are actually removing and what actually stay on the screen
ok
I'm trying to spawn a corpse on player's location when they die, but need quick saving/loading to still work on the corpse actor. How do I enable input on the spawned corpse actor? I tried this, but it didn't work
the proplem was the delay was in the enemy blueprint i put the delay on the hud and it worked
so memory wise, if i get my game instance in several bp's, is that loaded multiple times in memory ? or bp handles that ?
will there be a copy for every bp that accesses the instance ? or will bp handle the reference ?
you will get a reference if you use the get game instance node
and all of those references will reference the same game instance
that's what i was hoping, that it didn't make copies thanks
the references i understand, but if i cast and create a new reference is this going to pile up ?
yea that will pile up references, but not game instances
so if i cast to game instance on several objects, this piles up ?
or they can use the same game instance ?
i might need to look into interfaces, i have not got into that yet
there is only one GI
so it doesn't make a copy and store that again in memory
when ever u get, you are pointing to the same instance
ok perfect
don't need to worry about a copy of a pointer
so it won't load multiple of the same into memory
there is only one instance of GameInstance
same for the player, if i cast in multiple objects it will just load the one into memory
and will use the same for the cast ?
the casting causing loading causes the default object to be loaded,
there is only ever one, and it is only loaded once, for the duration of play
it incurs quite a penalty with asset references, or barely anything with properly set up classes
How do I disable the tab key from focusing widgets?
was there a 2d int vector struct? i forgot what its called, just wanting to avoid making my own if i acn avoid it
Turns out, I had to possess it first :p
vector2d?
well they are floats but i suppose its not a big deal is it
Actor A has a Hard ref to Material_A
Actor B has a Hard ref to Material_B
Actor C might be Material_A or Material_B
Is there any point to Soft ref Material_A and Material_B in Actor C?
(When I know Actor A,B, and C will be loaded)
oh its int point
Currently having a strange issue where I'm trying to get my NPC AI controller to possess some NPCs. The NPC_BP is a character blueprint. Why is it not able to cast?
Possessed Pawn>Cast to NPC_BP> set Pawn Ref
Ah that did it thank you!
No
In Unity, you can create an "Empty" game object, which is effectively an actor without a mesh.
There are a number of different reasons one may want to do this, but for me, I am trying to implement a Boomerang mechanic Where the throwable weapon "orbits" around this empty game object.
Does something like this exist in Unreal?
I download the project on another computer and some blueprint parts are missing. My version control says there is nothing different. Any ideas what is wrong?
Uobject
Or just an actor, without a mesh
Actor is more convenient imo
Even tho its a bit more overhead
Different version of Unreal possibly? Enhanced input is a plugin that needs to be enabled too in earlier versions.
this is probably a dumb question but is there any way to hide the variables from ?
from the details
when i cast to a widget what do i need as a object pin?
A ref to the widget?
Always a ref to the thing
You're trying to cast
Cast is a 'type conversion'
Requires a valid but possibly wider scoped reference to an instance of the object in question
how would i hide it Squize :/?
Category is your best bet. Or c++
hm mkey
You cast "from" something "to" something
in this case a widget reference that you probably made when you created the widget
why do you need to cast to widget ?
you should just use the reference
i have some widgets and they are all in main widget,from start they are collapsed,and here i want to enable a specific widget visibility.I always create a widget and this is simple but why to create if i can just enable the visibility of this one?
this way i create a widget , but is not good cuz this means i have 2 same widgets 1 collapsed other visible
of did u mean i create a variable with the type of my widget?
I am working on having an AI that will shoot a homing projectile at a target, right now I can get it to spawn, find the closest actor, and go that direction. However the homing is locking onto their feet, often missing, and im not quite sure why.
Is there any way to prevent player bouncing on collision with enemy? And prevent main hero to jump on enemy?
I've tried different collision presets and if I need to use "sphere trace by channel" (for attack) I must use block preset between enemy and my hero.
Hi!
I've an interesting problem waiting to be solved. Please help if you can.
I have a large amount of data saved float variables by tick
when I get those data I have this array:
I have it's time in milliseconds
my goal is to arrange those data to send them in correct time (as it was recorded)
You want to sort it?
you don't need to sort it
you use a delay and use the time
the delays will fire all at the same tick
and it will probably perform horrible
or you sort them descending, and each tick you evaluate the last element, if it should execute you do that and remove the last element
I would just sort the array, set a timer for the amount of ms specified, then pop the first element and repeat, I think.
If I understand the issue correctly.
i would just make an replay actor or component, and let it run on tick
after all, it's likely that there's a fixed interval so you can even adjust the tick interval of the actor to account for that
also overhead is quite smol if you just have to check one element each tick
but there is a ctach for this method, in one tick there are many floats
Is there anyway to call an overlap the second any part of the mesh is overlapped, not just the center point?
yes thank you but I how to sort it on recieve? I need to send those datas on tick to a graph
i have seted the coins in game instance and a boolean if the player can jump ,a store ui and debug jumping,it works,now how can i set up buying this things.For ex i will show the player by text how much both cost,but how do i buy it? i mean i compare on the button click event if there is >= coins than the price and if yes ,enable the boolean,if not do nothing?
Sounds about right
forgot about the money,i need also to subtract the price after😄
heya, I am creating custom spawner for my enemies but I want to snap them to the floor when they spawn. They all have a different capsule size. Is there a way to get capsule size from a class reference?
Something like this
Half height and height are not the same thing btw
I'll have to add the capsule height as a parameter in the class then I guess?
I can't access the components in that class
It you want all of them to have the same half height why not just change it in details panel
ah no I want every enemy to have a different height
Eh, I'll make a parameter for it 😄
Or trace to the landscape to determine the adjusted spawn location
Oh that sounds like a better idea
Hmm damn I still need the capsule size for that
the root is in the center of the capsule
i want to represent the text by the jump price integer variable how do i link em here
to change only jump price and see that the text changed
ya you can bind it, next to where you would normally set the text in the editor, there is a bind you can click and select the variable
then when you change the variable, it will change the text
yeah but i thought there is another way,not binding but in event graph to display the text as integer
This is a basic question but I can't seem to find the canonical answer. I need a reference to a Level object inside my animation blueprint (for LookAt purposes). The object is a TargetPoint.
I thought the best approach was to create and expose a variable that takes a TargetPoint, and then just grab its world location and pipe that to the LookAt node.
The character (Actor) is a Metahuman, so the animBP is on the Face mesh. I'm trying to figure out where in the BP hierarchy I should create that variable so it can be seen when selecting the charaacter in my Level outliner.
The Character BP inherits from a "BaseClass" Blueprint, since I want this functionality on a bunch of different characters across various levels.
If I create the variable at the "Base Class" Blueprint level, how do I bubble it up to the "Inherited" Blueprint associated with the instance of that Actor in the Level so that clicking on the Actor in the outliner show that variable in the Details panel?
(When I first created the variable directly on the Face Anim BP, that doesn't really show up in editor. This is why I'm thinking it needs to "live" on the actor's BP (or better, its base class)
Strange. If I try the same thing with a Boolean Variable (Create it on the Parent BP and then expose it), I can see the variable in Details when I select the character in the Outliner. But the TargetPoint object variable does not expose.... maybe I need to use a more generic variable type like Actor and then cast it.....
hi i want little help with this i want a thing like 4 enimes of the same blueprint placed in a level waiting and two attacking if the first two died the others can attack can someone plz help me
The mesh of my character consists of 9 skeletal meshes (all connected via master pose component), if I put 4 of these characters into my map with this setup, performance tanks. Is there any way to optimise this? I only have the model in "modular" pieces, not a single mesh and need the 4 characters close together (it's a squad).
does your 9 skeletal meshes have their own Skeleton or they are all based on the same Parent Skeleton?
Strange, I never ran any issue when spawning dozen of characters composed with multiple skeletal meshes, you should check the amount of triangles of your assets, one of them might be extremely heavy
now i can buy this abilities a lot of times even if i have them,how do i make it so i can buy it only one time?
I have read somewhere that multiple skeletal meshes for a character cost enormous performance, not true then?
It actually cost especially when having a lot of vertices in your meshes but you should not feel it when spawning a simple squad of 4
Make an array of strings on your player (or where ever it makes sense) which is a list of skills that have been bought. When you buy the jump skill, add the string "Jump" to the array. Then when the widget is constructed, check to see if "Jump" is anywhere in the array of strings. If it is, then don't let them buy the skill again. If it isn't, let them buy the skill.
Anyone know how I make it so only one instance of the actor can be slotted at a time? The problem right now is if one is already in and i move my cube into the collision range and then back out it thinks that the first object left and lets me put another in
What would be a lot in that case? All meshes together would be about 15.000 triangles.
ooooh sounds like something new to me ,nice ,what videos should i check in youtube to understand this?
Have a check to see if an item is slotted and if something is, don't let anything else be slotted. You seem to already have a bool "IsGrabbingObject", why can't you use that?
You can probably find dozens of youtube videos about arrays.
i tried something like that where i make a branch to check if an item is slotted and if so i cant put another item in the slot
but the problem is if i move another actor into the overlap collision and then back out it thinks i took the first actor out allowing me to put a second item in
Then have the variable be a reference to the item itself, allowing you to check what item just ended overlapping. if it's the same as your variable, execute the logic. If it isn't, do nothing
do u know how how i can get that reference?
Is it only when pressing play or even in editor when dragging Models to your scene?
Only when pressing play. Otherwise I get 120fps.
At least, I'm assuming this is what you are trying to slot in
Whenever you overlap with the item, thats the reference
Check your logic to see if you thick something you should not, maybe something is called every frame
did i add it correct?
And it only happens when you have multiple characters?
ok, im not exactly sure how to use that though/what do with it to make it check
Because If you can afford a squad in your scene without playing It should have no diff when playing
At least I can't see the performance dip with a single one 🤔 It gets wors with more, though.
You probably want it to be on the player's Blueprint so that it always exists. If you close the shop widget and the array is on the widget, then the array will be empty the next time you open the shop
What do you have running on tick with them?
That sounds logical. Hmm. I don't get it. The blueprint I use for the characters is supposed to be super optimised. And it runs faster if I only attach one mesh, then there is no performance hit for four characters.
They have an AI, the one from the Third Person Shooter Kit 2.1, it's a well-known asset that should allow countless AIs on screen at a time.
Make a variable that is an actor object reference (assuming every item is an actor). When you try to slot a new item in, get your variable and check if it is valid. If it isn't valid, then you have nothing slotted in. If it is valid, something is slotted in.
When you are going to remove an item, get the variable and check if the item you are trying to remove is the same as the variable. Use an = node.
try disabling the ai
just to see
Alright!
Same result but the characters just stand around like puppets now of course.
You should start checking the tick of anything that's running
or, you can slowly delete things until you find your answer
You can also use something called the session frontend, which will tell you exactly whats causing the issue. But it might take a second to learn how to use it
Well it must be the models, as disabling the AI didn't have any positive effect on the performance.
So I will probably try to find a better asset.
Remove the skeletons from them
just make then an empty asset
If its the models, the fps will be normal
maybe the animations are problematic. You'll have to simply disable things and check if the problem stops happening
still trying to create the dice roll mechanic if anyone got a minute 😄
@gentle urchin yea difficult for me trying to use a d20 in the 3d space
I think he means actual physical dice
Oh like that
Wanting to calculate it
like physically roll a dice and have the result calculated vs another roll
Yeah
premise of the game is to roll a d20 then whatever the result is, is what dictates what happens next
thats a good idea 😮 might do that and see if it works
didnt know if there was a way to get all faces and do a calculation on a print string
I'd be tempted to do it backwards. Predict the result then make the dice show that
I suppose there'd be an obvious point at which the numbers change
@brazen pike would do that but it takes the visible mechanic out
Would be hard to make that look natural wouldnt it ?
yeaaaa lol im going to try the colission boxes on the faces and see how it does
This is old version of my board game tutorial series. Now I use arrow instead of collision. It is easier and shoter: https://www.youtube.com/watch?v=8QEUVbGRjqE
Watch this series instead of it: https://youtube.com/playlist?list=PL3WPVkbsUUT5IubO66SpArZJ1PkizuKmY&si=Wlr68DsMGC3mp9_j
for dice 3d Model: https://sketchfab.com/3d-models/dice-711dc7...
Small ones
this uses collision
hmmm if it spins fast enough, blur the material? then switch the numbers?
Half the area across
Well that could work
just search you find, even if its unity you understand the concept
I've watched a few tutorials but none of em explain it very well
You can also ofc just hide it under a cup or whatever
its a tabletop game
Lol
(And dices running off the table)
Hmmm calculating it mathematically using the rotation of the die would get tricky once you get to higher number sides
Invisible colliding boxes on each face? When it finishes rolling, do a raycast down to hit the top collider and check which side is facing up
might be a little more authoring but could work
With colliders you dont need to raycast
Its simply whichever is still colliding
When it stopped
so do a collision raytrace at each face using the bottom one to predict the opposite side (top number)
yeah but it might be a little rough to get the size right
Depends on the size of the dice
I know I'd roll it and have like 4 sides colliding lmao
lollll
Id do half the width
i can scale it up before doing it then scale it back down?
yeah, that'd work
I can see that getting so tedius though
data tables?
didnt even think of that
Im mostly kidding
I dont think I've ever automated anything so have no idea whats viable and what isnt lol
That might be it, interesting thought!
The animations I meant.
i tried doing that but it doesn't seem to work, not sure if i did it correctly