#blueprint
1 messages Β· Page 77 of 1
it's 8:30, i've been doing this for a solid 12 hours now
clearly making more errors than progress now :/
or at the very least change it so its named something different lol
dont have editor open atm, so not sure if the engine includes a Start Dialogue fucntion
that should do it!
πL
so does it work now?
no lmfao, but it's definitely on the plug in side. I just wanna get this done so i can relaaaaxxxx
okay whats the next issue
Sorry
I did not ubderstand
Mqybr I did not make myself clear enough.
Im noy trying to use UI for the game logic
Im doing it in bp actors
I seem unable to start the dialogue via the line trace on my NPC, if i try via me i get Plugin specific errors
l;emme snag em
yeah I understood what you wanted. I was merely suggesting that the entire thing could prob be done using widgets that are just displayed on the screen for the player to interact with. Of course, all of the logic would be handled through BPs
Thanks
I tried opening that
But for some reason it didnt work.
I give it another try and see how it goes
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = INVALID
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = /Game/TestBluePrints/TestDiag.TestDiag
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant Path = /Engine/Transient.UnrealEdEngine_0:GameInstance_21.WB_DialogueActual_C_0 does not implement the IDlgDialogueParticipant/UDlgDialogueParticipant interface.
Context:
Dialogue = /Game/TestBluePrints/TestDiag.TestDiag
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = INVALID
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = /Game/TestBluePrints/TestDiag.TestDiag
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = INVALID
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = /Game/TestBluePrints/TestDiag.TestDiag
StartDialogue - StartDialogue - ConvertArrayOfParticipantsToMap - Participant at Index = 0 - Participant is INVALID (not set or null).
Context:
Dialogue = /Game/TestBluePrints/TestDiag.TestDiag
StartDialogueWithDefaultParticipants - FAILED Dialogue = TestDiag, the system FAILED to find the following Participant(s): NPC
StartDialogueWithDefaultParticipants - FAILED Dialogue = TestDiag, the system FAILED to find the following Participant(s): NPC
yeah just upload a ss so I can see what its screaming about
better thx lol
my participants are set...
Ok
Thanks
So what is your suggestion?
Im not a programmer. Im lookijg for some clues so I can figure out the logic
a minute ago you said that the UE4 project didn't open for you. what was the error you got?
ah man you're using a pallette lol I haven't used those before lmao. I though you were using a string of BPs to make the array. okay gimme a sec to look at this
naaaah, Not Yets plug in
when you play the game, does any of it show as firing?
lemme check, a lot worked earlier that doesn't now
It says I need visual studio and when I press "yes" to downloaf and install, it will freezes.
I am doing it now again
This timr im going to give it much more time π
My unreal engine freezes alot
Still dont know why
try downloading and installing VS outside of the engine. not sure why your system and engine are freezing. Could be software corruption or hardware issues but thats a whole nother problem unto itself
What exactly are you looking for to be firing? as far as i can tell everything is - i can get a print string from the interact via both my playter and NPC interaction
Thanks
Im not sure where and how to install it
I triee years ago and I kmow there are different versions to VS.
oh okay thats progress lol. well, I guess just tryna figure out why it thinks the participants array is empty.
How are you loading them in there? Can you share a ss of the Start Dialogue logic and how you are using it?
That's where i'm at... didn't have this issue before until i had tried to launch the dialogue on the NPC via a line...
community version should be good enough for what you are trying to do.
right, lemme see a ss of that part of the BP
as in, when its called
ask an you shall receive!
there's literally allit
awesome sauce lemme look this over
i'll be here muckin' with things
On your line trace you dont need to check Does Implement Interface you can just call it because any actor that was hit that doesn't implement the interface simply won't do anything anways.
alright, question. do you have two monitors? I got an idea
this is how i troubleshoot lol
sure do what's the plan stan
alright so launch the game, do whatever you do normally and then exit. but dont close out the message log that contains the errors, just click the clear button at the bottom. The put that into the other screen. launch the game again and then pay attention to exactly when the error occurs while going through the same actions. You can then isolate this to the BP and identify the node causing the issue
make sense?
this works 99% of the time for me in helping me identifying the issue
actually fixing is another story, but you gotta know where to start looking lol
maybe? the error occurs the moment i attempt to open the dialogue - be it via interact or just an overlap collision
at least its not on start lol okay so then its probably the second section you have commented out
event begin play doesnt have anything in it that should cause the issue.
i create the dialogue widget, s'bout it
you could also open the editor in a separate window on game play and have the BPs on the side so you can see then firing.
this is the section I meant that I think is the problem
i'm listnin'
hell i may just delete all the BPIs for dialogue and interaction, blue prints too then restart :/
ok
dialogue appears
idfk why or how i moved a few things
and i can trigger it via line trace
dude that's it i'm gonna go play some friggen halo
I managed to install the visual studio and open the project. it is mostly in C++ that I have no idead of it. everything else that is in the bluprint, it sems to be the logic for mathcing gems. There is nothing about the moving parts and other things.
with that being said, do you know any other tutorial that I can use to make the move logic for now, I can figure out the rest later
At least a genral idea on what approach I should take. I tried creating a BP for grid and a blueprint for gem as master and then made like 5 child of it. Then in grid Bp, I made an array for the gems and stoired all those gem child BP in it. and spawn them to fill the grid. I managed to use click event and as a debug test, now Im able to move the individual gems off the grid (to the depth of the screen) but I need to move them left and right/up and down and swap them with other gems. I think Im getting at this the wrong way. I think I should store the gems in the the grid points somehow.
hey sorry had to make myself some food but glad it worked! Sometimes values get cached or whatever and a line gets crossed. starting over just works lol
Anybody know why there is a Hit Hit Bone Name and a Hit Bone Name on On Component Hit? Is this just an error in UE?
Homie you were helping me for free don't even apologise. I'm just glad to put to rest an issue that started at 11 and snowballed into one greater π
you could use a nested array for this it sounds like, to store the X and Y values.
no problem. glad I could help lol
is there a way to maybe duplicate a mesh IN an actor when a condition is met?
very specific but I'd like to know
You could have one mesh hidden until a condition is met π€
Someone will probably have a better idea tho
When that new condition happens (ie. whatever is happening to trigger that condition to be changed) have that flow of logic add a new mesh component and set its mesh to the one you want to have duplicated?
could you be a bit more specific? What type of actor and what type of mesh? Are we talking like a body growing another arm or something? Or a building growing in size?
first thing that comes to mind is 'Spawn Actor from Class' specify the actor and then for the location make a call to whatever it is that you wanna create a copy of, reference the location and plug it into the location pin of the Spawn Actor from Class node. This should, in theory, spawn whatever it is you wanna duplicate at a location of your choosing. Or if you wanna spawn it somewhere else in the world, like right next to you or the actor or wherever, just specify the location manually.
by that logic, since you are creating a new instance of the actor, it will run and behavior based on whatever logic you've coded into it.
but you said mesh, so what do you mean by that?
Could someone here tell me what I did wrong? I want to make a projectile come out when I click but it happens to me that when I make the first click many bullets come out (I want one to come out) but when I press again they don't come out with that time from point A to point B. Could someone help me?
Well for starters, you are running your event on a timeline
Which means that every tick in that timeline you are firing that event for however long you are running the timeline
Lets start with, what is your purpose for the timeline? What is your goal here?
Literally duplicate a model within the actor
So I researched (tutorials on YouTube) to make an object take X amount of seconds to go from point A to point B, so I figured it could be useful there.
Okay so the problem here is you are using a spawn actor. The movement from one place to the next would be done in that actor itself not within whatever you're using to spawn it
instead what you have done is spawn dozens of actors at once
You want to spawn one actor and get its current point and its destination point, then you can lerp between the 2 locations with SetWorldLocation
for which you would use the forward vector to calculate
or.... you just use a Projectile Component and be done with it, setting the speed within it

