#blueprint
402296 messages ยท Page 749 of 403
Do you check the current speed on condition node?
I mean, this node
What is your desired result? I thought that is to stop the IdleBreak when player start to move
idk im so confused
If it is, you should check current speed on that node
Then if the player start to move, it will play walking animation
Hey guys, my player keeps falling into the ground while the menu or game over screen is loaded. How can I fix this?
it would be good to find the actual reason, but one of several possible work-arounds would be to disable gravity in the character when opening menu/screens. then re-enable.
I'm having trouble finding which node would do that.
a bit of a hacky solution, but: set custom time dilation to 0?
afaik that should not affect menus
where and what do i put in the code
Thank you.
if for some reason you need the slightest amount of movement to be available, 0.01 value will also work
@grand hawk
If your want is to prohibit to move the character until that IdleBreaker motion end, you should write the code about it on some other place like your character blueprint
damnnnn
If it isn't, remove that code and paste the nodes what i told
It is always hard to complete the work. Good luck ๐
yeah
but my goal is to make the character move even tho he's in the middle of the animation
its okay buddy, thats how ive felt the last two years
lol wat
nothing is working
been literally trying to fix this shit for 2 hours
check this shit out
yeah that looks about right
calm down.
well swearing and posting lots of pictures is not going to help. And you have not even clearly explained your problem is.
I did
Basically when I start running I'm still in the idle breaker animation
it doesnt stop the animation
so the walking animation needs to start after pressing W
at any time during the idle breaker animation
right, so what is telling it to move from "Idle Breaker" state to "Walking" state.
show me the transitions.
its all in the screenshots dude
you did not show transitions..
blendspace
wow, i am not scrolling 20 pages up.
sigh
ok thanks
and stop with the rudeness, was no need for that "sigh" right there.
People help here cause they want to help, they do not NEED to help you.
well it seems that way, and to other people it can also seem that way
wasnt my intetion to offend anyone
sry
in your transition from Idlebreaker to Walk
then you want if Speed > 0
set IdleBreaker to false.
where do I put that code
?
its broken
try it on my project and you will see
my idle breaker animation is just not playing anymore
@worthy frost so?
I'm trying to make an Ocarina of Time inspired game and I'm wondering where the code for the functionality for all the different items should go? Surely I'm not putting everything in the Character event graph, but Functions can't seem to do some of the things I'll need. Right now I can equip a hookshot/grappling hook from a menu but I have no clue where to start with making it fire and function like a grappling hook. Can anyone help guide me?
The important part is that I'll need to be able to rebind items to different buttons on the fly. I can already equip them from a menu but I dont know how to organize their use code in a way that it can be used and called easily.
components
speaking of which,
is it not possible to do a "run on server" event from within a component? when i try to do it, it like deletes the actor or something
if i switch it around to where the component calls its owner's "run on server" event to do the same thing, it works fine
like, i have the component telling its owner to do a "run on server" event which tells the component to do something, and it works. but if i have the component do a "run on server" event to do the thing, it doesn't work
Make sure the component is set to replicate.
I've made a parent class for the items so that I could attach them as components but I'm still not sure what you mean. Does attaching something as a component just make it easy to run blueprint communications to the character?
i'm not 100% clear on what it means for a component to replicate or not
vs. the owner replicating
If the component is not set to replicate, replicated variables and RPCs will not function.
Similar to any other actor.
what about character movement component? that one doesn't seem to need to be replicated?
or is that just because other clients simply see the actor's new position and not its CMC variables?
The CMC is a bit more complicated... It has replication built into it's C++.
yeah you can have code for each weapon
i'm in the process of moving my weapons over to components right now
realized i wanted too many things and i should probably not stuff it all into the character bp
i'm making an fps. for me i have a parent weapon which has a "shoot" function. each individual weapon (children) has an override function to do specific stuff on shoot
The component will need a lot of control over the character it's attached to, do I just need to be ready to call a lot of events on the character? Like, I need my component to be able to drag me through the air.
shouldn't be a problem
Another one will need to stop tick on everything so that it can run a quick isolated action, lots of them will need to do camera management
my weapons each calculate their own physics impulses that they then apply to their owner via the CMC
Ok so then I just need to start thinking about it from the other direction probably, like the items need to be controlling the character.
well you can think of it like the weapon is part of the character
like the CMC is a component and it controls your character's movement (if you use it)
Hm...
the nice thing about components besides being good for organization is that you can add them to other actors which don't have the same parent
so in my game i can give the same weapon components to NPCs enemies which don't have the same parent as my player bp
Do components need to cast to their owner?
Like, is all the character-component communication going to be the same kind of call-and-forget that happens between most actors? Sorry if I can't word this right.
Like, they can only communicate with events, right? I press E and they're just going to call events on each other until one of them stops execution?
Oooooh ok so it is a lot of casting and back and forth action. I think I got it now, thank you so much.
i think once you start messing around with it you'll figure it out
I got as far as making each item print a different line, didn't realize I should have been doing stuff up the chain to its parent.
this is in my player bp
just tells the current weapon component to shoot
they jsut handle the shoot function in different ways
I had something similar, it was getting the item class from an array and calling one if its functions. Functions are one frame only I think and I knew I needed something else. Event graph it is.
I'm still not 100% on object oriented programming but I just have to say, OOP does some weird stuff to the brain. My brain feels like I'm slowly becoming computer.
I am also a noob just trying to figure things out as I go
I feel like Megamind after I solve anything. Like I'm an transcendent form of human being because I can have a small chat with a CPU.
And then the brick of realization that there's a billion other things to learn. And by the time you get through 500 of them, you've forgotten 1-57 already. Get used to that. It's here to stay. ๐
That too. I learned only one thing about Projectile Components and that is this: Lots of the settings can conflict! Make sure you know which settings you need. I have no idea which settings those are though.
One answer turned into 10 more questions. I gotta Google it every time now.
And I still didn't even figure out what I wanted...
On thing I find when I was starting was to find things that work. Simplest examples of how to set things up. For instance a projectile with nothing but velocity set will make it fire when spawned. You know this works, so you copy it and then start playing with the settings.
I was trying to make a bullet bounce off a wall and keep it's velocity and rotation in a perfect reflection off the impact face. I tried a few blueprint solutions too but all of a sudden I was trying to learn trigonometry.
We should all be learning trig and vector math, just so everyone knows it's almost required.
for making a game yeah you should know those things
Wait till you take a look at Procedural Generation ๐
It's mind blowing
I spent like 4 months just trying to make a good algorithm on Terrain Generation ๐
And I still didn't get it
that's closer to an artform i think
Algorithms are another thing I want to learn but probably won't for another decade. Rubix Cube mathematicians use algorithms to figure out how to change cube states and it's just too complex for me.
You can solve a cube using pre solved algorithms, but solving your own is like abstractly difficult.
It's like theoretical physics.
I didn't even try anything that complex
I was simply using Perlin noise to generate.a terrain mesh and a navigation system
It took me ages
procedural generation is just a fancy word for "pick a random number" 
...I guess it somewhat depends on what you're generating but a lot of it is just that lol
and combine noise/patterns in a meaningful way and smooth it out
That's when I realized making a No Man Sky like game isn't a job for one guy ๐
I have a procedural movie synopsis generator in my game which is basically just a set of lists where stuff comes from at random :P it works surprisingly well
No Man's Sky is impressive
would certainly be interesting to know how they do it... or something like RimWorld
Also on that note. Complexity is also the enemy of any good program. If you can't keep it simple, there's very likely a better way to solve your problem.
Also vector math is incredibly easy once you get down the differences of local, world and relative space.
And point vs direction vs lengthened direction.
It seems like OOP is just stacking a bunch of simple solutions into other simple solutions until you have one final Main() solution, and then you can compile and export your program. If anything fails to be simple then that problem could have an impact on a lot of other objects and you'll probably have to rewrite.
This is pretty much how programming works in general not just with OOP lol
Sorry if I'm rambling. I'm getting really bad tetris effect with Unreal.
Partially. It's also about organization. If you cannot personally go back and look at something you've done after five months and pick it up fairly quickly, then you're doing something wrong.
Agree
Oh. That's a thing about programming languages. I've heard that some are hard to read, even if you wrote them. Apparently all C+ programs look the same at the surface or something. You gotta organize and comment your code.
Well written C++ doesn't even need commented.
Write out your variable and function names well to express them. You don't exactly need to name them UHierarchicalInstanceStaticMeshComponent, but still.
I found that python is very easy to scan if you know what all the keywords are already.
That's better than my variables names, hahaha. A few of the actor names in my practice project: MyGuy, Mover, Item, FirstItem, GameStater, CharacterController06, and ThisOne.
Majority of languages look the same, and they also tend to work mostly the same too
Perl is a bit notorious for being "write only" as they say, but if you avoid using the features that make it so, it's fine
I think there are different "genres" of programming language that look relatively similar to each other depending on what their purpose is. I would love to see the spiderweb inforcharts like they do for music genres. HTML, Java, Python 2, ASM, C, and BrainF*** are all pretty distinct.
Well, the structure in Java, Python and C is the same. The most distinct of the three is Python because it uses whitespace for block separation instead of braces, but the program structure is still the same
Well yeah you got me there. They're visually distinct tho.
But you see, they all relate to each other like a web
Yeah that's true they do differ a bit visually, but it's useful to recognize those kinds of structural "patterns" which makes it easier to jump between languages if needed :)
I meant more the people like like to write their code.. in code. No spaces, no expressives.
float cn=gcn();
float nm=m*gnm();
return cn/nm;
I remember going from the PRGM function on my graphing calculator to a Java IDE and I was like "wtf... What is Main(String args[]);{"?
lol
No one knows what the shit this is.
static? What does that do?
static is just a glorified global 
I know what they all mean now, I'm just joking
Yeah
I mean, I at least know enough about inheritance the explanation of static or public would make sense to me.
I have a question,
Why does the 'OnMouseDown' event feels unresponsive on a user widget?
Compared to the native button widget
(I know this should be in #umg , but it seems to be barren atm)
I've not noticed this myself, I don't think it should because as far as I know it should execute from the same mouse down event as anything else does
I'm trying to make a custom button widget
It works as expected
But, If I click really fast on it, It only picks up every 2nd click
Does the default button widget not behave like that?
Nope, It works no matter how fast you click on it
Odd ๐ค
Have you considered just using the default button and changing its styles?
I did.
But I want to be able to detect both Left and Right click
Default button does not have that
Ah
Yeah, that would be kinda odd for it to behave differently, my guess is that it ends up registering doubleclicks or something which is affecting it for some reason
I don't remember for sure but maybe see if there's a doubleclick event you can handle, and just set it to always return Unhandled
Yeah, I think that might be the case
Because, The 'OnMouseButtonUp' event fires all the time
'OnMouseButtonDown' is the one which doesn't fire
The problem seems to go away, If the widget captures the mouse
Then it reacts to every single click
Maybe check ProjectSettings>Input for something about double clicks idk ๐ฉ
Unfortunately, that does not seem to work
Another thing that could in theory be happening is text selection but I'm not really familiar with how that functions in UE
Eg. if you doubleclick or triple click in a text field in many programs, it triggers it to select the text
I'm just guessing here tbh, your best bet might be to look at the code for UButton
There's no text though, I only have a single Image inside Canvas Panel
Yeah but the events might be firing for "just in case you do have text since you didn't handle it"
OnMouseDown should run fine. Even if DoubleClick is implemented or not. OnMouseDown should run first click, and doubleclick should run second click if you're double clicking. But OnMouseDown will still fire immediately.
There's a setting about Double Click Time, But I don't think changing that would be a solution
What is your widget hierarchy?
I've set all the children to be non-hit testable
Only the Canvas Panel is visible
Odd. And if you put a print in OnMouseButtonDown, you don't see that immediately when pressing on that widget?
I do see it immediately. But only the first time
If I rapidly click the second time, The event just does not fire
It's like I have to wait a few milliseconds for the button to become responsive again
Hmm. Would probably be easier in C++. Just have OnMouse double click call OnMouseDown. You could just make a new function and input the parameters. Do your click logic there and call that from both OnMouseDown and OnMouseDoubleClick
I'll try that
Yeah, that works!
Thank you ๐
It was indeed taking the 2nd click as a double click
UMG has it's quirks. They're frustrating at first, but you get used to them.
Except for Retainer boxes. Absolutely fuck retainer boxes.
I don't event know what they are
I've just started diving into UMG stuff
Retainer boxes allow you to draw a widget into a material and then manipulate it with a material editor. This gets you cool shit like scan lines over a whole widget, or fading effects.
Visually, they're absolutely fantastic.
Two serious caveats though. DO NOT wrap a large widget with many many subwidgets in them. We have a main widget at work that acts as our main viewport. All of the normal widgets that go on screen go in this. It was wrapped in a Retainerbox for a visual effect. Some widgets are simple popups though so we just add them to viewport at mouse location, right? These go OVER the widget with the retainerbox.. Yet the retainerbox takes mouse inputs... from something on top of it.
Also, they do not play well with the Background Blur widget at least in 4.25
Even with no effect going, it makes the blur widget draw as a black box.
So, I had to literally go wrap all of the small widgets everywhere else in retainerboxes, then at construct these call HUD, register themselves, and HUD iterates over them to play the effect instead.
That sounds ..... cumbersome
It was semi fine. HUD was already being called to play to effect. Just annoying to have to go through three dozen subwidgets to wrap them and then add the register call. Oddly, the smaller widgets don't have that problem. It's something to do with the two main canvases main added to Viewport.
Yeah, It's annoying and kinda exhausting
I've had such a thing happen to me a few times and after doing it, it feels like I did a lot of work but it's really just nothing, lol
I've just loaded up this 4.27 project after a while and now my skysphere looks like this. SHaders have completely compilde. Any idea what is happening and how I might fix it?
when i rotate camera it only goes to when mouse hits border of screen , even with mouse cursor not visable, how can i solve this?
:triangular_flag_on_post: SimplyClueless#3401 received strike 1. As a result, they were muted for 10 minutes.
You usually set the InputMode to "GameOnly". Then it shouldn't happen anymore.
That drives me to my next issue, if i use gameonly, the mouse bugs out of detecting fast clicks/double clicks or hold down mouse buttons stuff.
how do i do if i want like having a ui of a mmorpg, where u usualy use mouse, and cant rotate camera, but if i hold right mouse button i can rotate and mouse dissapear, and when i release it, it goes back to ui mode
Then you can use "GameAndUI" as an InputMode, where you have options to consume the mouse when clicking
what is that option called? i tried using that but unsure of what option handles that
It's part of the SetInputModeGameAndUI node
Cheers
Hi guys,
quick question: I'm trying to use Project World to Screen and having 2 questions:
The output is pixel coordinate or something else?
And it takes a Player Controller as input. In my usecase I only have 1 actor in scene and a fixed position camera. And this camera is the one I'm looking through. How can I use the camera as Player COntroller toget the pixels of some key point of the actor?
https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Utilities/ProjectWorldtoScreen/
Many thanks in advance
Project World to Screen
im having trouble with detecting the range my ai is from the player -- im using this task as a service to update my IsPlayerInRange bool, but it doesnt detect if the Get Distance To node is <= the range variable i set, but it will work the other way round?
this is the output when the service is set up how i have it above
then simply swapping the values makes it work but not the way round id like
i dont understand why the bool wouldnt get updated the way round i am intending
@eager peak ControlledPawn, not OwnerController
Controllers don't have a transform normally.
I did try with that originally, but the behaviour tree then gets stuck on the follow player sequence and doesnt swap even though the bool is set to true
the right sequence should activate as its set to Is Set and the left one gets stubborn and doesnt want to stop, even though its set to Is Not Set haha.
Print what the distance is to see if thats the issue
it looks like its taking the distance from the position that i put the npc rather than its current position
When it's on controlled pawn?
Yeah
because its returning true when im here which is less than 300 units to where i placed the npc originally
Still looks like its getting stuck on the move to player sequence though lol
Oh wait no it wasn't on controlled pawn, but it still gets stuck
my bad
yeah that's cause the get distance to node checks the distance to the origin of the actor
You have to finish the task execution if you want it to do something else. Otherwise you need to run parallels.
You might be more successful if you try a line trace, although I've never tried that in AI
the tasks cant be swapped with setting the bool like ive done? this was from a youtube tutorial but it doesnt seem to be working in 4.27
Its just one extra node to let the task know it should do something else
finish execute?
yep
in the current context it wont allow it, shoots errors. do you mean replace the update value with it or just add it to the end?
Add it to the end
An example of an old task I made a while ago
when I want it to stop, I add a finish execute node and mark whether it did what I wanted it to do or not
Err. Wait. Is this a Decorator or a Service? Because that looks like a Service.
Ah yeah that'll be because you aren't using it in a task
If you use a Decorator, you can just have it return the condition true or false.
Then have the decorator allowed to abort execution below it.
Do you guys recommend any YouTube tutorial series for understanding blueprints and using them in a game?
Unreal sensei's stuff is pretty good
@brazen pike thanks i'll check it out
They do have a decorator
He just said it was a Service.
I might be missing something but it looks like both
ive got both
they seem to be working fine, when im close enough to the ai the bool gets updated, it just doesnt abort the task
You're checking it once right now.
In the task, do you have a finish execute
IE, implement the service's tick overload and use that instead.
Use that to update player in range.
yeah they all do
So its going through and doing all the tasks in the sequence?
just not aborting the sequence?
yup
Just set the value on the service's tick.
then yeah listen to Authaer
also you shouldn't be using a "get distance to" node for a moving object afaik... It wont give you the numbers you're looking for
Activation runs once per time that goes through. It's like a beginplay. Tick will run more often and allow you to detect changes.
these values?
Those are fine. But you have to use the function. Override it in the function list in the top left.
Event receive tick
Something tick something AI or whatever.
oh yup gotcha
The distance check is fine as well. All it does is takes the actor's root component, gets their location, does (Actor1Location - Actor2Location) -> ChangefromLengthVectorToFloat
Really? does it not take the origin where it began play?
Actor won't even save that. It's useless data.
I see... Alright my mistake then
The reason he's seeing it like that is because that's when his distance check was done and it was never repeated.
Ive got it set up like this now - it does send it over to the next task (yay!) but its shooting out an error that it accessed none
accessed none of what
Hey @maiden wadi , i tried yesterday for over an hour fixing it but still the blueprint doesnt seem to change the language and yes, it is el-GR, i searched it but for some reason nothing is changing, only from editor.
Have you set it in the behaviour tree too?
oh yeah they're both set
or wait the service sorry
yeah both set
could it be because its going off every tick and its not keeping up with the service interval
you could have that block of code you've shown as a decorator FYI
no need to make it a service
just set it to abort lower prio/both
all of this doesn't need to happen on tick either, because the BT already runs on tick
isnt working without the tick event
can you show your behavior tree?
I would suggest starting playing and put the behavior tree somewhere where you can see it during play
then you can see why it stops
most likely your decorators aren't set up correctly
also
your setup is not entirely correct
it would get stuck here
even if the bool updates, it doesnt go to the next task
and doesnt abort the current one
behavior trees go from left (highest priority) to right (lowest priority)
have you set the task to finish execute successfully?
yes, they all have it
show me that task
did you mean decorators, and not task?
you have InPlayerRange as a decorator, that is inverse and aborting self
that won't work
show me what you have inside the SetMovementSpeed
because to me that looks like you don't have a FinishExecute
so that means the cast fails
and since you don't say Finish Execute on cast fail, it won't proceed
or Finish Abort for that matter
doesnt matter what task its on, as soon as the isinrange bool gets updated to true it gets stuck on that set of tasks
yeah but you understand the tasks themselves are the issue?
you have a task that has a path that does not abort or finish execute
so it will go on indefinitely
if your other tasks have the same issue
then you aren't getting anywhere
i see, ill try adding abort task on the ones that cast fails
still nothing, just getting stuck
now it should at least execute
are you getting a lot of flickering as it is aborting and restarting the same task?
Hi guys, i'm having problem with Blueprint compiling
It compiles successfully, but if i look at the logs
These show up
But everything works as expected, all functions etc...
But the "Not Valid" string always shows up
have you checked only to pass your value through when it's valid?
you'll have to show your code
The problem is that idk where is the point that generates that error
And i mean, it also appears when i compile, without play in editor
.
Oh nvm i found the issue, there was a function inside the construction script
Because, it's not my code
I'm refactoring it
just saying it's hard to help you if we can't see what's wrong
yeah, until the isinrange gets set to true, then it just stays on one task and doesnt update
that means the tasks are behaving as they should
now you have to work on fixing your decorators
they should be blocking that path until in range
what do you mean?
the path to circling player is blocked until isplayerinrange is IsSet
it's blocked because a higher priority path is more viable
circling the player should be leftmost, not rightmost
and you should test your decorators one by one, if they actually work as intended
ive tested them, the results dont really change. the only solution that has actually worked at swapping between the tasks has been adding the event tick on the is player in range service
but then it is just shooting out errors saying that the blackboard variable accessed none even though ive set it in the services
Is anyone able to tell me the difference between these blueprint calls from a pin for an interface function? I'm worried im going to accidently use the wrong one!
tbh I'd re evaluate your tree entirely. to me it looks like you need to reconstruct it entirely
start with a few tasks, and maybe one decorator, and see if you can get it working
i didnt build it myself, its from a youtube tutorial but ive rewatched it like three times to double check i didnt make any errors and now im just trying to work around it
I wouldn't trust a youtube tutorial
behavior trees are very high level structures that aren't easy to do properly
unless they are extremely simple
i know. its been pretty simple to follow and their other vids have helped me learn unreal a fair bit, and ive never been so stuck on a tutorial before
at this point i dont know if its just the version difference
as someone mentioned to me that 4.27 has broken some parts of people's BTs
I doubt very much this is broken on the side of the engine
The 'Interface Call' requires a direct reference to the Interface
The 'Message' does not require a reference to the Interface, It just sends a message to the target BP and prays that the target BP has implemented the interface functions
What would the difference between these two be then since one is calling targeting the current component which has implemented the interface and the other is directly targeting the interface
The upper one seems to be a function in a class?
Is 'BP VRGrip Component' a Blueprint?
yes its the current blueprint where thes nodes are being called
well its a scene component
that is implementing the interface
And you have created the function in the Blueprint also?
no
i think its just the reference from the interface
nvm
i just answered the question
its if i am overriding functionality from the base interface
๐
Well, In the first pic you posted, It shows the function in 'BP VR Grip Component' also
@odd ember thank you very much for all the help earlier. debugging it helped me learn alot and I think ive sorted it now :)
Day two is a good day. Fresh perspectives.
it only really starts going downhill after day 25 ๐
more like day 5 ๐ถ
@trim matrix btw, you haven't said what your issue was
well cause im tired of always repeating it
but I guess ill go ahead and copy and paste
The character wont break out of idle breaker animation when I start walking
Anim BP?
Is the bool at this ever getting reached?
idk
Would be a good place to start debugging if your state change gates are correctly set. Since I assume that's the variable that needs to be true to start running.
can anybody think why I might be getting this error for some blueprints?
it's suddenly started happening to a select few
nothing happens when I double click and when I right click I get "failed to load assets"
have you tried asking in #animation ?
Sounds like broken redirectors
Really depends. At the very least though if you're going to leave it on the inputs, move it to Tick. No need for it to run twice a frame.
the most efficient place to handle animations is the animBP
by far
it's a built in place where you can have the BP side on the game thread feed directly into the animation thread
not to mention it's made for it
Probably. Which would also have access to the character's movement component.
the animation graph has transitions set up specifically for this
Hi! Noob question: i need to store and edit somehow a tens of pairs of Skeletal animation and audio files. How do i store/edit them so blueprint could access it?
how do I possess an actor on collision + pressing E? The actor detects if player collides with collision box, but it doesn't detect if the player presses E
E event have to be in players BP
then how do I do it?
I tried this, but it doesn't work
E doesnt work at all?
E works, but it doesn't work after casting to rocketbp
I tried to print string after casting to rocketbp and the print string didn't work
coding language ig
not sure, but there are probably some limitations
Cast is failing , you have to store rocket as variable where you spawn it
Then cast from that variable
Last question YALL got any ideas on places I can hire developers for general engine
You can cast only to playerBP from getplayercharacter
Iโm kinda new
Or you can do get all actors from class for now and cast from it
Hi everyone, I hope your day is going well. I have encountered a huge problem in my game and I needed help. I wanted to know if there is a way to transfer the authority over to a client. In my game you can open rooms and people can join it just like Among Us. This works fine but when the person that opened the room quits, all the clients also get kicked out. I wanted to know if I can transfer the ownership of the room to another client. Thank you all (:
But its not the best practice
yes, there is
so, like that?
Omg really???? I have been looking for hours for a solution!!
Set rocket after you spawn it
I mean, it's already there. It doesn't spawn, it's already there
Thank you so much I greatly appreciate it, I will try it and get back to you. Enjoy the rest of your day!
Whoops sorry, do you know the solution to my problem? I looked at someone elses BP
You just put it in the level?
yep
Have you used game instance before?
nope, I don't
Do you know where I could find the solution?
in the variable?
but like, for what? I am kinda confused rn
done
So does anyone know where I could find the solution to my problem?
promote it to a variable just to see what type it it
i have static mesh
then go to game instance bp
create a variable of that type
I've created the same variable in playerbp
type rocket bp
do it ๐
then save it
then back at your level bp drag from gameinstance cast
and find Set RocketBp
comprende?
yea and set it to that rocked bp from scene
ok now at player bp
do same
get game instance cast to game instance
and now Get your rocket bp from that
Quick question, is this the right chat for server related questions or should I go somewhere else?
#online-subsystems I think
or #multiplayer
thank you]
get not set
ohhhhhh
you set it in level BP
now game instance holds your rocketBP
and you can use it in any other BPs
just getgameinstance and cast
you can also convert to pure cast
it's stuck again after casting to the game instance (NewBlueprint)
if you rightclick NewBlueprint
if its stuck after the cast it means its not "colliding"
it can only get stuck b4 the node ๐
the colliding value changes to true when player enters the collision box
the value changes
thats rocket bp?
yep
do you have only one rocket bp in the scene?
yes
you know what? Maybe I'll just make a new variable in playerbp called enteringRocket which will set to true if player presses E. I will make a new variable in rocketbp as well which sets to true if enteringRocket is true
Sorry for entering the conversation late, but you're pulling a variable from an event for an event that's in a different execution order. I see that the top should always execute first, but does that Create Widget node keep its output until the second row is called? Do you need to set/get that as a variable instead of passing it between events?
non-pure nodes always keep their return value cached
Didn't know that, thank you
(until they get re-executed ofc)
Right, they keep their last return value cached
Hello everyone, is there any way by which I can implement google sign in for my game through Blueprint?
Or there is any other way through which I can implement google sign in for my game?
that doesnt mean you should greenlight situations where you use a non pure node for another execution thread
it's a great way to get nullptrs
yeah, cross exec return values are never really a good idea
Is there any way to check if a level has been fully loaded? By that, I mean, the world exists and I can safely spawn stuff and create widgets.
BeginPlay?
in blueprint?
@odd emberyep
nope, won't do
that's exactly the problem
I have one level which on cooked builds only, sometimes loads - probably a ms or so - before the player which makes it "fall through the world".
that shouldn't happen
the level loads before its actors
so unless the actors aren't part of that level
I don't want to do shenanigans like disabling gravity n weird stuff like that, I want to have a reliable, clean solution
I recommend cpp for that
๐
so i was trying to set a condition if a character has a key to open a door or not
well, thanks for the info @odd ember &@obtuse herald
and this is what i get al the time
where is that logic
heres what the key does
this is door bp
this is key bp
door checks if the character has the "has key?" boolean variable true
yeah but where does the door get the player character variable from ๐ค
character's component hierarchy
just to be clear: whatever you're doing shouldn't happen ordinarily in BP. it seems you're spawning the ground that the character is walking on on beginplay. I don't recommend approaches like that in general
you do understand that the variable can be empty, right?
right
a variable is like an empty container for a type
so if you never set it
it continues being empty
look
and you get an accessed none error
the key changes the "has key?" from false to true
this is what the door bp branch should check
I just told you why
ok
I'd recommend reading up on blueprint communications
there's a link in the pinned posts
how much time do you have
that link should get you started
some casting and collision to capture a variable should be good ๐
thanks
Anyone know off hand how I set an image in a widget to be the same as the image texture of a selected mesh?
I assume its not hard either but I can seem to find the right reference type for the set node
@tawdry surge The image in the widget.
You get it as a variable in the graph and call SetBrush(WhateverType) function
Likely that Beginplay was called before the player had a Pawn.
sadly this doesn't work either
i'm trying to talk from the player character bp to the thirdperson_animBP
If you want to save a reference, just do a validated get first, on fail do TryGetPawnOwner, cast, set the thing you're validated getting and set it. Then do your other variable setting logic.
Right click the AsThirdPersonCharacter node you have.
and then?
convert to validated get
but i only have a pure cast tho
spicy
not good? 
almost as if you just created an impromptu singleton
it's good but what if...
you put all that in a function
that would be pure
but functions are smelly tho 
anyone know about random bool?
i want when i press f = random from these 2 bools
it is all false
i want random true
you know
yeah that
no i want these 2 becuase print in tick
Are you trying to randomly set one of them to be true?
so that it randomly picks an attack type?
as specefic bools
yes
Select based on random bool?
Right, you would be better off using some other variable type for it
thanks guys
@maiden wadi @odd ember
For example, you can use a random int where 0 is attack 1, and 1 is attack 2
funny that there isn't a native bool select node
then you generate a random int and choose in your logic based on that
so if 0 - 5 int if its = 4 (random) play attack. thats what you mean?
Are you planning on having more than two bools?
yes
tbh it would be good to future proof it anyway
Engine version?
5
thats won't work for tick
You want to print all of them on tick too?
He wants to select a random attack from the possible attacks
That's the real goal here
Right. MakeArray, Random.
yes sorry my english is not very good but i think the int will fix it
I don't really know how an array of bools is gonna do this because that'll just select a random bool? :P
but like... RandomIntInRange exists
it really should be an array of attacks and then random from array
Wasn't that the intention? To pick a random boolean?
i wish lol
oh sorry i thought random bool range ๐๐ผโโ๏ธ
But yeah easiest way to do it would just be to use an int and generate a random in in the range you want
wait this seems more like you want to have a better construct than a if else chain.
I mean to be fair, what Zomg said is true. bools aren't going to go very far here.
then you can use switch on int in your code to select appropriate action
so you can do logic based on existing state
not as much like you're choosing a new state
this seems like youd want to make a struct to contain information on a given attack (including whether it is presently active), and then you want a tag or name which you can Switch On Name with
plain bools cannot help you here if you stuff them into an array
Unless you find the first true and then use the index of that first true
then that can drive a switch on Int
I think that's a fantastic way to trap yourself in misery btw
I feel like we've now crossed several rivers in search of water
Yeah I would say so. it would be better to let them figure out what they're looking for, and rephrasing to clarify
I have a UMG widget that was working perfectly. I am overriding the On Mouse Button and On Mouse Wheel to detect and handle input events from the mouse. They were working fine with little/no effort to configure them to do so. Then I tweaked the UMG style a bit, added a border, removed a border, maybe a couple other things. Now I find these functions aren't firing at all. My mouse events do not seem to be triggering on this widget at all. I don't know what I could have done to cause this and can't seem to get back to that state. Is there anything I should check for on my widget panel properties aside from making sure they're Visible?
I feel like maybe this is the result of using the Replace With functionality and something not behaving correctly under the hood
I'm not sure about the mouse wheel, little experience with that one. But OnMouseButtonDown should run for any widget that is able to accept hit test visibility.
Triple check through the Widget Reflector.
It seems UE renamed these functions .. they're no longer overriding anything
I don't know what caused this
Nope. Well, not intentionally. I'm assuming it was the Replace With that caused this, possibly it did some reparenting under the hood
That shouldn't have replaced the Userwidget's stuff.
At most you'd have broken graph bindings.
At least in UE4
I had tested it, decided I wanted to make a border transparent, added a border and removed another one. Tested again and it was broken.. within a ~45 second window
And without leaving the UMG editor
Just UE weirdness I suppose
Ew. I'm 97% sure that doesn't happen at least in 4.25.4 or 4.27.1
Ok, UE5 weirdness maybe ๐
As someone who has to deal with widgets all day, that makes me not really like UE5. ๐ฆ
Well, it is still the preview release. I wish I could reproduce the issue consistently, I'd submit a bug for it
did you change the inheritance chain?
ah my bad
discord stops scrolling
โ๐
it's weird, it renamed my OnMouseButtonDown and OnMouseButtonUp and OnMouseMove but OnMouseWheel is still the same and working
I've seen it happen before
I'd replace the binding manually
and kill the new function
but perhaps you can also check if there's an inherited function that it's not showing
To be fair, I rarely use those in Blueprint. I have a habit of doing most of my control overrides in C++. Most of it involves a ton of screenspace math most times.
eventually I'll port mine to cpp as well
but I've got 2 in total
so not the end of the world
I literally just spent the weekend and thisevening finishing a slider's code. I found this amazing plugin. Allows screenspace niagara effects. So of course I had to go make a little sparkle effect and make it follow a slider when the user is moving it.
nice
haven't considered screenspace niagara, that could potentially save a bunch of performance
Hey guys
Anyone know how I can add an exec point extension so I can connect it to the direction node?
Not really sure what you're asking .. you just want to have the direction node execute as well?
just... move it next to speed?
Use a "sequence" node.
I've always hated sequence nodes. The name is extremely misleading
yeah, i wish they were called something else, but i dont have a better suggestion
nah, and it implies multi-threading
Synchronous Execution Split
lol, even worse
"Do, Then"
I'm actually not sure how the threads are handled under the hood with the sequence node. It certainly seems to behave as though it's multithreaded
Do, Then implies it's blocking though
naw, sequences happen directly one after the other in order
But they won't wait for the previous one to complete before continuing
do they not?
they do not (EDIT: THEY DO)
just waiting until y'all come full circle to the idea that "sequence" might probably be the best name
huh. i gotta test that
lol. sequence might actually be the best name, but then they should rename sequencer to something else
to be fair sequencer used to be called matinee
much better name for that
though, i don't know how 'delay' is handled under the hood either
i was about to say, i think delay breaks that
delay/latent actions are event bindings under the hood
ima do a for loop that counts to 10k
Hmm. hahaha I was just thinking the same thing
But of course for loops aren't blocking either so..
Hey there, does anybody know a way of making two Palettes in a widget blend together when in between?
A sequence?
I don't think that was in response to your question
it was not
Sorry
that may perhaps indeed look sequential
Implies thats its totally synchronous, which is great; because i now dont need to change all my projects. I use sequence all the time, purely to clean up my graphs
You worried me for a minute there, lol
Haha sorry. I stopped trusting it once I found some inconsistencies with it
๐
I stopped trusting For loops too. In a number of places I use my own iterator and route the execution back to a branch to check the "loop" condition
I'm searching a way to make this effect in a scroll function I'm making, already figured animation timeline but I require to blend the two together in this way. Does anybody have an idea on how to make the effect of blending two palettes together without effecting anything else besides each other.
Maybe we should call it "Thenner"
I'm not seeing what effect
๐ค theory confirmed. SCIENCE!
Well, can you see the two pallets that are blue and red? in between, they become a different color and I'm trying to solve that way. I've tried asking in Unreal Engine but so far the past 6 days, no one is still answering my questions.
Eesh.. seems like it would be easiest to just have the whole thing in a single image
isn't that just... using an overlay?
I don't think blue and red = white though
whether an overlay in photoshop or in unreal
This is outside my realm of expertise, but I think you're looking for a blend mode. You probably want to render these textures to their own buffer, then use the output of that buffer as your menu texture to stop them from interfering with everything else. Maybe look at render textures or targets. not sure what unreal calls it
i've done this before in raw c++ and opengl/glsl, but not for like 10 years
I'll look into it. Thanks
I'm pretty sure the color we see is the color of the two dithered against each other
(which would suggest an overlay/screen/multiplication effect)
@tropic pecan you may want to ask in #graphics
for sure
I'll look into these, Thanks. I'm just want to know how to make this effect.
there is also a literal widget called Overlay. you can try that with a 50% opacity color
and see how close you get
I'm aware of the palette Overlay. Though I cannot say I'm aware of the 50% opacity color.
I'm sitting here trying to prove to myself for loops are non blocking and I can't seem to do it. I know I've had issues in the past with them being non blocking. Either I was wrong or it's been fixed .... ๐คฏ
What do you mean by non blocking?
Not waiting for the previous iteration to complete before starting the next iteration
I'm not sure how it works with the engine doing updates per frame generally. maybe there's some syncing issues
but I have heard that macros in general are not very stable constructs
I think maybe this is just another scenario where it is broken because I used a delay. I've been operating on some wrong assumptions for a long time ...
I was so sure..
Things should be synchronous unless stated otherwise, generally. Like if you hover over delay, it does mention "latent"
delays inside of loops would absolutely break execution flow
latent actions are delegates in disguise
If you want some real amusement, test out the supposed loop limit. You'll never be able to hit it.
i'd hate to imagine how much over-engineering you might have done to prevent issues that werent there
You're telling me ..
it's been .. 6 years ..
is the loop limit a number of iterations, or a nesting depth?
depends on the engine version beacuse it was broken
you can set it per project or in the editor. it's basically max amount of loops before it counts them as "infinite"
increasing the limit didn't work either
and stops game (thread) execution
but pretty sure its all fixed now
ohh yeah i've run into that before
Is the spring arm only meant for cameras? I wanted to use it for an xp orb that circles the player and slowly gets closer. Would this be feasable?
Question about the Variables in my blueprint.
I'm updating BPs in a project by copying and pasting them from another project, not bad except the Variables don't come along, just broken references to the variable.
What's the better option here please?
I've been remaking them and ctrl+connecting the noodles to update them manually 'easily enough'
FYI - I built this all in the Level Blueprint.
Hi everyone. I'm making a program to use on streams, and i"d like for it to be running during the whole show for integration purposes. This means that I need to find a way to make a 'run in background' mode that uses signifigantly less cpu/gpu, so i can run other games while it's minimized. could anyone point me in the right direction to set this up?
What could be the reasons for getting this note saying "Source pose was visible but ignored"
Can anyone describe what's happened here with this SET node? I don't understand how it's taking that Target input of a CanvasRenderTarget.
Found from this thread: https://forums.unrealengine.com/t/feeding-material-with-world-position-offset-data/78304/7
The author wrote: "[This actor] creates an instance of the CanvasRenderTarget2D and casts the location array to it."
@young canyon cause you have nothing plugged into source pose?
@worthy frost I see similar set up used in ALS but that one is not showing any note for some reason. That bit confused me a bit
i can only tell you what the note means, not how ALS setup the node
seems weird you would modify a curve without passing in the source pose tho
That thread looks like it is missing images that would actually explain what they did, that said... Don't create just a CanvasRenderTarget2D.... Go to create a "Blueprint class" and search for the "CanvasRenderTarget2D" option.
Then you can modify it and add in your variables you need.
why? wouldn't modifying the curve just set values which can be used for later evaluation in the animation process?
ALS does store a bunch of stuff in curves on the skeleton, like lean values
like i said, i am not familar with that node
maybe there is a bool or something to not require source pose
Hey, any idea why I am not getting the transform/rotate/scale gizmo?
you probably have the mode set to selection in the overlay menu on top
I try to click on the overlay buttons for transform but nothing happens
if I add a cube it will show it
but not for the other meshes ๐ต
seems like its not attached to your root component
ya, if I click those, nothing happens
maybe the mesh is just broken
pivot must be 0,0,0 as it doesn't have a location transform
i have never seen that though in 5 years of using UE4.
yea it's strange, this isn't the first bp I've made with the imported meshes so it's odd. Guess I'll try reimporting with new pivots
i don't think that the pivot is an issue
Although in the original mesh (non-BP) the pivots are fine
what happens if you add the mesh as a child of itself, does it also bug?
you mean add the clock to the clock?
tho the buttons not even being selected is weird.
yea just for testing
lol
same
as root component can not be moved/rotated
same hierarchy, different mesh, but doesn't show the transform lol
not as root, I'm just assigning custom meshes
I'm deleting them all let's see
ok after deleting the nodes it's fine
what should I do instead to assign custom meshes?
use the set static mesh method on the real component
okay thanks
and your variables aren't probably valid values then
I'll reimport this mesh anyway to fix the pivots because for some reason the clock is facing properly but the other components are facing upwards so something is wrong
which you have to change to static mesh references
I think what has happened here is that the Vector Array -> Set Float Data node was used, which you can get by extending from the CanvasRenderTarget2D pin and deselecting the Context Sensitive option
But in the example, the SET input pin was renamed. Doing this FloatData thing doesn't let you change the name, and it was from NiagaraDataInterfaceArrayFloat.h, so I don't know if it's right. Will test.
Also that thread I referred to is years old, so shrug
anyone knows how to make space rocket physics or at least give me a tutorial?
Rocket physics don't really exist in space due to lack of air for mid space thrust to work.
Physics lessons aside, you could improvise from plane/flying logics.
"November Hair" - Digital ink on blueprint 2021
wtf
i thought u were serious my bad
Anyone wanna help me with some PITA maths to figure out the rotations to set for an analogue clock depending on the value of current seconds? ๐
So essentially, each second is 6 degrees, minute is also 6 degrees and hour is 30 degrees of rotation on a clock.
Current Seconds from the SunBP is throwing out the current time.
So I need to figure out how to chop that up and set the beginning positions of the clock. i.e. if I change the start time of the game from 6 AM to 12 PM, it should likewise calculate the new positions for the clock hands.
Right now I have the clock running fine, just need to figure this being-play part.
gl !
Might I suggest, digital ink on blueprint canvas
my brain is totally burnt
nice one
saved :p
@spark steppe naturally I am thinking millions of Branch nodes but I'm sure you'll blast me into orbit for that, so lemme know if you have a better suggestion ๐
u considered modulo ?
double
Yeah I have hours, minutes, etc. all nicely there, I'm just looking for other views from experienced people on translating that into rotational value
e.g. I have a GTA-style widget on the screen but that doesn't calculate anything that just draws the time on the screen, which uses those hours/mins/seconds values but doesn't actually do anything with them other than print
just count the number of hours full then the rest in minutes then the rest in second
and convert in angle

