#blueprint
1 messages · Page 176 of 1
I don't have a better example project atm. But like here, I needed to toggle indicators on and off. I don't really want to care about the widget here. It's on screen somewhere and I can't be assed to track it. So cheat just broadcasts a blank message. I'll probably swap this to a struct later that has a desired visibility or bool or something.
And here is a listener which toggles the visibility. Same tag. Rotator is a blank hack, etc.
Use debugging breakpoints to see how far you are getting along the chain from overlap
is it possible for you to elaborate further?
For starts, don't cache the pointer, it isn't going to save you much here. AI beginplay can run before the player is assigned a pawn. Might work sometimes, might not work elsewhere. Just use GetPlayerCharacter in the == check.
Make sure that this pawn has an AI controller.
Press P in editor and make sure that you have a nav mesh where the AI can move.
I would certainly use this for something which I know may certainly have multiple listeners. Interface still seems like a good thing to me, even for single pairs of things needing to do something
Debugging is a very helpful way to see how the program is executing, being able to see variable values on the fly without manual logging and so forth.
https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-3-documentation?application_version=5.3
Just cast it on overlap, from my experience first even from begin play and casting here might not work and will make your head hurt. If you really want, just store it after first overlap and then do checks if is valid then just do something, if not then cast again. Of course depending on if it's always just this one class.
Interface is only useful when being ran on something you don't know what it is. EG line trace with an AActor return and you don't want to care what type. And there's no reason to decouple here, these widgets are working together. And given that they don't want to know each other, they need a global scope to work with which means AHUD, PlayerController, or something like the MessageRouter, so that one can listen and one can broadcast. So more likely a delegate somewhere on a major class that both widgets can reach.
They can't even use an interface here because they don't want to link the widgets together. There's no way for them to reference each other to call an interface function.
I see your angle, but still beg to disagree - given that I don't really want to start building up any additional scaffolding in other classes, it's a perfectly clean way to handle things.
The whole point of Interface is to not need a reference, just use GetAllWidgetsWithInterface. ( EDIT: Remembering to not use this thing every frame since it's a GetAll )
I don't see why I should be limiting myself to not using such a powerful and relatively clean and low impact pattern because it is 'not meant to be used for that'.
I did some searching to find others who have blogged about the subject in general
https://medium.com/@lemapp09/unreal-interfaces-blueprints-fe5c8067c0d9
Using interfaces just as a means of getting a ref is wasteful. There's overhead for using an interface so using it for things like this throughout a project could add up.
It's better to learn good ref management.
Edit: contrary to what that article says, heavy use of interfaces actually makes a project more difficult to manage as it gets larger.
okay so i added the nav mesh and added the event tick and now it works
so that it follows me every frame while i'm in the radius
If you specify Target Actor instead of Destination it will follow this target, until you tell it that there is no more target. Also you don't have to do it on tick.
does anyone know of a good way to make combinations of things? Right now i have a system where an enemy can have a certain status effect which if hit with another status effect will combine react in a specific way. For example if a burning enemy is hit with water it becomes steam, but if a burning enemy is hit with lightning it becomes an explosion. The current way i have implemented this makes it all very messy and just involves a bunch of branches. It really feels like there should be a better way.
What defines what a status effect is and how is it applied to the character?
A different way of asking: How do you determine if something has a "burning" effect applied?
Water and lightning seem more like attack types as opposed to status effects.
so a nav mesh determines where an AI can move around, but because i have it that the enemy wont target the player unless it enters its space bubble, then i can set multiple nav meshes to have different groups of enemies around the map? or is there an easier way to do this?
a status effect is another actor that gets added to an actor that gets damaged and then does something to it. If an actor is burning for example, a "burning" actor gets attached to the hit actor and continiualy damages it. What status effects an actor currently has is controlled through an enum in a status effect component that i have created. This enum gets set to a certain effect when one gets activated and is reset when the effect dissapears.
The reason that the effect is in the form of actors that get attached is in order to avoid bloating the enemy blueprint among other reasons.
you determine if something is burning through what value an enum has in the enemys "status effect component"
yea the effects will probably be called "wet" and "electrified" or something. When i say "water" or "lightning" im just refering to the status effect incurred from that damage type
I am trying to create a scene component that will add a widget to any actor I want - I have it set up like this but I get the error message 'accessed none trying to access widget component' and not sure why as I cannot set the widget component variable to anything prior to using the 'set widget node' - all options to do it in the details panel are empty what am I doing wrong here?
Ok, so you can only have a single status effect enumerator applied at one time?
yes exactly, if another effect tries to get applied they are supposed to combine in to a different effect
The thing is. Those points are bad. I'd honestly doubt the people who actually make these points have worked on scalable project.
-
Decoupling - You don't use interfaces to decouple. You use common sense and a set of clean base classes that you can run functions on. You can get an cast to these everywhere in your project and stuff keeps basically no footprint because these classes are super small with no assets, they're code only. This is what most studios do with their C++ classes. Because C++ classes are code only classes as well an can be safely cast to without worry of heavy linkers. You can do the same thing in BP simply by not specifying assets or linking core classes to classes with assets. This maintains OOP as well, keeping events and logic in the systems it belongs in which makes them make more sense.
-
Flexibility - Interfaces are NOT flexible. I want to make an interaction system. I make an interface with has a generic StartInteract and StopInteract function and I can call this off of a line trace. I start with a door, I want to open this door from this interaction. I have to implement the interface, make some state for interaction cause I need to hold the button to open this door. So door needs CurrentInteractionTime, MaxInteractionTime, Door needs to implement the timer for maintaining this state. I also want to allow two people to open this door at the same time at a faster rate. Now I'm managing this timer whenever anyone interacts and refreshing it for one or more people based on the current interaction time. But hey. Finally got this door done. Awesome. Now lets make a terminal. Well these don't inherit from the same base class. So... Now we're adding in CurrentInteractionTime, MaxInteractionTime, Timers, multiple user state. Etc etc... We're already in the realm of code copying, so lets just keep on going with implementing interaction with NPCs, Horses, Chests, Puzzle pieces.
Meanwhile a single component class could have been dropped on every one of these things, with the interaction logic set in the component with some simple state set per main class for time require, max interactors, etc, and all logic reused between every one of them.
And top top this off, Me as the UI engineer doesn't have to do into half of these classes to fix gameplay bugs that happen from all of this code copying because gameplay programmers blame it on the UI not working. I only have to care about the UI and the component for displaying interaction stuff.
- Scalability - Interfaces are not scalable as point 2 also proves. They require more work by having to implement it in more classes than simply dropping a component in and setting some properties. They can't hold state which cripples them, they have to rely on their implementers which leads to duplicating code in a lot of cases, which is definitely crippling for scalability.
Meanwhile if you're serious about any one of these three points. You just simply learn good core class design. Good system design. Do data driven stuff so that you can keep your heavy data in data assets and only load them when necessary.
I would probably do a check as part of the attack. The attack checks for the relevant status effect and changes what it does. Regardless, you'll need to do a check but this way there are not all in the same place.
So a watery attack would handle checking if the target is burning etc ..
That sounds like then you could potentially use a map of incoming enumerator > structure containing a map of current enumerator to desired enumerator.
So when applying an effect, you look up in the map, which gives you the second map to look up the value of the currently applied effect, which gives you the enumerator that should be applied when the effect gets applied.
An alternative would be to build this map into the effect itself, and read from it when applying the effect.
that could be done but if i want to expand it that solution wouldn't really be ideal
Why wouldn't it? And expand in what way?
that is a lot of maps, i dont quite understand what you mean. Do you mean a map like this?
Yes
if i for example would want to add 5 more status effects i would need to revisit every single different effect and add in the new combinations instead of doing it in a status effect component or something simmilar
i see, ill try it
So each status effect would interact with all other status effects in some way?
yes
Would end up looking something like this if you had the map defined in your status effect actor.
but wait, how would that work with multiple status effect interactions?
So there can be multiple status effects on the target?
If you wanted a map contained in your StatusEffectComponent then you'd need something like this...
not, if a target has one status effect and if another one tries to get applied they become a different effect
You're basically converting from one enumerator to another based on the enumerator value of the effect.
ah i understand
What datura said is probably the best route but one thing I would recommend is using gameplay tags instead of an enum for your status effects.
how so? what advantage does gameplay tags have over using an enum system?
Agreed 😛
Enums can get a little slow to work with when you have a lot of entries. Gameplay tags can also have hierarchy. You can also have a gameplay tags container and specify multiple tags at once if needed.
okey, maybe ill change to that if things get to messy with the enums
hiii!! I've been trying to change the parent of a blueprint to another C++ class but every time I close the editor and I open it again I don't know why the blueprint changes the parent class to another. anyone knows how can I fix it?
It's better to switch sooner than later. 😛
very true
How many status effects do you have at the moment?
just 5 normal ones (the ones that the player can apply and that can combine)
even deleting the blueprint and making it again it changes when I close the editor
So assuming each effect can combine with the other bases to create a new effect you're already looking at 15 effects so I would switch to gameplay tags.
ye ill look in to it
never really worked with tags before so might as well learn
Gameplay tags are pretty awesome and pretty easy to use.
It's very much like enumerators.
Tried to delete Binaries and Intermediate, recompile and run?
yeah, tried that 😔
nice
@dark drum @dawn gazelle thank you both so much for helping :D
I now see that it reparents the BP to the Parent class of the C++ class.
I'll explain: The BP_MagicProjectile I'm trying to reparent it or even create it from AMagicProjectile (C++). AMagicProjectile derives from ABaseProjectile (C++ Parent). The BP_MagicProjectile works well the first time created, but when I close the editor and I open it again it changes the BP_MagicProjectile's parent class to ABaseProjectile instead of AMagicProjectile. I don't know why
How are you opening the project. If you're using C++, it should always be via the IDE
I'm opening it with the IDE (VS 2022)
it seems that changing the name of the C++ class fixed the problem
anyone know what could it be?
Ah looking at it, it could make sense. It may be sharing a same internal name and not liking it
Hello, upon click, I'd like to temporarily (0.5s) highlight or outline a mesh I clicked on (i.e a building), is there a node for that?
The scirpt name of the bp should be BP_MagicProjectile, though. not MagicProjectile.
But maybe there's a conflict somewhere else.
Like EMagicProjectile or something
If you check the output log it will tell you these things.
Hm good point.
You'd have to probably use a niagara effect, a material or a post process effect all of which is more than just adding a single node.
Use reroute node 😡
and flip the boolean on the way back?
That'll be something you've done.
We’ve seen worse
I made too much spaghetti my self so it's something im concious about
I do mine with Create dynamic Mat instance and changing the color so about 2-3 nodes
I rmbr having to change the mat to the new instance but it seems if it’s already an MI, that last step is not necessary
Requires you to have a material set up to do that first tho, no?
It’s possible 😅
Mat has a param plugged into emissive
But yes, to your point it’s not a premade node that does it all hehe
Would there be much of a performance difference from updating a variable on a actor and replicating to all clients as opposed to storing the data on the server and then grabbing that variable from a array when the client request?
I would assign a variable to every actor reference inside of a array, if that is even possible
How can I get the spline segment index given a distance along spline?
I think Floor((Distance / SplineLength) * NumSplineSegments) - 1
Distance / SplineLength * NumSplineSegments is float math. then floor to int and subtract one.
I would stick to #multiplayer for that side of the engine
What would be better practice? I have a timer which lowers the player's hunger/thirst level, would having the timer inside the character blueprint be better than say a timer in the gamemode looping through all players? Or vise-versa? Since it's multiplayer and will be multiple players.
Afaik there’s one game mode per player. But I could be rmbring it wrong. The above message applies to you too
Hmm interesting, thanks. Also, sorry forgot about that channel.
That side of the engine has very different rules, it’s like entering another dimension😀
Seems to work pretty good, thanks!
(nvm im dumb and found it)
Hey anyone around here who would have played around with Oculus's sample project, Hand Gameplay Showcase? https://github.com/oculus-samples/Unreal-HandGameplay/tree/main
I'm having hard time understanding what should I do if I wanted to modify this in a way that i.e. picking up an item would trigger a message in a widget in world "Yay you picked up item [item name]".
you will have to spawn an actor with a widget component which contains the message
Hey friends 🖐️ I don't really understand how lightning works in UE5. I applied the same material for every model on this screenshot and they react really differently when there is no/a few lights > some are super bright and white (player and lever) and others are dark like I want. I created a new material "No Texture" which is just a white node color. I want the game to have no texture to feel flat and only react to lights. Do you know how I can turn the player and lever dark like the rest ? Thanks 🙂
Would prly recommend #lighting for that
Oh thanks I didn't see that channel
Hello guys. I have a question about "Launch Character"
I connected this node but it doesn’t work, everything was fine in the old project. Maybe you know why?
Does it work if you disconnect the PlayMontage part?
No
I wanted to implement a character pushback after being hit by a block
What happens if you set the Z value of that LaunchCharacter node to something higher than 0?
I'm somewhat sure the reason why your character isn't moving is cause the GroundMovement of the CMC isn't letting it.
the character is pushed, but not at the moment when the blow is struck
How to make it push off exactly at the moment of impact?
In theory, LaunchCharacter should happen instantly. But the CMC is coded in a way that it will only really handle the LaunchCharacter stuff if the player is "falling".
And if you are in contact with the floor, then that's not a thing. The Floor will just stop the character.
Increasing the Z value causes them to lift of and handle the Launch via Falling Mode.
A proper Push Back can be done via RootMotionSources (not RootMotion, but RootMotionSource, which is a fake RootMotion via data).
However, those aren't really exposed to Blueprints outside of the GameplayAbilitySystem.
hello, how could I dynamicaly change timeline values?
Hey everyone, does anyone know how to assign a texture to a widget? It just goes transparent to me i don't really know why, could it be an issue with the way I'm assigning the texture? ive tried both make brush from texture and Binding the brush to a variable to which i then assign the texture, but still it doesnt work
A timeline is fixed. You would have to do some math on the output to get it how you want. (If it's possible)
I must use tick event ?
That depends what you're actually trying to do.
I want a Dynamic camera change animation TP/Side scroller
But I want wrap it to add multiple kind of camera views
You can change to PlayRate and whatever it procudes fwiw
But if you want more control you probably want to do it with Tick, yeah
what is the correct way to spawn continous sound effect, a camera zoom in has that buzzing sound effect on old cameras, i wana made a slider for zooming into and play that noise, how do i make that noise without just shoving it on "value change" (hope this makes sense 😬 )
hey i have a question
on my level i set in the level blueprint that Event beginplay connect to play sound 2D and i put the sound
now i set a button and i want that when i click on the button and move to another level the sound will contine and not reset
becuase in the new level i did the same
i did event begin play connect to play sound 2d
and when i click on the new level the sound still going on but from the begin and not contine Continuously
how to do that?
Best way to go about playing a media player MAT sound at location? Since i cant find a way to create a cue or aut im using it as a tv its currently just playing in 2D
Hey is there any reason my timelines are only executing once, meaning when I call the event for a 2nd time the timelines execute but show no change the objects they manipulate in the scene
they resume where left off
so if you want them to start over you have to connect to play from start
Ahh I see
This should work right?
that's wild...
just use Play From Start always
or flip flop and Play and Reverse
but not like you have it right now
how is it wild?
oh
makes sense
Sorry sometimes I'm slow lol
i set sound in my level
when i move to another level i want the sound keep going
how to do that?
IN the main level
i don't think that you can do that
the audio thread gets restarted on level change (from what i know)
that not making sence.
i i am on the main menu of the game andi want to go for the shop for the example
the music should not reset
Not possible in bp imo
Maybe at most you can store the music play time in game instance periodically then when you open new level, you play new sound but skip the time to the one stored in GI
that will at least stutter tho
that my main level okay
For sure 🤣
i want to click on get set for example
so obesely i need new level
in all the games that i played that was possible
If your definition of new level is travelling with open level, then your audio will get killed when opening a new world
Blueprint is limited
can i do that with c++?
i'm still kinda sure it doesn't even work with CPP unless someone with reputation tells me that i'm wrong 😄
I mean you can kinda do everything in cpp?
but you can't avoid a restart of the audio thread
Can't u play sound on diff thread. I'm too new to make comment
I see, well I got no idea but surely if anyone have enough will they can edit the engine code
i didnt plan that
Not the end of the world
Issue is, that these 2 timelines close 2 doors at the same time on Start. But on Play from Start, for whatever reason the 2nd timeline is only executed after the 1st is finished
Why r u playing it on update?
If u want both to play, go have a sequence
[2024.06.01-13.44.25:498][389]LogAudio: Display: Audio Device unregistered from world 'None'.
[2024.06.01-13.44.26:333][389]LogAudio: Display: Audio Device (ID: 2) registered with world 'Testlevel'.
ok maybe i was wrong and the audio device just disconnects from the world
you keep telling the second timeline to start constantly as the first one is playing
so maybe it's possible in C++ 🤷
Maybe we can register it to GI subsystem?
That may keep it alive? I dunnoe
Works now, appreciate it
I kept my loading screen alive with subsytem
you should look at lyra loading screen :>
it's super easy to port it to your own project
I'm working on lyra camera atm
Easy for you 😄
Well I should look at it again, will do that. Ty
I'm sure w.e I have now is pretty bad
i tried smth similar before, and it was funky, since it respawned the widget... lyra loading screen does it fine
Is it possible to use macro library from same class it inherits? Or i need to make 2 base classes so i can have my macroses in child classes?
Tbh I did nothing much. I made the widget a shared pointer and it somehow survive from being gced
Deff gonna look at lyra loading screen layer.
how can i make camera system where when the int reaches the last camera, it resets to 0 again, other than manually check if int = last
ty ty <3
Hey all, I'm very new to blueprints and I'm having a bit of an issue with this BPI. I'm not able to add in the (Message) Class node at the end of this, any idea what could be up here?
You need to uncheck the "Context Sensitive" box in the new node pop up
That worked, thank you so much
Been staring at it for a bit too long
The event is not activating on a separate blueprint still unfortunately
how do you call them?
I have a begin overlap event, a cube static mesh with simulated physics that I'm moving on top of a platform with a collision box
why is it so confusing
That does not fill me with hope
oh lmao thought you were talking about mine, panic over
that's mine
Can you share this code
Hi, does anyone know how to use structs to store items in an "inventory"? Ive been trying to figure this out for days but cant find a solution so if anyone knows that would I would really appreciate it
gladly, how would I go about sharing it?
Oh I just mean a screenshot should be fine
Oh hahha okay
Yeah I watched it but it doesnt seem to apply to what i need, my Items are created at runtime and are all the same except for some slight variation, so no need for data tables
If it wasnt obvious Im quite new to unreal and i cant figure out where to store the object information
It might worth looking at Map variables instead. They might be able to help in your situation
what are youy trying to do
What is the Variable: Map in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
Oh ok thanks, I'll look into it
That's everything I've got for it, the interact works fine. Changing the boolean default does work in changing the print string but the issue seems to be between the "On Counter" BPI
I put the object on the actor, unless its in an inventory, which is an array of objects.
Does this apply to UE5 too?
Yes
ok thanks
this applies to ue, C++, and every programming language, yes
oh ok
you dont have a lerp?
Sorry, what's the issue with OnCounter? Is it that neither of the branches are firing, or only one?
no? it's not needed here, but you can use it if you want
but I just use math
goes from a value to another
Only the Event is the issue by the looks of it, if I put a print string after the message it goes through no problem
oh alright
A - Starting position/ value
B - Target position/ value
Alpha - A value between 0-1. 0 = A. 1 = B. In your case the Timeline creates the alpha value. With a five second timeline running linear, the alpha will have a value of 0.5 (halfway) at 2.5 seconds
🤩
So BPI OnCounter doesn't seem to be firing?
Thats right, from what I can tell
But the print string you have before the call message prints okay?
what could be causing blueprint not to save structure variable default values? everytime I edit the values in blueprint under default section -> structure and reopen my project it loses all the given values.
Yeah, that's not had a problem at all
90% of that makes sense
can be more than 1
Does anything print if you just have a PrintString fired by the Counter event?
You can but there's basically no reason to most of the time
What's the 10%? 😁
if you dont understand, dont use lerp
Or... ask questions and try to understand it?...
Oh I use plenty of code that I dont understand 😅
The last part about the timing and the alpha
that's sad
Sadly, not firing even when just like this
thats how it is
the term "Blackbox" is a thing and its applicable
yeah well gotta start somewhere
true
Lot of time you dont know or care how something works. Long as it gives you the output you want
wdym
Blackbox is a term for a piece of code, framework really anything that you cant see inside, dont know how it works, and honestly dont care because it does what you need it too
Like Idk how a 'gate' or a 'do once' works internally. But I know it works, and mostly how to use it
So i do
that's not what he dont understand lol
You asked what the term meant not what he understood or not. Also who cares if he does or doesnt understand
Okay so the Alpha value should (almost always) be thought of as being 0-1 . Or a value between 0% and 100%
If you have a one second timeline plugged into the Alpha. When the timeline hits 0.5 seconds, the Alpha will be 0.5 (halfway between A and B). In a five second time timeline, an Alpha of 0.5 will be hit at 2.5 seconds. Most of the time you won't need to worry about specific Alpha values, just know that what's plugged into there is basically how long you want the change between A and B to be
So from what i can tell I can only assign one value per key, but since I have to store multiple variables (in this case the name of the item, a texture, and some other stuff) could i for example set for each key a struct? But still i can't really see how that would be any different from simply using an array... anyways thanks im sure it'll turn out to be extremely useful at some point. The main issue is where I can store this info, without having to cast all the time
But TilInteract fires just fine?
Yeah, Till Interact works no problem
This guy does great breakdowns on Unreal nodes and concepts if you ever want to learn more of them
What are Lerp Nodes in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
Weird...
Honestly man, I know it
Might be because the Till message is coming from overlapped actors of class BP Till but the counter is coming from straight Actors
You might need a cast in there after the Interface check Branch
I will give that go
There's a lot of casts, any idea which would work?
Got it
My man Mat is always helpful
Pull out from the Array Element pin and cast to whichever BP the BPI Events are in
So if they're in BP_Counter, you would type cast and the name of your BP
Ahhh yeah seen okay
Hey uhh not sure why this is happening. Started when I switched from using 'Get Actor Location' to 'Get World Location' of a component
how is the train moving?
It's supposed to move 500 uu back from it's current world position
That wasn't it, the print string doesn't activate anymore 😭
this is wrong, GetActorLocation && (500, 0, 0)
it should be GetActorLocation + 500,0,0
I had this before, but the issue was that bc I'm respawning this bp in different parts of the map, the actor location would stay at where the first BP originally spawned and not at it's new location
Not sure if that makes sense
I presume this uses a timeline as well? Can we see that? I know they can get a bit screwy if variables aren't set before the timeline runs
Yes this is the code,
Okay yeah, so every update tick, it's updating the start and end locations again
You need to set the start and end locations before running the timeline
I see
Yeah I tried that before, didn't work for some reason but I'll try it again now
They're plugged in the wrong way round in the lerp
It always helps to get a new pair of eyes who doesn't know what the outcome should be, when you've been staring at the same code for hours 😁
Yeah exactly 😅
Hmm
The outcome changed
Still not the intended result tho
Are you getting Actor Location now or still the mesh?
you have to set the current location and not using GetActorlocation since it runs on all frames of the timelione
I'm setting it before the timeline executes
hello how can i handle this problem ?
i want a simple actor get damge by tag
Try using Set Actor Location instead of Set World
that's what I just said llol
here
I mean where they're setting the Actor's location in the timeline's update
Oh I see the issue nw
b/c before the timeline was only moving a component and not the entire actor
so getting the actors location wouldn't get the location of the componnet
mhm no?
You need a branch from the Trace's return value to check if it hit anything. If it traces and doesn't hit something right now, you'll get an invalid response
Works perfectly now! 😅 You both are amazing, i appreciate the advice
hit is working
Add a guard with Valid check on the hit actor
otherwise u will get an error when the actor is null
ahhh ok thats sounds good
its working CHAMP! thanks!
hey guys, I am setting up a random probability 50% chance (Random Probability Integer - 50 Value) to spawn an NPC, why even though I get printed a number that is greater than 50 always I get the true statement? I originally used floats but I have the same issue. I must be missing something really silly but can't find it
I think because random runs for each connection, so your not actually printing the correct value
Try to set a variable then check that you'll probably get accurate reading
ohh many thanks, it is working now!! it worked when i did set up the variable :p
my car wheels are not aligning to the body any help
how find all blueprint that are in custom collision preset in content browser using advanced search or something like that?
I doubt you can
someone remind me, if I cast to an empty base class, am I loading all the assets in its children into memory?
No
thx 😅
Trying to create a basic dialogue BP that loops on the last line of dialogue once the player has had the initial conversation.
i thought this would do it, but it just runs through once and then nada
how can i make sure it loops the last line of dialogue?
I'm using UE4. Debugging blueprints is impossible for me because data structures can’t be watched. They always give “no debug data”. Is this a bug or limitation? How am I supposed to debug a blueprint with data structures?
Can someone take a look and see what I'm doing wrong when adding to an array within a struct? The length of the inventory is 3, but the struct just holds the last variable. There isn't a "Add unique" option like for a regular array variable
hey i'm trying to change variables on the ui in the level blueprint since i want to have multiple levels and each of them has different ui values, but when i do this (which has worked for me before with other classes), the set text nodes get a null pointer error. If you can't do this in level blueprints how do i change values for the ui for each level?
#chaos-physics try here
Looks like you're making a brand new array on each loop (SR_SetPlayerInventory). So the length will always be one.
I think you need to break the structure to get the array pin, use that to get the Add Unique node, then update the structure again.
Just a thought here: why not store the level details (name, UI details, etc.) within a structure in the GameInstance? Then you can just load all the details you need by firing a GameInstance function from the level blueprint.
that's how we've been taught so far we haven't began using structures yet
i've also tried making multiple huds and stuff for each level but that really didn't work
the HUD among levels is identical safe from 2 values shown as numbers
I'm looking to make provinces that have central building for upgrades. What is a good thing for me to read into? I'm thinking of using splines but I'm unsure of how selecting the "spline zone" would bring up a menu or selecting the area. Any tips or where to start would be great
Thanks! It worked perfectly!
You are settings members in the struct and not adding to. You are basically reseting everything and just adding these Make Array as first ones.
You can make something like Data Asset for each level, then assign it in the each level/map blueprint and tell gamemode / gameinstance to use that data asset and load that data in the hud/playercontroller. If you dont have a lot of levels this may work as you asign it manually. You can always create something like BP Manager that you will always put in every level, and handle logic here like switch on Level1, switch on Level2 to use this data asset.
Looking for some help with sliding (down a slope, kind of like in Rayman2 or Mario64).
I have fixed animation and keeping the character face downhill.
The problem I have is the sliding itself. At first I tried line trace and calculate the impact normal and launch the character, but it was very slow downhill and it wasnt possible to raise the speed as the character would totally stop if the force was too high.
The current prototype is using "conveyor belts" to speed the character down the slope achieving the desired effect. But it becomes hard to make maps using it.
Anyone have any other solutions or tips how to make the first solution work?
Instead of launch, why not make it like ice if you can
I think there's some settings like friction and deacceleration
Unfortunately that wont work, there will still be some friction ultimately making the character stop :/
even if set to 0
That's why I mentioned deacceleration I think it's called also
You can get a decent slide usually
Have you tried assigning Physics Materials to your sliding slopes? I'm pretty sure you can adjust things like friction and bounciness there, so anything using the "slope" material will have very little/ no friction
I guess combining a new material with no friction with removing braking deceleration falling might work
Il try that first
I have tried for so long and I am losing my mind xD
I'm trying to make an ai enemy. For now, I just want it to chase the player. That's it, no need for roaming and detecting. I just want the ai to always know where the player is, and always chase it. I have tried googling, youtube and chatgpt. But I can't get this to work. Please help me 🙂
This playlist covers the AI in general pretty well but also sets up that system.
Thank you! I will watch it right now:)
I've just thought, you could also just use an AI Move To node in the actor's blueprint. No need for AI logic and behaviour trees, just need a Nav Mesh in your world
Yeh, I've tried that for so long, but after following the video you linked me I figured it out after just a couple of minutes. THank you so much!!! I think my main problem were locations.
No worries 😁
yo does someone know how i can spawn actor from class inside Animation Notify blueprint?
why is it not possible through Notify BP to use such node?
Can i use a struc as payload?
For enhance input How do I switch the control pawn and the mapping context? This the default and I tried just copying it over to the new pawn and it did not work at all so I am guessing there are specific nods for doing what I want but I could not find a tut online and the enhance input documentations are trash!
I'm trying to make a nice simple ability/skill system for my wizard. Is just making each ability an actor component and adding it to the player character a good way to go about it? anyone have any resources? GAS is way too much for my simple game i think
maybe i should create a base skill component and child the rest of them?
I want to make a BP actor of a door that includes all FOUR swings that a single door can have (LR, RH, LHR, RHR). But I can't find a good tutorial on that. Is there a certain term to use when you want to make an actor have "options"?? Do you know of a good tutorial for something like this? Thanks in advance
Because the notify it self doesn't have reference to the world. You can route the spawning through the owner
You need to run those nodes on owning client. That’s what the monitor means. That node will only execute on client, you are calling it on server currently
I think i'm overcomplicating getting the player to slide along the X axis in comparison to their rotation/where they're facing
help plz
You can get the forward vector or the right vector as needed
You then multiply whichever one you want to use by whatever distance you want to travel, get the actor’s location and add the 2 together
Then use a timeline with a track from 0 to 1
Lerp between A (current location) and B (the calculation mentioned above) and plug the track into alpha
i uh...?
Don’t break the pins
Just use fwd vector and location
If that goes the wrong direction, use right vector. I can’t rmbr which way character is facing, ik it’s different than the rest of the engine because… Epic
I.. i um...
(Vector * distance) + Location for B
And just location for A
And disconnect that new time pin, idk why you connected that lol
I have never publicly stated i'm super super smart
hellow i wanna ask , am i doing something wrong here my IsRoll is never set to true
the beginning part in case
the idea is i wanna do a Dash/dodge into a roll
I can't find a spot where it would set isRoll as checked, do you have this happening elsewhere?
if it's a dashdodge, you could also try and Boolean AND... maybe use a delay to time stuff up
i can use delay but the idea i had is i have to tap the dash button twice
Oh solid, that makes this way easier for my rookie self
Mayhaps add a "firstDash?" boolean to check in the background, so it doesn't interrupt or use anything you've got booleaned now
hmmm first dash huh where do i put this
wherever works best, i'd prolly put it right after i pressed my dirst dash. Sequence, have a delay going on one to disable the first dash once it's done. other line going to the animation
oh oh, a sequence BEFORE checking the first dash
ill see what i can do ty for the sugestion !
no probs, i've been having trouble with the memory today but i'll try and rig one up on my end. I can literally pitcure it but it's one of them days i guess.
i'm forgetting things but i wanna send this before the brain wipes
wait i think i made a bool redundant
I think that's more right.
yes... yeh i think this is right
Hello, I dont know if this is the correct channel to this problem but what happens is that the engine is taking too much ram and when I try to add or open things it gets crashed
my friend's project only takes 2gb, the mine is taking 8-9gb
and it's the same project
You need to add that calculation to the location
Please reread those messages I posted, I can’t really make it more clear
Guess I can try
What this does is get a direction , and project a goal location at the specified distance, by adding said distance to the current location
So if X for your char is forward you’d use the forward vector, if it’s right, you’d use the right vector, and so on
I can’t rmbr or check rn which direction is right for char but it’s different than the rest of the engine. You can check by looking at the arrows in the char’s viewport
How do I prevent Unreal from creating a camera at begin play?
I do not want to add a camera to my Player Character (I render via RenderTraget instead) but Unreal still creates a camera on begin play. How do I disable that??
A character have camera by default
You can just set the view target to something else at begin play?
I'm trying to achieve this kind of effect in Unreal. The camera render only taking up a part of the screen, off-center. And I succeed in projecting the view from Screen Capture2D to a RenderTarget on a PlayerWidget. But then, behind the widget, it's still rendering the regular camera view. Even if I delete the camera component.
question, i made a blueprint implementable event out of a function i defined in a C++ component, but how do I actually go about implementing it in blueprints?
Im doing something similiar right now and I'm just creating BP_Ability with all the logic for all possible spells, so literally from 1 event i make branches like isRanged, is Healing and then I create Data Assets which I asign when I spawn the skill from the unit/character and it feeds the logic.
Check at the top of the functions list, there should be a + symbol, click on it and if done correctly you should see your overridable function there.
guess i didn't do it correctly
this was how i made it ```cpp
UFUNCTION(BlueprintCallable,BlueprintImplementableEvent)
void HitScan();
UFUNCTION(BlueprintCallable,BlueprintImplementableEvent)
void ActiveHitScan();
i should also mention this is on an actor component rather than the actor itself
How do I make a collision be able to move a char? like if my hand is pushing agenced a wall it should push me away
Then it would be implmentable on the actor component itself, not on the actor it is attached to.
im having an issue where a mesh isnt disappearing once ive set it to nothing in the "set static mesh" node. The mesh will appear when I need it but it wont disappear when I need it to, any ideas why this isnt working?
This is in the actor that you need to interact with to pick up the mesh im talking about
any ideas? Ive tried a destroy component but that doesnt remove the static mesh either, any ideas?
do i just click on the component then go through function list?
i have a blueprint for a gun turret anyone know how i could make it just spawn where my character is looking by pressing a button?
have you make sure the node is run? print string / breakpoint
yep
everything is running
the static mesh just isnt going away
screen shoot of the print string/breakpoint?
2 secs
it prints everytime @frosty heron
go run it in pie, eject from controller, select the actor, select the battery slot mesh. then screen shoot that (along with the print string)
Sorry I got no idea what those first 2 instructions mean lol
the button should be next to the play button during Play In Editor, i have no editor right now but you can find it
ok yeah how do I eject from controller?
just told u
ohhh right ok I misunderstood
@frosty heron
Blueprint Runtime Error: "Attempted to access Battery_Slot via property Battery_Slot, but Battery_Slot is not valid (pending kill or garbage)". Node: Set Static Mesh Graph: EventGraph Function: Execute Ubergraph BP FPS Character Blueprint: BP_FPS_character
got this error for the first time
figured it out nvm
thanks lol it was the simplest shit
What's the best way within Modeling Mode to cut a doorway out of a pre existing static mesh?
it is not lit at all and you can see these objects from a distance
how can I fix it
?
I recently started studying Unreal and I can’t figure it out, please help me.
I created a blueprint> actor and created a scheme in the constrution script. I want to get 10 instances of an object and randomly assign a static mesh from the array to each of the instances. But in my scheme, a random mesh is assigned simultaneously to all 10 instances.
You'll need an array that contains references to each mesh you want to spawn and then spawn based on next in array using some logic
Change set Static Mesh into Completed, not after each loop
No, this doesn’t change anything, I’ll try to make the loop myself, without using the loop body node. But I really don't understand why it doesn't work
You want to first create 10 instances and assign one of them to each unit? And they all need to be different? Right now you are creating 10 for each unit you are spawning, so every units has it's own 10 instances and then it gets random one from the array, and the static mesh is randomized 10 times because it's in the loop body.
That's also good point lol 😄 now you are creating 10 instances and then only 1-3 can win the random
Also you are not adding this to any array actually, you need to create array and add these instances so you can then use them
within the loop body spawn what you wanna spawn and plug it right back into the execute pin, ++ the index of the array each time you spawn an instance
promote the array index to a variable so you can manipulate and reference it in the spawn logic
Yes that's what I did. And I understood something in my scheme - the static mesh is set randomly after each step of the cycle, but the mesh is applied to the HierarchicalInstancedStaticMesh component on the basis of which instances are created. So it is logical that all instances have the same mesh. I need to install the mesh directly for the instances, you just need to figure out how to do it.
but your not pulling from an index you're code is saying get number 0 -9 and input that into a loop and do nothing with the returned index
https://umbra.ai/simple-way-to-spawn-multiple-different-instanced-static-meshes-from-one-blueprint/#
Take a look at this article
OK, thank you. I'll take a look at it
'EnhancedActionKeyMapping' is a structure so you would need to break it out to get the key stored inside. Just how it's setup. I assume they haven't created a function to get it for you.
You can hide the unused pins on the break node though.
shouldn't public variables always have a getter?
its also BlueprintReadWrite
What class is that in regards to?
FEnhancedActionKeyMapping
Defines a mapping between a key activation and the resulting enhanced action An key could be a button press, joystick axis movement, etc.
That's a structure so you have to break to get its values.
yes
oh
is that just for all structs when you use blueprint
As far as im aware yes, unless they've created a getter function to provide just that value.
Is it a good idea to use the character class for kart racer physics?
build
Anyone know of a node or a way todo what this imaginary macro would? Basically start a timer/delay that outputs an exec at certain times but if you reset and stop it before those times are reached, no execution happens.
For context: Im trying to implement a charged jump if the player holds space for longer than .3 seconds and since I dont want to check every frame I use the 'started' node and then want to wait .3 seconds and check if the player is still holding space (Jump mode has changed to Charged Jump). But if the player jumps before the .3 seconds are over I want to cancel the timer.
Why not put it on the action?
AFAIK there's no node like that, but it would be very easy to fill in that macro.
Cause it would require an action for every jump mode and I think that might get messy when holding a charged jump also triggers a short jump
I'd be happy to use a macro for that but not sure how to make it
would you just use a boolean that flips when reset is executed to prevent the output?
though in that case the internal timer of the macro still runs even if its already reset and it wont be ready for the next input
hmm I'm handeling quite a few jump modes with one input, is so the problem is that after the first threshhold you wouldnt be able to distinguish between the Jump modes
Why such complexity? The rest can be handled on the non charged side with some branches. Double jump is already handled for you in the CMC, bounce jump just needs a time since player landed last.
At least I'm assuming bounce jump is jumping shortly after hitting the floor?
Can I get velocity of a component without physics ?
Not really, If jump is held for one second the character does a little jump forward followed by a charged jump with maximum charge without the player having to do any inputs in the mean time
but could probably make this work, thanks
I tried it it's always 0
Could you show the component list?
Ok so after some googling the node will return the relative velocity to its parent so you will need to add it to each parents velocity until you either get to something with known relative velocity compared to the actor or a component that simulates physics
So I have to enable simulate physics to make it work, right ?
No cause you can get the actor velocity and the velocity that the component has relative to the actor if its a child of an actor so you can use both to get the component velocity
if your component velocity outputs 0 that means its relative velocity to its parent is 0 and if thats the actor then it has the same velocity as the actor
@odd kiln So if its not rigidly attached to the actor this will give you the components full velocity and if it is rigidly attached to the actor then it will have the same velocity as the actor
do keep in mind if you then enable physics for the component later on this will break because then 'Get Component Velocity' will switch to actually getting the physics simulated velocity so you dont need to add it to its parent
Ok thank you very much I'll try that !
Hoii
I need a lil help
I just wanted to know why RPC is not RPCing on a actor I placed on the world
i ah, still don't get it
uiWidget already has useful stuff like this built in! List View, overlay, vertical box. After that it's a few more steps and you're there! Best of luck!
You need to check out Ownership. TLDR you cannot send messages through an actor that the client does not Own. By default this is their PlayerController, PlayerState, and Possessed Pawn.
the pole part is separate from the rest. so if they overlap one another i want 1 of them to be destroyed. problem is i cant seem to figure out how to keep 1 of them.
any recommended alternative to widget component,? I want to create a widget over the actor
That fixed it. thank you
Nice unconnected branch you’ve got there 🙂
yeah noticed that after posting haha. i did reconnect but still no luck ofc
Your current code basically says for each actor overlapped, assume it’s got a pole and destroy the pole
yeah
i just need it to destroy the pole of the next placed actor that overlaps with the other pole
And you know for sure any overlapping actors will have a pole, always?
Also your current code runs on begin play, so if nothing is currently overlapping it won’t ever run again. I’m guessing that’s intended?
Are you building a fence at runtime ?
yeah im building them at runtime
when i place them down i want them to be removed if needed
so thats why i opted for on begin play
Alright so when you place fence#2 down you want to remove the pole from fence#1 that’s already placed so they fit together?
Or the pole from fence 2?
pole from fence 2 probably.
because the 1st fence you place down needs to have a pole
Ok. Then disconnect the 2 pins from destroy component. On for each loop cast to BP_Fence or w/e it’s called, with the array element plugged into the cast object. Then drag from the cast return value and grab the pole mesh. The target will be your cast return value. The object will be the pole component mesh you just dragged from it
This whole setup is not ideal but that should do the trick for you
Actually
Since fence 2 is the one you’re placing, you can just disconnect the target and connect your current bp’s mesh to the object @ruby tendon
I would leave the cast tho so you don’t risk overlapping random stuff that removes your pole
like this?
no
let's go with the last solution I gave you since you want the current fence's (fence #2) pole to disappear
for starters, delete that Destroy Component node, it's got an extra pin for no reason
right click your graph, destroy component, pick the one that has the pole mesh as target
don't connect anything from the cast other than the white line (execution path)
in summary, the code will check if the overlapped actors are of type BP_Fence, and then destroy the current fence's pole
However, bear in mind that if you overlap more than one fence at the same time, it'll try to destroy that pole again, and you'll probably get an error.
Good day
I am trying to spawn a projectile that inherits the angle from the objects rotation
basically if the sword is vertical then the projectile should be like the one on the left and if horizontal the one on the right (or any angle in between)
This is the setup I have
Problem is that i cannot get it to rotate vertically at all
it only considers horizontal rotation and nothing else
even hard coding these values, does nothing
(vertically)
If I rotate the mesh manually on the X axis by 90 in the Projectile blueprint it works fine
but I am struggling to get it rotating from my weapon blueprint
did you print the value of the socket rotation to make sure it does what you think it does?
(because my weapon rotation is 0)
rotated on the x axis by 75
btw if you expand the print string and put a space in the key, you get to see it on one line only
why is it saying P, Y, R, this in a different language?
so it all works. but the problem is is the overlap doesnt register when i spawn in the actor
try using get overlapping actors instead
If I drag the model into the world its just X 90 same applies to ProjectileBP
But I cant seem to get it to spawn with model (or hand angle this is VR) no matter what I do
well the stuff you printed shows Roll changing, which I'm guessing is... Z?
The rest of the BP if you're interested
I've tried manually setting all three of those values just to see and none work
you probably shouldn't connect nodes like that
you also have a delay on tick which is like...just don't
a branch where both outputs connect to the same node is pointless
I did that so I can test it without VR
Normally it only activates if I am holding the object
well idk much about #virtual-reality but maybe you grabbing it is preventing it from rotating?
I imagine it's got some sort of attach, where the xform gets locked
the bp isnt really vr dependant here i just called it without any of the vr functions connected
yes it spawns every tick lmao
ok, so you're spawning it with Y 90 , does it spawn with Y 90?
ok, so it works fine?
and 90X does nothing as far as I can tell
ok so rotating on X doesn't do anything?
No because its up like this
is it at all possible you're changing the X value from somewhere else?
cant imagine that I am, if I manually set X to 90 in the projectile BP i get the intended result
It seems like Y and Z work
but not X
hmm try to adjust collision handling to alway spawn ignore collisions. if that doesn't do it, try using set rotation on the object on its begin play.
I've disabled collision on both the bp and the sphere and no dice
Problem with the later is how am I going to get the rotation info from my object into the projectile bp?
tell me if this is the right track
okay this string does not print so probably the wrong track
It works if I set it here in my projectile bp
holy f lol
why is your tick connected to the bind
check if it works happens every tick so i cant miss it i dunno if theres a better way to go about quickly checking if a change works lmao
you get the rotation and you print that on tick
try not to cross your execution paths, or connect things unnecessarily, such as a bind which should happen only once
ok, so now that you know that works, delete that
then back at your spawn actor, drag from the return value of the node, and set relative rotation (bear in mind relative means in relation to attach parent, so world may be better depending on the use case)
this way your actor should first spawn and then rotate
but it'll happen in one tick so it shouldn't be visible to the naked eye
By spawn actor you're referring to the bp that creates the projectile to begin with?
something like that?
you can also rotate the entire actor
just drag and set actor world rotation
unless you need to rotate a specific component only
move this to begin play rather than tick maybe so you don't spawn 120x of them per second
i wish i could say this fixed it
I think I did end up trying similar earlier
looks like it refuses to work unless called in the projectile bp
wait hang on
in your projectile bp you rotated the mesh
in this bp, you were trying to rotate the root component initially
with relative rotation
which is pointless cause no attach
and actor rotation did not work
so drag from return value of spawn actor, get the StaticMesh
then, set relative rotation on it
its WORKING
in glorious 1fps lmao
those are all emissives with a point light attached too so event tick really destroys my pc lol
get it off tick and never use a delay on tick
is there a reason why this is bad?
(the delay on tick)
I am currently using it as an "ability cooldown"
yes
Event Tick ticks away every frame
if your framerate is 120fps, it means it fires 120 times per second
Delay doesn't stop that from happening
the Delay Node is the rookie's node of choice because everyone initially assumes it stops the execution in its tracks. It does not.
in my case this section is checking every tick
A) Whether I am holding the sword
B) How fast I am swinging my VR controller
The delay at the end is to prevent the ability from being fired each tick my hand is above that velocity
What would be the correct way to do it?
Or good practice
well, you could use a timer by event for example
Alternatively, since your cooldown is dependent strictly on the velocity of the hand, you can just set that bool on and off as needed, no need for a delay.
Hello, I have a question about character rotation. 👋
In the character, when I run a timeline to update SetControlRotation, the roll is smoothly updated. However, when I run an identical operation on the pitch, I can't seem to get the character to rotate past -90°/90°. No matter what I try, I can't get the character to "somersault".
Is there a special limitation to controller pitch? Any advice would be appreciated. 🙂
Cheers.
I've tried most every combination of these settings as I could think of. 🤔
Use Controller Desired Rotation is unticked. Did you try that one?
Yeah, I've toggled it on and off. It seems that Unreal needs either that or the associated UControllerPitch/Roll boolean to be on to effect the rotation but either way, pitch seems unable to "flip".
Speaking of, I have a bug there where swinging backwards can trigger the same effect as swinging forward since its based of velocity
i was thinking of adding in a foward / negative distance to the check as well but not too sure where to go on that track
VR is quite the challenge for a new user due to the sheer lack of resources lmao
do you need to use control rotation rather than normal one?
you might need to with pawns/chars , can't rmbr
for math questions, I'd try #game-math
I'm specifically using control rotation for the ease of replication.
Thanks, I'll post that on there
I'm not sure, but it's possible you're trying to force the character to fight the CMC's specifications
perhaps you should just animate this sommersault rather than trying to rotate the whole thing
That's what I'll have to do if I can't use control rotation. I'm just confused because it works fine with roll but not with pitch. 🤔
could try setting movement to flying see if that does it 🤷
I only use Flying for my game. 😆
ah
Thanks for your time and input in any case. 🙂
Solved it. I needed to edit the camera manager settings to change the PitchMin/Max values. 👌
Why the "camera" settings determine the rotation of my character, I don't know. But I'm glad it works. 🤷♂️
Lets say I want to create a levels menu*. I want to use structure and data table to store reference to the level (which is /levels/) and add reference of existing levels to data table. But I cant seem to find the right object in structure ??? Maybe im doing it wrong / chose wrong one. I have level instance now in structure
Basically tryna add level as a object ref.
is there a standard way to have a GE that modifies an attribute where the magnitude of the modifier decays over time?
If I remember correctly, the level type var doesn't actually show up in the list so you wouldn't be able to use it in a structure. (You could probably do it in C++ though)
I mean using these in data tables
so its stored there and i can use data table to referenfce to it (and load the level depending on button etc)
Yea there not exposed to show in the list.
any work arround? ref by name then or? path?
You can just use a string but if you rename a level or move it you'll have to manually update the path.
I am running into an issue where I try to call some pure functions inside the On Paint function and it is saying that the function can modify state and cannot be called on 'self' because it is a read-only target in this context
Even when the pure function was empty it was throwing this error at me.
You can 'promote to variable' when pulling from the input on an open level by object node but that of course doesn't work with structures. You might be able to fudge it with a data asset though.
Why am I unable to delete the camera boom / move it anywhere / rename it? This is from the third person character new project + starter pack
what's the parent class?
can someone help me here.
Im trying to get an actor to look at the player constanly, but its not working. What am i doing wrong?
it doesnt even do it once.. ive placed the actor with the back on the player, to test it, and it doenst turn around
watch or print the value of Z on tick.
but also, interp speed is 0?
it prints 0.0, and yes, i want it to turn rightr away, and not with a delay
then your math is wrong
my math ?
the parent class is "[project name] Character"
all the calculation going on
where do i calculate? im just taking the location and routations and put them in
everything is defaults like its just a brand new project with the third person template + starter content enabled
maybe interp speed shouldnt be 0
thats ive tried with 0.1, 1, and 10, no diffrence
Print the find look at rotation value and make sure that’s not 0
You cannot delete components that are inherited
Ohhh my fucking god... found the problem, after 2 hours... the fucking mesh, needed to be turned -90 on X... i had i set up wong when making the damn actor lol
When I use the Launch Character node with ZOverride I would expect the same Z displacement if its triggered from on ground or while Falling but if its triggered while falling the displacement is much less. Shouldnt the ZOverride ensure the same starting conditions here?
Welcome to gamedev hehe
yeah i know haha 😅 2 hours bro .. jesus
At least you didn’t break other things while fixing it, my issue tracker sometimes expands for that reason
true that! could have been doing that lol
gotta delete the thing in that class
basically you can't get rid of anything you inherit from a parent class
i mean im just using whatever starter content was ther
not sure how to "delete" the parent class
maybe i can set it to smth else?
i see actor as an option
I'm wanting to create a spline that once both ends connect, it will form a region. Region would have 7 modules within it that I could assign properties (buildings). What's a good way to make something like this so I can just use it to cover a map I've made?
Hello there, having a slight issue with anim notifies. I wanna make a notify parent class that adds / removes specific Gameplay tags from the character performing them.
Issue is, the nodes for adding / removing tags are not present within the notify...
whats the difference between the dark orange traceline and the light yellow on in the blueprint debugging
...and watching maps also produces no debug data. What is the workflow here?
you can go in the parent class and delete the spring arm
your inheritance heirarchy looks like this
Actor -> Pawn -> Character -> BP_ThirdPerson (from template) -> YourBPClass
just edit BP_ThirdPerson
I have the oddest problem. I'm on UE5.0 if that matters. Trying to cast to an animationBP, the cast to node flat out doesn't exist. All other classes I can cast to fine, including other anim blueprint classes, all blueprints are compiled, just this one animBP does not exist as a cast to node...
hey im trying to rework my fps camera to mimic how it would look if the fps cam was in the hand of the character mesh, how would i do that with animations and like just the camera if that makes sense, rn the character mesh is kinda just there, not rly realistic when u look down and the camera thats ment to be in the hands u can see both hands in the running animation
Hey all, I'm trying to get exact world location data based on whatever I click on in my 3d world.
Since eventually everything is rendered to 2d, I need a way to find the world location of a pixel I click on regardless or whatever is being clicked on in the world.
The reason for this is because I can't detect hit by line trace from a nigara particle and it's important that I can do this. So another method is to get the world location and spawn something there instead.
Anyone know how to get this data in my pawns blueprint please?
Show some picture. It's strange that you ever need to cast yo anim bp imo
Nothing should talk to the anim bp, the communication should just go one way. That being anim bp reading from its owner
I may be using notifies and dispatchers to go both ways 😅
Imo they should be routed to the pawn. Then Abp just read from the owner
This is getting a little unworkable. No matter what I transform a key into, I can't watch it. How do you guys get around this?
print string your values
This is not really a solution. I don't know where the bug is and it's not reasonable to create a custom function to plug in and out everywhere just to view data.
It's extra worse becaue I need to watch a key. I would need to loop through the keys and print each one.
The entire purpose of watching something is to obviate the tedious process of putting print functions everywhere.
custom function?
watch is buggy as hell
just print string the value that is expected
So when's the patch?
probably never gonna come like blueprint struct issues
i never use (watch) personally my self, but was told by reptuable people that it is buggy
If you needed to see the value of a key in real time, how would you do it?
print string
also
that pure node is never run
since u didn't connect it to anything?
connect that return value to a print string
then maybe it will work
I don't know what this means. I just need to see Mechpart key as I step through the blueprint.
these are pure nodes
connect that to a print string and maybe you will see the values
That was a desparate attempt to turn it into something watchable.
not at all, if you don't know what pure nodes are, you can read them up first.
This requiers diverting the execute path, which is an insane time sink when you don't know where the bug is.
and also, all of this can just be a print string and u will see it
well again, you need to actually connect a node for pure node to run
and watch is buggy regardless
I would just print string and call it a day
This is a tangent. The concern is that I can watch an entire map, but not a single key.
look here
it's not connected to a node (the arrow)
you will not get anything from it
so you can connect that to a print string just to debug
or I don't know
contemplate it more
but that's what I can suggest
What if I turn the key enum into a string, watch it as a string, then turn it back into a key enum? The issue there is that key enum to string appears to be irreversible.
The issue here is you are using pure function that doesn't connect to any node.
It will not be executed, hence no debug data
I need to return it to a key enum after.
Why are you converting it to string?
Well then if u finally want to take my suggestion, drop a print string node
Then hook that string to the node you dropped
Hypothetical situation: I need to convert a string into a key enum. There are no other requirements. How would I do so?
Hey,, so I'm looking to use notifies to make a montage that interacts with player input... Issue is, I'm not sure how to properly do that.
Currently logic is this:
Montage plays over a duration of 24 frames
It starts to play when the player presses A.
If the player holds A, they perform action A for as long as they hold it.
If the player lets go of A before the montage finishes, then montage plays as normal, and on montage end player returns to default state unless another input is performed. Further A inputs until montage end are ignored.
After frame 4 and onward, if the player presses input B, then they perform action B, cancelling current montage. (It will be performed in frame 4 if the player pressed B before frame 4)
My current struggle is to make these notifies interact directly with the player's inputs. I don't want to do a mess of booleans to achieve this... Unless it's somehow the only way for it to occur.
Is this something better done outside notifies and montages maybe?
hey guys i have an enemy ai and i put the default thirdsperon animation blueprint, and set the animation correctly and it doesnt work. does something have to be configured on the event graph?
i have an issue
i got a box trace to identify hits but its not identifying clients
anyone able to help with how to get ExportRenderTarget to be png not HDR ?
I have set location, filename etc. easy, exports fine but the engine says that png or hdr is dependant on the render target itself, and i seen not options for this apart from the RenderTargetFormat , which i've tried RBGA8
old day naruto 2D game lol
Not really something to do with blueprint. You can try #ue5-general , might have better luck there
ok, im doing it all from within a blueprint, but i guess the setup isn't
If it’s working on server but not client you might have a replication issue/bad setup. #multiplayer works very differently
What doesn’t work? Is the cast failing ?
basically the animations arent playing, like run/walk when he is chasing me
Could be many things. Maybe you need to retarget the animation if you’re using a different SKM. Could be you didn’t set the right anim bp in the character details
i set the right anim blue print, and same sk_mannequin
if i set it this way it works
but i want to use the default rig if possible
i also get Blueprint Runtime Error: "Accessed None trying to read property Character". Node: Set MovementComponent Graph: EventGraph Function: Execute Ubergraph ABP Cultist Animation Blueprint: ABP_Cultist_Animation
Compare enum.ToString and the incoming string to select the enum
don't do that though
what are you actually trying to do?
show that part of your code
i actually got that part solved
didnt have my node connected properly
would i set get player pawn or get player character in my cast to bp_cultist?
Hello, I'm having some trouble with this animation with some joints that should not have segment scale compensation. Basically, the eye's scale in the z direction should be 50%. I have three skeletalMeshes on one actor: body, eye_default, and eye_emotions. However, I tried applying an animation blueprint to this actor but the eye_default doe not appear to be scaling (and maybe not animating?) correctly. I set the body as the leader bone component. Does anyone know how to troubleshoot this? The Maya viewport on the bottom right is how it's supposed to look
use get Pawn owner in your anim bp
go as generic as possible
Having a Niagara component on an actor but having it as "invisible" dose that still cost preformance or one when turning it to "visible" ?
like this if i have an effect that i will turn on an off will it only cost preformance while "on" ?
Minor. Every scene component costs on movement updates when it's attach parent moves. You won't pay the GPU rendering cost though.
ok so is it a bad way to store "buff effects" by preplacing ?
or is it "common to to it like this" ?
IMO I think it's bad. But I'm already used to GAS's ideology. EG when a buff is applied as a GameplayEffect, it has an associated Cue that is created. That Cue spawns a particle when it begins, and destroys that particle when it ends. The Cue's lifetime is tied to whether the buff GameplayEffect is applied to the target.
Preplacing them means that you could end up creating things that are never used, if they're never buffed.
Yo folks, i have a question, how to implement subtitles using bink video, already created srt file and placed it in Movies folder
Hello. Is there really no way to get an event or know when a spring arm is colliding? That seems super weird to me. Why would they not implement that?
I use a slightly off center camera and would like to push the camera to the center when the spring arm is colliding to prevent the camera clipping through walls
But there doesn't seem to be any way to find out when or if a spring arm is colliding 😦
That's so weird :<
Here's a screenshot. 2 AnimBPs, one with IK one without, yet only one shows up when I try to cast. Regardless of how clean it is to do so, the actual casting itself should just work...
SpringArm on a springarm. 😄
Really though. Once you get into complex camera work you stop using spring arms and such. There is a lot of nice stuff you can do with the camera manager and some vector math.
Wait, nvm, there IS something that gives the required info. Wow, that naming though XD
Why not just call this "Is Colliding"??? lol
How do i make it so when im testing my game, when I get an error it will pause the game and show the message log
Not sure you can do that reliably in BP. Breakpoints on a print node maybe. But you'd have to reenable them every editor start. In C++ you just wrap a check in an ensureAlwaysMsgf() with a log.
Might be plugins that expose ensures to BP with a printerror like node. But you'd still need to be working in C++ to see the ensure.
I'm using Visibility for a line trace. I have an static mesh actor which overlaps visibility. Beside that within that actor I want to have another static mesh that I want to detect. How can I do that without using mutlple line traces
oh damn i was hoping it was just a setting like in unity
Overlap shouldn't be traceable. Would need to be set to Block.
That said, you cannot. And depending on what this is for you might want to consider changing the trace channel to a custom one. EG I have a special channel for interaction to allow users to select things. Much easier than managing a bunch of conditions or trace hacks.
If I use different trace channels, then I'd need different line traces as well
I want to spawn a bunch of static meshes then enable physics but it says it can't cause it's static?
im abit confused do I need to spawn another type of class?
I think you want to set physics on the actual actor, not cast to the mesh component of the actor
SetMobility
awesome thank you!
Does anyone know if this event will manage to fire if I'm binding it OnDestroy to the Owner of this component? I need to call from this component when owning actor gets destroyed. Then this component Call Start Respawn Count, and to this event I'm binding in the ''Spawner'' where this unit was spawned so it starts countdown, and will Destroy ''camp'' and respawn it again after some time.
I wonder if I'm destroying Actor, and then doing logic in the Component if it will be fast enough to bind and fire basically.
Btw I already see infinite loop, but just wonder if the binding will go trough.
Hi there, i am trying to spawn an actor and attach it to a socket, but it just spawns and does not get attached. Any idea what could go wrong?
I think you're going to have issues with it trying to fire off while the Actor is pending kill. You might be better off using a Blueprint Interface to pass the information to your listener before destroying the Actor.
Try changing the rules to "Snap To Target"
I have one Data table for the characters: DT_Characters.
There I have characters with their name, stats, and their clothes.
So for the clothes I have another DT. DT_Clothes.
In DT_Clothes, I have the clothes color, mesh, and other stuff.
How do i connect the clothes in the DT_Character?
I think you would just set the Data Table type in DT_Characters to the structure type of DT.DT_Clothes
I will try, thanks
Then you probably have to update DT_Characters with the information you have in DT.DT_Clothes on the game's load
yeah so i did that, it is basically a variable
but its not pointing to anything specific of the DT_Clothes
its just a undeclared variable type of S_Clothes
Inside DT_Characters
In your GameInstance, try creating a structure variable of type DT_Clothes. Then on Event Init, set the structure in DT_Characters to use the value of DT_Clothes
Hi, do I have to enable physics for each static mesh so that it would drop to the ground when simulate?
I tried just enable physics for one static mesh and this happened, how do I make it hold on together as one but still have physics
you are just applying physich on one static mesh then
phsyich is per component afaik
Hey! Is it possible to make a montage change parameters of a bounding box while setting it up?
for characters, you do want them as one mesh with proper physich assets. I have no idea with a boat or static meshes
Of course, while also previewing the results
So for example in DT_Clothes I have top, skirt, pants
How do i set up in DT_Characters, a reference to DT_Clothes skirt
Thats the issue. And each character will have 6 clothes
So i need in DT_Characters to have a reference to clothes defined in DT_Clothes
thanks for the suggestion, my sockets were just fucked up though 😄
Honestly I think you want to look into Data Assets, they are more intuitive when working with things like that.
Why not just make S_Clothes and add it to the DT_Character?
Thats what i did, but its undefined.
I will have specific clothes in the game
and they have specific properties.
So. I have like, special shoes, skirt, pants, top.
And each one of these have specific color, and attributes to it
They can be used by different characters.
So i have a Data table where i have all these clothes defined, and their propeties
So if i buy a top, it costs me this, and gives these bonuses
so the base of the Clothes is actually kinda full wear like
Clothes = Hat, Pants, Shoes
And then also each part (hat, pant, shoes) has their own properties?
Okay lets say you have an inventory and weapons
you dont just create a struct in your character, right?
you create a data table for these weapons
You can show some screenshots it helps to imagine it
and then create each weapon
Yeah
then on the caracter dt
you have reference to the weapons each character has at start
thats what im trying to figure out
because i cant reference the data table of the weapons
in my character data table
Yeah, I think you can't do it
but good news is that you could use Data Assets for that
Looks like you could get the row of the Clothes at run time
but that's just making it complicated
with Data Assets you can do exactly what you want
and they are easy
But that would require creating a data asset file just for this right?
hmm, you could either exchange everything into data assets, or just clothes
the wise people mostly not use data table all together and just use data assets
i was now looking at my data table, and i can also put an array of names, and each name is the name of the clothes/items thats in the other data table?
or thats not how its done
I would recommend just going with Data Assets, they blowed my mind how they can be used and I literally do everything with Data Assets now
I mean I think yu could do it that way but that just overcomplicating
I can show you on my simple example
I have Buildings and Units both done with Data Assets
and now when I wanted to tell building that this building can produce these Units
inside Building I just added Array of Units Data Assets that can be produced
and I can add as many Data Assets here as I want
yeah thats it
yeah
and it's so intuitive
though in this project i cant do it cause its all full of data tables already
im not the only one working in it
then you would need to:
- Put variable inside DT_Character with name of set of clothes like: Clothes1, Clothes2
In the Clothes your rows would need to be called Clothes1, Clothes2 etc..
And then at run after getting DT_Character, you would also call DT_Clothes, and from DT_Character, assign that to the row level name to Clothes so it would load properly, but it's kinda work around.
Do you have these in hundreds? or more like 10-20?
thats what i will do.
like 50
Damn, that's a lot to convert manually into Data Assets xd if it was my own project I would do it for sure but this way it's faster
Instead of names I could only recommend maybe ENUM ? so you don't have to worry about typo
like create enum with Clothes1 - Clothes50 and then you only choose that inside DT_Character
? enum?
Enumeration
isnt it supposed to be a name ? for row name?
yeah but you can convert enum to name
and you only do it in one place, and then you can just easy choose instead of typing for each Character Clothes42
like you will have nice list to assign to each character
sorry i dont understand
how am i going to get an item from data table row
if its an enum?
you can convert enum to name right? orno? xD
out of interest is there a good way to strip from the object name the numbers ?
so you convert 1 to "1"?
you shouldn't refer to other DT
but the data table is "blue skirt"
at the moment I have this for example
it makes no sense for one DT to read other DT
the component name etc is bit long and I don't need all of it
but would it be fine if in my character dt. i have an array of names
and these names are the items/clothes that are defined in another dt_items
is this okay?
its because the items are specific
i cant just define them in the dt_character
I don't see how array of names are useful here
can you show me what you do with the enum to get the actual resource
on the first screen you have Enum to String
Enum is useful to represent states or types at best imo
make sure that data table is using soft references where appplicable. If you have the clothes meshes stored, they can't be a hard ref.
you don't want an enum as big as 100s
i know this, though its advanced
yes so how do you use an enum as string to get an item from a dt?
is you dt names as numbers?
hmm i think ill be fine using names
numbers is quite confusing
i have Skirt, Pants
names works too?
yea
tbh, ask the guy that owns it if he can let you change it all to data assets, it will take time but will make this project much better
because from what I see you will need to assign multiple things from DT_Clothes?
so you will need to have like 4 different variables to specify inside DT_Character so then they get assigned to the row?
like 1 character = 4 rows from DT_Clothes? and not just 1 row?
I think i can just do this:
DT_Characters, have an array of names. And there i write, the items i want it to start with.
Like Pants, T-shirt, glasses, etc...
Then when I want to get the properties of the item, i just get them from the DT_Items
Is there an equivalent to On Initialized event that runs while in the editor?
If you mean for Widgets, then no. Usually PreConstruct is used.
When I use the Launch Character node with ZOverride I would expect the same Z displacement if its triggered from on ground or while Falling but if its triggered while falling the displacement is much less. Shouldnt the ZOverride ensure the same starting conditions here?