I would suggest something like this
https://blueprintue.com/blueprint/magjysva
I moved the Move Input from the character to my custom controller - the entire controller code is in the BP.
#blueprint
1 messages Β· Page 353 of 1
This is an old post but it's discussed here.
https://forums.unrealengine.com/t/how-do-i-use-the-savegame-flag/283064/15
Epic Developer Community Forums
Had the same problem for random lootboxes. Blueprint: get lootet Boolean? β No β Spawn random loot β set lootet Boolean true. How to put this boolean in my save struct without getting every actor variable? I couldnt find an easy way, but I got a small workaround with βCan be damagedβ: Blueprint: Save: Load: Save struct: ...
you can use get all actors of class and get the 1 index
but this unreliable
delete and remake in a different order and your fkd
Basically you have a controller manage both characters, changing only what input is applied to which one depending on the current pawn and a variable of OtherCharacter
How do I switch players without a level?
At the mercy of UE's load order. π Got to do a lot of praying with that.
I was curious how to do it myself honestly, so I went and experimented a little bit, so the code is not perfect
ya it's just a bad idea but it'll work in a pinch lol
definitely a prototype only approach.
right, testing only
by getting the reference in a different way, like i mentioned i wouldn't do this in this way anyway
you can loop though all characters of your class, and if it's not self maybe set that
but it would be much easier if they were children of a parent and seperate classes
but tbh i think your trying a game jam a bit soon to want to win it
i feel its an injustice to show you tbh, i'll just leave it like that for now
π€
copy/paste doesn't help either tbh learning is essential
I can accept that you are right. Of course, my aim is not just to win. I always take care to make notes of everything I am taught. For this purpose, I also use the Milo app.
you may have a great idea but doing like this is going to take too long to get anything done
Rather than simply copying and pasting by purchasing training courses, I try to learn. When a teacher finishes something, a few hours later, I try to do it on my own. When I make a mistake, I try again and again.
learn the basics and things go 100x faster
nice, thats a good way to do it, tutorials on the web can be tough to learn from if they just zoom through
but try stuff
and get an idea of whats going on
if you main problem is getting the reference
"get actor" or "get actors of class" is essential
and what a class is like fundamental #1
everything is basically a class
when you click on an object, you should be able to see what class it is
or if your in a bp, the class is literally the name of the bp
https://unrealenginepro.com/ - What is Blueprint? Blueprint is a powerful visual scripting language in Unreal Engine that can be both artist friendly AND programmer powerful. But Blueprint is so much more than that. It's the backbone of a lot of systems inside of Unreal. Even beyond scripting, you can even use it for simple dynamic prefabs.
Blu...
personally i can't be bothered with showing people this stuff
watch some tuts
I have courses like this too, and I continue to learn whenever I have time.
it just takes time mostly
and doing it over and over again
if your main problem is the reference...
^
because in your setup there are two of the same class
this is challenging to get the right one
but essentially get all actors of class
then loop
personally in a situation like this i use a boolean
Yes, I understand. Now I'll look at how to create the parent. After that, I'll reference it and obtain the child. The child will have the opposite controls.
i put a boolean on the actor, and true for the main one
so loop through
and the boolean is false
then thats the "other actor"
this way you can have multiple "other actors"
by just switching booleans around
Actually, I already have such a variable.
ok so this is the variable you mentioned
nice
yes this is a good way
^
then loop ... and check the boolean
So should I delete all the nodes within the level?
idk
π€
you can use the level bp if you want
it's not recommended usually that i know of
i would just disconnect the stuff
this way it doesn't run and interfere
but you can reconnect it to get it to work again
like if you just want to revert it back for some reason
Right, I'm trying something, let's see if it works.
If I duplicate this mesh and link it as a child, will I achieve the desired result?
i don't think so