Much easier
whatever location and transform that you spawn the actor it will take the forward direction of the actor
and since its a top down and you dont need an up/down axis aim thats even easier.
Of course, but when you put it, the projectile is not propelled and falls under the map
sounds like something is blocking and/or spawning it incorrectly
maybe something with physics, I couldnt tell ya without seeing it but thats the purpose of them
And how do I make it so that when the projectile appears it is propelled forward?
or to the location where the click was made?
well propel forward will be easy but as the click part that sounds like thats your issue
its sending your projectile through the floor because of your click. You are feeding your click data to the spawn transform in the incorrect way
I cant say i do much with click position on UI, so I cant give you pointers there, but more than likely thats your issue
mmm okay thanks for the help
If youβre having trouble animating the vehicle movement and the shooting animation, then an aim offset could help you blend the two when you need to. Thereβs also the issue of shooting the projectile at the mouse location. I found this video that solves both issues with blueprints here:
This may assist you. GetHitResultUnderCursorByChannel
Good Luck!
Video that shows implimentation. Its kinda crude for some of it, but it seems to work
oh thanks, I'll see if it helps me with my problem
I need specifics. in theory, yeah, but that's if you're typing it out in c++. Tell me what you are trying to do so I can try to picture the bps
A burger building system, where you can put as many ingredients as you want and theyβll stack up as high as the player wants
so if the player wants to put 100 pickles on the burger, you want them to appear, yes?
Yeah, theyβd stack up
Even patties
The game Citizen Burger Disorder had a system like that, although it was made in Unity
Are you sure they were just making duplicates like you said? From a coding perspective, if you wanted to make a copy of something (say an object) you would be creating a new instance of it. In UE, you would be creating a new instance of the actor.
So spawning a new actor whenever the player clicked a button is totally doable
Either copies or actors, I dont know how they did it, as the patties always stayed in place
though I would use hierarchical meshes as they should be more computationally effiecient.
yeah, just use the nodes I mentioned. as far as staying in place, thats just physics. you can disable that and they would stack to infinity lol
spawn actor from class is what it sounds like you need. as far as the location of the actors (like how the pickles stack and stuff and the different layers) thats location and collisions you wanna look at.
at least, to me thats all what makes sense in my head.
Yup np
why is it showing index 0 repeatedly? I'm trying to use addunique in component_name_bp so that it would display index 0 and index 1
do me a favor. try connecting the array element output pin to the to text(string) node.
see if it works and what it outputs
wait nvm
T_T which one, I'm a noob sorry
its ok
could you explain what this is supposed to do? like, what is going on in the game and what is the end goal?
Have you confirmed what is in your ComponentNameArray when that function funs for GetText? such as setting a break point on the ForEachLoop and hovering over teh output of the ComponentNameArray.
I'm creating a system where it calls info from firebase, then it will display it on the UI
I managed to call the name from firebase
@outer quail can you go through what I mentioned here above and take a screenshot of the array. Or we can hop in a voice channel and you can screenshare.
on component widget bp
Oh perfect
okay so this is working here it seems, its just not carrying through. Since you are getting it to PrintString for you
I use get actor of class to prints the propeller and engine, so it means that the engine and propeller is in the array right?
well get actor of class is actually a node you wanna stay away from.
they arent exactly reliable to always return the one you want.
it just returns the first one it finds
so if you have multiples it could return the wrong one, if you only have one ever loaded, then its somewhat reliable.
I see, so if I don't use actor of class, is there any other way to pass the component name array from component name bp to other blueprint?
How do you create the component? Is it part of controller or something?
Because you can pass a direct reference to it upon spawning or set it after spawning it.
I call the component's name using a firebase plugin
but more specifically i was wondering what this variable says when you breakpoint this.
okay so you just have this component on a BP and placing that blueprint in the world?
yup
only one of them yes?
so technically this SHOULD be okay, but if unreals garbage cleaning starts acting up, you could technically return an old object.
only component_name_bp. in the mainscene, I use add to viewport
and there is your widget. Okay.
Yeah i mean that should work but there is some safer ways of passing your reference, but thats not the issue atm. Try the breakpoint from above and hit play.
Lets see what that array says when you hover over it. That will tell me if the data is making it that far or not
what do you mean by breakpoint?
this?
Yes, so go ahead on the top part of that node and right click on it
Add Breakpoint
Then when you hit play
the whole editor will freeze
and take you to that node
at that point and time, you can hover over any executed variables in the previous path and see the data there. well... usually
yea its freezing xD
now whats that array pin saying below
not there the 2nd arrow, hover that
This shoudl contain both Engine and Propeller if the data is passing correctly from your component
so I click play and the editor freezes, then hover on the array right?
correct when you hover over that output pin it shoudl show you
OH!
dont forget
at the top make sure that NO Debug object Selected
is dropped down to your Widget
outside of play nothing should be there
during play that should have one item in the list
its not showing anything π¦
should be able to use the round node, which you have highlighted
But i want to round up, not round
like 5.1 to 6
try using ceil to integer64
oh, its called ceil, thanks
Well i dont see you hovering your mouse over the pin. π€ Lemme take a short video to show you, just to make sure since you arent yet too familiar with debugging.
One sec please~
I just noticed something new, I tried printing the get text that I'm using for my text block, it only print index 0
well you are running this function on tick technically
btw for what its worth, the opposite is called floor lol. imagine that
that might be part of this issue. but its going to be hard to troubleshoot this over pics. If you wanna hop on voice in a channel we can.
otherwise assistance at this point might be difficult. 
Too many variables and minor things here in the setup.
I'm at my office right now and I don't have mic π¦
or do you think that the loop is not working properly?
well heres the thing. from what I am noticing you are trying to make a selection system to choose a product type then display all the subtype stuff right?
and it needs to be dynamic populated based on parent categories?
yup
click on engine and see all the brands
or click on propeller and see all the brands
etc
I want it to list out here engine, propeller, etc
owh
this is like an inventory system for a game
yess
Mhmm. I could show you the dynamics of it in about an 30 minutes
but its gonna be hard to explain via text.
i would lookup inventory system basics tutorials
and it might help make the links for you
its okay, i will try find a video about it
if you found a good one for beginner that would help me a lot thank you
Hello and welcome to my Inventory system tutorial. This guide will walk you through the steps on how to make a simple Inventory system. I will split this tutorial in 2 different guides: super Simple System and a bit more Complex System. Letβs start! I will use UE 5.2, Third Person template. Part 1. Simple System. Step 1. Preparation. Firs...
This uses a uniform grid but you can swap for the Horizontal Box just the same

