#blueprint
1 messages · Page 42 of 1
try it with an up vector instead?
Maybe the ground is blocking
also try 99999999
thanks, up vector is works
yeah so it may be something to do with the forward motion/ground. If they're on the ground and they launchforward the ground probably stops them; so you'll have to try something else depending on what you actually want
Hey! I want to show game over widget and mouse cursor and pause game when "game over". Everything works but the show mouse cursor can't use get player controller.
Building in the Third person starter level. I've tried with the player controller that comes with the third person starter level and now I have created my own player controller and added that in the project settings. But I can't get it to work.
What's going on?
I think you might be using the wrong "Get Player Controller" function. I see multiple functions of that name. The one you have seems to be under the "Player State" category. I think you might want the one under the "Game" category instead.
Oh
I'll check!
It worked!
So it just defaults to the player state category
Got it
THanks a bunch!
Hey folks I have a question
How do you do loot rarity?
I can grab a 1-100 number and assign that to a rarity type, then grab a random entry from the associated array, but I kind of want a way of nudging the percentages towards certain classes or types of items rather than "spawn 1 random rare, all rares are equal in this array" but am having trouble on how to express that mathmatically, any ideas?
could do further nesting I guess
feels like there's lots of ways to skin this cat
depends on what you mean by nudging towards certain classes, etc, there's a lot to unpack in your statement
Lets break it down
I drop 5 items of the same rarity
but the dude has a perk that gives him a 10% better chance of finding specific ammo lets say
I'm thinking I have a array of options, some of which are ammo, or I could separate it into a just an ammo array, but would want to nudge the results towards the intended drop
can I somehow let player know that it has clicked something? approach from the first screenshot doesnt inform player. approach from the second screenshot works exactly like I want but but it ignores widgets that may be between cursor and 3D object
Don’t use the bind, use the override
But you need to do something else for widgets, that one’s for actors
uh... how? (and this doesnt solve my problem I guess)
You haven’t really defined your problem. What is it that you want the player to click on and what is supposed to happen?
Is it a widget or is it an actor
3d space and 2d space is entirely separated thing
if you want to handle clicking a widget
do it from the widget
actor
But you have widgets interfering with input ?
You can try to use set input to game mode only if you don’t need to click any widgets
so
what I want: player clicks something, this something notifies player that it has been clicked, player performs some action. if theres a widget between UI and 3D object I want to NOT notify player about this click and do action with widget instead. "bind event to on clicked" doesnt ignore UI but it doesnt notify player. "hit result ..." is casted from player class but it also ignores UI layer between cursor and object
I think I know what you need hang on
k
Game input and UI input are entirely separated
although there is an execution order
this is what I had to use
if there is something that returns FReply::Handled in the UI input, the game input wont be processed
I know
but I say
first approach works fine, I just want to let player know that it has clicked something
That’s in the widget
As for the actor you’ll need to use its own event onClicked
if theres a widget between UI and 3D object I want to NOT notify player about this click and do action with widget instead
exactly this, you make your widget hittestable, then handle the mouse down event, then the game input wont be processed.
Yeah, you still need one event in the widget and one in the actor
what do you mean by hittestable?
set Visibility to Visible
Hey guys I'm looking for high level advice on how you would organize your code to solve this problem.
So I've got procedural mesh dismemberment in my game, and am looking to optimize how meshes are dismembered in an explosion because by default way to much dismemberment is going on at once and there is serious hitching:
https://www.youtube.com/watch?v=QwfGhA23pyE
What I'm now trying to decide is, WHERE should I put this code that manages optimization? I'm thinking I'd create an orchestrator that each unit sends the dismemberment request to, and that orchestrator would then do the optimization? Just cant figure out how I'd aggregate dismemberment so that it could be handled optimally (spread out across ticks), any code solution I come up with feels ugly.
I'm curious how games typically find a scalable solution for this. I'm wondering if maybe each unit should receive data from a global class on the state of the games performance (active physics items, FPS, etc.) and then decide itself how to dismember itself (less cuts, no cut just destroy, etc.), or if the orchestrator should take the input, then perform optimized cuts itself based on its available data.
Basically I cant figure out a design pattern here that doesn't feel cluttered and convoluted once I write it out in blueprints. What is the typical design pattern for keeping any kind of visual effect optimized as it scales?
And if theres a better thread for this, anything really about optimization/good code design, lemme know and I'll take it there.
If you slow it down you may notice a slight hitch as they're dismembered by the air drop.
already visible
The length is always 0, am i adding wrong?
For Each Loop, by its default behavior, makes a copy of each iteration, you want to make a version that gets by reference. You can duplicate the whole macro to your own library and change it from there.
The reason of this is when you use by ref, the changes actually propagates the changes back to the array, which a by copy doesnt.
Hello everyone,
does anyone know if there is a way to categorize all the variables inside a custom struct into categories or groups? or some way to organize all the variables ?
not in a bp struct, you can do that in a cpp struct however.
the other option is to group them into further sub-structs if you really need them to be grouped.
I wish, nope.
That works, thank you!
ading a struct as a variable inside the original struct? I thought about that but that would make very complex to acces the data on the sub struct, isn't it?
yes it would make it more complex, if you are comfortable, i will suggest doing structs in c++, there is a whole lot more granular control
I'd love to get into c++ , but I suck. will investigate about it tho.. any recommended tutorial or information about how to manage structs in c++ that you know?
Hello when i m in my simple lobby system i noticed something wrong . i have an input key "enter" for opening the chat . and some other buttons ( play...quit...) if i click on the play button and then i press "enter" on my keyboard the chat is not opening but instead it looks like the "enter" key is reactivating the button i pressed again . if i click outside the button and then press "enter" then the chat opens up again . how do i fix this ?
if you dont need keyboard UI navigation, you can turn off bIsFocusable on the button, so it doesnt set focus on it when you mouse click on it
i mostly learn by referencing the already implemented engine code, so i dont have much video recommendation, however unreal 5 has this thing now where it can preview a c++ header from a blueprint asset. though it may not be very accurate, but it can atleast help to visualize how a blueprint should convert to c++
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(DisplayName="Level", MakeStructureDefaultValue="0.000000")) // Instead of this.
double Level;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(Category="SomeCategory")) // This would be just fine.
double Level;
tried this right now
and it works! thank you very much!
My character fires when I want to shoot to the left while looking right, but when the shot is finished, she turns to the right and stays even though I shot to the left last.When I enter 0 in the value below, it automatically turns 180.
awesome thanks.
Hmm I want to help you with this but don't follow. When you finish firing, your character turns the other direction?
If I'm standing to the right and I want to shoot to the left, after the shot is finished, it turns that way because I was standing to the right last.
Instead of saying "it", could you clearly define whether its the player or bullet that you are describing?
So your player is facing right. You want the player to shoot to the left.
You click "shoot left", and your player turns to the left to shoot. You now want your player to continue looking to the left, but after the "shoot" action the player reverts to facing right?
Are you able to share your player blueprint, and especially the what the code is for the player shooting?
okey
I've mostly just been learning through blueprint programming, but I'd like to learn more about how to make fancytext markups for that piece of interface. All the tutorials I find just do the same two markups that either change font related stuff, or add an in-line image. Is there a better place to learn how I might do something that runs and gets the result of a function to replace text or change text color based on a value outside of a table? I haven't had much c++ education so what I might need to learn is how to write those classes and get them to do what I want mostly in blueprints.
Probably some conflict with the way your character is facing and your view; after shooting, tell your character rotation to face the view rotation
A non technical question: What do you guys do with functionality you decide to cut? Do you just delete it and forget about it? Or do you mark it as legacy and leave it lying around in case you want to reimplement it in the future?
Or is there maybe some kind of functionality in UE to mark a BP as deprecated to ensure it doesn't get packaged?
I have an "X" folder I drag it into, I've never reused an entire gameplay function that I've cut out but often I'll remember I solved some kind of small blueprint/material problem within that code and am happy I've saved it to go back and grab that bit of code
Right that is a nice solution. I was hesitant to delete a large chunk of code just in case I need it in the future, but didn't want to keep it around necessarily in case it bloats the project. I will do this 😄
Was it ever explain why GetSeamlessTravelActorList isn't blueprint accessable?
lots of stuff isn't blueprint accessible. if you're using only blueprints then you only have access to like, 40% of the engine
Now that's a generous number :P
trying to soften the blow
but this specific bit I'm sure has been requested quite a few times. It seems only a matter of someone submitting a commit for it, figure that has occured and it must have gotten reject, but why?
And if no one has made the commit, then that too is surprising
For anybody interested, this was mi solution, it's not elegant by any mean, but it's work and i was incapable of finding the problem 😅
c++ was to complex for me, I went with the sub-structs route, it works fine for what I need.. thanks.
This definitely is in C++ territory, and I can tell you there's definitely not a lot of information about how to go about doing something like this.
The closest thing you'll find is using this Temaran Rich Text plugin, which allows you to insert a widget into a rich text field which could then call functions for you and you can look at its C++ to try and figure out how they did certain things, and duplicate it yourself. Note that this plugin is only for 4.27 or 4.26 and it doesn't work on 5.0+ and would require some retooling to get it to compile right.
https://www.unrealengine.com/marketplace/en-US/product/temaran-widgets
Is there a good way to time a function call in a BP?
Thanks, I will look into that.
I’m not sure what you mean at all, would SetTimerByFunctionName work?
Do you mean latent function?
That take time to complete, like a delay node?
Are you trying to make one of those?
Bp functions cannot do that. You would need to use a macro.
Talking about profiling?
Please be specific.
Could you maybe share the use case you are going for? Generally speaking we call functions exactly when we need them, and otherwise we use delay nodes to alter that in a certain way
I just want to know how long it takes a certain function to run, but I don't care about profiling everything, just this one function.
In normal code I'd just get timestamps before and after, but bps don't do that apparently
In UI, if i wanted a blend between orange and blue based on the value of the progress bar (orange being low, blue being high) how could that be done? I know in blender its called color ramps. Not like only 2 options but a genuine blend between them based on the value.
suggestion: maybe apply the force that causes the dismemberment to one actor at a time per tic to spread it out over several tics then apply the impulse from the explosion once all actors are handled
BPs have a GetAccurateRealTime node but this is a very incorrect name because it said my function ended before it started...
I'm not at all experienced with UE's profiling tools, but is there no way you can dive far enough into the profiler to ultimately find for how many ms the game thread was blocked due to the function being fired?
Yeah just didnt know what the class organization should look like, just going to aggregate all the logic in one orchestrator and see how it goes
And yeah even at just 60fps spreading the dismemberment across 5 ticks looks good and is unnoticable
You can set the progress bars image to a gradient texture.
In its style
guys i have a car that explodes, the last thing that i want to add is a little animation of the car that moves when explodes, so how can i make it like jump?
tbh I'm not sure doing full shattermesh stuff on actors is a good plan but it is cool to be able to reassmeble the dead bodies I guess XD
I kinda want the entire bar to be 1 colour just changing towards the gradience depending on percentage
Either animate it in blender (or a similar program Maya/3DSMax), or you can use a timeline to adjust the rotation/location of the vehicle when it explodes
do i need to create an animation blueprint?
Works without issue, what are you seeing as the concern?
Not if you use a timeline. You will have to when you make the animation externally
Its procedural mesh slicing specifically, no idea if shattermesh is a specific thing
can i create something in ue5?
Yep, you can create the timeline inside of your blueprint
Oh that’s easy then, just lerp node to find the midpoint you want of the two colors.
just performance later when the map is litered with tons of actor chunks
okay thanks
Putting in tons of effort into culling and optimization, yeah wont be realistic to keep it all around. Currently I stop physics on parts once they hit a velocity of zero, they've got a 5 second max lifespan before they start fading away, etc. etc.
Well a lerp node will be fine for linearly transitioning between two colors, if you want more then two colors, and possible non linear transitions, you can create a color curve asset and drive your progress bars color from that.
In each case, you are setting your progress bars colors using blueprint script.
Het Guys im trying to do a Blend AimOffsett pose where the upper body only moves
what am i doibng wrong ?
Not asking in #animation 🙃
<)
How would i rotate the character with the X Axis from the mouse ?
now im only rotating the camera with the mouse
i want the player to rotate with the mouse X
now the camera rotates aroudn the target i want the target to trotate with the x
how can I make the player controller use a different camera than the one attached to them?
my zombie is not taking damage, what could be the problem?
GetPlatformTimeSeconds?
Pretty sure I asked this previously but I think I got distracted or whatever. I can't find where I asked it. But...
If I have player characters and NPC characters.
Should I make them both derive from the same base class or separate them. Just have them both derive from the built in character class?
If the NPC and Player have similar traits/functions, make a Base class, and the Children contain the Unique parts
That's what I was thinking and been doing. Just wasn't sure if I was making it more complicated for myself.
I'm now trying to figure out if it's best to move all input and other functionality to the controller instead of the player character class.
Hey guys, quick question
What is the best way to take a enum, subtract 1 from the selected and display that to a text. I highlighted the nodes I'm trying to make work but after I subtract, I get a numeral value instead of the enum info
for the sake of not cross-posting, im gonna just leave this msg link here #ue5-general message
After subtract , do Byte to<YOURENUMHERE>
But.... what if enum is 0 ? do you want tit to go to the last enum?
I know I know, Array inputs need to have something wired in. No empty array inputs allowed, right? Except...
Why then is it legal to leave Actors To Ignore without any input?
...because not wanting to ignore any actors is a pretty normal thing to want in this context?
whereas leaving Object Types empty means you would get nothing
I prefer this method
Or everythign
But the point is, how do you do that? How do you make an array input optional?
c++
Sigh.
c++ can do anything
you're using 1% of unreal's power
Look I just haven't reinstalled VS since getting a new computer and the longer I go without doing that, the less I want to
On a friday afternoon when I'm allllmost done a big change that I know I won't have time to work on next week? Naaah
That was exactly what I needed! Thanks!
Is there seriously no way to get the actual radius from a radial damage event? Or is it nested inside one of these structs?
When i'm spawning an actorbp into the world. when is it's begin play executed? after it's actually spawned?
What actually happens when an Actor is loaded or spawned, and eventually dies.
Origin should be the source location of the damage I'd imagine. Radius then would be the distance from the origin to the location of the current actor.
Unless you mean the radius supplied to the apply radial damage event?
Exactly. The goal is to determine the break size of glass
What can I do about unreal just freezing everytime I try to debug blueprints?
Depends on a lot of stuff
Is your PC strong enough?
Does this happen in every blueprint?
Does this happen in every project?
Does this happen on every UE version?
Have you tried verifying your Engine installation yet?
- I have a 13900k, 4070, 64gb ram
- Yes every blueprint that I have tried to debug.
- I am only working with one project right now so I haven't tested others.
- I am only using 5.2.1 right now.
- No
why doesn't adding the controller input work here?
i have confirmed that the axis values are correct
i'll do it in the player character, but im just curioz
There's a setting on pawns if you haven't touched them:
Otherwise what you have should feed it in.
well you see, it works fine if i do it on the input axis
but doesnt on tick
on the standard input axis
not the enhanced ones or whatever
Do you have tick enabled on your player controller?
https://i.gyazo.com/7fcfd7e5fc1f22dd572feca7a90072f7.mp4 has anyone had this issue ? radial slider thickness scales with the screen , happens in game too , and happens even on default settings regardless of canvas set up as far as i can tell. UE5.2.1
pls ask in #umg
Hm not sure. Would need to see what happens on CPP side
its particularly weird because
Strange indeed
what's worth noting is that im using an older engine version so u might not get the same results if you tried to reproduce it
I'm working on a platformer with elaborate character movement, which requires stat values and other settings to be applied to the character during different states, likely via some kind of stat/setting module.
I'm trying to decide how to go about this sort of state system though. I've heard the StateTree system is meant to be fairly general-purpose, but would it be good for this kind of thing? Perhaps an entirely original character state component? Or perhaps using UGameplayEffects to create a sort of "stance" system?
I'm just kinda not sure what the most "Unreal" way to handle this is.
like crouch/sprint/run/walk or waht?
also single or multi player?
Multiplayer. Basically things such as like run, slide, roll, sprint, drift, all making use of the CMC's walking mode, but with different values. (I've heavily modified the CMC's math since math is my thing, I'm just not used to Unreal or the Unreal way to do things.)
How would I get an index from an Input Action?
I wanna target them for remapping
#cpp then? Can't really expand cmc without it, especially in multiplayer where you have to switch flags
To enter new custom state , there is already helper function for it
I've already expanded the CMC, this is more about general gameplay state handling for characters.
Hm... I may have over-complicated the question. I'm basically just looking for a good infinite state machine.
Probably GAS I'd guess
Is it possible to make a BP as a kind of abstract base class that has a primitive collision shape as the root component, but doesn't specifiy which shape? Then all child blueprints that inherit from this must specify what kind of primitive component it wants as the root comp?
There is a plugin for finite state machine. I assumed you mean finite anyway
Finite state machine for bp
I have a class that Inherits from UObject, and has a couple params defined in C++.
I have it marked as Blueprintable, and Blueprint type, but I'm unable to use the "Construct Object From Class" node to create any of the blueprint's ive made, the entry simply doesn't exist. Am I approaching this incorrectly?
EquipmentDefinition is the C++ class, and I have a couple BP child classes.
So it showed up except the bp child class?
Infinite in the sense that states are containers of behaviour that can be easily added on the fly if I need; I don't want to have to edit enums or the like to add new behaviour.
The GAS does sound like a good idea for the stat values at least. I'll do some more thinking.
Yea, the parent class EquipmentDefinition is visible, but the BP's based on it aren't.
GAS is 100% worth the investment
Maybe you cant, i dont know. I do construct objects too but of the cpp class, never attempted to construct from a bp class. Maybe ask #cpp for validation
What does your UCLASS specifier look like for your C++ object class?
I got it fixed, just had to move it out of my developer folder.
Ah ok good stuff.
I think that means that its gotten too late and im supposed to be done haha
In BeginPlay of my Game Mode I spawn an actor and save it in a variable Foo.
In another actor's BeginPlay, I get the game mode, cast it to the right type, and read some stuff from Foo. But it says Foo is None.
I was under the impression that the GameMode always has its BeginPlay called before any actors. Is this not guaranteed?
does the world use the right game mode? does the cast fail?
The cast is fine, and it shows that variable in the game mode is None, but I didn't think it could be.
I'll probably just delay it a tick and see if that fixes it.
You can't guarantee when Begin Plays fire.
To correct you could:
- Create an event dispatcher in the game mode.
- Call this event dispatcher when you've spawned and set Foo.
- In the actor attempting to read the game mode for Foo, you can use the Begin Play to still attempt to get Foo, but if Foo is not valid, bind to the event dispatcher in the game mode you created and have it run the same logic you would if Foo was valid.
question for anyone, im working on a dismemberment system and ive run into something thats kinda driving me nuts lol.
im trying to hide the bone on the character skeleton using "HideBoneByName" but when using this method the entire bone transform (location, rotation, scale) is set to 0,0,0. this causes a massive cavity in the mesh since its scaling back to its parents 0,0,0 transform. this makes it very hard to attach any "gibs" to the model.
preferably I want to ONLY scale the bone down and keep the rotation and location the same so spawning a gib is much easier and will take much less manual work. is there any way to do this?
Why wont this swap places code work in multiplayer?
Overlap events can occur on clients and the server, and you likely don't want any of this to be RPC'd or multicasted.
Overlap > Has Authority (Authority) > Set the actor you want to teleport to the desired location.
So you want me to just use teleport and not replicate ir anyway?
If it's a replicated actor, setting the location on the server should suffice to move it and replicate its position to others.
Since the overlap can be detected by the server, you only need to check that the overlap happens on the server to know that it happened and since you know you're running on the server, you can set actor locations and it will replicate properly.
No need for the client to request the server to perform the action. No need for the server to multicast the teleport call.
like this?
No RPCs needed.
Overlap > Has Authority (Authority) > Teleport / Set Actor Location
The extra stuff you have is fine to add to that.
But no RPCs.
Okay the server one seams to be working but ill try it the way you said
Thank you! 🙂 god bless you all jesus loves you all 🙂
I need a hand if anyone has a second, setting up multiplayer and it's driving me crazy
Might want to ask your question in #multiplayer
help me
I have a character and I want to prevent it from moving too close to walls but only if its facing the wall. I added a second capsule collision in front of my character and set the collision presets to InvisibleWall (I also tried a bunch of other presets) but I'm still able to move close to walls. What am I doing wrong here?
Just make your main capsule radius bigger
Movement is handled within the CMC and is tied to the capsule component.
It doesn't care about other things colliding.
If your problem is the hand clip the wall. Consider doing ik and some math to offset
But I still want to be able to back into walls (have my character's back be flat against the wall), if that makes sense. I can't move the main capsule radius forward (afaik)
Why would u move it forward. Either make the wall collision bigger or try what I suggested if clipping is the prob
The issue is that my character can pick up items, but I need to disable the collision of the picked up item when it's attached to the character. But then the object clips through walls. If I keep collision enabled, weird things happen.
You can do what a lot of other games do and use a render layering system where anything held is rendered on top of everything.
No more clipping 😛
Ahh yeah that's neat
Won't have to worry about clipping to walls
I want to look into this approach, though. What do you mean with "doing IK"? (all I know about IK are retargeting skeletons...)
Ik hand, it will pull the arms toward the character. Are u familiar with fps game that involve cqb?
When too close to the wall. Player will have to pull their rifle towards them because it collide with the wall
U basically offset the hand when it's too close to the wall
But if u don't want to deal with that I suggest just doing what datura says
To render the fps arm and any object held on top
neat, but I don't think that'll work with what I had in mind. I'll look into what Datura suggested. Thanks!
How do I manage stacking widgets that are nested menus? I'd like to set up menus that lead to submenus and back without necessarily hard-coding the links between them directly. That would be for what gets hidden/backgrounded and what gets active control. I saw the page for UCommonActivatableWidgetStack and it smells like a thing I'd need for this, and I was assuming I'd have to drop into C++ for it, but I thought I'd check first.
guys i am using the Automotive Bridge Scene but the bridge is a blueprint and i want to use it as a static mesh because it has wrong collisions
Edit the collision then?
Hello guys!
Could somebody please help me with this issue? I've been trying to find a fix for a lot of hours and I can't seem to understand what the issue is (I'm a beginner).
Basically, I've set up a FPS and TPS perspective change, using the V key in my project, and I've also set up a reload animation for my gun using the R key.
I want to make it so that you can't change perspectives (the player is not allowed to press V, or make the V key don't work, somehow) while my reload animation is playing, but let the player change perspectives only after the reload animation is done.
I've posted some images to show what I've tried to do (among other failed iteration), and my blueprint, and I just can't get it to work..
the play montage has a on completed output
make a simple bool isReloading
set it to true before the montage plays
and to false once On Completed fires
does it work making only a third person animation and make it look decent on first person?
either modify the collisions on the parts you consider wrong
or disable collision entirely on all of your bridge
and make your own with collision boxes and stuff
or write a editor utility widget which spawns the blueprint static mesh components as static mesh actors in their correct location
a good exercise on editor tools
thanks guys i'll try it
how would that help with the collisions?
his initial question was how to get rid of the blueprint
if i use a static mesh is better for performance?
It's kinda worse if you split it into actors i think
to optimize it you could use some instanced meshes here and there for example
it's pretty much the same
the blueprint apparently consists of multiple static mesh components
Hi Guys i am having an issue i have not had before it says
but wasn't having it before here is the code
Thank you very much!!
Finally I fixed this issue
It works very well, there is only a small bug, if I spam the V key and R key it allows me to go through the animation and through the perspective change
But a delay would fix this I think
Wish you the best bro
okay thanks
hello i need help
i haven't opened my project for like a month now when i open it it loads then crash i dont know why
can someone help figuring out why is that
i can provide the logs
also i see this in the crash screen
Assertion failed: ReaderPos + Num <= ReaderSize [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Serialization\BufferReader.h] [Line: 52]
anyone on here have tribal knowledge on looping a function while a key is held down?
I set a bool to keep track of the key press but I'm still getting an infinite loop
while loop works in a single frame, so if bRotating? is never set to false, the loop will go infinite.
if the boolean above is already handled somewhere about the state, since this is a tick funciton, you can replace the while loop with a branch, that will perform the function every tick when bRotating? is true
Thank you for the explanation, I feel dumb for trying to use a while loop now...
hi
i want Render CustomDepth Pass default set to True
how can i do it
?
because there is no such option directly in Mesh
Any ideia on why this 'select' node returns 'no data' instead of one of my maps ?
you'd like it to be rendered above everything else?
It's probably per actor setting, not per comp
What's option 0?
Print string to make sure. Watch isn't reliable
ppl need to remember, that the node that the breakpoint stops at, hasnt actually been ran. so the pins are not evaluated yet.
I am creating meshes dynamically on a map and I would like to have this set to true
from niagara
theres no option 0, the 'current deck' int var can only have 1,2 or 3 value
Read what Lasaka said. Also it's weird that you will have something hanging if u are not using it
I jumped inside the function and ran through it entirely, result is always the same, no map
I print it too, the map has no key/values add to it
it works fine if I get the maps I want inside the function instead of pass it trought argmen/param
theres any problem on passing maps this way to a function ?
Theres a way to exclude this first pin, since my 'control variable' int ony can have 1,2,3 values
Ik just no point to have it in the first place
no point in having what
Having option 0 when you never feed it a map
Is it possible to make projectile movement bounces a bit smoother. the bounce that occurs now is very sudden and looks unnatural. I want the bounce to be lerped or something
bounce happens only after you hit something, maybe define unnatural and how you think it should be? lerped? what is lerped?
linear interpolation
right now the bounce just feels super sudden
idk if it's possible or logical to make it more smooth
You can do anything bro
idk if you still call that bounce, but like pre-emptively adjust velocity direction so it would curve away from a collision?
Sounds more like repulsion
can that be intergrated with the build in projectile component
If any1 has any ideia on how to do it this way so I can make it dinamically instead of having to code every single deck and card
the select should select your array, but it's not working ?
i just tried with some logs and a proper index seemed to work just fine
i don't see why yours isn't working correctly
Hey there
I have a player controller with a an action that increases movement speed.
I also have an anchor Actor that follows a given.
How can I make it so the Player bp can modify the movement speed variable on the anchor actor?
I tried using a cast, but it doesn't work. The variable in question is already public
Also, the Anchor is placed into the level
Why wouldn't the bounce be sudden? It happens in one frame by definition.
Show a video clip of a non-sudden projectile bounce
How can I make my character mesh "disappear" when Camera goes inside the capsule? This code doesn't work
For some reason my render target "expires" after around 40~ seconds. This isnt documented anywhere though, why is this so and how could i go about fixing it?
Instead dissapear why not opt with how some game does it. Make it transparent
I think what u want here is to enable camera collision channel
Don't have editor on me but u can set it to probe afaik
I would make the character support dhitter alpha and make it transparent when camera collision collide
How do I stop/pause an animation in blueprints, either I'm missing something or this node simply DOES NOT exist in my version on Unreal.
https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/UserInterface/Animation/PauseAnimation/
Pause Animation
how can i make camera yaw (rotate) by clicking a button?
Show your node? Also are u talking about widget animation? Because that's what you linked and that deffinitly exist
As suspected you are not in widget bp
why this doesnt work
I never tried to pause anim, but you probably should use anim montage
it doesnt rotate the character
Is the node Was Actor Recently Rendered, unreliable?
Its saying its being rendered, and then without me moving the camera its no longer rendered
Look into any unreal template. Fps or tps
How do I even get started with that?
The docs u linked targets user widget, not skeletal mesh
It pause anim of your UI
Not skeletal mesh
Yeah I mean how do I use widget BPs, I don't even know how to create a new one.
Animation blueprint?
Is that it?
Yeah but that's for your U.I not for your skeletal mesh
why this doesnt work lamo
How do I pause or stop an animation in blueprints then? There doesn't seem to be a simple method for it.
Check if you already add input mapping context
ye
For skeletal mesh? Your only option is prob to use anim montage
Regular anim asset maybe not pauseable in blueprint. I don't know
But there is montage paused so you can use that
I'll look into it, thanks.
It's not ue5
Most likely you just miss some steps
I'm on ue5/ue4 and it works fine
what u mean i miss steps
i just wanna rotate the pawn
and i cant
cause stupid fucking new fancy systems
tf
Because u missed some step?
Are u in your player controller? Or character?
Where exactly are u calling this inputs
i dont have player controller
for such a simple thing i dont need a fucking player controller
just lemme rotate the camera
god
Transparent/Invisible is still similar. I cant detect the camera. This is the problem. I cant detect camera entering the capsule
Go to your camera boom or camera and type collision channel or something like that
Deprecated input system
Then work on your checklist
WHY cant i print that string ong
simplest thing
doesnt work
welcome to the ue5
what checklist
Not the engine
collision probe on spring arm is Camera. And Capsule should detect Camera collision on overlap. But it doesnt
,,most advanced game engine in the world" my ass
literally a piece of dogshit which cant work
lmao
ue4 was golden
and here we are
spending whole day to TRY and learn new input system
cuz old one was bad lmao
There is tutorial on youtube for this
I don't have editor to check
Have u add radius for the camera collision?
It should be in the camera detail panel / the spring arm I can't remember
12 is the radius of probe on the spring arm
K I would suggest going to youtube then, I know it's covered
Ok. Thanks. Could you point me to maybe better keywords for search? I have not found anything helpful yet
This seacrh wasnt fruitful
Try youtube. I came across tutorial for this before
i think you need to add a context mapping and activate it in bp
that's what i've done with input
when my actor dies it ofcourse removes the variables it has along with it. the problem i now face is when i want to show the score of my character when its game over (when the actor is destroyed) it doesnt show any points because they got removed aswell. is there a way to store them somehow?
You can use persistence object like game instance
Or your player controller
@frosty heron got it to work
but had to use the old system
cuz the new one wasnt keen on working with me for whatever reason
dont know maybe im locked in on the old workflow
too lazy, and for what i need old system works perfect
simple city builder
nothing fancy lmao
Kay
@twilit jacinth do collision test is ticked?
I guess this is more philosophy than actually doing it.
In a co-op game with no regards to cheating should I bother doing rpc calls? Why not just multicast everything?
Multicast isnt answer to lots of thing
Think about late joiner
Or players outside of relevancy
The rpc not gonna run on them
So if u do multicast and make this char dance
Ppl who join laters not gonna see the char dancing
Multiplayer imo for the most part is syncing states
That's a good point
Like I said though this is mainly for coop
A lot of mp documentation is based around competitive play or dedicated servers
I am more aiming for a quick co-op session
I dont think cheating is something we should worry about as small fry but the question to use multicast or not is not constrained to the subject of cheating imo
Use it where it should i guess?
Many action from client side is predicted. Client would do something, then make server do that something. It will validate and rewind if necessary, then multicast to all machine except the one that send the locally controlled client
i want to add physics/movement to my sword when its on the players back. What should i search for?
I've got the default BP_ThirdPersonCharacter walking onto an overlap trigger volume.
I logged the name of the triggering actor since it was triggering twice.
LogTemp: Warning: Activated via BP_ThirdPersonCharacter_C_0
LogTemp: Warning: Activated via BP_ThirdPersonCharacter_C_1
LogTemp: Warning: Activated via BP_ThirdPersonCharacter_C_0
LogTemp: Warning: Activated via BP_ThirdPersonCharacter_C_1
What exactly is the naming scheme at the end there? Why would one single BP trigger an overlap twice?
Only the capsule collision in the ThirdPersonCharacter is set to trigger overlap events. If I disable that, it doesn't happen at all.
Networking is enabled, if that matters
basically trying to figure out what _C_0 and _C_1 represent object or component wise
You're running multiplayer?
yes
Overlap events can trigger on the server and the client.
gotcha
So you can end up with two triggers from one actor. You can gate it using a Has Authority node - Authority should be on the server, Remote would be clients.
HasAuthority fixed the problem. Thanks!
i was actually coding in C++ but it was an issue related to the default character BP so it was a quick if statement
hey i come from a text programming background, whats the based way to do a (if x< y and x < 1) statement? this is my current setup but its kinda blegh
and node
drag out of one of the compare nodes and search and
theres also or, xor etc
If you come from text programming background you should be familiar with the AND OR , XOR operators
also not
blueprints have so many utility nodes so if you think of some better way to do something, theres usually something for that already
@dawn gazelle @mental trellis thx for your help on the frame-independent timeline issue. I kept struggling with it, thinking I need to get actual world locations to use as the B point of the lerp (which would not work at scale). But really, all I had to do was create another vector var and do V1x + value = V2x & V1z + value = V2z, then lerp between V1 and V2, rather than constantly overriding V1 and trying to add to it until it reached the desired value. Took my slow brain a while to let that sink in, but thank you for steering me in the right direction 🙂
im trying toi drop my weapon but when i run my code to drop it the project crashes
uh what's a breakpoint?
right click on node
click add breakpoint
they are debugging breaks that when the program reaches that execution point it basically "pauses" it from executing.
also, instead of many branches, try a Switch on Name node
Hi everyone, has anyone here come across a really strange bug? This one:
"ColorRT", this bug occurs after some time of running the project in any test format.
I will send the log.
Its on event overlapped
i have a vaulting system and im trying to add a mantling or climbing in case the object was longer then the trace area but im struggling to find out how its real easy but im just missing the starting point
here is my code
download the latest .net framework
also delete DerivedDataCache, Intermediate, Saved
that fixed it for me
im not really sure how to do an NPC queue system where they queue up, right now im using spline points to make them follow the path, how do i assign an NPC to a spline point and have them check if its occupied?
When the reach their destination , add them to the Queue
i think there is a Nearest Point Along Spline node
how do you properly respawn a player?
depends
i tried using the "restart player" node but it didnt anything
you can restart the level or just spawn a new one
but that wont respect the gm
?
i have a func written in my game mode that handles player spawns
A How To Guide for respawning player characters in Unreal Engine 4.
that still doesnt respect the gm player spawning logic
i will try, thanks!
also that tutorial is one of the worst quality i think i ever seen in docs lol
oh wait
that same tutorial has a better version of it but on UE5.3
anyhelp please ?
i can share my screen
What is proper? It will depend on how you want to spawn it. Spawn after every player connect to the game? Spawn right away?
Hard to say when no context is given
Q> I have a question I try to learn a unreal program
so I want to start with a simple game where a character is moving forward and the player can press left and right on the keyboard to move the character
I don't think it's very complicated
but I try a lot of things and my logic is not working I don't know why
if someone can make an example how I can achieve this it would be helpful to look where I am wrong
also this way I cannot increase the movement speeds ? ...
i've said i wanted a way, which would respect the game mode's spawning logic
and this seems to be it
like this prolly
here the bools are turned into floats (True to 1.0, False to 0.0)
or like this
how do i get this ?
you can just plug the bools into the multiply/add i think (the screenshots i've shown were made on a older version of the engine)
here's another way also which some ppl here would get mad about
i try this but it dont works ?
i wondering what i do wrong and i dont know that select float is ? 😅
it's not moving forward as fast as prev?
same as before but if i press the arrow on keybord it dont move left ad right ?
you'd generally want to use an add world offset for this. The problem now is that it would not respect the collisions unless "Sweep" was enabled. However if it is enabled, you'd need to have at least 2 of those nodes for it to work (one for moving forward, the other one for the sides). This is because Sweep will abort changing the position if it can't move the object 100% to the destination (for example, if you had AddWorldOffset(5.0, -1.0, 0.0) and there was a wall in front of the player, it would not move left).
right click on any of the set True nodes you have there and add a breakpoint
then play the game and see if anything happens once you press the arrow key
sorry i dont know what you mean 🫣
Here is a UE4 tutorial about debugging blueprints and using breakpoints. It is a primer for beginners to debugging with blueprints.
See my social profiles here
G+: https://plus.google.com/+JayAnAm
Twitter: https://twitter.com/jayanamgames
Facebook: https://www.facebook.com/jayanamgames
Patreon: https://www.patreon.com/jayanam
Indiegogo: https:/...
guys i don't know if this is the right category but i need help about lightning
how can i make a completely closed room bright?
oh i didn't see that thanks
but to do that either just add lights or mess with the exposure in the post processing vol
you could also make the materials emissive
oh okay thanks
I'm trying to bind some text to a slider for a volume control widget but I don't know how to convert the position of the slider into an integer on a scale of 0-100. Help please?
how to move multiple decal components along a spline?
just like how would you move any other stuff along the spline
Does anyone know how to choose a random vector within a box collision component?
A simple setup to move a static mesh or a character along a loopable spline.
If you found this helpful and have money to spare, consider buying me a coffee
https://www.buymeacoffee.com/nozoochee
Contents:
00:00 Setting up the spline
03:00 Testing
03:30 Add character
06:19 Results
Why do the chapters not work?
#UE
Box axis aligned or no?
@frosty heron just letting u know i found the way i wanted to make my bp from the start. For whatever reason ue5 doesnt let u change any vector / rotation before init of any movement. So we cant use rotation to init a movement without the new input system.
Not sure what you mean, but using a random point in bounding box and just plugging in my components worked for me
No idea wat you mean but it doesn't sound right
Hey guys, does anyone know how to apply both physics and complex collision to a Procedural Mesh?
If I turn on “Use Complex as Simple Collision", I get the warning message:
PIE: Warning: Trying to simulate physics on ''/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.BooleanTest02_C_UAID_D8BBC14D48275DBD01_1214001113.ProceduralMesh'' but it has ComplexAsSimple collision.
Can anyone recommend a good video/series for beginner and intermediate blueprint?
this node is setting 2 variables at once, what even is this thing? and how can I break them apart?
It's setting only the Animation State
not before i broke the pin
the target input there specifies what do you want to have the Animation State set on
the data type changed, need to reset that variable
is there any difference in these two pictures?
will they both set this respective data the same?
in the 1st one
See how in that first one there are 2 variables that have the potential to be set within one node?
what if I just had 2 different set nodes? would that be any different?
.
If you had actor A and actor B, you use that target to specify on which one do you want to set the var
So set animation state with target A, would set it only on A
This means you're setting Animation State in this actor to the value of Animation State in this actor. (Effectively doing nothing)
If this was not giving you an error, this would be setting the animation state variable in the character ref to the value in the animation state variable in this actor.
You can get these kinds of set nodes if you drag off from a reference and call to set a variable from that reference. The "Target" is telling you that the variable is going to be set in the target reference you feed into the target pin.
draggin off to set does not reveal a target pin.
is there a specific way to add a target pin to this?
That makes you set the variable for the self. To set it for some other object than the self, you'd have to first obtain a valid reference to it and then as it do the set.
#blueprint message this image has a target pin, this pin originally was being fed a target that was literally the exact same reference as the blueprint itself, so why would it need to specify a specific target if target is just always self
You need a blue reference variable to drag off of, and it must be of the right type and actually be a variable that exists within the target (eg. using a "Character" reference may not give you an "Animation State" variable as it could be a custom variable you added to your "BP_MyCharacter" blueprint).
If you hover over the "Target" pin on this node, it'll tell you the reference type it's expecting.
It wouldn't need to, but it can
that target isn't always self btw
it just defaults to self if you have nothing connected to it
reference type is expecting BP ThirdPersonCharacter but it has been changed to an AI character.
when I order the AI to equip weapon, I the player equip the weapon, this is because the AI is just a duplicate of the player so all player ref's are still there.
I started going in and converting all player character references to the AI character references
then I got to that set node with two inputs and it is expecting a character pin, so I drag character pin into the set but it rejects it because the reference object has been converted to AI
its looking for the third person BP object ref unaware that the reference no longer is for the tird person char, but it didnt sem to update when I changed the data type
unfortunetely not really sure how to go about doing this.
but you can see those two variables in the event graph, so who ever in this chain of comments said I first need an object reference to pass into the pin, I already have it
refresh?
refresh nodes/refresh all nodes
cant remember what its called when i dont have the engine open
Ok, so now it's a different type, so you can't feed in a reference to that same set node. If your reference is also an "AI Character" type, then you should be able to drag off from the blue reference, and start typing "Set Animation State" and get the appropriate node.
If your reference isn't an "AI Character" type then you can't use the reference you have if you're trying to change the variable in an "AI Character".
dude way to swoop in like the frekin main character
thats it
of course I could have just used the reference and dragged off the set node, I dont know why I didnt see that as an option
Hey folks, does construct object from class work for you? I get this cryptic error inside a blueprint function library. The object it's constructing compiles fine.
cannot construct objects of type ...
Hi everyone,
I'm trying to load a stream level from a UMG Widget Button Clicked Event.
It does not work.
However, it works 100% fine if I trigger the stream level load from "Input Key", ie pressing B to load.
Does this mean there is some weird limitation with UMG and nodes that control level streaming?
What does your "GameplayEffect" class inherit from?
I wouldn't think it should matter. Are you getting any warnings or errors? Are you sure the button click is triggering?
It inherits from "Actor"
You shouldn't be constructing object if it's an actor. Use spawn actor from class instead.
The Button is definitely triggering.
In my character, The blue nodes are what I use to stream the level
If I press "B", it works 100% fine
In my Widget, I call the same event from my Character BP.
But the level does not load
I do get only the first Print String "Loading ..."
but then never get the "done loading" message
as if it got stuck on the load stream level node (but only if it is called from the UMG button press event)
I can only assume this is some kind of UMG bug
That kind of logic should prly not be inside a widget to begin with
If you want it to load a level, maybe put that functionality in the PC or GM and cast to it from the widget
I did this
I am casting to the PC and calling a func there to do the streaming.
but it does not work
if i call that same func from the PC Itself via ie "Input Key" , it works 100%
That's because you're opening the level first... If you do that it basically stops everything else.
This here will basically stop everything from happening afterwards.
That is indeed true 😄
how did you know this?
Experience.
Anything you want to happen after the level load you need to sort of get ready to do, like saving variables in the game instance, before changing the level and then when things start loading in the new level, read those variables to do the things you want to do when the level is loaded in.
Do Construction Scripts not appear for Blueprints derived from UObjects?
Thank you very much 😄
been trying to solve this for a long time, i just assumed it was a umg bug 🙈
I've got a question! In the content examples given out by epic in the Physics map it shows off being able to pickup objects and move them around, but for some reason they clip through stuff really easily when you have them grabbed. Is there a way to fix this?
Only for AActor. For UObject in blueprints, you would have to make a function to act as its begin play, call it after creating the object.
I see. Thanks
hi, I want to check if the character is in the green circle (marked with red arrow), how can I do this?
only the area marked with the purple arrow works
ok, i fixed it
Hello, have a general question about my pawn controller. Im using set controller rotation to turn left/right, which only works because the Use Controller Yaw in the pawn settings is enabled. My issue is I want to allow the player to freely move the camera around while holding a button, but still be able to rotate left and right. Since the rotation of the pawn is configured by the controller...if the camera moves the character faces. Can I use set actor rotation in some way so its not based on camera?
From what I can tell you cant set actor rotation if its a pawn with a controller
You can code something that changes the useControlRotation runtime
My project crashes whenever I try to spawn a weapon class from player to drop the weapon
any solutions or ways of checking as to what the cause is would be helpful i'm all ears
Breakpoint and see which node give you crash
how does one use break points
I don't have much experience using or messing with debugging
Nothing that reading or even youtubing don't solve
F9 on a node 😆
I mean it's not hard to just say right click and add break point
thanks tho
I don't actually use it my self. Normally just print string. But I know a bit of legwork can fill in what I don't know so, I don't mean to make it difficult just not know what the shortcut is
Never have the need to breakpoint in bp cuz I don't know what can crash the engine. Normally it just give u accessed none which brought you to the node right away
Is it safe to have non A-Z 0-9 and space characters for blueprint variables? E.g. "(Local) Variable1"? I feel like its safer to just write it as "LocalVariable1" but the latter isn't as readible. I even see some people use emojis for their variables
L_HitActor
L_LocalIndex
L_bFound
Etc
Yeah I do something similar to that, but I was wondering if using brackets or other weird characters would cause bugs? Because you wouldn't do that in other programming languages, but I get the impression that blueprint variables have a proper safe variable name under the hood, and what you see is just some alias
yes you can add some other symbols but i reckon to keep it the same convention throughout the project 😅
I would say the ladder is more readable to me as a programmer.
@zealous moth https://m.youtube.com/watch?v=UstLLZbkmOQl
Industry ppl seems to avoid multicast entirely and only use it for specific edge cases (eg. Chat msges)
Nightmare to sync and cooking spaghetti to fix can only get soo far
1:27:24
Is there something like a Data Asset Map in blueprints? I need like a DataTable, but for Data Assets
How can I create a widget for the hit actor? Please @ me with reply 🙂
The create widget node doesn't take an actor as a param, which is why you're not seeing that node
You can right click on the graph if you want to see it
I know but how can I choose who it creates the widget for? 🙂
You can create an array of data assets as a variable, or if you need to edit them like a data table, you can select the ones you want, right click, assets actions - edit with property matrix
Are you talking about a multiplayer situation?
Ya like I want it so when the hit actor gets hit it will create the widget on my screen and there screen nobody elses you know? 🙂
The UI isn't replicated, so you just have to be on the correct client. If this logic is happening on the server, you can do a multicast RPC (and ignore on other clients) or route an event through some component/etc on that actor
@sudden hare I forgot to elaborate, I need it as a file, like this. This is from a plugin (easyballistics) but I dont know how to create my own custom map of data assets. It seems like its C++
Is there a way to get a actor using a material from a array?
Or more simply, is there a way to get a actor that is using that material in the scene?
I see but the problem is how do I make the rpc on the client I want? because its pretty much a power in my game where you look at them and t shoots a sphere and when it hits them you swap places but when I hit them with it I want it to also create a widget on there screen and mine ect! 🙂
I'm not quite sure what you're showing me here, or what exactly you mean by "map of data assets"
Yeah so easiest way might be to multicast (if this happens on server) with the two actors to swap as parameters on that RPC, and then if the local client is one of those (on the RPC) you show the widget
Widget just read replicated data
There are nicer ways but that's the easiesf
Don't multicast unless it's for chat msg where it doesn't matter for late joiners
Multicast is fine for something like this - since it happens in a moment in time and only to players that are connected
For what exactly?
The file is a map. Each row refers to an existing file, and has data associated with the row. So like a map with key (file) and value (data).
I'm thinking of using DataTables since this isn't possible since I can't find anything, but then that means I'll have to have the row name duplicated with the first column (which should be the id).
(I guess that's what I'm trying to do, avoid redundancy by having hardcoded variables. The ID should be a direct reference to another object, kind of like how its done in databases and SQL. I don't want to have a hardcoded string of another object/file)
Im a little confused how will it know what characters to create the widget for? I know widgets have a owning player pin but not sure what to connect that too! 🙂
The owning player
Okay so each "row" has a key of an asset ref, and some data as the value?
Rpc doesn't even make sense since you create the widget locally
You can probably just make a blueprint class that has a variable of type "map", with data asset (or the specific subclass of data asset you need) as the key, and a struct with the data you want as the value
In the example you gave, the key to the map is a PysicalMaterial, and the value is a custom structure. This is not using data assets at all.
You can do "get player pawn 0" to get the local player
If you wanted something like this for data assets. Make the key a data asset, make the value a struct.
Although im not sure why you wouldnt just put the data inside the data asset.
The reason I mention doing an RPC is: if this event happens on the server, and causes two different clients to open a ui (that's how I'm understanding it)
Then it's very easy to just pass those pawns as RPC properties and compare them to the (get player pawn 0) result to see if you should open the UI
Hmm Ill try 🙂
Yeah maybe they mean "a reference to an object" when they say "data asset"
the thing about this is the 3rd player doesnt need to know this events happened since the 3rd player doesnt need to open the ui
it is more ideal to rpc to the owning client from the server to ask it to open up the ui.
Yeah the reason why I suggested that is that IMO it's much easier to do a multicast on a server owned object rather than route them through specific player objects
But you are correct that the best way would be to have a component on each pawn or game state that handles the event
in a small scale, sure. the problem comes when the network gets larger
RPC bandwidth are precious
This is my code
Yeah I don't get the impression this was for an MMO or br lol
you wouldnt want to repeat what blizzard did to D4
they load the entire other character's inventory when they show up in your screen
Yeah I worked on a game that shared the list of guild members with the whole instance including player details lol - not a great time
But I think for a starter learner project the simplest thing makes sense to get it working
@sudden hare Apparently using getPlayerX(0) nodes are bad for multiplayer. See: https://wizardcell.com/unreal/multiplayer-tips-and-tricks/#2-beware-of-getplayerxxx0-static-functions
Nah - I wouldn't worry about that
they are not necessary bad per say, but you should practice proper reference gathering when you do stuff.
the only time that getplayerx is really bad when it comes to local coop
The caveat is you need to be careful if you're running a dedicated server
Or yeah local split screen
But if you're running a standard multiplayer game, it'll return the pawn/controller of the computer that's running it
Bumpin!
An actor does not have a material. Actor components may have a material property. You would need to take your array of actors, check each actor for a specific type of component that has a material property (like a static mesh), then read that material property and compare.
I would NOT recommend using this code exactly, but these are the functions you would need.
GetAllActorsofClass without a selecting a specific actor class is expesnive and cursed.
How can I add to this where the person that gets hit by the actor gets a widget created? on there side?
Get the owning controller of the actor that is hit and run client function on their end
#multiplayer btw
Get Controller
Sorry I forgot to put it in multiplayer and When I drag off the hit actor there is no owning controller
What is other actor type? And what is expected to be hit? You can cast other actor to pawn and get controller from there
You mean like this? and the other actor is suppose to be there person it hits you know? 🙂
Not sure why u have to promote them to variable and make it replicated
U prob want to make the hit check on server only
This will run on both server and client atm
I'm so sorry I'm an idoit I'm so confused lol I'm still learning alot about actor 😓
Multiplayer requires some cpp btw. Especially if u are doing shooting game. Right now if u dont emulate lag u are just creating fake multiplayer because in real game there is no such thing as 0 latency.
U have to know that the client will be ahead of the server in terms of its position if it's going forward while it's hit. The server and client not gonna see the same thing.
I suggest just doing single player or if u really want to make multiplayer it's best to get comfortable with single player framework -> some cpp knowledge -> then maybe turn based mp?
Multiplayer is not easy even for vets imo. I am currently learning and it's the hardest task I have faced. And I haven't even done much mp yet. Been reading for the past 5 months
Doing multiplayer with pure blueprint is not a good prospect. There are things u can only do in cpp land
How could I emulate lag?
Try to edit character movement component to allow your character to sprint, walk on wall etc
That's not possible in bp only
I mean theres kinda ways maybe not to edit the character movement but you can do stuff like that other ways
To emulate lag. Open console. Type net.pktlag number
I can't remember don't have editor on me rn
Not sure with the other ways.
All I can say is doing multiplayer pure bp is not something I would do
Hi ! Quick question on blueprint structures, if i get a member inside an array of structures and then set one of its parameters, is that enough or should I reimplement the structure back in the array using "set array element" ?
And more generally is it bad to have arrays of structures inside arrays of structures ? Or doesn Unreal engine manages that well ?
That's fine as long as it's not a bp you declare in editor
You want to declare struct in cpp because bp struct breaks often
Do you know why this makes it create for everybodys screen?
Set member takes a ref of the struct. It will reflect the changes to the struct
The overlap happend in every single machine.
Use has authority node
So only the server checks
Well that's bad news 🥲
Is there another alternative to structures ?
Alright, thank you for the answer
Alr where would I place it?
Alternative to bp structure is cpp structure
@bold phoenix it's the same thing but the struct is declared in cpp.
Bp struct have problem with serializing afaik
U can do blueprint only for the most part but if there's one reason that you should do cpp, bp struct is the most common cause
Oh okay I read it wrong, i misunderstood reference for copy
Fixed it thank you! 🙂
That's great, better do it now before it breaks. Many others including me learn it the hard way. My item info broke and I spent few days having to input them from scratch 🙃
Quite Funnily, Around 200 Actors from a Get All Actors of Class arent being registered, when i run the game from the main menu
quite a few artifacts too
this is the code for the main menu
code for the widget
this where the get blueprints of class is
Coincidentally
Everything
Works
Properly
If I run the game just by opening the level using the editor and then pressing play
and yes i know that indexes 2 and 3 are empty
Begin play > Delay > Get Actors of class
hi guys
i want the ai to roam around on x axis and when i connect this way it finds also a random point on y ,how can i do to find only x random point?
maybe something like this ?
It looks like it is not getting a random loc. but it became 0 instead
Did you do any log print to check the positions?
no but i saw it in eject
Eject?
pick a random point in a line , if it is on Nave Mesh , use Projected Location for your move to Destination
when you play and want to see what your game looks from other view
Ah
If you just want a random X then maybe keep it simple
Just generate a random float/int then make a Vector3 then plug it into the Destination
Break in what way?
is there any way to hide a sphere cast?
its visible in game
and id like for it to not show in game
What's a sphere cast? But primitive components, such as static mesh components, sphere collision component, has "visible" and "hidden in game" settings you can change.
In many many ways. Unknown struct error and losing class default info is the most common one
Does it seem like the likelyhood of error increases with complexity?
oh sorry i meant sphere trace, i am still changing the jargon in my mind as I used to do Unity
then it's that the trace node has debug checked
But yeah, I also have experience with structs breaking, but it was a very complex one that I kept on changing.
In hindsight, i'd have been better off using an Uobject to be passed around in that specific case.
also when the wolf reaches the player he should play attack animation,and now he is not playing it,and i understand its because of tick event,but how could i make also the AttackPlayer to check and play
Can anyone recommend a video/series for starter and intermediate blueprint? (UE 5) thanks
If you need help with specific nodes , look here first https://www.youtube.com/@MathewWadsteinTutorials/videos
This channel is dedicated to exploring Unreal Engine 4 and the Blueprint programming language that it uses. You can think of it as a companion to the API documentation as I try to cover the how and why for what things are used for when using the Blueprint system.
The master project for these tutorials can be found at https://github.com/MWadste...
is it possible to get what time the notifies are in a montage in actor blueprint?
So there is a node “get current montage” (I am guessing this is what I need use), however, I am trying to calculate how much time has passed in the anim montage. I know there is a ‘get play length’ node that I can grab off of that, however, this just provides me with how long the animation is, not at what second in the animation that it is in. ...
Why no Random Int With Weight? How can I get a biased output without it?
use a curve
How?
what is your goal ?
I'm using a random integer to get a random actor from an array
But I want the number 0 and 1 to be more common then 2
You could make your own little class. Array of structs, {weight, value}. And a total weight. MAke a random number between 0 and total weight and then go through the array, adding the weight part onto a value. When that value exceeds the random number, return the associated value.
for something simple , you could have an array of Indexs
5 "0"s
4 "1"s
and 1 "2"
that gives you 10 options
%50 chance for Actor A
%40 chance for Actor B
%10 chance for Actor C
That's great also
Thanks
Yeah I was gonna suggest that as a quick hack but it'll be less scalable if you need to adjust or add more, obvs
keep simple simple , complex it up if you need
yeah, implement first, premature optimization root of all evil etc
Does anybody know why trying to play sound for a video in a media player might cause the playback of the material to stall altogether?
Blueprint : https://blueprintue.com/blueprint/9y-lsbvw/
Note : It stalls on Set Media Player
When I did this, I made myself a "roll table" data asset base class.
It made setting up new things really simple.
here is a mock up of a curve method, more chance of a lower number
i think, didnt test
Been thinking about a problem for a few days; I have a gravity simulator that needs to apply force to actors, with an actor-component as a middleman, but I want to avoid casting out to do it differently for all three types:
Add Force To All Bodies Below: SkeletalMeshes
Add Force: Primitive Components
Add Force: CharacterMovementComponent
What's the elegant way of doing this? Three different actor-components? An interface?
overloaded? not sure what you mean
Overloaded? Wym
Why do u want to avoid cast?
Ppl want to avoid BP cast because having hard ref will load the object to memory
But you can just cast to cmc or pawn, they are already loaded anyway
but how does this work when casting something that's not a CMC to a CMC?
Casting is just a type check , you shouldn't cast an object that is not a cmc to cmc
I'm a bit lost , what is it you are trying to do? And why do you want to avoid casting
You will use interface when you want to run something on classes that don't share the same base class
I think I was just trying to avoid the overhead of casting without also duplicating a lot for different classes but maybe it's unavoidable
You can cast to base class because they are loaded anyway. For example you will have a pawn in your level anyway. So casting to a pawn is free.
If you care about bp casting overhead which indeed can be memory heavy. You wouldn't do the project in pure bp to begin with.
Casting to cpp class is free and don't share the overhead bp casting does
Yeah this is a function that will ultimately need to become CPP but I wanted to see what I could do in BP first whiel still prototyping
Interface isn't the solution imo
didn't seem like it to me
Most of the time ppl use interface but end up having a hard ref anyway
Which defeat the purpose of avoiding bp overhead
Casting is not the problem, the problem is having a hard ref
another idea I had was using inheritance and just having different classes overload a function
If u gonna add force , just cast away. There must be an actor that own cmc and pawn in your level anyway . So casting here is free
I see; casting only adds a cost if that base class is not already in the game
need to use the "GetForwardVector" node on the head bone of a skeletal mesh.
How can I get an object reference to a specific skeletal bone?
Hello there, i am trying to get surface alignment/climbing up trees and walls and im quite stuck on how to make the player move up the tree/wall. any ideal or Tutorial to point me to for answers?
I recommend to work with soft object references if you care and if your project need optimisation
I have some wall walking right now
Are you using base CMC?
yea i am
"Walking" mode I believe turns off movement in the Z-Plane
good find, will consume
you'll need to figure out how you want to deal with that, I have everything set to flying
but when it hits a "tree" object you'll want to find the normal of the hit and reorient the character to that direction
Maybe attach actor to actor?
For loop 0 to n (random) times
Set element , tick size to fit
Scratch all of above. There is actually resize node
@crystal epoch
I'm trying to make the lights turn off randomly sometimes in 1 min and sometimes in 30secs how could i set this up?
something along the lines of this i guess
Random timer
is thats the name of the node? sorry i just tried to seach it and nothing came up
No you create an event that call timer with random time.
Don't set it to loop and have it call it self again when timer ends
ok with a for loop.
What he asked was size of an array
Not random value inside of an int array
to randomize the size of an array, I lazily slapped a few nodes on screen that might have pointed them in the right direction and said "I guess" for a reason.
if you are talking about resizing the array to a random integer, you can just use the Resize(int32 Size) function that an Array has, give it a random int that you want.
wait you just made me realize i could just input a random float in range into a set timer by function, thank you so much, ive been stuck for hours on something so simple
remember to not make the timer a looping one, and do recall the timer after every callbacks of it, to reroll the timer duration
Make sure to not make it loop.
I will thank you all! sm
Do note that executing set timer before it expire will reset the timer
Some people have it on tick and wounder why their timer never gets called
Good morning,
I'd like to do something with Unreal Engine 5, but I'm not sure if it works in the context I want.
I'm on a multiplayer game with a lobby and everything.
I created a lobby similar to a battle royale like Fortnite or Apex Legends with a "Ready" button
I don't have a server currently, because I want to do Pear To Pear, which means I want to make sure that as soon as people get ready, it adds them to a queue.
Once this queue is full, the system will take all 30 players in the queue and choose the one with the fewest PINGs to host the game.
Once these conditions are met, the game begins.
Is it possible to do this?
usually, the one that creates the session, is the host, i believe..
worked, thanks!
well it worked but didnt when i put a time in the settimerbyfuntion all the lights go out but if i put a random float in range for the time the lights go out at different times
Unreal is based on the client-server model, not "peer to peer". A listen server host is a server that is also playing the game. If the host disconnects, everyone is booted. If you are trying to do actual peer to peer, then you won't be using Unreal's networking system.
You would need some kind of backend service for matchmaking and determining who should be the host, and having some means of communicating to the player that will be the host, and having the host communicate back to the matchmaking system that they've created the session and relay that information back to the players that are meant to be part of that game. This isn't something specifically built into Unreal but absolutely could be done.
Yes, I have already created a complete system where you can create a session and search for a session.
However, I'm really looking to create a button with which everything will come together identical to the current game that exists.
Which means it will literally be a Matchamking system that will do the job all by itself.
It's clearly like Fortnite, but in Pear To Pear.
So the game searches on its own if there are games or queues that are not yet full, and if all queues in the whole world are full, then it creates a new session and waits for it. other players take their turn to fill the queue.
Is this possible without a server?
wait actually think i just found out why, could it be because its going through event tick and giving it multiple times?
Mhm, i see
outside of what Datura pointed out, you really don't want to do a battle royale on listen servers, or peer to peer
that is one game where cheating matters, and your host has full control of messing with other players
If I'm choosen as the host I will download some big file qnd start shooting stationary players
you can use direct connect via ip
not for matchmaking
or they could rather.
they'd have to use something else for people to organise groups in, yes.
And you can only directly connect VIA IP if the players are knowledgable enough to port forward.
I'm going to bed but share Ur bps
Maybe sum1 can take a look
Yup , whos willing to do that these days? I will just uninstall the game right away
which tbh, if i downloaded an indie game expecting me to do this, it would be an instant steam refund
Hello fellas, I have a really important question!
I am currently tying to calculate an angle between two vectors (see BluePrint.png). a really simple task, just two vectors with z=0 and a "LookAt"-function to get the yaw-angle between those vectors.
Now, when I print the angle-value out, it prints me out wrong angles all the time. The values range between (-)90° and around (-)170°, but never start at 0° or less than around (-)90°...
I used an online calculator (WebCalculator.png) and tried to reproduce the calculated angle between the given vector-values which I also printed out (seen in PrintString.png)
My question is, what am i missing here? Am I doing something wrong here?
Last time I portforward was decade ago for wc3 and age of empire
And to do local tests, what should I do? Taking dedicated servers isn't the best solution, I'm already integrating an in-game store, but if I take the risk and the game doesn't work, I'm dead.
The goal is not to earn millions of dollars like Epic Games, but just enough to pay for the servers
honestly if you can't take that risk don't make a game like this
for a battle royale, dedicated servers is your only real choice.
in-game store, with no server? that's going to be hella messy, impractical and easily broken.
if you don't have the funds, and can't take the risk, you shouldn't develop a risky game that takes lots of money
Well this choice will be made, life is full of risks, so let’s test 😉
then get the dedi servers.
if you want to take the risk
hi, i am creating a weapons system and i need to add automatic fire, any ideas how to do it?
every loop crashes my game
You can always build local dedicated servers. For testing you don't have to have them hosted by anyone.
Not sure if I want to pay any in game goods when the dev have something like letting one of the player to be the host for a competitive match making game
I'm going to do this, which are the best?
Google GCE?
what you can do is run a timer on fire, where the length is your fire rate.
then on release, clear and invalidate the timer
Apex Legends runs on Google GCE, shouldn't it?
I couldn't tell you a good provider personally.
I haven't really shopped around for dedi server providers.
i wouldn't target AWS, they get a bit over priced quickly from what I've heard
I think I'll take Google, Apex works on it so it shouldn't be a problem
but yeah that's certainly something to have a research around. As Datura mentioned, you can build locally
it's also worth noting a Source build is required for dedi servers
i have something like this setup and the fire mechanic already has a fire rate cooldown mechanic but i dont know how to loop the fire event without crashing my game
you do it as I described
Yes, I can do this easily with my PC? Can I use it as a server to start?
okay i'll try
yeah, the server is just an executable you can launch and connect to
Okay, I'll do this
see above about the source build of the engine btw
you're going to hit a wall extremely quick with a launcher build
okay this kinda works, the last problem is just that it doesn't start shooting right away
why would it print out 1 , like 6 times?
call shoot before setting the timer too
do you have like 6 instance of that actor or something?
if this is what you mean then yes
do once are per object instance specific if you are wondering
i wish i understood haha
try debugging things with prints maybe
Yea, it seems to be a problem between the two blueprints. Cause I can get the interact function to work on other blueprints/ actors, but this one it doesn't. I put a debug print between the two nodes on bp 2, but nothing
Also, the tutorial I watched recommended I put the interact function in the inherited interfaces, but I can onl add to the implemented interfaces. Don't know why
for anyone seeking for a alternative "XY angle bewteen two vector with negative-angle-values"-solution (see screenshot)
can you make appear the dialogue in the FPS Blueprint?
I can. Actually, I've tested that out with the second level since that has an event begin directly tied to the dialogue
I can also get it to spawn with a simple collision/ press E when near character system, but not with the interact function
My parent is called MasterWeapons, and has a player shoot event node
there are 2 children (pistol and rifle) who call this event and execute code based on their calls to the parent event.
because both children call the event and both have separate code when the parent event is fired, will they interfere with eachother?
i am actually using a lot of e events, is any different from using a inputaction?
I'm not sure I understand?
i've seen that u used a input action interact, not a E key event
hopefully this makes more sense to everyone,
both children call the parent function, but both also execute code on the event calls
because the event is a parent and is global to all children, will both of these event calls executue both nodes in each BP where the event is being received?
Ah, right, yes. Well, originally all the characters had an E key event for dialogue (worked fine), but when changing global settings, I had to get a tutorial on an interact function, so now I'm trying to shift from the E key event to the interact function
oh okay thanks
how would i go about targeting all the references in the array?
I might have gotten it working
I see what you meant, I'm redoing the system, but I can't find a function that allows you to queue up players as soon as the "Play" button is clicked.
Does this exist in Unreal or am I crazy?
How do I rotate a pawn without using the controller? I just want a simple, rotate left / right with the a/d keys, not actually move. I seem to only be able to get success when I configure the pawn to orient itself towards the controller and update the controller rotatation, but this makes it impossible to have a free looking camera that doesnt effect the pawns rotation.
Are line traces or collision engine more performant? I'm going to use one of em for the 1000 bullets imma have flying around.
Something like that isn't built into Unreal. You'd need some form of backend service to manage such a queue.
i am still working on the automatic fire mechainc and i can't get it to work
i just need not to crash
While Loops are meant to finish within the same frame, they can't be left running indefinitely. You can use a "Set Timer By Event" node set to loop to create an event that fires continually at a regular interval. You can promote the return value from the timer node and use that variable to "Clear and Invalidate Timer" to stop it when needed.
i tried using a timer by event but when i shoot there is the fire rate before it shoots so i have to wait for the first bullet, and if i call the shoot function before the timer i can spam
Call shoot when you start the timer
The next problem you'll run into is that people will be able to spam the shoot button... In which case you want to use a do once node and reset it after the timer expires
Hi, does anyone know if it's possible to have a component reference as a variable passed to another component? My use case is I want to create a blueprint scene component FooComponent which when placed on an Actor I can assign a reference in the Details panel to a component on the actor in which it is attached. Let me know if you need clarification 😅
i think i tried that but ill retry, maybe i did something wrong
thanks btw
You can have a variable that can contain a reference to a component, but you cannot set that reference in the editor before run time as it technically doesn't exist until the actor gets spawned. Even placed actors on the map with the component cannot be referenced in an exposed component variable.
@leaden sun ☝️
OK thanks for letting me know. I guess I'll have to go the usual GetOwner on the component and then grab the component reference from there instead?
That would be one way, but having one component require another component is usually not great design wise.
Fair enough. Would you instead suggest combining the two components into one?
BP components are a little weird when you want > 1 piece/object. Have no choice but to use the construction script to add extra things in
Anyone know how to make an image a public variable on a widget blueprint? I want to change the image based on whatever item I want it to represent. I checked Is Variable on the designer, but I can't make it public in the graph.
That's how I've heard it's best to handle them... if need be maybe make a heirarchy of the components in case it makes sense that one of the components can function without the additional functions of the other.