what you do is in the content browser, right click third person character, and click create child
then duplicate the child
you don't need to parent child, if you get actors of class with the boolean
there two completely seperate ways of doing this
you would have two mesh on the same character, but you can't add movement input to a mesh
it needs to be a pawn
it's a completely seperate way of doing it
there are many ways to program a thing usually
Yes, I did that.
what is this showing exactly ?
that you have two of the same thing
i feel like we are just goin in circles
put everything back to how it was and show me you got
you can read what i wrote and maybe learn about it
google it or something
^
What is the Get all Actors of Class Node in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
I pulled everything back to the beginning. And I created a child.
ok so before you do this, question is: are these two seperate characters ?
or when you change one should the other change as well ?
ok so you want two children
just duplicate the new one
Yes, I created a child as you said.
^
are you skipping messages ?
^
you don't technically need two but thats what i would do
No, no. I am reading, of course. I was just replying to your last post.
ya i'm rediculously fast with typing and this stuff lol
Each character will be used separately.
ya this way you can customize them as well
seperately
using the other way you would only have one character duplicated
so creating custom one would be pain in the ass
this way you can customize each character seperately
but they still share from parent
so it's really nice to do it this way
imo
now take the two characters out of your seen
and place the two children in
so now they are two different classes
but i'm not going to guide you through how to use these nodes you'll need to look that up
it's just get actor of class
I don't think I should duplicate it this way, is that right?Yes, I removed both of them and created a βGet All Actors of Class Nodeβ.
geez i can't stand the repeats, i'm a bid of a nut job lol
wtf
your mixing up the info
i don't think you understood what i'm saying
its different ways to do the same thing
you don't need actors of class
what is add child actor component all of a sudden about ?
what is this for ?
helping can be really frustrating lol but i'm ok i think
I've never done this before, so I don't know what the right move is.
ya it's real difficult to help when you not know much about blueprints
i usually just leave it alone anyway
and say watch tuts
well it's not that lol
you literally watched just one tutorial and the rest is like 3% completed? π really go watch this video engage gave you to understand blueprints so we can even help you with basic things
and try to get the basic things and what tools you have before you even try to understand how
you don't want any of those nodes "get actor of class" is now what you want, but after that is another thing, and another thing
but if you don't understand "get actor of class" then idk what to say because it's literally what the name says
This video is about a couple of fundamental concepts for Blueprints in the Unreal Engine - the difference between a "class" and an "instance" and the concept of blueprint inheritance. Understanding these concepts will really help you get to grips with the power of blueprints. Although these are concepts that are rooted in Object-Oriented Program...
hopefully this helps ^.^
imagine having to show the basics to everyone who came in here
the target of the add movement input is the pawn to move
self is the current bp
you want to add another movement input, and set the target to the other bp
which you can get by it's class
it's very simple if you understand what a class is and how nodes work
^.^
how could i make a static mesh in a blueprint stay upwards all the time? using set rotation in tick works but can i not use tick?
have you tried the constraints ?
yea
i usually use tick
to make something always face a direction
it makes sense
alright
will you be doing this on a lot of bp ?
don't be too worried about tick
i run a lot on tick personally and it's pretty smooth
only on 1
ya it should be fine
okay thanks
how much will tick affect the performance tho? is it always better to use anything else that also works the same way? I've only heard that it's only good if specifically its needed to, because it can lower the performance
i mean logically it runs every tick so it can be an overhead. although you can run a lot on it and it's fine.
if you can avoid it sure go for something that can replace the code
but it's not a huge deal untill you start seeing fps drops
it just depends on what your doing
if your setting a rotation on tick for one thing your fine
even 50 things your probably fine
100 maybe even idk the actual numbers
you start doing 1000 of them and maybe you'll notice something
even then idk the actual numbers
but you can do a lot on tick and see absolutely no drop in fps
avoid putting a bunch of logic on it for the sake of it runs every frame
the more you put the more it multiplies
so if you have a lot of logic then it would probably see drop at a lower amount
i wouldn't say "avoid tick", i would just say learn how to use it most efficiently
alright thank you so much, so basic nodes like math and basically basic c++ functions wont really affect anything
and seeing if a bool is true wont also take any fps whatsoever im assuming
not that i'm aware of
I believe Fortnite has like 500 running ticks at the start of the game and then they go down as game goes to the end.
not sure about exact number but it's 'a lot' and the game still runs smoothly
what are the ticks for?
if it's c++ your in better shape
you can even make tick be less frequent or turn it off when not needed and turn on when needed etc.
can i turn tick off with bp/code on certain bp?
yes, enable tick
oh thank you so much
or for actor is the same
if you set Enabled to false it will turn it off basically
In this video, learn everything you need to know about controlling Event Ticks in UE5. We cover using the Event Tick node, setting up a Custom Event, and implementing the Set Timer by Event node for precise timing control. Additionally, I'll show how to use the Flip-Flop node to aid in creating and managing custom ticks. Perfect for both beginne...
also here you can disable it at the start or make it tick less frequent like 0.5 instead of every frame
oh do you mean the look of my blueprint nodes?
yeah just wasnt aware i can set its state on bp
yes
ive seen some but i would guess on fab?
@lofty rapids Could you please check your inbox?
It's just Flat Nodes plugin and there is other one Electric Nodes and I do not recommend it, it's shit
I think Flat Nodes might be free
let me check how it was called
yeah it's really nice
oh this one i dont know π it's personal opinion I guess π
I like it simple
maybe you just want to set it to absolute rotation in the BP (which you can do in the details => transform and then click on scale rotation, which is a dropdown)
that way it will keep it's world rotation and not rotate with the actor
?
yea but that's not the details panel...
oh my bad
you mean something like this?
now click on scale rotation
rotation type to world?
i guess
oh it does work, thank you so much!
Blueprint Assistant, Node Graph Assistant and Autosize Comments for the win
( more functional stuff than aesthetic )
auto formatting, sticky comment bubbles, lots of cool stuff
If you are still not satisfied, there is some info about ticks in the pinned messages. One of them is a link to an official Unreal youtube video with "Myth busting" some of the common misconceptions
I want to add a traceable aspect to my players so they can be detected by, well, traces. What would be the benefits of doing an Object channel vs a Trace channel?
Hard to call them benefits, it's more how you organize your collisions. It doesn't really matter because in the settings all you have to do is set for your player to block that channel (either object channel or trace channel) and that's it.
Alright. New question. I'm testing with the default CharacterMesh profile. Why does this register hits on the floor? Floor is set to BlockAllDynamic. Do I misunderstand how this works?
Oh and is there a way to get Unreal to render the actual sphere trace itself and not just the hit results?
You can use Debug Sphere Trace
for this function, let me read what it does I never used it
I'm using by Object or by Channel usually
So it will check what this Profile blocks and look for that.
Which isn't really intuitive.
If those would be better I'd use them.
The best if you:
- Create new Collision Channel - PlayerChannel
- On Player go to collision settings and tell it to PlayerChannel block
- Sphere Trace by Channel (PlayerChannel)
now it will only look for players or objects that block that PlayerChannel
ofc change names etc. as you really want them
like for example in my game I have Resources and then I just look for Resources when I want to find them
How does the Object one work? I haven't been able to figure that out at all. Unreal sucks at explaining what Blueprint nodes do.
It's the same, like you create object collision Player and you set it to block
you don't have to set it AS object
just to it Blocks it
it might be not intuitive but it works literally the same
the difference is how you find objects with Sphere Trace
I don't know how to get something that the Object Types pin will accept.
and then these things have to block at least one of ''Object'' channel
what is important is the one in the rectangle
the arrows is what might be confusing in case of looking by channel/object
it's almost like for the game it's the same thing just name differently in case of sphere traces
it's different if you have Building and Unit and you want them to block each other (then you set ObjectType) and each of them block each other
but sphere trace is straightforward
Sphere Trace -> Block Channel/Object (rectangle) -> it will be detected
I added an Object channel named Player and set default behavior to Ignore. Then I changed my Player's collision to Block it. It should now be the ONLY thing that can register on that trace, right?
Show screenshots just to be sure
but yes
actually, yes, almost always set to ignore when you create new channels
unless there is something specific but you will know
I'm wondering if this is because of my pc or something, but if I click play first time after launching the editor I have to wait like 10s sometimes for the game to start. Is this normal or should I be doing something so it's not like that? The second time I click play it's quick.
Sounds like asset loading.
Is it bad if it happens like that? Should I be worried and do something about it or can let it be? I guess it's gonna get worse? π
Depends. Do you run with the debugger attached?
Like launching from Rider/VS with F5?
No, currently just without debugger
Try it with debugger. See if you get any ensures. They can also cause that kind of first time hitch. Cause if they're only Ensures and not like ensureAlways, they'll only hit once and they can cause a lag spike like that without the debugger.
If it's not an ensure. Profile time.
Although 10s ensure lag would be incredible
i feel like it's validating bunch of stuff, since i get all my "nanite mesh with unsupported translucency" warnings on first launch, too (while they don't happen on 2nd play)
Yea it must be something with assets.. I have to try with shipping build if its similiar
okay shipping build is literally insta launching
and some assets are not loaded but it's like 0.3/4s delay
We get to half cheat that, cause pretty much 95% of our assets are used in every game. So we preload them in the main menu async while the user is even getting into a game with bundling. Doesn't help much if we start PIE from a content map though.
Ahh okay
99% sure it's asset loading. You probably have tons of hard references :D
π
Time to trim some 4k textures. π
I'm so happy pixels can only get so small. I don't want to live to see games with 32k textures on normal assets.
hahaha
https://blueprintue.com/blueprint/fs4-3eh8/ so like this? sry for the late response, pc has been giving me issues
any advice for when only one of your projects doesn't open and crashes your GPU?
Check when it started and go back a few commits to see when it stops?
Delete Saved and Intermediate and try again?
Dose it crash on other peeps PC?
i mean it works, but it's just saying not in scope ?
welcome to the wonderful world of BP debugger
i think you could turn it into a non-pure node and then it would cache the value
almost but you have to plug variable of new array, i mean it should work but just get array again and plug it to b e sure
ohh so like dragging it in from the side n getting it that way? instead of pulling off the set node?
yes
now its still not working, the length of the array always prints as 0
the pickup bps can be collected, then on reload, they are visible but collisoin disabled, then on second reload they reset and become collectable again
do you know how to debug blueprints? check if when you pick up thing does it get added to the array or not/
it hits what? !!SAVED!! ?
if i put a breakpoint on the add node, the breakpoint hits
please show more of the graph
when collecting a pickup bp, it prints saved, but the print that updates the array length never changes
but where are you getting from reference to the pick up object?
already have https://blueprintue.com/blueprint/fs4-3eh8/
what is CLIPID ?
the id of the clip bp
from this context like it's null?
when you breakpoint you can check values
for the id
show us what is clipId when it gets added
in the level editor?
the set members is right after,
yea screenshot it..
the value is 0 off the local variable get thats plugged into the set members
bc you said to π
ye, to create new array but no 'local' local
when you access that struct it's not reference to the array but copy, so if you want add to it it won't get added 'there' just like that
so you need first to set it to array that is 'local' in bp
then add to that 'local' array
when you hit the breakpoint the addunique hasn't executed yet
and set struct with that array
so this?
yea and also as Ben said step further
that shouldn't be the issue, i would keep it local in function scope
i put one further and the local id array says 1 now
i one time had problem with local variables so have a bit of trauma with them
yea i think you had misinterpreted the issue tbh
local stuff works fine and you should not avoid it for your own sanity π
so now it prints length 1 and still the rest doesnt work?
i had function that was using array of decals that was local and when it was local the functions wasn't working, swapped just to normal global variable, didn't change anything and it worked so yeah.. not using these anymore π
if i try to print the length of the saved array its 0 on reloading, if i printt he length og the local id array its also 0 on reload
promote the struct to a local variable
i feel like it has issues with modifying the output of the node, as this might be a const variable π€·
what is this save player function ?
a custom function you made ? how you didn't have to cast ?
is it in a BFL, or in the current BP ?
it's a interface function call
i see so the game instance is implementing this interface
what does save player look like ?
for one thing you can use a fresh get and not the output of the set
the print string is showing 0 ?
i would try this first
"If you use the output value directly from the Set node's output pin, it will always give you the value that was set by that specific Set node, regardless of any subsequent changes to the variable." -claude.ai
like this?
no wait
before that
where you get it from the other function which is half on the screenshot on the left
both, only some of the save struct is saving like player transform but the clip ids im trying to check to make them only collectable and visible if the player hasnt already collected it
shit prolly also need it connected to the set members?
yea, especially there
ok, test it?!
still the same issue
is the new length correct ?
no it still prints 0
instead of using the output of the set node
it needs a reference, idk what the set node returns
why are you doing addunique ?
perhaps a map would be more usefull
still printing 0
just the one i used, ive been trying to debug this for days
then i suspect your save function or your loading to have an issue
check the length before you save
im just trying to acomplish, each clip has an id, when player picks the clip up, the id is saved to an array, then when the game reloads it dosnt respawn/reset the clips already collected
if it is before you save then the save is overwriting it
the clips call save game when picked up, the array length is back at 0 when loading but counts up when playing a game still, each neqw clip collected saves again so i dont think its being overwritten
bc it still counts up
but is back at 0 whne loading
ok so it's saving
i see so the length is good before saving
your save works
check the saved values just before you load them
then check the load function
the player transofrm is being set when saving and is laoding fine
i mean i don't know how that relates
you need seperate values
can you show the save and load functions
are they big yet ?
i just meant that the loading is working in some capacity
i see
the save game and load game arent big but the use player data and get player data kinda are
basically like what i do is just save before transfer, load in the player character begin play
but i can't tell what is going on without seeing it
i only know what i've seen
this is in the player bp, https://blueprintue.com/blueprint/br3y7th1/ https://blueprintue.com/blueprint/ix6x9kzi/
ok so forget about use player save for a moment
on is valid print the value from value your trying to get
where do you implement this interface function ?
it prints 4
i see so you where do you actually define the function though ?
there is somewhere where you this is defined in your bp
huh?
have you used an interface before ?
idk if save and loading is rly working correctly as theres no save file in my savegames folder
yes
well the way it works is you define the function on the bp, so in your game instance
there should be a function that is get game data
is it supposed to be 4 ?
for one thing these are events not functions
it should be 0 if no clips are collected, and whatever number of clips collected if not, idk which clips are collected tho bc they are all still showing as visible, so lemme try n raise the number printed n see if it stays
which works, but you don't get a return value
this doesn't say errrror ?
it prints the correct collected clip number on loading
oh i see you have have it returning the ref
i see your not calling the load event here, when do you call it ?
sry i thought i copied it into the thing its in the instance on event init
your calling the function which gets the ref
i would just implement this all in the function
this loads once
when the game initially runs
so your using the same ref most likely
that was loaded on start
call it in the interface function before you return
call load game, in which function inside the instance or the stuff in the player
you want to load things, you have a load function
and a load event
the event actually does the loading
thats what load game data is
you have an event and a function
the event needs to run
to do the actual saving
the function just returns the reference
yes you need to run this
add load game at the end of this?
which function
the one you circles that is literally "load"
hmm...
the one you circled is where you load data ?
when do you call the actual load event ?
the one i circled gets it
yes but it doesn't actually get it
it just returns the ref
the event actually loads from the save game
so when do you call it ?
ig i dont idk im confused, im calling get game data
ook so did you write this ?
you have an event
it loads from save
do you see that ? you sent it to me
this
yes when do you call it ?
the get game data needs an output of the struct, to then pass to the load?
no
event init in the instance only