thanks I will take a look at it
and here is an indepth system.
Might recommend making a second project and following it, help you kinda make the connections and re-apply those to what your doing
but yeah essentially subwidgets are what your looking for
got it thank you! appreciate your help a lot
No worries! Good luck!
@outer quail i agree with Darinius about making a second project when following tutorial. Cause I made that mistake on one of my projects trying to mix it with what i had and had to go back to square one for my inventory. (Also Ryan L visited one of my zoom class's and is a very chill person lol)
Use source control
does apply damage node not pass the float accurately?
i have 2 attacks 1 light and 1 heavy
i put the dmg of light to 10 and heavy to 30 but both of them are doing same dmg
ok never mind it was just an issue with a threshold
i'm using the notify color to check which attack i'm doing and idk if that's the best approach. i'd like to know if there's a better way to know which notify is firing the recieved notify tick
Hey im trying to add a delay here before the next line trace, I tried adding one but got an error as well as it not working, the following line traces are configured at certain rotation to give a "spread feel" I just need the delay to work?
You can't add delay in a function
so how could I handle this? this is my rifle set up
Is there a way to do "TODO" comments in Blueprint that I Can find later? I'm thinking of in VS Code, I can add a "TODO" and that is marked as a keyword I can later find easy in a list of TODO comments. Rather than me having to remember that I want to go back to something (Since I want to test it for a build and then fix it if players like it).
So I don't leave the bad BP stuff in there. π
I guess BP comment KEYWORDS is kind of what I'm looking for.
What is it you want to do, I can't read from my phone
the end goal is to have something when alt firing to make the line trace or traces fire in a horizontal line in order to simulate firing a gun side to side, covering a small area of effect
Hello, I'm creating a VR installation and I changed the teleport to continuous walking and it works fine, and snap turning to smooth turning but sometimes when I turn left it gets stuttery and/or slower than right turning. In the turn input action the value type is set to Axis1D(float) being right +1 and left -1. What can I do to resolve this problem?
Not sure what you mean sorry. But in the case of firing automatic gun, don't use delay but timer instead. I never see any different solution when it comes to automatic gun. Everyone opt to use timer
Delay shouldn't be an option as you are not able to control the execution once a delay node is run
Here is a video with a timestamp of the effect I am trying to get, if that helps, so a timer would work then? https://youtu.be/YfSKttKEgIs?t=140
In this video I show the weapons of Blood. Blood from 1997 was Monolith Productions' first game! The game used the Build engine and was very popular at the time. It offered some unique weapons like the voodoo doll or a pitchfork. After two add-ons ("Cryptic Passage" & "Plasma Pak"), "Blood 2: The Chosen" was released in 1998 in the own Lithtech ...
I will deffinitly use timer for the continues gun fire
At basic level they are controlled with mouse press and release
Ive got that down but im wondering how to either move the line trace horizontally, so setting a timer to trigger another line trace in another location relative to the horizontal spread might work?
I managed to pass the array to scroll box, the array contains 2 index but in the scroll it only shows index 0 non stop multiple time. I want it to only show 2 name (Engine and Propeller)
did not mean to react so sorry

You are only getting the index 0
Also the casting is pointless because it's already the type
Refer to your first picture. That's where the problem is
but the array is from other bp
Don't matter
U can just drag from the return value and get the array right away because it's already the type
No need for casting
It even tells you that in the log
Get rid of the get and cast for a start
Hey
I never had issues with that but now i do.
When i change some Class Defaults settings in my Blueprint, compile, save it and then reopen my Project all changes that i made to the Class Defaults are gone and everything is set back to the default settings.
Does someone have a solution for that?
Don't delete the get all actor
Just the cast and the get 0
Put the get all actor back, pick the right actor. The connect the return value to the component name array target
ahhh
Ok now get rid of get 0
U don't need parse into array as well
Then show me the whole pic after u done that
P.s avoid get all actor of class in the future, there are better ways to reference objecrs
any keywords I can use to search about it?
Blueprint communication video by Matthew is good example but let's focus on fixing the problem
Why r u printing engine many times?
What's the expected value here?
idk its not supposed to do that
only to display index 0 and 1
or just any index available in the array
but it keeps on repeating
What is this get text function? Where did it get called?
widget
Delete it, that's not the way
dang alright
Add a vertical box under your scroll widget
Btw I know why u printing soo many engine, u bind it to the text
It just keep adding text every frame and only return the first one it found
You are suppose to add the text at run time
Not manually dropping it into the widget
I believe you wanted to get some data from your firebase api right?
yup
so remove textblock?
Ok so you make them at run time, according to the data given
Yea delete the text block
Let's do some debugging here
, print string the array element from the loop body
am I doing it wrong?
Print string the return value
We need to find out if the actor exist at all in the level
does that mean I have to put print string at the end?
No, do it right after get actor of class
like this?
drag the return value to the in string. We want to print the objects name
yup
Or did u drag and drop one in the level?
It's grey, so it's dropped to the level
K click on that component name bp
Then look at its properties (component name array)
Screen shoot that
I am betting it's empty
Hmm
I guess there is no problem with the array right?
yup weird
widget bp
this?
Yeah that
R u still getting nothing? Make sure to add a lengthy time to the print string duration
T_T how do I do that
I usually just print string on the component name bp and it works
From the loop body, you see array index. U can connect the green pin to the print string
K where u are detached from the controller
Next to the stop button I think u will see an up arrow icon
Press that to eject from the character
Then go to the outliner and look for your bp component name
okay this one
do we have to use get array or something?
Not really, for loop with go thru every single element
Are there multiple component name bp in the world?
nope only that one
K do this, on component name array. Drag from it and type length
Then you want to print that value. Do it before the loop body
For sanity check, can u add delay on construct
Before get actor of class
Just add 4 seconds delay
I think you modify the properties somehow
We can't be doing rat race as well. So I think at the start the value is empty
But then u fill it after u make request with your api
Which takes time for the data to be retreived
If we construct the text before that data arrive then we get nothing
owh I see
Show me how you retrieve the data from firebase
but if I use ontick it appears immediately but the problem is it repeat itself
I use plugin
On tick happend every frame, u don't want to use that either for this context
Now that u showed this. It all make sense......
K back to the widget, right click empty space. Create custom event.
Call it initialise data
How fast is your widget created btw?
instantly
hello, I have a question about how to set the maximum camera movement (so that you can't do a 360 with the camera on the spot without moving the character).
on screen
Go here and create event dispatcher
custom event?
You can use clamp to hard limit a value. You will have to figure out the code tho
No event dispatcher. Go to the variable tab, there will be event dispatcher section. Press the plus button
Not a function
Rename it to data_retreived
do you want me to call it or?
Drag drop, call
Do it on empty space
Connect from completed pin, not the loop body
U will be broadcasting the event prematurely
Now back to the widget
On construct get actor of class. Component name
From the return value type assign data_retreieved
I've got something like this and I still have sort of inverted control when I move the mouse to the left the camera goes to the right and when I move the mouse to the right it goes to the left
Not like this
Disconnect after the bind
From data retrieved event you can get actor of class again then connect to the loop
If u got inverted control, maybe try to multiply the value by -1?
No
Event construct get actor of class. Bind data retrieved
Don't do anything else there
just like this?
No u are still connecting the loop in construct
After get actor of class connect it to the bind data retrieved
K better. Now move the data retrieved event down and the for loop as well
okay fixed thx
From data retrieved event, make a new get actor of class. Component bp name. Then connect it to the loop
wait my ue5 crashed T_T
This is wrong , I didn't watch
U need to do the same as above
Get actor of class not get all actor of class
Hey there must be a super simple way of having a static camera as the player right? Imagine a game of jenga or something, the player just needs to be a static camera in a scene and the gamepkay is to click on objects in the scene. Can't I just make this change in the project settings somewhere?
Just make a bp with a camera and assign it as the player
That's what I'm not finding, where to set the camera as the player
I've chgecked in project settings but maybe I'm blind
Player controls a blueprint class, it can be what ever. In your case it can be a basic actor class which have a camera
Create new bp, actor class.
Name it for example my player
Then just add a camera component from the component tab
π¦
Instead initialise data , use on construct
Yes I've done that but where do i set that BP as the player camera?
You mean how to set the default player as that player?
You can look at the world setting panel
Unreal basic frame work, you have player camera manager, player character , player controller, player state, game mode, etc
U don't need to play with camera manager for simple game imo. Simply make a new actor that has camera and assign that as your player via game mode
Camera is a BP. How do I make that camera my players view while playing the game?
every time I run this it crashed my UE5 T_T
Well I suggest to create a bp which have a camera and assign that as your player via game mode
Don't know what else to say
Let's see where you call data retrieved
Show the widget again now
I have created a BP, that's the camera in the pic. This is what I see in the game mode. Where in here do I change to that camera?
U gotta stop thingking about camera. U are assigning the player which have a camera
Possessing the player will auto activate its camera
See where it says bp first person character? Change that to your newly created bp that has the camera
The top get actor of class shouldn't access component name array
Remove that
Then move the entire loop to align with data retrieved event
Tried that, there's no BP_Camera that I can select there. I can't selkect the BP_Camera in any of the menus in the game mode
Mb it has to derived from a pawn class
You can reparent it or just make a new one
select none or remove get actor of class?
owh
The construct just needs to bind to the event
it crashed xD
Ok do the same again but let's just print string from the data retrieved event. Print hello is fine
Don't go through the loop
Dont
From data retrieved event just print string
We don't want to commit to the loop
Trying to check how many request is actually made and if it's the cause of the crash
From print string disconnect
The right hand side pin
We do not want to commit to the loop
K
Had to be a pawn but also had to check player 0 as auto posses
If u want to drop it into the level then yes
There is also a way to posses a static camera
Get player controller -> set blend view target
For games like what u describe, that might come in handy
Show the whole picture again
Add a delay then connect to the loop
Try delay until next tick instead of that
I almost have no delay in my project
It's a bandaid most of the time and not a true fix
But in your case it's fine imo
All good now?
Clean up maybe. Get rid of the print string and the delay with the number
No worries, gl next
there's so much to learn
Hey I'm wondering if someone knows how to do that : Basically I want a box trace to tick once I trigger an animation for the duration of the animation. So is it possible to have an event tick that activates only for a couple seconds and how would you do that ? Thanks !
The box trace by channel node accepts and exe input so you could trigger it by almost any input. So you could probably just put the box trace node after your animation node.
Why Both Possessed and Unpossessed Events are firing when Possessing Pawn?
Possessed Event also seems to fire when Pawn is Spawned
Possessing a pawn first unpossesses it
whoops
forgot to disable autopossess
i renamed the blueprint of my character (I think that's what caused it) and now the controller isn't spawning the character when i hit play
how can i debug this, where can i check and reinsert the character
@neon lioncheck the GameMode. Strange because it should have been auto-renamed.
what am i looking for here?
I have been editing the controller's code, but the character, not the controller, is what i renamed
fix redirectors?
DefaultPawnClass but it also depends where you spawn your character from
how?
hmm, putting the hero in there fixed it, odd. thank you!
Is there something i could use here rather than getting the player by index? This is the function that gets called when an enemy is clicked on
Set Interact Target is a function that in the Player BP, it moves the character in range of the enemy then interacts with it
But i heard getting player characters by index is not ideal. Since i'm using onClicked i'm not sure how can I link that click to the player character
What is the best way to push a character back (ai enemy) when they get hit? I have a punching mechanic and I want the enemies to be pushed back (smoothly but rapidly) when they are hit. I've tried many many things like adding impulse, launching, setting velocity, nothing gives me the desired effect. The closest I've gotten is an impulse that pushes them back, but this happens instantly, like they are teleported back which is very ugly and not what I want. I need help π¦
Ai enemies are characters that use the character movement component (which is most likely the real culprit, that thing is a b*tch to work with, excuse my french :P)
"The closest I've gotten is an impulse that pushes them back, but this happens instantly, like they are teleported back which is very ugly and not what I want."
Can you add a lerp between the beginning and end locations?
@untold fossil
Does anyone know of any resources for making AI and Player controlled characters function the same? I'm currently looking at making an interaction system where it functions the same for both the player and AI but struggling to connect all the dots lol. It would be nice if there's any examples or reading material that go over any do's and don'ts.
When you say it's not what you want, what are you wanting? Impulse is normally enough but if you're wanting something more fancy, sometimes you might need to use montages with root motion where they step back.
guys how to load save data? i am opening the level in game instance bp and i need context of if it's through a load game or if it's a new game
Unless you're making a local multiplayer game, using get player character is fine. The alternative would to not use the 'ActorOnClicked' event and create an actor component you can place on your player character that handles clicking on stuff.
If you're handling it via the game instance, you can bind to the on level loaded to trigger stuff to load their data from the relevant save game objects and initialize the data.
so i shouldn't/can't use open level by name node?
You could but if you change the name of the level, you'll have to update the string you enter. π
well i can't because open level doesn't give me a level reference
and load level loads the level into a sub levels list or something apparently from the tool tips
also i need to change the reference either way in this too right?
Ahh my bad lol. Alternatively, you can create an actor component that handles saving/loading. Actors that need to save an load register with this actor. When it's loaded in the level, you can have everything else do it's thing.
I am a bit stuck trying to swap between player pawns, I have tried a couple different set ups but always get a version of "can not find or access" my Emily_BP. These are the two relevent blueprint functions as I swap into the new pawn
I just want a fluent / smooth pushback rather than an instant telelport-like push back really, not much else. Doesn't have to be super fancy.
The problem is that you can't force the location when an actor is using the character movement component. It's quite aggressive and takes over everything. Even disabling it still causes it to somehow block a lot of movement related stuff you're trying to do.
the issue i have is i need to be able to differentiate between if i opened the level from one event or other of the game instance bp
within the opened level bp*
i guess i can use a bool?
Try adding some Z on the impulse, I've found not doing so results in the actor dragging on the floor which means you have to use move force to have it move. Alternatively, you can manually set the actors location using a curve.
How come?
Quick question as newbie , my level default player controller wont load if i switch from different level. But it loads if i open it directly
what is causing this ?
Couldnt find anything online
is it possible to edit a blueprint class via editor utility bp? Im trying to make a tool to replace all static mesh components inside a selected actor for an extension of static mesh component
you should be able to pass whatever you want into the options string and parse it on the other end
well the main menu level has the main menu widget
where i have 2 buttons(i'll simplify it to 2 buttons although it's slightly more complicated)
1 button is to start a new game
2nd button is to load a save game
both will fire off an event(i didn't yet code the new game code but this is how i'm thinking it will work)
in the game instance bp to open the level in two different events
so i guess i can just have a bool in game instance class called isNewGame and in beginPlay of the level blueprint i can just check that bool and load the save
You probably should use redirectors for that
Each level uses its own gamemode so check the level you're loading uses the correct one.
if you just want to replace one class for another
idk how to "parse it" idk where or how i would pull those options string
Each level has its own game modes and those game modes has their own controllers. So if i load the levels manually their corresponding blueprints loads. But if i switch levels it wont. I did print texts to see if it loads or not. I does not.
You can parse that string via a game mode
hmm but that would replace all sm components in the project, right?
depends on what you specify, you can probably filter for a certain class/package
So if i switch level from Boot to main menu. My widgets wont be added because player class wont load.
if i open the level manually it works.
Pc_Mainmenu
What's the difference between the left and right versions of 'IsCrouching', and when can/should you use one vs the other?
so when i'm opening the level, the character is not being possessed again
So basicly when i switch levels my game mode wont load, any idea why ?
it does load when i open the level by hand
nvm my issue was that i needed to also change the input mode back to game only but now the mouse isn't gettting hidden although i did also set show mouse cursor to false
Why the propeller is getting stuck?
Pitch doesnt go past 90
seems i have found out the reason. only Roll can spin like a propeller. other values only accept 90 to -90 values
Is there a way to check if the foreach loop "broke"? Or will I have to add another event before I break the loop?
why do you need to check it?
just do the logic you want to do right before you break the loop since you already have a check when you need to break it
Trying to make my blueprints clean and readable, just asking if there is a way
calling a function/event is the only way
afaik
apart from what i said which you'll still need to do call the event/function right before you break the loop
you can also collapse the logic into a node
or a macro
Hey everyone! Is there a simple way to "shuffle" keys in a map like you can with an array? Or anything similar. I'm just trying to get the keys in a random order in the simplest method possible while still having access to the values.
I know I could do something like get keys, shuffle, search map for that key to get value, but is there a method that requires less nodes?
Entries in a map are unordered and generally appear in the order they were added. Getting the keys and shuffling the array is the only way to get a shuffled key list but this wouldn't affect the map itself.
So if I do this I would have to set a new array and then shuffle? How would this function in regards to the map? Do the key value pairs stay and the map does get shuffled, or does it only shuffle the array of keys which are stored nowhere since they are directly from the map?
How to add an output pin to a multiply operator node?
For example here to x, y, z:
map doesn't get affected
only the array is shuffled
You change it to output as a vector3 and then you can split it into each float
Thanks π
just pull the pin to the other nodes
you can't have multiple pins but the single pin can give multiple lines
oh he meant like breaking the vector
That's what I thought he meant at least, not sure
yeah unhook the pin right click on the pin and change it to vector then break it again by right clicking it again
thanks! it was not intuitive as it only gave me 2d and 4d vectors when i right clicked.
But somehow by accident got it as I wanted:
It's a bit finicky. Usually i just make the node again without changing its type fron vector multiply to vector output then only converting the input after hooking up everything else to not mess with it.
What causes the camera to move up along the z axis like this? It doesn't seem to matter what I parent it to.
Maybe something in code is changing its transform?
Or maybe you locked it's z position?
Somehow?
Location is relative to the parent, which at the moment is the mesh.
So it shouldn't move relative to the mesh as far as I'm aware.
With all the animations and stuff
The the mesh the root?
Change it back to capsule because as i said the transforms might get weird with animations.
I've got a noob question that I'm having trouble getting a straight forward answer from google. I want to set an int variable & feed that into a random stream variable. I'm utilizing both of these variables in other blueprints for PCG & a weighted array. Both of these are needed at runtime and I'm noticing that the seeds aren't always producing the same result each time. My hunch is that it's because I'm not setting the variables in the right place/time so I'm having some things load/populate with a different seed before the value is set.
My question is... where is the best place to set variables that are needed before a level loads?
I've tried parenting it to the collision capsule, same effect.
I can't help much without more information
Not much more to give. All the transform values are relative to the parent. Changing the parent from the mesh to the collision capsule results in the same issue.
I have, same issue.
If it's not a setting you messed up in camera component, and you are not changing anything in code, and the parent is also not affecting it... Then what else can it be?
Seems to be just what the camera does normally; this in a fresh template.
I mean, I'm hoping it's just the mesh and the way it's animated when standing/walking on the slope changing its height relative to the ground and camera while the actual height of the camera relative to the floor is actually remaining consistent.
Could be the ik
But it shouldn't be that much different. It should still be in the same range.
Asking the experts here, what would be the best format to save a machine which is a 5x5 grid of different classes inheriting from a class Unit as well as inputs which can be rotated? (units have non-relevant rotation)
a way i like to save data is in an array of strings, where you parse the string with a delimiter like , : | etc...
kind of like an array in an array
so you could have something like ClassName,Rotation,Somethingelse
does anyone know how I would dynamically get the checkbox that was checked, as an axis? Terrible phrasing so let me explain.
- You have a location.
- You want to set the location of an item based on the checkbox that was ticked, using them as axis.
- You have 3 checkboxes,
X,Y,Z. Any combination of these can be set to checked. - So if I have
Xchecked, then I want to set the location to be added to the current location +X. If I haveYandZI want to use both of those axis.
I know I can literally do all this in long form (create a branch for every different combination, but that ends up with 6 different combinations. In programs like maya I can use python in a way like the below (sudo code):
checkbox_x = (False, 'x')
checkbox_y = (False, 'y')
checkbox_z = (False, 'z')
my_checkboxes = [
checkbox_x,
checkbox_y,
checkbox_z
]
for i, checked, axis in enumerate(my_checkboxes):
if checked:
set_actor_location(f'{axis}.the-value-of-that-axis')
If you're responding, please reply or @ me so I see it ^_^
I'm open to simply using theory, or if you have examples, I would gladly take that.
json is a possibility too
also a good way to store data
maybe there is a plugin for that ? i don't know if it's out of the box
actually, no, i'd have to parse it or something, i'd have to make multiple new classes, json is not good for UE bp
the worst part is how specific this is... like, i have multiple classes that don't need rotation and than theres one that does...
i mean i would ask chat gpt but we all have our fair share of experiences about asking it... anything...
you could create a complicated data structure
and save the game, load the game to get the data
at the same time i could just save the objects... an object list...
you want to store it in a file also ?
Would any be able to explain whats happening with this? So you would assume that as shown in the image, you would get the original AI controller as at the start of the chain. However, this returns the original player controller that first possesed the pawn despite having them unpossess and the AI controller posses the pawn. I'm a little confused.
Hey everybody, anyone got an idea of how I can get a Controller Disconnection Event, or a event being called when a controller is disconnected, through blueprints?
Something like this maybe. (not sure if it would actually work)
help somebody pls
how to use the source git hub thing
how can i undo the last thing i did in the project
i cannot open it if i dont undo it
pls help
i put the material as the landscape material and it crashed
You can usually discard that specific change
how
5.3.2
Trying to disable collision between players and the props on the map (StaticMeshActor) by pressing a button (Z), I can see them in the print string but I still have collision with them
Not sure about GitHub desktop, VSCode has a button next to the file name. Maybe check with #source-control or Google
- You should check if anything else on your character (like a capsule) is set to block them.
- You might need to do it both ways (another ignore while moving with reversed inputs)
- That node says βwhile movingβ so if those actors arenβt moving that wonβt work. Itβs usually used for projectiles. An alternative is set collision response to channel node and ignore the channel your character is in, (pawn might work or make your own custom one )
It was the first one, when I changed it to capsule it worked. Thanks for the help
Is there a way to get all buttons in a user widget to iterate over?
"AIController" is a custom variable, so whatever you happen to store in it is whatever you've stored in it. It's also a bit redundant to get a controller, to get its pawn, to then get its controller again.
If you were to print the "AI Controller" display name it should be the same as the response at the end of your chain.
If they're all within the same containing widget, you could get its children.
The AIController var is of type 'AIController' and yes the example is redundant and was done to track down a bug. It appears that despite having a player controller unpossess a pawn and have an AI controller take over. The pawn still thinks it's controller is the player controller for some bizzard reason.
Which function?
THis one?
Depends on the type of widget they are contained in.
Something like this
anyone know how i can get my kart controller to rotate along the normal of a surface, this is so the player can always land on the wheels smoothly, right now i just have it rotate to 0,0,0
I'm still trying to figure this weirdness out. So I possess a newly spawned pawn (doesn't do anything) and possess it with the player. When this happens, i then spawn an AI controller that then possesses the recently, unpossessed player character however, when I get the controller on both the Character and Ghost pawn, they both have the player controller. o.O
Does anyone have any ideas?
This is the possess/unposses logic on the character in case it helps.
What does your "AI Controller" display name print as?
who should get which controller
The character should be controlled by the AI but the player controller keeps track of who it passed control too.
Hey, I'm wondering if there's an easy way to choose an execution path/outcome based on a matrix of conditions. For example, if I have 4 conditions I'm checking against, it would be great if there was a way to do this through some kind of matrix analysis rather than doing a bunch of Branch node chains for each possible combination.
how do I change the background music?
play sound 2d does not return any object that i can call stop / fade out on
so the player controller should be displayed next to the ghost and the AI character next to it?
Might want to look into bitmasks
Not sure if this helps. Top two are the names for the AI controller and Player controller. The next two are the pawn/character and what it's controller is. The second 2 are what the two controllers control.
I'm encountering an issue where small physics actors sometimes fall through the floor and this article (https://forums.unrealengine.com/t/landscape-physics-items-eaten-by-floor/675478/2) says I should be able to increase the thickness of the landscape but I don't see that option. Am I missing something?
Thats physics for you. The only real solution is to not use the landscape or increase the size of the landscape collision - or the fidelity of the simulation (sub step) - or both. Additional possible fix: Since they are BPs. Trace downwards on the visibility channel (or probably just a box trace with sweep turned on). When you hit, stop the...
Im doing a very simple rts. So basic collision -> Combat.
Though friendlies are overlapping.
What should i do in this case? Make them stop when they overlap?
Let them overlap? If i let them overlap then 100 units can be in the same place and becomes a mess
this may be a dumb question, but do parents construction scripts finish executing before their childrens
The issue is, despite the player controller possessing a new pawn, it still thinks it controls the old character. Adding to this, the character still thinks it's controller is the player controller despite being possessed by a new AI controller.
i assume the answer is yes
yeah
depends on a lot of things
They call when you call the orange call to parent node so you can have it before, after or inbetween.
then you execute your code
using spawnactor while casting to the parent from the child as the class input pin
or can execute code before and then call the orange node
Are you sure you meant to set the "Player Controlled" to true at this point? The idea of possession being lost should mean that this actor isn't player controlled.
That's more to show that it was (at some point) controlled by the player.
That's exactly what I was asking about xD
slams head on the table
This makes it work. o.O what the.
This logic flow seems bit strange as well....
You've just possessed this actor with a player controller, then you're having the player possess another actor.
They're in a user widget
Which would likely explain why this delay until next tick fixes it.
But they would be contained within something within that user widget. Like in the example I gave, I used a Vertical Box... There's different types of containers and some have different ways of getting their children.
I would have assumed the possessed event would fire once the possession has completed but it appears to happen before it's completed.
Oh, so like the canvas
Okay π
anyone got any tips?
i think i will let them overlap and then separate them sometimes idk
Maybe make them collide as well, but check if they are friendly or hostile and only engage if hostile?
well thats setup already. they are not fighting friendlies. The issue is they are overlapping the friendlies
so if they overlap it looks weird if they are 100 on top of each other
on the other hand if you send one unit and it collides with another, and you stop it, it breaks the flow of the units
so if you have 10 units moving the ones in back that touch the front units will halt
Hi, I'm new to unreal and have a quick question. I made the third person camera get closer when crouching, but I also want it to get lower. How would I do this with blueprints?
you must move the camera in the Z
But how do I get the z axis blueprint node? I want it to only move down when crouched and return to it's original place when standing up
It's probably very simple, I'm mainly an artist, so I dont know my way around yet
Set World Location
Camera ->
Thanks!!!
ur welcome
Why is the self reference node always present on my custom functions?
thats normal its the reference of the actor it belongs to
so you could call the function of another actor from this actor
Docs said could use gt array size... it's not there π
I want to attach a blueprint component to an actor, and have that blueprint component be able to find the first collision type object the actor has, so it can add some additional events on it.
Is there a common interface or tag that all collision types (box/sphere/capsule) share that I could use? Or do I need to look at each type separately?
what you want the length of the array ?
Thanks for your help earlier. And yea it is a little strange. I'm trying out an idea I had where the player character is controlled by an AI controller and the player controller passes it's inputs to the AI. So using the player controller as a proxy for the AI. With this issue fixed my idea seems to be working now but time will tell what unforetold issues I might encounter.
I ended up simplifying it to this which seems to be working great now.
Figured it out, needed to look for ShapeComponent
Is it possible to create a component outside of a blueprint ? Like I want to create a Main Menu component to be able to use it through multiple projects in the future instead of recreating it everytime
I might sound like a novice when I ask this but, what's the proper way to destroy an actor?
Because I do this: Using the Interact interface..
And although it works.. If I tried do the interaction in same spot where it "was sitting" before it was "Destroyed" it throws an error claiming its "pending garbage or deleted item"..
You need to use interfaces.
Uh, I thought I was? Did you look a the picture?
Oh my bad. The thing is you need to check if the hit actor with your raycast does implement the interface or not, and if yes then call its method "Destroy"
You can do it however you want, in this instance that is perfectly acceptable to have the interactable handle it's own destruction
I have done that already inside of the Linetrace function..
You don't need a specific interface for ddestruction or anything, and who handles the destruction depends largely on the thing in question
Though to reiterate, in this instance it is perfectly reasonable to do it this way
(I'm assuming you're going to be putting your actual interaction logic before the destroy)
Yes, its just I come across this bug saying the actor I am trying to interact with isn't valid. If I try to interact with the "Goldbar" again after I already destroyed it.
The Error message acts like it still there even though it was suppose to be deleted..
show your line trace function
You can author your own plugins. You'd create your plugin with whatever bits and pieces you want, then you can reuse that in your other projects.
But I'm not familiar wiht plugins. I wanted to create a component for my Main Menu but Components could only be added inside BPs and I'm not sure if Widgets can have component children
Then get familiar with plugins
if there's a thing you want to do, and a system that solves it, go learn it
Hm, that's an odd one.
I'd start debugging. Get some breakpoints and step through the nodes to make sure it's not referencing or calling through to anything you don't want
So, I think I might know what it is.. So, the goldbar actor is a child of another BP.. could that be the issue??
Cause the code to interact with it is inside of the masteritem BP and not the goldbar BP which are both actors
Nope that didn't matter.. imma start debugging like you suggested.
The child will inherit its parent function. So Goldbar will have and run interaction function as the parents would unless goldbar specifically override the function
It does not. Everything should be inherited from its parent like you stated.
Is there an easier way to contro a niagara system thru a UI widget ?
to me this feels convoluted, as I have to set up a BP with the niagara in it.
how can I just call to the niagara itself ?
"Actor Components" are only meant to be added to objects that are a child of the "Actor" class.
If you want to make a full on menu system as something modular you can "plug in" to another project, with a variety of widgets, player controller and HUD class all built in, then a plugin is what you make, and you'd extend from the base classes provided by that plugin to customize it as you need for the project. A single actor component wouldn't be able to fulfill what is required.
Alright, tahnk you π
Plugins are super handy. But a slippery slope :P.
Be careful you don't fall into the trap of modularizing everything into plugins and then you never actually end up making your game :P
Fixed it, I added a branch to check if the actor was blocking the hit.. if not then don't do the interaction..
Not sure why the interact BPI is being ran to an actor that was destroyed though.. Why?
Is there an issue with using OpenLevel (By Object Reference) over Open Level (By Name) ? Most tutorials use ByName for some reason while By Reference looks better as it references your created Levels directly so it avoid easy typos.
I think it just comes down to preference and habit
Before calling the interact function, put an is valid node for the target actor.
My best guess would be that you're saving the hit actor to a variable but only when the hit actor is interactable. So when the hit actor isn't interactable it still tries to interact with the previous actor.
Try interacting with the table before taking the gold bar, if it returns a "accessed none" error that must be the cause.
Not understanding it for sure but, checking if the actor was blocking the hit or not is what fixed it.
I did the try set, but not after it was destroyed. That might would work also.
I think "Destroy Actor" node doesn't get rid of the garbage collection or resource collection in the engine system until later on.. Like a couple of ticks or something..
Destroy actor does not garbage collect automatically no
You can however call a garbage collect function if needed
quick question? why would the Set Constrained components not attach to the bone on a skeletal mesh. nothing seems to wrk
Anyone know the best way to go about using IK to stop my pawns hands from clipping through the floor?
Use case is a giant slamming into the ground and I want to prevent the hands from clipping into the floor but I'm not good with IK. I could use some guidance so if anyone knows how to and would like to help let me know, I'd really appreciate it.
ok im using blue print interfaces and i need to return a value. however because ive got a return for some reason i cant make it into an event like my others ?
Go into the actor you want to return the data, double-click from the interface list under Functions, it will open up a graph where you can add logic. Plug in whatever variable you want to return for Current Level Spawn State into that return note.
hmmm
Youβd have better luck in #animation
that might work but i am having a second issue @finite hearth i appreicate your help btw thank you.
to get the target actor ... i am doing this this is the only way i know i can get the actor ... but i try doing this ... and the interface ONLY wants to keep self ...
i think ive figured it out
i had a few things screwy with my code, but i needed to click call in editor.
cheers for the help too that worked well.
Eh, I fixed the issue by checking it doesn't hit the actor.. idk if that's a good solution or not.. but it worked..
Events can't have return values.
its been solved sorry
All you appear to have done is convert your interface into a function present on the W_Spawn Level In World which wouldn't necessarily be the interface being called.
how do i set a variable that is inside a struct
i break the struct. expose the variable . then what?
its not working
This is driving me crazy
im adding 2 to the current value of the int "Amount"
i made it so when i hit f. it executes. and prints the result.
since the original value is 1. it should come out as 3.
AND it does!!! but if i hit f a 2nd time. its still 3!!!!
I dont understand
here is full BP
because ForEachLoop gets a copy of the struct, you will need to change it to get by ref by duplicating the original macro in your project
changing the get node to "by ref"
this way, changes to the struct within the loop will be propagated back to the original struct
why until now Epic hasnt added it by default is beyond me 
Maybe theyβre protecting us from ourselves
Hey I'm having trouble with cast to but I'm not getting any error messages.
I want to click this BP and cast to BP_Score to start counting points. Problem is when I click the BP nothing happens. The BP is not destroyed and no sound is playing. Sound and destroy happened before I put in the cast to node. Also nothing is happening in BP_Score.
The actor reference on the cast to node is an actor object reference variable as the BP_Score has parent class: actor.
What am I missing here?
How/where are you setting that reference
Also a cast wouldnβt rly throw an error but your cast failed pin should fire
Just to clarify: you canβt just create a variable of a certain bp class and use that as a reference.
I havenβt touched the procedural side of Control Rig tho what youβre describing sounds like a local vs global space issue. Maybe #animation can help more
Thanks
It's a reference in the BP. Guessing that's the issue then.
Is there a simpler way of just activating an event in another BP? Or is this the way to go?
Well is what your clicking on an instance of BP_Score or something else?
Cast is the simplest form of inter-bp communication. See 2nd to last video pinned in this channel to learn and actually understand how they all work tho. Lots of people misinterpret what casting actually does
It's another BP. I'm clicking on BP_PinScore (a cylinder) where these nodes are. And want to calculate the score in BP_Score
Yeah I've tried looking it up but a lot of the times it's just "thirdpersoncharacter" and that's not helpful
Generally you prly wanna keep score in something centralized and easy to get like the game@mode or player controller
I donβt understand what you mean. Did you watch the video?
No other videos
OKay I'll try gamemode
Yeah, no watch that one when you have some time. Itβs a bit long but youβll finally understand how casting works.
Thatβs only part of your problem
You canβt just set a variable class
You need to get that instance
So if you put it in the game mode, you need to use something like GetGameMode and plug the return value into the cast
A cast is a type check
It doesnβt magically talk to another bp, it checks the ref you gave it and if the instance is of the right class it lets you access it
Instance being the key word here, you need the actual object at runtime
Yeah I got it to work in another project while using game mode to cast to. But what's the difference here? I can get game mode but i cant "get class"?
If you want to keep it as BP_Score, if and only if youβll only ever have one BP_Score and itβs present in your world, you can cheat and use get actor of class Bp_Score. But in most cases you want to get the actual precise ref to that object
No, GetGameMode gets you the instance of your current game mode that is spawned at runtime
You would need a function that gets you the instance of BP_Score, which like I said you can use get actor of class if youβll only ever have one of them and you placed it or spawned it in your level. Better to use centralized stuff that is easily accessible for score and the sort, i.e. GameMode
And watch that video
Else youβll keep stumbling through every time you want to talk to a bp
I'm going to watch that video but man THIS felst SO good:
It just worked
Haha, I know I don't know how complicated I might have made stuff for myself down the line
But this felt so simple
I'll watch the vids
Thanks!
Just a quick question in the instance of the BP. The wildcard object ref in the cast to node, why can't I just reference the instance there? The BP_Score is not searchable.
Yes, itβs a neat little cheat but donβt start using that every time, youβll just end up with more bugs. You usually need to be more precise than that, so you need to actually interact with the object and thus obtain that reference. For example, if you want your char to open a mailbox, you would have it overlap or trace to the mailbox, get that overlapped/hit actor result, and cast to see if itβs an actual mailbox, and if itβs the mailbox you want to open, not just any mailbox in the level (because thatβs what get actor of class gives you)
To clarify, an instance is an object of a class that is created in your world during runtime, you cannot search for it because the instance is not created until you hit play
And also thatβs not how references work
If you want to see an example, hit play then go back to the editor and select the debugging object on one of your bps. Youβll see something like BP_ScoreC01 or such. That is your instance, and thus you cannot just look it up before it has come to exist
Takes time but that video helped me understand comms a lot better
Add another BP_Score to your level and get actor of class immediately breaks, because you canβt choose which one you want to talk to
Oh I'll try that
Cast is one of the greatest tools we have, once you understand it, youβll change your own mind
Haha yeah of course, I just need to wallow in my own stupidity π
And yeah it breaks if I have another BP_Score in the world
Which also makes sense
But wouldn't I get an error message saying it doesn't know what to do?
Most things donβt throw errors at you, theyβll just fail silently, and you have to do the other 50% of a gamedevβs job and debug
Haha fair enough π
In the mailbox example I mentioned, get actor of class would just give you the first mailbox the engine finds in the world, so its uses are limited
Also makes sense
I look forward to the day I understand cast to. Gonna be a good day.
Thanks for the help!
I have no details on my charactermovement component. how do i fix this?
Hi guys ! I am kinda new, I want to update a textbox value in Widget value when a game instance event occurs why this doesnt work ?
Use set Text function , instead of changing the variable
Revert in source control
Thank you for your answer, may I know where and how ?
If you haven't set it up, set it up now, and pray for an autosave hidden somewhere
Otherwise, remake the bp
get your text box -> Set Text
In the game instance or the Widget ? I genuinely dont see the difference between what I have done and what you tell me
your TextBox
use Set Text Function
might not be the entire problem but it's a start
Thank you !
there's a lot of Set text functions
It didnt solve the problem though I thought it was working but no
Setting a text is a very simple process
you get a reference to your text box
then you call the set text function
if that don't work you will need to debug and find out if you are calling the function or getting the right ref
This is the problem I think. I want to create a widget, append it and set it text
Then create the widget, I see you are doing chatbox. I totally won't recommend multiplayer project if you are early in game dev business
It's just a simple twitch integration with websocket
You create widget -> Set the text on the newly created widget -> Add it to the chatbox widget
Do you know how can I get the ref of a newly created textblock because the step 2 is the problem. The item is added but without the value I provide.
well where's the newly created text block?
Hello, I'm having an issue where my root motion dodge animation is overwritten by a tick from a lock on, anyone has this issue and knows how to have the root motion have priority ?
I don't know what chat entry is
if that's where the text box reside then you can get a ref to the text box by getting a ref to the Chat Entry
W Chat Entry -> Text Box -> Set text
during the roll, you want to temporary disable the lockon, that adjusts the character rotation
Is there no other way you think ? Like forcing a root motion ?
how did you implement the lockon? on tick -> set actor rotation?
you would want to keep the portion of the camera adjusting to the focus target
but during the roll, you want to temporary stop setting the character's rotation
Ok I think I may have an Idea
Okey thx, I'll figure something out then π
For some reason it (bp) still gives me the following result(screenshot)
you do not need to create widget manually when it comes to ListView
What should I do because it seems that the widget is still created though
read the tootip already?
Just use a vertical box for chat imo
Okay
if you have alot of message, ListView is good
its purpose is for that exactly, not to create 1000 widget if you dont see 1000 at once
I basically have a Twitch chat so I will have a lot of widget, I was planning on having a fixed size and delete them when theres a new I dont know which solution is the best
The usage of list view is different than usual widget, you will have to create object for its data, and ask the ListView to present the data.
Thank you for this, I will see what I can do, I managed to do it by replacing to Vertical box, but I might stick my nose into ListView because it seems more appropriate to my case !
so if we have a rigged skeletal mesh like that shapes, the physic will do the collider right?
or we could have the regular mesh collider for skeltal mesh
if you have the time, take some time understand what is a ListView, and see if you would like to go that extra miles of making use of it.
a skeletal mesh gathers its collision info from its physics body, usually it is generated during the import of the skeletal mesh, but i know you can import it together with the 3d software you use.
you can edit the collision shapes in editor by going to its PhysicsBody asset
just for clarification, PhysicsBody =/= it runs with Physics
yea right, it's just the physic collider would not be as well shaped as usual collider, the character may be hang if stepping into it,
how to get better collider for skeletal mesh tho
Just a normal UObject ?
or any already existed objects that contains the data you would want
And how did you manage to put such event ?
override the function, it's probably something from the tree list
try selecting that then look for the event
I don't think so
I see it's probably interface then
Is there any reason why it's called "object list entry" ? on his because mine is "user list entry"
you are not using the right class then
you want object list entry
Hi, When you want to populate a List View, you need a WBP class with list entry interface. There are two. βUserListEntryβ and βUserObjectListEntryβ. I know how the object one works but itβs a bit clunky as you need you own object class. I was hoping the UserListEntry is a lighter weight version where you donβt need to define your own object cl...
I don't know why I am not using the right class, I created the entry according to the listview
This is an infinite loop for unreal and I don't see it does anyone know ?
Open WB_ChatEntry
look at the parent class
screen shoot it
@steel shadow cursed
Hello friends, can someone help me with a simple code, I'm too new for this...
I want a different animation to be played when the character is standing and shooting. Yes, I know I should use locomotion, but that's a different topic. I think it could also work that way, so if anyone wants to help me with that, I would be very grateful. I already have something begun
π¦ There is still a way out I guess but the dodge branch is the issue then
i never use tree list but for a start, use UserObjectListEntry instead what you have right now which is UserListEntry
it should be the reason why u don't see the function that needs to be override
Can someone explain to me why this doesn't work? I want that when the speed is at 0 and the character shoots, a different animation plays...
But what's wrong with that, apart from the fact that I don't use any transportation
I would imagine it's because you check if the velocity is less than 0 which unless it was moving backwards would never be true.
I didn't know about that
yes, I thought of that too, what would you recommend?
Check if it's equal to 0 or nearly equal.
i try it also with zero but same issue with both nearly and zero
there's an node for nearly equal, its different to the equal node.
ok let me see thanks anyway if it works or not π
same problem also with 0,1
there is a chance you stand still, and the bool gets set to false, but true plays ?
for some reason i feal like the set for that boolean should be later on, not sure if it matters
u mean change the brach connections?
If that is the only place you're setting the Boolean, then that's why it doesn't work. If it's false then it won't ever go down the true branch to ever check if it should be true or false
ok let me check it out
Might not even need the Boolean variable and could maybe just plug it directly into the branch
GOD BLESS YOU
it works without the branch
haha nice THANKS!
this part could be infinite loop, you should use tick for these job though
oh im so late lmao
searching issue 