#blueprint
402296 messages ยท Page 448 of 403
see how when i look down its trying to run into the ground
i dont want pitch to be apart of the movement direction
@sand shore It's a simple top-down shmup with only one level which lasts only about 1 minute. I only have those two levels. My main menu level has literally nothing on it, except the call to create the main meni widget and viewport on the Event BeginPlay node (im using BPs everywhere, not a single line of code). The widget has a button that calls Open Level with the game level as parameter.
My other level is the game itself, which starts setting up the camera and stuff again in the Event BeginPlay. The sounds I hear are being played by the Game Mode
damn helping two ppl at once
And one sound fx from the player pawn
I think your problem is way more punctual than mine, RaptorGod ๐
yea lmao
got it nvm
Cool!
sorry, was afk
It was probably that you were using the control rotation directly without stripping out the yaw, right @trim matrix?
@vagrant crag I uh.
Yeah I dunno. that's not really enough info either
What would you need? The whole project?
Do you spawn your sounds with "Play Sound" nodes?
Some with Play Sound, others with Spawn Sound
yeah okay
you can do a breakpoint on the spawn/play sound nodes.
Pause execution using Breakpoints to inspect graphs and the values of variables.
Figure out what state causes you to get your main menu with the game sounds.
Put a breakpoint on all your game sound nodes, then reproduce the issue.
Gotcha
And
if you trace it back to BeginPlay, then, why is your gameplay level being streamed into your menu level
That's a pretty simple trip to the Levels pane, then a find-in-blueprint for streaming level
Should I be looking at streaming levels then? Im so not using streaming right now.
That's just my hunch, were you to have properly organized the game
My Levels pane is empty except for the persistent one thats always there
There's almost quite literally an infinite amount of ways you could be having game sounds in your main menu
Blueprints are turing complete
@sand shore yea
Alright, I'll start breaking on sound nodes then. Thanks a bunch @sand shore , appreciate it
how do i fix my blueprint if it fails to follow logic? am i going to have to rebuild it completely? because that would be a total dealbreaker
trying to remove index 9 of an array results in it trying to remove index 23.....
keep running into issues like this where its just doing random crap that i did not tell it to do
i guess i need to start over in c++ and forget about blueprints
Perhaps your running into the scorn of pure functions @trim matrix
Youโve not posted a picture of your graph
If you got a huge chain of pures to calculate an index to remove, the moment that thing gets removed the pure is no longer valid
What transition rule would be appropriate for detecting if the player is turning left/right? I want to go from Idle to turning left/right and have it adjust based on how far the player turns (a little on the thumbstick to max push via turn speed variable)
current setup:
Is there a way to reference a C++ function in the Blueprint version of the class? (I have a boolean that I created in the Blueprint class that triggers an animation, and I want that boolean to be turned on/off by that function - ie, turned on at the start of the function and turned off at the end)
Is there a way for me to do that, or should I have created that variable in the C++ class itself rather than the Blueprint class?
Scratch that, ended up just creating it in the C++ class. However, now I'm running into an issue where it doesn't seem that the function that's supposed to change its value actually is - it just stays as false no matter what.
Is there any way to limit the angle a vector 2d can point in? Like it has to be pointed in a 90 deg cone ahead ( so 45 deg on either side of y +), and if its too far left ( -x ) it becomes the old length at 45 deg left?
No matter what I do, I just can't get my vehicle to actually move around in my level, I followed a lengthy tutorial on it, by Unreal Engine themselves. I setup the input, the wheels, the physics asset, everything... except the car just won't move for some reason. And the wheels dig into the ground. Is there something I can do to fix this? I'm using 4.24
I'm not using it as AI (yet) but trying to get it to work with just controlling it as a player right now
Is the bone hierarchy correct? If so, what could I be doing wrong here?
I have the inputs setup too, but still doesn't work
please ping me if you know how to help fix it
what im doing wrong?
Yeah, I just asked there a bit ago
@balmy hamlet use regular Clamp nodes on its individual X & Y float inputs before setting it, I guess.
@cunning creek The cast node just confirms the object reference that you're feeding it is of a certain class; in your case, MyAnimationBP. You need to give the node a reference to the object before the node can determine whether said object is a MyAnimationBP or not.
You need to feed the "object" input on that node with something
Hey, I'm trying to make it so a custom collision preset will allow it to generate 'OnClicked' events when the user clicks the collider. Any idea what the requirements are in order to get that to fire? It was working before on a standard preset but not on my custom one and I can't figure out why
@tight schooner How would that work?
the range of possible y values changes dependent on the x value
like, (1,1) is okay at 45 deg, but 2,1 isn't ( more than 45 deg)
is there a way to get the angle of a vector and then just clamp that and reassemble it?
oh yeah, sorry, I was thinking of rotators
Hey, I've got a question, So in the editor you are able to add to an array and the that array element has its own variables that you can alter. How do I make that array in blueprints? Like I know how to make an array, but how do I make the array have multiple variables of different types? Like I want to add an element and I want that element to have a float a bool and a static mesh for example how would I go about that?
What you're looking for is a Struct.
yeah, I was about to say https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Variables/Structs/index.html
ooohh ok so blueprints have structures. Thanks guys!
@balmy hamlet Really slow thismorning, but are you just talking about normalizing a directional vector?
No. I didn't read up above. What is your use case with the Vector2D?
@balmy hamlet I suppose fundamentally you never want X to exceed Y (or however you have your axes set up). So you want to clamp X to a range of -Y to +Y. And then use Normalize Vector2D after that... maybe?
@formal blade For your custom collision preset to allow clicks, your custom collision settings needs to be blocking the same trace channel as the one that your player controller is using for click events.
@maiden wadi Which trace channel is that?
Ah, that makes a lot more sense. I found out my issue, I needed to make two collision presets instead of one, because one of them was blocking the mouse clicks from getting through
Whats the easiest way to make ''percentage floats''?
Like I have an ability which has a 10% chance to apply a poison effect.
This image was my original idea, but I know that won't work.. hope you understand my question.
What is coming out of ChanceToApplyLocal?
Hi, I have this problem where, my bone size for a skeletal mesh, is very small , so in order to generate the physics asset i have to set the scale to 0.01 something like that.
But collision it generates is not visible, I am not sure why is it happening .
I can simulate inside the PHat, but cannot do outside the PHat, Simulate physics is disabled and collision is not visible.
anyone can guide me what could be the issue.
@strange stream Wouldn't it make more sense to generate a random integer between 1 and 100?
This'll work
hello beautiful people, quick question - how can unreal be inside this while loop but not print out the print node?
Yea @formal blade , this is just for prototyping, buy yea you're right
I have some vague recollection of a random bool node with a weight parameter as well...
what you're doing isn't wrong though, @strange stream. Lots of ways to make it work.
@blazing ridge can you print from somewhere else. if not, May be consolce command EnableAllScreenMessages will work.
im getting all my other prints, and im also printing out the 2 bools, which are true
thats what confuses me
yes, as stated, im printing out "AttackHitValueOK?" & "Attacking?" - both are constantly true, but im not getting the "inside while loop" print
use breakpoint
Are you able to put a debug point on the 'Print string'
use a breakpoint and make sure the Loop Body is even firing in the first place. With a breakpoint you can step through the execution
@clear sierra try #legacy-physics maybe?
okay thanks @tight schooner
apparently it instantly completes the while loop when it enters it
which would make sense, if ont of the bools got set to false somewhere else
but they arent =0
ok, so I eliminated all SET nodes on the 2 booleans, both are just bruteforce TRUE.
but still, when i enter the while loop and nodeskip, it just goes to its complete exec node
no idea whats happening here
normally now i should get an infinite loop
IDK either. Some nodes (e.g. latent nodes) behave strangely when used in conjunction with a loop.
okay, got that. but what node? he isnt even advancing to the print string, so no nodes to make trouble there
Hey guys I've got a weird issue regarding my fonts.
As you can see from some of the text, the letters sometimes become bigger or smaller than the rest of the font
this happens whenever I go to fullscreen with my game, in windowed mode everything seems fine but once I go fullscreen, some of the glyphs seem to be bigger/smaller or higher than the line height.
Is there some way to fix this? I've already wrapped my text in scale boxes
@slender idol what letters are bigger and or smaller that you don't intend to be?
@warped nebula for example the "O" in Browse For Music seems to be protruding upwards while in fullscreen. The "Q" in Quit also seems to be doing the same thing.
@tight schooner I've already asked about 2-3 times and unfortunately I get swamped by the rest of the questions :/
I don't understand why this doesn't work, it returns true at completely random numbers
You need to save that result in a variable and then use that variable as the input for the branch
@strange stream What is coming out of ChanceToApplyLOCAL?
A value I'm choosing. Right now its at 10, but if I upgrade it to lets say 20 it needs to work accordingly
Its a percentage chance to apply a debuff
@slender idol why? This value generates randomly each time, it doesnt add to anything
are you saying you get a true result on average 50% of the time, and not 10%?
I have no idea, it seems to be random completely.
I've seen 42, 98 and 7 be the result of ''True'' which makes no sense to me
Whats the chance to apply local value?
Well, seven makes sense if the value of that other variable is actually ten.
Right now, 10
@slender idol I don't see it, looks normal to me
Yea but not 42 and 98
is that a "pure function"?
No
I've had this issue before @strange stream try and put a print string on the actual random integer node and then on the true/false branch to compare the results
You ll see they sometimes are both contradictory
you need to save the result of the random integer node in a variable
and then use THAT variable as the condition for the branch
yeah, basically any time a pure function such as Random Integer is accessed by another node, it re-executes that node and generates a new output
^
so you have to use variables to save stuff
which I think should be changed but idk about the repercussions of that
That's the way they're intended to be used, that should definitely not be changed.
@warped nebula
heres a picture of the windowed game
can you see what I mean about the specific letters I mentioned?
If you need the variable to remain the same for multiple things, use an executed function.
@slender idol : coorperate wants you to find the difference between these two pictures me: they are the same picture
I have no idea what a pure function is
a pure function doesn't have any execution pins on the node
they legitimately look the same to me
Aah, like a pure cast
Okay let me draw some lines for you maybe its a bit easier then
haha ok
@strange stream This is what they're trying to say.
What you have there works, just don't print it off or it won't be accurate.
If you need to use the random number anywhere other than the one place, it needs to be saved as a local variable and that variable needs to be used.
@warped nebula Do you mind me dming you in order not to clog up the chat?
go for it
Yea it works now!
ooohhh ok so it calls the function twice because you arent asking for that bariable you are asking for a random number twice. good explanation
Thanks guys!
Another question!
In lets say a game like a Moba where theres 100+ characters to control with unique abilites and stats you obviously want a ''Master Character''
But I've always wondered, what do you really have in that Master and what do you have in the Child?
The master should have everything that's common to all children. I guess that's a no brainer. Common variables. Common events/functions. Common components. Children can always add more, or override existing events/functions.
So like movement, keys pressed, stat variables ect?
That's what I thought, just wanted to ask in case I've misunderstood something
It's a pretty deep subject so that's all I can say generally. I'm no expert but as I become more familiar with the concept of inheritance, I design my functions/events in ways that make sense for child classes to override
play around with it is all I can suggest
Generally, you want to do anything in the parent that multiple children classes use. You can always override and stop parent behavior for some children, but your goal is to not have twenty children with slightly modified code you have to keep track of out of a hundred classes. Just try to follow the most golden programming guideline. Do not repeat yourself. Don't go copy pasting code from one class to another when you can just put it in the parent.
you can also have children of children
so like your base class has movement and such, and then you can have melee and ranged classes if its a fixed class game
Yea, just starting getting into this kind of programming lately and some of its really confusing, but I like to learn new things and suddenly things start to make sense
Cool!
Another way to reuse code but outside of a hierarchical structure is BP components. Somewhat tangential but I've been trying to use them more lately. https://www.youtube.com/watch?v=qr4ZjieAQKY
could someone help me with my vehicle issue?
is there a way to read info out of image?
Like if I have an image that has 10x10 squares & they are black & white
& in UE4 I have 10x10 squares
I need to have an black square in the image to have a specific bool true & any white one false
would like to know how do I search for something like this, what the term/idea to search for.
Also, when making a multiplayer game:
When using ''get player controller(index 0)'' in different blueprints, how does it handle clients when the index is 0?
@untold pine I remember someone in this channel months ago mentioned a blueprint node that can retrieve a pixel color value out of a texture. I don't have UE4 open and my google-fu is failing me, but maybe what you want exists.
hmmm, thanks I'll try to search for pixel coloring node
that said I'm not sure if I'm understanding your question completely...
no no worries, getting pixel color to the bp will work for sure!
@tight schooner can it be that simple! ๐
I also remember people saying it's a very expensive operation...
dude wanted to make a first-person perspective puzzle game where you had to keep your cursor inside of certain colors in the environment
Interesting, yeah I can imagine
but I think for a simple game it would be alright!
interesting idea, xD can't even imagine how to do that!
meticulous collision meshes and line tracing maybe...
(depends if the operation is really as expensive as they say...)
not sure where to ask this, but this seems as good a place as any: When I play my game i keep going from a solid 120 fps and then drops to 0 for a second and then back to 120 then back to 0 at a pulsing interval
@strange stream The only difference with the things like GetPlayerController in mutliplayer things is whether or not you're using a dedicated server. If your player0 is also the server(Not using a dedicated server) then you don't need to change anything from usual coding. Server's player 0 is also itself, and any player0 on a client will be that client's player stuff. However, if you use Player0 on a dedicated server, it'll return the first player that connected to the server. It's mostly a conceptual difference in programming thought.
That's a killer hitch; what did you do lol @warped nebula
@warped nebula Open up Stat Raw, do you see spikes every time the FPS drop happens?
Are you doing a lot of complicated computations on a timer?
yes large spikes on time with stat raw
Then you're probably running something that's too heavy for your rig to handle, so it has to stop drawing frames until that calculation is done.
I don't think I'm doing any large computations on a timer
either you are:
- loading too many things at once
- running too many things at once
- an infinite loop is triggered but then dissipated
- are doing conflicting things that overload your game logic
It'll be easier to find the problem then. What's in your nearly empty level?
actually yah it happens even when I make the level empty
the only thing I had was a spline blueprint
What's in it?
What about Controllers, player character, Game Mode?
gonna guess it is either the skybox or the lighting
no skybox no lighting wasnt happening before
Does the same thing happen if you start up a new level?
Have you changed your project's game mode defaults at all?
haven't touched the. I mean they are different because I changed them when I first made the project but this issue just started
Most likely something on the player character or player controller bp
I'm pretty tired so I'll just turn my pc off and if it persists in the morning I'll bring it up again, maybe its just unreal saying go to bed lol
Or maybe some HUD code
Well, I'd consider trying a fresh project. If it's in a brand new project, I'd start looking at things outside of the engine like Drivers, other programs running, etc
yah it's basically brand new, I reckon its's a driver or something acting up since the pc has been on awhile
Shouldn't have set garbage collection interval to every 5 seconds 
Basically brand new isn't new. Trust me. Just try a freshly started project before going crazy. Always narrow the issue down and use a hand grenade instead of a Jericho missile.
anyone active that can possibly help?
Just ask, we'll give a response best we can.
Sounds like you're not doing client movement correctly. Can you show how you're moving your characters?
Is there any way to "preview" how blueprint would look if converted to CPP? I want to learn CPP and it would be really nice if I could kludge stuff together using blueprints and then see how it would look as CPP, for education purposes.
Not really. Blueprints coding would look incredibly different and be very hard to read if it was directly converted to CPP.
You can actually use the nativizer to do so using this. But it looks absolutely nothing like the C++ a person would write, and is hard to read even for an experienced C++ dev
You would be far better off comparing UE4's BP templates with its C++ templates (starter projects)
They make for a nice direct comparison
So like make a BP ThirdPerson template and a C++ ThirdPerson template and have a look at how one does what the other does
Too bad you have to make two separate projects to compare CPP and blueprint templates
Well you can add them both to one project if you really want to
I'd recommend adding the BP content to a C++ project rather than the other way around
hello, a friend of mine and I are making a vr game and we would like to know if it is possibile(and if it's not a bad practice) to generate a dungeon (we have our function, in a blueprint actor class, that takes about 1 to 25 second based on the dungeon size) asynchronous, so that the player can stay in a room waiting on the generation/spawn of the dungeon(we would like to give some options to the player, like choosing how big the dungeon will be, how many rooms, etc, and we would like to player to move around while the dungeon is generating/spawning)
If it works, and it's not annoying to the player with jittery movements and such, I don't see why there would be a problem with it. Give them a fidget cube.
in the UE4 editor, there used to be a way to make all new windows appear in the same window rather than new windows; anyone know how to do it in 4.24?
You mean like, opening an actor's blueprint and getting a new window instead of using the same one that the viewports use?
is it possibile to make with blueprints or is c++ required? for async functions
no the opposite
either way, it is the same option
getting irked at the windows popping everywhere
@zealous moth You just drag the tabs on top of each other.
i know i can do that, but there used to be an option that forced it to always pop up as a tab into the main window
@silent crag Not a clue. There's a few marketplace things for that. Not sure how robust the default is, or how well any of those work.
@zealous moth I dunno. I don't see any settings for that. Mine all open in one window by default unless I drag them out.
Hey, just a little question, it's possible to switch the color of an instant material with a triggerbox?
I would like to change the color of the sky, when we pass the triggerbox
how can i make this? whats the name of these actions(im not sure if they are called actions)
@snow vortex Where did you even find that monstrosity?
Build powerful visual scripts without code.
๐
there is literally a "held down" node that tracks the key and returns a boolean
Oh my.. I have no.. No I have a lot of words, I just can't say them here.
i cant find it
2014 thread!!!
Please don't do that. Don't ever run a While Loop like that.
your necromancy level is very low
Seriously. If you want to do something like that, do this.. Give me a moment.
i just searched how to detect input is held down and found this thread i tried to find newer threads too
This is the same thing as what you posted, but SOOO much better. Loops are meant to be ran as often as your cpu can process them. Tick runs once per frame draw. Hint, the loop will process a LOOOOT more times than that tick will and probably lead to an engine crash if left open like that.
If you're looking to find whether a key is currently pressed for another event or function, usually you do what they did before that loop and set a bool true or false.
thank you ill try that but not sure if i can im trying to implement it into the first person example
@snow vortex What exactly are you trying to do with detecting if the button is held? Can probably help with that if I know what your end goal is.
im trying to make a machine gun
Do you have your firing logic yet?
yeah its the first person example game
mouse button pressed, call function shoot once, then start timer to shoot with delay set as the time between shots, then on release clear timer
thats a nice simple way
If you want to learn about Timers, this is a pretty good way to make a rapid fire weapon.
^^ exactly the way i would handle it
whats the difference between this one and yours?
yours is relying on tick from the looks, cant be sure as i cant see
so it will cause optimization problems?
Delays are generally also considered bad. They're not good practice. Like, if you wanted to work off of Tick, the correct way would be to.. give me a minute.
Most tutorials out there show things on tick because its easy to setup and follow, you want to get into best practice as early as possible, if you can get away without it being on tick then do it, usually a couple more steps to it but worth it in the end
@snow vortex
That's what you'd need to do for Tick. Little less intuitive than timers and a bit longer to set up.
thanks ill try that
what does it mean:
arithemetic between types float 4 and float 4 are undefined
pls help
doing somthing with a material?
yes
prob feeding in a contant 3 into a vector 4 or somthing
i havent used a vector
put up a screenshot of it, its somthing to do with the maths, your feeding somthing into somthing that doesn't like it
how can i create things like this?
@snow vortex It's a Float variable.
In the left there, that orange yellow button, that's a + by default, hover your mouse over it and click there.
It'll probably give you a red one first, which is a Boolean. Click on it, then in the top right, change the Variable Type.
@light dust Shouldnt just the alpha be going into the height not the rgba?
oh components tab was turned off but i didnt touched something
what do you mean with alpha
Just the A
Guys, i sold my PC how do i download one ?
ok thx
@forest sable you wanna download a pc???
whats this
This layer has no layer info assigned yet. You must create or assign a layer info before you can paint this layer.
@light dust Yea create the info
id did
i know but when i did it the material image sayed none and it wasnt working
@light dust not sure on that one, not done a great deal with mats just some basics, to me that should be fine, might try ask in the graphics or vis fx channel see if anyone there can help with it
ok
@light dust one other thing that might be causing it, make sure your landscape is using your material
@light dust yes please I can't happen to find a legit site for downloading a PC
Is there an elegant way to solve
Error: SerializedComponent archetype is not the CDO nor a default subobject of my class.
? The blueprint itself is working.. I can package the project no problem and it runs with all the functionality there. This is missing references to basic stuff like the Arrow component on a Character(the inherited one) and such... very strange
Cleaning out the project (Intermediate, Binaries) and rebuilding does not help either
This might also be a 4.25 thing ๐ as reverting back to a good known state does nothing ๐
Hello, I would like to change the material of my Skysphere with a Triggerbox, I must call which node in my BP to change a material?
Found it!
A simply Set Material haha
why on earth does the Game Mode Base class have a default scene root? is it an actor? why??
@late cave Game mode is technically an Actor. It Inherits from AInfo, which inherits from Actor. The definition of an AInfo class is "Info, the root of all information holding classes. Doesn't have any movement / collision related code. Info is the base class of an Actor that isn't meant to have a physical representation in the world, used primarily for "manager" type classes that hold settings data about the world, but might need to be an Actor for replication purposes."
can someone tell me how to not make it where my mesh is not locked to my camera like this^^
its the worlds greatest mystery to me
not locked**
might be something with my spring arm but idk
That doesn't look like anything to do with mesh. That looks like you turned on Pitch and Roll rotations for the Pawn
is it possible to stream video from a rtmp server?
@maiden wadi but if i disable pitch i cant look up and down on my character,
Yes you can, you just don't do it with the pawn. You generally do that with a camera or spring arm. You don't want the Pawn to pitch though because you're rotating the whole capsule forward instead of just a camera. If that makes sense?
@maiden wadi ah... "might need to be an actor for replication purposes"... and there it is... that "might" is complete bullshit ๐
@maiden wadi btw, you're truly some kind of UE4 wizard! ๐
Thanks everyone for your help! Great idea @tight schooner , but guess what i found as i tried to implement it:
https://docs.unrealengine.com/en-US/BlueprintAPI/Math/Vector/VectorHeadingAngle/index.html
Vector Heading Angle
I swear that this didn't exist yesterday when i was looking for it
so I implemented wallpaper degradation in material using extensively WorldAlignedTexture and all is fine and dandy except of one detail: pattern on opposite walls is same and sometimes it is very noticeable... any advice about how to deal with that?
Would it be bad practice to set the Event Tick Delta Seconds to a variable on Event Tick?
I'm using a sort of template in UE4 and I'm getting this error from one of my actors, but I have no idea where that reference actually is.. any way I can find the blueprint a delegate is executed?
right click find references
Didn't work
then click on the binocular
on the result window
its on the right of the search bar
it will search your entire code
The reference should be self, but the dispatcher should be in that blueprint
If you turn off Contextual menu, you can technically put it in any BP you want but it then wont be referenced -- I have a feeling this is what you might have done
so this second screenshot won't work because it has no way to reference
@covert stirrup I save Delta Seconds to a variable on tick and it's been ok. Though something to be aware of is whether you have events that fire before event tick โ if another event uses the variable before tick fires then potentially it's getting the previous delta rather than the current one. That said, idk offhand what the event tick firing order usually looks like or how to control it...
@modest gulch more of a #graphics question IMO
I have 2 player starts which spawns Master_Character, I've made a child of Master which has the mesh, abilities and stuff.
But how can I change the players pawn to the Child Character instead of the Master Character?
Its probably easy so sorry for noob question
@tight schooner okay, tbh this server should have separate channel dedicated to materials ๐
Can pls someone, for the love of God tell me what's going on here?!
I've debugged it several times and those are the values I get...I just can't understand!
Tried different values, result is the same, the value passed on to the localVar is halved and keeps getting halved for each iteration of the loop after it first passes the bool
who want make remake fans of soul reaver with unreal engine
@tight schooner Thanks for the tip, I think I will avoid it, the only reason I want to do it is for tidyness sakes, so sounds like it's not worth the effort!
i am following a tutorial on creating menus... does anybody know the purpose of the "is valid" node in this case?
it would also work without the variable and the check...
@trim matrix You can QuitGame, but once it's close, the application closes. You'd have to start it back up yourself.
@river seal To make sure that your menu widget is valid before trying to add it to the viewport. If it's not valid, create it, set the variable and then add it to viewport.
Basically, you don't want to just keep creating and adding widgets to the viewport over top of each other.
Hey guys, i have a question. Everytime i spawn in a enemy it doesnt move
it has ai move to as well and has a navmes
@maiden wadi thx! so this is just to keep it clean in case for some reason the function would be called multiple times?
@covert stirrup you can use the Get Delta Seconds node instead of pull it out of Event Tick. The only reason I save it to a variable is so I can use it directly inside Math Expression nodes.
@trim matrix You're going to need to show the function that you're calling.
wouldn't just "remove from parent" make sure this would not happen?
@river seal Most people program togglable menus that way and just call that when they want to show it. It's just easier to handle for many reasons. If you lose track of the menu somehow, it'll just make a new one and the old one gets garbage collected. Since UI should be set up to display information or accept input based on actors, it's no big deal if the widget gets lost and you need a new one.
@trim matrix Never used SpawnActorSimpleAI, I assume that wouldn't be the issue though. You've put prints and such in to see that the execution line is making it all of the way to the move to? If so, put some on the failed and success and see which is happening with the movement.
ok thx. so like almost always, many approaches possible.. ๐ thx again
spawn actor simple ai is spawn actor from class
Oh! Hey, it is. Man I'm slow. Been staring at blendspaces for too long today.
Uh. try the node SpawnAIFromClass instead. I don't think spawning it as an actor spawns it with an AI controller attached.
Not sure, never tried personally. I just always use SpawnAI when I need an AI. You can leave the Behavior Tree part empty.
was just about to ask about the behavior tree
it works
thanks my guy
who knew that was the cause
@maiden wadi do you have any idea why
I dunno. Lemme see a minute.
Yeah. Pretty sure it's the controller. Spawning just an Actor version will just make the actor and no AIController. SpawnAI also creates a controller and has it possess created character. No AIController means you can't call movements on it since I'm pretty sure that despite that being called on the pawn, it actually uses the controller for that. Sure-ish anyway.
Do you know what Controllers are?
In short, consider the Controller as the mind and the Pawn as the body. It's a lot more complicated than that, specially when you start considering multiplayer aspects.
Hey, is there a way I can control my character movement like a variable?
Best I've found is set velocity
Really depends on how you're trying to control the character. What is your intention and why does the default movement not work?
I'm trying to make a power up that makes you move faster
There's a lot of ways to handle that. First off, multiplayer or singleplayer?
sp
Much easier then. How are you moving your character now?
What do you mean?
How are you currently moving your character forward?
Is this what you mean?
Yep. I'd probably say your easiest way to apply a speed boost would be to get your CharacterMovement component, and change your MaxWalkSpeed.
oh wait lol
It is a variable
I just had to untick context sensitive
thanks anyway lmao
Hi everyone! I hope you all are safe and having a good start to your week. I have a (hopefully) quick question for anyone familiar with what I'm trying to do atm. I have a pretty basic character health system based on five separate health values for various limbs. I have some debug keys set up (nums 1-5) to subtract one health from each pool; once the total health among all five pools equals zero, I have a death screen. All that is working fine.
Currently, I am trying to create damage actor that I can interact with which will randomly damage one of my five limbs (-1 to health var), but the problem I am running into is figuring out a way to weight the random number output so that I can (eventually) differentiate weapons from each other (IE, some weapons will be better at connecting with arms, legs, chest).
I have been researching different ways to hopefully create a switch based on an integer range instead of a set int, but I haven't found anything conclusive yet.
I've set up a relatively complicated (to me, lol) 'For Each' loop which uses a 'InRange (Integer)' node who's 'Max range' input is set by a simple int array variable dictating thresholds for each of the five limbs, totalling 100 (having set the 'Random Integer in Range' max to 100), but I am not sure what the simplest way to set the 'Min' on the 'In Range (Integer)' node, or even if that is the best way to do it? Is there a simple(r) way to make a range-based switch that I can use to weight my random int?
Here is my clunky BP atm. I know I need to optimize parts of it, but I wanted to try and get this range thing worked out first
@latent anvil
I think this is what you want to use. Just plugin your 0-1 var and you're set ๐
Oh, I looked at ur bp and it's something else you are trying to achieve...isn't it? ๐ my bad
Thank you for the quick response! Kind of, but unless I'm mistaken that's not quite what I need. In my I have five health variables: Chest, ArmL, ArmR, LegL, and LegR. I'd like to apply a weighted range for each of my five limbs, and then compare a simple random number gen against each range. Example: Chest = 0-15, random num is 13, so chest var is damaged.
Are your "limbs" components?
This way I can create child damage instances which have a higher chance to damage specific limbs.
what are the limbs? actors?
No, they are all int variables in my character.
it's hard and overcomplicated if the only indicator you have is an int.
Try restructuring things, you might wanna add functionality later and doing so based on an int array will get confusing fast - for me at least
either make a struct and put inside the min and max, and whatever else you'd like to have there later
or just make them components (actor components) which act like perfect data containers which can also contain functionality
how can i print in the UI the speed variable from animationBP?
At least, it's how I would implement the system
I haven't worked with actor components before, but if that would be easier in the long haul I should check that out.
You can trust Matthew Waldstein's channel for any type of thing you know the name of and want to know how it works - he pretty much covers everything from nodes to vars https://www.youtube.com/channel/UCOVfF7PfLbRdVEm0hONTrNQ
Thank you for the feedback. I will need to reassess my current system and see if there is an easier way to do it that makes sense to me
I've been watching some of his vids and they are definitely helpful, thank you
np, hope it helps ๐
Still, if you want to insist, this is what you are looking for (I think) - there is an int version:
Now...my question: Asked before, I know, but I still didn't figure it out, it makes no sense: Can someone pls explain this to me?!
I can't "unbuff/debuff/reverse buff effects because of this and I ran out of ideas...๐ญ
terrible question structure
Hi I need help desperately. My game won't package with physics, all my spawned actor that are supposed to be ragdollaa re kinematic
you basically threw at us a bunch of nodes with no context, no variables no explanations of what you even are doing and want to do
Hi all, I'm running into some weird behaviour when updating a mesh's rotation on tick after mirroring it and would appreciate any suggestion you may have (for context I'm making a VR interface that exists on one of the player's hands, I'm running into trouble when swapping which hand is which)
I've attached two videos showing the expected behaviour and what happens after swapping the hands as well as a screenshot of the nodes I'm using to update the rotation of rings over the player's hand on tick.
When swapping hands I'm simply inverting the y-axis of a scene component that acts as the parent for all of the hand's elements.
@zealous moth It should be irrelevant what I want to do, I threw the logic of a foreachloop which outputs values (i marked in yellow) it shouldn't, from what I know. But If it helps, I could provide context. Asked this before and got total silece, figured becuase it makes absolutely no sense...
Anyone have any clue as to how to package my game and include physics?
I have two maps of the same type: one for stats, one for bonuses. The maps are comprised of enums with StatName(as keys) and their values. In the SS's case I'm trying to apply a penalty of 50% to the "attack" enum key - so far so good. All goes well until I want to save that "50%" - or whatever value that might be, so I can reverse the effect later, for which I add it to an extra map of "WidgetStats" since it's what the widget should also display. But the second "add" to the map halves the value
I can't even suspect another node somewhere getting in between since as far as i know, loops execute from start to finish without interruption.
Hey I want to make a simple audio beat tracker like the heartbeat UI from Crypt of the NecroDancer
How would I start into making this?
Ok, I found the "problem" but...why?!
do you add to the array you are reading?
@zealous moth I did man...Not working, tried everything ๐
the logic i see makes no sense unless the red is hooked up
but...but! @marble folio might have a point
this is from a design point of view, not bp logic
Yeah writing to an array you are reading is an issue in BP
even if it is part of a map
lemme check thoroughly ๐ sry for being so pestering, but it just buggers my mind...
so it gets added to the end
ah, it's small...
@marble folio does that make sense? he is adding it while reading it; when you add, the new value is added at the last index. So the loop goes around twice
and loop over the local variable
So make local for both before operating then setting - like i did with the stats one?
i don't thik that's the issue, it's the Add into the map
oh, shoot! the stat one IS the problem -.-
Add into map works just like set array elem for arrays
since it can't have duplicates
Yeah if you add to the same key it replaces the original one
^ but it would be placed at a later index while the loop is going
but the "Keys" is not pure so that should essentially function as local variable...
Working with Maps is strange in BP.....
the first add works fine but starts +index before adding to the second, so the second gets halved again...somehow
Maps should be used as references to transpose data, not as loops; what @round idol should use is a struct
Store the result of the calculation...
lemme try store that
well, ofc that should work xD but it's weird 'cos i don't understand the logic behind it ๐ฆ
my engine does not want to compile...so I cannot hop in and try it out
@zealous moth It's already structs within structs within structs xD
so i just slapped the map on it ๐
well then your struct structure is a mess and can be either simplified or broken down further
the logic is this
you "Add" to your map. Adding either replaces the value and places it at the end or it adds it at the end. So either way you are creating the value at the end. Now what i find odd is that you don't have an infinite loop
I wish my structs were this easy....
sounds like you should struct your struct into structs
๐
Use a widget to switch map but how do I hide the mouse so I can move around again
Tried doing that in new map didn't work
In the player controller you can set the play mode or whatever it is called to UI only or Game only
also that set should work
Set input Mode is the node I was thinking off
Set Input Mode Game Only
I apologize for interrupting, but how to make an actor smooth movement from the player? Like impossibility to reach the actor. Now I have it like that but actor is moving discreetly noticeably
Interp ๐
@cedar glen https://www.youtube.com/watch?v=--6HvirxmUA
yeah in that case you probably do not
@cedar glen btw that cast in there is not needed
If you do it to validate the actor type it is probably fine, if you do it to validate the actor is valid..just use "Is Valid" node ๐ (or validated get)
@marble folio @zealous moth Fixed it, Tyvm for your help guys, I still don't quite understand but it looks like the "multiply" node (being pure) was trying to get the value which - for some reason belonged to the next index in the array, only the value, not the enum...Weird, still don't get it to be honest. Anyway, thanks, It's fixed with local set ๐
Mysteries of BP execution order... ยฏ_(ใ)_/ยฏ
also I know why it did what it did for you ๐
I know but it's a freakin' LOOP! It shold be linear and straightforward afaik :/ anyway, i'm no programmer, I don't know any code, BP is the only thing i know ๐
is there a way to set and reset a delay that acts like a cooldown?
it is linear..but ... do you want the explanation of what is going on?
Retrigerable delay?
or just a timer?
timer gives you all the flexibility you want
@zealous moth Yea you want a timer
@round idol do you want me to explain what was going on in your case?:)
it is linear..but ... do you want the explanation of what is going on?
@marble folio Well, It's kind of "dissapointing" idk how to say it otherwise. I thought I had this, I had understood principles of how things in BPs work, and I wasn't "affraid" to do stuff, now I'm a bit shaken xD
It is fairly straightforward once you know what is going on ๐
4+ hrs on this bug :/
bug for me ๐ but yea, if it's not 110% programming terms, I would indeed *like to understand what went wrong so I can avoid that kind of thinking/solution in the future ๐
Give me a second ๐
Hi All, When trying to add a "Skeletal Mesh" in the viewport of my Player Controller BP - Parent Class (Player Controller) i can't seem to see it?, whereas in the Player Character BP based on the Parent Class (Character) it shows fine?
Am i missing something obvious here to make it show?
Just purely for viewing and setskel mesh functions, I have it working on my sample project using playercharacter 3rd person.. but my main project the player controller uses Parent Class PC not character..
i suggest you use a skeletal mesh variable for that
mm not sure I follow sry @bitter ingot - as all my functions i think will need to be in my playercontroller,, all working perfect on sample with 3rd person,,, was just shocked just when i tried to add mesh to the PC and wouldn't show?....
i mean it definitly makes sense that the player controller does not represent any physical objects since it was never meant to do anything of that kind
ah ok, understand your point. Need think of some way to recreate what I've done then :). Thanks for response appreciated
no prob mate!
@ocean radish @marble folio pardon the delay, baby crying. I have a "follow the mouse with your arms" timer function that I want to call when the player clicks but if the player doesn't click for 2 seconds, I would like the arms to relax. I play with the alpha between the IK nodes in the animation blueprint and that works fine.
What I want is the whole "if no input for 2 sec after last shot, relax" however this needs to be refreshed every click. So if I click, I dont want mid click later to relax.
does this make sense?
Yea, can do all that in a timer
in 1 timer function or on 2 timer functions?
could do it in one, you would just make counter inside the timer, and have it count down
so on the click set the timer to 2secs, on each tick of the timer take off your time value that its looping by, have the counter as a float, then a check if counter is 0 stop timer
yww
Do you need the counter?
you can get elapsed time from the handle
for display.... and just let the timer run out when it needs to run out
i am not sure how to set that up
this is usually how i set up my timers:
better than ticking
timer is still ticking..
yeah but not every frame
also it will not run every 0.01
ah?
it will run every frame... if your frame time is < 0.01
During tick the engine checks if there is a timer event waiting to be executed..if so it executes it
It is also quite messy if the timer time is < than tick time ๐
just do this to get the value of the timer so you can display it in the UI
^ didnt even know that was a thing, not done too much with timers other than the basics
hm, I'd have to divide the second by the fps and that gets me the frames timing no?
yeah we had a huge argument about effectiveness of timers a while ago on a different discord ๐
Is it just me, or does the construction script run more than once? Sorry for interrupting :/
looked it up and it is sort of bit more complex but sort of as it is
@zealous moth you are overcomplicating it
@trim matrix it shouldnt, you could always do print string to check if somthing funky is going on, if you have multiple of the same actor each one will fire there own ofc
@ocean radish I only have one actor of said type, but the print string prints 3 times.
no no, the animation depends on the evaluation of a vector; i don't need it on every frame, just enough to show it visually
Evaluate the vector in the anim bp?
you can do the calculation there
@trim matrix what you trying to set in the construction script, if you move the object of set properties in the editor it will fire a lot
"there"?
@ocean radish I'm adding spline mesh components dynamically, based on a certain spline's length. I'm aware that if I drag out a spline point, the construction script will fire multiple times, but if I compile the blueprint, thee construction script should only run once (from my understanding)
This fires 6 times now
@trim matrix Yea should only fire once
I just tried creating a completely fresh blueprint. The construction script fires three times
@marble folio hah, interesting but i need more control over this; there are easier nodes to use in the actor BP than the anim BP
but thanks
for instance, i need a check for certain abilities that require other use of animations and transforms
In that case just do it on tick.....
otherwise it will look choppy....
it will save you trouble of calculating the frame time in the timer ๐
yeah i was considering it but i want to compare the performance
a fast timer is worse than tick..trust me... ๐
@trim matrix bit of a work around you could do all the heavy lifting in a serperate function and have a branch in the construction node isLoaded? then fire the new function there and set the loaded to true, depending on what you need it to do
@trim matrix You could look at in call in editor events and functions too if you only want to call them when you press a button
WTF is going on today?! Anything I can do about this without breaking all structs containing that?
Describes how to call Blueprint events and functions on Actors while working in the editor.
compile it?:D
How do I compile a struct? xD
Save it... and check the output log
did...saved fine...Something's wrong today seriously
@ocean radish That could be a solution, but is this not a huge bug then?
@trim matrix Not sure, I don't know enough about how they handle it internally and what if anything else can cause it to retrigger
@round idol it is time to let go. give it a clean death and delete it and start all over. Don't frankenstein it by adding stuff and changing it into a monster. Frankenstein did not want to be a monster and neither does your struct
@trim matrix Just checked issue logs, theres a few marked bugs still marked as backlogged from couple of years ago with similar issues, so looks like theres not much to do other than work around the issue, or make it so it doesn't matter if it runs multiple times
@zealous moth Yep...not a solution, 6 months of work into this project man, it's quite big so I can't just start over ๐
hi i wanna ask currently i have a bunch of animation idle state while on horse(patting the horse,checking up on horse etc),i wanna do after a certain amount of time lets say 2 minutes the player on top of the horse wil do the patting animation or checking up on horse animation..how do i check after a certain amout of time to play that animation?
@ocean radish Appreciate your investigation. I don't understand how such bugs can go on unresolved for years D:
It worked after changing the culprit - some stupid enum - to a bool then back without breaking the refs afterwards. Problem is I need to reimport skill effect table, but it's fine XD
Bumping question:
What transition rule would be appropriate for detecting if the player is turning left/right? I want to go from Idle to turning left/right and have it adjust based on how far the player turns (a little on the thumbstick to max push via turn speed variable)
@halcyon trellis
blendspace
@round idol Did you try right clicking on the struct in the content browser and under Asset Actions do "Reload"?:)
๐ฎ no, will try, rerolled twice already since it crashed ๐
ok so yesterday I was getting major lagspikes from 120 to 0 that I attributed to the pc being on for awhile and being stupid, but checking the log files this morning LogAudioMixer: Error: Audio Platform Device Error: 0xE000020B: UNKNOWN (File D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/AudioMixerXAudio2/Private/AudioMixerPlatformXAudio2.cpp, Line 305)
that log error in red accompanys every lag spike
anyone know what could be happening there?
@marble folio "User created struct cannot be safely reloaded" and that ends reloading. I can't wait for 4.25. For me at least, this version is by far the worse, and I've been around since 4.9
I am on 4.25... from where I stand... be glad you are where you are ๐
ouch
should have stayed on 4.23, i don't even know why I upgraded project to 4.24, didn't need any feature from it...stooped!
I think you should always upgrade... because the development on the old version stops the moment they release the new one... so no bug fixes nothing
Does it cause issues...sure...do they get fixed...maybe
You shouldn't always upgrade
The only reason to upgrade it's specifically for a fix or a new features
if you are not aiming one of those fix/features then you are 99% making a mistake
I remember once I was actually relying some gameplay elements on a bug which triggered an overlap on spawn ๐ Later found out it was a very old bug which they fixed in 4.21 or something
That can happen
Aaanyway...I'll leave this one out of the struct for now. Keeps crashing when saving struct - probably because of many refs to it, idk
I think 4.17 or so had a similar problem, once you saved a struct you couldn't go back and modify anything, only add, otherwise it crashed
I had that on 4.24...
lol
adding was fine, moving things inside the struct crashed the engine for me
yea
When your struct have a reference inside blueprint it can get tricky to modify it depending on what property this struct has
And what I've noticed is that the more refs to the struct, the higher the chances it will cause problems when saving/modifying it
But at least in my game, there is no way to get rid of data tables
In my personal testing it's mostly structure inside structure that break it completely
damn, all my structs are like that, broken into sub-structs for cosmetics, widgets, functionality etc
That won't change very soon I think. You'll have to live with those struct for a while or simply restart the table
It would be very hard to work with huge structs which are "unstructured" - you know, I only break what I need, so yea, guess I'll just have to deal with it
How do you spawn the player using the level when level streaming, rather than using the player that spawns in persistent
I know a little lifehack for you @round idol if you want to untouch your struct, but that would mean a little extra work
@hybrid hound The same way you spawn any actor, by using "Spawn actor from class" and then you can use "Posses" to control it
@pearl rose As long as it doesn't involve code, I'm fine with trying things ๐
well I usually backup my DTs pretty often ๐
so i would destroy the previous player right?
So here the trick: If you get to the point where you are and need extra information inside your data table but get crash every time you try to change the struct. What you can do is create another struct (that contains what you need) and another table (link with that struct).
Now you may ask why, it's quite simple, what you can do is store the extra infos you need by the same name, so when (in your BP) you call your huge table, you can call his "children" table that has what you need
Sound good?
@hybrid hound You know it, I can't tell you if in your game your previous pawn need to be destroy. I would assume that most game would delete it. But some could need to keep a reference to re-posses it later
Is there any way to query a DataTable? For example, with the DT looking like so, is there any way to select only rows that are in the Boss loot table?
Hm...that's actually something I've thought about in the past for other reasons, but yea, it could work in this scenario as well - heh, ๐ thanks for the tip, it's a nice workaround especially if you're just stuck with lacking structs
Good ๐
@pure heron You can only retrieve dataTable by name, what you can do after is break the table and verify the content of Loot tables and based on that do what you need
Well that's a major bummer
You can always use SQL if you need real database
'Cause if I were to spawn a random item from a loot table, I would have to keep getting random rows and checking if the table matches
dataTable and database are quite different
Don't suppose Unreal has any database built in and ready to use?
In your specific scenario I would say that having multiple table for each loot tables might be a very simple option
Or have an array with "Possible drops" on the boss
after even if you were to look and compare over hundred of cell, it would be quit instant if you have no big data associated
that links to the DT
Having duplicate entries would be an issue though. If I were to add BOOSTO item to one, but the other would have BOOOSTO
have Items DT...and Drop DT...
Drop DT has the boss name and an Array of Row Names for the Items DT
then you just do random on the array of row names
I guess it could work that way, yeah
you simulate a relational database that way
I'll roll with that, thanks!
if you have DT for your bosses(stores their stats for example...) that array could be in there ๐
though keeping it separate prevents the extremely large structures some others are coping with here ๐
nobody here has Maya experience, would you?
@zealous moth I have some, what's up?
i will pm you
Hey! I would like to create an animation loop in a BP Actor which repeats every 5 seconds: the mesh which scales from 0 to 1 and rotate. I made the rotation but what would be the node for the scale?
Just checking, but does returning from a function inside of a foreach loop iteration actually break the loop as well, or do I need to explicitly use the foreach loop with break?
@pearl rose @round idol very interesting read, thanks for the query and tips. I have a feeling I will hit this problem down the road and its nice to have a bit of info going into it! I don't think I will ever be putting structs in structs! Is there any particular use case why you want to?
@atomic prairie Are you looking for the node to set the scale? Or manipulate it from 0 - 1? Setting would just require a "set actor scale 3D" or "set actor relative scale 3D" depending on what you're doing
@rain crag i want the node for set the scale from0 to 1 in 5sec with a smooth transition
Guys, what am I missing? When I use a keypress, I can add 1 to the integer each time and it adds up no problem, but when I attach it to my custom event, the print string just returns a 1 over and over(default is 0). there's 2-3 times this event gets called, but it only returns a 1 UNLESS I manually attach it to a keypress...
Fixed the animation part, in thirdpersoncharacter how do I switch the automatic walk speed from 600 to 300. Cant find it in there
I mean that'll work to go between two levels
Anyone know why my On clicked sound for my button doesn't play the first time i click it?
idk show your bp
Anyone have experience with the Math Expression Node? I'm trying to do a logarithm and having trouble inputting the equation...
@atomic prairie Are you trying to update the scale on tick or on an event/in a function? On tick you can just use InterpTo / Lerp nodes using the tick delta to update the alpha, on events or in macros you can use a timeline with a curve from 0-1 over 5 seconds to drive the alpha of the InterpTo / Lerp node. Personally I prefer using timelines ๐คทโโ๏ธ timelines just can't be used in functions so that's just a constraint to consider
@rain crag i use Event Tick, my scale animation is ''good'' now, but the reverse is complicated with that node i think
your widget?
well i set it in my map
but i want to turn my hud off anywhere when i press key for menu in map bp
or widget
try visibility?
hmm
when your press key set visibility to 0
@atomic prairie Something like this might work for you -- off the top of my head, haven't tested it
really don't know what wildcard to use
this should be the widget i need to make invis
hey this is a pretty urgent problem that i need fixing and it sounds dumb but my boss is giving me this error
@rain crag wow it works really well, and it's much simpler haha! Thank you! But how does the Invert work?
@trim matrix yes this is for a widget
yah but i have no idea how to execute
made my canvas panel on that widget a variable
@atomic prairie It's an easy way to change whether you're scaling up or scaling down -- setting the bool to true or false will change which value is used as the target of the interpolation ๐ Glad to hear it's working for you
Helloo devs! I showed you how to make a flickering light with my graph method. I'm happy with how this turned out, it's easy to edit what kind of flicker you want. I hope you like it!
Target: 150 SUBS! HELP ME!
blendspace
Hi guys, so i was trying to input a character from mixamo with all the animations. When starts moving, seems that takes a lot of speed, maybe reading something wrong or duplicated? Any animations missing? But I complete all the animation points.
Event graph of blueprint character
Seems that's lagging with speed set for 3x more
Hey y'all! I have a large saving and loading system in blueprints. When I pick the item up and reload, the item is in my inventory but doesn't delete in scene. What is the easiest way to save items as deleted ?
or I guess "picked up"
@trim matrix Dunno if you ever figured that one out, but it's just a warning that you're trying to move an object that's not set to Movable.
yea i figured it out
is there any way to sort an array?
yes
in pure BP no...
using plugin... yes, but I just got rid of the plugin ๐
But it is just a tiny bit of c++ code to do the sorting function if you are not opposed to that @spark steppe
ok, thanks
im still at the BP part where i rule out the logic of my game, so i'll go with an ugly solution for now, and fix that when converting my BPs to c++
The easy solution is to use the plugin
really dont want to mess with plugins for now ๐
Just for a completenes these are my sort functions that expose array sorting to BP... https://gist.github.com/aknarts/018caee943ee5e2c489fb20b636a328d
the ugly solution is just some recursive function calling in BP
so i can work with that for now
The only thing that is needed there is to replace <PROJECTNAMEINCAPITALS> with your project name in capitals and you can just drop it to the Source/ProjectName directory ๐
thank you, i have bookmarked it for later use
sure ๐
mind if i just copycat most of it?
Go for it, there is nothing that hard there ๐
thanks, saved me some time ๐
btw this plugin has these nodes in it already... https://www.unrealengine.com/marketplace/en-US/product/low-entry-extended-standard-library just if you want to take that route...
first picture bottom right is what they look like in BPs
haven't really used plugins yet, is it just installing it and its ready to use in my project?
Pretty much..you might need to enable it in Plugins
gotcha, i'll give it a try
Hm curious if I should put the sorting functions into the engine code ๐
@maiden wadi do you know why every time i have an issue with the nav meshes not making my ai move around?
i have level streaming on too
anyone can input if you know why mb
@trim matrix Not that familiar with level streaming, but I do remember there being a general issue with the persistent level needing a Nav volume, as well as any sub levels. Or something like that.
Put a large nav volume in the persistent level. There may be a way around it, but I'm not sure.
@spark steppe Just curious, what kind of Array are you trying to sort, and in what order?
Is there any way to check if static mesh socket has already anything attached to it?
@arctic shard You can get attached actors, but I'm not so sure about getting only the ones attached to a specific socket or bone. I could easily be wrong, but I can't find any lookups for Socket or Bone attachment location. You may need to keep a reference variable or array to keep track of the things you attach to said socket. If it's a long list then Maybe a Map. You could make an Object map, with SocketNames as values. Any time you need to see if a Socket has anything, you could iterate though the Map's values.
@trim matrix what level do you have the navmesh in?
Thanks, will try working with that
@marble folio i have some in the persistent and some in the others
cause the enemies are being level streamed
well i have 1 in persisten
the rest is in the other maps
The issue is that the nav mesh generation is "static" and if the level that it is generated for is not loaded than it just fails....
I switched to dynamic generation with nav invokers for that reason
Well that kind of depends on the size of the nav invoker I guess... it will be generated when the level is streamed in
I have been reading about BP nativization that it can be toggled on/off at will.
Is this buggy or safe to do so? I feel like if you keep turning it on / off in a project it might mess things up
Fairly certain that the navmesh that is on the same level as the monsters should work though
@covert stirrup I would not turn it on globaly ... but on per BP basis...
@marble folio dynamic modefier?
But there is no risk with toggling it
or just dynamic?
@trim matrix not sure what you are talking about... ๐
the project settings in the navigation section?
How do I make categories like these?
?
you do Parent|Child category
fair thanks for the help
How do I do that?
Click on the function and in the details of it
where you set up the inputs and outputs
@maiden wadi some custom object type (by a float value within the object)
but as i cant even login to my (linux) asset downloader right now i'll have to go for my own solution -.-
but got sidetracked anyways by another issue ๐
dealing with the sorting?
@spark steppe Plugin likely won't help you much with that anyhow. Being a single float, that'd be easy to write though.
@spark steppe you did not say you are on Linux... that slightly complicates the plugin install ๐
Too many Bens here:D
@spark steppe on Linux you in general cannot install plugins from the marketplace... for the plugin I linked you would need to create "Plugins" directory in your project folder and clone the plugin source to it https://code.lowentry.com/Applications/Plugins/UE4/ExtendedStandardLibrary
Also just use the Epic Games Store to get stuff into your project... hint hint Lutris
i would like to avoid lutris at all, but it looks like the market login of the app im using to download assets is broken now
i'll just go with my custom array sort for now, i want to get some stuff done today ๐
Using the java thing?
yea
Never had much luck with it ๐
its not that bloated as a lutris install would be, and i've spent some time to improve it
yea, the chapter workaround is fully broken now
before it was already a luckgame to get login working, but for now it doesnt work anymore as epic seems to require the captcha on every login -.-
Hi, I am trying to make a variable that holds a TMap of StaticMeshComponents on my actor blueprint to the Materials on each component. I am using the following code to build it and it does work fine but when I am opening the actor in the Editor it shows 0 elements. Any ideas why?
auto AllComponents = GetComponentsByClass(UMeshComponent::StaticClass());
for (auto Comp : AllComponents) {
auto CompAsMeshComp = Cast<UMeshComponent>(Comp);
if (CompAsMeshComp)
{
FMaterialToPartNameList MaterialToPartList;
// Fill MaterialToPartList then add to dict
auto MeshMaterials = CompAsMeshComp->GetMaterials();
for (auto Mat : MeshMaterials) {
FMaterialToPartName NewItem;
NewItem.Material = Mat;
MaterialToPartList.MatList.Add(NewItem);
}
this->MeshMatPartDict.Add(CompAsMeshComp->GetName(), MaterialToPartList);
}
}
This is in PostInitializeComponents in the Actor's parent class
I did ask there a few days ago but didn't get a response so trying here
There's no point posting CPP code in the Blueprint channel
@glacial eagle have asked there too, sorry
Hey guys. I have question regarding dismembering. I have a zombie actor thats split up in body parts for dismembering. If I want to attack the zombie I assume I should get the hit bone and hit actor and have it simulate physics? The bodyparts are set to the parents master pose upon construct; do I have to remove the mesh from master pose before simulating?
You need to add physics constraints to the bones and "break" them
But that will only work when vertices are 100% weighted to either side of the bone
If you try to break a joint that has variable vertex weights all you'll end up with is stretched polygons
Okay. All the bones have a physics constraint applied by default. It's an asset from.the MP, I hope it's setup correctly hehe
But does my approach sound okay or should I do it another way?
How would I ยซbreakยป the constraint?
So long as the physics asset has been setup properly you should be able to just simulate physics on the bones of that constraint, then apply a force/impulse to them
The impulse/force will need to be enough to overcome the constraint
Dismemberment is actually a pretty difficult topic tbh
Unless you have simple rigs and models
Yeah I bet :) I'll try this out when I'm home, thanks :)
which controls are compatible with unreal engine 4
Controls?
@maiden wadi which controls are compatible with unreal engine .. because I want to buy one
He means controllers
I'd probably say pretty much any of them are. But if you're really going for compatibility, just go Playstation or Xbox directly. Xbox already has drivers in Windows, and the Playstation software to use a Playstation controller is really easy to install, can't remember the name off the top of my head.
@maiden wadi if you can help me with the name to install it
what is the configuration in unreal to use controls
The software for the Playstation controller, you mean?
yes
Look up DS4Windows
at the input inputs of the UE4 it is necessary to have a specific command control, in order to configure my video game
Can't really do much besides plug it in and see what buttons connect where.
I'm having a weird issue with ConstructionScript
Enum value straight from the node is Rare, but after being saved in a variable it becomes Common. What's even weirder, is that it's not the case with every item of this kind.
Some are properly rare/rare
That's not weird. You're getting the value twice and each time it's changing it.
Not sure I understand. Construction script runs only once, and the data is acquired from a datatable
Even if the CS was running multiple times, the data should be the same
The green Enum lines coming out of the random rare weapon function. There's two of them. Each of those lines calls that node again and will end with different values. If you want to use the same values like that, don't make it a pure function or save the results like you did. If you move the bottom green line to connect up to the Set Rarity node, it'll work fine.
Is it really that F'ing hard to setup vehicle physics? I have to make sure the tiniest pixel of my car's chassis doesn't touch the wheel or it seems like it will just spaz out all over the place. I still haven't fixed my vehicle issues yet and I'm really frustrated about it
@pure heron This may help clarify what I mean
If anyone can help me out it'd be much appreciated... maybe ping me or something, i'm going to bed now
Ah, yeah, gotcha
What could cause elements in an array to be deleted? My array is set up like this.
Right, I need to save the whole struct to a variable, and split from there
The array is used in this code
When i've ran the top picture the first element in the array gets deleted
@pure heron That, or make that function you've created to return the struct an impure function. Either works.
i use ActorBeginCursorOver events to highlight items/players in the world, however when playing in 1st/3rd instead of topdown view the cursor is disabled as its used to rotate the camera, is there some way to generate those events somehow?
or do i have to trace the view and use custom events
hey, does anyone know how to scale the collision of the playerbp? like the capsule? thanks.
@spark steppe Pretty much. I tend to run my stuff like that about 20 times a second with a line trace from camera.
i think we talked about that a while ago, but i forgot whats the best attempt to call the trace only every 'n' ticks
i could save the last trace time, and compare it to the current tick time, but dunno if theres some more elegant approach
or i trace in my camera actor, and set the tick interval :> doesnt work in my case
I run mine off of tick. Simple float that resets itself every 0.05 seconds and calls the trace function.
@ripe moth The array elements definitely shouldn't be deleting themselves. Are there any steps in particular it happens on?
From character creation it loads the array fine
after i press continue the first time its broken
I've checked. It's not broken after the new widget is made, it gets broken in the contruction of the new widget.
And the next widget never gets added to viewport?
No it does.
Odd. Where are you printing them?
The widgets are setup so they inherit from a base widget. The button code is in the base widget.
The print is done in event construct
And that is the exact same variable array as the other?
Yeah. I've tried only using one node hooked into everything in case there was anything weird going on.
Well, if you're positive that's the same array, and you have no remove or set array elem, or remove index nodes for it anywhere, I have nothing. Class Arrays should have no reason to remove indexes without being specifically told to do so. No array should really. Even Actor arrays leave null refs if their object is destroyed I think.
Hmm
I think it has to have something to do with the way i've set it up.
Like i mentioned, all this code is in a parent class of the widgets that are spawned. So all the code is repeated for the each widget.
in java you can check if an object is instance of a specific class, is there some equivalent in BP Nodes?
fooObject instanceof barClass
or is cast to barClass the only approach?
Use GetClass on the object and == it.
The step widgets all inherit from the DefaultStep class.
And it's in the default step class where this code is.
Might be irrelevant, but out of curiosity, how come you marked that as Instance Editable?
The UI?
The array of classes.
wait, what does getclass return? the top class?
Haha. You shouldn't need to do that unless you're modifying it in the editor, or you're also setting expose on spawn.
It should only be modified inside the parent blueprint
or something like an virtual object, which could be check against all classes in it's hierarchy
i want to make it easy and modular so you just setup the widgets you want inside the array and they spawn in the order you set them up.
@spark steppe The actual object class. If you want to know if it's a child of another class, you can also get ClassIsChildOf Worth noting also that ClassIsChildOf also returns true when used against it's own class.
Still doesn't change anything though sadly.
thanks
It shouldn't, I was just wondering. Seemed odd for a widget.
On another note
My children get this layout from the parent
But if i try to add anything new onto it, all that is deleted.
Which kinda makes the whole purpose of having it setup like it is gone.
That's in the child class?
yeah
Huh. I suppose that only Variables and Functions are carried over from parent classes in widgets. Actual widget hierarchy isn't supposed to.
eXi made a note of that here. https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/46822-a-question-about-widget-inheritance
Build powerful visual scripts without code.
In that case
i guess i'll just redo the whole thing
But maybe you can help me out with something else then
If i move the array into the first menu
Do i just make the widgets inherit from that parent if i need to share the array with the widgets that comes after it?
That should work. I mean assuming they inherit it correctly it'd just be a new copy from the parent class in each widget, so it shouldn't be changed.
I don't have much experience yet with Widget inheritance. I didn't even realize you could do it til ten minutes ago. I've been using UserWidget as a base and just nesting the different widget classes into one larger Userwidget.
Ok this inheriting stuff is really not optimal for widgets
I can't copy over buttons and backgrounds because they're "duplicates"
You might honestly have a lot more luck creating one larger widget with a WidgetSwitcher and buttons to switch the tabs and using the smaller widgets inside of the switcher tabs.
WidgetSwitcher?
You could set up the tabs and such on construct based on the array.
This sounds interesting
It's a Widget Type. Pretty much designed for what you're trying to do I think.
The Switcher doesn't actually have tabs. There is another widget for that though that I can't remember off the top of my head. You'd use the buttons to change tabs on the Switcher.
Kinda like tabs like this? This is from a project in another engine.
In that i just have it so you create a new widget when you hit a tab, which gets parented to the main widget.
Or maybe there's not. I guess if you wanted tabs, you could make a Horizontal box at the top and populate it with buttons.
Yeah, but what does the WidgetSwitcher do?
From my understanding, just hides all other widgets connected to it and displays the current one you asked it to.
Seems like it's an Array of Widgets, and the one you make it show it shows and hides the rest. You can control it in the graph with
Either a direct widget reference, or an index, likely based on which widgets were added first, in order.
Hey does anyone here use / have used this? Currently having some issues with it, doesn't seem to work like in the previews, and the creator is impossible to get in contact with.
Guys, from a hit result, i need to place a spawn emitter, having the rotation of the hit side (for emitting blood), how i can achieve this ? Right now, everything i try doesn't rotate the emitter as i want.
This right now provide the best result, but is far from perfection :
did you try to use the impact normal?
as rotation point at hit location
@zealous sundial
@maiden wadi Ended up doing this. Thanks.
@spark steppe yes, and finally i manage to found the emitter spawn particule facing top. So i need to rotate like this
but have no really idea how to do, i'm fucking sucking with rotation, story of my life.
To be more clear :
On the screen, you see the emission going from head, to sky. I want come from head, to player (or inversed, no matter). It's here i'm struggeling.
Like this :
make a rotator from the impact normal and use that to rotate the particle spawner
that should face it so that it points out of the face where the hit went in
Whats the easiest way do different things for each damage type (without me having to use branches equal to the amount of damage types)
switch on damage value?
whats the best way to exchange models in a blueprint
Any reason why this would create an infinite loop?
I'm not after the value, but the type
@spark steppe yeah, but... how ? i mean, what is my reference for rotating this ? the start line of hit result ? it's on that precise point i'm struggeling ๐
the impact normal is a vector, which is relative to the face which got hit
you can convert it to a rotator to get the angles
and break the rotator, to put my angle.
I have 4 damage types.
I want to add unique Widgets when X Damage Type is applied, but I'm just wondering if theres a easy way to do that without having to do Boolean branches for each damage type
right, i got it, thanks @spark steppe, i will try this.
Don't you already have a switch setup
But no idea how to convert it
@zealous sundial kinda like this, just that instead of world cursor your object would be the particle spawner, and location the hit location
How do I connect the ''Selection'' node
You need to give your damage a damage type
Just add a enum input of your damage type enum
Does anyone know how to make something like this
This happened when I did that