this is not get game data
im genuinely trying to understand
i'm try to help
im aware, u asked ab the loading one
your confusion is confusing
you asked about the laod
load*
i replied to it and you said yes
you asked where i call it, i sent where i call load
ok...
do you know that you have like 100 load events/functions
this is out of control lol
just load/save
i dont π
i have get game data and load game data
i have get player save and use player save
0.0
yes this event
so you when you want to load
call this
then call get game data
or
inside get game data
call this event
i already said that i was calling it in the even init, i am using it
which would be easier
ya thats not doing anything
it runs once on load
that is all
thats your save game right ?
so should i be loading off begin play of the character? bc thats where the get player save is
yea it prints the count collected, but only bc of the event init load, if i disconnect it the loading errors out
ok it prints count collected so that is fine
it works correct ?
leave it alone ig
whats not working ?
The count collected
when i load, the last clip i collected recollects, the clips that re collected already are supposed to stay inactive, but instead they dont, then if i exit and load again, the clips i collected all reset and are collectable again
I wish you code wasn't so confusing maybe I'm slow lol
im trying
It's really as simple as storing a variable in the instance
It's np I'm just a bit confused so idk ...
You've shown way too much code, narrow this down
the issue lies somewhere in the checking of initalizing the clip
thats where i have narrowed it down before
bc the false branch off the active bool should handle not making them collectable again if the player save struct contains said clips id already on load
Does this length print correct ?
no
Ok let's silify this, save on a key press and load on keypress
i have that
wdym
I mean like print string the data
Literally what I said check the data
sir, this is a christian minecraft discord server
Lol I keep it mostly clean
These are your events do you what they are doing ?
It's probably saving or loading or not you don't know until you check
I still get frustrated sometimes when I'm trying to help
Some people understand what I'm saying some people dont
π
After awhile I get burnt out lol
Quick Q: what's a simple way to ignore modifiers for a keyboard event?
Tutorials I'm finding are old and key events just have a "key struct" rather than a "key event struct"
prints 0
im sry π
What prints zero ?
the array length when loading
No it's not personal
What is it after saving ?
its the count after saving but then if i exit and try to load its at 0, of i stay in the game and load, it stays, the count that was previously updating properly now is also 0 when loading
this is 0 on load now
but only if i use the save and load input keys
otherwise its still working
Check the branches of this load
Check to see there's a slot
Then see which way it goes after you save
Hit save
Hit load
Check it see what it prints
it finds the slot
even after exiting if i press load input again it prints slot found
Show the save event
Other things Re loading fine though ?
Using just save and load events
not w input events but when using save from inside the clip and load off event init its working or seems to be
I gtg, good luck
welp im lost for rn π
Those events are not meant to be used for other things than debugging anyways. Google Axis and Action bindings and you'll be able to add alt as a modifier key(or only listen for a specific key without modifiers if that's what you wanted)
unsure if this is a case of "make your own movement component" deal but, is there a way to prevent movement mode changes from on landing events? I have a weird case where my flying enemy when it bumps into another enemy while falling, classifies as landing on the ground (triggers landed event) which causes the movement mode to go from falling back to its default movement mode of flying
I'm making a mistake somewhere, but I can't figure out where. The character should start taking damage one second after the game begins, but it isn't.
Current health is not connected on the second image. Also I don't see any code related to "taking damage after one second" here
Blimey, is Event Anydamage not working then?
That event will fire when your char takes damage
Nothing to do with 1s elapsed
Also the very first branch seems entirely pointless π
I'll start over from the beginning
Begin play is a decent place to start if youβre looking for game start. Itβs got by no means a precise timing but prly good enough for your purposes
What you have is an implementation of the event AnyDamage. But it doesn't trigger by itself, somewhere else you have to call the event to deal damage.
I rewrote it like this. Now I'll complete the HUD content.
Usually you want to use set timer by event for events but this prly does the job here
What I'm trying to do is exactly this:
Level 2 characters spawn. Both have a shared health bar. When one character lasts 10 seconds, we start taking damage because the other character isn't being used. That's why I'm trying to use a timer. If there's something wrong, I'll change it immediately based on your suggestions.
I think I got this part right too.
I just meant the node: set timer by event as opposed to set timer by function. But if it works and youβre not doing anything that takes more than one tick within than event itβs prly fine
Actually, there is a problem, we're not taking any damage :/
You might be meaning to use set percent not get percent for that progress bar
And bear in mind that the way progress bars work is floats between 0 and 1, tho that division you have should cover for that
It's working right now. But it's not working the way I want it to π Using Set Timer, I take damage every 5 seconds. But what I want is for a character to stay for more than 10 seconds, and then take damage every second.
so you need 2 timers
first one starts count to 10 then triggers the one other that loops every 1s and deals dmg
So how can I tell the timer that the character has changed?
like when? this question needs more content it's out of blue a bit?
character tells, hey I changed, timer reacts to it
event dispatcher, direct event
I think you need to get a paper and write what you want down like instructions in a normal language
and try to get this right
Okay, I'm trying to do something.
Drag from the blue output of the timer node and set it as a variable
The second timer will have to have a second variable
Then you can cancel/pause the timer
like
One timer/event StartThis starts countdown for 10seconds - done
After 10seconds another timer starts call it DamageTick - done
it loops every 1s until player is dead or until I change character
Ok so you need a way to Stop The Damage and probably start 10s count again?
So you need Refresh ''State' -> Clear DamageTick and startStartThis
How are we gonna RefreshState?
in PlayerCharacter or where you change player you need ref to this blueprint OR have this blueprint have ref to character and then:
In character create event dispatcher: OnCharacterChanged
and bind to it in where you do 'damage' and call RefreshState
if you have it written like this it's much better to now create code out of it
I used a timer at the end and wrote 10 seconds. I also added a branch at the beginning of Checktime and set it to 0. However, it failed. I will do as you said.
Hello people ^^
Been trying to find a solution for this problem for some time now, and nothing I try work unfortunately.
most likely because my lack of vector math knowledge and conversion of screen space and all that black magic but yes. xD
Wondering if there is a way for me to calculate and set an offset for the mouse cursor to match my trace
in the world from a visual stand point. (did find a really old post that did this, but unfortunately it broke down completely when introducing height differences)
Been thinking of having a image in the player hud widget and just move it accordingly, but the problem with calculating the offset is still something I could use some help with. (Maybe I should post this in UMG under UI if this solution is the better option?)
What I have.
Pic 1
What I would like
Pic 2
Thanks for any help or input.
hey peeps, im using spectator pawn as playeble character and want to add widget to it.
And its abit wierd, since and dosent have arm or camera and widget being drawn in world even if its set to screen.
Dose it requres come additinal scripting? what should i do?
What is it for? like what is the point of this? You click on the ground but you want for the hit to be up on Z axis?
because you want to shoot bullet there and not to the ground?
Where the mouse cursor is on the screen one would expect the projectile to hit.
But since the projectile will follow the red arrow the "perception" on where you are aiming is off.
how do i set it to false? like appear only once? not appear it per frame on debug sphere
duration 0.05s
oh it works. thanks.
wtf.. it didnt explain what duration means in this context π unreal pls. but anyway ty tho!! ππ»
I think I would expect projectile to hit like that if I click here
so it always follow your cursor
why would I want it to hit always 50 offset up? and how do you decide this offset if you actually aim north?
that is what I mean, I want to change this so it matches
and if you want it to be like on Z axis of the player then you need to add offset Z
but the red arrow is the actual "look at rotation"
you need to add offset Z to where you clicked
but for the line to be straight, you also have to add the starting point Z location
so like +100 here and +100 there right
because if you won't then it willlook like yellow line
start at 0Z and ends at 200Z
I set it up like this, what do you think?
if this is in the same blueprint you can just call RefreshState instead of even dispatcher.. I thought its in different blueprints
but yeah the only thing is that you have to bind on begin play
and OnCharacter_Event calls RefreshState
which currently isn't doing what I said
So, what happens if I update it this way?
What do you think should happen?
I think it's clear you first Call Event and then Bind. Do you think it's gonna work?
or should binding take place way before you Call so that thing that binded will fire?
Since this is my first time doing this, it's taking me a while to figure out exactly how it should be done.
and does the binding needs to happen every time you click? or does it need to happen once?
The time should be reset with each change
im asking you questions so it triggers your brain in right way, try to anserw them
Good move, but right now, when I change characters, the timer doesn't reset, so I keep taking damage. This is a bit annoying.
ok so do you think the program knows itself when to call function you called RefreshState?
or do you need to tell it WHEN to trigger it?
which would be after each character change yes?
just forget dispatchers/bindings for now, it's not relevant in this case
That's exactly what's confusing me then.
I'll give it a go and see, but that will have to be after work.
Thanks for help π
Could you send me a node system that explains how I should connect? I'm really confused, and no matter where I connect, the Bind event isn't working. Well, it works, but it doesn't work when we want it to.
All you have to do is call RefreshState here
yellow boxes are literally RefreshState
but if you don't understand why then you really have to go and watch some tutorials how blueprints works
Yes, I watch it constantly and try to learn. I also ask questions when I get stuck.
Hey, what does this part of the doc mean? Which Blueprint nodes (besides latent nodes) work in macros but not in member functions?
Macros can use any node for the class they're scoped to (the class you pick when you create a new Macro Blueprint, or if it's a local macro, the class the macro is defined in). This means that you have a little more versatility in the nodes you can put in a macro.
Hello everyone!
I am lookin for a help with a specific problem, I want that when I do Crouch using the Crouch Function, to immediately go back to the same previous position before Crouch function was called, I am using the Event On Start Crouch to do that. That works if say I use the Camera Root World Location, but it doesn't work with the Camera Root Relative location. The print returns as if I didn't move on Z, but it actually did move in game
Blue print is before Crouch input, Pink is after Crouch is triggered, Green is after Event OnStartCrouch Set Relative location
If you're using the character class, crouching just lowers the z height of the capsule component. Adding to this, the camera is normally attached to something else, whether its a skeletal mesh or spring arm so directly setting the relative offset probably isn't what you're after.
So before I post the blueprint graph which controls the charge shot in my game (as I ended up needing to recompile the engine first) I was wondering if it would help with troubleshooting the sound continuation issue by removing the event definition which is called by the attack trigger to do the processing and attach it directly to the input event.
Would that possibly have any effect on the matter?
wdym "sound continuation" ?
What I mean is that if the charge is released while actively moving, the sound effect is properly terminated and the attack launched, but if you're in a position where you don't have control over movement (let's say that you are going through a door, or the boss warning has been triggered) then the sound effect keeps playing even after releasing the attack under certain conditions
idk anything about your game
so is there a boolean or something ?
that checks for movement ?
idk what your saying
" the sound effect keeps playing even after releasing the attack under certain conditions" <-- show the release code
I may require a few minutes to get the blueprint graph image (as I am on a remote connection to the dev station right now) but what I will say to start with is that the first of two primary bool values is called "Focus Charging," and if this is true then the attack has a charge function. The other primary bool is simply called "charging" and is essentially self-explanatory in what it indicates regarding the charge state
ok would need to see code to see whats going on
I can work on that in a minute or so, but I would like to make note of the secondary bool values first. The first is called "charge active" and is set as it is described by name, and then compared to the value of "charging" to see if they are both true relative to the state checks for releasing the attack. The other is "cancel charge" and is intended to discard the charge state in situations that don't make sense regarding the game loop.
Beyond this are a couple of tertiary bool values that control whether or not the attack has been triggered, as well as whether or not it can be used at all.
In any case, the remote connection seems to have malfunctioned and I need to wait for it to reset before posting the relevant portions of the blueprint graph, if not when I physically get back to my desk
So here's the check to see if charging is active - if the result value is false, the charge shot is released so long as the player has control
At that point, the first thing that is supposed to happen is for the sound effect to stop playing, after which the "continue charging" bool is set to false
Problem is that for some reason, the stop node might not be processed correctly under the circumstances that I mentioned
As a side note, there are actually two different sound effect definitions - the first one is the rising pitch as power is built up, and the other is the main loop for a full charge
I can add the graphs for the door and boss conditions to the list if you need them, but for now, these are the main concerns
so if charging and charge active ? stop the audio ?
these images don't show me much all i see is a branch
Only if the active charge test returns false
These screenshots aren't helpful. You need to show as many nodes as possible so people can actually see the logic.
I'm almost to my desk, though
So I can give you a better view in a few minutes
and here's the logic in question up to the point where the sound is supposed to stop playing
ok so if chargin and charge active are false ?
so both have to be false for it to stop
actually, charge active has to be false
watch the booleans in debug, see which one is not false
see if it's one or both when it glitches
charging is turned off after the sfx is stopped
what I mean is that once active charging is set to false, the sound stops and charging is set to false in turn
well the problem is it's not stopping
so one of those booleans is true
if you watch them
^
in debug you might be able to see which one
and is saying if they are both true, so you want false
and I think I know where to check this, probably not for every situation though (just where I have the problem)
if both are not true could be true,false, false,false, false,true
but they are both true still
and not going to false
or it would stop
that would make sense if it comes to that being the problem
well the fact thats where you stop the audio and the audio isn't stopping
i mean it makes sense to me
I'm gonna test under the conditions that I need to check and will update with the results
you could also be playing it again as well, does the audio start over and skip or just keep playing ?
so a small update, I have values to check if doors or boss activations are triggered and which are not showing their status as needed to check the issue
however, I did notice in the door blueprint that I'm controlling advancement automation with a "disable input" node
and that could possibly be related if it's interfering with how the charge shot logic is being called (meaning that I may require an alternate means of doing so) so for now, I changed the behavior to where a focus charge doesn't carry over to the other side
Hi , I added spring arm in my character after that it's zooming in floor side .
Does anyone faced the same problem
wdym "zooming floor side" ?
spring arm zooming to the floor likely stems from its collision with the floor or other geometry
show youe components and the viewport
you can shut off the collision test for the psring arm to test if thats the issue
Ok
I will check that
I will send it just after reaching home
I don't have that file at now
anyone know in UE 4.26 how I can load a level from unloading ??
bassically I need to alter and actor details but whilst doing this I need to be able to move to another tile to link to another actor but when I go outside stream distance tile unloads and I need to force tile to remain loaded
Is it possible for a in-game screen to "copy" a widget in the viewport... 1:1?
Right now I'm achieving it by drawing two completely seperate widgets, which is unideal for more complex widgets
What is your use case?
I have a common UI main menu, and I want to copy it onto a 3d screen in the background *alongside * the one on the viewport
How can I solve this error? thank you
Save the skeleton. Youβre welcome π
When I save it it gives this error
that's the skeletal mesh
you jsut need to create it again and display in game as widget component
can anyone help me . i made a pickup and drop system using attach actor to component and enabling/disabling physics but system only work ones after droping item cant pickup again but blueprint works just actor dent attach
so you can pick it up, but after you drop it, you can't pick it up again ?
the top execution whats to the left of it
also whats the parent ? to the left of the bottom line
sorry didnt understand what u saying i am new in blueprints 
what are you using the boolean for ?
For checking does players are holding a item
The blueprint is incomplete so it is hard to tell. For example we can't see what is connected to the "detach" node. Is it static mesh or held actor?
Also is the static mesh a root component of the actor?
trying to add multiplayer to my game. The auto posses tag isnt working for the second controller. Do I have to spawn another player controller? Should I do that in the actor BP or level or... ?
Don't be using auto possess for multiplayer
go through the normal GameMode flow where it makes a pawn and gives it to the player
It's probably possible to get auto possession working but it's really there just for quick and dirty testing.
I tried to spawn playercontroller and than posses it gameplay controller and giving it to controller 1 but that didnt work either.
Even doing create local player does not work as trying to cast it to player controller fails.
What I donβt understand is this: even when nothing drops, it still picks up an item. How is that happening? I donβt get it, Iβm going crazy.
are you able to help me pick up from yesterday i still am completely lost π
pls help
Is there a way to search for a single variable in a struct array, such as searching by name?
I donβt want to use a loop node since itβs tedious and makes it easier to make mistakes when implementing it
I recently setup this softlock camera rotation feature where when I right click my cursor gets replaced with an image that is locked to its position as long as im holding rmb, but the problem is if you look in the top left corner of the video link, everytime I press or hold rmb that same image pops up and i mean thats where it is in the widget blueprint (0,0) but i dont want it to show I only want the one that replaces my cursor to show
Can someone tell me of a solution I can do to get rid of the image that pop ups for a frame in the top left corner?
the video doesnt capture it because it only pop ups for a frame so look closely at the beginning but it does popup everytime i press rmb
https://drive.google.com/file/d/1qU0k8srLRyO3ltDgzxLMhEn7vI7OaGnv/view?usp=sharing
Google Docs
i dont think you can do that from an array since it's items at indices. so you either know the indice or your probe the items using a loop with break.
the only thing that would work is a datalist but those are static...
I found this list, it seems they added it recently, but I haven't tried it yet.
still gotta do a loop
Hoping someone can help me out here. I'm trying to render a character doing it's idle animation in my menu. I have a blueprint which I've placed in the scene and I can confirm the character is there and idling, and I have a still image on the Render Texture itself, but it's not animating. Whether it should be when viewed there or not, I'm not sure. But when I go to my ui, it seems like anything that has been placed in the blueprint is being culled or something? Like all that blue is because i have those planes in there. If I remove the planes, you can see the silhouette of the character, but not the actual rendered character. Any ideas what I'm doing wrong here?
I was able to fix the view by setting the Capture Source to Final Color (HDR) instead of Scene Color. But it's only rendering a still image and not the animated idling for some reason...
do you have capture every frame ticked?
yes
make sure that's the state of all time. You can print that on tick and check if it's true.
there's no reason why it wouldn't render the scene otherwise afaik.
Ah it's because i'm pausing the game when the menu opens, and it's pausing the animation. duh.
So one more issue... it looks like there is a Show Only list on the SceneCaptureComponent2D. It should only render what is on that list. I've set the PrimitiveRenderMode to Use ShowOnly List, and then in the blueprint, I'm adding the skeletal mesh to the list, and it does seem to no longer render the planes I had placed behind the character, but it still renders the sky box and everything else. Is there any way to get it to ONLY render the skeletal mesh?
Ah, found the settings for that stuff. All good now.
What kind of multiplayer are we talking about? What you are trying to do is more or less for couch coop. If you want multiplayer with LAN/online support, you need to start the game with 2 players and then with play as client or play as server selected.
You shouldn't spawn your own PlayerControllers for that.
Guys, I found that when I run the UE5.6 arena shooting template, I get a lot of errors. It seems like the enemy blueprint has an issue. Can anyone solve this?
I can help after awhile I will reply if you still around we can try to solve the problem
if you try to help someone for more than 10 minutes, usually the problem else where. Mainly with not knowing the basic.
hand holding them for another hour would tire you out and not neccessarily help them in the long run.
sounds cruel but just saying.
π
spoke from experience where I get to help someone with their save system.
The person insisted they know the basic, but they really don't. What he says would just be a 10 minute help end up with 2 hours of private session.
and in the end he still doesn't know how it work.
yeah, I wouldn't do it again.
waste of my time and it's also not really help the person to understand.
they will jsut be dropping nodes.
Yes I try to help understand but mostly basics I can't be bothered with
I usually point to tuts
Yeah, once the actual issue is not understanding OOP, references and everything requires to do a blueprint coms, It would be better to tell them to chill out on their core system and just try to understand those first.
Anybody know what kind of crazy voodoo I have to do to get the SceneCaptureComponent2D to render Alpha as transparent instead of black? I've got it setup to use the Show Only list and have my character added to it, but it was displaying the skybox. After trying a few things, I got it to black. Depending on the capture source, it either renders nothing, or it renders black and inverts the alpha on my player making it not render as transparent. Looking online it seems like this is a pretty common issue, but none of the solutions I found worked.
Here's what I'm talking about, if it wasn't clear.
oh wow.
πGet The RPG Inventory Course : https://bit.ly/4cSYsBh
πGet My Free Unreal Engine Beginner Course : https://unreal-university.io/freecourse?video=XWXXoAgugD8
Timestamps
0:37 - Introduction to creating user interface
2:00 - Adding and displaying a 3D overlay widget
3:23 - Implementing functionality to show/hide the 3D overlay
5:08 - Creati...
this looks like what your trying to do?
what's your render target material's like?
you may have to invert the alpha, if you haven't already.
works fine on my end.
Hello, what is the clear difference between savegame and gameinstance ? I didn't find any clear answer ... like the gameinstance is used to global setting (input, graphic setting etc) and savegame for the global information in the game like health etc ?
You don't need Game instance to store input, graphic settings, etc. They can be stored in save game settings.
use Save game object to load / save game states.
GI, just persist when your application is run and destroyed when the application closed.
some usage of GI would be to store temporary data, e.g when you want to travel from Map1 to Map2. Since traveling destroy most of the data from the previous world, you can store data in the G.I where the data will pressist.
ok, thank you very much for the clear explanation π
Gameinstance is a subsystem, it is your game. It exists from the start of the game to the end (in normal cases).
Savegame is a blueprint that you can use to hold and manage data. By itself it doesn't do anything, it is just a template for saving. You use an instance of it to store data before saving. Also after loading the data is put into it so you can access it from other places.
Thank for additional information !
In places where you set variables, you use HeldItem, but in the fourth BP you use GrabItem to get the variable instead. I'm not sure I fully understand your goal here, but it looks weird at first glance
is it possible to construct gameplay tags in blueprint? i know i can Add Gameplay Tag, but I have an array of enums and I want to create gameplay tags correspondingly. Basically in the same way one would append strings, (category).<enum goes here>.active
otherwise i think this is the first time i will use the variable map
which still sucks because i'd like to not have any mandatory secondary tasks as this enum list is expanded
π
looks like your interacting with the hit regardless if your holding an item or not
basically i think what would help is if you check if your holding before you check for implement interface
idk if it will fix it but that just looks like it's off a bit logically
i mean i would check before even the trace, because if your holding then you don't need to trace you want to drop
what do your prints show ?
question.... I need to make a short tutorial at the beginning of my game... I need to prompt the player to pick up wood. All wood items will have a widget on top of them saying "press e to interact" etc. these widgets are all invisible by default.... but there's a lot of these actors in the world, it's a big world. The question that I have is... how do i make it so that this widget only shows up two times? Player begins overlap a sphere that indicates close distance to that wood, and then he sees " ohhh i need to pick up two of those things "... and then the player will kind of get what he's supposed to do early on when he starts the game
should I use game instance for that?
or should i do a "sequence" -> "do once" in my item data, item data destroys the item and adds it to the inventory
item data is a component π§© shared among all my inventory items... and all inventory items share a parent... but that's not very useful info, Im just adding it just in case someone thinks it is important
Could construct a String and convert to Name and then to Tag.
But the Tag has to exist in general.
Do you want to show those two prompts at the same time, or do you want to only show them for the two times that the player still has to pick up wood?
In theory, you need something that handles your Tutorials. Some manager component on the GameState for example.
Then you could make another Component that you can add to Blueprints or Instances in your Level that can be used to register specific Actors with your Tutorial System. BeginPlay of that Component could register the Component or Owner to the main Manager Component, maybe via a (unique) GameplayTag. Other Systems can then query Tutorial-relevant Actors via that.
The Manager Component could have a system that goes through Tutorial Steps, where each Step could have "Actions" that get executed, or stay active for the duration of the Step. Those "Actions" could simply be UObjects, to keep them lightweight but still allow inheritance and what not.
You could then make an Action that gets all Actors that are registered with a specific GameplayTag and do something with them. E.g. "Tutorial.Entity.Item.Wood", and since you know those have to be BP_Item_Wood, you can cast the Actor to that and enable the Tooltip.
Something like that. It's good to ensure you create something powerful that can support all you need instead of making a bespoke solution for each thing when you encounter it.
Yep thats exactly what it ended up being. I had found that on another post online, but for some reason the first material I tried it on it didn't work. But I did it again on a new material and it worked perfectly.
the 2nd
So after the tutorial you never want to show these again?
yes
Then your Items should NOT have those Components by default. The Tutorial System I outlined should grab all Wood Items and add it runtime to them.
okay I see. I really don't understand Uobjects tho, never used them, I used library functions though
are there any tutorials about this?
I kinda wanna learn how to design those things in an efficient professional clean way, I can make a ghetto programmed tutorial but in the end I don't want a duck-taped result, i wanna do things efficiently and learn the best methods
I had a tutorial system before but it was too bad and I removed it to start again
UObjects are just the very base class of what you usually deal with in Blueprints. They are the base of (almost) everything you deal with, even Asset like Textures. They are very lightweight, you can create instances of them, use inheritance like you do with Actors, etc. Due to being so lightweight they don't support Components, can't be placed into the Level (they have no concept of 3D) and some other small things, like no Destroy function or creating them via CreateObject instead of SpawnActor.
The biggest difference is that they have no concept of the "World", as there is no guarantee that you create them within a World. Actors are spawned into the World, so they can use World related functions etc., UObjects are a lot "dumber".
Something that is very close to a UObject in that regard is the GameInstance, as that is something that lives for the time your game process is running, and isn't tied to any World/Level.
I have no idea. I barely follow tutorials, unless it's a new system I need to get into.
It's probably a good idea to take pen and paper and to think about all the things you might want to do with the Tutorial System.
- Different Tutorials
- Different Tutorial Steps within a Tutorial
- Those Steps might need a progress, and that progress might be very different between the steps (e.g., something counting up, something tracking multiple single "goals", etc.)
- Those Steps might need to do something when they get Active, when they are Done or while they are Active
- Some Actors might need to be relevant to Tutorials, so something to mark them and keep track of them without tying the logic too much to them directly
- Tutorial Progress might need to be saved
- Maybe multiple Tutorials need to run at the same time
- Tutorials and their Steps might need to populate some UI with instructions
Stuff like that. And if you think you have a good list of what you will need, check what you need to get these transfered into the game. Ask around what could be best used for XYZ. Take multiple opinions and favor the ones with proper explanations. And when you finally start, don't be afraid to rip stuff out again if it doesn't work or you forgot something in your list.
Personally I would use some sort of quest system. Even if it's only used for tutorial aspects of the game, it can be a nice way to handle it without having to put edge cases everywhere.
get it to actually work and worry about refactoring it later
this happens with regular code as well even if you didn't copy from a tut
Some Actors might need to be relevant to Tutorials, so something to mark them and keep track of them without tying the logic too much to them directly,
I could make an actor component to tie all those items that are relevant to the tutorial
Different Tutorials
Different Tutorial Steps within a Tutorial
Those Steps might need a progress, and that progress might be very different between the steps (e.g., something counting up, something tracking multiple single "goals", etc.)
Those Steps might need to do something when they get Active, when they are Done or while they are Active
this I think might also tie into a little bit to my level system. Your xp increases and so does your levels overtime but nothing happens you don't win anything at the moment for increasing your level etc. So I will probably need to fix that.
UObjects are awesome, it's definitely worth learning about creating custom uobject base classes for things that don't need to live in the word.
When making various systems, you'll often have an actor component that uses/creates some sort of custom uboject base class at runtime. The custom uobjects will often contain specific logic that the actor component can then call.
Nice, I like quests. Not familiar with any specific quest systems tho, is there any tutorial on this that you have on your ytb channel?
I've not done a quest system tutorial myself unfortunately. The quest systems I've created myself however, use custom uobjects.
As a short overview I'd have a custom uobject class that contains things like title, description, quest to add when completed (if any). I'd then have another custom uobject that's used solely for tracking changes in the world. This would also be specified in the main quest object. When it's complete, it'll tell the main quest object, 'Hey, all actions have been done, do your thing.' At this point it can check if a new quest needs to be added and do so automatically.
Having an actor component to then manage these can be nice and gives an access point for the UI to gain access to the data such as active quests and completed quests to display in the UI.
my questlines are an array of structs
i have not used raw uobjects much
probably should look into it
A short series I have done is the 'Stop Repeating Yourself' series. I do go over using actor components and custom uobjects so it might be a useful one to go over to give you some ideas. (it might give more context to what I said above)
I probably use uobjects too much. π Having said that though, I've not come across any issues.
I was working on an upgrade system the other day, which uses a data asset where you specify some properties, one of which is a custom uobject which handles applying the actual upgrade based on the level that's passed in.
The uobject goes and modifies the various properties in other places. This makes creating a new upgrade easy without having to have a ton of branches.
I can also just loop through all upgrades at the start of the game to reapply them all from a save. (not actually done this bit yet)
i see so you have your original stats, but then you stack upgrades onto that ?
i have buffs, but i have not worked out many stats other then hp,xp,stamina,power,level
Cant use them too much, they are so much better than structs or annoying data tables
Sort of yea. The game i'm working on isn't that type of game so I didn't need something overly complex.
For something with stats, I'd have the stats system have getter functions for things like GetMaxHP which would take the base HP modify it based on a list of uobject modifiers that have been added to the stats system.
There is overhead for creating uobjects so you do need to be careful if you plan to scale up massively. Structures can be more efficient from a resource perspective but they're limited in BP only. :/
Looking through some of the source code, there's a lot of places where structures are used like objects. From my understanding in C++ you can reference a struct so it's not just a copy, unlike in BP. :/
i think i mayve gotten it somehow w my older code. it decided to start working
minimal overhead for uobjects
they are a bit more expensive but its negligible
Unless your using millions of them
It's a bit more strictly simple than that in reality though. UObjects are 100% superior to structs in BP only.
Structs are just kind of bad in BP due to their breaking habits. And they don't actually offer anything. Actually they're slower to handle usually because you end up needing special handling classes like libraries for them because you can't put functions on them directly. I can't ask my struct in BP to return a sorted array of something it holds for example. You can do that with an object.
The second is passing them around. Most functions in BP are copy. The more complex your structs get, the more you spend on allocations. UObject also avoid this because you're passing a pointer.
You get NO cache friendly bonus from structs in BP. This is the one major place that they actually shine in C++ outside of creation costs because iterating an array of UObjects has you jumping around to access random memory. Accessing an array of structs is cache friendly, it's all there.
The creation costs are usually negligible in BP. You won't be scaling up to a point that it'll matter. Because BP only code won't support a heavy count anyhow just due to the way it runs unless you avoid any sort of iterations and strictly stay event driven which isn't always possible.
It would be nice if BP structs got some TLC.
as far as data goes i really like structs
because with a type system you usally are restricted to what you can hold
and array of structs for me is just naturally awesome
i see the point of uobjects can run code thats nice feature
You can inherit from a uobject which I would say is where it's strength comes from. Create a lightweight base class with some core functions and then create child classes and implement them. Something I often use.
It would be nice if blueprint structs could get to the point where it's not a buggy mess which breaks all the time
i don't have a problem with structs
if you change a name when it's connected it will break
and you have to refresh
but if you leave it alone it's fine
in c++ if you change the name it will fix it automagically ?
i have not had it break other then the times i changed it
you can add to it np
it just if your using a value you shouldn't change its name or remove it the wire will still be connected
It doesn't auto fix but doesn't just disconnect everything and error out the struct so its easier to go through and reconnect where needed. (From my experience)
i've heard they can "break" but i have not had an issue really π€
it's definately a pain when you have to change something
The issue with BP structs is that they're... stuck.
how can i make the fruits falling from the sky be vibrant and not show black shadows when looking from the bottom? just disabling cast shadows wont work
Like, you "could" make a BP struct that only references C++ types. Or maybe allow only using other POD types. In fact uh... U# and Angelscript both allow creating structs. There's no reason you couldn't do the same thing in the editor with some form of scripting layer.
Buuuut then you have to force them not to reference other classes somehow. That's one of the big gotchas with BP structs is their super ease to cause circular dependencies and get weird breaks where shit just.. doesn't work. And I think the scripting structs reload similar to C++ ones so they don't break as much.
UObjects have one drawback though - not being able to use BP FUnction Libraries, even if the functions are not world-sensitive. There are some ways to get aorund it but the point of Function Libraries is to have a general purpose function available easly. And it doesn't work with objects
If you're creating the base class in BP only that is true. You can add world context in C++ though which allows them to use FuncLibs.
It would be nice if they added world context free func libs that could be used in uobjects without world context.
Or even just a checkbox on the function to not require it individually.
Adding some emissive to the material would work. This might not be the best solution though.
True, or have it detect if the 'World Context' var is being used.
You can always just copy paste the function to UObject and not worry about library but yeah
Depends how much pain you can handle. Copy-pasting a function does severe damage to your programmer brain.
it works alright, it doesnt hide shadows completely but does an okay job. thanks!
@lofty rapids @crimson briar thanks for helping β€οΈ , i fixed it i plugged wrong pin in target of detach component
Can I point an IK bone to a target ? Like my arm for example ?
heresy
structs are life
if I can do it with a struct I do it with a struct
Only negatives besides the minimal performance boost
nope
the ergonomics are awesome
I'm talking C++ of course, not BP structs
And depending on what you're doing, the performance boost isn't minimal. I got well over a 10x perf boost moving to a tight array of structs instead of UObjects all over the place in my 1D simulator plugin. If you're gonna have hundreds of instances of a thing, just DOD it and zoom.
10 x ?
Come on now a uobject has maybe 100 bytes more, sure the garbage collector runs over it too but 10 x seems a bit much
But lets say it is 10 x, you would have to use 100k of them for like 10 mb overhead
Doesnt seem too drastic to me π€·
But in c++ i would probably use structs too, they are simply horrible to work with in bps
atleast for me they break all the time .... maybe im doing something wrong
Guess execution time is way slower for u objects hmnn
would this be how i can disable landscape collision in runtime?
why in ue5 the click template you have to hold the left mouse button isntead of just clicking once
Tight loop and cache misses
It's not the memory per se, it's the fact that they're shotgunned all over the place
i have a widget component on all bp_firstpersoncharacter that replicates and is designed to appear for all players. for some reason, the host cannot see these widget components, only clients are able to see it. the clients can see the hosts widget, the clients can see other clients, but the host cannot see any. any idea?
can someone make an example for a piston that moves up and return down in correspondance to an analog value from 0 to 1, like a trigger, so a smaller value wont result in a smaller speed but will result in less distance from the center height. it needs to have an adjustable speed, acceleration, return speed, distance that itll move from the center height, and be able to stop on a dime, and it needs to use the z direction relative to the piston so that it wont matter if the piston is rotating in world space.
i cant find any good tutorials for stuff like this, the best ive been able to do is using add force nodes and physics constraints, the problems im having is its hard to make it use the smaller values to move the piston smaller distances, rather than move it at a slower speed. and its hard to make it so the piston stops quickly upon letting go or it reaching the max distance, without effecting the speed that the piston moves
id help but i myself dont know much. do you know if you could help me out π
sometimes i ask chat gpt for aid, but in this case its not giving me good respose
i typically use gemini. though i think the problem is that the unreal guides on the website are very lacking, like the one for the physics constraint is like two pages, i think most knowledge is only learnable by just doing stuff within unreal itself, or reading the actual c++ scripts that create the nodes
do you know how to fix my issue
this one
Hello, looking for some help with collisions in Unreal Engine 5.
So I'm working on a physics based landing gear system. When I press G, it toggles its states between physics driven and animation driven (deployed & retracted / blending physics weights 0 - 1 and 1 - 0). The issue I'm having is that the collision from the physics asset still remains in place.
Is there a way to toggle collision off and on for a skeletal mesh physics capsule at run time or is the only solution to use physics control (which I have tried but it introduces excessive torque values that affect my flight model)? Here are some images:
Edit: nvm, i just created a custom function in c++ (callable in blueprints) that allows me to toggle collision at runtime per bone. Seems its not built into Unreal Engine 5 for some reason...
Can someone illuminate me on why getting the static mesh component like this does not work
Hello, so for whatever reason I have this tank I made using the chaos vehicle plugin and for whatever reason, everything in it works... except the set throttle input node. It fires but doesn't trigger a breakpoint, it doesn't show any error, and the vehicle simply doesn't move at all. I have no idea what to do, been looking for help for days now, and I'm wondering if I shouldn't just restart from zero and hope it works this time, which honestly doesn't sound like an ideal solution
show the node your saying doesn't work
What do you mean by it fires but..? Also you should post this in #chaos-physics as well.
then double click it and show that code if you can
Double-clicking it just shows a pop-up "reading c++ symbols"
If after the node I put a "get throttle input" node and print it, the throttle input value actually changes. It just has absolutely no effect. And yes, I'll post in the chaos channel as well, thanks
So the action value, which in this case is the throttle value changes (since you printed it), but the tank doesn't move?
Yes
And to be clear, it used to. And at some point, for a reason I cannot figure out for the life of me, it stopped
Do other movement controls work?
Also everything else works, brake works, steering works, suspensions work...
And the basic vehicles also work
Though they're made in C++ since I created the project in C++
Is this a physics based tank? (Physics Asset blueprint, etc.)
Yes
Physics look like this rn
If you want to see for yourself I put the project on github and can give the link
Aside : nodes that are c++ can be viewed if you have a c++ game project : all that needs is one dummy class. Then you can open the solution and the link from editor to c++ code will work in an IDE like vstudio or rider etc.
Even if you are not a coder, it may be beneficial to see the code of some nodes to gain insight into issues
Oh that's interesting, I had no idea
So if I open Rider I could find the node's code?
Yes, and should also work direct from editor to the location
How does your tank actually "move"? Do the tracks propel it forward or is it something else. For example Left track moving forward and right track moving backwards/at a slower rate rotates the tank. Also could you elaborate on "when" throttle stopped having an effect.
It's just a bunch of wheels
It stopped after I opened another larger map to test the suspensions on harsher terrain
And now it doesn't work on any map
How exactly could I do that? I'm not sure about the exact steps to do this
If you use version control, you can diff changes
I don't :/
Didn't think I'd find a game breaking bug after just a day of work on a brand new project
the pain of mystery changes...
assuming you have tried restarting unreal to make sure it's not an editor glitch, without version control you may waste untold amounts of time pondering what got broken : (
"a story as old as code itself"
I feel figuring out what went wrong would be better since it could happen again at any moment if I were to make a new project from scratch
Is there any difference between maps? level blueprint, etc. If the inputs are being registered then it has to be from the outside environment.
Yeah I tried it on the offroad vehicle map so it was a different gamemode, I overrode it and I think that's when it stopped working
What's weird is that the first map I tested it on, well it doesn't work there either now
there should be a leetcode but for unreal blueprints
Something is seriously borked in your project π€£
Do you have another way of actually moving the vehicle forward aside from enhanced input? Like injecting a throttle value with event tick or something. Would help to isolate whether it actually an input error or something else.
Get the vehicle to automatically apply a throttle value of 1.0 without providing any player input.
Any other way of changing the throttle value doesn't do anything either
Are you using the same input for reversing the tank? like multiplying the throttle value by -1 or is that a completely different value?
What im getting so far:
- Every other tank control works except moving forward
How about your input settings?
Reversing is just setting the throttle to -1 afaik
Doesn't work either
Input settings are default, haven't touched them
Can I see more of your blueprint? Triggered > Set Throttle Input > Node I cant fully see.
It's get throttle input to print it
Like tbh the blueprint is as basic as can be, I add mapping contexts and then I use the vehicle movement component's functions to use the vehicle
and throttle input is 0 to 1 ?
Yes
What did you program into c++ in regards to the input values?
You could probably also post this in #enhanced-input-system as well.
Im convinced that is the issue has nothing to do with input values but i mean...
I have zero c++, I made the project with c++ base files since it's meant to have multiplayer so I figured it'd be easier this way than to start with a blueprint project and later import the necessary c++ source files, which has caused me issues in the past
Try recreating your blueprint (you'll have to change your assigned game mode pawn). Redo the control system. Dont do a full project restart. Just create a new blueprint and change your references to that new blueprint
I never used it like this but shouldn't you attach the Static Mesh Component and not the Static Mesh that is assigned to the Component? Unless the StaticMesh there is a custom variable, not the engine one - then check if your reference is correct.
Does it have gears ?
Yes
Already did, it doesn't work even if I recreate a new pawn
I don't see where you put it in gear
Hmm ya automatic but do you need to put it in drive ?