#blueprint
1 messages · Page 70 of 1
What are the chances that 2 people are making the same thing within a few days of each other lol
did some physical dice game make it big on Steam or something?
nope. I just figured I need to take a step back and start from scratch
and rolling dice seemed like a simple thing to do
and well.. useful I guess
The WHEN to check will be harder, maybe you can use OnSleep if they sleep predictably
but it turns out I need to take more steps back than just one as I feel like I don't really understand the basics, and differences between events, constructors, even the blueprint types and elements
Fire up the 1st person template and make a door that you can walk up to and open
yeah.. I think I'll start with that
or if you want an even simpler starting point, make a floating sphere that you can move around and look around with, starting from Pawn
The basics is object oriented programming
yes and no
And then figuring out how blueprints are weird
if you don't understand things like arrays, using them will be more difficult
I feel like I have a big gap when it comes to how the elements in UE work together, where to do what
I do have experience with programming and it's relatively easy for me to think of solutions how to tackle a problem step by step
but translating that into UE5/blueprints is a whole different story
BP is basically just plain old object oriented programming, there's nothing really that weird about it
not when you look at it the first time (I'm not, but it's been a while so lets say I'm completely new)
like for example - I want to have an array of transforms (right?), so I need to create a new component of Transform type ... welp sorry I don't think I can ask this question properly at the moment
it's hard to figure out where to start. doing "do this and connect to that" tutorials is pretty pointless
i started with blueprint tutorials because i had already programmed before
it gives you an idea of how its working
whats firing when, events, functions, variables
but basically stuff happens and events fire
You just make an variable of type Array of Transforms
make the transform variable, then set it to array
did you mean that
yep, then click on it and in the details you can set it to array
Oh crap. yeah that explains a lot, thank you
ok this might sound silly but can I access the array and pull the items in manually somehow?
scratch that
after compiling the BP I can see it
That's how you'd initialize
that's saying
Scene Comp Array = MakeArray(1,2,3,4,5,6)
Alternatively, you could collapse the make array but into a pure function. Helps reduce clutter in the var tab lol.
Nooo. Don’t make functions for code that gets executed exactly once
Collapse nodes instead
Uncle Bob sweating
or just leave it
it's all the same
It would be a getter function to get an array of the components. 🙂 either method works but it's a preference thing.
When I spawn actors at runtime, my units won't path around them. My unit ai controller is a child of "detour crowd ai controller" with no modifications.
Any tips on how to troubleshoot this? I presume it is because the navmesh isn't updated under the spawned actor (wall).
nave mesh volume settings, make it dynamic
I don't see that setting anywhere
Is the the mesh from my viewport, or somewhere in the project settings?
Project Settings → Navigation Mesh → Runtime Generation
according to a random google search I just did
Well now my dudes are moving like they're drunk
^
The mesh looks green when I press "p"
do you have a navmesh bounds volume or whatever it's called?
Where can I set the default Player Controller for the project?
nevermind found it
Apparently "Default" works as a search but "Controller" does not.
You set a default GameMode which says which PlayerController to use
My event hit isnt triggering, dunno why
The hit event?
check your collision settings
make sure they're actually hitting each other
i havent changed the preset setting for the projectile so it should work
You haven’t met Lady Collision then. She’s finicky af
Show collision settings for the projectile collider and the thing you're shooting
Thank you, must missed this in the book
Anyone know how to make a simple cooking food blueprint code?
I'm trying to make it so the food goes from raw to cooked in 10 seconds, I know how to change the texture but some things are still failing like taking out the food from the grill, it still changes to cooked
if anyone knows about this, it'd be a great help
Simple question about 3rd person camera friends.
I set up the camera to only rotate when the left or right mouse button is held down. Currently, the character is also rotating with the camera movement. I would like this only to happen when the right mouse button is held down, like in most MMORPGs. I don't need help with the boolean logic, but I assume there is some 'Pawn Control Rotation' setting I need to change, but I can't seem to find the right one. The guides I've seen on this are pre-5.2. Thanks a bunch.
FloatingPawnMovement question: I wanted to get rid of Max Speed, but it seems like that doesn't behave how I assumed. I changed it to an absurdly high number, and then the pawn didn't move at all; even changing it to other relatively lower numbers affects the speed that the actor accelerates. Is there some sort of computation going on for deceleration as a proportion of the max speed or just too large of a number? I'd assume that the details panel wouldnt' accpet the number if it were simply too big
Pretty sure it obeys acceleration if provided and if it’s set to 0 it instead goes directly to the max speed
Instead of having cooking food be a thing that takes 10 seconds, have a grill be a thing that adds 10% doneness per second
The rule isn't that food is cooked 10 seconds after starting cooking, the rule is that a grill adds 10% of cookedness to whatever is on it each second. If you take it off, it quits being cooked as a result of that.
Does appear to have something to do with ratio; max speed of 10 vs accel of 1, it slowly moves towards me, but with maxsped of 99999999 to 1, it doesn't move at all...
the project's not supposed to be super realistic, thats why I was doing a simple transition at 10 seconds
but would that be easier to code and run?
A bit easier yes
JUst wanna find out how to do it with blueprints
What have you done so far?
My look up blueprint isnt working? (im new to unreal)
Where is this code?
i have a camera set up to the character its first person should i remove it?
i removed the camera and it worked
oh
Btw you should've selected that camera and ticked "use control rotation"
Rn you're just using the camera that is spawned by the (iirc) the camera manager which is fine.
You can still reference the camera from there and manipulate it
What is standard for generalizing bullet-object interactions? An interface?
i.e. the bullet has its own component hit, the object has its own component hit, but suppose I want the velocity of the bullet to affect the rag dolling of the object
like for view bobing?
Yeah that's an example
You could do anything you want to the camera as long as you have a reference to it
Which you do always via the camera manager
how would i do that cause im used to coding in c++ not in unreal though (cause i followed the tutorial and it just didnt work so i just switched to blueprints)
oh thank you
I'd probably just check if player is over a velocity threshold while grounded and if true then I'd just do sin(AccumulatedSeconds * bobbingFrequency) * maxBobHeight
Interfaces or components will work. You can make a function that takes in damage params, those usually involve (impact location, impact source, impact velocity, hit bone name, damage type (e.g explosion, hitscan bullet, projectile...ect), instigator (actor ref if a single player, player controller ref if multiplayer)
This question sounds stupid but can you use c++ code varibles in blueprints like if i wrote a health code in c++ can i use the varibles from it in the blueprints?
Yeah
#cpp message
(Psst check pins in #cpp. They have some really top tier resources there)
More specifically, My bullet destroys itself at the end of its collision event, so the object has no velocity to reference from the bullet at the hit (I think it's throwing runtime errors)
So create an interface like BulletInteraction that the object has to use?
Or event dispatch?
You would call that function before destroying the bullet
Ah, from the bullet, calls the other object's interface
Yep. You can make the bullet overlap instead of hit btw.
On hit the bullet would change velocity and you probably don't want that
super late reply but this is what i have
for sure aint the way to do it, i'm new to unreal so im still trying to figure out stuff
ah
I used to have a delay instead of the event timer, i just replaced it
Right now I have a floating eyeball that chases my player around, shooting it ragdolls it so it spins out a little, but after I finish my delay and reset physics, it snaps to face the player. I'm using the AI set focus node rn, is there a way for the AI to more slowly return to facing the player?\
What is the point of the timer? It's just sitting there doing nothing
It doesnt have a purpose yet, but its supposed to make it so, after 10 seconds, the state of the food goes from raw to cooked, and if it's taken out before so, it stays raw
but I havent been able to get it to do that
give the food a variable that increments when on the grill
instead of the timer there was a delay but it did the effect, but wasnt stoppable
You could have a timeline that smoothly turns to player then use the AI focus node
Oh just remove the sequence. Let the top connection be as. For the button one, make an event and call it "cook food" or something like that, connect that to the bottom nodes And plug that little red thing from the timer to your newly made event
And also make sure to save the timer handle somewhere so you can stop the timer if you want
✋ I bought a project in UE market and modified some blueprints in the project.Will the modification be covered if I install its update version in the future?
they will be overwritten if you edited the original data
Oh, so I have to manually add the new features into my project.
if you depend on updates you should create child classes which override the original behavior where necessary
and still, it's like playing minesweeper....
😂
And I should move the child classes out of the project folder.
Have no idea about the cover logic of asset update.
me neither, i don't do updates other than for plugins
but yea, can't hurt to move your stuff to a separate path
Nice
is what i'm doing here with controller rotation the right way?
there must be some quicker way like disable controller
enable disable input work with AI?
last question for the night
how does one increment a variable by 1 each second?
timer might actually work for that
have a timer call an event every second
What do you need to do?
he's simulating "food" on a "grill" and it's cooked time
if you want to display a timer for your game example and need precision (like less than a seconnd matter).
Do it on tick.
Elasped time + delta second
im not trying to display a timer
rn im just trying to get the variable to go +1 each second, although im still having problems with the custom event, I cant figure out how I should blueprint it
If you need precision, do it on Event Tick
if not you can use timer
but if you are doing a 0.01 on timer then you might as well do it every frame
timer is ok
FTimerManager already handle longer frames than timer interval issue
1 sec timer on loop
im tryna make the camera of the default third person template clamp at -90 and 90 deg so that the player cannot look backwards, but it seems like the clamp float does not work in blueprints as doing values other than zero just slows the movement down but not actually clamping and zero just stops the movement. any fixes? thank you
@autumn torrent Freebie
You are not clamping at all here tho
Do a check if the control rotation is within the range,
if exceed range, don't call the Add Controller Input node
ay yea i tried the clamp float but it didn't work
Not sure how you do it but clamp node work jsut fine
the input event is delta value
sry i just started on blueprints
you need to check with your current value to determine whether if you could turn a certain way or not
sorry but how do you add a check
You can either use print string and plug in that variable or right click and watch value, then select the debug object after you hit play and watch the code
Unless you meant using operands in which case use <= or >= and a branch
Convert? you mean refactor it in cpp (re-writing) it
oh do they not have an option to make it into a cpp script?
nvm then
no, why would it
Well you can try to copy blueprint node and paste it into note pad
never look into it my self
probably doesn't give what we want tho, Edit : yup that's not it
i mean this is literally just from the templates
shit seen some tutorials on clamping the camera but for some reason doesn't work on teh template
@dense mica ‘s working on BP2CPP but it’s not quite ready yet iirc
template or not don't matter imo
it's just a node
The control rotation settings could be overriding it if we’re talking rot
u can get it to work in blueprint first
yea it is
once they work, you can refactor it
im like super sleepy now and I couldnt get some stuff working cuz I got super confused, but i'll just put here what I ended up with
who could have though clamping view angles is more complex then it should 🫠
While loop with no condition, what could go wrong 🙂
Diff guy I think
Idk how you went from the clean Timer by Event Cold Summer mentioned to a while loop with no condition plugged in 🙂
i was thinking how difficult could it be to clamp view angles
kept trying with tps template and found out the values are always slightly off
Oh ?
then realized there is this thing called inputscale value that is somehow hard set in the PC
and EIS default are built to go around this hard set
....
Wdym Deprecated preceded by ToDo

Oof
Don't use while loop, also the condition is set to false so you actually never run the piece of the code in the loop
And if he manually sets it to true… infinite loop maybe? 😀
Is it possible at all for a camera to switch back and forth between fully orthographic and Perspective during runtime?
I’ve heard there’s some issues with the ortho right now. Why not just rotate it to look that way?
updated it to (probably) the right way
not yet right, but, no, infinte loop as far as i know
You're just setting the same material and changing a bool to true then false 5 times
In one single frame too, as opposed to updating a variable per second like you inittialy asked
It doesn’t get fully orthographic even at 90degrees directly down
I heard about the issue too, was wondering why they still haven’t fixed it after this long
Well yeah I meant if you just ticked it True instead of adding a condition
this is sort of the answer, but will need to disable the depreciated input scale thing from Project Settings->Input, and use EIS modifier if you need some scaling.
inventory component doesnt not inherit from actor ... well its an actorcomponent
Actor =/= Actor component
if you are looking to find a component from the actor
you should use Get Component by Class
Get owner gets the actor of the current component. Either use the above or cast to the actor bp and get the component from there
Thank you guys
Why my character speed drops to zero fast from 1000?
Need more data
I increase the speeds in stages: 300, 400, 500, -> 1000
as I hold Move Forward
When I let go Forward, the speed just drops to zero, instead of slowly reduction
There might be some settings on the CMC but it sounds like maybe you should be using a vehicle instead of a char
Which setting Braking?
I can’t check rn
Ik there’s acceleration/deceleration for pathing (navigation) but not sure about normal movement
If I use a vehicle class, can I use animal as its mesh
Not sure, but I imagine you can use any mesh
If I do it ragdolls it self
Yeah maybe stick to character then, especially if you fixed the issue. I wasn’t sure what you were making
No you are right but i wonder if it'd work with character mesh. Experimenting...
After having a 3 am revelation, I figured it out, a thing needs to be fixed but I got the 1 second interval timer working, timer reset in mid cooking and timer continuation after 5 seconds
thanks for the help yall
I need help with my blueprints. I want it so when the player overlaps with a capsule component that it destroys a cube but it doesn't seem to work. Appreciate the help!
This is my blueprint
@humble sedge
- Where is
Referenceset to the Cube you wish to destroy? - You don't need to cast
ReferencetoBP_Cubeif you already selected the Variables Type to beBP_Cube. - You should not call
DestroyActoron the Capsule before doing everything you want to do.DestroyActorshould always be the last node/function/method you call.
why the conditin is falsetrue? (in false image in UI, true image in main character)
I need your help. I'm fairly new to the UE5 community. I am looking for help in creating the following system:
- There is a main gui with three buttons: Voting, timer and registered to vote
- After pressing the voting button, you can start voting, which lasts one minute
- There will be four buttons in the second gui: For, against, abstaining. At the end of the vote, the exact number of their presses will appear in the voting screen in the first gui and on the screen next to it
- When the black button is pressed, the names of the players who clicked it will appear in the registered to vote screen
- In the timer screen, you will be able to set any time countdown that will appear on the side of the screen
Hello! What would the best way be to move a pawn to a new location without using the navmesh? I'm trying to make a flying enemy and I'm not sure the best way to do this when not using the "AI Move To", but that requries a nav-mesh and I don't want to need one since they are flying over breaking platforms the player will jump onto. It should follow the player
where is your print string?
Im making a simple game so i dont think i should be using lumen but what should i use then
screen space
screen space seems a bit to mutch as whel as ray tracing
cheaper than Lumen
Do you know the game devour?
I'm not a tech artist but that's what I'm using
I have an assassination animation, and I want the player to lose stamina at 3 points in the animation. I have multiple other animations which I want to do this with (such as a vault). Is there a way to mark points of your animation which you can easily access in a blueprint?
Anim notify
Why did I not know about this... I also don't want lumen since I'm making a styalized game anyway, and damn my FPS just went to freaking high amounts because I switched to this....
depending on the hardware you can even get double the fps
ahh thank you!
Yeah, I mean, I got A LOT MORE: 😄 I don't know if it's double, but damn, it's loads more. 😄
hey guys, might be silly question but is it in your opinion a good practice to try to do most of the code in chunks with functions instead of having it all in your bp character ? I initially started to have everything there but I found it more tidy, not sure if that is worse or better for performance (or it doesn't really matter)
that have no impact on performance
you best move everything you do repetetively in a function
many thanks mister
But it will definitly help you keeping stuff clean and easier to read. 😄
(Remember looking at the first time a friends used Unity and literally did everything in update). I mean it works, but man it was hard to read. 😄
I have a large graph with many nodes
My normal FPS is around 60
If this graph window is open and displayed while the game is playing , the FPS will tank to 20
So , moving code to functions will help somewhat
0o my bp spaghetti is a lot bigger but it has no effect on fps
Never know they can drop fps
was driving me nut s figuring why sometime when i play i got 40FPS less
yah , 4k
If i move any window, material or bp, or anything from unreal really, to other screen. Instant half the fps
Was struggling at why my FPS got butchered in Pie when it's fine on my brother's PC
turns out the second monitor is the culprit
I didn't notice any difference moving windows around on monitors
I guess bugs and quirks are Randomized per user
I tested only one window open (mesh editor) on different screens and the fps varies about 2-5 fps. So if I use my 1080p monitor it has 2-5 fps more than my 2k monitor. Actually my fps drops to 70-80 when I have many windows open (mesh editor, content browser, Quixel Bridge, BP editor, Viewport, Detail panel, outliner panel)
hey does anybody know about any template or video tutorial in which i can learn how to make a weapon attachment shop system in which main menu player buy gun and with additonal money can add attachments to it
.
How do you fare with OOP? Multiplayer is not beginner friendly territory
don't know any tutorial but attaching weapon is just a node. What you need to do here is to make use of Data Table and structs. Once you know how to read and pass data, you can make shops where you can buy gun, etc
Okay, what about the LAN?
ohhh okay actualy i know how to implement gun shop system but not good with attachments to those gun
Easier but if you just started using a game Engine and have no experience in Coding. Avoid multiplayer
there is #multiplayer channel, it has compendium you can read in the pinned section
okay
what about this system?
What system?
.
this
I mean that's multiplayer
You can read the compedium to find out how to replicate variables and RPCs
voting is rather simple, you just need a boolean variable on each player that is marked as RepNotify
If Client votes, it just need to send a Server RPC to update the variable
But again, if you just start with Unreal, avoid multiplayer
Do you have a good guide to learn this?
Reading the compendium would be your best learning source.
Then I do some tutorial because I am not a good learner https://www.udemy.com/course/unreal-engine-5-cpp-multiplayer-shooter/learn/lecture/31455746#overview
What is 'Replication'?
never gauge performance with editor, atleast do it standalone or packaged
unless you are trying to figure out why your editor performance sucks
I am creating a vehicle that moves kinematically all through lerps. What would the best way to implement gravity? Would just applying a lerp from above to simulate gravity work? And related to this, what would be a good way to implement collision with the ground? As I understand the car should hover slightly over the surface of the road otherwise it gets stuck because it collides with the ground. Thank you!
thanks mate
Not really blueprint specific, I'd imagine, but I have no idea on which other channel to post this. Has anyone got an idea how I'd achieve this camera character fade (like in the clip)? I think I could just take the distance from the camera to the player and based on that, change the character material, but I am pretty sure there could be some other solution out there. I reckon the Camera doesn't have anything like 'hide parent when clipping'? Can't really check right now
Used to be me, Its not something all Unity devs do trust me, I prefered having most things in functions, but now since I do Unreal Engine I honestly barely use functions 😭
I forget exactly how it is done , but it is a material effect plugged in your Characters Material's Opacity Mask
This might be what you need
https://app.screencast.com/k7naV9L8rr4zB Makes the leaves fade out when the camera is close
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
Can someone tell me why this happens?
As soon as the car travelled a certain distance from where it was spawned in, it simply gets destroyed as in the player controller gets disabled and the blueprint deleted from the scene.
I'll try
still
base map from when you start a blank project
Car is made by me
Try printing out your car's Location on tick
Use a long Duration, and something in the Key to make it not fill your screen
See if the car disappears at a similar spot ( Like always ~x=100000)
actually the position in the world isn't the problem, as said it only happens when the car travelled a specific distance away from where it spawned
So that means, I can position the car at the spot where it dissapeared before and can drive further into that direction
adding new variable is bugging me, how to fix it?
clicking the +Variable button opened an unrecognized tab
Crappy UE bug, have to close that 2nd Blueprint Tab
upgrade to ue5 maybe 😄
how to reopen the MyBlueprint Tab?
i closed both of them 😄
got it
window->myblueprint
heh
Any idea why Keyboard Keys won't show in blueprint actor?
Like the Event?
so no idea why that happens?
nope, I only found one post with same issue suggesting the same fix I already said
hm weird
/portfolio freelance
Hi! So I've made an AI controller in UE5, but I want the player to be able to interact with it (top down game) but when I 'Get Hit Result Under Cursor by Channel' it does detect other stuff, but not my AI, how do I fix this?
An AI controller isnt a "thing" you can click on, you want the Pawn that it is controlling
so , Under Cursor>Cast to Pawn>Get Controller
you need to click the autocomplete command
yeah lol.
Now it's saying that I need to delete my old message. I was posting it again, because I posted about a month ago, and I figured no one would scroll so far up.
But I can't seem to delete
you can always bump it
When having a climbing system, would you guys recommend a line trace or sphere trace?
My project has these target marker actor variables (just empty actors that mark when an enemy can be locked onto) that spawn and despawn constantly during gameplay.
Is there any way to stop these target markers from going up in number to infinity during runtime? Whenever one spawns and despawns, the ID increments. Is this nessecary or can I get rid of it?
this is probably a simple question but how would i get the current player
like this but i need the index to match the current player
@leaden plaza are you doing local multiplayer?
im doing multiplayer
Local multiplayer is not networked
should i take this to the multiplayer chat?
Like split screen
no
well then don't use that node, the Player Index refer to Local Player
Like Split screen , Controller 1, 2 and so on
ah
You should read the compedium linked in the pinned section on #multiplayer
The info you need is written in the compedium. The player state have a list of all connected players
game state*
ok ill look at that thanks
so, I have a line trace set up for a searchlight that detects if the player is within the searchlight's zone and then gives them the game over if they get caught
only issue is the character in question is short in height and long in length so I've had to set up the capsule component like this:
this of course is creating some really scuffed detection with the line trace since it's a cone that comes down from an angle.. is there a way I can have the linetrace ignore the capsule component and only trigger when it hits the character's main body?
I tried setting up the charactermesh to block all and the capsule component to ignore trace responses but then the vision cone just ignores the character entirely.
is there an add controller yaw blueprint thats relative to the character and not the world?
or a way to do that
wait nvm
Does anyone know how to select an asset in the content browser through blueprints? I can find the asset using Get Assets by Path but I can't seem to find anything that lets me highlight, go to the folder, or open the asset.
did you try turning off context when searching through the blueprints right click menu?
Ooo always forget about this! Am using sync browser to objects and seems to work, ty!
I was wondering if anyone has figured out the best way to "reset" AI when the player dies? Right now when I die I re-spawn at a checkpoint but if there was an AI chasing me close to the checkpoint they will stand in-front of me when I spawn and instant attack since it's not reset. I don't know if there is a way to make a "base" AI event I can call to reset them to start.
What do you mean “select an asset”
You probably should not need to do this
it was to highlight an asset in the content browser, i just wanted to a button to find/highlight it so it's faster to open since it's an asset I use a lot.
line traces are weird man... I have it set up to only trace visible channel, but for some reason the only time the line trace is picking up my character is whenever its origin point is inside the trace
like this counts as not in the AOE
but this counts as in the AOE
how do I make it so that the line trace picks up the actual character model this is so frustrating
Is that 4 line traces and you want what is inside? try Box Trace or Sphere Trace
it's a line trace direct to the player character that I added a bunch of conditionals onto like is the player within range, then is it within the AOE of the light (using forward vector to draw a line down the centre then using an angle to calculate if it's within the AOE) and if all of those are true then it gives the proper output
So i'm trying to setup a third person controller in an RTS, by attaching the current camera pawn to a another pawn and then rotating the camera with the control rotation. Its a bit janky but the main problem is the character themselves doesn't turn but i am able to get an Aim offset to work. I dont know if its the control rotation itself but i suspect it to be. has anyone tried something like this before?
ahh, is the red ball the Char , and the Transform Widget the Origin?
Have a Socket on the Ball Mesh and use the socket's world transform to calculate if its inside
Instead of Actors Location
at a higher level than that, you should draw your traces so you can see what they're doing
What do these white dots mean? And furthermore, does it imply some extra performance usage / potential for problems in the future?
those 2 white balls means the variable is replicated
multiplayer
ok so it's not a problem
yup, dw about it
one last question: is there a better way to get the player controller
If you are doing single player, just get player controller 0
there is only 1 player controller in the world
If you want to avoid less node to reach your custom controller, you can make a Blueprint library that gets your controller from a pure function
Yeah for single player it's real easy to make a macro library and add get player controller that then cast to your custom BP as a pure function to save space
hmmm
function library and macro library are not quite the same thing but yeah that works too
I'm trying to keep things rather modular right now but I'll probably create a universal function library for the final iteration of this project
Hello! I'm trying to lesser the amount of casts I have, and I came to the blueprints. Say, will this arrangement of nodes still change the parametres in the core Monster_AI Class?
yes thats fine
squints "Event Bluprint Begin Play" makes me nervous though. What is this custom thing that looks like BeginPlay but is not BeginPlay
It is Begin Play
just for Animation BPs I think
oh yeah, derp
Just a headsup that in this case it is better to use Event Blueprint Initialize Animation, which activates before Blueprint Begin Play does.
In some cases, your current setup means that you will try to retrieve the reference you are setting on beginplay, before it is set because initialize animation has already run 🙂
Separate question; When enabling the GDT during runtime, it seems like I permanently lose visibility of print strings. Anyone know why that is?
Is it better to use events or functions if my code could work equally well as either?
I advocate strongly that functions should be used for calculation only (no side effects) and events should be the things that do stuff. Although Rep Notifies break this logic.
Anyone have any idea why this works as a means of controlling a 3rd person camera until a mouse button is clicked (at which point the camera just locks in place)? The events triggered by the mouse buttons don't do anything concerning the camera nor specify to disable mouse control of the camera in anyway or remove that context. This is in the actual character BP.
Ok I need a place to start learning on this problem. I have one actor that throws another actor. But if ether of the actors are destroyed and respawned the other actor is no longer reference thing blueprint because it is a new copy. How do I apply the copy of the actor to the newly spawned actors blueprint.
Yup I needed to dump something into Pastebin
Here is my possession trigger.
This is in my Player Controller.
I want to apply a copy of the blueprint to a newly spawned character. I think it needs to happen on the Is Valid node when Is Not Valid fires. How would I get the blueprint copy and have another blueprint NOT make a new copy of the blueprint and instead use the selected copy.
For the character blueprints I think I would just make a reference check like Character_Copy_0 == Character_Copy_0 then branch of the false and apply a new copy some how.
get player controller should work on multiplayer too<
Is there a way to change collision behaviour of Chaos Vehicles? Because of when I hit one chaos vehicle with another, basicaly the car does crazy flips most of the times or gets pushed back extremly and sliding in circles
I'm doing an building system and found 2 approaches
- Adding sockets to snap to target building or 2. Use box traces
Which one is recommended?
hey so this code shuld work so that when the ai reaches the pleyr it plays the montage, but it doesnt and i dont know why any help?
it has to be a problem with the animationbuleprint but i dont know whats wrong with it
I have this blueprint to alter the HP of an actor. Currently I would make another identical blueprint for Mana, but is there a way to generalize them both into a single blueprint? I'm thinking if i can add an input that keeps the reference to the object that called it, and gets and sets the value of that object whatever it might be.
If so I could have the bllueprint be AlterResource or someething and call if for both Mana and Health as i need no? Is this possible?
Yeah you might consider making that an actor component. You can then put that on any actor and each instance will get their own
All the logic and variables you can put on them component and make some getters and setters public so the underlying actors can use it
What does the anim graph look like? You need to setup a default slot to play montages. Should be in the unreal documentation on montages
Yeah this logic is already on an actor component to do what you mention.
I was wondering if it might be worth it to condense the functions inside the component to alter health and mana into a single one if possible, but I think if it’s just for those 2 it’s probably fine, I don’t need to overcomplicate 😄 thanks!
you could pass another value into the function for which one to do
You will need sockets for snapping. You will also need various traces to see if it’s ok to build something
Hello everyone, a question, I am using a variable of type integer and map in type actor, but something very strange happens to me, in key 1, a kind of garbage value of type unknow is stored as soon as I play the game, Has this happened to anyone?
check the details of the variable while not playing and see if you maybe assigned some value there
otherwise you are probably doing something in your code which you don't want to do...
and last but not least, the BP debugger can also be wrong sometimes...
How do you destroy a Component Object Reference ? I just noticed I can NOT destroy my cable component for some reason
only the owner/parent can destroy it
it's a "Cable Component Object Reference" and the destroy component node targets an "Actor Component"
ah !
i'm trying to destroy it from an Actor Component, so not the actual owner
yea that wont work
That's it then
alright, thank you for the quick answer !
Is it possible to attach the component I want to destroy, to the component I want to destroy it from ? Rather than the Actor they all belong to
that way my Component can be the owner and maybe destroy the Cable Component I want to get rid of
no
Damn it
make yourself a helper function in your actor, which you can call from the component which should destroy it
Not at all, I never used the value 1, the funniest thing is that I have been seeing for hours why nothing is saved in key 1 and it was for this reason
I started using 2, 3 and 4 as slots and it works perfectly
I only use it here
rightclick the variable and pick find references, and check all your code that uses it
@humble sleet Any ideas?
Only 3 😂
here are the other 3 get
Its weird
that worked perfectly, thanks again !
Hello! How do I edit this capsule component? It's causing a bunch of issues in my project, mainly when spawning enemies
Here
No, not this, I need to edit its location
There’s not much you can change about the capsule, as it’s directly tied into the CMC and changing stuff would break the whole thing. The capsule itself is necessary for pathing, obstacle detection, etc. so saying it gets in the way is like saying your wheels get in the way of your car
Not possible
What is the issue you are experiencing
guhhhhhhhhhhh... My enemies always spawn middle-deep in the ground because of this, and I had to insert a manual fix for the coordinates for them to spawn above ground
But of course not all enemies are the same size!
Move the mesh itself
But then what about collision? I need it to register hits from players!
You can change the relative mesh location on construct as well
What about it?
If I move the mesh itself, then the collision won't fit the mesh anymore
I tried that - the player is hitting the mesh, but it doesn't collide, the hit doesn't register
You might be missing something in your collision settings. Can you show what’s happening and your collision settings on both ends?
One question, I am destroying an actor, but when I test it on the client side, I get an error when I want to destroy it, I think I know the reason and it is because it is destroyed 1 time on the client and 1 time on the server, how do I do that? be destroyed on the server? with a has autorithy?
Well, here's an example
See, I had to lift this enemy's mesh above the initial capsule
And in order for hits to register, I had to create yet another capsule which has absolutely the same settings
I wondered if I could just use one capsule instead of two, seems cheaper, and I wouldn't want there to be confusion as to which capsule the sword is overlapping upon hit
Because technically, the hit can register twice if it hits both capsules, yes?
Depends what you mean by hit. If it’s a line trace, no. If it’s shape trace or capsule on capsule, probably
Overlap and Hit are not the same btw
To get a hit, you need to Block, and for both overlap and block you need to have the generate overlap or simulate hit (respectively) event ticked on
You should also be able to add collision to the mesh itself and detect complex collision that way rather than adding extra capsules
Depends on how precise you want this to be
Generally speaking tho, adding shaped collisions to your character will extend its collision “bubble”, not duplicate it
the game is a roguelike so everything on the screen is rather small. I figured simple capsules will do
Yeah, they should be fine
Even box collisions if you want to go HAM
A sword hit. The sword has a collision
Okay, I suppose I'll be using two capsules from now on
Thank you
Ik but you mentioned overlap, so what are you testing for, block or overlap
Overlap
Is there an easy way to convert base 10 to base 3 and check the nth value?
- On my HUD I am using Get Actors in Selection Rectangle to return a bunch of selected units
- On these units I have a sphere collision component, which is used to detect if that unit is within range of their intended attack target
The problem is, my the Get Actors In Selection Rectangle is picking up the units at the edge of their sphere collision and I want that sphere ignored during the Get Actors in Selection Rectangle.
If I turn off collision on the sphere, then the Get Actors in Selection Rectangle works, but the sphere then no longer appears to be tripping the overlap event that I need.
How can I configure the sphere to be ignored by Get Actors in Selection Rectangle but still generate overlap events?
What's the best way to troubleshoot an unknown structure in a decision tree?
The error doesn't exist in gameplay until i try to build
How can I: have static mesh in one location > having player to interact with a button to start playing niagara particle system > destroy existing static mesh > create new static mesh in the place of old one > stop niagara particle system?
how do I make raycast ignore the weapon in my hand in Child Actor Component?
Question, is there a way to get SpawnActor to spawn in the editor outside of runtime ? i want my level to auto generate before i press play.
3 color wang tiles
Is there any available developer here
you've essentially just described every node you need in order:
have static mesh where you want it
on button interact, spawn niagara emitter wherever
get static mesh component from whatever object had it
set static mesh to a new one
destroy niagara system
I kinda did it. Now I just need to put trigger to a button in VR
I would avoid using the level bp for this
It's a fossil from UE3, and in this instance, shouldn't be needed.
Some resources on blueprint communication are in the pins
To be honest it's gonna be only one level that should showcase before and after location with player interaction so I think it will be enough.
Here is my issue, any help would be GREATLY appreciated!
I have 2 widgets. Widget B inside of widget A.
I want (when I press down from the Map Button at the top) that it will go to Map Area A, and Up on Map Area A it goes up to the Map.
The Map Area A Button is coming from a widget switcher.
If I move the button UNDER the Map section it works fine if I press down etc, But I want it on the left.
Normally if the buttons are on the Same widget I can just change the Navigation pane and turn Up to Explicit and pick the button.
But since these are 2 different widgets I cant do that.
I can put a custom Function but I am not sure what I need to put in there to have it select the Map Button from the Other Widget.
Any examples of a function that can call on a button from another widget to navigate to would be a HUGE help!
That's fair enough. I would still consider learning the desired way to do it however. It is a necessary skill to have if you decide to expand or work in Unreal more 🙂
To be totally honest, I'm more of modeler than programmer. I only use UE for small projects such as showcases and studies projects. Maybe one day 😄
When I create stuff for games I mostly write step by step guide for my programmer friend and he takes care of that 😂
That's certainly one way of doing it :P
I'm like that green toy from Toy Story that goes Ooooo, Ahhhhh when programming happens
Stagecast puzzles, games, animation and sims
I don't have any, im trying to figure out the best way to do it. Each edge can be 0-2 which determines that edges color.
it makes it easy for generation and checking if edges match etc. with two colors you can do it with a bitmask and bit operators.
what is accessed none trying to read property callfunc?
I'm getting it here, but there is no TransferManager
im ok with c++. I know how to do the math/algorithms but dont know how to expose it to BP since its not an actor
You have a few options for exposing it to BP. UObjects, a BP function library or subsystems (managed lifetime singletons)
can someone tell me why my exp gets set to infinite after the first time i increase my exp
oh wait..
okay now the max exp is getting set to NaN (all I added was a set exp to 0 in the increase level function (after set levels to give to 0))
give the example numbers you want?
also use breakpoints and trace it
F9 on the node, then run it
you can also watch values
by right clicking
ahh thanks this helped
How can I get the third-person character's current input direction?
Especially relative to world view.
if you do it in the player, then you don't have to care
Well saying it will work for multiplayer without context is not a good idea. The wise ppl said it's a bad practice
Use the appropriate node instead
And the reason is stated in the article
what's the appropriate node?
Written in the article
i ain't ready all that
And also why get player controller controller with index can do harm
what
5.1 Filter by NetRole , will it fire the server and all clients?
I saw some forum posts that there's a compare function for checking string's against each other to determine alphabetism--is this a c++ only thing, as I dont see a compare function in blueprints?
I don't have editor open, but i'm pretty sure there is isAlphabet node to check if a given letter is alphabet
FString UAGLibrary::ProcessIllegalCharacterForName(FString StringToCheck)
{
constexpr int NameMaxSize = 13;
if (StringToCheck.IsEmpty()) return StringToCheck;
if (isspace(StringToCheck[0])) //First letter can't be space
{
return StringToCheck = ""; //Return Empty String if it is
}
if (StringToCheck.Len() > NameMaxSize)
{
StringToCheck.RemoveAt(StringToCheck.Len()-1);
return StringToCheck; //Maximum Character reached, return String proportionally
}
for (int i = StringToCheck.Len() - 1; i >= 0; i--)
{
if (isalpha(StringToCheck[i])) { }
else
{
if (isdigit(StringToCheck[i])) { }
else
if (isspace(StringToCheck[i])) { }
else
{
StringToCheck.RemoveAt(i);
break;
}
}
}
return StringToCheck;
}
My code for entering Player name in my project
Actually in blueprint, I can only find IsNumeric
so not sure how you can check for symbols like !@$%%^&*)_ in blueprint
well I guess you can make an array of illegal characters and check if your string contain any of it
ty, I'll know the strings that are being compared and they are regular chars so I ended up exposing the FString.Compare function from c++ to BP in a custom function.
That will be equivalent to == in bp isn't it?
but take it with grant of salt, I am wrong plenty of times
can you push anim montages on the aBP as a single event instead of an actor?
How do you push? I thought play montages is the only thing that can be used for anim montage
so far, everytime i did a montage, it would be in the character or actor class
the problem is that i have a few montages and am making data assets
should i make a var for each montage?
or instead use a BPI, tell my anim BP to play the montage
as i type this, it is starting to sound better and better to do the latter...
Not sure about this :3 I reckon anim bp job is to just read the owner properties and command
well to consolidate all anims in a single source instead
Don’t make an animation controller do non cosmetic stuff
of you know... reference all of them
it is cosmetic
it's just to play a "get hit" and "die" montage
Montages are often not cosmetic
so what's your reasoning for not doing it?
Montages are closer to game logic. They have notifies and root motion. Anim BPs are entirely local for multiplayer and should not drive game logic
Make a function to pick the appropriate montage in your actor
the root motion and notifies are not an issue, there are none
multiplayer is an odd argument, I would think the anim BP is replicable
It is 100% not replicated ever
Anim bp does not replicate
it's probably easy too to just read everything from the owner (character or the likes)
Your question seems to be about how to avoid having several vars when you have a few options for montages when hit. The answer is to make a function.
I'm using data table to play my Combo montages
so I have an overhead and RTS camera. The RTS camera is attached to a camera pawn, and then the overhead camera uses a Set View Target With Blend to change to another camera, attached to a pawn.
The issue is that I can't seem to figure out how to restart ai logic once i unposses the pawn and switch back to the RTS camera
@fringe junco possibly respawn the AI controller if it doesn't exist anymore
And then checking the brain component of the ai controller
Maybe you gotta start it again
hmm so i dug into some functions in the brain component and they are straight up empty
all those bp callable funcs related to logic on the ai brain are all unimplemented lol
and the ai controller still exists unfortunately so im a bit stumped
do things like play rates for timelines and delay timers account for framerate? or do I need to multiply all my floats in those by deltatime manually?
Timelines, yes, delays I don’t believe so. There’s a caveat for the former tho
For a lerp on a timeline to be frame rate independent, you have to lerp between cached variables.
In other words, if you try to use a lerp from x to x + 1 , it won’t account for the frame rate. Has to be between x and y, if that makes sense
so if I created 2 variables, one being something's current position, and the other being the target position and then lerped between those 2 variables the timeline would become framrate independent?
Yep
ok cool. What I'm trying to do is I'm making a minimalistic puzzle game where all the level's flooring and objects either rise up from below the camera or drop in from above to build the level as it loads, but I've noticed it's been running them all at different rates depending on the framerate
Does anyone know how i could add a slide mechanic the crouching works but know i am lost? I want it so i cannot be cancelled and i want it to put the player in the slide position
how would i inplement that?
Hey everyone, I'm looking for some hints into what I should be looking into to achieve this effect.
I'd like to have a crosshair that is rendered behind the player (Could be UMG or in 3D space)
But that crosshair will render over everything else (so if a rock goes in front of the crosshair, the crosshair will still be visible.
I expect that I need to mess around with Z-buffers here?
Full solution is not needed, and even a little hint or idea is very much appreciated :)
I think you will want to use Scene Depth and Stencil Buffer and Post Processing
Masking enables you to alter specific parts of your final scene without affecting everything else in it. There are several options in Unreal Engine to perform real-time masking.
In this episode of Unreal Tips & Tricks, we focus on using the Custom Stencil Buffer in a Post Process Material which allows us to alter how multiple objects are rende...
Thanks, I've already looked at this video but it made me realise I have quite a unique problem
because I want the crosshair to be rendered above everything besides the ship, but the ship needs to only render above the crosshair
idk if I'm wording it correctly, but yeah you might know what I mean'
I'll do some more research ty!
Always see the Crosshair (Unless Ship is covering it)
yup
Hey folks
Any idea why I can't see nanite triangles in this viewport when I have selected it?
("Build Nanite" is ticked for the meshes)
Unreal 5.0 if that makes a difference.
Any idea why this happens> https://gyazo.com/db9cc36941bb0d90145b4238b3d41559
It works fine, if I hold forward, when I hold backward S key. that happens.
I'm looking in to this as well, gone through chat log to find examples and this might be a start. If I find something that works I'll let you know.
When you say you want to stop it from being cancelled do you mean you don't want player input interrupting it? If that's the case you can maybe try swapping mapping contexts during the slide.
I'm guessing the top left & right points have the same X value such as -180 direction? That's normal because when walking back yuou
'll bounce around the number and not always be exactly on it
If they have exactly the same animation shouldn't be an issue
As someone else said, if you want to prevent an action then using a boolean or gate to prevent going into a behavior until you do something to set the bool back to false or gate to reset before you're allowed to do it is the best approach
Don't know if this is happening to you, but I had the same thing because I was using Shader Model 5 in editor instead of 6, and I didn't have Global Illumination on
Sounds like my own brain functions 😁
hmm. Not even sure what the first part means
where is the shader model 5/6 settings?
it jitters and shakes
If you mouse over the top right label for your project, what do you see? It's the bottom value
What about these
Are those 2 points the same animation sequence?
You'll need Direct X 12 SM6. Uncheck the DX11 as it doesn't support Nanite so it's using the fallback method. I believe UE5.1 or 5.2 makes it not experimental
Yes
All bottoms are idle.
Top corners are backward and next to them are backward right/left
Ah! You have a negative velocity! Moving backwards isn't negative Y axis... it's positive velocity but with -180/180 direction. Here's mine
Oh you fixed it in the 2nd image
This is original. I was trying something.
Maybe instead of a blendspace player, drag the blend space direcly into your ABP's AnimGraph?
So is there a fix beside using anim montges
I don't use anim montages for locomotion, so it's possible
Doesn't help.
How are you calculating direction?
anyone knows if there's any way to make a component class impossible to add to an actor via the editor? like, never shows up in the choice dropdown and can only be added from code at runtime
Yes, in C++ land
Using calculate direction
Make a blend space with idle in the middle
instead of your axes being angle and speed, make them right and forward speed
so i got locomotion and other machine state, what I need is a locomotion (aka walk animation) to play while my ohter machine state is active, what can I use to achive this?
since only 1 machine state can be active at time im wondering how do Achive this
Layered blend per bone
i can use this even if other machine states uses upper part of body for animation?
am i stupid or is ue5 stupid?? WHY ISNT THE LINE DRAWING (it shows in the preview too, just doesn't draw in game
Are bools preferable to swapping mapping contexts when you want to disable certain inputs during events?
Depends on how complex you want to get, if it's one or a small # then booleans/gates are fine, if you have a ton of inputs you'll want to use the Gameplay Ability System or something more robust. I personally wouldn't switch mapping contexts at all and just prevent normal execution during that phase via boolean/gate
All idles at zero. Speed -200 to 200. Direction -180 to 180.
Unless your use case is unique, I'd consider using only speed 0 to 200, negative velocity isn't really a thing as 'backwards' is just + velocity with 180 direction
For me, I have a "sleep" button that disables walk, jump, attack, sprint, and a few more actions. I did have a bool (isSleeping?) applied to all these actions but I read the other day that swapping mapping contexts costs virtually nothing so I removed these bools and simply have it so there is an add "sleeping" mapping context and remove default mapping context when I press the sleep button (reversed if I press sleep again). Was this a bad idea?
I haven't heard of that approach, it may very well be better since you'll be using it for multiple actions. Do you have a link to the tutorial/documentation? But if you go with booleans yeah a single isSleeping with a check on each action is how I'd do it
I personally have "CanCrouch" "CanFire" "CanReload" pure functions on each action that checks all those things in my game such as making sure you're in the right state. GAS would probably be btter, or maybe the contexts thing you mentioned
So speed 0 - 200. Idles at 100. What's on 0?
0 should be idle because you're not moving. 200 should be your fastest animations, anything in the middle if you have
This code is correct right? Im trying to disable input of all characters have the tag "Stop"
I didn't follow a tutorial for this, I read it in this Discord that mapping context swaps don't cost anything. I just figured it would be more efficient than having a load of bools being checked when inputs are being made.
Oh, ok then I should research this subject. It may very well be better for your use case
What about back, back left/right
I was trying Adriel solution
Idle 0s 0d
Forward 200s 0d
Forward Left 200s -90d
Forward Right 200s 90d
Backwards 200s -180d&180d
The conversation was in this chat, I was advised by another user to just swap mapping contexts and ColdSummer stated that there was "0 cost" to removing input context.
So in searching that seems like very new UE 5 stuff, since I started my project in UE 4 I don't know much about it but he seems right that it is better
It sounds like a sound idea to me. Much better than having a ton of bool checks everywhere thats only used to disabled/enable the input.
I often just remove context mapping when I don't want the player to be able to do something. It also allows you to add a new mapping with different Input Actions that would have used the same inputs as the previous mapping but to fire different events.
It does take a little more thought planning wise if you have a lot of inputs but I would say it's better.
Yeah, I don't think this was a thing prior to the Enhanced Input system.
I'm pretty sure there's a wrap option on blend spaces. I would imagine -180 and 180 are the same and just need to wrap.
That's a relief to hear. Would be a bit miffed if I had to swap back again or find another solution.
Yea, enhanced inputs is very versatile. I'm pretty sure the idea behind input mappings was to add and remove them as needed and help prevent input conflicts when control sets gets complex.
does anyone know why I get such a large difference between the animations in these 2 videos? There were no changes in code between them, it's something I get every so often in the editor where the first couple of simulations do what the first video does, then after that they all do what the second video does which is what it's supposed to do.
Is this editor only or could this happen in the actual game?
They both use timelines but the start and destination positions of the objects are stored as variables before the timeline is started so they should be acting independent of framerate
Hello dear friends, I have the following problem (thanks to anyone who tries to help me)
I would like the camera not to move when I slide. Can someone tell me the blueprint function for this?
Hello! I'm having a weird bug where packing a game packs an old version of the game. Any new test changes I do in the game won't get to new packages.
Project has been rebuilt from source, deleting all the binaries, intermediates, build and any cache found within the project folder. I also forced rebuild from scratch in the project settings.
Still, when packing for Windows I still see a previous version of the game that is not what you have in the editor.
I think I even deleted some temp folders from windows, that forced UE 5.2 to rebuild shaders, but once packed, the problem persists.
Any clue of any hidden caches I should blast?
how are you packaging for what platform ?
but latest attempt shipping
yeah, other folders, and even other computer
wondering if I'm missing some caches within the engine, or redirectores, etc.
Yeah, latest was shipping
How do yo uuse wrap on blendspace? What should I google?
is your build failing ?
or everything goes through fine ?
No fails, built, no errors, and just testing right after, the 5-6 changes I do for testing still having the old version (changing an audio, a text, an animation, or the lighting of a level).
I'll keep investigating. pretty odd.
I'm literally going through all what makes sense to do. lol
How is it moving to begin with?
Hey guys, im watching a tutorial rn about how to make my enemy attack me and I can't find the "Break Hit Result" option, does anyone knows how do I enable that option?
That's an array of hit results
Are you meaning to do a multi trace vs single trace?
uhh... i am not sure how to answer this
the second image is mine, the first one is from the tutorial
right so your using the wrong node
Sorry for not getting back to you sooner. Don't want to seem like I don't appreciate it. I think I found the issue. Turned on "Forward shadow" calculations previously to try and optimize lighting and reflections. Unticked that, and now Nanite seems to work.
Anyway. I appreciate your help. 🙏
So, following the topic of packing a game the result is an old version of the game.
Where are the files in the engine that are resued when packing game? clearly not just the bin/intermediate but somewhere in windows and or Unreal documents folder? I would just clear any potential cache that can be reused when packaging.
Thanks!
How do i reverse for EACH loop with break?
there is no such node
only For Each Loop with Break and For Loop with Break
What do you mean reverse? Couldn't you just reverse the indexes?
so if i save player as a variable and call it in Tick function in ABP it always fails it only works if I cast it in tick but I want to avoid that I dont get it what is the issue
just replace this with third person character its fine
GetOwningActor() is the correct node
thank you
like this?
no that doesnt work
unfortunately
Hello, I need some help with file loading, using FinishRecordingOutput I save recording as Wav File, but can't figure out, how do I load it after it? The reason is I want to save it as files that can be loaded when game is launched again
Hello, I've put an event that something will happen and there are like 10 spawns in the level where only 3 of them will spawn an actual enemy. How can I pick only 3 random spawn among the 10 and spawn enemies?
you can use For Loop and get random spawn point inside loop from your list
Like this I find one
How?
if I put index from 0 to 3 it will always pick the first 3 and not 3 in the 10 of them isn't it tho ?
no, you can at the end part OutActors and it picks random one
0 and 3 just how many times it has to repeat
Actually, when I pack as development changes in the editor are packed in the game, when I pack as shipping, still packing old versions of the game (and I don't even know from where tbh).
Any idea why there could be a difference between development/shipping packing completely different games?
Like that?
kind of, you should check if this will repeat 3 or 4 times, because Last Index is inclusive, but it is easy fix to just lower Last index by one, also if you don't want some spawn point to be selected again, remove selected one from your JesterBoxes list. Other thing, as I understand you want 1 of those 3 to be CorrectJeserBox, but now always last spawned will be correct one, you should create new List of SpawnedJeserBoxes and after ForLoop is complete, then select random element from SpawnedJeserBoxes and set it to CorrectJeserBox
The make array is useless here
ya, thats what I meant by saying he should create new list and pick it after
If it's always the last index it's fine. it will always be 1 of the random 3 from the many 10 anyway no?
You could be spawning on the same location tho, since you just getting a random element in the array 3 times. So its possible that you can pick the same element that is already picked
right now no, you are spawning some point, creating new array from only that one point and then selecting it with random
actually, thats a yes and no, yes it will be one of those 3, but no, it won't be random, it will be the last one picked, but anyways, all that "random" code does nothing, you can just assign it directly and get same result
How can I fix this?
Eww look at that UE4 screenshot on the UE5 docs
one sultion i see on the webs is use a negative start number and get absolute of index
just open both macros. and make your own reversed for loop with break
that shouldn't be too hard
What is your goal in the abstract?
Also, For Loop I believe is simply a macro; you could modify it intop your own
Why should I remove it? If the boxes happen to spawn in the same place of the 10 spawns due to randomicity it's fine
It's just RNG
if it's fine for you, you can ignore remove, I though you want 3 different points
Yes 3 different points
but when in the future after I got rid of those 3,
it's fine if some of those happen to respawn again in the same place
if you don't remove selected one from the list, all 3 randomly selected points can be the same one, if you remove it, it will be all different, when you will try to spawn again, you find all actors and list is reset to full again
Basically how it works: the jester spawns 3 boxes in the house that you gotta find. One of those has a key, if you find the right box all of them disappear. When the jester returns he will do the same stuff. Boxes will spawn again in random places, if it happens that one of them spawn again in the same place as before is fine as long as it's rng
So the "Correct box" is the one holding the key
so you need to remove it from a list, because if you don't, all 3 can be same 1 and 3 boxes will be spawned in same place at the same time. If you remove it from list, they will be in different places and when you find the correct one, you will spawn boxes again, but with FindAllActors the list is reset and you can get same spawn point again
just try it for yourself in play mode and you will see that some times you won't see 3 boxes, because they will be at the same place
3 boxes have to spawn together. boxes will spawn again anyway because the event triggers every 60 sec and it's fine
Yes I noticed
your array is of type BP Spawn and you are adding BP Box, change array type to the one it says for Return Value (BP Jester Box)
Isnt this the same?
no, this way you are creating new empty array every time, while in my way you have array with all spawned boxes
I want to spawn 3 boxes in the 10 random spawns without overlapping. That's it
then copy my code and it will work 😄
But spawned actors is set by what? I don't see any spawned actors set
it is just property which is cleared at begging and you are filling it inside For Loop
How do I make it? I don't find any spawn empty variable to create
create it under variables and set type to BP Jester Box
isn't it correct? is an array
array of type Actor
you need type BP Jester Box
@modest monolith sr, I have to go, try to look and example I gave you, paste and it should work, goodluck
._.
sexy?
Hey Adriel, sorry, I was in training. After eating, I'll give you all the information in 15 minutes with pictures of the blueprint and a short video that shows exactly the problem
Not sure if anyone else answered but under the axis settings in the BS, there should be an option to wrap input. There would be one for each axis but it's proabally the horizontal one you need to set to wrap.
For all the other helpful people here, I want the camera to not move when I slide and just stay in the same position as when I'm standing with the character
I think the whole thing has to do with sliding, hence the code that I use for sliding (it's a little bigger, hence 3 pictures)
I've just learnt you can set a var to private and still edit it on children of the BP using the property matrix. o.O Game changer for me haha.
Could you not just detach the camera when you start the slide and then reattach when it's finished?
when in the actor lifetime is the construction script called? I have two actors on my level, on begin play one needs the other to be ready.
When playing from editor, the construction script was already called by the time begin play happens.
When changing level, Begin Play of one actor fires before construction script of the other actor? 🥲
edit: it's worse, BeginPlay is called before the components are initialized on the other actor
the problem is simply that I don't know the function for this, so as it says in the blueprint system, I'll just look for "detach camera"
Thank you in advance
Unfortunately it doesn't work because the camera then disappears completely and I can only see the sky even though I added "Attach Camera" at the end of the code...
Hey guys, is there a way to make a spline have physics? I'm making a procedural chain using spline and I was wondering if there's an easy way to make this chain have physics or just have fake physics.
Anyone know of a good tutorial or blueprint for when a character in a 3D side scroller turns the other direction while running they do a 180Degree turn animation?
The camera is moving because it's attached to the capsule which is shrinking
you need to offset that vertical movement by moving the spring arm up
Just set the capsule relative location on tick, and drive the Z by capsule height
OK, thank you very much, I'll look into it straight away
How can I prevent a ball projectile from stacking behind the player capsule and moving it in consecuence?
I'm having issues with the isValid? node. When I put in an input object, it recognizes it as Valid even though the input object doesn't exist in the current map/level
Jaooooll it works great, God bless you
It really wasn't smart of me to overlook that with the camera and being tied to the shrinking capsule
Hey all,
I followed a little tutorial linked from the Epic forums over the weekend, it was creating a little Brick Breaker game. At one stage we created a "tool" to rapidly add the bricks to the level through use of the Constructor script. Within the logic it uses the AddChildActorComponent node.
I've noticed that, although the bricks are added to the scene, I am unable to select them individually, so, whilst I can make a wall of them rapidly, I cant then choose to delete a couple to make more interesting layouts, nor can I access any of the details for any individual brick in the Details panel, despite selecting it in the Outliner.
Can anyone think of a reason why this may be, or, offer a better way to generate this? Currently it has a Vector variable that has the "Display 3D Widget" enabled, allowing for it to be dragged around, in doing so you in effect create the top-right corner of an area to fill with the bricks.
I'm happy to try alternative approaches, but I've never managed to do too well so far when using the Construction scripts to try and make these "tools" like this.
Anyone?
I don’t really know that code is trying to accomplish
If your asking about making it more efficient, don’t have to recall get actor each time. Instead, save an reference to the actor you need on begin play
Hi @trim matrix , I'm using the Collab Viewer and trying to get the "Hit Result" back from the Base Pawn.
Not like this simple code is really gonna kill your game anyways
I'm mainly trying to see if there is a better way to check which Hit Result is returning a result.
Your doing the most simple thing
It’s fine
Prob don’t need that OR check though
Kinda pointless
You can check the first hit and set it to true, otherwise check the second hit and set it if it's true
Since you have the sequence
Got it, I think that'll help with the thought process.
Pretty sure the isValid node is broken. Can someone check this?
Because it returns valid for any object I put in when it doesn't exist in the current map/level. This shouldn't be happening
It isn't broken
Almost like it's reading my entire project file
I would be insanely surprised if it was broken
Well, it's broken for me at least cause this doesn't make any sense lol
Are you checking is valid on a class?
no matter what I set the input object to
Again, can we see code or examples?
It's checking for a blueprint
Input object is of what data type?
Hello! I'd like some assistance with this character. He's a custom BP class, and I need him to move to a location -- but since he inherits from an "Interactable class", which isn't a pawn, he doesn't have any controller on him. I tried to do "Set Actor Location" over a Lerp time, but it didn't work. Spawning an AI controller doesn't work either. My problem is that I need him to move through immovable invisible walls. Here's how his setup looks right now:
It's an object
And are you setting it though code, or through the drop down menu that appears when setting the variable in an editor window?
dropdown menu. I changed it to the rifle, but anything I set returns valid
I would expect that, if you are setting it through the editor window then it’s going to get loaded automatically and going to be valid.
Wait, it's loading the object I put in?
Hard referenced assets get loaded yes.
So how would I go about checking for objects currently in the open level?
You would need to use a node like GetAllActorsOfClass
But if I use that and the actor doesn't exist, it gives errors
Would appreciate any type on input 😅
Quick question, so this is my code, but if you look onto the left hand in the vid, How should i fix that? It moves when looking up and down. any help is appreciated
I'm using the als system
Thank you so much, man
As far as i know the AI move to wont work unless it's a child of pawn that can be possed by an AI controller. You could try adding an InterpToMovement component and use that to move it.
I see this generator when right clicking a spline, is it possible to do these generations in blueprint? I can't find a node for it
Thank you, I'll try that
hi guys I do have this code with two disable inputs and it is not working for some reason.
The first disable input seems to work works for a couple of seconds but then something must happen on the fist function (IATBP) that breaks it (I can then control the player and ignores the second disable input , notice of the 7.5 delay and also even removed the enable input). I also include the function (quite long though), do you have any ideas what could break my disable input? I don't understand it :/
gotta do them manually :/
Why, my modular character has no collision though its collision for each piece is set to CharacterMesh?
How can I blend a blendspace for falling loop and another for falling angle?
if it's all skeletal mesh stuff you need to make a physics asset for them
Each piece has a PhysicAssets, its look like only the parent get collisions the rest no
Would this be involved?
that seems to be a limitation with leader pose component
Create characters by combining multiple skeletal mesh components.
as pointed out here in the table if you scroll down a bit
Yea its working with copy
For a higher accurate collision mesh I have to tweak the physic collisions?
the crouch and un crouch dont work for me
this box blocks my camera i tried making the player collision to ignore camera but seems im not digging in the right direction
where can i change the camera to ignore static meshes on scene
Are the functions in your character BP?
yes
when i package the small game the saves go in here C:\Users\whateveruser\AppData\Local\GameName\Saved\SaveGames, how can i get this path with blueprints to be able to delete things in this path?
while in project Project Saved Dir node works ok for actual project but what about the packaged game when it goes in user\appdata
anyone throw me a hint please
I'm probably going to give adding a crouch function a try tomorrow evening so if you don't find a solution by then I'll see if I can give you any answers.
There are a lot of Project Directory functions you can use
Make sure you Append them using "/" and NOT \
thanks, i fixed it Project Saved Dir node is working in packaged game too it gets the right path
I remember switching to Swimming while I was being launched and setting up the Swimming Animation to look like Flying
you say it Does work , right?
right
nice
Would this work?
I am only having trouble with making it so the animation plays only if it is pressed would i have to split the funtion apart for that?
cause all it is doing is making you hold the button down for it to be played i want i to play when it is just pressed
Does anyone have a moment to help me with Timer questions? I would really appreciate any help. How do I set up multiple timers? Like I have a building that starts a timer when built. When I build another building of the same, it restarts the timer. Im not sure how to have the timer set to each instance of the building
this works while in UE editor and finds the path to actual project save dir on let's say for example D:\Newgame and while packaged it works too and finds user/appdata/local so it is working nice
Show your code how your are using the Timers
ok, ok, And about how many guys are you spawning , like 1-10 at a time?
I don't understand interfaces. Why would I want different actors to have different functionality with the same function. wouldn't it make more sense to make a new function for different functionality? I'm sure theres a good use im just new.
@versed sun Every building spawns 1 every 60 seconds, just cant figure out how to keep them seperate
The building bp should have the timer and spawning the units
Gotcha, ill mock something up so i can explain it
@versed sun Thank you, I appreciate it. On my last project, I just made multiple timer variables that got messy, lol
yah
Wait, does each building maintain there own spawning?
@versed sun Yes
then what timmer is it interfearing with ?
Ok, I guess that is what im looking for. When I build the same building, its timer copies the other buildings timer
That seems very unlikely
It shouldnt
The timer is on the building bp. Each building has its own
Hiya, so I am having some issues with this code atm. I am likely doing it wrong or thinking about this the wrong way but I will explain what I am trying to achieve.
So here I am trying to do a pressure plate that does various things. The actual pressure plate itself works, however I am having an issue where if I put two objects on the pressure plate it will deactivate if only one of them comes off, even though the other object is still there. I am under hte impression my blueprints should work but clearly I am doing something wrong.
Ehhh not great example. Bears and lions sound like they’re both Animals or something. Interfaces are useful when you want to have things that are very different speak a common language. Especially when they do not share a common base class so you cannot just have them provide different implementations.
Not sure what I'm looking for
Something left -> check if there's anything (get overlapping actors/components)
Just because something left doesn't mean there's nothing there.
Hi,
I’m currently working on creating a Sequence Event that enables me to reference multiple actors. In my testing phase, I haven’t implemented any Blueprints to handle the data yet. However, I’m encountering an issue where, despite setting my actors as an Array of actors, the UI doesn’t provide a space for me to insert the actors.
I attempted setting the actors as an array of string names, but that didn’t solve the problem either.
Could you please guide me on how to feed more than one actor into my Sequence event?
Thank you.
Ah your right, its always the most simple things that go over my head lol
End overlap triggers whenever it stops overlapping with any object. Not when it stops overlapping entirely
Yeah I know but im trying to stop it from ending if there is still something there lol
@versed sun The progress bar over the building. When the first is built it starts at the beginning. When the second one is built, the timer is set to the first one
ahhh
Thanks a lot, got it working now
I thought the timer was for Spawning Villagers every 60 sec
Hmm are they actually spawning at the same time though @umbral maple
Like do you have a timer problem or a widget problem
Because I don’t see you creating a widget anywhere so it seems a bit sus
I just looked closer into it, its not the timer, its the progress bar widget.
@rugged wigeon Im not sure how to fix that. I have the widget as a scene component on the bp itself
For anyone that wanted the way to do this navigation.
Create a new function, Then create a new variable, select variable type and search for your other widget blueprint, select object type. Create a set navigation rule custom plug your button from the other widget into it. Then into your return node.
Then in your blueprint design view, pick the Map button and scroll down to navigation. on Down change it to custom and put in your new function
Hopefully this helps someone else with custom button navigation.
makes sense
Does this comment make sense?
just finally getting the hang of interfaces
(i think)
would it make sense to have an interface for something like "interact". I cast rays for many things: picking up items, opening doors, getting in vehicles. could i use an interface's input to determine what to do based on what i interact with?
think of interfaces as a common connection between stuff. even tho you dont know what kinda an object is you at least know that it can do this functionality through the interface
Adjust the widget when you start the spawn cycle
that's actually the most common use case for interfaces
@rugged wigeon How?
How is it changing its progress now?
Interfaces are very common for interaction.
Just call the check for and call the interface on whatever.
Your interactable whatevers just implement the interface, and do what they need to do.
NPC implements interact, and talks to you.
Bounty board implements interact and pops up a quest window.
Chest of drawers implements interact and slides the drawer open
Herb implements interact to get picked up into your inventory
If whatever doesn't implement the interface, that's fine
@rugged wigeon
Get actor of class gets an actor of that class arbitrarily which is not good when you want a specific one
You said this widget is patented so you can get the parent actor and cast it to barracks rather than get actor of class
Whats the object for casting to the barracks bp?
Unfortunately it says error, Target must have a connection. That's why I try to stay away from casting, its difficult to find the object for me
You cannot stay away from casting
Thanks for the help everyone. I appreciate it.
Show it
watch the video in the pins on blueprint communication
once you understand references this stuff will click
a widget blueprint is not an actor, therefore it has no strict parent actor in that way
Training Center has a parent? you need a reference to the parent if so
Pins?
You can promote it to variable, and expose on spawn and Instant Editable
this button
Then the location where you're spawning the object, pass these references from there
Sorry, im still lost. I did find the pins though, thanks
Hello everyone,
I was planning to use Data table to store infos and then Add it to my saving sistem but I'm running U5.0 and i cannot figure how to update bools or use it to add ref numbers to carry it on for the next game.
Am I just crazy and cannot find it or U5 does not support it ?
I found that there is some plugin that can help with that (apparently) but I'm just wondering if anyone have a solution to my problem, thanks !!
data table is read only
How do i reference a widget blueprint from another blueprint
creating a variable doesnt work because im assuming its not actually targeting the instance of the WBP
Do you mean the class?
Class == type of widget
im trying to reference the existing widget blueprint so i can access its variables from another blueprint
Would someone be willing to jump in a vc to show me? Im still not getting it
where do you create the widget, there you would promote to variable and get to it somehow.
I load my widgets in the hud
i created the widget in the player blueprint
i tried accessing it from Get Player Controller
but i cant find it
You are referencing an instance
did you Get Player Controller >Cast to(The class you are useing)
Or at least want to
want to
cast to the class that is editing the widget or cast to the widget?
your player controller
it may be worth mentioning its a component that is editing the blueprint