#blueprint
402296 messages · Page 850 of 403
You need to make sure that you set up your references in a way that you can access them
There is a Stream from Epic Games pinned to this channel called Blueprint Communication
Watch that
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
it's a bit older but should still be relevant
Whereever you create the Widget you need to save it to a variable
ok thank you
And then you need access, the same way, to whatever has that variable
Usually you ensure that you use easily accessible classes
Like spawn your HUD in the PlayerController
And save it to a variable
Spawn your Menu there too
im going to try and save it as a variable and refrence it in the playercontroller
Then you can alwasy GetController etc. and grab the Menu
thank you that really helped me. i thought it was fully a working reference to the widget. i didn't realise it was just a container
Yeah Pointers (in C++) are probably a bigger entry barrier to understand
ive used references like that before and it worked. im so confunsed
They call them References in BP, although they are basically Pointers
Don't ask me why they do that
Hey everyone. I'm making an Infinite Runner as a game to learn some Blueprint stuff. I have it set so that a Collision Box is set to End Overlap to destroy the actor which makes it so it destroys the previous Tile Map, but I'm having the issue where when I die it destroys the Tile Map and it is linked to the End Overlap Collision Box. I know it is linked to it because if I remove the connection it no longer destroys the Tile Map, also Breakpoints show that it is caused here. Is there a way I can still use the End Overlap to destroy the actor but someone disconnect it upon death to make sure it doesn't happen, or is there a better way to destroy the previous Tile Maps?
Hm, I guess overlap is fine, but you could also check distance for example
Is this to me or someone else? If to me what do you mean by check distance?
Distance from Character to Tile
Idk how your tiling works, but usually one have like x tiles that are moved (and the player runs in place)
The Tile Maps don't move and the player moves.
Yeah that's basically wrong
Cause game worlds aren't infinite
The further you run the higher the floating point errors go
That's why you usually keep the player stationary
And just move the tiles below them from front to back
That way you also know, since you are moving them, if a tile reached the end and can be despawned
But let's say you are doing it with the Player running. You can check the distance between tile and player
I couldn't get it to work properly doing that. I'm not using tiles I'm susing 2D Tile Maps and I kept getting a lot of issues.
If it execeeds the tile size or whatever distance you want, it can be despawned
I wouldn't know how to do that. I can copy the project and try doing it that way again.
But then I also am not sure how to do the obstacle spawning with that.
If worlds cannot be infinite than why would there be tutorials for games with infinite world from Unreal?
Worlds can not be infinite. Just make a cube and move it forward with crazy speed. You will see rendering glitches and stuff. There are ofc ways around it that usually move the whole world to fit the world origin.
For an endless runner it's very common that the player doesn't run forward but the world runs backwards kind of. And it's not really more complicated to set it up this way
Infinite/Endless Runners are faking their locomotion. It's just chunk of stuff generated ahead of you and scrolling towards you.
I do know this is how they are, but for some reason I just couldn't get it to work with 2D Tile Naps without a lot of issues that I'm just not sure how to deal with. I'll go and make the switch. Hopefully I don't have too much issues.
Those people who do tutorials for Infinite Runners should be slapped for making the tutorials that way.
Hi guys, when I make a blue print on a widget with "open level" and go to the level it no longer seems to connect to a play mode, it just sees a player standing there but nothing is happening when clicking, etc.
Seems that it doesnt find the game mode or something
I somehow think its skipping the event
Can I not create a custom event between a UI widget and a player character
Yes
This is the blueprint I have made currently (so when clicking button open level and include the options of player mode, etc)
(but that doesnt work obviously)
Which game mode is specified in mainmap?
topdown
Options must bebhandled by you aswell
so I cant (just for clarity bc English is English)
I think its because I have the login interface as first menu that when it opens level mainmap it somehow doesnt know about the player movement, etc
The game cant know what to do with some random vector input
It must be handled manually
You can
So what do you advise me to do?
I have a login system via xsolla plugin ( works great ) it will be the start menu of our game. So when I have a redirect to the MainMap it doesnt know the game mode it seems, is there a good way to do this via the blueprint?
Not sure where to put this. I've been working on a mobile idle game but I've been putting all the variables and functions like costs/upgrades etc in the game mode...but now I am thinking it would have made more sense to put it in the game instance..... does it really matter
Depends if you want to prevent cheating/memory hacking or not.
Game mode is fine for anything relating to the "game itself". Idk who's hacking mobile idle games anyway
I guess I was thinkling since the game instance is persistant accross levels it would have made life a bit easier
So I have a little ability menu and im trying to use scroll wheel to select the ability when I click
I have the scrolling working properly when I have it up and the number range is working just fine
the map works just fine when I click the buttons the correct action happens
I need to be able to scrooll and click to use the ability While still being able to move
or use the ability index I have made to pass into the UI widget somehow
Should I need a better way to do this OR i need to take the ability index value and (Click / press / fire, whatever you call it)
the ability in the Ability UI
Is there a simple way to remove all values equivalent in an array ?
Lets say I have [ 1, 1, 2 , 4 , 2 , 1 , 4,4 ] and i want to obtain [1,2,4]
Afaik a level cant be opened without a gamemode , so there must be one, even if it were not the one you expect. Passing in cursor world loc as a string needs to be parsed manually for it to do anything
Only values that are representated teicr or more ? Thr example had multiple optional meanings by itself...
If the array was [1, 1, 2, 1, 4, 3, 4, 2, 2] what would the result be ?
[1,2 4] ?
No if you have a 3 in your array you will obtain [1,2,4,3]
The goal is to keep one value of each
But there was a very easy way to do it with a simple loop and the 'add unique' node, thank you tho !
Yeah that one exists. Wasnt clear what your goal was :) no prob, whateber i did not do 😅
yeah i know, its kinda hard to explain when you know what you want but you don't know how to do it, i'll do better next time 😉
Hi everyone! I'm still relatively new to UE4 and I have come upon a problem in a game I'm making. The idea is to make a little spaceship rotate around a planet to make it seem that it is being affected by its gravity.
Currently, when the spaceship overlaps the planet's collider, it triggers a boolean in the Tick function, that in turn makes a function that (for the moment) is called BP_Test to continuously be called, which does the following:
As you can see, the problem relies on the fact that when the spaceship overlaps the collider, it starts spinning but not from where the pawn first touched the collider, but on a exact spot. By debugging I realized that this is because of the planet's variable called "Angle of Rotation". Because by default it is 0, it always makes the pawn rotate from that exact point.
So what I want to know is that if there is a way to calculate the angle of rotation based on when the pawn first touches the collider. I thought about getting the distance between the center of the planet and the location of the pawn when it first collides and from there calculate the point in the circumference, but it is just an idea and I kind of got stuck thinking how to go from there.
Thanks in advance for every comment or idea on how to do this 😅
Within the blueprint of open map on click..?
Is there any way to turn unreal engine coordinates to right handed mode? I've been doing some blueprints about circular trajectories and now I realise X is backwards and when an actor rotates it rotates clockwise around the Z axis, which means all the paperwork I did is not valid xD
Not really. Better to fix your actors so that X is forwards as it's expected to be
X is forward
Sorry y’all I was young and this coordinate system stuff was confusing https://t.co/S2tkQRfAHr
2954
706
Yes, I know. I was just wondering if there's an option to turn it into cartesian
Simply put, no.
Tbh I was tought X is forward since school so it doesn't throw me off. But I guess i'm "coordinate ambidextrous"
I'll try multiplying x by -1, doing all the calculations and then multiplying again by -1, hopefully it fixes it
Probably easier to just fix the calculations if this project is going to be developed further
Otherwise it's just gonna get confusing :D
Seem too excessive of a math bodge, but you do you.
When performing a hit result under cursor for objects, is there any way to determine what object type the hit was found with? Looking to be able to determine if the hit object was a WorldStatic or WorldDynamic
And scaling It up, especially in BP, might cause some slight repercussions in game thread frametime
You can call Get Collision Object Type on the Hit Component output like this
Perfect, thank you!
I've always seen coordinates as +X being right and +Y being north, that's why it confused me a lot when I noticed in UE +X is left (if +Y is pointing north), maybe it's one of those usa vs eu differences
Yeah - but then Epic goes off and makes manny facing +Y by default, 'cause reasons 🤣
And that's where the ambidexterity shines 😎
Well because of that, I do my skeletons +Y forward and static +X forward.
Probably weird, but w/e, it works.
Could I get some help in figuring out how to get vinterp to work? Im trying to get a character blueprint to offset a certain amount and interpolate to the new location over time but I cant figure it out no matter what I do
Have you put the VInterp To node on Event Tick? Interp To nodes have to be run repeatedly.
yeah i tried that, it must be something else im getting wrong. the delta time input on vinterp is from event tick here
I might be inputting vinterp into the wrong kind of set location?
@icy dragon
I think it may be because you are updating the target location every tick. As GetLastUpdateLocation is a pure function, its value is recalculated when it is being read.
The target location is an offset from the current location, so as the current location moves towards the target, the target also moves the same amount due to it being recalculated.
I think you'd need to store the target location in a variable and update it once, that way it won't change as the character interpolates towards it.
Refering to the option string or the map and gamemode? 😅
Is it possible to receive hit events from inside a component, without adding anything to the owning actor?
I'm trying to encapsulate all the functionality inside a component, but I can't seem to figure this one out
You can add a collision component at runtime
wait, you'd still need to add it to the actor
but the actor doesnt need to know about it, if that makes sense
Yeah, adding things at runtime is fine, and I'm also calling a setup function in the component from the owner at beginplay, so it's possible to hand over data. But I don't think this would work since the hit event is only available in the actor blueprint and not the component right?
Hi! is there any way to make one object completelly "WHITE"? i removed all lights on my scene and placed one actor with one material, the problem is that it's not completelly white
and when i change it from something else to white, it takes some time to adjust.
Oh awesome, thanks!
why For Loop doesn't work like First Index is for example 20 and last is 0?
what do i have to use to get it to work the other way around?
How can I find the blueprints I need? Im thinking about switching to C++ just because finding Blueprints is a ####### waste of time
It's due to how the macro is set up. It increments from the first index number.
You could create your own macro to do the opposite using the for loop as a base.
What do you mean by finding blueprints?
Like, looking for them in the content browser?
hello, im having a hard time figuring this out. I am looping through an array of values, and creating a new widget supplied with the values for each iteration. This widget im spawning per iteration has a button. what i want to do is when one button is clicked, return the corresponding value. however the way i set it up makes all the buttons return the same value when clicked
What is needed for red Data Asset?
Can you show your button click event?
cpp
finding the nodes
and finding out what they do
there are a billion
ive been searching for a god damn fitting blueprint node for 2 months noe
ive only been doing shitty implementations
@dawn gazelle im pulling the button from the widget, which is being duplicated with a foreach loop
If i create child primary data asset class?
Well, you probably won't have any better luck in C++ as the nodes are effectively representative of C++ code, just in a visual format.
What node were you looking for? What are you trying to accomplish?
it works but only returns the same value no matter the button that is clicked
data assets are generally only exposed through cpp, though you can use UDataAsset for BP iirc
i have an object moving along a spline (timeline and lerp) and i want a second one moving afterwards… i tried adding to lerp but that messes it up especially in curves cuz linear interpolation… i just need some kind of offset
Update your event dispatcher on the button widget to have an input that can return the value you said you were supplying the button. Then you'd need to refresh your bind event to be able to see the value coming out.
i tried calculating the angle between the 2 objects and adding that to the already modified lerp
but thats expensive af
ill try
So you effectively just want to have two objects moving along a spline, just one behind the other?
yes
without delay and another timeline or some sneaky tricks because i also control the speed
and delay will mess up on bad pcs
Have you tried attaching one actor to the other?
so the second object is a child of the first?
actually how would you do this exactly?
that wont work
In your button widget, select your event dispatcher and look for this:
Usually at the top right.
the second object also has to follow the spline (location + rotation) just like the first one but remain a fixed distance between them
Riiiight, so more like a train
exactly
in fact
thats what im trying to do
that problem has been bothering me for like 2 months now
@dawn gazelle I created a dispatcher and created an input, what should I do now?
sorry if im asking too much, ive never worked with this before
i try to do this but i still have infinite loop 😅
So I don't think there's really a node to accomplish that. This is some custom code you'd have to work out for sure.
What I'm thinking in my head is having a "TrainEngine" actor that is set up to run along a spline. In this TrainEngine actor you can have an array of other TrainCar actors, all defined to run along the same spline.
When you adjust the speed of the TrainEngine, you loop through the array of TrainCar actors and set their speed as well - not realistic per se, but should effectively allow your train to increase speed and keep all the cars together.
I don't know how it should look like
Does anyone know if you can give the switch node a variable as a case, instead of hard coding the case values?
So now when clicking your button, you'd be calling your event dispatcher - feed in the value you want to return back.
In the place where you bind the event, you'll need to refresh the nodes and you should then get an output pin on the red event.
Basically should look like this
Huh
So just 2 actors following the first on a spline ?
controlled by one bp ?
you mean like... a select node?
yes
I think all that is needed is changing the <= to a >= and swapping the inputs, then changing the Local Integer + 1 to Local Integer -1
Im actually really close
@odd ember Well not really, the switch node will directly control the execution flow. The same can be done with branches but it's less elegant. Basically, I want "if input x = y, execute branch A, if x = z, execute branch B, else execute Branch C"
But I can find a way to assign variables as y and z (called Cases in the node)
so you want an enumerator?
when i do like this and in First Index i set 30 and in last index set 0 then i have always is Completed
no Loop
There is compare float and compare int if it's just 3 cases. I know it's not exactly what you're looking for, but could get the job done.
i thought about trying to get the two points at the end of the carriages and then add to lerp
so it wont stretch
or atleast not too much
well you can make a switch on int with 3 cases as well
True
also not sure how good CompareFloat is with precision
Probably 💩
@dawn gazelle @odd ember Well it's selecting based on a name, which can have one of 2 values. But the whole point is for it to be just one node cause it looks and feels good xD One could easily do the same logic with 2 branches. I just wanted to know if the switch could have variables as cases cause it seems strange that it wouldn't be able to
I mean it really depends on the context. maybe there is a way but I don't know what you're trying to do
if you can describe it then it'd be easier to say
Input is a name variable, and based on the name I want it to execute one of the cases
But, the cases cannot be hard coded cause they may need to change
Im probably oversimplifying this
right what I am talking about is what you are intending to do in a non technical context, not your own technical solution for it
Something like this?
Ah I see, well I have a hit event firing when a ragdoll hits something with its feet. I want to do something differently depending on the foot, so I feed to name of the bone to the switch
can you explain what you want to do with them?
if it's just two variables you can use a branch
Why do different feet have different bone names in the first place?
You could just store an enum whatever feet your character has and simply switch on enum. No need for bone names and stuff like that
@dawn gazelle
Just 2 boxes moving identically along the spline with a distance between them
or someone?
Like in my short clip?
yes
but without adding another timeline for every single object
@odd ember Well it's a long story. I think I'll just make a custom macro for it, but thanks for your help!
@frank rover The data is coming directly from a hit event so there is no need for a enum, I can just grab the foot name
Using the same timeline (or tick) for every object
same timeline, multiple carts in one blueprint
@whole dune Do you want the objects to be oriented tangent to the spline or pinned to spline by 2 points?
Wait, are we talking about what type of shoes a character has or if the left or right foot touched something?
pinning to spline will be much harder, but oriented to the spline is ez
Sorry, should only need these changes.
If it was the left or the right foot that triggered the hit
now when i set first index 30 and last index 20 in return index i have always 0
the left foot has a clown shoe and needs to make a horn noise, the right foot has a loafer and needs to make a shoe sound
from start to finish…
or what exactly do you mean?
Okay in that case you could switch on name and just make sure you set up the skeletons right. Or just compare to a data table of left and right bone names by skeletal mesh or whatever. The first thing would be the best, tho
@frank rover Yes and that's what I was doing, but perhaps you missed my original question. I was wondering if it is possible to assign a variable as a case, instead of hardcoding it
I've tried everything and always have either Return Index 0 or Infinite loop
Idk. Can you open that standardmacro and take a look at it? :)
Well I just made my own macro for it anyway xD Just needed two branches. It was more of a convenience thing, the logic is still simple
Is there a way to control the tick order of actors in the same tick group?
Can you provide a screenshot of your code?
Right, as i was saying, im using the same bp, and a common tick ( or timeline) to do this as shown in the video. Manipulating it with tick is easier imo
@dawn gazelle
how?
On tick
Position += Speed * DeltaT
OffsetPosition = Position + Offset
Different objects would have different offsets
and that's all along the spline
Exactly
it won't respect distance from object to object but distance along the spline. Respecting distance between objects would be pretty hard and not trivial
so is it better with tick than timeline?
I'd say so but people will disagree
Depends, does it have to happen all the time or just sometimes?
Timeline gives you some handy user friendly controls
doors don't update all game long, smooth chase cameras do. That's the difference.
using tick, you'd need to do that by yourself
Yeah only update if there's something to update
flow control.
Its one of the main reasons why tick is frowned upon 😄
it looks so much simpler on tick
Not sure why you may be running into issues as it does look to be the exact same. This works on my end just fine.
that looks counter intuitive 😄
what do you mean?
the carts always have to follow
Is it a constant motion
or is it just "the train may move when X happens"
nah, but i can just control the speed variable, right?
Yepp you can
Tick
but speed != velocity , if you care for it
just add an offset into your location for distance along spline and you're good
is it more expensive to performance than the timeline?
Timeline is just a temporary tick. Use tick unless it's meant to only happen at certain times
so current distance + x?
yes
show what you have again
Hi! does anyone have any idea of why the capsule is not centered on the floor? The parent of this object is base "character"
so it should work smoothly
i actually had to use a lerp and adding to it caused it to stretch etc
you don't need a lerp
?
So the carts go back to the beignning
is it a closed loop or a spline with 2 end points
the spline can be a closed circle
roller coaster or drag strip
it doesnt really matter
ok then don't do the branch, just use a modulo to wrap back around when distance > spline length
is the speed relative to the spline length?
CurrentDistance = (CurrentDistance + Speed x DeltaSeconds)%SplineLength
I'm not sure, idk if splines are in cm or alpha or percentage or whatever
110 % 100 = 10, wraps back around
so absolute speed
I mean in splines, if it's in UU then you're good
100 for your speed will move you 100 cm along the spline per second
ah
thanks
really
i thought about using tick but i didnt think it would be much different
adding weight and height speed increase/decrease is also within grasps
if this is .. a rollercoaster game f.ex
train game
train tycoon ?
I'd use physics but that's a bit far from where you're at
nah, actually driving
depends on the design tho
Dunno, is physics reliable enough for that really?
I'd go for spline but thats just me being cautious
I would never use physics for the train -> track interface but for everything else yes
I actually would love to use physics
even with driving, downhill would go faster than uphill 😄
I got a train prototype working with wheels stably staying on 2 parallel rails but it'd be hard to make it behave nice. Would be fun for a chaotic game
hehe that's what i'd imagine
If only we could have a perfectly smooth spline collider
Thats realistic tho
so a rollercoaster ment to repeat the same track reliably a hundred times over could be.. interesting
yeah it'd be more like a Derailment Simulator 2022
xD
I'd still use physics tho for any train game, just have a custom solver/constraint to keep the wheels pinned to the tracks
Spring/damper between 4 points on the car body and the spline would get you close enough
use physics for the momentum and constraints between cars and traction etc
i think the driving feeling would feel much better if its phyiscs based
Depends on what the game design is meant to be. If it's a logistics game then that's overkill.
IDK, driving a train seems like the definition of boring
sweet
Sure, its oversimplified , not counting for carts weights and whatnot
now, increase Speed by the spline tangent's Z component
i dont fully understand splines yet
im increasing it based on the Dot for World Up (gravity)
Same thing
You can just break out the Z
there are all sorts of nodes 😄
Dot(Vector, Z) = Vector.Z
Its to late for logic , that train has passed
i feel like a caveman for only using the simplest nodes
its just so hard to find them all
That's the best part of BP, just type for what you want
whataaa
And that's the worst part of C++, knowing what you want to do but not what the function is called
Use Forward Vector and Right Vector to calculate the orientation of the object at that point
Hi all. I'm looking to assign enemies a reference(within the game mode) as they spawn so that the Game Mode can destroy the one that has existed the longest on an event. Anyone know what direction I should go with that? Should I be casting from the Enemy to the Game Mode on event begin play to create a reference somehow?
"whats avaliable here"
Thank you so much guys im going to try it out tomorrow
In case you dont know;
That's not what casting is. Casting is a type check / conversion, not another word for communication
What's spawning the enemies?
dragging of from your object type will give you context specific functionality. Typically Getters are usefull. Bindings are also very nice 😛
Eventually, an "enemy spawner" actor. As of now, a keyboard event
I'd just do a manager ^
Whoops, on that casting wording(still somewhat new)
FIFO
For now you can just have the enemy notify the gamemode that it was spawned, but once you have a spawner it can handle that
You usually want references to flow in 1 direction if at all possible. Spawner already knows about Enemy, Enemy doesn't need to know about Spawner.
If its singular spawner, the spawner can be the manager. If there's multiple...
depends on if it's oldest total or oldest per spawner, all depends
True
Ohhhhkay, I think I understand. So basically the spawner would store that information and the game mode could get/check the info?
the game mode wouldnt need the info really,
In production the final result probably looks like GameMode handling the spawning of enemies at SpawnPoints and keeping track of them
at best, gamemode would tell the spawner to destroy the oldest spawn
but it all depends on what you're trying to do. If it's a minecraft style spawner then have the spawner actor do it and don't bring game mode into it at all
My current set up is that the player can use a certain amount of "battery" to destroy the oldest actor, so I think what I'm going to do is check from the game mode if there is enough battery to do so, and if that is the case, then the spawner can destroy the actor?
Is Battery on the pawn or PlayerState or GameState or where?
I have the battery stored within the game mode
You making a tower defense?
Prolly wouldn't do that
Similar mechanics, kind of half way between a tower defense and 5 nights style game
Game Mode is poorly named. They should have called it GameController along with GameState the way you have PlayerController and PlayerState
Ohhhkay, that makes sense. So theoretically I should move what I have in the game mode into one of those others like GameState
Also thanks so much for the help, I really appreciate it
Huh... just had a look at the contents of my game mode, and it's just this... 😆
Haven't look in there for a good year or three... 😅
Hahahhaha
I think I went with a misleading youtube tutorial or something at some point
Or just misunderstood one
Keep in mind that UE4 is designed around the idea of match based multiplayer gameplay at it's core. It can still be very easily repurposed for a lot of game styles, but not every class type will be useful to everyone. GameMode in itself is a heavily multiplayer based class.
not sure if right channel but is there a way to do a 3d curve? for instance you input 2 variables and get back a third and the curve defines that? when i create curve asset it is only x, y. Maybe im missing something.
does anyone remember how to do exec pins in functions? I thought there was an exec pin output type
in UE5
Functions, or macros?
oh, needs a macro?
thanks 🙂
you can't delete outputs anymore 😣
lol there's an invisible block in the panel hiding the delete button. it's behind that blank area
This one has me stump. In my Find Stack function. Just 1 variable has me mad. when it does a loop looking for a Stack of items and it finds a match and the item has less then the stack size. It then adds that item to the stack. The the Variable
Should return that item and the amount in that stack. It's just this 1 returns nothing but 0's. anyone have an idea
The variable Name is LocalQtyInStack
Hi. How can I close automatically close a Gate Flow Control after a certain period of time?
show your setup
Okay so I've spent all day trying to get this to work and everything I've tried has failed so idk if this is even possible without being super heavy. I'm trying to make an Interaction Actor component. All of the code on the tick works, but I'm trying to implement a system where it preferences the closes actor to the player (like if i'm right beside two actors that have this component, only one will accept input. the code will have to fire on sequence line 1 somewhere.) this component this placed in. You can see the start of what I feel like is a solid idea on the Event begin play node.
this looks very strange. what are you trying to do with that interaction component?
Sequence 0 puts a white dot above the actor, indicating you can interact with it. Sequence 1 turns that into a button prompt and allows input.
why are you checking these things per tick? every interaction in the game world running per tick just to check the distance to the player?
and then the player doesn't even have control of whether they can interact with it, but the interaction itself does?
instead of the gate, use SetTickEnabled. done
Thanks!
also FYI that delay does nothing on tick
if you want to change the interval between ticks you can do that
but putting a delay on tick isn't the solution
Epic: please rename "delay" to "procrastinate". Thank you.
The tick is just for the prompt and enabling/disabling input.
that is "just" the entire interaction though
I would not recommend doing it like this
@flat scarab This looks like something you would do with a timer
I'd center the interaction logic in an interaction manager that sits on the player or controller, and allow interactions in the world register themselves to the manager
then the manager can decide (based on conditions that it gets from the player) which interactions should be prioritized
Also, that random node is gonna create two different values if you are unlucky
Not sure someone mentioned that already
But maybe you want that, not sure what that code is supposed to do
Alright, i'll look into that @odd ember but how do make it to where the prompt only fires on the closest interactable actor?
if you imagine that an interaction can have collision, you can reshuffle priority every time a new interaction collision gets registered. if you need it more granular than that, you could reshuffle it on player input
or failing that, on tick for the manager
that way you reduce n amounts of tick from each interaction in world to a single tick for the manager
but you can get it without tick as well
So I have a little ability menu that I make and im trying to kinda get a Hover sotra effect or like Is selected effect on this list I did have it hooked up on click to use the ability but That is that the function I need Atm I scroll and It changes a index in the character and fires based on a map using the UI part to shot the abilities
I tried to do the scoll thing in the UI widget stuff but that was to hard for no reason
How do you capture on change visibility event in a widget?
Tried this but the function I pass isn't firing.
that would cause an infinite loop if it fired
To be clear The top picture is in the character
the middle is the ability list being made of ability slots
How do you do it then?
also no clue what your function does
you link another event
that will fire when visibility changes
use the CreateEvent node
and I believe you can change visibility by using SetVisibility
the binding sets up another event to be callable dynamically when something happens
I guess that would make more sense then adding it and removing it
but you need to have that event called in the first place to make it work
but that is not the main issue
so I'd suggest putting the binding on BeginPlay
and then bind that event you created
or use the CreateEvent node
your choice @frail pilot
I tried to use a custom event
but I could not get that to work in the ui widget
I tried setting focus on the widget but I still want the character to be able to move
and also setting focus just did not work
- using scroll wheel to change the selection was way 2 hard for no reaseon
-Let me be clear
either I need to rework this in the UI blueprints
OR just get the index from the player of the current ability
and use that to change the style of that button
OR make it behave as like "IS hovered" but I did not see a node for such
would this work?
possibly. I can't remember when Construct is called, but if there is no BeginPlay then yeah try that
BeginPlay is not popping in the contextual menu
fair enough, try that then
I know there's a few widget construction events, not sure which one is the most correct to use
some of them run too early before the widget is fully constructed
but I think that's Init
ok ty
PreConstruct and Construct is ran anytime the UserWidget is added to a new parent. Init is ran at widget creation. AFAIK all internal widgets are available at init, but exposed variables won't be set yet.
which is why I'd caution trying to setup a binding at Init
I don't think I have too many options, there is construct, pre construct and On Initialized
alright
I was so zoned out I thought this was an answer to my question LMAO
I was like how does this help me XD
How big of a capture can I take with a scene capture component?
Dunno where else to put this, but I cant figure out how to make a collision mesh from my complex mesh on my 3d model. Anyone able to help?
I want to be accurate to the model
how do I restore blueprints
whenever i copy them into the project from the saved folders they are just the same as the current one
yet I know it is different
Copy the autosave one without renaming, delete the BP in Content Browser, and replace reference the the autosaved BP.
Then you can rename it back.
thanks!
Guys! Does anyone know how to setup a material that always faces towards the camera's current position? Any help would be much appreciated!
so, if i had a spline with a procedural spline mesh on it in my level, and i want to make it so the player can rail grind on it, how would i make it so the player snaps to the point they start grinding on, rather than at the beginning of the spline, or at the nearest set point on the spline? like just start grinding along the spline wherever they hit it
you probably want to use some of these nodes
alrighty, thanks!
Anyone got any advice for this? I have a widget component on pawn (overhead health bar) and so i bound this function in the widget and it has trouble reading player pawn. Is there a different way i'm supposed to reference the pawn that owns this widget?
error is "accessed none trying to read pawn name"
Guys, I don't understand. What are the advantages of Data Asset over Data Table and vice versa? For example, for static item data. I noticed that many people use Data Asset, but Data Table is also suitable for this.
BenUI does a good job of going over the Pros and Cons on his site here:
https://benui.ca/unreal/data-driven-design/
Accessed None indicates a reference isn't set that is trying to be accessed. Do you get a big list of that error, or does it only appear a couple of times and then your bind works?
For my game I wanted to create multiple playable characters that the two teams share how would I do this this is probably an easy concept but I am confused
So trying to understand how to use gameplayTags for keys, and looking at Tom Loomans example he is plugging these. Looks like hes using a custom interface function i think? Im still new to unreal so not entirely sure, but any idea how if it is needed? Picture of it attached:
is this for me?
no
Using interfaces for common interaction seem fair
What part are you uncertain about?
Sorry for poor wording, but i'm confused on what it is essentially doing, and how i can recreate it.
I'm trying to set the roll of a spline mesh in a way that if it were a racetrack, it would bank. Does anyone know how I might go upon doing this?
Yes, those are interfaces. An interact interface is usually used when you have multiple classes that need to react to something. For example, you could be doing a line trace, getting a "hit actor" and then calling the "interact" interface on that actor. If the actor implements the interface, it can then perform whatever it needs to do. This would allow you to use that single line trace to control things like doors, switches, lights.
You can create an interface by right clicking in the content browser, go to blueprints then select Blueprint Interface. You can name it whatever you like. Within the interface you can then define interface functions and include any inputs you would like to use in it.
Any classes that you want to use the interface call in need to have the interface added to them in the class details tab.
Once the interface has been added to the class, you can then implement the functions you set up - they're usually listed under the functions in the class.
You can then have that class do whatever it needs to do when the interact interface is called on it.
What do you mean by share?
I mean I want to create 5 different characters each with a unique ability. I want these 5 playable characters to each be selected once and have one character be on each team
Then you'd keep an array of some kind that tracks what characters are available for each team.
Eg. Use an array of the character class, each player as they select a character , you remove the selected character class from the array. If they deselect it, add it back to the array. As you have two teams, you'd need to have two arrays.
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/BP_HowTo/WorkingWithArrays/ would I be able to follow this to get the concept?
yes kinda like this i was thinking more like battlefield except only one class per person the whole game
I'd start simpler, keep the multiplayer part out of it, and just see if i could get the idea working with a single player picking to different arrays
https://www.youtube.com/watch?v=tizvqNW6OOs i was debating buying this asset as it's basically what I want
My Email millsapss75@gmail.com
My Paypal https://www.paypal.me/iamjohngalt1975
My Udemy https://www.udemy.com/user/scott-millsaps-2/
My UE4 Marketplace https://www.unrealengine.com/marketplace/en-US/profile/IAmJohnGalt?count=20&sortBy=effectiveDate&sortDir=DESC&start=0
Feel Free To Contact Me For A Private Tutorial, Consultation, Or Contract Wor...
@dawn gazelle Sorry to bother you again, but you were the only originally helping me with the key system suggesting i should use gameplayTags. However even after looking at guides on them im still extremely confused. I created the gameplayTags for the keys i want to use, but i'm completely failing at understanding how i can use the gameplay variables at all. I know in the example you gave me yesterday it was playerkeys and required keys but how do gameplayTag variables work?
You can create a "GameplayTag" variable for the key within whatever actor you're using to grant the player the key.
On the player, you want a gameplay tag container. Any time you 'pick up' a key, you add the gameplay tag to the player's "Key Container"
Your door can have a GameplayTag or a GameplayTagContainer variable for the "required" keys. If you would only ever care that the player has any single key, then just use a GameplayTag rather than a GameplayTag container. You can then check if the player's "Key Container" has the tag.
You'll want to set up the key actor's tag and door's tag to be expose on spawn and instance editable. This will allow you to set the key actor and the door actor's granted and required key when you place these actors into the scene.
Ok so do i create the players "key container" on the player blueprint?
Yep
Alright, and so how can i get the players key container variable onto the the key pickup blueprint to add it?
Depends on if it's multiplayer or not. If you're using an interface, you could potentially pass in a reference to the character making the interaction happen (much like the instigator pawn in the screenshot you showed). From there you can manipulate and access the variables of the character. If it's just single player, you could just do a GetPlayerCharacter and cast to your custom class.
I have no idea how a material would face the camera all the time but I found this tut recently while trying to figure out how to have textrender facing the camera all the time. If it doesn't help just ignore:
https://youtu.be/58tCYEEPgLQ
In this tutorial I show you to easily add floating text above objects/actors in your game.
This text will appear and disappear depending on how far away the player is, plus it will rotate to always face the player.
If you get stuck, have issues, or any questions about this video topic, please leave a comment below and I will try my best to an...
Well it will end up being multiplayer but at its current state isnt.
So then you'd want to use the interface most likely, and pass in the interacting character as an input into the interface.
Ok, not sure how i can do that haha. I understand how to add a input to the interface but im not seeing the variable in the list
You should have your character class there. An example here, I just have a BP_Spline I have created in the project and I can set that as the variable type for the input.
Oh okay so im inputing the character blueprint as a class?
I think it might be as simple as doing this. I have this on a material that I use on a textrenderercomponent and it makes the text always face the screen.
Yes - that'll allow you to pass the reference of the character that was performing the interaction through the interaction interface. Then your object can manipulate the values of the character that performed the interaction.
Not sure if here is the correct place to ask this. I'm making a local multiplayer game (No network, couch) that doesn't have Split Screen, so everyone sees in the same viewport. However I don't know how the HUD flow should work in that case, should we have a custom one only for that mode?
can someone please help , why this simple cast is failing ?Ovelap events are working pretty fine
its the wrong class coming in
print its display name
Adding sockets at runtime, are those somehow saved in the static mesh component itself, so they persist through mesh changes? 😄
Nvm, they're added to the SM ..
Hey guys I've got a blueprint system for when a player enters hitbox it changes their health value to 0 and they die & respawn.. works fine for client (player 1) but it doesn't work for other players on the server. I'm trying to figure out how to implement a server sided replicating health and respawn system. Haven't found any tutorials out there to help with this so any help here would be much appreciated!
The overlap detection with the kill hitbox should be done on server only, set the health value on server (health should be a replicated variable), and the die and respawn probably needs to be done on server too (and maybe also networked to clients if there are associated FX)
Your problem here is this needs to only run on server. And you are grabbing only the first player controller. (index 0) Which means you are only checking, killing, and respawning the for the first player controller. All player controllers exist on server - there will be 1 per player. So you need to do this operation for each of them.
One way to do this is to grab the gamestate, get the players list (list of playerstates) and get the player controller from each playerstate and operate on each of them.
To make sure your code only runs on server, add a 'has authority' macro.
Can anyone help me how i can make a AI movement bp without using navmesh or behaviour tree. any tutorial will be helpful.
To clarify, you want to make an AI move but without using a navmesh of a behavior tree?
Thanks @robust gate i'll see what I can do 🙂
yep.
Crosspost from #ue4-general
yeah, anyone give solution is fine.
See #rules no. 7
Crossposting without prior redirect is frowned upon because it can cause confusions.
@robust gate what node can I use to specify multiple player indexes?
I don't know of any tutorials for that. Generally most people doing ai use the navmesh and behavior trees.
But if I was trying to do this, I'd start with a character class and try to feed it input as if it was a real player. Just try to get it always running in one direction. Maybe try this out using the third person template. Once you get that working, try to add some simple logic where it tests if there is collision in front of it while running, and if there is, it turns left or right. Keep expanding on it til you have what you want. 3d pathfinding is gonna be pretty difficult without using a navmesh tho.
I'm not sure what you mean. Are you trying to iterate through the player array from the gamestate?
thanks, thats what i'm currently doing, i'm using set actor location and because of this pawn is not playing movement animation bp. it just teleport from one tile to next.
i'm having problem which one i should use to move pawn in one direction which actually looks moving.
Yeah, you dont want to use setactor location probably. I'd try to get it moving the same way a player-controlled character moves. The more stuff you share there, the easier.
My BP was only calling for index 0 (client) and not the other players. I'm trying to reference the other player indexes to link into the 'Get Player Character' node.
I want to move 4-5 pawns using events not through input like a simple chracters.
If you got the player array you could get the length of that array and use that to do a for loop, feeding the index into the get player controller node. There might be an easier way to get the number of players but cant recall off the top of my head.
I get that, I'm saying to actually get them to move properly, you might need to feed them fake input. Like call the function that giving input would normally call on a player controlled character.
Say you have an event that wants them to move to a certain location. First you need to set actor rotation on them so they are facing that location. Then you need have like a target location variable set and also set a new bool variable called like 'should move.' Then, on tick in that character, you spoof the move forward input for that characters as long as they are not at their target location or past it. Something like that.
yep exactly i doing this.
i just need to know a node which makes pawn move from one target to next target but still play movement animation.
VInterp To
You can role out your own logic/transition for the animation state change.
yep let me try this.
If you are driving the characters movement through the natural input flow and movement anims arent working then your anim graph must not set up right would be my guess.
Not through natural input, but through events in gamemode. when i call the event, pawns moves to that location like you see in turn based strategy games.
What node are you using to actually move the pawn to the next location?
I have set custom event which first get tile location i want the pawn to move then i get the pawn through get actor of class and then using timeline to set the pawn location to tile location.
You'd need to manually calculate velocity as the input for the animationBP
Ok. When you replied to me saying:
"yep exactly i doing this."
"thanks, thats what i'm currently doing"
That isn't actually what you are doing. You are not doing the input thing that I suggested, you are doing set actor location which is a completely different thing. Just to clarify.
can i calculate velocity when using 'VInterp To' node?
Sure you can
SetNewLocation -> SetVelocity(New Loc - Last Loc) -> Set LastLoc(NewLoc)
@languid linden if you want natural movement input like I suggested, just call AddMovementInput on the character on tick til it gets where you want it. That's the function I was thinking of: AddMovementInput
ok i will try this.
Pawn doesnt have that does it ?
I read pawn, but it may be character, I dont know : D
Hmm - not sure. Is it actually pawn or character? @languid linden
I'm using pawn with skeleton mesh inside as i'm not using any direct movement inputs.
so i'm not using AddMovementInput.
Actually, looking in code, pawn has AddMovementInput too.
Unless your terrain is perfectly flat, if you are doing humanoid type pawns, I recommend using a character with a character movement component instead of a basic pawn. With SetActorLocation ur gonna have to find the exact ground height for each tick too. If you start tracing for it, at that rate you might as well just use the prebuilt character.
Ah, nice! Good advice 🙂
It's not trivial to make ones custom CMC
easily underestimated , depending on requirement of it ofc
yep looks like you are right.
Agreed. CMC has its issues but its got a ton of useful stuff too that isnt easy to do from scratch.
Question I have a manual shift knob in a car, how would you realize animation of the gear change on shift knob (only rotation trasformations) so that it matches gear of the model? All the data is already available in an event (previous and current gear)
Sadly I have to do it within materials as I'm using it on instanced meshes, cannot do it in blueprint. Thank you for the try tho!
ISM's always facing camera?
Impostor foliages, maybe
Hi, I would like to make a black hole trap in a 3rd person game.
I used AddForce for the pulling effect which works, but it works way better when the pawn is in the air, and not so much when standing.
Is that because of friction? Can someone point me to a direction?
Thank you for the help. Sadly this works a bit differently from what I'm looking for, as the built in function 'copies' the camera's rotation, while what I'd need is a material that faces the player camera's current world position. If the camera rotates but doesn't move/change worldlocation, the material shouldn't rotate either. Been stuck on this one for a while ><
How many are we talking about?
since you *need * it in the material
I assuming thats the reason
[context needed]
Foliage leaves (2d planes) turning towards the player, but instead of using the camera's rotation, looking towards a world position (=player camera's current position)
Just what I thought. Built in Octahedral Impostor does exactly that, you might want to check out the materials and see how it's done on World Position Offset.
Context: tons of these already placed in an openworld map, just needs the rotation from the material
You can get camera position in material, and use that to determine the rotation of the vertices
I need to look into this, as I didn't have to deal with this yet. May I PM you for details in case I'm stuck? Thank you for the directions.
Ty for the reply. Sadly it aligns the material to the camera's rotation, while I'd want it to face the camera's worldposition. (If you have the player camera pointed exactly downwards towards the ground and rotate it, the mesh material should not rotate, as the camera's location doesn't change)
Hey guys, sorry to bother but is there a way for a smooth third person camera to a sidescroller one? not just activate i would love it with a blend and also it messes up if i activate the sidecam because it always rotates with the boom before its even activated.
if i set up a blueprint by some sort of mechanism through another blueprint, and it then has new components. can i save that now to the blueprint itself, so it is not scenerelated ?
I can't find the Rotator to Quaternion conversion function in bp
anyone knows how it's called?
No, I disabled DMs because nobody reads About Me section.
why is it asking me one then
🥲
yeah I just found it
also I see that you can convert a direction vector to a quat
but not a rotator
this is some really weird stuff going on
why? :0 I actually like them
yeah true
Wait until you encounter the dreaded gimbal lock issue
huh what's that?
btw I'm trying to rotate a box extent but it seems that just rotating it as a vector is a pretty bad idea
found it
oof looks serious
if i hit "apply instance changes to blueprint", it deletes everything, i worked out in constructing that actor...
Are there any bug with splines where fetching the last point somehow is bugged?
Whenever i get the distance at point + 1 (which i've assured is 3, with a spline length of 4), throws me array access violation
Nvm, it's just me being dumb
Added a point to the spline while not updating the spline
Hi all, do you know how to constrain the HMD position? I’m piloting a drone but when I put on the VR the FOV is translated along the drone z axis (so I can see the drone by looking down)
Hello everyone, could someone explain to me how to use the SaveGame flag present on the variables? All information I found on this topic are really old. I want to save a variable on actors presents in the level.
I already have a save system on structs for the player using the save/load to slots, and I want to save some variables on actors already present in the world
what's the easiest way to get a blueprint to have a compilation warning?
while loop with a condition that will never be true ?
sorry, never false
or true... it's been so long since I've used a while loop I don't even know anymore 
Apparently that's just fine as far as UE is concerned 😄
yeah, but that's a runtime check, right? I'm looking for compile time
ah yeah
looping a node's execution into itself causes a compile error
So will using a create or spawn node without selecting a class
Did you want a warning or an error tho?
same for using deprecated variables in blueprints right?
or is that also during runtime?
Never tried that
perfect, thanks
SaveGame flag will mark it to be serialized iirc
How do I use this?
Is this saved along the save to slot? Then how do I load it?
Well, if you just wanna save and load you don't even need to flag that
That's mostly a flag for C++ from what i've seen
Ok thank you for the answer. I'll use a custom save system then!
i'm getting an infinite loop detected error, anything i'm doing wrong?
Seems like it checks against the flag in FArchive::Serialize()
I never used this, but I guess this is not what I am looking for
Yeah, it's for data compression, doubt you looking into that :p
I think they should change the name of this flag then haha, this is misleading. Thanks again
You can use a timer too in case since you have a delay
Store the handle and make it loop then check every loop for the condition
👍
anyone have any idea why this isn't working? The variable is being activated but whenever I press the spacebar nothing happens
because thats something so simple I didn't feel the need to include it but here you go
yep I get the print string i'll try put it in different places
initially I thought it may be because I restricted my characters movement along the x axis but changed that and it still does nothing
and the string only goes off when the variable is true so idk why it isn't working tbh
Hey everyone, i’ve been struggling for a full week on this problem and I’m wondering if anyone could help me.
I’m working on a turned based rpg and i would like to draw some splines to show who is targeting who similar to ff12 (see picture).
I’ve been able to set up a print string that confirms that when i hover the target in the menu, it displays the correct enemy name.
Any advice? 🤞🙏😂
Where would i code the spline? In my character blueprint? Combat component? Target widget etc… and what would that code look like? I have a unitbase-> party unit base & enemy unit base as child
Two methods come to mind: 1) Particle system with a ribbon effect 2) Spline mesh
Then my characters/enemies are children of those
A spline mesh should be reasonably simple way to do it I think - it might be easiest to have a separate "target indicator" actor or such, which you spawn when needed
Oh… never heard of the ribbon effect… which would be better between the 2?
No idea which would be better tbh :)
Haha
It's not hard to implement this, so if you later decide you want to try the other method it shouldn't be an issue
I thought of just and arrow above the target’s head but… not my vision lol but it could work for now
And if i’m to use the spline method… i code in my character?
Then i try to find the target to make my spline end on the target?
You could have it in the character or create a separate actor for it
I feel like i’ve tried this 20 times this week hahahaha 🤦♂️
Aw just a new Spline actor
Both methods would work so it's mostly a question of which you find easier to use
BP_targeting spline for example and code there?
For example yeah
Hummm interesting, and as for the particule ribbon technique… any help on that to give me an alternative if i keep struggling hahahah
Thank you very much by the way.
I think if you google for "ue4 particle ribbon" you'll find some info on how that is used
Will do perfect thanks 🙂
What about the material with world position offset?
Then all you need is a 'pole' between char and ai
interesting idea, that would probably also be doable
might be a bit more complex in terms of the maths since you'd have to do all of it in the material
how do you change the viewport in perspective to be top down but still remain in perspective
ideally - centered over an object (i'm trying to use an image as a reference, not sure if theres a beter way)
move the camera high enough
press f to focus object
pan camera down to the ground
zoom out
the problem is the viewing angle
well there's a remedy for that
Hello, does anyone how can I replicate this? I'm new to blueprints and I know it uses raycast and forces but I'm still lost aha. any help would be wonderful. this is the link: https://www.youtube.com/watch?v=RjUTtGTk8Js&list=PLtRCuWjjYCfBmPBT7ja1tq7IExd7dbJjZ&index=4&ab_channel=KlasKroon
Tried to figure out how to do something like this in Unreal, have done something similar in Unity before.
The idea is to have a simple rigid body, like a box, and then do raycasts where the wheels are. Then add force depending on the length of the raycast. So they act kinda like springs. I toggle on the debug mode sometimes, so you can see a bit...
Can anyone spot what is wrong with my BPs? Currently it thinks the player is not hiding (is hiding == false) and I don't understand because their Y location is less than 1 ( they are hiding if it is less than 1) (red circle for Y location printout).
can you save the game in the construction script?
how do you pan it perfectly to the ground without overshooting?
gimbal lock should prevent overshooting?
nvm i just realised you can change the wireframe mode to lit
doh!
thanks anyway 😄
Where is your "hidden" function being called?
Its being called from just a collision box kinda behind the backdrop
Where in your code is it being called?
Your screenshot shows an overlap event, but there's nothing calling "Hidden".
I would not
That's just checking the boolean "IsHiding". Something needs to be calling this code in order for it to activate.
oooh
so like on the event ticker on my character?
Thank you for your help, I'm very very new 🙂
Im probably underselling it massively, but wouldnt it mostly be some fadein/fadeout with a heightoffset value in xy direction of the mesh ... 😅
maybe but that's a lot more complex than placing a spline lol
Well spline with start, end, tangents
I suppose you'd only need X and Z tangents.. scratch that
can you skip an index in a for each loop?
Sure
Which one
You can do custom forloops aswell
Doing say every other index f.ex
For i := 1 to 15 by 2 do ....
😃
If you wanna just dodge specific index(es) you can do branch
Every other would just be branched on (index % 2 = 0 or 1)
Depending on if you want the odd or even numbers
Hy. Why box and sphere trace for object ignore landscape?
Trace channel on the landscape collision is pry ignoring visual traces
for absolutly all type of traceses?
Why linetrace for object work with landscape?
big list of them. why would "get owning pawn" not work when run on a widget component of that pawn... or is there a better way to reference the pawn that owns the widget component
From a widget, you do not have the means of accessing an actor that has the widget component that the widget is in.
"Get Owning Player Pawn" gets the player controller that owns the widget and attempts to get their possessed pawn.
Now, your player controller may be possessing a pawn, but not necessarily the "BP_Piece" pawn, so your cast could potentially be failing, but you have no check on your bind to ensure that the cast succeeded, so the cast could be returning a null reference and you're still trying to pull data from it, hence the errors you're continually receiving.
i see
so how can I have the overhead healthbar percentage set? will I have to do it inside the pawns bp?
I tried but couldn't seem to access particular variables inside the widget from the pawn either
You could feed in a reference to the pawn that has the widget component into the widget. It's a bit of a mess to do it though... (The "owning pawn" is a variable I created within the widget blueprint)
From there you can do what you need with that pawn inside the widget itself.
oh so this is setting the widgets "owning pawn" variable from inside the pawn blueprint on beginplay?
i see
i'll get back to you if it works lol
I'm trying to have my player range hitbox (swinging a sword) overlap every rock placed/spawned inside the game, right now it only interacts with one rock though, tried various connections but to no avail, does anyone know how to solve this?
this worked, many thanks
Hello i am experiencing a problem these days and i need your solution, https://prnt.sc/_y4YvuQrlI5d
i am trying to play the sound of the media
it works perfectly when we want to show the video
but i dont have sound
inside the media player when i am play a media source i can actually hear the sound
althouth there i cant
am i missing something?
after playing and closing pie
i try to hear again in media player
and i cant hear anything
i have to reload the engine
oh found it
i was actually missing the start node from media sound
This has got to be simple, but I cannot seem to find a good youtube video or question answering it. I want to connect two Static Mesh actors together when they overlap. I have tried this to no avail... The branch is true and they are overlapping, but it doesn't snap into place. Any help?
Neither are skeleton mesh actors
both have sockets
Does the named socket exist?
i found a solution my problem hell yea
It exists on one of the actors, the parent one
Idk, maybe try removing it from the attach node see if it works. Or try attaching the root components of each actor directly. Shrug
make sure that all actors have overlapping activated in their collision
was struggling cause i forgot to check that the other day
I assume you know they're overlapping becayuse of the debug string?
yes, I have the print string and the branch to confirm they overlap
Hey weird question guys!: is it possible to use a BP actor like a Spline mesh? For example make the BP actor conform, twist, and bend like a regular spline mesh. This would be for a road with configurable options for each segment
I am making a weapon for VR. My problem is that when I release the weapon bolt it stays in place, what nodes should I look at to, not instantly, move the weapon bolt back to its local origin?
Simply put I want to hide this particular pawns health bar when i'm possessing that pawn, this works to hide it but doing the reverse does not work. ie unpossessing does not bring it back. any input is appreciated
i think youre unhiding it an extra time
since the boolean is both ticked and you have a seperate function
oh i see thats a network thing my bad
yeah i should probably post on multiplayer
maybe a toggle node could help
in some cases that can fix those type of problems
but im not sure if thats implementable in this case
How would I slowly move a child mesh locally?
timeline and a vector prolly
Does anyone have any insights in to why a blueprint setup with nested geometry, with a translucent material, does not show up in raytraced reflections? Is raytracing unable to handle semi transparent objects? https://forums.unrealengine.com/t/translucency-not-showing-on-reflections/151711/4
Glass and Mirror materials don’t have any texture within (they are plain pure materials), so i cannot disable mipmaps nor sRGB. Let me know if i’m wrong, I’m still a rookie. Wow, I hope is not a limitation, but as far as you have tried to find a solution and you couldn’t, I’m a bit worried. There’s no way UE4 can be used for archviz without th...
I renamed this event node in the Project Settings, (actually I renamed over 14)
Is there a way I can sync this to be renamed as well? Or a easy way to convert it to my NEW name?
So far deleting this node and placing the new node renamed seems to be the only way to do it, but that takes time. Looking to see if there's a quicker way to do it.
hi, anyone have an example of how to animate a material along a spline mesh
for example, a pipe with water flowing down it
Hey is it possible for a function to have TWO white spline outputs?
Much like the branch?
It would be so nice if I could just remove the Branch node all together.
Sorry if this is the wrong place but, Whenever I delete an asset even if it's not being used in the game world, it takes FOREVER and uses up all of my RAM (64gb) until the computer crashes. Sometimes it successfully deletes most of the time not. My RAM usage while the world is open is usually around 12GB.
Anyone else had this?
Not without making a wrapper for it. You could technically make a macro for it. Pretty small thing to fret over though.
No idea what either of those things are. But you are right, pretty small thing. 🤷♂️ I just was wondering 😂
Wrapper is a terminology of putting things into a container that usually makes them easier to use. Macros are sort of like functions, but slightly different. Allows latent actions and multiple input and output execution pins.
Sounds like it's still connected to something somewhere. You should check your reference viewer to make sure nothing has a pointer stored to the thing you're trying to delete. Usually speeds up the deletion process.
hey can someone help how I need to know how to get to the node that does this but for a widget as I dont need it on the viewport
the node is called set position in viewport
I dont want it on the view port but on the widget in front of the player
By player, do you mean character, or screen?
If it's in world space, it's in a widget component, you move the component and not the widget itself.
well they way it is now is on the viewport, I need it to be on the widget, it follows the target which is a chatracter with a component attachted
its projecting to the world screen
or is there anyway t o make the widget see what the view port see and does?
real quick anyone whats the proper node to find actors within a collision sphere
SphereOverlapActor
does this use a newly "generated" sphere or can it use one thaat is already part of my projectile?
New one. You can just get overlapping actors from your sphere.
gotcha thanks
alright, one more thing, how to get distance from center of the sphere?
also what is the array "object types" input supposed to contain?
If you have your own sphere already, I'd use that, it's a lot cheaper.
let me just explain the use case?
The ObjectTypes on the SphereOverlapActors is what object types to query for.
its a fireball ability that should impact one target but then explode to hit a wider aoe
so i was thinking about having a second collision sphere that represents the aoe and just checks which pawns should be hit by the aoe
Depends on how instant you want it to be. Immediate, I'd probably just use the SphereOverlapActors for convenience. If you're looking at a half second effect of a growing damage sphere, I'd definitely have a preset collider on the projectile.
ok sphereoverlap it is, but still just don't get what object array to put into "object types"
nvm i got it
Collision profiles have an "Object Type"
tyvm
Shouldnt this "loop" between the two platforms, when platform1 finished it call the interface and then platform2 start moving , when it finished it start the platform1 from the beginning . My results are when the platform2 finished , the platform1 starts and keeps loop and doesnt call the interface event .
First off. Why is this an interface function?
Second. Timelines are a VCR player. You've finished the tape and never pressed rewind. Event needs to play from start.
i want to switch between the two platforms, move platform one when finish move platform 2 and goes on.
Yeah, but this is all in one class. The interface isn't necessary. It's a waste of programming time for something that could just as easily be a simple CustomEvent, and requires a second class as an interface to function.
Ok i see
Interfaces are meant to allow multiple wildly different things act the same, or allow one thing to interact with multiple wildly different things.
Custom event is better for this situation ?
A good use of an interface function would be something like a timer. You could pass an object to a widget and the objects could use that interface to return a timer value. And the widget could call this interface function on the simple object it's passed. It allows the widget to access multiple different classes without casting to them all.
Another use is for like an FPS game. Being able to open doors, pick up objects, press keypads, interact with NPCs, all from just pressing F, doing one line trace and calling the interface function on the hit object without casting.
I see
When calling events in the same class, interface functions are entirely useless unless they are already in use by something else that actually requires the interface. Cause you don't need to cast to self's class to access that function.
In my situation what is the best practice to use ?
Just a simple custom event.
this is almost working to deal damage based on how far away someone is but the only issue is its reversed, ie doing more damage to people further
i'm not good at math can anyone tell me what to do to fix it lol
@unborn compass This is not how you calc the distance
Remove the abs and the + node
Recomine the vector pin and call VectorLength on it
Hi everyone, have been trying to setup an ai car and havent been able to figure out how to slow down the car faster when braking, any suggestions?
okay then how to "reverse" it?
What are you getting from the Normalize to range again?
0 to 1?
Or 0 to 35?
1 to 35
Well 1 to 35
Yep you can do what datura posted. Or even calc 36 - result. That will be 35 for 1 and 1 for 35
Daturas is nicer though
just trying it out
The node alone won't work though
You should plug the damage into it
Not the distance
At least for your code
huh?
Nvm just mimic their code
yeah i still need to reverse this though
still doing less to the guy it hits than people around it
I got this Warning. But I can't find any SpawnActor nodes without the class? Every SpawnActor node has the class HardCoded like so.
How can I make the rotations here a var so I can edit them per usage in editor
The Rotation Rate?
Yes
I want to set it different per object in game but as it is now when I change one they all change, how do I break these out so I can input var as needed.
Well... You need a way to differentiate each object. Then you can just set the rotation rate depending on which object it is.
Yea most objects you have to add it before you can modify it's values. NP 👋
Make so much more sense, I kept trying to get it from the add, and was just stuck, like wtf. I'm such a noob. Thanks.
We've all been there XD
I'm coming from Minecraft development in bedrock. I love UE4 so much.
Maybe?
😳
Usually you post your question FIRST. So we know whether we even CAN assist.
Different people know different things. So nobody can actually say they can assist you until they know what the problem is.
Ah, sorry. Force of habit
I'm trying to create a new volume that, once the player hits, takes a life away and teleports them back to a checkpoint
I have a checkpoint blueprint actor in place, I just don't know how to make it work with the new volume. I also need to make a lives system
which... I haven't gotten to yet cause I need to replace the generic KillZ volume
Use this. On overlap, teleport them to whatever checkpoint.
I'm trying to fiddle with it but I think I am doing it wrong
I can't get the components of the checkpoint to be set within the new killzone volume I created
You'll have to elaborate
And they never heard from him again.
Hey guys so I was just designing this event in a child class and copied it into the parent because I want it to be standard but the event doesn't trigger anymore for the child class
it doesn't even run the print statement
bottom pic is the playercontroller that calls the function and the main function is on my parent pawn class
any help appreciated and let me know if you need additional info
So the server isn't actually calling it?
which
Does it work in Standalone, Listen or Client?
it worked on all of them when the top function was in the child class
and i was just messing around with it but SpellCast (server) was "run on server"
Put some strings after the nodes in the top one and see if any of it is firing
That was fast, what was it?
i hadn't deleted the "startspellcast" on the child class
so i guess it was overriding it
Ah gotcha. Well good job.
❤️
I guess i'll just ask this as well in case anyone wants to help. Can't figure out why this might be running twice the "on begin play" should only have one copy of each ability
parent function doesn't add anything to this array
BeginPlay runs both on Server and Client, maybe that is related
also, from your previous message it seems this is Multiplayer, you will get better help on the multiplayer section
can i set this in BP for a niagara particle system? I want to do it in the construction script however I am not sure how to access it
Sorry, I got side-tracked. To put it simply, I don't know how to make my checkpoint blueprint work in tandem with the new volume
like what to code, add, etc.
- You gotta store your checkpoint thats currently in the world SOMEWHERE. Use gamemode or playerpawn. That way in whatever blueprint you are in you can use the get Gamemode or playerpawn, and then you can get your checkpoint from there.
- On actor overlap, get the checkpoint, get the checkpoint's location. Teleport player to that location.
How familiar are you with blueprints? Because maybe you should take a few tutorials on general blueprinting rather than specific blueprinting. That way you learn the general idea and how they work.
Not very familiar with them
so im currently having an issue with my gamemode where i spawn as a spectator but i cant move or look around. im using the spectator pawn that comes with unreal and i cant confirm its being spawned
does the BP_SkySphere not update at runtime without a directional light?
My Game keeps throwing
Error LogFileManager Error deleting file 'C:/Users/leven/OneDrive/Documents/Unreal Projects/CyberCards/Content/Cwybercawds_assets/MENUS/Widgets/ServerMenu.uasset'.
Error LogSavePackage Error saving 'C:/Users/leven/OneDrive/Documents/Unreal Projects/CyberCards/Content/Cwybercawds_assets/MENUS/Widgets/ServerMenu.uasset'
When trying to save anything. I can't give a reason because it doesn't list one
do you happen to have two instances of the editor open?
Hey everyone, I'm currently working on a fire propagation/spreading system for a game of mine. I took inspiration from a certain video I found on YouTube. I followed along with the video making sure I got the coding correct, which I ended up doing. When I proceeded to play my game the fire itself being lit wasn't working upon clicking. Many other people in the comments of that video had the same problem I did even though all of the coding was correct. Many people commented asking how to fix it and the creator of the video gave a very vague answer in the comments. All I'm missing is some level blueprint coding to get it working. I would really appreciate some help with level blueprint coding. I have plenty of extra info to ask and tell if you're up for the challenge. Here is the coding I have on a bush that spreads the fire. Thanks everyone
My God I'm a absolute idiot. Thanks
Looks like you just need to call SpreadFire on the first bush that you want to ignite.
@dawn gazelle This is the current code I have on my level blueprint. I have my fire spread saying its targeting the bush. Not sure what else to add
You cannot leave the input Object on CastToBush empty
a CastTo node will not work in any way if the Object input is left blank
You need to plug an ObjectReference into the Object input
For example, you could do, GetActorOfClass[BushClass] and plug that into the CastTo node
Since you're using the level blueprint, you could even drag the object from the outliner into the level blueprint to get a direct reference to the object and not need to cast at all.
yes, you can even just do that
@trim matrix @dawn gazelle I knew I needed to plug something into the object input. Stupid me, that was too simple. Thanks a lot for the help, I really appreciate it!
So I'm working on a Runtime Transform Gizmo and when translating using the plane method my LinePlaneIntersection is failing. It doesn't do it every time and if I translate very slow or towards the camera it does it, although still in spurts from the failed calculations.
if anyone has a good way to halt projectile movement and have it reactivate later lmk
happens.. and happens often 🤣
maybe try setting custom time dilation
0 doesn't seem to work in multiplayer after light testing, but maybe something low like 0.0001
i have no idea how to use it so i'll have to look up a video
so i have a fireball class, would i call it in the fireballs bp?
how do you want the game to know when the projectile should stop moving?
for instance when player presses a key?
projectiles move a certain distance before they stop (each projectile is different) and then move again when player ends their turn
i think its working though, i have the main one on a delay from "begin play" to a multicast custom event
and you're already keeping track of how far it's traveled?
i was just doing time based right now to see if this worked lol
so a delay of one second
okay, so sounds like it works 🙂
you can also of course keep track of how far it's traveled, and check against the current traveled distance
then if the traveled distance is greater than the allowed distance, change its time dilation.
there's probably better ways, but it's a cheap trick that'll work
yes thank you so much
np!
Just in case you want to change how it works in the future, I'll leave this so you can search for it
Another more 'correct' way is likely storing storing it's current velocity, position, and forward vector
Then setting it's velocity to 0
When you want to then resume movement, you can just set it's velocity, position, and forward vector again with your stored data
i kinda like the effect this gives i'm just wondering if it'll have implications later
cause the way the particle effect freezes is kinda dope
but thank you!
no worries, i don't know if it'll have unwanted side effects in the future. I'd assume not.
but in case they do, then you can at least refer to the above 🙂
roger that, i can't believe i didn't think of setting velocity to 0. that was pretty dumb of me lol
but now i got this cool idea so not a terrible brain fart on my part
great, one of those 'it's a feature, not a bug' moments
Hey, quick question. I'm try to follow along an old blueprint, and I was wondering... If Other Actor and Other Component aren't being called or used at all, do we even need to check if they're valid? Would it even give an error if they weren't valid, if we never call them?
depends on whether your logic is dependent on there being an other actor/other component.
if it doesn't matter, and you don't use them, then you likely don't need to check that they're valid, and treat them as optional params
Hi guys, still really new to blueprints ... if I want to call an event from Level Blueprint that affects a number of objects/blueprints in the game, how should I do that?
it depends a bit. Are the actors you're referencing explicitly placed in the level already? Otherwise, do you want to be able to get all actors under a specific condition?
if it's the first one, you can get a reference in your Level Blueprint to a specific instance of an actor
@solar sequoia yeah, they're placed in the levels ... ok that would be ideal. I know there's this whole thing about Blueprint interfaces and such but that approach seems more to-the-point since this is hard-coded cinematic stuff
a blueprint interface may not be what you think it is in this context
but yeah, all you do is click on an actor in the level view, and then you can right click in the Level BP to create a reference to that object
np