#blueprint
1 messages ยท Page 67 of 1
I'm not the best when it comes to material stuff but you can set the physics material on the material itself. I would imagine if you're then blending between two different materials it'll use the relevant physics material. (I could be wrong though)
I believe there's a physical material mask node in the material editor.
Can I do different code behaviors depending on the surface physics material by itself? Or do I gotta have a switch case somewhere that addresses all physics materials
does it matter if i cast to parent class on tick?
You can do a line trace to get what the character is standing on which can return its physical material. You could choose to do something based on the physics material if you wanted.
What do you mean by parent class? As in you have a child of an actor that you're casting to the patent?
casting from actor component to pawn class
That cast will always fail?
A pawn is never an actor component
no it doesnt
Realistically yeah it should be. Give it a profile if you wanna be sure
hello, how can I improve this "blueprint" to actually include checking if the player is moving backwards when the "free look" button (so rmb) is pressed? Right now what happens is... well, this, in the video below (basically some kind of "moonwalking" + random camera movement + the character faces you and moves backwards)
the blueprint part of the screen is basically "right side" of it included in this video https://youtu.be/4mij-t_x8G4
Here is the new fixed and updated way of creating a free look camera system in Unreal Engine 5 that allows you to independently move the camera without changing which direction the player is moving in.
Get access to the project files and more on my Patreon: https://www.patreon.com/MattAspland
#UE5 #UnrealEngine5 #UE5Tutorial
__________________...
i guess i can put it on a timer, it doesnt have to be so fast
Guys, how do i find/reference an owner of spawned actor (I'm making a unit spawner, and i want to send an info to the spawner when a unit dies)?
hey does anyone know how on event to reset character positions? I have many characters that given some event (either to the character or externally), resets all character positions to a certain spot
@versed shore wouldn't a save system solve that problem?
Any of these nodes will do that except the first one doesn't handle rotation.
The transform is location, rotation and scale
ooo thats what I need. Thank you!!
Hi i need help im following SmartPoly ue5 Multiplayer Survival Game cours. my problem is with the inventory systhem. I know the item is added to the array but it does not show up in the inventory Ui. Ive cherch for hours now and idk what to do
Is this not sufficient?
so your using the array to display the items ?
@alpine gulch I tried that, but it doesnt work for me :/
You'd need to pass it in. Your unit spawner isn't actually the owners just because it spawns it
Ow, ok. I'll try that out. Thanks for help ๐
Giving another try, this issue is driving me insane and I've tried so many suggestions
Anyone ever experienced a blueprint node having an error every time you start the editor. If you refresh the node and recompile it works fine (until next editor start)
Hello, I want to compute several paths to the point. Is there a way to create nav modifier on the every generated path to make them different?
Solved, duplicated the broken BP, renamed the broken one, fix redirectors, then rename the new one to the original name, fix redirectors, delete broken one and replace references with the new one
When I move the character start in level editor and then start the game it moves where the player character spawns but leaves some of its components behind. How do I fix this? Thank you!
Set up an emote system, but for some reason the mannequin stretches out and certain body parts don't emote properly. Clues?
just so you know you should post in one channel only ๐
check out the #rules
Has nothing to do with your code. It's an issue with the #animation, your mesh or your rigging.
hi guys , what could be wrong with my print string? the whole code is executive creating the widget) but something I notice i cant see print strings anymore (it doesn't matter where I put the code), any ideas ?
Why is the sound still repeating when I spam the key
I was looking for a stop 2d sound
but that doesn't exist...
hello! does anyone know why I lose widget focus every time I right click?
the mouse enter and leave events stop firing if I right click, and I have to left click again to make them work
try Create Sound 2D
Your node Play Sound 2D play a sound and forgets about it, no way to stop it
I am suggesting that you use the Create Sound 2D nodes to give your self control to stop the previous sound (If Valid) and then Play a sound
This should play the sound every other press of the key, is that what you want?
because your are not stoping it or what so ever
fixed it, every time I release right click, I set input mode to UI only, then back to game and UI
horrible jank but functional jank
No, press the key and it should play once until the animation is finished @faint pasture
That's not how your code is set up
how should I have set it up?
set the bool false on montage completed
I can still spam the audio
show your code
What do you want to have happen if you spam the button?
Your code will start/stop/start/stop if you spam, is that what you want?
then delete the last BOOL SET
that doesn't fix it
makes sense
is the song 1 sec or more?
4sec
use create sound, promote return value to variable, then grab that variable and stop it when you want to stop
play 2d work usually for click sound or short sounds that wont change

You also could stop overlapping with concurrency settings, but that will not stop the last sound, just keep them from piling up
I have this now, and it doesn't play the sound at all
hmm
the SET node isnt even connected
you probably want some power to that set and also play and stop wherever you need it
yes, I see now it should be connected to a stop
Got a build error going on, says I'm missing a worldcontext pin or something. But it doesn't say what BP is causing this, so how do I solve this?
The only place i ever see World Context is Function Library's
You're right I could just look through those
OH it's when you get this crap
That __WorldContext input from copy/pasting library functions
Yep, build succeeded, that was the only problem.
nice
Anyone know what I would put out of overlapping actors to check if its an object with physics enabled?
For each loop, Simulates Physics?
Well I want it to be if the physic cubes overlap with the capsule component then it releases object
cuz otherwiise you can just stand on the cube and fly
I mean you can use get overlapping components if you want
ooh
Does updating a member variable in a replicated struct send the entire struct to clients or just the piece updated?
I've got something set up that I want to keep simulating when I pick it up in VR. Is this do-able? Like, to keep a skeletal mesh's bones ragdolling or fabric flopping while it's held?
How do I create a dynamic material when creating an actor in the world(using spawn actor node) and then changing a scalar parm, I just dont know how to access it, I tried casting and stuff.. Ty for help
When you create a dynamic material you will have a ref to it (return value). Use that to set its params
you need to have a ref to that material though
but how to do that when I am just spawing it in the world
Spawn actor-> create dyamic material-> promote as variable -> set material to index -> get the ref to the promoted variable to change the param to change it on runtime
The ref to the material is depending on where you're storing the reference or are using the reference to begin with.
If you want a reference to the material on a mesh that exists on the actor that you're spawning, then you'd use the spawn actor node's return value, get the mesh from the actor, and get the material you want from it, then you can create your dynamic material from it.
ok but I though the blue output of the spawn actor was already that ref
That is a reference to the actor that you just spawned.
It's a ref to the actor not the ref to the dynamic material that doesn't exist yet
ok tyy
tyy
Right click on empty space, create dynamic material
Then set that material to your spawned actor
I cant create a dynamic mat like that
From the create dynamic material node, promote the return value. That's your ref to the material instance. Set the param from there
Why not?
Can you show me how you are doing it
Just right click on empty space and type create dynamic material
Screen shoot that
okk
Is it possible to establish a widget's parent on the HUD event graph? I thought that was the point of HUD but I don't see any options for "add child" when dragging off my create widget node.
Right click on empty space and type create dynamic material?
a class cant be relied to that
I'm not following
what?
theres actually a hack i do for this sometimes when i need, just make a variable for "children widgets" in the parent BP, then cast to the parent BP and add self to the array of children so u can delete them without removing all widgets
I don't understand the words you are throwing
Create dynamic material is a kismet library node. Should be accessible everywhere except objects
There u go
get material of the object, then get material instance of that material and connect the result of that to the parent
You chose the material instance for the parent
Or get the material of the object (if you want to use that material)
basically it depends on the order
yea the problem is that i have a class ref and i need an actor object ref
if make instance of a certain material first, set the return value to a variable so u can call it to change params
okay im behind what u trying do
Already said this multiple times, the return value of your actor is the object ref to your actor
I need the desctructabnle mesh though
what is the problem like what is he trying to do so i can help
He is just trying to set a param on dynamic material for the actor he spawn at runtime
I will fix in on my own, i just gotta change the data table and add the destrucatble mesh in a actor ref and then plug it toghheter
okay
thx for telling me
let me type this out ppl gimme like 20 seconds
You should steer away from your system.
Just try to spawn an actor, create dynamic material for it, then change the param.
Once you know how to do that then you can come back to w.e u doing
beat me to it
i know that part lollll
Doing it on multiplayer isn't helping either
I need the correct actor though
what
ref
u have it
the return pin is the ref
imagine the spawn actor of class is a printer
the left side is ur printer settings
the return value is the printed page
The paper is getting jammed.
my system is huge
ik im just memeing since we already answered lol
ill just make a node layout for u cat RQ
i just didnt know that about dynamic material, once i know that, every makes sens and I will now never make the same mistake..
dont be rude
That's not being rude. It is literally a problem of not understanding references.
not knowing anything about material*
No, it's not understanding references
A spawn actor pin gives you an actor reference. It wouldn't give you a material reference, as not all actors even use them :P
I have been using ue5 for a month bro.. I hate materials ๐
how long have you been using ue5?
Coming up on about 5 years now?
CRAZYY
4 or 5, don't remember
did you publish a game yet?
Nah, too much learning of areas I don't care about, like animation, and lighting, and VFX. At least currently
I just make things for fun, and do my job :P
yea
Cast the return value from the spawn actor
I know dw
ty for the help, its appreciated
does the scroll wheel just not work in UE5 rn?
like I did this :
and put it in my BP
an yet the axis value does not change what so ever
anyone know why this is happening?
Not sure, that input system is outdated
I just restarted my game, see if that works..
did not work...
why is this not working...
and yes my scroll wheel on my mouse does work
doesnt make sense lol
Player Character
try print
did that
to see if it prints something
Does it fire at all?
what happened?
Are those scale values default?
here is the whole code. And 0 is the default value yes :
thats the whole code. Yet it doesnt work...
Maybe try adjusting those
did that to
Hey someone has some optimization ideas for my Blueprint?
I have my Player Blueprint with many Custom events and Variables and adding new events or vars or even compiling the Blueprint takes very long. I saw in the popular assets Advanced Locomotion System that they have like some more Graphs in there event grapth so is there maybe a way to split those events to it is not so laggy any more when adding events or variables
There has to be some way for huge games that use blueprints that they use
data tables?
for Custom Events?
vars
Why there;s no section for Interfaces in my Blueprint ?
sure but what do can i do with all those events that have inputs
even events without inputs are just lagging
because it's a blueprint thing
But there's a section to see the Interface functions below the Overridable functions
In 5.3 I cant seem to find that
you can ask that in here
lagging? are you using casting on a tick or smt that could consume a lot ?
nah nah i dont and i dont mean its lagging in game my blueprint editor is just lagging when i add things like events or variables because i have many events and variables in that blueprint, but with other blueprints that have a few events and vars they are smoothe
why do you have 100 custom event in 1 bp, what type of bp is it?(player, gameinstance...)
Player
it isnt like i dont try to make not that much custom events its just went to a huge game with many stuff so all off them are needed and we dont want to talk about functions i have more functions then custom events. There has to be some way to maybe split them but keep them in the same blueprint
Thatโs a lot of Events. What are some examples? Is it something like PickUpWeapon1 and PickupWeapon2? Sounds like a design issue.
And when you say โlagโ - just from compiling or in runtime?
Nop not making that mistakes, really everything is some separate stuff like i have equip weapon, death event, interact event. All some diffrent things. And not the compiling its just taking looong to add a custom event or a var i can show you a video if you want
The video is not showing for me. Itโs 0 seconds. But you think itโs the overall size of your Blueprint; not the number of Events, right?
I mean i have a huge size because off that many events and vars and functions and the post part off lags come from events i tested with other blueprints with just adding a lot off events and some with inputs and then the blueprint editor for that blueprints is just going slow
maybe this one works https://www.youtube.com/watch?v=DgOEhsRBPkM
Anyone know how to make a interaction system with line trace
Hey, i hope this helps some of you.
Leave ideas in the comments below.
Have fun!
My Discord : https://discord.gg/KfwJ7Cg3fZ
First Person Advanced Pack:
Itch.io : https://studiouasset.itch.io/fpap-ar-v2
Epic Marketplace: https://www.unrealengine.com/marketplace/en-US/product/first-person-advanced-pack-assault-rifle
Chapters:
Intro 0:00
C...
I tried using the tut for my interactio system but it doesn't work
it detects the object but it doesn't print out anything
and it doesn't work
How do you know it detects the object ? How did you debug?
guys, what would be the best way to do a passive skill in ue5? on tick? so it always active/ triggered
for replicated
Give example of the passive
+30 max hp passive, or "do thing when thing happens" passive?
For a LineTrace they should be the same
For a ShapeTrace, they are different. Take a Sphere for example.
O|
If the above is a Sphere in 2D O that hits a wall | then the location where they touch is the ImpactPoint, and the Center of the Sphere is the Location iirc
for many actually, "always" and then triggers such as (fire the passive logic (give +30armor for 10 seconds) when health is below 20%)
or, after player kills 10 enemies damage increases, or, when player touches 3 or more enemies at once x thing fires
basically a check that is constant, and performant for multiplayer, so it constantly looks for a trigger
i got a actor to spawn (spawn actor of class) then inside of it a code that checks player health, and if its below 50 it fires the add effect (and other logic)
the spawn actor of class is in the character bp (idk where to place it, maybe on the widget of skill tree for when i add a passive to the skills build? and idk if it should be on event tick ) , and then a bp class for the passive where the add effect logic is there
Where does Normal Impulse come from again? Doesn't a HitResult just return a Normal and an ImpactNormal, similar to Location and ImpactLocation?
Event Hit returns normal impulse in addition to hit result and other things
It all depends on your design, can certainly use tick or timer, or dispatchers/delegates.
Depends on how many you plan to have around and how fast they need to respond
Hey, I created a TCP connection to an external server, but I am running into the issue where I have to run the loop at a certain interval (currently timer). I want to only move on to receive data once send has been processed and for byte array to string be called once received data to be completed. Currently, the delay goes on a different node when leads back to the beginning of this loop. I tried using gate or just custom events without the delay, but I keep getting infinite loop errors:
I have a question. I am wanting to move a in game actor with the player when they move from one level to another. From my research this would be done in the game instance. I am struggling to find much info on how to do it. Would I just get a reference to the object and store it in the instance then when the player is spawned into the new level just spawn in the object from what I have stored? Would any one have any examples on how to do this? Thanks in advance!
This is a tutorial i made a while back. I pretty much use the same system for most of my projects (with some project specific tweaks).
https://www.youtube.com/playlist?list=PLcwVLBaUNnHra8G8ZBUkzPNu7qDM9OmZe
You would need to store the relevant data needed to recreate the actor such as the actor class and any vars inside that might change. Before switching the level, store this data. When the level has then loaded, use the class to spawn the actor again and set the additional vars on the actor as needed. (if any)
So if its a room for example with the player spawn. I would store everything within the room including the room its self and then rebuild it in the new level and spawn the player in? I would do this all in the instance right?
I dont think you'll be able to do what your wanting with BP alone. Waiting for data to be processed would require a latent node and (afaik) you can't create new ones using just BP. Also you're connecting outputs across different execution paths which can give undersired results at times.
Not far off, handling multiple actors does increase complexity though. The game instance is fine but personally, I would just use a save system to handle it as the same data would need to be saved for disc if you intend your players to be able to exit the game without loosing progress.
Would you have a small example of doing this or know of where I might look for docs on doing this? Would this work for multiplayer?
I haven't looked at saving on multiplayer games but from what I do know, it's just a case of making sure only the server does the saving and loading, and replicates the various commands to the clients. Save systems tend to get large pretty quickly unless all your saving a handful of vars. The best thing to do would be to look at Save Game Objects and how to use them.
Thank you. What if I saved all the actors into a single actor? Then stored it. Then brought it over? Would that lower complexity?
You can't save actors themselves. You have to save the data needed to recreate the actor.
Oh okay.
Thank you! This gives me a good pointer on where to look and where to start
what if I wanted ants in my game that allways traveled in pairs?
would it be a good idea to make a character BP that has like 2 skeletal meshes in them for both ants.
That way each like antBP would technically have 2 ants.
how would you guys aproach a grouping system like this?
It could be, if you want them to be together all the time
And watchout if you have a lot of ants
it can hurt the performance
if one ant went on a slope, would the other use its own collision and not rise off the round as well?
hopefuly it would be possible for a character BP to have several collision capsules or something like that
grouping characters like that hurts the performance?
You will have to make one collision for them, so if one ant went on a slope it won't fall
My Blackboard key selector is not showing any of My Blackboard keys. Can Somebody help me?
If you want one to fall and the other one to stay at its place, then each one will have its own collider and you need to do some coding
and later they will get back together
its not about grouping, its about how many skeletal meshes is there
i am basing this question off of this picture from a game called Halo Wars (1) (2009)
1 marine unit in this game is actually 4 guys that roam together.
so I have no idea how they roam together.
its not about moving to a location in a group or always staying close together, you could just do some light BP stuff for that.
what im talking about is that green selector circle underneath them. I cant figure out how in the world they get the circle under the unit to perfectly encapsulate the marine unit.
enter the behaviour tree and from top right select blackboard
create blackboard asset
All I can think of is for each marine in a group, average their vectors and project that point onto the nav mesh.
spawn a decal there big enough that it always encapsulates the group
does this circle scale?
Thank you I Will try.
i dont think it ever has a chance to
(cant ever tell)
the units so perfectly stay together when doing literally anything its as if they are just sub characters in a character BP.
(this was where my idea came from of multiple characters in one character BP)
The behaviour Tree is not Selecting
because you didn't create one
there is some logic behind it to keep them close
for example the AI has to be in groups, each group in 4 Units
the AI will automatically look for a group that is missing one unit, and then follow them and stay close
If you have 5 units, and tell each unit to keep distance for example 2 meters, then you know that the circle will be in the center, with width of 10
im going on a walk with my mom, so will have to go, last night i wrote out some pseudo code for an idea of how to do this.
wondering what you think of the approach.
will send later on.
thanks for the info. take care.
@smoky sail https://www.youtube.com/watch?v=R8wrICSSOe4
A quick tip on how to expose Blackboard Key Selectors to Behavior Tree Task Details Panel
*My brain "there is a bluetooth Editor?!"
huh?
thanks for the info. take care.
Hello guys. I'm trying to make a hex tiling panel. I've got the first row (instancing a single hex mesh with a loop) but I don't know how to get the whole row of instanced static meshes to run another loop and create the extra rows.
This is the first row
โค๏ธ gotta adjust the height but it worked. Thanks a lot!
Hello everybody!
Has anyone managed to make bp_fluidsim_01 work with rivers and lakes?
I'm trying to use BPs as prefabs/templates where a BP consists of a static mesh + light. I did this by first positioning the mesh and light in the scene and selecting convert selection to BP class . This gives a BP with both the mesh + light as child actor components.
Is this the right way of going about this? Or should the child actors be static mesh & light components inside the BP?
can you send a screenshot of how the bp looks like?
every time i make a function back to an event unreal freezes indefinitely. lovely
This website is a gold mine when it comes to hexagon based math.
@formal dome
Might be too difficult to read tbh.
but might as well send it just in case its worth something
@formal dome man this might be too confusing lol
if you care to know more, here is the in depth example.
if you dont thats totally fine.
[when hover over unit with mouse cursor]
-
reference the sphere collision component that exists on each unit
-
get all actors in collision
-
if they have the same group ID as the original unit, put all of them into an array.
(this array then must be an array of all units that make up the same squad)
-
Get average of each vector of each unit in the array. (average location of squad)
-
project that point onto nav mesh
-
circle selector decal is placed on that point.
-
(additional step)
size of decal is proportional to the distance between original unit vector and average squad vector
(circle scales with group)
Hi everyone!
Is there a way to package game in UE5 to HTML?
Or some way to convert it?
also not a bp question
Like, I'm programming in bp, so I'm asking here
Nah, I wanted to export my minigame from Win game to HTML and host it on site
yes but it's a packaging question, not a programming in bp question
Alright, nvm
you might as well use unity
seen some web stuff done using it. Unreal have abbandoned html route for long time
Like I should use any other program, but still, I'm new in programming and using unreal bp's is my only way to do smth right now
then you want to avoid html all together imo but you do you
doing html in unreal is a lost cause
Thanks for help anyways!
no support whatsoever
Is there a chance they will support html in future?
btw i made my first pawn controller,from scratch input actions,action mappings,map all from scratch๐
quite simple but i start my journey from here
how are you going to solve the issue of jumping and gravity?
gravity is here,you may say its not a good way but im learning.Its already solved with gate
is that a timeline in the jump code?
@random pulsar your code here is confusing things like acceleration and velocity and input movement. Inputs should be for you moving your character around via your controller. Not physics like gravity. Jump can be something like Launch which is the application of a force at the start like a real jump, and then gravity slows you down and reverses
Thereโs some merit to maybe doing continued upward movement if you hold the button. But definitely not downward movement on tick as an input. This tick is very bad. Youโre not even considering the time between ticks (delta time) so your guyโs fall speed is going to be a function of the frame rate (he will literally fall faster on faster machines)!
Good use of reroute node. Been a while since I see something that is not spaghetti. A comment box will be a nice final touch
hah ,i cant be a good programmer from start ,its a long journey
Of course
yeah ,forgot about comments
Not trying to demean
Try to get in the habit of collapsing chunks of code for readability early on too. Like if I have a branch node that has a few things feeding it, I will collapse them and relabel it โSwitch on Is Fallingโ with an out pin for Falling and an outline for Not Falling. It ends up being far more readable. Almost any sort of implementation logic that isnโt a verb the actor does should probably be in a function or in collapsed nodes.
I have an Actor A and Actor B, spawned during runtime.
How do I, during runtime, attach Actor B as a CHILD actor component of Actor A? (Attach Actor to Actor does not seem to make it a child actor component)
In chaos vehicles, can we put a skeletal mesh into the skeletal mesh vehiclemesh?
Asking because of I'm curious, I might have a few visual upgrades planned and logically different cars have different spoiler positions.
On first thought I would approach it with putting a Skeletal mesh of the car as a Child into my main Vehiclemesh component which contains bones at the spots where for example a spoiler would be placed on that car.
Does that somehow work or is there a better approach to that?
Child actor components is just a way to have an actor automatically spawn another actor at runtime that is automatically attached. Why are you needing it to be a child actor component?
Because of situation
You'll need to explain the situation. Without context, its difficult to offer a solution.
hi
I don't want a workaround, I already have various workarounds around my situation
Just that I wanted to do this in a simpler manner, thus asking if it is possible to do such an attachment during runtime.
Its odd that you don't want to explain the reason why your wanting to be able to do something. Child Actor Component were never designed for runtime so anything that's provided would be a work around.
As i mentioned, they were just a way to have an actor spawn another actor at runtime automatically that is linked/attached.
why wopuld you need to attach them?
I don't want to explain because it is irrelevant and lengthy; thanks for confirming it can't be done (as least not that anyone here knows of)
Refer my reply to pattym
It wasn't relevant, i wouldn't have asked. ๐ You would most likely need to create a child actor component on Actor A and set it to the actor type of B. I'm pretty sure it'll automatically spawn the actor so you might have to then destroy Actor B. Of course, without know what your actually trying to do, it difficult to say what the best way it to achieve it.
That's my workaround currently
But thanks anyway ๐
Id still love to know why you need it to be a Child Actor Component as I can see any benefits for it.
hacker
Quick Question.
If I create a timer that doesn't loop, do I still have to invalidate it?
Will it still run in the background?
Thanks.
Afaik, it'll invalidate itself when it's finished.
Cos
I have an ArchViz project
Which can load up ready-made BIMs and user-made BIMs (created via another part of the software)
This loaded house is held as an Actor variable "HomeInPlay"
In the ready-made BIMs there will be a childactor component with a tag "SpawnPos"
There is a Build mode and a Play mode on the software that allows user to go into a FPS view in within the house
So in this part of the Play mode I needed to read this childactor component tag from the "HomeInPlay"
But for user-made BIMs this childactor component does not exist
I have another BP_PlayerStartPos which the user can manually place in the BIM and the position is saved
So I was thinking of simply spawning the BP and attach it as a childactor component to HomeInPlay so that it can be read in the Play mode.
In any case I have already solved the issue so thanks ๐
any way to make it so that the characters capsule, only collides with the landscape ground?
It might be worth looking at custom components. If all your needing is a tag to be on what it's attached to, you can have the one being attached add a special component to its new parent that can then contain information you might need to get.
Something such as PlayerStartPos could easily just be a custom component.
From your description, it seems like you might be using actors where you would probably be better of using a custom component.
Just something for you to think about. Glad you solved your issue though.
Yep I simply added a childactor component without any class, added a tag to it and set the transform; I realised that was all I needed at the end.
Question. Here is what I am doing. I have a room bp that I am spawning dynamacly into the world. I want to be able to spawn the player into that room no matter where it spawns in the world. Any thoughts on how I might do this. I thought of getting the location of the bp once its spawned, my issue here is how would I know where inside the room I would be spawning the player? Any thoughts or ideas would be helpful. Thank you!
You can Get Bound on the room itself and use the center origin as a spawn point or transform location.
Alternatively, if your room BP is kinda fixed, you can have a variable inside that holds a relative transform, and use that for your player.
ooooo! Yes!!!
Add a player start to the room BP using the child actor component.
This would also work. The one problem here Is where the player is in the room will change depending on where they are in the room before it spawns in. So they will be in the room in another level and they will be being spawned into relation to their location in the room when the level loads up.
I hope this makes sense. Think lethal company on the ship when it comes in and out of the level.
I am thinking the get Bound will work for this.
Also in a multiplayer setting I am not sure how player start will effect it or make it that the player gets moved into another players room.
You can just update it's location within the room BP based on various conditions. If you go down the route of using the bounds, just make sure you don't make any donuts shaped rooms.
Also player starts have a player start tag that can be used to check which ones to used.
Good to know. So I would spawn the player start in the bp?
Add a child actor component and select player start for the class type. It'll then move with the room bp.
Do you know if you can get the players location in relation to the get bound?
i remade the logic from level blueprint,i made an actor bp with this logic,i pace it in level and noticed that if i pace 3 actors in scene every actor is independent.I want them to increment the same variable that is used
As in it's relative location based on the center of the room?
Yeah.
Right. But what if I am wanting to spawn the player into the room depending on where they were in the room prior?
Get the players world location and minus the bounds world location.
You need to store the var in a single place and have all instances update the same one. For example, 'Keys' could be put on the player character so when the buttons are triggered, they get the player character and increment the key var on the player character.
This will give me the players location in relation to the center of the room? Even if the room changes location when I want to spawn the player into it?
You would probally need to cache the rooms current location before it moves but yea.
How would I get the rooms location?
The bounds of the room.
so i made this and i need to cast to that blueprint and get the box collision?
@bold flax create a custom event and call it add key. Then in your button BP, get player character and cast to the third person then call the add key event.
So I would get the rooms location with bound and then the players location in relationship to that bound and stored it. Then when the room moves I could get the rooms new location and bring over the stored player location and add it to the new rooms location? @dark drum
Does my thought process make sense?
nice
thanks
btw,collisions that only change the character speed ,can be in level blueprint or i also better make them an actor blueprint?
Most things should be an actor. It makes it reusable. ๐ saves having to repeat yourself when you want to add it somewhere else.
yeah but if i use it only one time?
Still an actor, just in case you change your mind. ๐ In the 10+ years I've used UE, I think i've only ever used the level BP once and that was for some level streaming stuff.
Just say โnoโ to the level blueprint.
i have a few months of experience in ue and for every thing i learn i feel my wings are spreading and i will soon fly
problem with level blueprint is you can't communicate two ways in bpland. So for gameplay related stuff, you will only get pain with no pros using level bp
you guys know how when you attach a component to an actor (lets say his left ear)
that when their head turns around, the component whips around aswell?
like how the components are locked to the actors location so that when the original actor turns, the components stay where they are and turn with the actor?
how do you dislodge that so that when a character turns their head, everything attached to the head doesn't actually rotate or change location, but always stays in position relative to the actor?
component location should be locked to actor location, but not when rotating, do you guys know how to do this/what I mean?
Is there a way to configure the enhanced input system to accept multi-key press as a single action.
ie. Shift = action 1, shift + mousewheel up = action 2
Or do I need to get creative with bools on my event graph?
you could probably add a new action for mousewheel up that only triggers if the modifier key "shift" is pressed
I know a big thing of enhanced input was modifiers
best asking in #enhanced-input-system
Anyone have any ideas what I'm doing wrong when trying to use bulk edit via property matrix for adding sockets to my sprites?
Around 1:30 on this video shows this being done. I've used bulk edit for other fields just fine, but I encounter a similar issue as the person in the video where "multiple values" shows up when I edit them all.
But in my case, only the first sprite gets updated. I've ensured that I have them all selected with ctrl + A (and they all turn blue). But no matter what I try, only the first selected sprite takes the updated values.
Get my 12 hour course on how to make 2D games with Unreal Engine:
https://tinyurl.com/Ultimate2D
Support the channel on Patreon:
https://www.patreon.com/CobraCode
Pixel Hats pack by Gisha:
https://gisha.itch.io/pixel-hats-pack
Official Socket Documentation:
https://docs.unrealengine.com/5.3/en-US/paper-2d-sprite-sockets-in-unreal-engine/
Lea...
Hey everyone!
Does anyone know, why my code doesn't work here?
the actor class selected exists in the world?
needs to be an actor in the level
placed or spawned
Oh, my bad
I'm destroying the actor so the variable does not exist anymore
Fixed it already
I wouldn't name a variable ??? , if you are collaborating with someone they won't be able to read that
Yep, you're right!
Currently I'm testing stuff, so the variables are only placeholders
Aside from the fact that this variable is literally text "???" XD
I'm having a hard time figuring out how I can place an actor on a Normal, but then changing its LOCAL rotation to aim to my mouse cursor in the world
Hello!
How did you do that I've been trying for some time to make bp_fluidsim_01 work but I can't, specifically I'm using UE5.2 and I have several rivers and lakes with different z
I can properly orient it on spawn, no issues there (with make rot from Z and the normal), but then how can I change only its local yaw to aim to my mouse, I'm not sure.
Basically, I want the "Add Actor Local Rotation" equivalent for a Set node
Get the current location, break the pin, feed the current X and Y and only change the Z
I'm not sure I follow you, breaking the get location and feeding X and Y to the rotation would not result in what I want ?
You asked how to change only the Z
Z rotation indeed
Sorry, I said location, I meant rotation
in the level blueprint > event tick, i checked the distance from the fluid sim to the player and if its greater than a certain amount i teleported it to the player
But that's the thing, it doesn't work because "Set Actor Rotation" is world space. This would result in my placed prop rotating along the World Z axis, not its local Z
Great, can you send me a print screen? I'm still a beginner and I don't really know how to do this. Thank you very much for the answer
What you described works only for objects placed on a flat ground, but here I want it to stay oriented to the Normal
maybe later not on it rn
Ok, thank you very much
Well if you have it attached to something you could use set actor relative rotation
Hello all, I have a question. I upgraded a quite old project to continue working on it, and everything works fine except one thing, and I would love to know how you manage to get answers to this kind of issues
This function has been deprecated
how can I find what is the new function that replaces the old one?
Thanks a lot in advance
I use that function to set different damage depending on what body part you hit the enemy with your linetrace
documentation still says it should work, but the engine says it is deprecated
guys any tips how I can change this collison box of my skeletal mesh to his actuall shape? i cant use this
but UE documentation...well
just change it
physics asset editor if it's skelmesh
static mesh editor if it's static mesh
what would be the best way to get a material overlay to dynamically show up on pickup items for example? i have a highlight material that i can use but i can't seem to get it to only appear when the player is overlapping it
yoo your also working on a pickup system too?
right now if I put more then 1 item, it just feaks out and doesn't work
Can you get it to appear at all? Is the problem that you can't detect the overlap, or that you can't get the material to show?
Why is your input handling in the item?
uh
I dont know i followed a tut
lol
There are no good tutorials
At least, not until you know enough to be able to tell if they're any good or not.
i can't get the mterial to show, i tried first to add it as an overlay material but that didn't work. then i used a post process volume and added a material to that and then checked "render custom depth pass" on the actor i wanted that material to effect, but the issue there is that it always appears and i dont know how i can get that to only be set when the player is overlapping it
how do i fix it lol
I'd start by making a function or event in your Character or whatever your pawn is, call it PickUpItem, passing in the item as an actor or YourItemClass reference.
Put the smart stuff on the character, the item can just be a dumb thing that does what it's told
Maybe dynamically set render custom depth?
Off by default, on when highlighted
where i can find physics asset editor sorry ๐
How do I pass it in the item
do i
like change the parent class?
legit just tried this haha think it might be easiest move just wasn't sure how performant that would be to scal e
How many items would ever be highlighted at once?
It's probably the best scaling way I can think of to do it
So I have this data that is being created with another program on my pc. It is hosted on itโs on ip and has a port number. How would I go about getting this info to be pulled into a blueprint?
Does anyone have any ideas on how to implement this? I am researching latent nodes as recommended by pattym
Probably involving C++ or at least a plugin made in C++
What is the data and in what format
Currently a python code that is just generating different rpm for a motor.
some help? ๐
Yeah you'll need to either tie into something built into the engine (idk if there's such a thing) or use some plugin. It'll all depend on your desired data format etc.
just add a reference of whatever type you want to use to the event
as an input parameter
im doing a similar thing right now but going both ways. You can bring data in by creating a c++ class using FSockets/sockethelper functions. Instatiate those in your blueprint
i just started using unreal like 4 days ago
so I dont know most of the term
Make it the base type of your items if that's how you're doing things
Not just Actor, but YourItemActor
Great, so is C+ the only way to go?
Yes. There is a networking plugin that costs 28 bucks but you can implement the functions in cpp
When ever I reload the gun magzine get empty?
it works and honestly feels quite smooth, just have an overlap event changing the boolean and it honestly just needs to be on client only so it's not really too big of a deal but it's doing a small check for a "player" tag before on the overlap
IDK what live link is but if you can make your python code speak it it'd probably work
im using ninja character which allows me to go around loops like sonic. what im trying to do is to check if my camera is facing forward of my character or in range of it, but when i go around said loops the dot product goes backwards into the negatives.
I go give that a try, saw it pop up on one of my searches.
I'd use some base class of all your items but yeah that'll work for now if Pistol is the only item you have.
ah i see
Get it to work with Pistol then turn Pistol into your base class and subclass it for the other items
Can someone tell me why this blueprint wont spawn the unit without the delay node there?
ok thank you
Is the Unit to Spawn another thing that spawns a unit?
@faint pasture Mmm no, i don't think so
I just have another question, how do I like do the code now in my player BP
Put the stuff you want to have happen to an item in that event chain
Presumably turn off physics, attach it etc
maybe set a variable called MyHeldItem
im sorry but how do i even do that ๐
Also for some reason, when i play in standalone window, it spawns my main character, but not those units, but when i just simulate the game, my main character won't spawn, but those units will (that's without the delay node)
You've already done it
What do you want to have happen when you say "Hey, pick up this item!"
put that stuff on this event
Then later make another event DropHeldItem
Then just have your inputs call these events
oh ok
how do i like call the weapon stuff if my code is in the thirdperson BP
Button Press -> figure out which item to pick up (trace or whatever) -> call PickUpItem
Button Press -> call DropHeldItem
PickUpItem -> turn off physics -> attach -> play sound -> set MyHeldItem
DropHeldItem -> if MyHeldItem is valid -> detach -> turn on physics -> play sound -> set MyHeldItem to nothing
UseHeldItem -> if MyHeldItem is valid -> call DoYourThing on MyHeldItem
ok tysm
how can i make a bouncing rev limiter
How does your engine work?
im using the chaos vehicle
It'll all depend on what you have available but if you're doing it from actual first principles then just cut the ignition at rpm limit and turn it back on at like 200 lower
How would I snap an actor rotation to the closest axis?
there's no ignition system. it's so barebones
Then add it or fake it
What CAN you change about the engine when running? Torque Multiplier?
Drop torque multiplier to 0 at rpm limit and back to 1 at rpm limit - 200
mmh, doesnt work either after I attach it, damn it
runtime or in editor?
runtime
yaw only or in all axes?
Is there a reason that I can't see the timeline node in a blueprint?
hello, why is it that disabling and reenabeling physics like in this image doesen't behave the same way during the animation as just not having physics enabled in the first place?
You in the event graph or a function?
fonction
all
Functions can't have latent stuff
then what do I do?<
I have a static mesh cube that I rotate, and I want it to snap to the closest axis so it always faces the camera at a right angle (the cube is child of camera)
even in the event graph, i cant use a timeline
What class?
actor component
Those can't have timelines as a timeline IS a component under the hood I think.
ok ty
Maybe I use % operator to convert the rotator to 0-90 range then snap it to 0
You could round every axis yes but that might get really goofy as euler angles kinda suck if you're going all topsy turvy with them
If you're the one saying what the rotation is you can make sure to only ever add right angles to the offset
then each frame, CubeRotation = CombineRotations(CameraRotation, SnappedOffset)
SnappedOffset is what you modify with your inputs
I'll try that thank you
Figured another way of doing it, it works ! My goal was to set a rotation with mouse movement, but I can just use the Add Local Rotation with a compare float ! That way it adds with mouse movement only instead of on tick
aint working like i was hoping. it's more like interpolating than bouncing. too slow
even if i set the rpm difference to 0.001
Drag is probably really low
does the RPM drop slowly then raise quickly again once back online?
about the same. yea my rev up and down rates might be too low but i can't really increase them or it will turn into an arcade
What's your torque curve look like?
It should be flatter than that but that's not aweful
Is there a setting for off-throttle torque? What slows the system down when you cut power?
its frustratingly barebones like i said. no ignition system or off-throttle stuff. just "set max engine torque" and engine rev down rate which can't be edited in runtime
hey again
I have a question
How do I refrence my gun to the target self thingy
I rewrote the code in my player controller, but I need to turn on and off the physics
but idk how to get the target to my gun
slight help ๐
Greetings my friends and thank you in advance for everyone who tries to help me here ๐
I want a FLYING ki to fly towards me as soon as it sees me
Thanks to your help, I have already made something here that works great, but for an AI that is on the ground
How can I change the whole thing so that the flying AI just comes flying towards me in my platformer jump and run game
I thought interface nodes are used to call events on everything that implements the interface?
completely not working at all
I have an interface on my parrent that is called
the children are receiving the message, but only one of the children receives the message for some reason
I need a node that can call an event on ALL children, not just the one that makes the initial call, how do you do that?
it should work
only to the thing that is relied to the target input
I think what you're looking for is an event dispatcher. You can setup something like the GameInstance to dispatch an event called "DoSomething". Click the + beside Event Dispatches, give it a name then drag it into the graph as a Call. Then on all of the actors that need to react whenever DoSomething is called, you just make a reference to the GameInstance and then drag from the ref Bind Event To DoSomething.
I have an "aiBase BP"
there are 4 children of this BP in the level.
when one of them finishes their AImoveTo, the other 3 need to stop moving.
I created a BPinterface and added it to the parent (so the child BP has it)
and called the BPI event when the moveTo finishes.
each child has the receiving BPI event but only one of them receives the event, and its the one that called the event in the first place
any ideas?
i just need an event that all children will respond to when any one of them fires off the event call.
hey so im making a physics puzzle game and im trying to figure out how I would make it where If you stand on an object then you cant pick up that object. like half life 2
I cant find any tutorials and my attempts havent worked
anyone have an idea?
Use an event dispatcher. An interface is useful when you don't exactly know what type of object you're going to be dealing with and want to avoid a cast. Meanwhile an event dispatcher allows for one-to-many logic.
You could always do something math based. And do the dot product of the vector from the object to you normalized, dot product that with the up vector (0,0,1), and if it's withing your decided range of 0, like +-0.15 or whatever, then you're "on top enough" to not pick it up
Would it be possible to do a line trace by channel?
like
if the line trace hits a physics component
then it releases
and if i gotta do the think u said
can you explain it to me in simpler terms'
when it reaches the end, it calls the event
when the event is called, its fired in the children
but this does nothing, did i mess up the event somewhere?
Yes, you dont make an event called Stop Movement Task, you Bind an Event To Stop Movement Task.
ok this slightly worked, but only on one of them
the other 3 arent getting this event, even though they all have it
Are they all setup to use bind?
its a child BP with a bind event.
when the binded event fires, how are they not all firing the event, why is it still only one child BP
Do they all use the same BP?
each child is a instance of the AIbase BP
AIbase has the moveTo code, once it finishes it calle the event
the children have the bind, and it receives the called event but only on one of the children'
the only child that receives the event is the one that calls the event
The logic should be like the main one Calls the event which dispatches it to all the others who are Binding to it.
isnt that what I am doing though?
I can't really tell without seeing more screenshots
no clue which BP that code is in
this help?
they move to the location
they just dont call the event in all of them when one of them reaches the finished location
So the parent is moving from a to b and all of the children are also moving. As soon as one of them reaches b they all should stop moving?
yes
there is no parent in the level though
the parent is just there for all children to inherit from
the children inherit the moveTo code (ie the picture, shows the move to code in the parent)
how many times does it print out "done" ?
1
Is it just 1 parent bp, 1 child bp, and X number of child actors in the level? or do you have multiple unique child blueprints each using the same parent?
only 1 parent and only 1 child BP and theres 4 of the children in the level
you need object references to what ever those nodes are trying to do
@broken wadi here is a refernce pic so that you can see, just a simple 4 child group in the level
o ok
how do i reference it
what is that node trying to do?
im trying to disable physics when
my gun is in my hand
and reenable it
when I dont have it
in my hand
Yea i dunno that is supposed to work. I think you might of made a mistake with the wires or reference somewhere. Maybe just read up on Event Dispatchers a bit more or watch a video or something. I use them all the time and never had a problem.
then you need a reference to your gun in order to do that.
See those blue pins? thats the EXACT object that your setting the physics for.
the engine is asking you
"ok, fine, well set the physics.... but on what?"
ye I know, the target should be the gun
but
how do i reference it
i suppose your character has the guns on him in your character BP?
is the gun a component in your character BP (look in the components section of your BP screen)
or is it a literal thing inside the skeletal mesh?
uh
how do i change that
oh
is not
is a equipe system
with linetrace
when you look at the item it will get attached to the socker icreated
ye
is in my player BP
i wnat the gun to fall when i drop it and to NOT have physics
that blue pin you drag off of is your gun (assuming you actually hit the gun with the trace which is a potential bug)
and stay i nthe hand
uh
use that pin as your reference because in a literal sense, that is a reference to the exact object your looking at
actually
you already did that
just go into your list of custom made variables and use that blue variable (interactible) as your reference for setting the physics
those nodes might be what your looking for, but are not meant for that variable type
drag of of your variable blue pin and try to retype those nodes
what is the gun class called
one more thing, you need to cast to your gun
uh
i haven't evne make the gun functional
the gun is just called BP_pistol
with no code
so again, the unreal engine is going to say
"ok, set collision type.... sounds good....... but on what...... oh an actor?...... ok.... but what actor?"
The error message is telling you that youโre trying to feed it an Actor when it wants a primative mesh
Get the mesh from the actor then plug it in
its in a skeletal mesh
its not a component
there are like 500000 different actor BP's in Unreal Engine, so you need to specify which actor your trying to set physics for
your not trying to set the physics of a spotlight, or a skylight, you need a gun.
so you need to take that blue variable and cast it to a gun
what skeletal mesh
Sorry may have missed some of it, but shouldnโt the actor have a skeletal mesh he can get a reference to, then change the collision settings on that skeletal mesh?
yeah I havent started on the gun stuff yet
im using a static mesh
its essential
ye
you need a reference to the gun on the ground right?
you have it.
you just need to slightly adjust it
Interactable > cast to gun > get static mesh > change collision
A gun shouldnโt be a skeletal mesh
this is what you need to do.
#blueprint message
do you know how to cast?
Learn
gun is "on/inside" the SKM
Watch the blueprint comms video pinned here
Also, you should prly just do what the FPS template does
you have it
ik but
which object is it that you have?
hover over the blue pin
do you see how its called an actor?
ye
(on the interactable pin)
ye
Just get the static mesh from it or whatever you need to set collision on.
hi how hidde specific instance in InstancedStaticMesh?
that is techniacally your gun, but its too vauge
its like saying this
"this blue pin is some sort of object"
you need to specify further that it is a gun
im trying to change the collison and stuff
you do that with casting
Drag from interactable and get your mesh
Yes that is painfully obvious
You need to type check that variable by casting
Because it could literally be any actor
i'll ask again, im trying to get you to see what i mean
trust me
which reference do you have?
And collision is set on components
wdym
ik what like im missing
So drag from interactable or hit actor, cast to bp gun , get the mesh, set collision
ok! good
but unreal engine doesnt know that because the variable is too vauge
it only knows its a random actor
you need to specify further that its a "Specific" actor,
one that is called a gun.
so you need to specify its a gun, because right now its just a random object that could be anything
so you drag off of the blue pin do "Cast to (gun_bp or whatever)"
oh
@near surge
#blueprint message
this is exactly what you have to do
(i need to go, best of luck)
look up a vid on casting!
no prob
when you have a thing in your game, you cant do anhything to it unless you have an EXACT reference to it.
casting is usually used to get a specific reference to what you need
its the most important Blueprint knowledge to know for a beginner
ok thank you
@lofty rapids yes i am stroring the item info in a array wich is link with my inventory slorts
and when you add to the array it's not in the display ?
probably when do you render from array ?
yes it stored in the array but doesnt show up in the inventory ui
when do you render it based on the array ? or its "linked" ?
(put your bluepin into that grey pin in the casting node)
do you only have one pistol ? and theres no power also your not casting from anything
(that grey pin is the piece of data you need to specify)
If I at editor runtime want to save some data into a data asset any advice on going about that, not talking about save games here, more like I want to save a socket transform at key points of an animation, something like that
@lofty rapids
@lofty rapids when i press 1 to add a item to my inventory this error show up: Blueprint Runtime Error: "Accessed None". Node: Branch Graph: IsValid Function: Execute Ubergraph Survival Game PC Blueprint: SurvivalGame_PC
Need a bit of help over here, so basically what I want to do is changing the skeletal mesh of one component inside my Car (currently done with pressing 1 and 2 for 2 different skeletal meshes), I need a way to cycle through all of my car body Skeletal meshes.
P.S.: I'm completly new to Unreal Engine
wdym
Does anyone know why my camera aims forward when I am playing, even though the camera component clearly shows -50 rotation on the Y both in the blueprint and in the component while playing?
I suspect it has something to do with the hierarchy in the blueprint, but I have no idea what I've done wrong and haven't had much luck figuring it out.
my thingy just stop working XD
the error is gone
but
is not picking up anymore
lmao
shoutout to all the helpers in here
oh wait is because my in valid
what does it look like for when you press 1 ?
i'm not sure you understand the execution pins
the white lines are power if nothing comming in it won't run
ik
but
if I don't plug this in
the weapon even if is valid wont go
to my socket
how do i like put the physics stuff in
you want to do it before then just plug it in it should run the power will go through
plug the set into the set collision
and it should just flow through but do you want to do it after or before ?
i want it
uh
i
well
i wants it to have physics when is not
in my player's socket
but when is IN the socket i want it to be
static
like dont move
i can just plug it in
the power should go throught
but
it doenst
hey,here im detecting the player and the difference of location of the blueprint and player,based on player location i move the object up,so im wondering about the performance ,how can i replace the tick?
what do i need a gate or smth else?
@lofty rapids nothing happen in that Bp but the bp that call this fuction isnt working propely. At the is valid is suppose to go in the other branch
i would print the index
see if it's valid
also the length to make sure that index is in it
possibly the get is not finding anything maybe bad index or not in data
@lofty rapids the index is the empty slots value i think it may be wrong
Is anyone able to help me figure out why I have a skeletal mesh that is attached to my player via a socket, but when I enable physics so it flops around, the mesh won't stay attached to the socket
@lofty rapids this is the find empty slots fuction can u tell if any thing wrong with it
say - does anyone know the best way to code swinging a sword?
it's unnecessary complicated
you don't need a for loop with break
move the return statement after the branch and just early return when you found a slot
@lofty rapids i think my slots info isn't right what could I go about fixing it
@lofty rapids is there a way to print the info so i can see its output
ya, print string
it'll show up on the screen at the top left
Anyone have an idea on how to create an actor that I can drag and behave like a landmass spline? (Mostly doing river I want to control via code)
Basically when I hit Update the water generate but I can't find a way to have the heightmap affected
@lofty rapids how could i go about debuging the slot array info
make sure the index is correct because your currently selection isn't valid
then if your index is correct, check what it's getting
you can print string the index
idk about the other you'll have to find a way to print it or you use breakpoints
@lofty rapids i just dont uderstand why isnt my slots fuction working propely
Hello guys i am working on a inventory sorting function with multiple types of sorting like (item type, order of acquis, item amount) but i dont think this is the best solution does anyone of you have a better idea?
TArray<int32> ULowEntryExtendedStandardLibrary::SortIntegerArray(const TArray<int32>& IntegerArray, const bool Reversed)
{
TArray<int32> Array = IntegerArray;
if (!Reversed)
{
Array.Sort([](const int32 A, const int32 B)
{
return A < B;
});
}
else
{
Array.Sort([](const int32 A, const int32 B)
{
return A > B;
});
}
return Array;
}
``
How is this possible? I have an item, when overlapped this sets to true. String prints false and true I mean what? What happens here? I simplified the BP to make it easier to see..
check the collision of your mesh
what should it be like?
there's something wrong for sure, with the screenshot you sent, it should be always true or false so there's something that you didn't show that is changing the variable
i deleted everything else for simplicity
this is now an empty box
when walked over it, it should set to true :/
actor begin overlap = any actor can overlap with it
do a if: is other actor the player??, then... print if it is true
is that working? @rare shore
make sure you only have 1 of the actor in your world
what does the bp look like with the if?
Also, there are other options besides Print
try Draw Debug Box at the location of your hit
i have 140
so this is a problem?
im trying to make the save/load feature. i have 140 if this objects
139 of them will be printing FALSE while you are looking for a TRUE
oh.. how do i fix it ? I just want to save state of my collected items.. and then NOT load them on game load..
it there a better way?
You could Get Actors of Class and filter by your Actor, that will give you a list of what is still there
hmm
but they are all the same actor
all are lets say Armor1
then the level just makes them Armor11. Armor12, Armor13.. etc down to Armor1140
how do i filter out the already picked up ones
yup, do they get Destroyed when you pick them up ?
yes, but i tried setting visibility to off aswell instead of destroy
still nothing
so if i have 140 armors, how do i tell the array to save only the ones that were picked up? i cant think of it ๐ฆ
I dont know how or what your are saving , but this will tell you if its picked up or not
Since you are setting Vis to False when you pick them up
he shouldn't be looping like that every frame, it's probably working, just print the value of collected when you overlap it, not on tick
the individual actor will then only print when overlapped. If that doesn't print, its collision settings
then disable collision and visibility when picked up
Okay i will try this one tomorrow. Thank you:]
try it now lmao
Had to go to sleep, way overdue.. this was keeping me awake..:(
I really wouldn't. just do this
good luck and gn tho
Thanks all!
So i shouldnt destroy the actor? If i want to save the information if it was picked up or not? I should instead set visibility to off?
oh and cast other actor to your character so the overlap only registers when the player overlaps
casting on tick is reallly usefull and not expensive apparently
if you want the armor to reappear, feel free to just hide it
Destroy is likely fine in this case if not
Hello all !
Does anyone know how can I check if the player released the joystick ?
(the analog stick of the controller gamepad, or the button "W" of the keyboard for example)
It's ok I found it, thank you !
Casting once or every frame don't make any difference. Casting in bp loads the object into memory already (because of the hard ref). If the object are already loaded then there is no more price to pay.
Tick is bad or Casting is bad are myths from youtubers. Check the pinned article of this channel
wow, I learned something, tyy
could someone pls help recreate a very small CPP code snippet in BP for me?
Wat happend to the guy you dm?
let's see it
he told me to learn cpp instead of help me. classic cpp channel
Well it's better to teach ppl how to fish
void UpdateGForce() { const FVector Velocity = RigidBody->GetLinearVelocity(); const FVector AccelerationWorldSpace = (Velocity - PreviousVelocity)/DeltaTime; const FVector AccelerationLocalSpace = RigidBody->GetTransform.InverseTransformDirection(AccelerationWorldSpace); const FVector GForce = AccelerationLocalSpace / 980.0f ; //if length units cm, if meters 9.8; const float LongGforce = GForce.X; const float LateralGForce = GForce.Y; PreviousVelocity = Velocity; }
Do you understand what's going on here or is it all Greek to you?
this is what i gobbled up so far. not sure if it's right
So you don't need all the intermediate variables in the BP version of it
But its already in cpp...
those are mostly for orginization and readability
so what am i missing or doing wrong
Sec, firing up Unreal. You get one freebie
thank you good sir
so i pretty much got like 10-15% right
yeah just gotta get your head wrapped around the execution flow and the sets
i'm gonna look into how to read cpp after this
Could someone explain to me what is more performant(or if that is even a lie):
A) Use a get node for each variable reference in a BP graph
B) Use one get node and then string all references to that node together
See image for simplified example. Thanks for the help!
exactly equivelent
its the same thing
I prefer the upper as I like all my nodes tied to an execution node to be self contained
That's what I had kind of figured, but some where along the way I heard that option A would start to be less performant
Me too
I mean maybe rendering 1 more node on the graph editor but then you add a redirect so it's probably the same
but at runtime it should be literally identical
That what I was thinking, they are all looking at the same memory address right?
Yeah it's all basically
Print(IsTest)
Print(IsTest)
I like my BP to look like this, nice and readable and relocatable
it's a bit too compact for many people but I compact the stuff around an executable node when I'm done with it
This does my heart well haha. Love good organization. Now you just need some comments ๐
Thanks for the 411 on that question. Appreciate the help
Why? You can just read it and see what it does. I could maybe wrap the entire thing in a comment but the entry point is descriptive enough
If my variables were named A B C D then yeah it'd need commenting
True, true. A preference thing then.
I guess in a team setting when you go back to it 6 months down the road and the new hire has to look at it, it does help them out
If you're curious about further optimizing your blueprints look into ways you can reduce the total number nodes. Less nodes = less stuff to process through. That isn't always the case as some nodes are much more expensive than others, but its a good rule of thumb.
That is absolutely not readable!
it is
Good point!
it's a bit too compact as-is but you can at least tell what's going on. You can zoom in on a node cluster and you have nothing coming in from off screen
There's nodes overlapping other nodes, hiding input connectors and connection lines running behind nodes making the text harder to read and in some cases the connection is almost entirely obscured by nodes being placed on top of the lines.
Maybe that's a zoom issue, but eh.
I know it's a style a lot of people have adopted, I just find it awful. It's like having no whitespace in c++.
I'm not talking about the compaction, I can take that or leave it
I'm talking about the non-execution lines
If you need to move the object smoothly then leave it on tick.
When doing something overtime, you can use timeline, timer or tick. If you need to check every frame, you will use tick.
That looks fantastic.
(I'm not saying it's good layout or not, mind)
It just looks cool.
Is there a way to access a variable that is on the level blueprint from another blueprint? I'm trying to check a bool but am not able to figure out how to get access to it.
I also prefer the default so maybe I'm just a bit nuts.
Manhattan style is just aweful and Subway isn't much better. You can't tell that 2 things are using Time unless you go check the other end.
subway 45 ftw
I'd do something like the subway style but using reroute nodes.