#blueprint
402296 messages · Page 567 of 403
A How To Guide for respawning a player character through Blueprints in Unreal Engine 4.
make sure your kill-z is set at a reasonable range
Can we call an event BP with a widget?
I’m trying to set the visibility of my staticmesh in BP actor with the button of my widget
How do you set a map value at the correct key?
given the key.
Add node hmm what a pain
button onPressed event
does the widget is isfocusable?
My bad idk why I set the player character here
eh
could some one help me with getting udp messages into Unreal(4.26)?
I’m trying to work on an idea but I’m not sure what the most efficient way would be. I am trying to make armor for a game but don’t want it to be like armor, just projections of light that overlays the mesh itself with different shades of color to determine the strength of the armor
Any one have any ideas on how I should approach this?
@lyric gate Initial thought is use the same mesh, same material, but create a vector parameter in the material applied to the mesh that you can set from your coding. Vector can swap out the colors based on the strength.
What resources did you guys use to learn Blueprint?
I'm a total beginner, just moved my stuff from Unity to UE
Reading, watching a few videos, reading, following some discord conversations of common problems to not run into them myself, a lot more reading. Haha.
@trim matrix How used to Unity were you? How long were you in the environment?
@maiden wadi but I’m trying to make it so the model/material itself won’t change,
Almost like a second mesh slightly larger suddenly appeared to overlap it
Right, which is why I mentioned simply changing a vector inside of the material to change the color.
where do you guys manage user interface related stuff? player controller?
like showing/hiding of menus
@lyric gate Ah, you mean like an outline style?
@maiden wadi real long, 2 years almost, never used visual Scripting tho
Well, if you want to change the color of an armor itself, change a vector in a material. If you want a literal outline in 3d space, there might be a material way to do it, but usually it's just a second mesh scaled up a little.
@spark steppe I do HUD class personally. Posted a screen of it last night actually, Sec.
yea i just noticed that something like a hud blueprint exists
thx
That's all I do. Makes it reusable for multiple widgets with just a couple macros in the HUD and a new event.
ok, time for refactoring 😄
@trim matrix Visual scripting is different for sure. If you're coming from a C# place, then just remember that each individual node in itself is a function and mostly what you're doing is passing values or references into each function to make it run. Most important thing to learn is just to follow the white line.
two questions before starting to mess with HUD...
1.) it uses normal UMG stuff?
2.) it supports interaction, e.g.: clickable buttons?!
HUD is just an Actor class that resides it's pointer in PlayerController. I store all of my UserWidget pointers there for toggling because I don't want to pollute my player controller with them but the HUD actor is very easy to reach with just GetPlayerController0->GetHUD
Hello again
I have 2 questions:
1)how do I delete all meshes of actor? like get all actors of class > for each loop > destroy actor but for meshes
2)how do I detect if actor's mesh = desired mesh? like if actor has cube mesh - do first thing. else do the second
@last walrus In the entire level, or on a single actor?
ok, so it's not anything special, just a player related actor for the purpose of UI stuff
single actor (both questions)
Pretty much. Though it does have some draw screen stuff that can be neat. Can draw simple lines or rectancles on screen with it's ReceiveDrawHUD event.
sounds good, going to move over my stuff then
@maiden wadi so...?
Pretty much like this.
what is reverse for each loop?
For each loop in reverse.
so it does same actions but from end of array not from start?
Yep, which you should always do when destroying or altering an array usually.
Basically if you ran what I just posted through a normal loop, and there were three static meshes in that array with cubes, only two would get deleted, and index 1 would remain and be moved to index0
Index 0 and 2 would be deleted.
Just ==
Drag off of the blue pin from StaticMesh and ==
Pretty much any type has an ==. Not sure how much you know, but in general C++, a single = means to set something. So StaticMesh = OtherStaticMesh would set the StaticMesh to OtherStaticMesh. StaticMesh == OtherStaticMesh is a comparison.
I know about simple operations in C++ but its too complicated for me yet
so I started from BPs
my previous programming experience was HTML ;D
Haha. I feel you. I've gotten pretty comfortable with C++ lately, but I know that feeling. Just worth knowing, because despite blueprint being visual, it's still C++ at it's core. It's just a pretty way to wrap simple function calls and remove the issue of syntax.
if I need some C++ code I can just use BP nativization )
Funny enough. I learned C++ by starting to write simple blueprint library functions to avoid nativization.
Alright thank you very much!
So ive currently made a procedural mesh plane, where i can choose size based on cm and density of the mesh.
My issue arise when it comes to the UVS, i cant figure how i can increase UVS size accordingly as i want (By moving slider etc like im doing in the gif)
Any tips?
https://media3.giphy.com/media/lY1CMcxNupGu4230c4/giphy.gif
When ever i try to rise the factor above 0 or less than -0.1, it goes all clongy in the uvs
For some reason, when increasing density, the UVS doesnt grow and stays the same, even tough they are used in the UVS calculation for UVS array
why do you want to change the UV?
if you want to scale the material, you should do that probably inside of the material
Might be trying to make something like the geometry BSP stuff but at runtime. I've never messed with UVs, but I'd assume that they scale. IE, setting a mesh with a length of 100 with a length UV of 1 would be normal. But to get that same tiling UV on a mesh of length 150, the UV would need to be 1.5
When you're adding the UV structs, multiply them by whatever your panning wants to be
@pastel rivet nice man, i wanna do that too, do you have a tutorial ?
or any guidance on where to start to learn that ?
is there any reference of what gets initialized first when the game starts?
what do you need from that ?
well, my hud seems to be not initialized when my character is
both do the things they suppose to do in BeginPlay Event
so, the HUD could notify the character when its ready, but can i be sure that the character is always ready before the HUD? 🤔
when you say "hud not initialized", do you mean invisible ?
There is no promise that any beginplay fires before another at map load.
you can initialize the hud in you characterBP-> begin play event
@spark steppe
I can this within the material ofc.. thanks haha, totalt forgot about the UV node there
@maiden wadi thanks!
@pastel rivet theres also a tiling node iirc, which should suit better
@spark steppe Are you trying to add a widget to screen at the start of game based on the character?
@upper linden HUD class, not hud userwidget.
i dont understand what you're saying
@upper linden
Well this is just me with my experience setting togheter a method for creating vertices and triangles into an array for create procedural mesh node.
I can maybe at some point put togheter a tutorial on how to set this up!
I'm going to use it for customizing screen layouts, so I still have a challenge of bending this mesh as well
no, the problem is my character grabs the cameraController, sets it to the preferred mode and if its 3rd person it will try to enable the crosshair on the HUD
good luck, i'd appreciate anything you'd throw my way, haha @pastel rivet
so character init => camera possessed => toggle Crosshair => hud not ready => call to null
@spark steppe CharacterInit is Beginplay?
ah ok, i thought you were talking 'bout a main HUD on screen
yes
i've now tried to move the camera init in the onPosssessed event, but its the same problem
HUD class is definitely valid at character's beginplay. It should be created before GameMode calls the first BeginPlay. You're certain you've set the correct hud in the GameMode, GameMode is correct for the map, and that you're casting to the right HUD?
@pastel rivet have you tried using the runtime mesh plugin? I am using procedural meshes to create limbs from skeletal meshes, but was told a runtime mesh would be much more efficient (need to get it to compile for 4.26 though).
the widget that i create in the HUDs onBeginPlay isn't ready, the HUD itself actually is
so onBeginPlay in the HUD is executed later than in the character
Ohhh. Yeah, no. Beginplays cannot be relied upon to be in order. Cause at start of game, GameMode fires them off randomly for every actor.
You're better off having the Character's Beginplay call an event in the hud that creates the widget and adds it. That's why I set mine up the way I do.
@proud hull
Is that useable in game?
What's wrong with it? All it's doing is allowing the character to tell the HUD that it's ready for it's Widget to be displayed.
@pastel rivet yeah, lol, it is called "runtime" mesh. 😁
@proud hull
You got a link?
@proud hull
Is it called Runtime Mesh Component Community?
well ok, it's better than my solution for sure
Basically has all the same properties and functions of a procedural mesh, but much more efficient I am told.
Have to try it out, curious if you accualty can choose from where the mesh is created (pivjot) since this is very important
can i use this to create a random generated dungeon/building/station ?
@upper linden runtime mesh component? You can technically make random generated stuff in just blueprints using any number of pre-created meshes. RMC is to create the mesh from nothing (or copy another mesh if you want).
funny enough, this works in onBeginPlay, but not in the Possessed event
i would have expected the controller to be ready before it can possess something
@upper linden RMC has been used in procedurally generated projects though. One example is a project that was used to generate a city from a heightmap. The buildings are created with RMC.
i see, i'll learn to use it
Already posted this on reddit and got a good response there so I'm sharing my procedural cities project here for free as well, including source and the thesis that
That is the city example.
i'll check it out
i wanna generate stations interiors randomly
but you're right i can use modular components
@spark steppe Consider something as simple as this. You can call this from the character with a Self reference for InCharacter. It'll make sure it never doubles up on screen, and if the reference is wrong, it'll just remove itself as well. You could possibly add in a check for if GetPlayerCharacter0 is valid, then use it instead, or whatever.
Right being the hud function you'd call from the character, left being the widget itself.
thats pretty much what i got now, thanks
if I use "set visibility" node - component will be physical and collidable or it will just disappear leaving only it's reference on scene?
I'm using a Widget Interaction component, and sometimes when interacting with world widgets with the mouse cursor, the mouse1 events stop coming through correctly. The "Pressed" event never happens, with only the "Released" event - you have to doubleclick in order to get the pressed to register
Anyone know what could be the problem here? It feels like something along the input handling chain is eating the mouse event, but none of my own actors have anything that would handle it
changing visibility does not change its collisions
so... to set object invisible and not collidable I must use 2 nodes?
or there's a way to do so with 1 node?
You could make a function that calls both. Then it's one node. XD
in my language we call methods like this "crutches"
but it seems like it's the only way
I mean creating functions is literally the way to do it in programming if you want to do a complex thing with less code
It's not really a crutch :P
hmmm
but I can give an example
there are nodes "set relative location" and "set relative rotation"
and also they 2 in "set relative location and rotation (or rotation and location I cant remember)"
yeah, the the "set location and rotation" is basically a function which does the two separate tasks in one
🤔
Yeah. You're free to look at the C++ code. SetLocationAndRotation just calls both of those functions in turn.
they actually both call MoveComponent
SetLocation simply provides the rotation as the current rotation of the object
SetLocationAndRotation uses the input parameter
(I just checked because I was curious)
Either way, wrappers are common and should be used. They're not crutches, they're organization and simplification.
yeah
If you want to do multiple things in multiple places, and don't want to call those multiple things in multiple places, make a wrapper that does those multiple things and just call the one wrapper.
Hey I want to create a dialogue system based on json
is that possible?
I'm going to try to recreate DDLC in its entirety in VR, and it's incredibly dialogue-heavy, so if it could just read the original dialogue from JSON, it would be much more efficient
Sure, you'd probably need C++ to read it though as I'm not sure if the file reading stuff is available in BP's
I remember reading somewhere something about importing JSON files as a datatable?
Oh yeah that might also be possible, if it works that might be a fairly good way to go about it
I mean if you can output JSON to csv. then yeah
Hey all - quick question. Is there a way I can "sort" the "click" priority of objects in the editor? I've attached an image below as an example - I'd like to be able to select the items within the blue volume while the editor camera is outside of it, but currently I have to fly within the volume to select them, since if I'm outside, it simply selects the entire volume. It is setup as a cube that matches the outer collision volumes 3d scale, and the blue (or red either) isn't rendered while ingame (simply using it for editor utilities to visualize a collision volume easier). Maybe I'm missing something, or maybe there's a better way to set this sort of thing up?
Not sure if this would have been better in editor-scripting channel or here, but these volumes/actors are setup as blueprints
Like, I suppose it's easy enough to turn off transparent selection. But a bit annoying I suppose
Are there known quirks with setting entire Maps/Dicts in BP? I tried setting a whole Map var directly but the values don't seem to update. It's a map of Name:Struct
nvm It's some other bug 😐
@pulsar moss that largely depends on how you're updating the struct values, you may want to provide an image of your implementation
What's a good way to do branching dialogue logic in UE? I've cobbled something together using behavior trees, but it's kind of lacking in that the tree is required to be an actual acyclic graph, as opposed to most branching dialogues 😅
I'd love to just use Blueprints to do it, yielding the appropriate dialogue line with some kind of latent node 🤔
@steady apex you can easily do it in bp. You need to figure out which type of data structure you want to represent the dialogue tree.
You misunderstand, I wanted to represent the tree in BP. Hence the usage of latent nodes
UE4 doesn't seem to have a very good support for coroutines, sadly.
@steady apex what do you mean by represented in bp?
I mean representing the actual structure of the dialog with the actual structure with the BP.
Oh I gotcha. I think it should be possible, you might just have to write your own wait for response latent node
That's what I've been planning on 😁 Hence the last past of my post
I just can't find a decent documentation on latent nodes 😅
It actually might be fully possible in BP only.
I'll have to dive deeper into the C++ side of things I guess!
Oh really? I didn't think you could create latent nodes using BP
It'd be a bit of a workaround but you could have the main tree structure call out to "Event Set Response Options" and then have "Event Response Option Selected" call back in
How is the dialogue data structured?
I've got that far, but then failed to figure out how to make an anonymous event inside a macro so I could make this nice and tidy
@maiden wadi he's talking structuring it as a hand built blueprint.
using an actual data structure would be better but I suppose if you have to actually lay out your dialogue and visualize it somewhere, might as well do it in BP
I mean if we're talking about something as simple as like DragonAge dialogue with choices, make a datatable, and in each table struct, have an integer for an ID to each line. You can add subtitles, and sound all at the same place, and then an array of integers, this array being the choices you can select after each dialogue.
Were I making a larger project, I'd definitely make a proper system and import dialogs from a tool like Yarn
Make a widget that can process it and bam, ya done.
But I'm just making a very simple school project and I want to be able to iterate it quickly without using much more external tools
@maiden wadi yeah that's how you do it, but if it's a big enough conversation, somewhere along the line, you have to have a tool where you can visualize the flow.
Not to mention that using BPs makes it very easy to check in-world conditions and script other events
He's just basically rolling the tool and the data into one
It's hacky but it'll work.
Hmm. Fair enough. I think I'm too used to following logic patterns after this last year that I don't even consider that anymore. >.<
Actually, I might have an idea, I'll go try it out and see how it works out
Ah, I'd have to dip into c++ anyways to get a node which can accept delegates
Does anyone know hot to reference a variable from a widget blueprint to a level blueprint? I'm trying with Cast to in the level blueprint but I don't know what to put in the Object slot
Classes are not supposed to communicate with the level blueprint usually.
@dusky yacht you need to create a widget instance
and it's not entirely correct that the level blueprint doesn't communicate with classes. it's a manager so it manages class delegates, and quite effectively
and you can put in any actor in level as a variable in the level blueprint
thank u guys
What use would the level blueprint be if it didn't communicate with actors? 🤔
To do things specific to that level and not tie actors to a specific level.
I'd say there's a great deal of wiggle room between "communication" and "tying to a specific level"
or alternatively spawned actors
the best thing about the level blueprint is its ability to take delegates and present them as events
making object interaction hookups effortless
e.g. you want a button to open a specific door? level blueprint got you covered
even in much more complex instances
I load sublevels based on the selected floor in my elevator 🙂
I've done tons of things like AI specific patrol changes etc. using level blueprints and player and AI interaction
I'm still trying to figure out how to emulate continuations in blueprints using events
I'd basically need to jump to any of a number of nodes in the graph
Is there any way to react to the event created with Create Event? (e.g. make an anonymous delegate)
What gets called after "restart game" is called from the game mode?
not in BP
but you could probably find a way to expose that functionality to BP
but yeah anonymous delegates would be amazeballs
Ah well
Is there any way to do inheritance / polymorphism on Structs created in the editor?
I want to spawn items in the player's hands.
I've set up a socket as well as a static mesh component on the hands
Although I can get the socket name from the mesh, there doesn't seem to be a way of setting the item's parent socket when using BPs
@desert juniper Spawn then attach
@desert juniper
If your sockets are set up right and your actors are as well, you can just snap to target and it'll work beautifully
Thanks @faint pasture Let me give that a shot
Alright, I don't think I'm approaching this quite correctly
It does spawn the actor, but it doesn't seem to attach itself to the correctly. It is just a child of the player in the world outliner
however the satic mesh is still not populated. I'm assuming now that I don't actually need to have a blank static mesh component on the arms, instead I just attach the actor to the arms mesh?
yup that did it.
only in cpp sadly
Balls
So I started redoing the dialogue system using structs / datatables, but now it seems like I can't get the Nth row of a datatable without getting the Nth row name (AND I have row names), indicating to me I'm probably using the wrong thing
Is there anything like the datatable that's JUST a list of values?
(other than a struct with just an array in it, which won't have an editing UI / search efficiently I presume)
got it. thanks @faint pasture
@steady apex what are you trying to do, get a row from a data table by index instead of name?
I'm trying to make a dialogue system, meaning I have to jump through a table representing the dialogue
So what's the problem with getting rows from a data table by name?
I think data tables would be fine for dialogue
Though it does depend on how simple/complex your dialog system is
How exactly would I get "the next line" by name? I have to increment the index.
I resorted to just finding the name by index for now
I'll rewrite it in C++ eventually anyways 🙂
Do you have a data table per npc with all that npcs dialog or one large data table with every npcs dialog?
One table per dialog
Ok, and you assign a data table to your npc's (so they can share dialogue?)
yep
Well, I don't have NPCs, but for the sake of the discussion yeah
One thing that kinda bothers me is that I can't type the datatable (so that I can use ANY datatable object in the dialog property)
If you have a data table property then you should be able to select any datatable?
or do you want to limit it to data tables of a particular struct?
Is there any way to change the game mode blueprint of the level during gameplay?
You could use a data asset instead of a data table
@proud surge no, not without opening a new level
ok, thank you
Hey guys, I just to need ask a quick question. What do I cast from "BP_Speed_CHeck" to?
what exactly is it? if its a component on your player character you can get it from your first cast, if its in the scene with this object you can set a reference that way too, need to grab it from where it is if that makes sense
hmm tbh im pretty novice so this might not be the way to do it, but currently the only cast from my main hud is to the player character, so if I were doing what you were doing Id maybe make that blueprint an actor component on your level or character and access it through that class as a middle man
but someone else may have a better way
that's actually what i was thinking to do
but, the actor itself, is for lack of better word complex enough that id rather have them as seperate classes
ya know?
as i've got a checkpoint actor which counts the checkpoints, laps etc
yea absolutely
surely there must be a better way than using Get all actors of class as well, seems like player character would be better choice than that
google says to use an interface for it but thats another one I'm just scratching the surface of
@steady apex you should make a struck representing a chunk of dialogue, and it's responses.
@steady apex your master dialogue table should have each row represent an entire node in the dialog tree.
It does. I'm not sure how it relates to what I posted?
I still need to jump around.
Dialog "trees" don't even tend to be directed acyclic graphs
Hello, so I have two door blueprints in my scene, when I copy one of them, the newest one is only functional, is there any fix for that? consume input is disabled
@red bough Can you post the BP with the functionality? 🙂
I would put these in the dialogue struct:
Dialogue Text
Dialogue Responses Array
Responses Next Dialogue Name/index
@faint pasture Again, you are describing exactly what I have.
I was talking about indexing DataTables with row indices 🙂
At runtime you can just get all names and slam them in a an array and use an index to look up the names.
I did.
@red bough that's totally fucky. Each door sets itself as the door reference on the character. So whichever one runs last is going to be the reference door
You need to do it like this.
Open door input pressed.
Character somehow gets closest door. Million ways to do this.
Character calls activate or open on that door.
Door has no need to even know what a character is.
There also seems to be some discrepancy between the "Door Target" and "Door Ref" variable
The latter is getting set in the line trace
actually
I'm not sure what the BeginPlay event is supposed to be doing
I don't think I need door ref
@steady apex just letting player know what door is
it's from BP_Door
@red bough if you want to just open the door that gets hit by some line trace or something, just take out put a line trace, cast the actor to door to see if it's a door, if it's a door, call open on it
What's the desired result, pressing a button to open a door that you're looking at?
yeah, the door is opened by dragging mouse
Sorry it just got back
Wait what
God damn -- I just spent 15 minutes debugging a bug caused by Data Tables being FRICKING 1 INDEXED
Like you're physically dragging to open? Like how VR would do it?
no
just setting relative rotation
I tried to do it physically but my model doesn't fit the frame perfectly
@red bough so you click down, and then moving the mouse rotates the door, and then releasing the button goes back to regular behavior?
Aight so you should do nothing on the door on begin play, set no references etc
Yeah that's all totally gross.
okay, deleted
When you click down or whatever and do your line trace, cast the hit actor to door, if it's door, set door ref
hey there guys
Also set bHasDoor or whatever if you're using a boolean
@faint pasture would u be able to help me with the small issue above?
Your trace is setting Door Ref and your movement is manipulating Door Target
☝️
yeah
@red bough what input opens the door? Do you move a mouse left to right or walk or what?
@faint pasture left mouse button
functionality is fine
but I just need every door to be separated as one thing
so one door doesn't open another one
I was referencing the old screenshot, seems you already fixed it 🙂
@red bough that doesn't make any sense. Is opening the door firing off an event and the door opens over time or are you able to manually open and close the door.
Okay so the mouse x or y is what actually controls the door rotation
OKAY!
YESSS
it's fixed
BeginPlay in the BP_Door was the problem
@faint pasture god bless you man
am I opening meself up to trouble by setting the ItemToAdd var before the server the event?
or am I better off setting it in the server event?
@desert juniper why is that even a reference.
State should exist on the server and he replicated
how else am I going to pass the item data to the inventory?
@desert juniper as a parameter in the event
so this basically?
I'm just trying to promote the item to add as a variable to keep the BP clean
is there any node that adds a member at tthe BEGINING of an array instead of the end?
@desert juniper yeah but it should be run on server from client.
You do not need to multicast anything. You should just replicate the data and use rep notify if things need to happen when the data changes
let me research rep notify. in the meantime, is this what you mean by running on the server by the client?
(run on server + reliable)
Yup
Then the server can do all the thinking about if there's space and all that stuff and then if it things it should go ahead, it just changes some replicated variable and everybody else will automagically see the servers version of things
ah i think I understand. I think in my case what I need set to rep notify is my CurrentWeight variable then
im assuming that just having it set to rep notify should be enough for it to auto change on the relevant clients?
@desert juniper if something is replicated it will automatically change when changed on the server.
@desert juniper rep notified just gives you a function that can run every time it changes, to update other things that might not be replicated or to play sounds or whatever.
Alright thanks, makes sense. But i'm not quite sure what exactly broke here then
Both of these events to run on the server/reliable however it doesn't seem to have any effect when playing as client
Which runs this event in the inventory component class
it works fine when playing as server, just not as the client
The player object is set to
I created an actor that Mesh is damaged by suffering damage.
for example, I have a fence on the Level and I broke it, but when I leave and come back, the fence is still broken, how can I fix it when it's out of my sight?
nvm. my pitch wasn't being replicated, so I was never technically looking at the item according to the server
3rd person models now suffer but I'm guessing that's to be expected 🤣
Would someone more experienced mind sharing a hint on what to do in this situation?
Tbh it's probably gonna be easiest to just make it an actor
@sly parrot are you acquainted with polymorphism?
I don't think I've ever wrapped my head around it, no
well that's what that thing is trying to show you
it's a hierarchy
anyway it has to be an actor due to how UE4 works. if something in the hierarchy needs to be an actor
then the entire hierarchy needs to inherit from actor
or a subclass of actor
OK, so there is not a more elegant way, thanks!
I'm wondering if the person who wrote that diagram actually understands that
Understands what?
I made the diagram, and I understand now
yeah okay
makes sense then
but
there are other ways to do things than using a hierarchy
e.g. using components
it entirely depends on your use cases
I used to do interaction as a hierarchy but I switched over to doing it with components instead
and it becomes much more versatile
Are you referring to actor components?
yeah
well any component really
actor components are a subclass of UComponent
the way you can add them onto an actor to ignore stuff like hierarchy is pretty powerful
OK, I'll look into components online
I like the flexibility of components and interfaces
But I hate the fact they require more boilerplate than inheritance
lol
components dont really
interfaces do
one reason why I tend not to use them if I can avoid it
Yeah I guess with components you can just do get component of type and it either returns something useful or it doesn't
and the implementation side is more straightforward as well yeah
I mean you can just call the component directly if you put it on an actor?
yeah I mean internally within the actor yeah but if you wanted to use it to expose some shared logic then you'd need to grab it somehow first
not sure what you mean
I'd just slap it on an actor and hook it into the actor
or sometimes no hook in is necessary
I'm trying to think of a good example but not sure lol
in the case of interaction you just hook up the actor to respond to the interaction component delegate
and that's it
Ah so in that case you'd have the component message the actor when an interaction occurs?
exactly
How would you trigger it in the component in the first place though?
in my case I'm using a class derived from one of the collision UComponents
Ah, interesting
Very similar to how I do interaction. Have an interaction component that is added to actors that can interact with anything that is implementing interactable interface. Component has the logic to test for interactables (line trace in my case) which then checks if the hit actor is implementing the interactable interface, if it is, call the interact event. Pretty straight-forward.
I just have a regular line trace and interface call for that atm
Same thing as me, except the logic for line trace is in a component.
might need to redo the items handling at some point tbh because I have a number of other things you can do like pick up, drop, interact with different parts of the item, and inspect the item
I mean it depends on what your interaction types are
since all of that is via their specific interfaces depending on what you can do with the object in question it's a bit cumbersome to implement for new objects
Well, many ways to do interaction, hehe.
I have 3 different hierarchies that I have to deal with
pickup and drop pretty much requires the same boilerplate for everything (turn off physics and collision when picked up, turn back on when dropped)
characters, static interactions, dynamic interactions
Another project I use overlap events for interaction. Since I need icons to display above the object being interacted with, overlap was the best route to take. Can have the overlap show the icon and get the interactable reference.
yeah pretty much
overlap also means that you've caught the PC and can request input
imo it's the cleaner way of doing things
but traces are cheaper
I also have some widget components you can interact with on my objects but tbh they're kind of a pain because the text rendering is so bad with TAA
I'm trying to get the hit results from the LineTrace ignore my character, I've tried this but it doesn't work
you probably need a custom channel
but check where your traces hit
maybe they're not where you think they are
also you probably want complex traces
since you wanna hit meshes and not collision
I've checked what the traces are hitting, and it is hitting the model
It's a part of a movement system so I need it to be able to collide with a bunch of things, but it's trying to climb up it's own model
well tbh I'd just set up a custom channel that ignores pawn
and only hits objects that you want it to hit
in case you need hooks to placed in world
@frigid ether Another good side effect of custom channels is it's really easy to just add "climbability" or whatever to something.
Ty
Anyone here use Widget Reflector to scale up/down the UE Editor?
Anyone knows how can I understand my input vector is pointing my characters backwards or forward?
I need to play an root motion animation with select
@dense mica what does get forward vector give u?
maybe u can use that value, i dunnoe
just a thought
I was thinking to use "Get Last Pending Input Vector" and use "Get Forward Vector" together but I actually stuck at math
Google says dot product etc. but I dont know how to work with them 😅
are u using any locomotion system? or made one ur self from the ground up?
cuz im using Advance locomotion system from the market place
and they got the vector ( in a form of arrow) all the time
I am not using any locomotion system, I just use AnimStarterPack for movement anims and some root motion dash/roll animations
But.. I can look at the advanced locomotion system to how they did that arrow actually. Thanks for that
Its the same math in the end
Hmmmm well if u are not using them, maybe just do dot product
what are u trying to figure out again? the direction of ur character?
Let say I am looking forward and pressing S
what dot product does as far as i know is calculate the value between 2 vectors
I want to play an roll animation towards to backwards
well since i assumed u will be using keyboard (only?) why dont u make a variable to check if the character is pressing W or S?
actually that's not a good solution, i will try to dig some stuff
I dont think its a good practice and I am using top-down camera so W or S not always pointing forward or backwards
yeah for sure
@dense mica https://www.youtube.com/watch?v=3uoltzSC0F0&ab_channel=RyanLaleyGames
Get forward vector will give u value between -1 to 1
For those completely new to Unreal, follow these short explanation videos to get a better grasp of blueprints and making games. This episode we take a look at the get forward vector and the get right vector; what they mean and how are they used.
Support me on Patreon and get access to videos early, join our developer community on Discord, get e...
Try to do it for your character and see what kind of values it return.
If the value returns 0.1 to 1 for forward and -0.1 to -1 for backward then u can work with those values to select which roll animation to play
I suppose u only need the X
Oh man scrap them nvm
I did this, but sometimes it gives higher values than 1 or -1
I cant upload as GIF directly because of the size, sorry
You might have to normalized it, im not sure 😦
im also suck at math
well dude u are doing top down right?
how do u want the roll animation to play?
when u click on a point?
With InputAction (when you press space it makes the math and selects animation), but normalizing solved the problem i guess
So a key is pressed but how does it know where it should roll
I guess it's not point to click but wasd movement
0,75 to 1 is forward
0.5 to 0.75 is forward left
0.25 0.5 forward right
Like this
I am checking for inRange(float)
I c
yea try normalizing the vector, see what that gives u
the way I see it, u need to do something with 2 vectors (the direction of where u going and the forward vector of the character
looks like u are on the right track, it's just i never use last input vector so I can;'t comment on that
is it?
or do u have to normalize after the dot product
well what ever works I guess, I just work on my stuff with trial and error
it's hard to get help online 🙂
Nope, dot product alone is enough as far as I can see
Hello guys.
There's a problem that whenever I make a new blueprint, first time that I open it, it's fine and the bp editor opens and everything's in the right order of it but then when I close the bp editor and I open any instances of blueprints the editor shows me nothing, does anyone have any ideas?
This is what I see when I open any Bps for the second time.
🤔
if you open the "Window" menu and click stuff
does anything happen?
otherwise no idea
did you enable/install any editor plugins? I'm just stabbing in the dark here
Sorry for the late answer, yea when I for example enable class defaults from window, the class default variables and stuff (the right side bar of the bp editor) shows up and it says You can open the full bp editor and then I have to click on it to open the bp editor. it seems like that the default settings of opening files may have been changed
Here i have to click on the OpenFullBluePrintEditor to open it in the actual editor
well, aside from the Class Defaults panel not being shown by default
that's actually normal behavior
it shows you a "data only BP" editor
until you add nodes to the graph
then it becomes a full-blown BP
yeah, I think it opens like that when you just make it. I don't have a fine sense of the behavior
but if you don't touch the graph and re-open it, it'll show a data-only BP view
Aha
Sometimes you want a subclass that is virtually the same as the parent but with some defaults changed. They call that a data-only BP and it's a normal thing to do. Epic says they use data-only BPs heavily in Fortnite.
Got it, tysm
@tawny tinsel there is mp4
Rotating block around normal goes crazy after rotating full actor and thats not what i want to happen.
I want everything to work like at beginning no matter what rotation of the actor is
it looks like its using camera angle to rotate
im not very sure how and why just try to reread all the code that influences this
this is code of rotation
impact normal comes from hit results.
I have been trying to solve this 6 hours now, but no progress. Always problems come
Hey folks, I was looking to see if I could get any advice with my task;
I'm making a kinda ghost game where you can shoot the ghosts but I really want some kind of system where the part of the ghost that is shot decreases in opacity, kinda like a decal opacity mask (?) - could anyone help point me in the right direction for this?
material instances mmight help you
Whats the blueprint alternative of the UnwindDegrees in C++?
I need to get angles between two vectors
How to add offset to grid.
@velvet nest Use DoesSaveGameExist before loading it and branch off of the returned bool. Print on the false. If it doesn't print, then the SaveGame at that slot isn't of type PlayerSave.
Plug the PlayerSettingSave string into the SlotName on DoesSaveGameExist.
Is it still printing false?
Hiho is that ok like that or are the return Values not importent?
Can i work like that or need every State his own funktion?
@velvet nest Then you have no save game at that slot. You have to create one.
save then load?
@sonic pine Return values are only important if you want them to be. Since you're setting the stuff in the function, you probably don't need to return them unless you're using those values on the other side of where you're calling that function.
i need them to return to the progressbar
@velvet nest Well, I assume you're trying to get some values from a client to send to a server. According to this, that client has no savegame to send to the server. So you either need to create a save on that client then call this. Or if you want to create a new set of settings if there's no save, call something different if the savegame doesn't exist instead of trying to load it.
@sonic pine Aren't you setting the progressbar in that function though?
I mean the ReturnNode. It's likely not necessary to return the three percentage floats unless you're using them for something else on the other side of where Update is being called from. Because that function itself is setting the progressbars.
ah ok
If I understand that correctly, he's saying that the server has the savegame. You're trying to load it on the client. The LoadGameFromSlot needs to happen after the ServerRPC.
Can anyone recommend some books/videos on programming theory?
@maiden wadi what is serverRPC?
Something that you really should know if you're trying to make a multiplayer game. https://docs.unrealengine.com/en-US/Gameplay/Networking/Actors/RPCs/index.html
@maiden wadi Thank you 😉
Read through that link, it's a pretty good and brief resource on the subject.
@toxic socket Hard to say honestly. I'm a non academic, so books weren't really a learning resource for me. Programming theory can differ a lot based on the environment and setting. I assume that you're looking for something very UE4 related though?
Is there a way to make a BP or something that deletes all meshes that exist inside a volume?
@trim matrix I can't help that much, I'm just a newbie, but apparently something screws up after rotating the cube, that might be the case
@little cosmos Depends. Do the meshes need to be entirely inside of the volume or just touching?
Just touching
@maiden wadi Can you walk me through it?
Easiest method is likely just to create a blueprint with a volume in it. And when you want to delete the meshes, get the volume, get overlappingcomponents, if component == StaticMesh, destroy component.
I'll try that thanks!
@velvet nest I don't know if I'm understanding your friend very well, but if I am, just move the load game from slot to the other side of the ServerRPC.
which node is serverrpc?
@maiden wadi I've been told in #ue4-general that it's fairly complicated. What do you think about the guy's suggestion?
First question would be do you mean at design or runtime?
design time
I want to quickly delete meshes from inside buildings I have
from editor
I haven't done a lot of blueprint utility stuff, but I doubt it's much different, let me check really quickly.
anyone good with maths? I'm trying to make an AI for a physics pawn, a ball. Since this ball has to be shot around a track I was thinking to use some targets to get the right path. I would like to find a good "shot velocity" for the ball for each shot compared to the ball position and the next target position.
Right now im getting ball location, getting next target location, finding the unit direction and multiplying it by some range projectile formulas that I hope I wrote in the good way. I'm pretty satisfied with the result, but still not super precise. Any suggestion?
@maiden wadi Appreciated
@little cosmos So, part of the problem is the setup. Are you talking about literally deleting static meshes off of buildings, and the buildings are a blueprint with a bunch of static meshes?
The buildings are not BP
right now I'm doing like this
They're just made of a lot of meshes that came in via Datasmith
And I wanna delete the insides
So they're just meshes placed in the editor?
Yes
Are the insides a part of the placed mesh?
you could do a BoxOverlapsActors node in that case, I think
You just drag a static mesh from the content browser to the level and it's a building and the insides?
No
It's imported with Datasmith
Bottom line it's all different meshes
Not a single fbx
Trust me I know why I want that functionality
Okay. That might be workable. Wanted to make sure you weren't trying to alter a class default or change a literal mesh.
yeah cool
@little cosmos I haven't imported stuff with Datasmith, so I'm unfamiliar of the hierarchy. How does your level outliner look? Are the insides a different StaticMeshActor than the outsides?
@little cosmos Best I think I can come up with is likely just a box you could move through the editor with the translation tool. Add the meshes to an array, and if the box overlaps a component with that mesh, it'll delete the actor that the mesh is a part of.
Blueprint Utilities are kind of fun. Might have to look more into them for some level design.
How would I go about getting the center of the screen and spawn a linetracebychannel forward?
@trim matrix In game?
There are a couple of different methods. If it's within an actor where the camera resides, you just get the camera's location, use that as the start. GetIt's forward vector and multiply that by the desired distance, and then add that to the camera location for the end point.
Ohh right thanks
Hi, what is the best approach to save level states? Currently I'm trying to save level states objects (inheriting Object) (i.e. has a key item been collected, etc) in my SaveGameObject, so I made an array of base level state classes (there are different types of levels) and when I'm saving the game I'm populating or updating the array with information about current level. I set every possible variable to be serialized on SaveGame. When I'm executing "Save game to slot" node, in the debug mode I can see that my array of level states has my latest variable, however when I'm deserializing it on "Load game from slot" the array in SaveGameObject holds N nullptr's (None), but it has all the other primitive variables and structs. So it actually kinda saves my level states yet it seems it fails to deserialize them on load. So what can I do about it? Is it even a valid approach to save level states like this in save file?
Morning all, i'm new to blueprint and just trying to get raycast to shoot forward from direction player is facing. I'm doign 3rd person and just booted up the default template. Not sure what im doing wrong here to get direction... Thanks!!
you are basically tracing from somewhere within one unit of 0,0,0 to 0,0,0
@
@fresh jolt
End point should be CapsuleLocation+(CapsuleForwardVector*Distance)
@fresh jolt capsule component location = Start. capsule component location + (forward vector * measuring distance) = End
your start is your muzzle or whatever
thank you!
your end has to be relative to the muzzle
so you add MuzzleLocation to MuzzleForwardVector multiplied by range
for End
if you don't you end up firing at or near the world origin all the time
got it, it makes more sense. thank you three for the answer. Let me go give it a shot
@high frost Are you saving actual pointers? Because you cannot save the pointers. Your objects data has to be saved in a way that a level or some sort of manager actor/object can set it back up on level load.
I am keeping an array of pointers, yes. I was hoping the saving system would serialize the data under them
I saw that structs are deserializing perfectly fine
When you save a pointer, all it's saving is a small tiny tag that points to a memory location. So on load, you're telling it to point at that memory location, where nothing is, because it hasn't been created yet.
Ok I understand it now. So how should I keep this level states in save game? Is Keeping them in structs the only way?
Without custom serialization that is
Depends on your data setup. If your levels are named, you could just save them to a map and lookup your data from a map. Could save them based on integers, etc.
Well yes I can think up some workarounds, I was just curious if my initial appoach with some inheritance could work
hey ive made a billboard material and i have to rotate the plane its on by 90 degrees but that moves the z axis to where x was how would i make it rotate around a different axis ive tried a vector3 in the normalizedRotationAxis but that doesnt seem to work
is there any way i can add 90 to the y value in objectOrientation
or set the rotation i have the object at now as default
Not exactly following what you're asking for.
i want this object to rotate on z axis but when i put a plane on the level its facing up like a floor and rotating it fixes that but the rotation point is wrong
Is there a way to change the rotation point of a springarm? I want to put it slightly behind the actor but when I do that it rotates around its own point rather than the actor's origin.
@trim matrix Simplest method is to create a second component like a SceneComponent, attach the spring arm to it, and then offset the spring arm, and then only rotate the scene component when you want to rotate the spring arm around Yaw.
I was trying something like that, but couldn't get it working. I'll have another crack at it.
Why could my anim montage is not playing? (its not about replication)
I set animbp already and skeleton is correct
Alright, got it working. Thanks for a push in the right direction @maiden wadi
@dense mica Hard to say. I know when I was trying to do something like that the first time, I had a weird skeleton setting issue somewhere with the montage I was trying to use.
Yeah you're correct it was about skeleton, I'm about to fix now
I made a typo on skeletons, because of thirdparty assets I have 23 other skeletons for default mannequin
But.. even they share same skeleton architecture they dont share animations
And animation retargeting doesnt allow me to migrate them
Do you know any solutions for migrating them?
Not a clue. I'm a bit of a scrub with animations stuff beyond simple aim offsets or state programming in the animblueprint.
Is there a way to have a set of blueprints that open, when the editor does? Preferably grouped into separate windows? Similar to how you can open editor windows that were open during the last session.
Hello, I had a quick question concerning enums. I'm working on taking my trading card game project and making a digital port for it, and currently I have a structure of booleans that hold what elements the card is. Would that be a suitable solution for that or would it be more ideal to use an array of enumerations?
An enum is just a byte with names attached to it. If you're doing something like a struct with 4 booleans, and you're doing a bunch of branches to make sense of them, you're better off using an enum and switches. @pulsar mist
Would I just use an array for that enum? Some cards have multiple elements
That's effective
Ok cool. I just did a test with it and that works way better! Still trying to learn more about UE4, so I appreciate the help
Anytime! glad it's working
yo guys, how do i make variable groups ?
you can set the group in the variable details if you want to group them within blueprint
if you want to group them to one variable you have to make a struct
like this
yea that what is usually "Default" in the variable details
2 below the highlighted one, "Category"
how do i create more categories ? there' are only 3
you just type in the field...
oh snap, thank you very much !!
Hi, i have this event tick (in my picture), i can't figure out why , the Server pawn works perfectly ( when i jump the character will slowly fall down, because the pawn has a default gravity), but in the Client pawn, it keep "fly to the moon", with increasing acceleration, how can i fix it?
@dusk talon what is your overall goal behind adding this upward force on tick? Do you simply want slower gravity?
@proud hull i want to make a grapling hook, it simply using add force with event tick, this is just a demo to separate my problem
@odd ember no, the server pawn works fine, only the client has like x2 the force, so it keep going up
be that as it may, if that's your logic, it does what your logic intends
if you want it to stop accelerating maybe just do it once instead of on tick
or turn off tick at some point
@dusk talon more than likely it is being called on both server (and then replicated to all clients) and on the individual client as well.
Add a has authority check or something similar to prevent the client from also calling add force.
@proud hull i try using switch has authority before the addforce node but not working
@odd ember but the addforce need to use with delta time to make sense, if it trigger once, i can use add impulse instead
if the force smaller than the gravity it wont leave the ground, but if the force big enough ( like x2 in my client pawn) it will leave the ground
@dusk talon so if you set the force to 250 instead of 500, that will test your theory.
@proud hull ya i tested, if the force is 250 the pawn almost going up
if the force is high enough the client pawn will start moving up, while the server doesnt
How about making a custom event to add force that runs on server and then put that event in tick instead of adding force in tick.
I'm not too experienced with multiplayer, so just guessing here.
Or the standard, multicast event holds the add force, run on server event calls the multicast event and the tick calls the run on server event. I think that is how it is usually done.
has anyone made tracer ribbons in cascade?
thx
if i click P, the client pawn has some stuttering behaviour but still moving up, while server pawn doesn't
does anyone have any idea when you turn your environment intensity all the way down in the lightmass settings and rebuild the lighting why the in flying peanutbutter fudge hell is the screen so bright
hey @dusk talon
@dusk talon that's not how you set up a timer
@pulsar surge you're definitely not in the right channel here
maybe #graphics can help
who is "we"
in the last week the 5 different people I have met and worked with debugging
read the topic of the channel
are you a mod here?
does your question pertain to blueprints?
are you an admin?
Then don't police me please. I have helped and been helped by alot of people here. I don't need to be questioned when I say usually we help eachother here lol
ah yes, instead of "oh oops", it's much more constructive to begin a big argument 
@pulsar surge cranz is right. behave
good idea, no need to continue down that route
Graphics questions are kinda hard to get answers to unless it's in the graphics chat I think :)
I've done my best to help out here when needed. I don't like being questioned when I say I usually get help here for anything and help people here for anything.
Not really the point
my apologies if that was bad
in general the best way to get help is to go to the appropriate channel
You post questions into the channels that they are about
Not into the channels that "5 times someone helped in"
@odd ember how should i use timer? i want to simulate the tick.
@dusk talon https://www.youtube.com/watch?v=qc5WpNq7RFg
What are the Set Timer by Function and Event Name Nodes in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
was just about to post that
you can use GetWorldDeltaSeconds
however keep in mind
that on the first frame of the world spawning GetWorldDeltaSeconds is 0.0
Wow, I look away for a few minutes and this channel is booming. Everyone likes to post their questions in whatever channel has people talking, but they don't realize that if the people who watch that channel don't know the answer to their question it gets drowned out by helping people who are in the correct channel, haha.
Any math junkies on here willing to chat? I need to go about calculating the rate of change via a BP function with a given data set. My calculus is very rusty.
uff
i think only 10 people in all of game dev are actually "good" at math. the rest of us just make it work
not down for a chat but if you post your query I can try
@tulip iris yeah, give the info you got and I will take a look too. I enjoy me some maths.
Sure thing. I'm trying to think of the best way to share this.
Easy to show than to tell if you feel me.
@odd ember its still not working
@dusk talon try with a literal float value of 0.0167 instead of GetWorldDeltaSeconds
Let me share a google doc, 1 moment
0.0167? but what if I run at 300FPS 😜
@odd ember still have same result
is Add force ever called
It is called too often is the issue
oh is this because a physics tick isn't the same as a frame tick
oh yeah if its called every tick, this negeates the Timer
it prevents timer from firing
If you're running a timer at effectively the current framerate, wouldn't it be just the same to run on tick 🤔
I mean yeah you want to simulate tick
ya we shouldn't use constant time, but however the result still the same guys
put a do once before the Timer
The timer shouldn't be the issue. The problem persisted when all logic was only on tick.
I think the problem is it is being called on server and on client, doubling the add force.
@proud hull u saw the run on server already, can't be call in client
Does that custom event tied to the timer also need replication settings? Once again not too familiar with multiplayer.
@proud hull no need, just the first one, im sure about that
@tulip iris if you plot all of those points into a graph, what kind of graph does it give you?
@tulip iris looks like a simple plot of coordinates, can easily get you a formula for that.
Part of the challenge is I don't have the vocabulary to know what to look up.
Is there an online plotter that will spit the answer out for me?
If I input the numbers
I mean google docs has some sort of excel spreadsheet thing right?
just plot them in there and pick a plot diagram with x,y
really what you're looking to see is what shape the plot forms
and from there you can deduce whether it's a linear or logarithmic function etc.
Its not linear so it has to logarithmic?
there are more options
exponential
@tulip iris I cheated:
looks like reverse exponential
Equation is at the bottom
ah nice
Yeah
Thank you guys for pointing me in the right direction. It's been soo long since I've done this type of math.
I just plotted them in order, you can reverse the coords if needed.
I'll have a look and see if the equation works for my intended BP function. As long as I get get the right scale at any given distance then I'm good to go.
@tulip iris this is with the coords swapped:
i still need a help guys 😊
@dusk talon you should also post your question in #multiplayer to see if anyone who watches that channel knows anything.
okay i will do that
wait just to be clear, when i use Add force to character component
it does nothing
by default i mean
so unless you changed other settings for the character
ya, because the addforce happen in delta time, you need to use with tick or something like that
its not a burst force like add impulse, which is a instantaneous force
oh okay yeah
i had to put like 500000 units on tick to make it do anything
and it just slowly slides
@static charm and also the mass affect the force too, if the mass too high you need more force to make it move
i just copied your setup and it works
@dusk talon looks like another grappling hook question is being troubleshooted in #multiplayer at this very moment.
with same server settings but with only one player
obviously i changed units to work for mine
@static charm client and server are both showing same results? The original problem was that the results between client and server were different.
yup both show same visuals
@dusk talon could possibly be looking in the wrong spot then. Can you test the same setup in a new project? Just to verify if the problem exists somewhere else besides replication.
Maybe you override a function that is needed. Just brainstorming possible issues.
although how where the results different before
it might be a physics replication issue.
yeah mine just shoots straight up, so its hard to notice any differences
other than it goes up
lol
Set it to half the force and see if client still goes up compared to server.
lmao
client jumps up like 3 times higher
definitely some kind of physics replication issue
might be some easy setting
afaik physics replication is kinda tricky because physics is nondeterministic
do you by chance add the force on the client AND the server?
you should only add it on one of them
if you add it on the client and the server, the server might replicate it to the client again, and it will double up
but thats just some wild guessing, as i dont know anything about unreal replication 😄
@spark steppe that is what we have been troubleshooting, hehe
@static charm Really does look like physics replication then. @dusk talon hope that gives you more of an idea on where it is failing.
can I make a math question?
I have a ball with physics enabled: it has to be shot from point A (ball location) to point B (target location) in 3d space. I'm moving this ball with a "SetPhysicsLinearVelocity" and the velocity is the result of the vector direction multiplied by a float (let's call it power). When human controlled, this float is charged up by holding right click mouse button, but now I'm setting an AI to perform this kind of shoot by its own. What is the best way to calculate this float to make the ball go from point A to point B in a quite accurate way? I can post the blueprint screenshot of the formula i'm using now but sometimes it's behaving in a weird way. thanks
Why won't it go forward?
When I do Print from InputAxis it says I'm holding W even though I'm not
So what's happening, ping me if anyone can help. Thank you!
Hey, any idea why an actor containing a cylinder mesh, rotating with RotatingMovement, doesn't push my character if I stand still? If I move against it then it detects the collision but if I stand still the object simply rotates through me.
@dim robin Are the Z levels relatively level from the start to the target location? Because that math is fairly easy. Majorly differing Z levels becomes difficult.
i would like to differ the z for each target, but if it is too complicated i can deal with that and let them all at the same z
i don't need something 100% accurate but a value proportioned to the distance of the target
Small question about moving instanced meshes (HISM). There are 3 functions:
- Update Instance Transform (index, transform)
- Batch Update Instances Transform (start index, length, transform)
- Batch Update Instances Transforms (start index, array of transforms)
As far as I understood the first one moves a single instance, the second one moves all instances in the same way, but what exactly does the third one? My guess would be that if I specify an start index of 30 and give it 10 transforms it'll update instances 30 to 40 with the given (possibly different) transformations?
@vernal wind doesnt the documentation say what they do? otherwise hit up MathewW and see if he has a video about them
are there any ways to make "Ai move to" work without navigation mesh bounds value object?
I have an Item Parent BP that doesn't have a mesh.
This is because the children that inherit from this class may have either a skeleton, or static mesh
I'm trying to attach the item to the first person arms that are currently set to 'Only Owner See'
When the item spawns, everyone can see the item, so it looks like Only owner see doesn't propagate its to children
How can I get around this?
Sadly the official documentation is ... lacking ... https://docs.unrealengine.com/en-US/BlueprintAPI/Components/InstancedStaticMesh/BatchUpdateInstancesTransforms/index.html and I couldn't find any video or other tutorial/guide about the Batch functions. Even using UpdateInstance is used rarely. In general HISM isn't a main topic. Guess I'll just figure it out with some experiments tomorrow.
Batch Update Instances Transforms
@vernal wind if you're feeling frisky you could go through the source code if you have VS installed
or ask someone in #cpp to do that for you
I have created a landscape in my project and my character is teleporting on it whenever I try to jump.
This is the map with that landscape. You can try it with the standard Thridperson Mannequin and the teleport would still appear. Can anyone explain why this is happening?
Is it possible to have a property that's editable in the editor to call a Blueprint function? Specifically, I have a child actor component that has a text component. I want to spawn it multiple times with different text in each.
Or do I really need to make it inherit from a C++ class and use PostEditChangeProperty?
Or wait would that even work with a ChildActorComponent template?
I'm just a noob here, but isn't that where the construction script comes in handy?
🙂
@proud hull @odd ember This seem right to you?
Ive been following a tutorial on making a maze game and at this point im working on the HUD. The number of keys is supposed to increment when one is picked up but it doesn't change. The hearts are supposed to change to empty ones when 1 damage is taken but all three change to empty ones when 1 damage is taken. I rewatched the vids but I cant find out what im doing wrong. The error im getting is Blueprint Runtime Error: "Accessed None trying to read property"
Show your BP?
@tulip iris I think the exponent is needed before adding 1 instead of after.
@proud hull Hmm
@desert juniper So wait does this mean that Unreal Editor is continually re-constructing objects?
Always returns 0 regardless of the input
I also didn't even know a make literal float node existed, hehe. I usually just manually type it in the addition node, hehe.
Yeah, its not really needed. Just makes me feel better 🙂
@tulip iris exponent is 1.1xxxxx not a huge number, hehe.
Ahh, that would make a difference. I didnt even see that.
Are my order of operations off?
@dusky thicket I believe it is when one of the properties of the actor has been modified, it will run through the construction script
They look correct.
Well besides the exponent before the addition part I mentioned earlier
That looks right
When I set the x input from my table I get the wrong scaling factor as an output.
I'm trying to wrap my head around it
Unless I have it reversed...
Distance to Scale I think was the first equation I sent. I thought I had it backwards, but I think that one was actually correct.
Try putting in some scale values to see if it spits out the correct distance.
You have the correct order of operations, so it should be as simple as changing the numbers now.
Setting a scale value from the table spits out a number but its not the correct distance.
@tulip iris you'll have an easier time creating a math expression node I reckon
Math expression node?
yeah it'll kind of handle everything automatically for you
replace x with your variable name etc.
It'll basically recreate what you just created, haha
Are you doing the initial addition? That is all I see missing from the screenshot, just assumed it was being done.
this only works if the client picks up an item.
If the server picks up an item, everyone can see it
Ideas?
it's way easier to modify in a math expression node than it is to individually handle math nodes
I guess that's why they made the node
29.18935 + (your screenshot)
(relevant bit)
I forgot to add that
hmm. alright. not sure how to proceed then
@desert juniper what is it that you want to do? because if it's something functional it should be on server, but if it's just cosmetic yo ucan put it on client
@tulip iris is the number close and does it scale correctly when you test other values? The formula wasn't exact for all the coordinates (as you can see by the graph).
I want to spawn an item in the FP hands on the players when they pick them up.
I want the items to only be visible to the owners since its on the FP hands
sounds like it's cosmetic
like there is no functionality in the fact that it is visible in the player's hand(s)
yes, for the most part. but other players need to see the item on the player's hands as well (third person)
the functionality for this item, is that it's a flashlight that the players can turn on/off
I want all players to see the flashlight light
Use an IsLocallyControlled.
@tulip iris you might need a =
@proud hull I'll experiment a bit more and see.
the syntax for the math expression node needs to becomplete
@desert juniper You want it to be added to all clients, but you want it handled differently for the player, vs other players?
@odd ember
no. i don't believe so. should act the same or all players
Forgive my ignorance
@desert juniper That's not what you said a minute ago. You said first person hands for the player, and third person for everyone else?
oh, i misunderstood. yes
If IsLocallyControlled = true, add flashlight to first person mesh, else add flashlight to third person mesh.
@tulip iris https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/MathNode/index.html follow this
The math expression node allows you to type in a math expression and builds the appropriate sub-graph to create that expression.
also check your parentheses
It added more in