#blueprint
402296 messages · Page 693 of 403
Which is good and easier of course
And the question is to save the current game slot?
Are there any tutorials/examples you know of that show how that works?
No idea
It should be enough if you understand how the SaveGames work
Your UI would create a slot per SaveGame and clicking on one UI element should allow you to save the SaveGame Slot Name
Save as in either put into GameInstance for the duration of the Game process, or even into some secondary SaveGame for the users profile (if that' wanted)
It would definitely be stored in the save game as the data needs to exist for that slot when the player logs out/back in again and picks that slot to continue playing. It’s just the temporary game instance stuff I’m struggling to get my head around.
But we are talking about the Name of the Slot that was taken for the specific session
Not about any actual savegame data
Each of your 3 SaveGame slots has a Name. May it be SaveGame_1 to SaveGame_3
When you start your game, you probably have some UI with 3 Widgets
Yep
Where each Widget counts for one of the SaveGames
When you press the WIdget, you know which SaveGame got selected
SaveGame_1, 2, 3
3 buttons
Take that name and save it on the GameInstance
And whenever you load or save data, you use that variable from the GameInstance
How?
"How?" is too vague of a questin
Which step is the problem?
Calling "GetGameInstance->CastToYourGameInstance->SetActiveSaveGameSlot(...)"?
How do I store that selected name on the game instance?
Okay, do you have the SaveGame Name at hand when you press the button?
So when OnClicked is called for example
I assume so
Yeah
Right, do you have your own GameInstance Blueprint?
Yes
In that Blueprint, you should create a variable, call it "ActiveSaveGameSlot" or so
I think it needs to be a String
yes
Ok I did that
When you press the button and the OnClicked is triggered, call "GetGameInstance", cast it to your own GameInstance BP Class, and set the new variable with the Name
(got to this point before)
That’s when I was getting errors. I’m travelling atm, but it was complaining it wasn’t referencing something if I remember correctly
Shouldn't happen if you use the GetGameInstance node
This is a globally available reference (pointer)
Just don't make a custom GameInstance pointer
Cause that is invalid until filled of course
If it does happen, you'll need to share screenshots of your code
Hmm... ok ‘ll have another play around with this when I get home. Thank you both for your help. Sorry for the noob question! 😁
Once you accomplished this, you should be able to use that ActiveSaveGameSlot variable whenever you load and save
Ok I’ll give it another go
Until the game process is quit and restarted, then the player would need to select a savegame again
Yep
Oki
hi guys, does the buoyancy feature in 4.26 require to have a water volume to work ?
Hey guys. I got a question about swimming with a third person character. I'm trying to add vertical movement while in the water by pressing the Left or Right trigger buttons on a controller. I thought it would be super easy to do but I'm having a few problems.
This is what I have for my BP for the vertical movement and with this, the character always rotates towards the same direction when the button is pressed (North I think?)
I just want the character to move up or down. I don't want any rotation. I also trying using "Add Impulse" but that doesn't work right either.
@tired chasm You can likely ditch half of that and just use the world's UpVector. Or a MakeVector with 0,0,1. But nothing there will affect rotation unless your character orients to velocity or whatever like that.
oooh alright I'll try that
Hey sorry for asking such a dumb question but I'm really struggling with such a basic problem. I have a bunch of AI driven characters running around killing each other and would like to add a kill feed. I can manually add a child to a UI widget through a key press with code in my level BP so I know the UI works. Where I get stuck is triggering an even in the character BP and passing through the variables for the killer/victim etc. The characters have an ondamage event that makes them check if they have 0 health and then handles the death sequence if necessary. I assume this would be the right kind of place to grab my variables and pass them to the UI but I can't figure out how. Should I be using the gamemode BP or another actor, or possibly a BP interface? I'm really only just getting started on this so I'm unaware of the common methods for handling this kind of thing. Thanks for any help anyone can offer with this!
oh yeah I think since I have this ticked it's giving me problems with trying to move up and down... but I do need that ticked and would like my character to rotate in the direction the player is moving the stick, but going up and down also seems to be affecting the rotation ><
short answer: i handle it that when i spawn the characters, they get spawned by the gamemode and it binds an event listener to it. If you place the actors via level editor, you could bind the events in the BeginPlay of the GameMode which then does "getAllActorsOfClass" (or what it is called) and binds to the death event for each of those
Pressed on play but the game didn't start
please show more code 😉
Thanks man! I shall look into event listeners! 👍
hi, somebody worked with recieving 360º livestream in unreal?
Guys, I have a strange issue, I am setting collision enabled to Query Only on one blueprint, but each time I restart the editor it is set back to collision enabled (Query and Physics). I am sure that I saved it and it is checked out from perforce.
Cast shadow Isn't working in blueprint for a single static mesh how can I do this please help
guys i need to do some cubic interpolation through BP, does anyone know how i can achieve it?
I got an actor wich has an array of locations and i need to interpolate them in a smooth way like that.
Keep in mind that Vinterp and vinterp constant don't do the job. I need the cubic interpolation 🙂
Thank you!
Construction BP to randomly rotate a mesh around the X axis if the user has RandomRotation=true in the editor.
When the BP first runs, the mesh's original rotation is stored in the variable Original Rotation.
When the user ticks RandomRotation=true, the object snaps to a random rotation within the Rotation Amount as expected.
When the user ticks RandomRotation=False, the pipe does not set back to it's Original Rotation as expected.
Do I just need to put this in the Event Graph so it will update after placed instead of the construction script, or is something else going wrong here?
Yep, it looks like that's the solution, but why is this? Why doesn't the script behave as expected when it's on construction rather than on Event BeginPlay?
please help
your variables are not initialized (empty pointer as you might say). it seems that you have variables defined in the blueprint actor, but they get not filled with references
you also should go from the "find sessions" failure exec to Set "finding sessions : false"
So, I checked the ENetRole enum and it's not declared as BlueprintType, hence I get that there is no switch node. But if that's the case how I can select or create a member variable of it?
yeah that's what i thought as well! shall i use the "add math function" node for that right?
thank you really much 🙂
Does anyone know anything about projectile movement? Why doesn't this move towards my player which is the child of the parent playable character?
for some reason i cant get the ai to contuie moving after a level is loaded via the menu blueprint, however i can makie the ai move if i open the level directly
{
return FMath::CubicInterp(P0, T0, P1, T1, Alpha);
}
thank you really much man! I guess this one is c++ right? is there a way i can have a node in the blueprint so i can work with it? i have no experience in c++ unfoprtunately yet
It's c++ to add a BP node. Look up how to make a blueprintFunctionLibrary and then add that to the .cpp file
ohh okay awesome thanks!!!
static FVector CubicInterp(FVector P0, FVector T0, FVector P1, FVector T1,float Alpha); ```
This goes in the .h file
No worries 👍
🙂 thanks a lot!
Let me know if you can't get it working
i will have to download the source version of the engine first i guess
Yeah I guess if you want to avoid c++ you'd have to implement the math yourself. But I'd recommend just getting started with c++. You'll need it for something eventually
yeah absolutely true, at some point it will be needed lol, im a 3d artist tho ahah
Well here's the code if you want to implement it in blueprint ``` /**
* Performs a cubic interpolation
*
* @param P - end points
* @param T - tangent directions at end points
* @param Alpha - distance along spline
*
* @return Interpolated value
*/
template< class T, class U >
static FORCEINLINE_DEBUGGABLE T CubicInterp( const T& P0, const T& T0, const T& P1, const T& T1, const U& A )
{
const float A2 = A * A;
const float A3 = A2 * A;
return (T)(((2*A3)-(3*A2)+1) * P0) + ((A3-(2*A2)+A) * T0) + ((A3-A2) * T1) + (((-2*A3)+(3*A2)) * P1);
}
thank you so much man!
hey @boreal ether can i grab your help?
Not sure what the issue with that could be tbh. What does the movement code look like?
its player movement, its the ai pathfinding movement involing navmesh
for some reason if i open the level using menu blueprint widget it does not move, meanwhile if i open the level via the viewport it works fine
Do you get any errors in the log? Try typing "show navigation" in console to see if the navmesh is built?
the navmesh is built and there is no errors
Try a breakpoint or print string in your AI movement code to check if it's being called?
@boreal etherThe ai blueprint doesnt appear to activate, is there anyway to activate it?
How are you testing that it doesn't activate?
print strings
apparently i had to restart my pc to get it to work, might have been a bug or something
hi guys! im just about to finnish a project in UE4 for the quest, but cant wrap my head around the very last thing. I have a BP spawning an actor but everytime it does that it crashes. did somebody experience smth similar? when its connected to the pc its fine
im destroying the actor after each spawn so it cant be due to extreme amount of meshes etc.
have you checked the log? And logcat output
adb logcat -s UE4 -s debug -s DEBUG
how do I do that when its only on my headset?
it doesnt happen in the editor
only when i disconnect it from the computer
Connect the headset to your computer and go to UE4Game/yourGameName/saved/logs or something like that
And run the adb command in a command prompt or powershell
@boreal ether thanks joost, but I just made the most simle trial ever basically eventbeginplay hooked up to spawnactor as the only BP in the scene and it crashes...
must be a bug? or the quest cant handle spawpning?
You can definitely spawn actors on the Quest. It doesn't crash if you don't spawn anything? I'd strongly recommend checking the log and logcat. There's probably an explanation for the crash in there.
no it works fine as soon as I remove the spawning bp
it seems it cant spawn actorclass BP
wanna show us your spawning logic?
Hi. I'm struggling a bit with figuring out how to work with data table category handle. Having a hard time finding good documentation/examples on it. In the below example, I'm obviously getting all the rows of the table, and not just the ones I want by category handle. I want to get an array of RowNames for the rows matching my CategoryHandle. Can someone give me pointers on where to start? https://puu.sh/HV3S3/225c3c86cf.png
Hello everyone, I'm making grid based WASD movement (Using Timelines and VLerps), I'm trying to get the movement to be smooth when I hold a key down, but there's a weird jitter. Anyone able to help?
Anyone know how you might expose the Skylight’s Source Cubemap Angle so that it can be dynamically changed in runtime or in the Sequencer?
is it possible to change these using blueprints? 
like change the padding on the Bottom?
Yes.
ok, in that case i just screwed up and i gotta look into it more...
because i tried this
but that just gave me error messages
Does the jitter happen on frames where one timeline ends & another begins? If so, I wouldn't know how to go about fixing that short of making your own on-event-tick movement math thing
Why on earth would you increase the padding by 1 every frame? 😱
Mad man that's why
just so shit moves and i can see it 
What i actually wanna do is control my skyrim-esk inventory using WASD
like when i press W - the list scrolls up by whatever the amount of padding it is, until it gets to the next item
So you want to navigate the menu using wasd
yea
So I believe there is controller support by fedault for this
I am slightly unsure about wasd
However
I assume your not disabling the mouse?
Right. Well. The error first of all I believe is because you're trying to treat the Vertical Box as a Vertical Box slot. It has slots, but it isn't a slot. Hence you get a "accessed none" error.
yeah, it happens when one ends and another begins. I think Event Tick might be the way to go for this one too :p
well what i wanna do is this
https://cdn.discordapp.com/attachments/847253861403197471/863095128138448926/SrEu8m3Kfy.mp4 @burnt canyon
You prob want a uniform grid
ooh i see
With just one collum
hmmm and then switch between grids using A and D ?
yea
that's why i was trying out with the padding
U know
I think it's just a case of changing the selected unit
And using anim
To move the box
UmG anim
Maybe

can animations stack?
because idk how many items i will have, so it might have to move up or down unlimited times
U can move anything in Umg
that's why i thought working with a padding float i can just lerp would work neatly
Not sure if it will look proper with changing selection tho
UMG has huge animation system built in
For moving stuff
Or maybe u can move units in a scroll box
So many options ahhh
so if i wanted just for the sake of checking if it may work - to go ahead with the padding thing before i dive into a giant umg animation system-
How would i go around "Slot as Vertical Box Slot"?
because this way doesn't work 
Since Luna's being a champ, you're good, but for future reference, #umg is where you're most likely to find widget experts 🙂
Well you gotta make a new node
And you need to add the padding to one of the elements contained in the vertical box, rather than to the vertical box itself, otherwise it's the padding around the entire box you'd affect
i wanna affect that tho
It's fine, this is blueprint too, just that people in #umg are likely going to have the best answers 🙂
Oh well alrighty then 😛
So if you drag out from it and search for set padding, do you get any results?
Turn on context sensitive 🙂
Okay let me boot up UE and I'll have a look
Hi! I have a problem. I have this kind of hierarchy on my blueprint class. All platforms have the same ability (rotating and falling the water). What should I do to not copy myself in code? I think about actor child but it's very not elegant and it's not recommended (I read). I think about something like prefab, but is it on UE?
use blueprint actors? 
Hm what do you mean?
Why not just split them into 3 actors, and make use of Event Dispatchers?
aren't there actor instances you could use?
It really depends on what game design you're trying to achieve tbh
I still don't have any visual imagination of your written puzzle mechanic description.
Top platform get some water, when it fill with water, then it invoke next platform. If it is on correct position it again, fill and repeat the procedure for the last platform
🙂
Of course I want to use Event Dispatcher, but as you can see, many of this components are rotating
okay so i can scroll my entire widget...
So if i would make a new widget, that's only the list of items...
And place it above my background widget...
could work right?

or is that scuffed?
because then i could just move the item-list widget around, making it "scroll"
and keep the background where it is
I want to take an arbitrary float and convert it to 1, what is the math term for this?
absolute
hmm
say I want to counter a scaling value higher up in a component tree
the root is scaled to .75 1.5 1 or whatever
break the vector to floats but then the value needs to be the proportional offset of 1..
absolute is for zero isn't it?
like the corresponding desired value for 1.5 is .6667
.75*x=1 etc
"abs" removes negative signs, ensuring the output is positive (-2 becomes 2)
are you thinking of "normalize vector"?
takes a vector and makes the length of it 1
crap. I totally forgot about UE while it was starting up. sorry about that 👀
nice 🥳
hey im wondering why the bullets ive created wont collide with the shield i am using to block it
im thinking it might be the thickness thats the issue
the BP ^
the collision settings ^
heads up, afaik for actor tags
there odly and kinda rusty/broken
would not recommend using unless they have been patched up in the past year
@fluid compassBullet actor component hierarchy?
how broken, as in it just doesn't work at all?
i'm using 4.24
Trying to scale down the Advanced Vehicle blueprint but it breaks when I do... is this avoidable in any way or it's all built with measurements and physics that don't scale
hi, quick question is there a way to connect a int to a text render component
so it displays the int value in the text
nvm its set text, i got the wrong one...
yeah theres a conversion to text or string node
Im not sure why its rendering like this if soemone can explain why its like this and is there a different way to approach this without using a HUD
I cant take a good picture, the text is flickering and is barely visible, like its a totally different thin font
I cant get a ss of the text when its selected, but its barely visible. its showing, just not as it should be
Had to take it w the phone
Hello , does anyone know how to get local or relative location of an object on tick ? What i get now is just the static value of last position but wont update on tick like the world location or rotation :/
Not sure why but I am on the Unreal SenseiAcademy and I cannot figure out why Keyboard 1 & 2 do not work as shown in the example of this course it the 8th video titled "Inheritance - Parents and Children at 4:57-6:06 my 2 types of blocks do not spawn or anything but it shows in real time that it is firing the keyboard buttons so I am not sure what the issue is. I am taking a screenshot of my code
I think I posted this in the wrong discord server
@red trail Print the newly spawned actor's location. And change Collision Handling Override to Always Spawn Ignore Collisions.
I'll try that
hmm i'm wondering what i'm doing wrong here, I have an event.
it didn't work
I see the event firing a string but input is not enabled
@red trailWhat's it printing?
oh wait when you say print you mean put like a print string? to test it?
Is get player controller not good enough or am I using the wrong target? I want to use the right mouse button in this actor so leaving it to self is good right?
Yep. See what the newly spawned actor's location is.
oh that part I need to do one second
@sand bloom Have you enabled MouseOver events in your custom controller class?
oh no I didn't even know I had to do that
Yep. MouseOver is disabled by default usually since Unreal defaults to FPS gameplay.
@red trail That maybe too. But after the SpawnActor. Drag from the blue pin and GetActorLocation and print that as well after the spawn node.
so that couldn't have been it sadly
Are you actually getting execution from the mouse over? Could be a collision issue as well.
It fires the proper string every time a collision starts and ends with the mouse
hence my confusion
Not sure what could be going wrong really
Could it be because i'm trying to use a input on a pawn? While already controlling another simple camera pawn?
@sand bloom Curious. If you change that to a keyboard input instead of a mouse, does it work?
@red trailDo you see either of those prints?
nope
usually what I do is I start over on the blueprints believe it or not run the whole thing again to do it right
@sand bloom Odd. To be fair, I've never tried that on a Pawn with enabling input. Theoretically it should work unless they're maybe AI possessed, then their Controller may interrupt that. To be fair, I tend to avoid mouse overs most time. Much easier just to project mouse location to screen space and rely on line traces in my opinion.
@red trailIf you're not seeing any name, then your 1 or 2 isn't setting your value. Or something else is nulling the class after 1 or 2 is pressed for some reason.
okay I"ll check the code again for something else in a bit taking a break
hmm yeah ill try with setting it to playercontroller instead of ai controller
doesn't work so far but ill try fiddling with it
This the widget blueprint
Yeah I just don't know it's not the mouse's fault since the string fires
the input just refuses to do anything..
I guess I need to use a actor this sucks I wanted a pawn to use move to location
Pawns are actors
I mean I guess that's on me
Yes you're right
But I meant I have to use an actor that isn't a pawn and see if that works
hey it works
so I guess the issue was it being a pawn
so that does suck but atleast I can move on now I guess
Guys
will just have to try a more tedious method instead of move to location
Show your BP or no one can help.
Does anyone know how to get local or relative location and rotation on tick ? :/
Scroll up
Or just repost the screenshot.
this
Does anyone know how to make this so that it saves a new index each time it is run, instead of changing the same variable?
Hey, can someone help me please? I created an Event Dispatcher on a Widget and now i need to create a Reference to that Widget (to bind and Event to the Event Dispatcher) on another Blueprint. How can i create such reference?
Unless it is the level blueprint, you can cast to the widget and call a function.
Can you load another level with it?
any idea why this wouldn't work?
intensity is at 0, and on the level bp i'm trying to raise the value with a timeline
Is the point light static, stationary, or movable?
@candid blade do that with the timeline, not using the tick event chain
Timelines "tick"
Thank you @timid rune , but i cannot cast to a widget becasue i have no reference to it. How can i get a reference to the widget?
so you're saying i should control the intensity with the timeline on the light bp rather than the level bp?
@dim harborNot sure if this helps but this is what I do.
Well depends on how you want to do it, and you didn't say before that you have many lights that have to be driven by one time line. Either way, the timeline update can directly change the value, you don't need to use ticks on the lights
Yes, that works well, Thank you @timid rune .
@faint pasture thanks for the help, I ended up calling it with a bp interface and doing the timeline on the light bp itself
for those interested:
No Problem
How do i access animation montage notifier ? in blueprints
Hmm so I got a lerp that follows my mouse pointer each tick for smooth movement, it works well enough but how would I go about adding a jump with setworldlocation happening each tick?
I tried various things
Like adding a separate lerp and timeline just for the jump
but I can't really get it to work
at best i can make it teleport somewhere which is not what I want
You're gonna have to explain more about what you mean by jump
Imagine a cube on the floor, that's supposed to "jump" go smoothly to a location upwards the z axis and then as gravity kicks in it falls
i'm starting to consider an entirely different way of doing this
instead of set world location with lerp
because of the jump
Any hint or guide/tutorial on how to create a multiplayer character customization? Im working with a dedicated server,
But I figured i'd ask if anyone knows a way because I do like the left right movement I got going on right now
it's a sidescroller kind of thing btw
so not fully 3d movement
y axis is locked
I could do a similar thing with add impulse and big collisionboxes to the side of the cube I guess
@sand bloom So what's that got to do with the mouse following? What is your control scheme
quick question - how was lerp done again if i want it to last 1 second?
not like this afaik
Just timeline it.
but lerp is so smol and neat tho
It follows your mouse whenever you right clicked a actor it adds a check saying follow my mouse slowly basically
and you would use your left click to make it jump
wherever it is
yeah but it doesn't do what you want it to do
@sand bloom Are you using any movement component or just hard coding the movement like this?
but it seems like a bad way to do it I guess, right now i'm trying to add impact left or right depending if your mouse is touching either of these red zones, but I can't make the mouse recognise them for some reason
hard coding with physics enabled
If you're using physics just term everything into forces and impulses
yeah that's what I'm trying to do right now
Ok so use a vertical impulse for a jump
I guess i should have done it from the start
now ironically it's reversed
I can't get left right to work 
because my mouse is not registering these two boxes, oh they are just not moving lol, ah man i am wasting so much time on dumb shit, finally got it work. Can't believe I tried all this convoluted nonsense first, nvm it's now broken again because attaching them to the cube so they move along with the character breaks the ability for the mouse to notice the boxes 
Welcome to the job
haha yes 
Is there any good modular way to clone 3d objects multiple times, like the cloner in c4d?
So I have a curiosity. When we do something like "attach actor to component" or similar type situation. That actor always seems to have some reference to where it originally started at in world space.
So this means that no matter what you do with the object the data for all its starting params is still saved.
Anyone know if there is any functionality that clears post data? Or a way to like "clear prev references" ?
You can make tools with blueprints like using splines and creating custom params.
Or
Use a third party software like Houdini or anything with a built in API that would allow you to create a tool and use it in UE that way.
Thanks, I'm wondering what kind of nodes would create instances of a mesh
Or just clone it
do it in construction script. have static mesh components. use add instance. and so on and so forth.
@stoic coral
Amazing, thanks a lot
Also is it possible to animate the parameters of the nodes in the sequencer?
I have a point in my map (lets say 0,0,0).
And I want to know if the camera is at the right side of the point or at the left side.
How can I do this. Which nodes should I use?
Do you mean right/left of the player/raytrace?
Not sure if you are trying to find vector data or just trying to figure out which side of the actor the camera is on.
If you are wanting design like "if player has object on there left side camera jumps right" and vice versa using vector data and some simple collision solution might work well at least to experiment.
But like Lorash said.
@sonic silo
Right/left side of camera
Or lets say screen
At left or right side
im remaking my hit detect system and need help differentiating between a few nodes: whats the difference between point and radial damage?
When setting "physics constraints"..
When player picks up actor > carries it around > drops actor at new location
It teleports the actor to worldspawn location when I turn "physics constraints" on. No idea how to get it to update those constraint locations.
Thanks in advanced and before you ask. The "DetachFromActor node" is set properly it drops where ever i drop it when im not trying constraints out.
not sure where to ask, is there a way to add a button or 2 buttons to show up above a actor, after its been selected.
ex.
Event Actor On Clicked -> show 2 buttons(2 options). selecting one of them shows some text component and the other is a action, that ive not done yet. Not sure if this can only be done with a HUD or is there a different way of doint it.
experiment with HUD/Widget
can I activate the HUD with from a blueprint? Ive never done that so im asking
as in widget visiblity?
yep pretty common question and lots quick tutorials on it.
make your hud inside the actor
hud from actor and not a new widget?
join the unreal hangout voice channel. ill explain what i mean
Is it possible to make a material that highlights the wireframe but also renders the faces?
expirement with render states and visibility settings. You can target object/area values and determine what is hidden/loaded.
Might be better to ask in Materials to get some ideas on the PBR side of things.
basically sounds like low poly style
Sort of trying to emulate old vector graphics
then just google low poly style graphics for unreal, should be pretty common
Low poly is different than vector graphics
seems like a good area to google too
Vector graphics means something different in modern times, those are scalable vector graphics, or svg
you trying to go for something like a SNES Star Fox?
I'm sort of looking for something tron-esque
this is the type of vector graphics I'm talking about
Ahh I see. hmm
Yeah putting retro in the search came across more of that type thing as i said it sounds like materials is where the question would find more of an answer type your liking.
The first page of results seemed to me hit the nail on the head but if your google results arent helping ya.. idk man.. id show ya some tricks but thats a lot of time when dont even seem to sure of what ya want. sorry
im confused, if I add spehre collusion to my mesh, how come it doesnt show up in the game, its like there is no collision there?
shouldnt the collision be round?
Like i dont get it.. does "tron graphics in ue4" search results work for what you are looking for?
or maybe wire frame?
I was able to make a wireframe shader, so if you'll look back to my original question, I wanted a way to highlight the wireframe while also rendering the faces
Yeah the only thing I found is this https://www.youtube.com/watch?v=KHiZfy5OlO8 but idle if that would show the faces the way you want. The best thing I can think of is just making a texture to do what you want and an emission texture that highlights all the edges, but I'm sure someone smarter than me can come up with something better.
This is the improved version of the tron glow material that I made tutorial about.
Maybe you can have what's shown in that video to show over the top using masks.
Thanks for the help I'll look into it!
Can anyone help with this issue i am having? Basically im making an inventory system and when i try to open the inventory it crashes. Here are the logs
Your array has nothing in it and you're trying to access index 0. Index 0 doesn't exist.
Are you able to reference actors in a stream level if it is loaded, but not visible?
Hey can someone help me? I need to know if can set up blueprint communications between a Widget and an AIController. For what i know, it is not possible, but i am not sure.
@@dim harbor You could but i am not sure why... ai controllers dont do much but follow ai commands. Did you mean ai pawns? Change their vars and therefore their behavior trees?
Hi! does anyone remember what is the component to render a scene on a widget?
i want to create a window showing the view of some other place on the map (it's for a battle simulation)
Hey can anyone tell me how I would set an int variable in a struct through a bp to then access it and use it to update another variable in a different bp
Go to your BP and add a new variable, make it of data type "YOUR STRUCT"
after that, when you want to edit it, grab the variable and drag a new node from it, look for "set members on"
it should look something like this
@torn falcon
So then how would I make that info accessible by another bp?
click on the variable and check on the right window of "details" (make sure the details windows is showing)
there look for "instance editable" (check) and "private" (not check)
if they are like that, you can access to those variables through any place that has a reference to your BP
Ahhh right, thanks man
How can I get a variable from a parent for a HUD widget. Only gets the default when using a child.
Hi guys, Im very new to unreal blueprints and learning the basics rn. Im trying to make ammo collecting system for an FPS pawn. I came across an issue in making an ammo collectable where i have to use 2 cast to nodes. however It is not working. when my character runs over it, it only plays the sound. I want to set the ammocount variable. any help is appreciated. Thanks
well i think the problem is, that you try to cast 2 different things from the input reference "other actor". are those in the same inheritance tree or are they 2 totally different objects?
what are u overlapping there, an ammo box/clip?
Anyone ever have input key simply stop working?
It is in the character and its not just action mapped events but the entire keyboard key.
This isn't the first time I've had this issue and it's not just a single key. It's like once it stops working it never works again..
@trim matrix No, they are two different. I want the player character to overlap and set the variable which is in the weapon blueprint. yes it is an ammo box.
ok the overlap input "other actor" will then be the character stepping on the ammo box. the ammo count is stored on the player?
more important, did u debug it to see which nodes get stepped through?
if it is the player overlapping, the cast to ak_weapon might fail there...
the ammo count is on the ak_weapon
yes, but the overlapping actor might not be the weapon
guess we need more info on how your character and weapon are related
so, the overlapping actor is my FPS Pawn. but my weapon which is storing the ammocount variable is not related to the FPS pawn BP
If one event cant support 2 different cast to nodes, can I do it with multiple event nodes?
something like this
what you could do is, in the character, setup a variable "active weapon" with a type ak_weapon
then somewhere when you equip the weapon, set the active weapon to this weapon
in the overlap method then you can get the active weapon from the overlapping actor (FPSPawn) since it is a member variable
then you can set the ammo count of this weapon
i hope it is understandable for a beginner 🙂
Ill try this, Thank you 🙂 @trim matrix
Figured it out.
I had multiple key events for different things on the same key on both the player and the controller.
I just unchecked consume input on the controller one.
Question about SAVE / LOAD level with all actors.
I'm not asking the code part, but just the workflow.
How do you guys save and load a game? Let's say QuickSave and QuickLoad key.
I'm doing it in the GameMode while using a flag in the GameInstance where the flag tells the game to load from a save slot when the level is loaded. The flag is set when you press "LOAD GAME", it sets the flag to TRUE then loads the level. When the level loads and GameMode starts, it read the flag and as it's TRUE, it loads from a Save Slot and sets the flag to FALSE.
But.... the issue is... I keep getting invalid actors from the list of actors to remove. :\
Do you guys have a better more efficient way to SAVE/LOAD?
Is the GameMode loaded before all the actors in the level?
I'm using the built-in Save Game system. Nothing too fancy.
Though granted that my game (which is an action RPG for consoles in mind) doesn't benefit from instant saving/loading system, and all I save are player stats, items, progression flags, position in the world, current time/weather.
I'm doing the same, I use Blueprints cause I don't know C++
But when and what entity /actor do you use to proccess all the data?
I don't store any objects reference in the save game data.
OH, so I'ts like You can only load chapters of your game
so the player needs to play the level from start each time?
but keeps all the items /inventory etc
Right?
I have a performance wise question. Is there a difference or a better approach between usin GetComponentBy class on an Actor without casting it, or directly casting the actor to my known type and getting it's component directly from that reference?
@graceful forum Have you tried Tags? I don't know if it's better but might be a good test to perform
@lime fulcrumIf you want to save and load specific objects to places rather than checkpoints, you have to save their data you want saved, and their class, and then spawn that class and repopulate it's data after load and set up all of it's states again. In blueprint, this is incredibly tedious for larger projects and very prone to bugs.
is this a good place to ask for help with code?
@graceful forum Depends on what you mean by performance. Casting keeps hard pointers so causes the class to be loaded at all times while the casting class is loaded. May not be a problem. GetComponentByClass is more CPU cost, but not by much. Realistically, you won't notice it unless you're planning on checking tens of thousands of actors for this component every single frame of the game. In which case you already need to reconsider your approach. 😄
@lime fulcrum Only a few choices there. Either find a good workflow where you can integrate that kind of system and deal with the edge cases. Reconsider how you want to allow users to save progress. Or learn C++ and do your own Archiving, or buy a save plugin to handle the C++ side for you.
@steel sequoiaIf it is Blueprint and Unreal related, go for it.
I'm trying out Easy Multi Save plugin right now. Do you know if it's good enough?
Haven't tested it myself. So no opinions.
oh, ok. Thanks for the tips by the way 🙂
I think I have that though. Might check it out for my own learning purposes.
thx @maiden wadi turns out ive just figured out my issue! I've been trying to modify a variable before I've referenced it
I'm trying it right now and it uses Interfaces to save actors
Looks like it's based on serialization so you have to set that "Save Game" flag on your variables
Yeah, that'll be pretty common with any decent save system.
aha I've found another error, I've been following devsquad's FPS series and ive found some strange behaviour. Despite copying my code between two different guns, one of them fires the bullet with significantly less force and is very slow moving
this is the code of the slow one ^
and the code of the fast one V
does anybody notice any reasons why this is happening?
@steel sequoia are the variables the same? Copied ones may default to 0
Yeah it's not like something happening in tick or all the time or something. I can Just keep the reference of the component for later usage. I was asking which one is the better approach to adopt for getting a component from an actor in general. So yeah I was asking the trade off between hard referencing and using GetComponentByClass I guess
@steel sequoia Get the location and rotation of that transform from the Socket, and forcibly set Scale to 1,1,1. Also check the muzzle location on the broken one's mesh to make sure it's not clipping or close to clipping somehow.
thankyou
I've checked the muzzle location and It appears to be ok
I am unsure of how to get the location and rotation from the socket
sorry if I'm being a pain
@graceful forum Mostly just a slight bit of extra CPU cost for the GetComponent call. I do that with my Inventory Components. I place them on several different actor types and use GetComponentByClass since there should only ever be one of them on any actor. Much easier than casting, or having to have a whole interface set up for it.
@steel sequoiaYou're in a learning channel. If someone makes you feel like a pain, ignore their ego. But to get the location and rotation, you can break the transform and get them separately. All this will do is make sure that the bullet doesn't scale with the gun or socket. So this may not solve your problem if the socket looks correct.
Got it, thanks for explanations
thx 🙂
Hi, I am trying to diable LODs in my game, I used r.ForceLOD 0 and it worked in the editor but it fails when making a test build and uploading on quest, not sure if that's a problem with test builds or android but is there any other way to disable LODS?
@fair sun Checking on that, but it looks like it might be a ini file setting.
@fair sun Uncertain, but it seems you 'might' be able to add that line to the project's Engine.ini file under [SystemSettings]
I'll try that out
thanks
@maiden wadi Getting
PackagingResults: Error: Unhandled exception: UnrealBuildTool.ConfigCacheIni_UPL+IniParsingException: Failed to find value when parsing Project\Config\DefaultEngine.ini, line 137: r.ForceLOD 0
Try r.ForceLOD=0
Well, since it's an open ended Action RPG, I'm primarily keeping track of what quest has been completed or still ongoing.
That's way easier than what I'm doing. I'm trying to replicate the classic QuickSave and QuickLoad with all the entities saved and loaded
Hey there, I'm kinda new to making advanced Blueprints, hopefully this type of question is allowed. So, I was wondering if there was a better way to go about doing this. Basically, for our game we had the idea of the player unlocking various abilities/"powers" throughout the course of the game. And my solution for right now was to simply code all the entirety of the ability within the player BP itself and have a boolean that can be toggled on or off to tell if you've unlocked it yet or not.
The problem is, I feel like this kind of system is sorta messy and maybe isn't the best way of doing it...? I've heard about gameplay abilities but the problem with that is that I've heard it requires CPP but our project is an blueprints only project. Basically, I wanted to have a system where I could make BPs for the various abilities and do all of the coding of them there and then add them to the player but I don't know if that's possible using only blueprints. Anyway, I will post the screenshot of how the blueprint is set up right now, excuse the messy nodes and stuff I'm not great at organizing. There's more abilities then just these two but I think you can get an idea with just this screenshot.
As in boomer shooters instant save/load? I don't think instant save/load need to be written on disk, but it would be easier if all your enemies are placed on the map, and keep track of their state, stats, and position
yeah, Half-Life for axample. That kind of Save System
BTW, how do I fix a broken reference in the Component Handler?
I get this because I removed a BP Component but I did remove it from actors and saved before removing the component. It keeps saying: Failed to load /Game/MODULE_SaveGame/COMPONENTS/BPC_ActorSaveData.BPC_ActorSaveData_C Referenced by InheritableComponentHandler
What even is: InheritableComponentHandler
Ok, "Fix Up Redirection in Folder" did the thing it seems
My implementation is a mix of C++ and BP, but here's my gist:
The skill tree progression is kept track by a bool array on a GameInstance. The GameInstance serves like the judge of the game who keep track of player stats.
Skill functionalities are separate classes storing animation montage/sequence, and attack stats.
Player character calls for that skill class and execute it. They don't need to do the check, since GameInstance stores what skills are unlocked.
If that doesn't make sense, I'll elaborate more on it later.
I think it makes sense. I use GameInstance to keep variables between level loads
On ue4. If I want to have a bunch of characters, enemies and locations with their associated attributes, which data type would be optimal to store their information?
I am assuming a struct for each of those, stored in the game instance?
It packaged but LODs are still there:(
Splat. Supposedly you can run that as a console command at runtime. Not sure where or when you'd need to do that or how often(Like after level loads).
Worth asking, what are you avoiding LODs for? They're pretty big for performance.
LOD can be used even for linear games, doesn't have to be an open world only thing.
I actually need to compare performance for Lods vs noLods. I ran that as console command but with no results, could oculus/android block that?
@lusty elbowThat is an incredibly open question. It'll be hard to answer without more specifics. What are you storing this information for? Usually it would just exist on the objects themselves. If you're avoiding spawning them for performance reasons, then it still depends on the game type. If you're using one large world, you likely need an AI manager that can spawn/setup/destroy/save these things at runtime based on conditions like whether the player is nearby. Also avoid putting too much data on the GameInstance. You'll eventually run into bugs where a player will load one game and end up with another's data. Good coding can avoid it, sure, but savegames are the same, safer, and not prone to having left over data between loads when done correctly.
One of my favorite examples of systems like that is probably the X series. Nearby ships are actually spawned in and displayed in 3d as objects. But in the map, you can see a whole universe of moving things. Except that things not near the player are nothing more than simple data being ticked every couple of seconds. So they can still "move" and do things in the background, but without the extra cost of existing. Writing an AI manager system could handle that for you depending on what you need.
Mmmmh. Thanks for the answer. I will look into it! I'm still open to additional answers, of course
Ok, maybe I can add more information.
Basically a vehicle spawned on a simple top down map and a "home base". There are about 12 characters, each with their associated data (Health, Morale, Name, Equipped items, etc), but their 3D models are not spawned in the level. Only the vehicle and the home base are. Say 4 of said characters jump into the vehicle and go roaming the map. They find a settlement and get down the vehicle to explore. So the level changes from the strategic map to the level of that settlement and the 4 characters are shown.
I believe the X series example would be close to what I intend. As I just want to store data persistently from start to end of the game session. I don't intend on spawning too many 3D models at once. Any recommendations for this scenario?
Sorry if I'm not explaining myself correctly
This would be a little easier doing it through C++, but from a pure blueprint standpoint... I'd probably store their Data in Savegame between levels. While in game, have a component attached to your GameState that gathers the data from the save and stores it for game use. You can easily get the component via GetGameState->GetComponentByClass. So doing this you can even keep you Strategy and InMap Gamestate different classes if you need to. Add characters to car via FName property or whatever other ID you want to use. When car reaches other map, you can save it's data before map load along with everything else, and retrieve the array of characters in the car. You can then use this array to retrieve their data from the Component on the Gamestate to populate the 3d Actors. Doing this will allow you to easily create them on load of map, as well as pull UI information for your strategy level. At the end of the in game level, you simply retrieve the actor's information that can be affected in the level, update the component on the Gamestate, let it save, and then load back into the strategy map.
Thank you for the answer! It seems that I need to learn more about "Game State" and its relationship to "Game Instance".
There isn't one so much. GameInstance is just an object that persists all level loads and exists from the time the application is open til closed. Nearly every other object is destroyed and recreated every map load. GameState is just an actor that is commonly used to hold the state of the game. In singleplayer it can be whatever you want it to be. It becomes a little more apparent in multiplayer because GameState is often used to display stats to all players about the current state of the game.
Hello all. Do i miss smthing here? im trying to make this mesh (this is a key) invisible when playing. for some reason he is still visible. (he is moveable)
Try enable Propagate To Children.
That BP script assumes you only want to hide the root component, not any other components parented to it.
Mmmmh. Thanks! I'll learn more about the topic and I'm sure more questions will pop up. Thanks once again!
how can i add an actor as like a subactor of an actor
in unity they are called children
how do i add children to an actor at runtime with blueprints?
Thank you soo much Didnt notices the children bool
Can someone tell me how i can make the for loop functions run every 0.5 seconds of a tick?
But that's a material editor issue
So i have an Attack function that gets called from a behaviour Tree. Does someone know why i cant use the "Play Montage" Block (which has a On Begin Notify output that i need) within the function blueprint? I can only call it from the Event Graph from the AI but not in the function blueprint. This is the block i want to use:
Because latent nodes can't be called in functions
How can i check for an animation notifier in a function then
Implement the notifier in the AnimBP or use a Notifier BP maybe?
Does anyone know?
Hmm will it work if you add it after a (delay) 5 seconds after event tick or a timeline?
If you double click the for loop you will see a macro that executes inside it, you can copy it to your own macro or add a delay
second option would be to delay for x * index in loop body but that's not reusable
um not sure
after then 1 should be fine
oh man a delay cannot fit in that macro
ill use a custom macro
a delay can come in that
I want to open level through game instance and bind an event on my game mode, but I need to wait till the level opens because the old game mode gets destroyed, is there some delegate that runs when you open a new level?
Is there another viewmode to show collision? I have game mode on while i simulate and i've set it to player collision but I can't find what this thing is running into (and I'm confused that's what happening) - all the other AI controls that this vehicle uses somehow don't show what it's hitting
the delegate on the game mode runs quite fast after begin play so a simple delay would be a terrible race condition
If I move the landscape, road spline (what the cars use to navigate) up super high away from the rest of the level, they don't have any problem
both these are coming back as none, so if it is another object, I can't see it in the editor before runtime and I can't turn it on to show what else it could be
why it don t work
son of a bitch....i think it's hitting the foliage
what
sorry I'm trying to fix my thing
But for your issue, hit f9 on that overlap red node
and see what happens
then it's nothing is overlapping - which means you have a collision channel problem
@gritty aspen hit and overlap are different things.
does anyone know how i make this window size to whatever the size of the screen is?
Are you asking how to make it the size of that screen there, or does the screen size change?
i wanna know if in the case that the screen size changes, if there's a way to make that window the same size of the screen
Is it possible to bind the size
I just checked, it isnt
Ill try to figure it out and let you know
work with anchors
I don't think that will change the size though
Oh got it
that's what i was looking, thanks!
Question-
I made an interface so my widget & my third person character blueprint can talk to each other-
But i can't drag it in 😦
look for event "right", "left", etc.
Hi, I was wondering if it's possible to change a Physical material friction in blueprints, I can't find a way to do it and the reason I'd like to is because when my car drifts by changing material itself, it jerks back into place when it stops drifting, I would like to smooth it by changing the friction value itself with a timeline
Another question, i started a project with a blank template, is there any way to import the mannequin asset (mesh, animationbp, etc) to it?
Yes, if you have a project with the third person template, you can export the assets you'd like and import them into a blank project, I like to start from scratch so I have done that a few times
You could also choose migrate, both are under "Asset Actions" when you right click on the asset
nice, thanks
No problem 🙂
Is there a way to bind an event to when an animation sequence is finished? I want to play a different animation but I don't want to bother in the animation blueprint if I can call an event that plays a random animation sequence
i have no idea, but you may get a good answer on the animation channel
i'm getting such a hard time getting the camera position to look like this
am i doing something wrong or is it just because those are 2D sprites and mine are 3D models?
@runic parrot try an isometric camera
yeah, i'm trying to get a good angle that looks like isometric camera
i also think i need to change to 2D sprite looks in order to get a similar look
I think most angles in isometric games are between 45 and 55 degrees
the problem is the actual sprites I think
you'd need to actually INCLINE the mannequins themselves
same reason Legend of Zelda is not really top down, you'd only see the hat
that makes sense
i'm gonna switch all the models to 2D sprites and try that later
oh wait, that one is 3D and looks quite nice
i'm gonna try that
okey i inclined it -45*(x) and if i use the Top down view it looks way better
i'm having troubles on positioning the camera to get the same angle as the "TOP" view, since i'm using a SceneCapture2D
I seem to get this error when starting up my packaged game, and ive gone to both objects above and recompiled/saved them, but it doesnt fix it?
Okey, so i got the view that i want, but i'm having troubles getting a camera with the same view.
This is the view if i use the editor's TOP view
And this is what i get if i use the camera with some angle
Any idea on how to replicate the first one, but with a camera?
Hi, It is possible to create a blueprint class that is not an actor ? that has no position, that is not an object that will exist in the world
It's worth noting that objects still need to be held within Actors. So you'll need GameMode or GameState or something to hold that object.
Should I make an Class in C++ directly ?
It depends in what you want to do
You can hold objects in the GameInstance too which is for example not an actor :P
how to smoothly move camera while change between 1stPerson view and 3rdPerson view?
Does anyone know of a good way to equip weapons on a 2D flipbook? i'm trying to not create a diferent set of flipbooks for each weapon.
How can I get the velocity of an object if my only reference is from a Hit Results Structure?
i did a ai spawner but when he spwan the ai the ai don t move
@runic parrotI mean switch the camera to actual isometric mode
Make sure your AI Character is set to work when spawned
There is an enum in the class defaults next to the ai controller variable
It might be set to worked only if placed in the level.
I've been really struggling with this really simple thing. I'm just trying to make a set of spline meshes disappear gradually like the white gradients here. I've tried so many combinations haha but nothing looks good yet. any idea?
Looks more like you want to modify the first few points of the splinemesh and not just start and end
well i'm trying to get each mesh to shrink from start to end ? I guess i'm really confused it sounds so simple
Doesn't look that simple hehe
Not sure atm what a good solution would be. The Timeline seems to static to do this.
You kinda need to scale multiple points at once but offset in time and then remove those points when they reach 0
well it's a value progression from 0 to 1, should be enough no? oh I see I haven't though about doing it that way
I've only been playing with math
i'll give that a go
thanks 🙂
You could try math but you still need to scale all points eventually
You could use one Timeline and apply the current scale of the timeline but adjusted by the current index
E.g. If the first index goes from 1 to 0 in 1 second
my most successful attempt was to gave 3 different remaps of the line progression but it was way too crude
YES!
that sounds perfect!
in my head haha i'll report back!
With a bit of math you could first calculate how big the diff should be between each index and then use that
One idea would be adding ontop of the scale for each point. So 1 to 0 could be mapped to 1.1 to 0. And then clamp again. That way the second index would take a bit longer befote it actively starts going below 1 scale
Third index could then be 1.2 to 0 etc
Not sure how to math out the exact value you want to add ontop though
pretty sure you can figure something out
does anyone know if there is a way to change the playrate of an animation montage mid montage?
e.g: slow fast slow
I did 🙂
Honestly, seeing that, you might have better down that with a material haha
how xD?
But cool effect. Also thanks for triggering my arachnophobia lol
sorry
Idk how exactly, but I'm relatively sure you can do that via a material
But if it works for now, just leave it
I guess it could be a simple gradient opacity mask or something, anyway yeah now I can do something else! Thank you for your help!
Why is this happening?
Why is what happening? The context menu showing when you let go?
Nvm, the video is not showing it, thats so weird
Its actually that the box is disappearing
but the video is showing it as staying there
You got bugs. Should ask Silver to get his spiders to eat them.
could it work if i just restart or is it that I've done something wrong?
Restart may work. I've never encountered that issue myself.
Validating engine files is also a consideration if you have time.
Okay, if it's because I've made a mistake somewhere, I'll be really confused because I'm using a tutorial to do this.
Does it show if you just normally right click somewhere in the graph?
Hello I got an question so I made an enemy health bar but the health bar wont go down I made some screenshots of what I did but I still don't understand why it doesn't work.
This is the widget
This is the Game Controller
This is in the enemy
This is also in the enemy
This is an interface
Is it possible to run the construction script if one of the actor components was modified in the instance?
add breakpoint on all events, make sure they are all triggering, then watch all values, make sure they are all getting updated
Seems like the function Update Health AI isn't getting fired but I can't find a way why tbh.
This one
Hey Guys, is there an Idiomatic way to use Blueprint? Like best practices in "Code" organization and does and don'ts as there are for the C++ side (Coding Standard).
If so, do you have any good resources? I am talking about some good rules to follow in a professional environment to make code maintainable and scale-able.
Having some issues with manipulating rotations in blueprints, not sure if I'm doing something wrong
The grey wheel spins on top of the white wheel
the pillar is locked to the grey wheel
the orange wheel can spin on the pillar
I want to make it so the angle of the wheel on the pillar matches the angle of the bottom wheel
What I've tried doing is getting the relative rotation of the constraint for the pillar wheel (which is highlighted in first pic)
Then using Rotator from axis and angle to combine the relative x-axis of the constraint with the twist angle of the bottom wheel
then applying that rotator to the pillar wheel
but it doesn't work right
here's the blueprint I have:
And here's the behaviour when I run it: https://streamable.com/g5icfr
Thanks for the swift answer. However these are all pretty common sense. We often have the problem between non-programmer "artists" doing exactly that and the more organized/clean architecture approach, which of course also takes more time and effort to mantain and design. And every meeting is basically a discussion, why the spaghetti / one graph approach is just not right, eventhough it is faster and not as difficult. They're argument is that it works either way. However they just have been lucky so far that it didn't break apart yet. Feels like a House of Cards to me and I am just anxiously waiting, that it crumbles, but I can not get it into their head. If there was something "official" from Epic along the lines of "does and dont's" they would listen, because the Senior Designer is a hardcore Epic fan boy, and would blindly follow anything they say. lol.
well, if it's a server function, make sure it's called on server, make sure the caller exist on server (as UI does not exist on server, and player controllers are not the same on client and server etc)
Have anyone tried to bypass this issue?
https://issues.unrealengine.com/issue/UE-28690
Unfortunately not. You have to understand this person's mindset. He is so full of it. He once told me, thanks to Unreal Engine the job of programmers has become obsolete because he has an "Artist" can now do what programmers can but with a way more powerful tool. And that arrogance just shows in his way of coding. Complete garbage. That's the level of ignorance I have to deal with day in and day out. I am a freelancer fortunately however by best bud has to deal with it every day as he is employed as Junior there... It is a horrible predicament. So that's why my last resort was to look for some Unreal Engine commandments, like a Blueprint Bible to save him from insanity 😄
You are absolutely right!
Tell him to copy the CMC into blueprint. I wanna see this.
Exactly!
Sorry but what do you mean by this?
Like this?
hahaha ^^
I'd like to point out something obvious too. You said it yourself. You're a freelancer. You get paid to do what they ask. If they continually mess things up that were not in your hands, it's not your responsibility. If they do mess things up that are in your hands, your responsibility ends at explaining why it failed and telling them the better approach. If they ignore it, it's no longer your problem.
I mean, I think we had this line of conversation in the C++ section already. I am a self thought programmer myself. Everything I learned was from my projects, books and youtube. However I try to adhere to good programming practices and I am a sucker for good architecture and clean code ^^. I lack the fundamentals however to explain to someone else why some code "feels" better than other. But this is becoming more of personal gossip now, so I will end this conversation here. Thanks again for giving me the glance of a moment of being understood 😛
Also a pro tip that most people don't know. You don't have to reroute Function arguments in blueprint to get a function argument at the end of the function. You can get them directly.
Cleans up a lot of BP functions.
Isn't an argument that sticks with him either. He says, well then get a better computer. LOL ^^. This guy is just insane.
Unfortunately he can. It's one main costumer (can't tell you which) but he can afford that. It's a pickle.
Oh I wish I was this non-idealistic. ^^ But thanks for the chat. Was great.
is your code for multiplayer?
@maiden wadimost people don't even know what PURE means in UE4
Good rule! ^^
It's a good tip though. I see a lot of people allocating extra local variables to hold things for the end or doing big huge long reroutes.
If you even have a couple of logic branches, that reroute gets messy fast.
So what you are saying is you can call the Function input as if it was a local variable within the scope of the function as shown in example pic. 3? That's neat, I wasn't aware of that either!
I think that's a relatively recent feature
Not sure when it was added. I did a ton of my learning on 4.25
@rich axleall function inputs are local variables, cause it's how c++ works
the only issues i had were passing references
as arrays can't be passed as reference for some reasons
How do you mean? I pass arrays by ref all of the time.
reference variable has diamond icon
gimme a minute, i need to open ue4
I think what Alexey means is a function argument passed in by reference to create a level of indirection. So the function operates on the variable without having to return it.
By the way: (Out of curiousity) Would this be an "Array of Float references" or a "reference to an Array of float values"? 😬
Reference to the array. Fairly sure you can't have an array of references in blueprint.
is there a way to make a cone collision / trace similar to pawn sensing components or not really?
You could easily do multiple traces in the shape of a cone. Nothing native, you'd have to do that yourself. Or just use a cone static mesh and use it's overlaps and hide it in game.
i might go with the static mesh option. Crazy they dont have something like that when they technically have a component with that functionality. Thanks though!
Hello, do you have an idea for my Pawn to stay glued to the ground without using physics and have correct performances, or maybe better way just ? For the moment I use a Raycast at the position of the actor with the beginning: Z + 200 and end: Z - 200 and I ignore self on the event tick.
Is Character Movement Component and Capsule Collision too much for you?
Not really, but I was looking for a less complex solution
I don't have any character, mesh. I don't really need physics thing
in the capsule component under collision presets, is there an easy way to ignore character? I see "ignoreonlypawn" but my guys are characters and I dont want them to get stuck in each other D:
this code keeps degenerating itself and stops working, all i have to do is replace the "target - enemy health" with itself and re-compile and it works. Is there a reason why?
Did you find a solution? We're actually doing the same thing 😂 Mine i use for crowd NPC
I'm not sure if i get the whole context but placing it on Event Begin Play triggers your code only once. 🤔
You need another event for it to do it again
it just randomly breaks after i compile it a few many times
Im not even changing anything that has any relation to any of that code in between compiles
Good morning gurus! SaveGame question: do I essentially need a copy of all the SaveGame variables in my gameinstance (and specific variables in other blueprints that read/update them - for example, the ChatName variable in the character creation screen)? Want to make sure I’m not giving myself needless extra work.
Yes, the GameInstance keeps track of current stats, and SaveGame make a save slot by copying what GameInstance keep track of.
This works well for single player games, but multiplayer with dedicated server might store the data directly on the server.
Ok, that’s cool. So the saved slot updates the variables on the gameinstance, then the gameinstance updates the variables used on the other blueprints (and then the other way around to update those variables in the slot)?
I'm forcing the location of the actor, with an raycast impact point. That's what you're looking for ?
Yeah, i'm doing the same. Raycast and move component to location for the NPC. My issue (that i might need to live with for now) is that it wont stick right away to ground while "Move Component To Location" is executing because its time based, i.e. it moves to target location regardless of elevation and after that is the only time it would adjust itself wrt the ground
Hiho, I'm looking for a solution to be able to read out the data from items.
Ok, let's start at the beginning.
I have a ParentAxt_BP, this is connected to the AxtStats_Structure.
Now have 3 weapons in my inventory.
Small battle ax, medium battle ax and large battle ax. Each weapon is an Axt_BP_Child whose values are entered in Axt_BP_Child.
General data are stored, for example:
Axt_BP_Chil01
Name: Small Battle Ax
Physic DMG: 15
Strict: 5
SellPrice: 35
The question is, how can I read out these values?
The values are not individual variables within Axt_BP_Child01-03
Another problem is that the player can change the weapon at any time and thus also the values change, but not the variable names.
this is the weapon Slot in the CharacterStats Widget
guys how can i add a sound to a widget
This is a Child of Master_Axe
Play Sound 2D
Do you want to set a OpenUp sound or a background sound when the Widgte is open until its closed?
Hi guys. Could you help me how to implement a jump forward in BP (3d space)? I thought it was easy but it's actually hard.
Its unlike the default 3rd Person level, where when you jump, you could move forward in "floaty" way. I need a jump that really thrusts you forward
Can't you add a force ? something like that in a direction
"LaunchCharacter" if it#s just a singleplayer game
I actually tried both add force and launch character but i cant seem to make it work
Is Launch Char or add force should be a continuos tick or only once?
Force is probably wrong
Cause that's more for physics simulations
Launch Character needs to only be called once
I'll retry Launch Char. 👍
yup
what event i put
there an easy way to cast to player state from game instance? or the other way round can't find what links them
Hello! I am using a foreach loop. Can anyone tell me why the next node of the foreach loop isnt getting called? I used a break to test it out
Note: It works when i give it a different array other than the crafting slots array
Array has no indexes.
@wanton ginkgo You can get the local player's playerstate from GameInstance via GetPlayerController0->PlayerState. PlayerState can get GameInstance via just GetGameInstance.
Hi quick noob question here, don't know how to google it in short words, where do I have to look for some kinda of scaling of the material? For instance the print shows a floor and the rock material is way over stretched.
Worth noting not to use GetPlayerController0 with Seamless server travel.
@runic plinthIf that is a static mesh plane, you need a material instance of the floor material that can affect the material's UV scaling.
Thanks I think I got a forum post to follow on. It's somehting along those lines right?
Pretty much. Just make a Scalar Parameter in the material. Name it like.. Scale. And then make a Material Instance of the material, and you can set the scale to whatever you want.
Thank you for your time 🙂
I created a custom gameinstance blueprint and assigned it as the project gameinstance class. Today I opened the project and the blueprint seems to have disappeared. I can still see it in the Unreal Projects folder. It just doesn’t appear in the editor. I can’t add it manually either. Has anyone else had/resolved this before?
The log says the file contains unrecognisable data and is unknown file type
‘Uasset’
I’m using a level sequence and blueprints and static meshs to achieve this. Need help! When character walks up to door suppose to say press interact button to open door then I want it to play the animation of my character opening the door and closing behind him. I’m stuck. I’m trying to open the door like Dracula does @14:12 https://www.youtube...
was this block removed?
Doubt, why?
cant find it
It's a function of the PlayerController
So if you have context sensitivity on it won't find it unless you pull from a PlayerController
that was an old screenshot from 2015 with the block in it
how do i do that?
nvm
worked it out
srry
Multiple ways. The dirtiest is to call GetPlayerController
The cleaner one would be getting the Controller relative to where you are
If you are in the Character, you can do "GetController" and cast that to PlayerController
you mean like that?
Yeah
The Hint is the text below the Node Name
"Target is PlayerController"
That means that the function is part of the PlayerController class
And you need at least a PlayerController or a child of it
Also
What you call block is actually called a Node
what would i put for my object wild card here?
The actual Camera Object
ahaha srry, ive jumped from scratch to this
its a seperate actor is that a problem?
It's not exactly a problem. It's a big learning step for beginners
The ViewTarget needs to be an Actor, so that is correct
But you are lacking the knowledge of how to properly reference an Actor inside another one, which is totally fine.
Your Camera is somewhere in the Level?
yup
Is it more than one Camera or just one for that?
Okay, so the best way to do this is to let the Camera "register" itself somewhere where you can reach it
Others will tell you to just use GetACtorOfClass, but that's the worst youc an do
ok
An example of what you can do is this: If you have your own GameState class, or even GameMode if it's singleplayer, you can always get that from nearly anywhere by calling GetGameState or GetGameMode
So what you can do is add a Variable of the Camera Type Reference in your GameState or GameMode
ah can their only be one game state?
And on BeginPlay of your Camera you can get the GameState/GameMode and set that variable
Yeah
ok ok ill try that thx
So the Camera sets the Variable with "self", which is basically the object itself
Also called "this" in C++
You can then later get the GameState/GameMode everywhere else
And access the variable
So you basiclaly bridge the missing link between your two actors with the GameMode or GameState
i dont think i have one
GameState might be the better choice in genera though
No GameState gets created runtime
Same as GameMode
Do you have a GameMode class already?
i dont think so
Right so there is a big gap of knowledge :<
You can create your own GameMode class. That GameMode class defines what GameState, PlayerState, PlayerController, PlayerCharacter et.c classes you wish to use for the GameMode
so thats which actor you control stuff like that?
Sort of
ok
GameMode is pretty "Unreal Tournament" like
It defines the rules of your game
You usually have one for your MainMenu, and one for your Gameplay
Same for the other classes
also side note, is their a way to make some objects only physically interact with certain actors
ok
Yeah via Collision Types and Profiles
Collision obstacles can be set to not affect navigation
thx
If i just drag in a camera
without it being attached to an actor
can i broadcast to that?
Everything in your Level is an Actor
If you drag in a mesh for example it will spawn an Actor with the mesh in it
ahhh i get that
If you drag in a cmaera it will spawn a camera actor
There is no way of having a 3D "object" that is not an actor basically
ok ok i get that
At least in general
But yeah, you will want to create your own GameMode or use the one that your project comes witzh
Probably has some ThirdPersonGameMode or so somewhere
And also have a GameState
And set the GameState Class sin your GameModes ClassDefaults
Then you can call GetGameState and cast to the class to access your own functions and variables
Yeah it's probably set on your Map by default
Or even your project (Project Settings -> Maps and Modes)
i found the third person game mode
What does it say in the top right corner if you open that
can you read someones username? like their account name on the computer
or reparent the ThirdPersonGameMode to GameMode
Yeah, the PlayerState has the UserName
By default that'S the PC name
Do you guys recommend making adaptive ui/huds?
I try to fire a particle system based on an anim notifier of the animation that i play. Can someone tell me why its not working ?
I'm trying to take my actor's forward direction and get the rotation that would make it point toward 0, 1, 0. I'm using FindLookAtRotation to get back a rotator. When I apply that rotator to the actor's forward vector, it does not give me the expected vector, 0,1,0. Am I misunderstanding something fundamental?
Or: is there a better way to accomplish this? I'm trying to build a minimap system and I need to calculate the angle between my player's forward and the vector that points to the target player. I think I've calculated the angle correctly, but it only goes from 0-180, so I need a way to determine whether the target player is on the left or right side of the player so I can render things correctly. I thought applying a rotation that brings the forward vector to 0,1 and then applying that same rotation to the other vector would be a reasonable way to approach this.
hello there, still have situatition to solve. Ball is player, i would like to player rotate 30 degrees to right or left dependeing on player direction at the momemnt when player hit a wall. in situation A i would like to rotate player to 30 degree to left, and opositive in situation B
You could set up two collision capsules / boxes on the wall and have different overlap events fire when different capsules are hit.
I don't know what you mean by optimized. That's a good point about if the ball hits them both. You'll probably need some logic that can handle that case.
Depending on what you want the behavior to be.
i need use some vector math for sure
but i am only beginer
cant find out how to do it
Oh, do you want it to be variable amounts of turn depending on where they hit? Example: you want the angle to be higher if they hit further away from the center?
no, fixed angle is ok, i just need game understand rotate player to right or left
Oh, if that's the only challenge, I think you can just use RotatorFromAxisAndAngle and apply the resulting rotator to the ball. (though if that's the player, you might need to apply it to the player controller or something)
(I'm a beginner too, hopefully this helps though.)
Personally, I'd just do it on event hit of the player's capsule component. Inverse the hit direction, so that it's pointing away from the player, transform it to local space, compare if it's positive or negative Z. Choose left or right based on that. Bonus that if you want the scaling Daniel mentioned, you already have a value that you can use to scale from.
" Inverse the hit direction, so that it's pointing away from the player, transform it to local space, compare if it's positive or negative Z. " please, could you name a node for this, i am only beginer
=))
🙂
@fading wren compare velocity and impact normal
That would work too
Start by typing stuff like "transform" into the node search box
What you want is "inverse transform direction"
do i understand correctly velocity = vector that showing speed
I don't have the ability to test at the moment, but more or less this if I'm still thinking clearly. 😄
You guys seem to know what you're talking about 🙂 Any ideas on this one? #blueprint message
thank you very much
Or better approaches welcome. I just need to get another vector in terms of the first one. IIRC from linear algebra it'd be something like a transformation of basis, but I can't remember how to do that and I also thought one of these builtin rotator functions might work just as well
also have a question, why you doint Inverse transform location, if you already multiply normal to - 1?
Those are two different things. Multiplying a facing vector by -1 will reverse it's direction.
Invese and normal Transform will take a local or world space vector and transform it into or out of that transform's space.
For instance. Say you're standing at +200X in world space. You have a location at +300X in world space. You inverse transform that via the actor's transform, and it'll now be at +100X in local space.
i am not understood it comleptly
sorry
you mean if we had Local space it became a world space, if we had world space it became a local space
?
Depending on which transform type you use, yes.
Inverse is from world to local, normal Transform is from Local to World.
aaahhh\
ok
also i am not sure, if i can use Rotation from Xvector to rotation of actor, since i am using
i need use something like add impulse
perhaps
Yes, sorry for late reaction
Alright, I think I'm onto something. Not sure why all of these other things didn't work, but doing RotationFromXVector on my forward and passing it in as the second argument to Delta (Rotator) (with a blank rotator as the first argument) gave me a rotator that, when applied to the forward vector, forces it to end up being (1, 0). I think I can work with this at least.
well, that means you need to keep in mind what exist on server and what on local machine...a lot of stuff does not exist on server, and a lot of stuff on server is not the same as on local machine
Which node should i use to avoid this warning?
You need to use those nodes in the EventGraph of the AnimBP
And save the result (Holding Type) to a member variable of the AnimBP
Ah ait
Then you can use that variable in the StateMachine
The nodes you are using there aren't marked as threadsafe
those last two vectors are nearly equal, especially within a tolerance of 20 lol.
checking the source code for vector equals looks like this should work as intended
Print the Vectors before adding them and check what you get there



