#blueprint
402296 messages · Page 466 of 403
GameCore is making a FPS game, and for whatever reason, needs all players, when looking down the scope of their rifle, to see what Player 1 sees
No they need to see what they all should see
Like looking down your own sniper scope
But rn they all see giraffe 1
And i want them to see their own girraffe
🤔 I thought that's what we had clarified, @trim matrix
okay, so ... lemme get this straight cuz now I'm really confused
@trim matrix Just to be clear. Right now they all see the same thing, and you want them to see different things.
Yes
you're using a render target?
You need different ones for each player in PIE
Player 1 is pointing his rifle at an Elephant. Player 2 is pointing his rifle at a Giraffe. What does player 2 see when he looks through his scope?
Or you need to uncheck single process, maybe
@tight venture Right now an Elephant, but he wants it to see the Giraffe.
k i'm gonna leave this conversation cuz I have no idea what's going on
it just so happens the render target is drawn over with one players view
both players see it
Try what I suggested
Uncheck sigle process
@maiden wadi which parent class do I want to choose when creating my macro library?
Okay I wasn't sure if that'd help but it was the quicker one
I don't even understand why I have to choose something here
Cause i cant make 2 render targets since alot of players will eventually use the scopes
@tight venture restricts use if the macro to children of the selected class
BP_Base cannot use it, if you pick that class... but BP_Child can
@tight venture Probably Actor. Maybe Object. Just depends where you need to use it.
ah okay, thanks. I chose Object lol.
If you picked Actor, Object BPs could not use it
Im calling it inside the firstperson character
@trim matrix If you want to test in PIE you will do two render targets or more.
It's just a Utils library. Like Utils::RandomElementFromArray()
You can turn that off in actual builds
Shouldn't that be something that's done on the client though? So there's always only one render target?
Yesh thats what im trying
But it copies the image of player 1
To player 2 his scope
You have the same issue if you do split screen in shipping
You can. It just requires editor hacka
hacks*
Ohw
You plop in two characters in the level with autopossess
point one to a different RT
that simple
Or there's even better ways that'll scale to split screen if you do that... but I'm reluctant to tell you
I don't even understand why I have to choose something here
@tight venture Because there are some BPs that can only be used if you ensure that the object you use the macro on has it
I sometimes do it just for strong architecture
It's set up in an awkward way. Should be more akin to AllowedClasses metadata on Class variables in c++
So, I am encountering problems doing a "is this array empty" check in my macro. Basically I have to do that check outside the macro, right?
no?
Why would you need to do it outside the macro?
Cuz if it is, I'll need to return either null or a zero-initialized object of type whatever-type-the-array-is.
Don't do that, nested macros are very sketchy
So, i'll need a local wildcard variable of that type that I can set, and then return that
Hello guys any body know how to hide bone of weapon MAGAZINE
Yeah
Is a getter, not a setter
yup
This? I didn't even know there was such thing as an Assign node
okay, cool. Thanks
wait is that any type of variable?
And definitely assign on both branches
Yeah, it has to be.
namespace Util {
RetType RandomArrayElement<typename RetType>(std::Array<RetType> array) { ... returns a RetType ... }
}
RetType is unknown at compile time
std::vector would like a word...
that's cool, can you do that in cpp? This would be super useful for applying blueprint settings via cpp without hardcoding a location for the blueprint you want to access
@frozen sky Those wildcard types only exist in macros, afaik. I just discovered it myself
@frozen sky Yeah kinda
Yeah, it's called templates
Go look at KismetArrayLibrary
No it's not templated at all
There are templates but nothing about them is directly supported in BP
i've worked with quite a few ue4 engineers and they never mentioned this
They're not actually wildcards, the compiler expands them to their proper type at compile time. So if you use that function as both RandomArrayElement<int>() and RandomArrayElement<float>(), the compiler makes two versions of the function for you
@sand shore I bet UE implements them with templates behind the scenes, though. Wait, how would you be able to do this without templates?
i.e. how is this not the same thing at all
I always love it when people get him talking. I always learn something new.
Yeah.
do you have reference on getting the most distant location on a spline from a given location?
void* and descriptor objects
oh god. That's straight up C talk there
a record layout, for the older crowd
Yup well
that's BP
Go see for yourself in the container libraries
I'll take your word for it 🙂
You can even see how to walk the bytecode
If one is so inclined, you can even emit custom terms from your K2Node
BUT... in C++ land, we use templates, not void pointers @frozen sky
cuz void pointers are scaweyy
Why do they have us write in C++ then
I wonder
Not saying you're wrong, just saying
What are you actually asking there
Nothing. Don't mind me
Fair
You don't need to understand the belly of the beast
But I gotta let the truth out
Hello guys any body know how to hide & show bone of weapon MAGAZINE
or, more accurately, #engine-source
@tight venture Nope, not IMO
It can be valid insight into how you optimize in rare cases, but also if you're trying to cross learn
The reason I don't just drop source code is out of respect to the channel though
@sand shore just curious, since you seem to be quite knowledgeable... In BPs, is there any library for data structures besides just arrays and sets and maps? Like, if I want to use a priority queue or something?
Those are middling in their support anyway. No, and adding your own is definitely a #cpp topic
I love blueprints, and I love designing with them. I probably honestly wouldn't have gotten too interested in actual game design without it. They simplify a lot of concepts that make design seem very daunting. So much so that I took a very little bit of LUA experience and started rewriting my inventory system in C++. I honestly wouldn't have been able to follow and understand that conversion without understanding the engine through blueprints first.
yeah Im working out how the engine works first via blueprints then will try and get the rust off my C++
@stoic silo I haven't used it yet, but this might help you. https://docs.unrealengine.com/en-US/BlueprintAPI/Components/SkinnedMesh/HideBonebyName/index.html
Hide Bone by Name
hi everyone
have any of you gotten the most distant point on a spline given a location? They have a function for getting closest but I want the opposite
@frozen sky I've never worked with splines before, but you may just have to iterate through it
@frozen sky If you can get all of the points, you could just do a simple distance check loop.
well i guess it's not points, it's just location along spline
Hi. How do I return ownership back to the server?
@frozen sky Is this a SplineComponent?
Yes
#multiplayer tldr- assign back to the controllers chain at some level
@sand shore I ask, specifically, for this: I have a Set of Foo objects, and each Foo has a boolean member variable, and in one of my blueprint functions, first thing I do is make an Array of Foo objects which have that boolean set to true. Doing this necessitates iterating through the Set. Is there a more elegant way of doing this? (The function in question isn't called often enough to make this a performance issue... it's more just an academic curiosity)
If I were doing it in code, I'd probably use std::copy_if or something of the like.
If I were doing it in code, I'd probably use std::copy_if or something of the like.
@tight venture Do it in code and expose a blueprint
Hi everyone, I need some help please
In unreal engine I have 2 screens in the same scene, how to play in each screen a different video at the same time when I press play?
I've already loaded the texture (video) in the 2 screens and made a blueprint for the video but could not make it play at the same time
@frozen sky Not optimized, could lessen the calls a bit more, but you're trying to do this.
Does this look right for RandomElementFromArray()?
i just about have a solution written, i'll post it here in a sec
@sand shore ^
Only thing I was worried about was assigning the wildcard type to zero
In case the array was empty
Same
You think I should even do that check at all (I'd prefer not to have an execution pin pass through this macro)? And just be sure and use it carefully?
@tight venture I'm not sure you need to assign it to zero for that. It seems to pass a default nil or 0 value if there's nothing in the array when you Get. With nothing in the Array the RandomIntInRange returns 0, and Get(Copy) of 0 index in an empty array just returns a nil or 0 value.
@maiden wadi Beautiful. You are a gentleman and a scholar.
anyone that could help me? i cant find video or guide on this problem I have
https://puu.sh/FMLlp/55807017f1.png
https://puu.sh/FMLlK/90901dc38d.png
https://puu.sh/FMLlY/c0d6983c8b.png
here is how you find most distant location along a spline with a % threshold for accuracy. (Sorry for the terrible cross-spaghetto)
@tight venture It doesn't always reset itself to a null value - only in functions
Flip flops rely on the value of a macro variable not resetting
Or I could return a bool IsValid result alongside it...
but that would kinda defeat the purpose of the whole thing
Still think this is the best case. It'd just return the default nil value from any datatype and you could do with it what you will. That or make two execution lines based on whether the array is empty.
I just saw. You should not assume array access out of bounds is safe. If you nativize you can crash
And I can't remember what it does in shipping
Indeed in editor you get log entries saying you accessed none and that can be annoying. In actual builds it might be a perf concern due to logging
I feel like this is one of those cases where numbers will generally always return zero, bools will return false, and objects still need to be checked outside of this for whether they're valid if you use it on an object. I don't think you're going to optimize it perfectly for every datatype just inside of the one macro.
I'm just guiding towards best practice. It isn't about the data type
Crashes on array access don't care what you're trying to retrieve
@maiden wadi You'd still have an array out-of-bounds error there if the array was empty. The local int would be 0 and you'd be accessing array[0] where there isn't anything there.
@maiden wadi where did you see that GET returns a null value when called on an empty array? I am trying to find the documentation for that node and failing
Google isn't helping, and the context menu is all greyed out for that
I can confirm that it returns a default value
hehe okay
Is it just me or are all like all the text and string functions lacking exec pins? There's no way to use conditionals to format text without making a bazillion custom functions 😦
Can I access data table by index?
Or iterate over every item?
using strings sounds awful
PrintString is used for debugging though and is dev only 😛
What I want to do is to format text according to variables and bind it to a text block in UMG.
It's mostly testing and assumption on my part. Most of Epic's return for blueprints contains at least a default nil or 0 value, and it doesn't give any errors when using it as such.
I'm just saying, don't worry about the exec pins. Just format the text, and wherever you need to use it, that'll have an exec pin.
Well I can't format the text without using branches ^^
I need to do like int > int and stuff like that.
@haughty fossil screenshot pls
Something like this
Oh I think I can use select nodes.
But I'm thinking this might just be faster to do in C++ lol.
How can i get rid of the data table wildcard?
Or how I can "imply" that it is the struct I want
Strings are what finally drove me to C++. I was sorting arrays of structs based on a string in them. Totally did it. But three loops in with infinite loops unless I hid them behind other function calls drove me to start writing library functions.
Won't the wild card just turn into your struct if you plug something into it?
Won't the wild card just turn into your struct if you plug something into it?
@haughty fossil
Huh, weird.
I cant plug it into something if I don't have something to plug it into. Like, I cant just plug it intot the float
I think you might be trying to plug an actual data table object into a function that expects the name of a row? Not sure though haven't used data tables.
The data table is set as a variable
You have to break the pin
If you connect a variable to the Get Row node, it can't auto detect the underlying struct
Makes sense
I tried to break but didn't find my right struct when searching "break". But moving the pin and then typing break found it. Thank you
Cheers
Seems to work just fine. Thanks @maiden wadi and @sand shore
btw I did do a nested macro for ArrayIsEmpty = !ArrayIsNotEmpty. I hope y'all meant that it would get confusing, not that there's some bug in UE concerning nested macros
It should be safer to do it DRY I would think
Oh man.... now what
Now what is this?
ArrayIsEmpty()
ArrayIsNotEmpty()
The error message only popped up when I tried using ArrayIsEmpty(). Maybe y'all were right about using nested macros...
does it do the same thing if you use a int>-1 ?
I unnested them, works fine now.
💯
you need to add one?
Check second screenshot please.
Moreover. Why is one of these implementations yellow and only allows me to create an event
And one correct function?
Wtf
In your implementation. You need to explicitly add a return node.
I see the one in the interface
Weird.
How is it called?
Ah just return node.
Interesting that it doesn't generate that. That worked thank you. How about the second one with the yellow implementation ?
@willow lichen The difference of color between those two interface functions is that one is an event and the other is a function. One returns a value, the other just calls functionality in the actor the interface is implemented in.
@maiden wadi
But they should both be functions
Can I enforce that without using a return value?
Ah okey thanks.
Anyone experienced "print string" suddently not working? Playing in new editor window, no longer seems to work at all, no matter where or how I trigger it.
It's going to the log but not the screen, even with "Print to Screen" ticked.
Do you have the uhh.. I don't remember the command for it. Disables all on screen messages thing.
Not sure if that affects prints. Never used it. Just a thought.
Anyone know anything more about this advice?
An overview of how Collision and Collision Responses operate in Unreal Engine 4.
It doesn't really go into any more detail other than that statement
I have a blueprint class that needs both.
You need both events, or you need an object that plays event hit, but can still be detected with overlap checks?
You can enable/disable overlap checks in runtime
Im looking for some help on a BP, I followed a series of tutorials on youtube on creating a strategy camera that has a limited movement range, and moves the camera based on where i click as long. I am trying to limit the clickable actors to a specific list and IDK how to acomplish that
@static goblet Clickable actors? Like selecting units to make them move kind of click?
right now, if i click on any actor in the scene, the camera moves to focus on that actor
what id like, is to place in a few specific actors (spheres) and those be the only actors that are available to click on to move the camera
Ah, I see. I mean there's a lot of ways to handle it, but if it's just a specific type of actor, I'd probably just ask of the clicked actor under the cursor is an actor of that class. Via cast to or get class if class == chosen class, both work. If so, move camera.
i am very novice at BPs, can i show you what i have and u tell me where I need to add that?
Go for it.
I followed a 4 video series from Dev Enabled on youtube you can find here: https://www.youtube.com/watch?v=fj2RSH5gL1A
Top-Down Strategy Camera:
In this collection of videos, we will create a simple top-down strategy camera. It's a very simplified take on camera systems seen in popular games such as the X-Com series.
This Video:
In this video, we create the functionality allowing us to selec...
but ill show u my BPs
created a function called Handle Mouse Clicks
and one called Check if Click Hit Actor
those functions are used along with this on the event graph
i appreciate any help
How can I use the class scale when spawning an actor?
I have a class ItemBase
And that is ItemStone
Static Mesh is the scene root (from stone)
Now I scaled my mesh down to 0.1 for example.
How do i retrieve that value to plug it into the Spawn Actor scale thing
in my character class, the instigator return null, but it should return the controller, why this happening please help
@static goblet So, your custom function node CheckIfClickHitActor?
@maiden wadi yes?
You want to drag off of the actor coming from that and cast to the actor type that you want to be able to click on. Put that cast node between the branch and set there.
That'll keep your camera from focusing on that actor or moving the camera to it unless it's of that actor type.
@maiden wadi do i use the Cast to StaticMeshActor Node or is there a different one?
Hi all! I'm trying to understand the builtin OnDamage events. I've a parent BP that after an AnyDamage Event calls a PrintString and a Dispatcher which I then Bind to an Event>PrintString in a Child BP. However this Bound event in the Child is never called when I damage the Actor ingame. Damaging the Parent works fine; however. Is this because the builtin Damage events are authoritative?
A Call to Parent function in the Child AnyDamage event does execute my Dispatcher. It's just trying to call the Dispatcher from the Parent's AnyDamage event that doesn't seem to go through (I'm in 4.25)
@static goblet Cast to whatever actor type you want to be able to click on. If it was me, I'd make a new actor class specifically for it.
@maiden wadi ok i apologize again for being a noob at all this, how do I create a new actor class?
@static goblet No worries. Right click in your content browser and under Create Basic Asset there's a Blueprint Class. Click that, and then at the top, click Actor.
ok, ive done that, named it BP_Retail_Click
Add a Static Mesh to the top left in Components, and change it's mesh to your sphere things or whatever you wanted to click on.
Then you just need to put them where your current sphere things are and replace them. Then where I said to put the cast, you'll cast to your BP_Retail_Click
@maiden wadi ok ive done that, like this?
im getting an error
says i need something for the object pin
Plug the Hit Actor into the Object
What would the equivalent of VInterpTo be for easing between two float values, not two Vector3Ds?
I need to do a gradual rotation along a single axis
@tight venture I think it's just FInterpTo
kk thx
@maiden wadi Possibly - will look into that, thanks. I was using apostrophe to see AI data at some point so it may have disabled that.
Hm after closing down Visual Studio and wiping everything it seems to be working again. Thanks for the help all the same.
what do i do in order to make a level start with a cutscene/sequence and them when its over change to the default pawn?
Depends on whether you want them to possess the pawn and wait without being able to change game state or not
im sorry i dont understand, when a level starts i just want it to play a sequence, then when the sequqnce is over, switch to the default pawn
@untold sapphire Personally, I'd recommend making it so that your walking around and picking stuff up is done in the character. This is character specific functionality. The controller should be used for non pawn specific stuff. One classic example of this might be tabbing to show a score screen while your pawn is dead and destroyed. But all of the running around, shooting and such is done in the Pawn. So in your case, the walking around and picking things up should be in the character. For your table top game, you might create a second pawn that is spawned at a specific place on the table. When the character interacts with the table, call unpossess, stop movement on the pawn(Keep a reference to it for when you leave the table though), Possess the table pawn and do some camera work if you want. Doing it in this manner allows you to keep stuff like menu access and non-gameplay specific keys available while both in the pawn and at the table without having to copy that functionality into two different player controllers.
@maiden wadi
good advice thanks!
I'll ask this again here, sry for the long question: I've got many units (turn-based game).
- According to class, their icon changes to display the proper class near the portrait.
- According to era, the portrait frame is different as well.
- According to Tier, details are added to the portrait frame.
Now, the question is: should I host the Image vars in the "UnitBase" blueprint or in the Widget? I'll use selectors on Enum to switch vars but performancewise/smartwise, should they rather exist in all unit's characteristics as "defaults" inherited from UnitBase, or in the widget that displays them?
@knotty quail Are you trying to make a dialogue system? - wait that's pretty obvious...Ok, I did one, but it's logic is kinda weird. I used switches on "topic" and "level" of conversation.
that's not totally weird
It is when you are setting it up
xD
you need to pay attention not to loose your focus and mess it up 😛
Oh I get you, my dialogue system is basically an actor i drag into the viewport that can be placed around different things.
I'm still working on a better system but for now it's servicable
basically you just fill in arrays of questions>answers which are in fact = "topics" which can change and "levels" within the same topic. Then just pull out of the data table accordingly. Probably you can use composite data tables, but idk, never used those
If you bind to an event, is it necessary to then manually unbind to it on destroy or endplay to prevent leaks and that sort of thing?
@hollow sequoia Never thought of that, but it's a fair question...Btw, anyone can/care to elucidate? It's rather interesting idd.
Well unless you want it always active you will need to certainly unbind it at somepoint. Is that what you're asking?
Anyone see something wrong with these? I used to get overlap events triggered between Influence and SK_Kitty, but now nothing
Influence
SK_Kitty
@tight venture For influence try checking world dynamic, that usually fixes my overlap events not firing.
that did it
thx @rustic verge
Why would that matter, though? SK_Kitty is set up to have collision as a Pawn
well, im not sure exactly, but since it is overlapping with an object in the world it has to be dynamic.
but i dont fully understand, just found that works for me usually
@rustic verge it's conceivable that the event knows how to handle and/or clean up the dangling subscriptions...
@hollow sequoia interesting question... Dunno the answer but if you check the output log and see errors and warnings during gameplay... You tend to see those when nodes are executed on actors "pending destruction"
I don't have UE4 open rn, but if there were a way to get a list of every actor subscribed to some dispatcher, then you could test whether actors pending-destruction stay subscribed until garbage collection or not
How would i get the information about the selected target from a drag and drop operation?
Like i got Image1 and Image2, how would i know that i drag 1 or 2 ?
Anyone around that can help with Save/Load in BP? I have a struct that I'm saving for inventory items, one struct for each into an array. For some reason, it saves and loads fine in the same session, but coming into the level fresh it only loads 2 items and only if they are in specific slots. However, they are all the same thing. I just don't know where to go to debug this. I can provide more info if someone thinks they can help. Feel free to DM
@icy pilot you can get the currently dragged item I believe... let me open my project to see how I do that
That would be cool ^^
This is what I'm doing. For me, when I drag I'm creating a widget and then setting that as a variable I can access for that info.
Ahh, i see. Thanks 😄
Actually, as I look at it I'm not using that so can't confirm it works. 🙂 However, this does work. The CurrentDraggedItem is the widget I was dragging and have just dropped. Stands to reason you should be able to do something similar while dragging. Guess it depends what you are trying to do.
how can I have a pawn run on all sides of a cube? most gravity plugins once you walk to the edge of a cube the pawn falls off
I dont want my pawn to fall off, I want him to keep walking on the cube
@pine trellis drawing inspiration from Unity, you can make detectors for your pawn using floating pawn nav movement and dictating the movement based on your detection results
I am working on it at the moment and haven't made it yet
@round idol Yes I am, but this question (I think) is also a larger one outside of the dialogue system.
Calling different sequences from the same row of a data table
@knotty quail I'm not sure I understand what you mean by sequences
Within a datatable you have rows, within those rows you can create sequences that hold different text. Sequence 0 = x sequence 1= y
As of right now it's calling the entire row and displaying x and then y
I'm trying to figure out how to make it call either sequence 0 or 1
not both
CandleInteraction is the row name
is there I way I can pull just a single sequence from that row?
I have a scene manager defining what data table I am using, so that is how it knows what DT to use
@knotty quail Sure. It all depends on how you have your struct "structured" 😛
say you have DT1 Holding, row 1, Sequences A,B,C. Your struct would look like this: Struct:A,B,C.
you can get the row, split the struct and get what which one you want.
the row contains all of the information you set to the vars inside the struct you made your table on.
When I created my DT, did I use a struct as a parent or something? I am not sure if I have made any structs (sorry, still new to this)
ah yes
I used the SDialogue struct
Which i believe is a default in ue4
Well, then I'm lost
I only ever used custom structs to organize my data, and didn't even know a "dialogue" struct exists as default in UE, maybe I'm missing some new features?
I may be the one responsible for losing you, I'm using a toolkit to build a game from so it could very well be from that. I'm still sifting through all of the framework to learn from it
This is the struct I am using
There it is! the toolkit. Now it makes sense...ok
Well, you only have one option I'm affraid. It all depends on how the toolkit is using the information within the struct and there is were you're having trouble yourself now. So the only thing to do is look at the publisher's website/channel/etc. You need to find info on that toolkit from its maker.
That last variable is in itself an array of other (further) structs, each containing more info.
Sadly the documentation is lacking in a lot of areas, so I'll just have to keep studying all of this until I find how it works
Or just try and make one yourself. I once tried like 3 dialogue plugins and ended up making my own because instead of learning someone else's logic, i'd rather try and use my own - for me it was simpler/more productive that way. I just failed to understand how "others" think. I'm not saying mine is better, it's most probably worse, but suited my needs back then so yea... 🙂
new to event scripting, not new to bp's, reading unreal doc on this, so just ex., say I want player hand to touch 'area a', do I use actor begin overlap or is there something other specific function for this?
new to event scripting, not new to bp's, reading unreal doc on this, so just ex., say I want player hand to touch 'area a', do I use actor begin overlap or is there something other specific function for this?
@charred berry Yes I use begin overlap for lots of scripting. Just be sure to run a branch off of it so it only fires when your hand overlaps and not something else.
ok ty so much
is it possible to make a child animation blueprint for a different skeleton (of the parent)?
i have this case where I just need to swap out hte animations and keep the logic, but all the skeletons are different
If I have a bunch of blueprints with unused components, will those components cause overhead? For example, I have a light BP with a parameter to toggle particles (light bugs). only half of those actors in my scene have the emitters activated. do the rest of those actors cause more overhead with the disabled emitter than if I just swap them out with a regular light w/ no particle component?
I have a question I made a bed and if I wanted the character to get in it and sleep in it and get out when you want him to. Do I made the animation of the character doing that in modeling software and then Import that animation to unreal? Or how do I go about this?
@hybrid ridge Yes. you make the animation (mind the root motion considering it's going to lay on a bed not on the floor) and import it in ue. You can tweak some things further in UE afterwards. 🙂
@buoyant night no, but you can retarget the animation for a different skeleton 🙂
If I have a bunch of blueprints with unused components, will those components cause overhead? For example, I have a light BP with a parameter to toggle particles (light bugs). only half of those actors in my scene have the emitters activated. do the rest of those actors cause more overhead with the disabled emitter than if I just swap them out with a regular light w/ no particle component?
@simple lantern Bumpin' this
@simple lantern They will cause overhead - the question is how much, and it depends on the number of actors
ah thanks
if you have 10-20 actors it won't matter, but if you have hundreds, that overhead will start being a problem
I'll probably end up with like 80 light actors, each with an emitter that has around 10 particles that will get triggered as the player gets close to them
does dynamically creating an emitter component solve that overhead?
Ofc. Or, you can just create two children of the BP - one with and one w/o
cool good to know
but mind you, you won't be able to add components on runtime (i know...)
oh
*actor components I mean (sorry, my bad)
Oh i thought you meant BP components
you can add scene components - as many and varied as you like 😛 sry for the confusion
and was a little confused
@round idol thanks
so is that the main benefit of dynamically creating material instances and such, to lower the overhead?
instancing as a concept means that only one object is loaded and then just copied around in the world
the material (unique) is the object, the rest are just copies of it
yeah I've just been applying material instances to my objects, but have seen how you can generate dynamic material instances within an actor BP
which seems like a whole different approach
depends. I rarely use called DMI's
I prefer using material parameter collections for various tweaks, but methods have their ups and downs, depends on context really
cool appreciate the info
np 🙂
Hey guys ! i am currently using the LineTraceByChannel node to constantly update the player's current target at every ticks but when the ray it another player it seem to be returning a body part mesh as the actor hit. How can i get the whole player from that ?
How do you unset/unvalidate a character object reference variable in BP?
you can set it to null i guess
How do I set it to null after starting the game?
hum thats actually not as straight forward as in C++ it seem
i guess a would use a second variable that i would never set as a reference to null so to speak
why would you unset a variable in blueprint tho ?
this work
@scarlet ledge
Contextually deciding wether or not to perform an action if a certian object reference is set.
well that is the only way to do it in blueprint i could find
If I can't do it via that way I could just use a bool.
It doesn't unset for me for some reason.
I think the issue is I'm testing if its valid before its unset.
Ok, when a Player Controller posses another actor/pawn/character, it will call Event ActorEndOverlap on the previously controlled actor/pawn/controller
for some reason button 22 and 2 are controlling button 398 and 218 how can i fix this
so I have a child actor componet that has a animation based on what the parent dose
It works fine for your self (eather server or client) but you can't see others update properly in multiplayer
It really depends on how you're making them do it. The animations should happen on the clients themselves based on replicated variables. Simplest example is maybe the default movement. You press a key, client tells the server it wants to move, server moves and replicates the new location back to the client. Then the client simply gets velocity and tells the mesh to play the animation correctly. In short, find a way for the client to get a variable from the actor that both clients can see and make your animation blueprint get it to make it play the animations generally at the same time.
Would this be the same if the server has the same problem?
It seems that everyone can only see their own animation and no one else's, I would think that something isn't replicating but I have every thing that needs to be replicated to replicate...
I'm using the control rotation, it's a stationary pawn
So, you have a child actor that's on another actor and the child actor needs to play an animation when the parent actor does something. What is the trigger on the parent actor? What does it need to do for the child actor to play it's animation?
It's a turret pawn for a vehicle pawn, I'm just trying to find a way to simply it
It's supposed to aim where you look
Haven't done anything like that myself yet. But I imagine that you could treat it just like any other pawn if you can possess child actors. On mouse X rotate the turret's whole body, and on Mouse Y change the pitch of the weapon mounted on it. So.. I suppose that if possessing child actors actually works, you just need to create a 1d aim offset for the weapon on it and the base would rotate outside of the animation?
This was supossed to have worked, but it didn't. The Variable Closest Enemy is invalid, so i can't fire the collision detection Code for the Sword.. The Second Isvaild node reads it as not valid.
So the print string never fires. How to fix it, I don't know.
You're going to need to share the function as well. No idea what it's doing.
Get Closest Enemy. It looks like it's returning an actor for you to use. Does it actually set that variable that you're trying to check IsValid, or do you need to use the return to set it?
but I can't understand why the variable closest enemy is not valid. Because this is why the hit detection of the sword is not able to work to detect the enemies because the socket code never fires because it can't get past the second is valid node.
ever since I upgraded from 4.21 to 4.22 the collision code stopped working.
here's what the engine is saying
LogBlueprintUserMessages: [CH_Player_C_0] Is Not Valid
LogScript: Warning: Accessed None trying to read property closestenemy
CH_Player_C /Game/ThirdPersonBP/Maps/UEDPIE_0_ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.CH_Player_C_0
Function /Game/Char/human/CH_Human.CH_Human_C:ExecuteUbergraph_CH_Human:1F6F
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property closestenemy". Blueprint: CH_Human Function: Execute Ubergraph CH Human Graph: Fight Node: Branch
LogAudioMixer: Display: No commands were queued while flushing the source manager.
that's where the variable is being set
Where is that value coming from that you're trying to set? How are you getting the actor reference in the function?
I don't know what you mean so I tried setting it here.
I know nothing about setting variables with functions interfaces.
its beyond my knowledge. I have limited knowledge of the engine
I copied a tutorial for the melee system and it hasn't come out right because of this isnot valid problem with hit detection.
strange, putting that set inside of the function at the start has stoppded the error, but hasn't solved the problem. I think it might be an engine version problem because this code was done in Ver 4.22 and I'm trying to rebuild it in Ver 4.25
@shut hinge Not the last picture, the one before that. Where are those three blue lines plugged in? Where is it getting the actor reference?
oh right hold on
so i swing my sword at the enemy and of course nothing happens, no hit detection because of this issue. But this melee system that I been trying to install was for ver 4.22 so it might not work in 4.25
Just a couple of things to start with. I don't think it matters, but it's weird using a Spheretrace with the radius at 0.0. If you just want a line trace there's a MultiLineTrace as well. Second, I'd recommend using an IsValid before the message to ask if the hitactor is valid. Third, is that I'd really recommend gathering up the hit actors that are valid, and enemies, and putting them through a separate function that returns the closest actor to another actor. Then return that and use that reference to set your actual value of ClosestEnemy.
The trouble with losing the hit detection collision all started when I upgraded to 4.22 from 4.21 because I needed the editor utilities that was only avaliable in 4.22. Because I needed the mesh procedural instancing system, but you needed to have the editor utilities to install that system. That's why I upgraded. Wish I didn't now, it broke the collision in the weapons.
Do your weapon's event hit or overlap still fire?
That's odd, multisphere trace should not be reading 0 0 or it won't detect any trace for the weapons... that's it, tha radius values for the sphere trace must've been reset when I upgraded. You just fixed it. Now its hitting the enemies. When I first upgraded, the Socket was deleted from off the sword. I replaced the socket, but I didn't know it also wiped the Radius value out as well.
Updates can be terrible sometimes. It's usually worth the little bit of extra effort for the better tools though.
Oh this is a nasty engine when it convenienty loses its own values.
I find that very strange... But it happen, it deleted the socket from off the static mesh sword.
that's what happened when I switched engine versions to upgrade my project.
Happens. Once you spend enough time with it, you don't notice it half the time. You're just like "Oh look, that's not working. That's right, that's right, that's working.. Oh. Fixed."
i spent two years in this engine trying to get the components of my game up and running. I've got the basic dialog system all working but still to get the dialog choices to work with it. But I don't know how to code that so the widget dynamically creates the choices slots for you, it would have to be done with a data table. There was quite a few components I needed for my game, a Combat System, Dialog System, Inventory System, levelling System. ANd I also need to get vehicles working in it. I don't know how to add that code yet so I can drive a vehicle around.
I don't know if I can take that vehicle starter template and copy parts of that code to get a vehicle to be driveable in my project.
There's alot I don't know about this engine. Not sure if we can merge the starter templates logic into the project or not to allow these features..
Only been working with UE4 for about seven months and I have no prior experience in development. Also haven't done anything with vehicles, but I'm pretty sure all you need is a vehicle pawn. On button press, detect if object in front of character is a car, if yes, call possess on the vehicle pawn. Hide the unpossessed player character or attach into car. When getting out, just place the player character next to the car and repossess.
I know you can make different level maps from these starter templates.... But I wanted my game to be like Jax & Daxter III where you had vehicles and everything else all in the same world to access seamlessly instead of blanking out the screen and loading each section. like with Final Fantasy XII.
I'd start by importing either the Vehicle or VehicleAdvanced starter pack into your project and just use that pack's default pawn as a developmental placeholder for your car.
yeah, I have a vehicle but I think you need to rig it up with some bones to make that drivable, I don't know if you can replace the mesh in that vehicle pawn with another vehicle mesh, be great if you can do that without causing any complications for its code.
Might be able to. Lemme look.
I'll get a pic of the vehicle i had in mind
this is my game project
Seems pretty straight forward. You'd just need a car rigged the same as the Vehicle Mesh that it uses. Of course if you don't want to use the Vehicle movement, you could always create your own movement component.
here's the vehicle
Also I came across a strange problem. One of my head meshes when I put his head texture on him, it wraps him all in one color instead of with the head mesh in all its details..
tried using the text coordinates to rescale the texture on his head but it didn't resolve it.
here's the problem I'm having with Rex his head only shows 1 color of the head texture, while his body shows all the rest of the details of the texture.
here's what his head texture should look like
but when I had someone add his body, his head only allows just 1 color to be wrapped on him.
I have an issue with setting camera rotation (on the X axis, so roll). Basically I'm using a timeline to lerp between the current camera rotation and the target camera rotation. Issue is that while the lerp is happening, I cannot move the camera until the lerp is finished. One workaround I found is to enable "use pawn control rotation", but that creates other issues. Is there some setting that allows the lerp to override camera input? If so, how would I disable it?
Screenshot for more information
so you just want to manipulate roll while the player still retains full control of pitch/yaw? I guess the YZ has to pass through on both the A and the B inputs of the lerp. Not sure if that would actually work; I can never quite wrap my head around rotations and its gimbal logic.
Or do the break/make stuff on the output end of the lerp
where you allow the original YZ to pass through
I'll experiment with that, thanks.
I guess it could just be a regular old lerp-float at that point feeding the X input of a Make Rotator
@shut hinge For graphics issues I'd hit #graphics
hey does the 'Construct object from class' node work for you in 4.25? I am using Blueprints as well as C++ for my project and I get this error message when I try to compile my actor with this node: "Cannot construct objects of type 'Game/DIRECTORY/NAMEOFBLUEPRINT.NAMEOFBLUEPRINT_C# in Construct Object from Class".
I can't speak to that specifically but if no one else replies, you should try reproducing the issue in a new blank project and sending Epic a bug report if it is indeed a problem with the engine. (https://www.unrealengine.com/en-US/support/report-a-bug)
yeah I will try this, thanks^^
@serene hemlock Your object inherits from UObject and not AActor, right?
So if I used a lerp-float and make rotator, what would I feed into the Y and Z?
@viscid skiff the original values; the lerp just feeds a new X
yeah sorry, there's some gimbal thing I'm not getting
or I'm not sure. So when your timeline is running, the control is locked? Are you affecting rotation normally on some axis input event or tick or something?
it's not apparent to me why the control would lock in the first place
@maiden wadi ah this makes sense, first time working with this node and now everything works. thank you
It.. seems like when the timeline is running only the Y axis locks, I somehow didn't notice this when testing it.
I can still control the X axis.
@serene hemlock Yeah, I don't understand the differences enough to comment. But if you're using UObjects, you'd construct, if you're using AActors they need to be Spawned.
And no, rotation isn't affected anywhere else
yeah sorry, based on the graphs you've shown, it's not apparent to me why one of the axes that you're effectively passing its current value through to the Set Rotation node would lock
That question made more sense in my head.
The timeline fires each frame in a tick-like fashion. And each time, all the nodes are re-executed; getting the data again and doing the math. So there's no persistence in that sense.
Seting a position will just instantaniously change its position.
To make it smooth you lerp it by setting a bunch of positions in between
That's essentially what I meant in that question.
I know
You can use a timeline for example
Or other things
@viscid skiff a timeline can be considered a temporary event tick that has some cool features
I'm using a timeline to set the control rotation
I will critique the use of the timeline-lerp because it's using itself to set itself in each frame, which would cause different lerp-speeds at different framerates because of compounding effects. The cleaner way to do it is by first saving the original value of X before running the timeline, and feeding that stored value into the Lerp node's A.
I didn't bring it up earlier because it doesn't solve the deeper mystery of why one of your axes lock 😅
what are you getting the world rotation of?
Player Camera*
Maybe that has something to do with it. If you're taking values from one thing and using it to set a different thing...
So.. should I use the player's mesh?
or maybe set the camera's relative rotation directly?
Cuz right now you're setting player controller on each frame based on the camera and maybe that's messing up the order of operations of how you'd expect the player controller to affect the camera. Or something.
Some weird stuff happens when I set the relative rotation, the camera ends up facing backwards.
And it does a few 360s.
just gimbal things I guess
lerp rotation with shortest path checked would probably fix that
like you were originally doing
it'll fix the 360s but idk about the facing-backward
It fixed both the issues but the camera no longer rotates on the X
Which then means the original issue is gone 🤣
so now it doesn't roll? Like the timeline doesn't do anything?
Seems like it.
have a look at quaternions
this seems like a gimbal lock problem
Hey guys ! I am trying to make a targeting system in my Third person action RPG using a ray trace by channel every ticks but when the ray hit a character it return the part of the skeleton mesh hit, how can i get the entirer character ?
hum there must be some easy way to get the character that left arm belong to xD
Lol
So I have toggle between walk/jog and for whatever reason it loves to take my stamina but doesnt love to give it back when I stop moving.
I assume you routed the BP for that eventuality ?
probably not, what do you mean exatly ?
phone
Now im even more confused than I was
sorry that was for sandman, hey MR sandman
sorry its been a LONG few months ;+__)_
ya
@trail saddle i have no idea on yours, I*'ve yet to get advanced like that on my char
Ill just post a picture
but I will have to soon
Gyazo lol
:)(
sorry not really
RIP
I have one just two screens so I have to crop anyways
ah ok
can't help myself
lol
its ok laughs now, are heavily theraputic!!!
HM are you sure you don't need a branch to make sure your health regens after idle ?
dunno just asking
wouldnt' think so , but hey code is demanding little stinkers
I have 3 branches before the InputAction even reached the Sequence node
i would handle the regen of life / stamina on a completly different function
How do i detect if an drop from a drag and drop operation hit e.g. Image1 or Image2 ?
also im really trying but you cant expect to have efficient help but just putting your whole program on an image and ask us what is wrong, you need to compartiment that a bit more
Huh?
Me?
I cant seem to take a decent screenshot so Im typing it out. Its rather easy
Input action(is toggled) -> #1Flip Flop A output -> Branch to detect if the player is jumping -> Branch to detect if the player is moving( velocity) as well as inputting MoveForward -> Branch for detecting if stamina is above 0 -> Set Jogging (box checked) -> Sequence.
#1FlipFlop B Output -> Branch once again to detect if the player is jumping and to set stop sprinting when landed -> Set Jogging(box unchecked) -> Sequence Node
but the problem is with your stamina not regenerating right ?
Yeah when I stop forward movement even with the Input toggled I dont get the stamina regen but if I hit the button again it will regen. Which doesnt make sense because the branch related to detecting if the player is moving. If that condition is false the branch should be outputting on the false output to the Sequence node for stam regen
are you sure thats how your regen fucntion works
It works with sprinting
It has to do with creating that type of signal using a toggle input as all I did was copy the sprinting version and change it to a toggle input
i cannot find where the regen happen
That is where the regen happens
There is where it takes the stamina away and changes the max walk speed
hate to admit I posted those is backwards order..
im sorry i can't pinpoint exatly what goes wrong . But to be honest it feel a bit too messy to be reliable. You need to split it up into modules
Well I have everything separated in my BP by it’s function. Unless I need to go more in-depth than that
i mean what you are showing me is not separated at all
I had to do that type stuff to take reliable pictures lol
YO YO YO! So, I'm new right, and I need a template that will give me a loading screen, HUD, menu, title, etc, I cannot find that? Does anyone know how to access this?
I am not even sure those exist , Zara, as it is fairly simple to make. I do think for the menu at least that exist
but i cannot remember where i saw it
;o
i do not recommand using templates for that tho, as it is the first thing your players will see and you dont want it to feel recycled
you're not supposed to start with the menu tho
try and watch some youtube tutorials
you see,
you are supposed to start with learning and reading documentation
I started by downloading UE4 and watching over 40 tutorials from WorldMachine to UE4
yea me too basically
i created this game, and then what happened was everytime the player died, the menu would pop up but where the player was was still showing
unloading scenes didnt work
Probably more than 40
i already did lmao
@exotic cradle where you print the stamina for the regen, is that actually going up
Yes @deep elbow
Ok just windering, cause you were incrementing and then setting the variable again, thought perhaps it was going a bit mad setting it twice so quickly
When I untoggled the assigned key it goes back up. It’s supposed to go back up when I’m standing still while toggled but it doesn’t.
It continues going down
Which the Velocity and Get MoveForward branch is supposed to prevent that
the one thing i don't see there is the remove stamina timer
yeha but those checks happen once, when you press the toggle button
help with unloading the map?
@gloomy marten https://www.youtube.com/watch?v=XE2x4TZHxHg level streaming
that seems a bit too advanced though, you might just be talking about reloading a level if you die?
MY WHOLE COMPUTER IS GLITCHED
cause then just do the Open level command
I did a unload all and i cannot close UNREALENGINE
im using the little block thing
that u move the connector too
not cpp
yeah uh, good luck
^
you're not giving us a lot of informations here. It seem to me you are looking for some miracle , and i don't have those, or my damn targeting system would be finished already
i wasn't calm because i just got bsod, and now im back :p
i did this levelunsync all or smthing idk
Hmmm ima get some rest and take a look at it in a bit. Already put in 7 hours on this one issue lmao might just setup a different stamina system
sandman, make your regen completly separate from the rest
is how i would do
it would be easyer to see what the issue is
Yeah that’s what I’m thinking I’m going to do
Been thinking about that for awhile lol
yea i think it would make the whole thing more reliable, and probably gonna be easy to do also
Hello guys,
Today I have this error for the first time in 7 years lol
What's wrong with my Structure and how do I fix it?
It looks like you have a type that's not compatible with a set or map used in your struct
I.e. if you use a custom struct as a key of a map it will break by default as you haven't defined functionality that lets it determine uniqueness (GetTypeHash)
hmmm... ok maybe the Data Table row handle that I have in my structure causing the issue
Nope! It was the text variable type I have in my structure that tMap didn't like 😦
anybody got a way to get the character targeted by another chatacter ? The trace by channel node return part of the skeleton mesh
get hit actor->cast to character
yea i have tried that but the cast failed. Let me show you
or you can add a tag in your character and from the hit result use "Actor has tag" node
This return "Failed" no matter what
So it doesnt hit?
So what is the "Hit Actor"?
So you would need its parent?
i dont know , is the whole blueprint considered it's parent ?
i thought the parent would be the class it is derived from so maybe i am confused
You will need the class reference in order to cast to that actor class
The "Get parent Actor" Return Null
That's a very weird print name. Have you like divided the parts of the default mannequin skeleton mesh into static meshes or something?
Or can you use a regular print string instead of that custom Object Name node?
i just made a new character to be sure
and same problem, ill try using a regular print
Check your collision preset for your Capsule Component. Make sure it BLOCK visibility
Because when I did something similar, the actor result would be the actor instance, the component would be a skeletal mesh, with a bone name. By default it should be a skeletal mesh, getting a static mesh result makes no sense, especially not as an actor object.
Also, the dudes in the map are they BP Characters or just the SK_Mannequin ?
Yea i just check collision and it is set to default Pawn collision and it does block visibility
the dudes are other players
so it is BP_PlayerCharacter
also
it doesnt take any part of the skeletton, it seem to only take the Left Arm for some reasons
ok, on your trace node set the debug mode to per duration and see what turns green
My guess would be something wrong with the targeting system you use. Maybe it only search for particular objects! Or it needs some custom collision settings in your Project Settings
i set it on "per duration" and now the characters are completly ignored, it does work normaly on the static meshes all around tho
well i showed you the whole thing really
it work on everything exept characters
i have created a new character blueprint diretly derived from the UE character class and with nothing but the manequin mesh and still same issue ;/
im gonna make a new project realquick to be 100% sure of where is the problem
I have created a completly new project and copy pasted the part of the blueprint for the targeting and have the same issue , so i am fairly confident that the problem is in that portion of code
boy when i started that i sure didnt think it would be such a big deal xD
Any tips on: how to play the video only when it's shown on screen ?
Hi, Does anyone know how to linetrace down but then offset it to the left or right of a the chracter please?
what i want to do is when my character gets to a beam it traces to see if its on the floor or not and lock the character to the beam
Hey, i'm trying to make a random sound when my player lose hp, plz help
Does anyone know how to toggle the visibility of a text render with a umg button?
Does anyone know how to add sources to this take recorder thing
starting take recorder from blueprint
hi ! how can i interact with the folliage?
aamir this is a voxel plugin, it doesnt go like this
i want to interact with the foliage and take it back as a resourcex
for some reason button 22 and 2 are controlling button 398 and 218 how can i fix this
Ask to god, impossible to understand for human, it blew my brain
for some reason button 22 and 2 are controlling button 398 and 218 how can i fix this
@tropic mortar can’t tell anything from that code. Send a shot of the widget itself and the button order. Maybe you have them overlapping somehow?
Hey, i'm trying to make a random sound when my player lose hp, plz help
@cyan valley make a sound cue with 'random' node
This copy node, what exactly does it do?
I renamed them to make shore i was using the right ones but i still don't work it does this
@cyan valley make a sound cue with 'random' node
@alpine halo Yes, i do this but for playing the sound only when the health value decrease ? Is it possible ?
is there a special trick to get the PS4DS controller to work in ue4? I plug it in and it doesn't respond. I know it works cause I use it with PS Remote Play. I have the buttons configured in my project inputs. Is there anything additional I need to do?
@cyan valley just do play sound 2d with sound cue when your health decrease. I mean make a blueprint interface for taking damage. When the interface function begins execute add this play sound 2d node
@cyan valley just do play sound 2d with sound cue when your health decrease. I mean make a blueprint interface for taking damage. When the interface function begins execute add this play sound 2d node
@alpine halo Sorry, i'm new with unreal, But how can i see if the value decrease ? There is no Action calld "value" so how ???
And thanks for helping me 🙂
In my for loop, i get an actors display name, and if it contains a particular string, i spawn another actor, however, the next time around the spawned actor no longer contains that string. As I assume Unreal assigns a random display name to the spawned mesh. Is there a way to assign a name to the spawned mesh?
DisplayNames are meant for debugging purposes, not actual design. What exactly are you trying to achieve? I'm not sure I follow this very well.
I have a mesh that is imported from max. The name of this mesh is "Something_14x22".... When a user clicks a button, I find all meshes that are named "Something_14x22" and destroy it, and create a new mesh ( slightly different looking ). Now the next time the user clicks the button, i can no longer find any mesh with a name "Something_14x22" since the last spawned asset lost its naming convention. I am aware we could potentially add "tags", but this would be an extra step I was trying to avoid, since the designer is already naming them properly in 3dsmax. Hopefully this gives some context.
@trim matrix from where the hell did you get that?
Sounds like maybe a good use of a StaticMeshComponent or StaticMeshActor class with an identifier variable in it.
But from what valuetype is it being dragged off of?
is there a special trick to get the PS4DS controller to work in ue4? I plug it in and it doesn't respond. I know it works cause I use it with PS Remote Play. I have the buttons configured in my project inputs. Is there anything additional I need to do?
@buoyant night how about 'is controller key' node
I seem to be able to get it from alot of different variable types
Im just in a random event graph for that
Its input is a wildcard
@trim matrix pretty sure it's just a convinience node just like Reroute
so you can drag one pin to some other place in the graph and then drag multiple pins from there
yea but i feel like it has todo something different then reroute
Im thinking it might have todo with optimization
Not having to repeat the same calculations multiple times
But i wouldnt even be sure how to test that
well it explains itself though. Returns a copy of a value plugged into it
I didn't see it being used pretty much anywhere
but I think you could just skip making a temp variable for something
Oh
and plug that directly into where you'd use that variable
Can Interfaces have variables?
So, they enforce a variable, which make sense, but I cant find it
okay I give up, don't know how to test it either. There's also nothing about this thing online
as in inputs and outputs? @willow lichen
or make the blueprint they're implemented in suddenly have a variable
No not function inputs/outputs
I want an interface that enforces a variable. Like for example
You have a "IHaveId" interface
Variable: int id;
so every one that implements that interface has to expose an ID. Like you commonly are able to do with interfaces
oh. Don't think so
@patent ermine i was under the impression that displayname was different for every spawned instance of an object, interesting that you got that working
Ah you're using contains node...not comparing
What would be the fastest way to get an actor on a level from a non-level blueprint?
Specifically I want to get the GameStateController actor on the level
I have it tagged with "GameStateController" - that's how you generally do it quickly in Unity/Lumberyard
This would be from a spawned blueprint, not one already on the level, so no direct referencing allowed ahah
I know there's the Get All Actors of Tag nodes but those are reported to be slow - if I only have one actor with that tag would it still be that slow?
Oh wait, you can (basically) always access the GameMode BP can't you, yeah I guess I'll just do that 8D
Im trying to make a camera where you can look around a ball using the mouse. It's working ok, except that it seems to also go around the X axis (roll), which i don't want. How do stop this from happening?
I've looked around google but im not getting much luck
edit: Setting the rotation semeed to have worked, thank you tsauken!
maybe changing roll to 0 could fix that or under spring arm settings find "inherit roll" and disable that @earnest mural
if none of these work then you should use set world rotation, that way you will be able to set roll to be updated to 0 every time, currently you are adding to the existing rotation
@alpine halo thanks but I don't think it's a bp issue. I found this related thread: https://forums.unrealengine.com/community/community-content-tools-and-tutorials/1685594-tutorial-ue4-using-dualshock4-controller-via-usb-ps4-ds4-gamepad
Edit > Plugins > Add Windows Raw Input.
Edit > Project Settings > Raw Input :
Set Register Default Device True.
Add 1 Device Configurations.
VendorID 0x054C
ProductID 0x05C4
Axis Properties > Inverted True, Offset 0.5.
Edit > Project Settings > Input :
Use Scale 2.0 for...
I don't suppose there's a Blueprint implementation of Epic Online Subsystems out there yet?
@buoyant night PS4 controller should work fine in Unreal. It should be detected as a standard gamepad device in Windows.
any help - i had a level blueprint on all my maps to add an overlay over my hmd with company copywright stuff - i was developing on a Rift so lined it all up - used anchors in the umg - then packaged and copied over to Vive and its like the right botton corner is up at the left top edge // so i tried to add it to the vr pawn //bp event begin play - create overlay widget - add to viewport /// thats it worked in level blueprint for rift - wway offset on Vive - in BP_pawn/event graph it worked in editor but on package pawn's hands doesnt show up- i cant fly around and no widget at all - where should i put it to get it to work
I want to get this working on a newer version
Coming from unity I'm not good at this kind of stuff yet
Could someone explain what bad cast node is?
I can't find it in any docs
it lost the type
that used to be a regular cast node. "Cast to Character", for example
but the type information has been lost
you must have deleted the class you were trying to cast to
Not necessarily
That's what causes bad cast nodes
I don't know the specific reason you lost your type information
could be compile failure in the class it needs to cast to, resulting in no skeleton class or generated class - for instance.
yeah there's plenty of these
But I would expect you to still have the name/path of the class in that case
What that means for you is that if that were the problem I would expect you to not see a bad cast
That's a pretty rough situation, what version was it supporting?
4.10
hello, how can I do a flickering light without syncing the light intensity of all actors? I'm using a timeline at the moment, but the timeline status is always the same for each actor with that blueprint
@quaint moss Possibly randomize the time between when you're calling the timeline to play.
the timeline starts when the actor spawns, but all actors spawn at the same time I think
I want to make random flickering lights with different actors that have in common the same BP
@quaint moss So on beginplay, set an event by timer, and put a random float in range into the timer, and move your timeline stuff to the timed event.
I found the solution here: https://docs.unrealengine.com/en-US/Resources/ContentExamples/EffectsGallery/1_F/index.html
An overview of the Effects Gallery example level.
thank you guys!
@sand shore Heyo, you're pretty good with the C++ understanding. I have an issue. I really want to replicate a struct that is using uint16. I know Blueprint doesn't support them by default so I can't use them like that. So.. Should I just write my C++ using the uint16, and then create a getter function in C++ that converts my replicated array to a second struct type that outputs the uint16 as an int32? Is there any better way to handle this? My larger concern is the network traffic over a bit of extra processing on the client. Right now I'm using two uint8s but I figured I could simplify it to a uint16 and just change how my struct is being obtained in my widgets. Is there any other way I should consider thinking about this?
Yeah, just convert
Typically you'd want to have a engineer on-staff to maintain custom types
Unfortunately it's a personal project for now. So I am the engineer. XD
Which is why I didn't even get into how you'd do it
I have a map of <SteamID, Object> (SteamID is a struct) and nothing is ever added to it. I have a picture below (yes i know the value is empty but it doesn't add even when it isn't empty), any ideas?
@buoyant night PS4 controller should work fine in Unreal. It should be detected as a standard gamepad device in Windows.
@maiden wadi guess mines not working? Do you have experience using it? If so can you explain how you connected it and set it up (did you do it wired or bluetooth, etc.)?
Not a lot. To be fair I didn't use the default settings. I was using a program for the dual shocks on windows. DS4windows or something. Can't remember the name.
how can I edit UPROPERTY(s) of variables that are inside a blueprint object? say I have a USTRUCT that has three UPROPERTYs that is inside a blueprint object like this. How can I edit the properties of that struct? is this possible?
i figured it out
I needed "EditAnywhere" specifier, not "BlueprintReadWrite"
I don't want to speak over anyone here, so could I dm someone about a question relating to vectors and projectiles? I'm a beginner, and im hoping this is a quick fix..thanks in advance!
ask in here
Okay, let me draw a quick diagram of my problem
How would I go about getting the current character forwards movement speed?
I want to check if the player running faster than some predefined amount.
So the goal is to shoot a projectile in whatever direction the camera is facing / forward vector of the control rotation I think. For this diagram, the character itself was facing forward the whole time, but I moved the camera around (in the direction of the green triangles). The red shows the trail of the projectile
So basically the projectile is not facing the view rotation
Except in one case, the x direction, sorry I should have labeled that
Here's the BP of the projectile itself
And here's the spawning blueprint in the third person character
I think I deduced the problem being in the projectile blueprint and not the third person character
Please excuse the messiness / bad code, as I said v new to this lol
I feel like I'm just messing up the basic vector math...but I can't pinpoint it because I'm not great with vectors. If you guys can spot any errors, please dm or ping me!! Big thanks in advance, this has been quite the headache.. (sorry for taking up so much space btw)
Hi all - how would I set an enum from a button?
ignore that lol blonde moment (been a long covid19 brain fried week) just sorted it, answer my own question by typing it 🙂
Hey, if I do a MultiLineTrace, are objects added in the order that they get hit?
to the internal array that gets iterated through by a ForLoop, I mean
Seems the answer is yes
I think...I fixed it! I had the event on OnComponentActivated, now it's on EventTick and working great but I don't like that it's on event tick lol, i'll try and fix that now
Beginplay works I think! wooohoo! 😌
Just got finished doing base implementation of my stamina system too
Just cant figure out how to disable sprinting when the players stamina drops below 0
Could make a halt sprinting custom even set walking to whatever speed when stamina = 0
Idk your stamina system tho
Its very basic atm
Yeah I gotta fix the one I have or make a new one. Could do get stamina-> =0 -> set max walk speed 140
Do you use stamina as an integer?
float
anyone know why this is happening to helicopter? https://www.dropbox.com/s/4ztwyaozdmyg3jn/j7icgPkntu.mp4?dl=0
Something to do with its collision by the looks of things @rustic salmon
yeah Ive played around with those for Umm 3days now and still no good
Set spawn a little higher off ground
the helicopter is from Marketplace so the mesh and mechanics are solid so its something im doing
Maybe
Talk about Level Design, Static Meshes, Physics, and more.
@rustic salmon Youre gonna need to show us your collision settings, how the BP is structured
it works on an ordinary 3rd person model so must be something to do with my character
What does it have to do with your character if its the helicopter falling through the floor?
Well he said it’s only when he uses his character
both helicopters I just dropped into the scene
Change helicopter collision to simple?
The settings related to how your character loads things in the world?
If your floor mesh wasn’t setup correctly than your character would be falling through the floor as well
my capsule collision
mesh collision
both are/have been/were exaclty the same but still the coppers sink
its got me stumped for 3 days now
if i shoot the copper it falls and stays on the ground
Hm
Physics enabled?
There is your problem my dude lol
You can click on the underlined words of the error, the last words on each line , takes you to the node error, from looks of it , it has something to do with set vehicle
yeah cool, just it only does it with my character no errors with another charater
Maybe because it’s default reference is the other character
its default is first person i just swapped it over to 3rd, works fine with the ue4 character but mine it doesnt, mine uses the ue4 skeleton anyways
A question about widgets, I intent to make a simple store with buy/sell/exit buttons and I was wondering a few things:
- It's better to use multiple UI Widgets ? For example, one for buy, one for sell, etc. ?
- Is there a recommended way to compact everything into a single Widget ? I have been thinking of using the characteristics of "is Visible" in the buttons to make everything into a single BP
- For complex menus (inventory, character status, etc.) which approach would be better ? Multiple UI instances with an overall handler or a single BP that manages everything ?
yep nothing,
only those ones i posted before, just points to a couple nodes'
these ones
but like i say works fine with ue4 dude but not my dude
Theses are the collision setting for the copper but I havent touched those
Trying to figure out how I would check who the player was killed by.
I want to have a different outcome based on this.
At first I thought of uding DamageType, but all manner of people are going to be using different damage types. I need to check if the enemy is of a particular type, not what damage type
@heavy lion Could you use instigated by and get the other players, player controller. If it is multiplayer you could get there player controller and then the player state then get the name
Its only gonna be single player. I think with the instigated by I can check if the damage causer is a certain AI controller?
If you can get an AI controller then It should work, if not you could get Damage Causer and then just set that on apply damage to the AI itself
I cant find any examples of how to use the Instigated By output
Hi guys i am brand new to coding and i am creating a project for university. I have followed a tutorial to perfection yet to no avail. The blueprint i created is a locked door. You must have X keys to be able to trigger the door opening. It doesnt work as when i collide with the key my number of keys do not go up. This is the issue because i had my number of keys variable to be public and editable. If i write that i have 1 key the door does open. I have checked my key blueprint and i have stated that when you collide with the key Add 1 to number of keys. via the integer+integer. I know i collide with the key because at the end i also stated destroy the key actor, and it does. Can someone help?
Public/editable shouldn't matter cuz it only pertains to manually placing the actor in the level. Have you tried using breakpoints or print nodes to make sure the script on the side of whatever's holding the keys is actually executing?
If it is, in fact, executing and yet the value doesn't change, you might have to show us some of your BP (screenshots etc)
bro ngl im brand new to coding and i just have no idea lol ill show you some screenshots hold on
First picture is my key blueprint second is my levels
Scrap that second part and recreate it in your player BP
So the door is looking for just 1 key
@fossil crypt You would be much better off checking anywhere but the level BP for the keys collected.
You are getting a reference to the player character from the level which may not be valid on begin play.
You should do the check inside the player BP
the 'ironlockeddoor' is my box collider
So do i just copy and paste it from the level to my player bp
You can but the references wont copy
Okay ill try that
You want three actors. A key, a door, and a character
The door actor could check to see if the player has the number of keys required to open it.
But you could store the number of keys collected in a few places.
im just trying to copy and paste it into the players bp atm
Why? The character doesnt tell the door how many keys it requires.
The door tells the player how many keys are required
Oh i thought you said to scrap the part in my level and put it into my player bp
Nope
So i need to put it on the door bp?
Yeah. The door is in charge of knowing how many keys are required
This part
Yes
Okay ill try that
IronLockedDoor is a box collider not attached to the door is that fine?
sorry if im asking stupid questions i really dont know anything haha
That should work fine yeah
On begin overlap, cast to player character, from player character, get number of keys, compare that to number of keys required > Do something (Play Timeline on the door mesh and/or play a sound)
Ok. So on the begin overlap im trying to select the trigger but this is the only one coming up
Will this still work?
You dont need to do that
I have it selected in my viewport and this is the only one i can select :/
With your box collision selected in the components panel. Look in the details panel and you will see lots of green boxes with plus icons on them
Your collision isnt in the door BP?
nah
i think thats why the youtube tutorial told me to do it in the level bp
want me to link the tutorial i followed?
Doing stuff like this in a level BP is.... 🤦