#blueprint
402296 messages · Page 444 of 403
@spark robin can you give me an exzample
I've never tried doing it lol Noah, all I know is that I regret switching cameras for my player views, because I had to add plenty of extra code to make sure camera transitions worked well when they have different FOVs
@trim matrix WeaponActor with the camera goes into the circled red area.
Authaer, please check my question in multiplayer once you've sent Noah in the right direction
@maiden wadi im sorry ima noob would i put this in my main bp for my character or into the bp of the weapon
@spark robin I don't think I'll be much help on your multiplayer issue. I haven't been doing it much myself. I get the basics, but I haven't messed around with replication. But if I do understand it at all, where are you calling the CustomEvent_0 that's changing the bool?
@trim matrix Doesn't matter. Probably the character, but you can call it from anywhere. Character is probably a better choice since it's designed to handle input.
anyone who can help me? :/
@maiden wadi
@swift sphinx What you're asking for would be easily handled without casting with an interface. Is this for something like WitchIt?
@maiden wadi it wants me to cast to my weapon bp
Its in the event graph, the function is in the same blueprint as the custom event is
Yeah, but what is calling that event? It has to be called from somewhere.
(Which is a blueprint actor placed in the scene)
@maiden wadi yes
Yes its called when there are 2 players (or more) within my controlzone which are of different teams, the code is rather long, but I can show you if you like
im looking on a prop in the level and i want to switch to that (possess)
Its being called from the event graph as well
Heres my whole event graph: https://blueprintue.com/blueprint/5f9xs3to/
@swift sphinx Long story short, you can do this two ways. The first is create a master parent class that all of your static mesh actors are a child of. All of the children inherit a static mesh component and you set the value or actual static mesh of that component in the children. Then you'd trace out, cast the hit actor to that parent class, and if it succeeds, get that static mesh and set it where you want it. The other way is a little messy, but you CAN create an interface and implement it on every class and have it return the static mesh that way.
How can I convert a local rotation to world space?
Also heres the event graph in my widget blueprint (if you have time to read all of this lol) https://blueprintue.com/blueprint/ck6-k2_l/
@maiden wadi So this is what im trying but i still have no luck
i need it to reference the m4a1 ads
m4a1 ads (camera)
@tidal crest You can do the math for it, but quite honestly, save yourself seven hours of an excruciating headache and use TransformRotation.
@spark robin Still looking, just one point though. Using overlaps like that is risky. I'd probably write a checking function and use both for onbegin and onend overlap that just checks all of the currently overlapped actors. If there are more than one of a type, it's being contested, if count less than or equal to 1, not being contested. And use that to set your bools and call extra functionality before anything else. Otherwise you run into situations where three people can be on the point and if one leaves, it'll assume it's not being contested anymore because you called onendoverlap and didn't check that there's still two there, if that makes sense?
I have done melee combat a couple of times by now already but now I have a question. Is there like an "optimized" best way of doing it? So far I have just used capsule collision on the weapon and done things that way so I am curious as to if there is another way of doing these D_D
@maiden wadi No I can get around that from happening if I write the code on EndOverlap to check again who is in the control zone, if there are still 2 players of diff teams within the zone (after removing the exiting player from the zone), it will just remain contested
When you say you would write a checking function, you mean that it would just constantly check who is within the zone? I choose to use on begin and on end overlap like this to save on the performance
It's not constant, just once for each time either of the Overlap events are called.
@maiden wadi Thanks. Yes, I tried it already, but I think that I use it wrong...
I want to rotate the pitch of the mesh and it should work if I change the rotation of the actor.
@maiden wadi Oh yeah that makes sense, I might make it so they both run the same code later, I just need to figure out this replication stuff so I know I will actually get this finished before making any changes like that
The code is obv unfinished, Im not going to leave everything what you see as it is
Hi, I have a question. I'm trying to set a variable in an object class from another actor. But using casting I don't seem to be able to access the variables of any object class.
Is there a different way of doing this? Any advice would be greatly appreciated, thanks!
you dont set values of a class, you set values of an instance of a class
You can't change class defaults.
thanks guys, unfortunately the class is implemented in a way that I can't do that :S
I have a problem with an child actor, there is only a scene capture and a plane with (only owner see) ...but the plane is invisible to the scene capture... but both have the child actor as owner
@maiden wadi So I tried setting the IsBeingContested repNotify function to update a new variable in the widget (Image below), and setting that new variable to repnotify as well, where I just told it to print string, and interestingly now, the RepNotify for the new variable in the widget blueprint never runs, not even on the server (Or at least I never get to see the print string from it)
The new variable repNotify in the widget blueprint:
I don't know how server variables work with different classes. But I know that widgets generally aren't supposed to use server functionality. At least in theory, as far as I understand, you're supposed to do all of the functionality on the actor that exists in the server, and that actor replicates itself to the clients, and then the actor in those clients would update their own widgets independently based on what the server actor is telling the client actor. In all actuality, there wouldn't even be a widget being updated on the server.
@maiden wadi can i share my screen with you and you help me im still stuck
@trim matrix M4A1 ADS is the camera, and the GetCopy(0) is the weapon actor?
I dont know what the weapona ctor is
this is what i did for the first camera switch but the camera is apart of the same bp i didnt have to cast it anywhere
@maiden wadi
@trim matrix Okay, but the camera you want to move to is actually on another actor than the one the camera is starting on?
@cinder dirge Yo man i turned on gen overlap event for Fire actor still not working
@trim matrix What is the class name of the actor with the camera, is that the M4A1?
@hoary marsh Did you check your collision channels to make sure the components react to each other?
yes the class name is M4A1
What is collision channel?
@maiden wadi
@cinder dirge
Then what you have there should work. The only reason it wouldn't is if there are no M4A1 actors in the map. You should use that Get and ask if it's valid.
@hoary marsh The bits at the bottom of this picture
Your colliding components must be set to at least 'Overlap' each other. They both must be set to react to the other, only having one side set will not do
So what should they be
I have a problem with an child actor, there is only a scene capture and a plane with (only owner see) ...but the plane is invisible to the scene capture... but both have the child actor as owner Bug or did I miss something?
@hoary marsh That depends entirely on what object types they are
So it should be overlap for pawn?
That only describes one side of the collision, but yes your fire sphere thing should probably be set to at least overlap Pawn
@hoary marsh Which component is that?
@maiden wadi is ther e a way for me to get the components of one bp to another?
@trim matrix Casting, but the component won't help much unless your controller knows to set it's camera on that actor first.
that makes sence so how do i do that
@cinder dirge So where is the problem according to ur intuition
@hoary marsh I would normally put the blame on incorrect collision settings for a failure to fire overlap events
I swear this is the most frustrating issue I had this week
Maybe its something in the details panel for either my widget or blueprint that I need to change?
@maiden wadi i cant get it to create a reference to camera actor
@trim matrix Show me the components tab of your M4A1 actor.
@maiden wadi
@maiden wadi Hey dude , what do u think r the possible reasons when my pawn and a sphere trigger doesnt fire overlap events , when genoverlap events is turned on and collision channels r crct
@trim matrix And where are you spawning the M4A1?
@hoary marsh I dunno. Show me both of the collision channels?
on the map as weapon i can pick up @maiden wadi
the camera is socketed to the static mesh so that it stays with the weapon
where is collision channel for thirdpersoncharater?
@trim matrix Do this where you're trying to set the camera view, and see what it prints.
@hoary marsh Mesh or Capsule
Oh i see now
what the hell , when i turn my capsule to OverlapAll he just falls down to hell
Which should i change?
@maiden wadi im getting a not valid
@cinder dirge @maiden wadi Which should i change mesh or capsule
@hoary marsh Because it has no block collision. Leave the capsule on Pawn.
@trim matrix Then you don't have any of those actors in the level anywhere.
Hey guys, as a beginner I've dug myself a hole by putting a lot of latent "script" nodes (mainly Delay) in GameMode.
Now i can't suddenly stop the "script" as the execution of anything after a Delay node will still happen.
Is there any way to disable/reinitialize a class? Stop ticking for a tick?
hey can I change item's class default values from a bp? if so how?
@hoary marsh The volume is set to the OverlapAllDynamic, right?
@terse harness ClassDefaults cannot be changed. The only way around something like that is to keep changed settings somewhere and write your code so that if they exist, spawn the actor with those settings. Highly not advised though. It adds a lot of unnecessary work.
@hoary marsh It's not an either-or thing. Each must be set to overlap or block the type of the other
@maiden wadi So i left capsule as pawn and mesh as overlap all still its not colliding , or maybe should i change Get Player Pawn to Get Player Character?
Start by seeing if you can have them physically collide with each other
@hoary marsh Is the volume set to the OverlapAllDynamic? Is that what you were showing earlier?
But still not working even if i change it to Get Player Character
Yeah the fire with which the pawn is colliding is set to OverlapAllDynamic
@hoary marsh Show your event
@hoary marsh What do you mean when you say 'not working'? What code is running?
@maiden wadi ah ok thanks, I'll try and find a different system then
Get Player Character should have nothing to do with an event firing or not
Is there a node or something to loop an integer back to zero if you increase it pass a given boundary?
For instance I want to increase an integer in the range of number of elements in an array
@viscid valve The % operator
@maiden wadi this is my event
@viscid valve https://en.wikipedia.org/wiki/Modulo_operation
(but you can find it as % in blueprint)
Not sure if it would be any quicker than just using standard bounds with an if statement or similar
Was wondering if there was a specific operation that UE4 had just because there's nice nodes for these things sometimes but wasn't sure what to search
@hoary marsh Did you post something?
There's none that I'm aware of
Okay I'll do it how I usually do, was just worth checking
You could write yourself a little macro to do it
True, I'm not that worried
@nova pagoda I'm not aware of any sort of stop for a delay. Not without putting branches and such between them with a bool you could set to false if you wanted them not to fire.
@nova pagoda That is why Delay nodes are the devil
Could you swap them out for Timers?
You can cancel those
@nova pagoda I'm not aware of any sort of stop for a delay. Not without putting branches and such between them with a bool you could set to false if you wanted them not to fire.
@maiden wadi Yeah I'm trying to avoid that one as there's quie a few :P. I'm thinking putting all that into a component and disable/destroy it when need it. But the pain with replacing/readding variables and refs might be a nightmare
@maiden wadi ok im switching to the camera now using SetViewwithBlend but i cant cant get it to switch back to my original follow camera
replacing with timers would help as well, yes but again that's just manual work. Probably unavoidable in the end. thanks for the help guys anyway
What is the script for? What does it do? Might be able to help reorganize it without the delays. Like Jette said, they're not that great. I haven't found one honest use for them outside of lazy testing circumstances.
@maiden wadi Can I set the widget as a component of each player character instead, and define its world space location?
Maybe that will let me get around my replication disaster
^ indeed. I can't remember the last time I had legitimate use for a Delay
@maiden wadi it's tutorial. do smth -> then do smth after 2 secs. it was 100% avoidable. I'm learning
@spark robin do you mean 3d widgets ?
Yeah
@trim matrix You need a reference somewhere to the character that you want to switch back to.
yeah you can
Oh, how?
try looking for a Widget when you try to add a component
its already there
and you can set its class in the component
@nova pagoda Ah, gotcha. But yeah. SetEventByTimer is amazing, and Timelines aren't the worst either if you need stuff like curves.
@trim matrix Yes well how would I give it a world space location and attach it to my actor in the scene?
@maiden wadi or like i'll try to attempt now just for science - put the script into a removable class. wait that won't stop the execution since it's still in the memory? help?
(Can I do that?)
@spark robin just create an actor that only has this component and work around with it
and attach the actor instead
You already have one of those on the capturepoint actor though, don't you?
You mean that I would add the component to the actor I want it to be attached to instead directly from the components menu? @trim matrix
Yes @maiden wadi . My question was if I could assign the widget as a component to my actor instead, and then give it a world space location.
Wdym by put a widget in it? Like, the 3D widget is supposed to have a static world location
But why do you need to attach it to the character if you want it in world space?
wdym ?
no its not
it doesnt need to be static
@maiden wadi OMGGG THANK YOU!!!!! I WAS ABOUT TO GIVE UP!!!!!!!!!!!!
This is what Im looking for a result
A floating 3D widget somewhere in my scene, that you can walk around, and its position will remain
I've already done this here using a actor particularly for the 3D widget, my question was if I could have this widget be a component of my Third person character instead (to get around a issue I've enctountered with my current way of doing it)
@trim matrix Got it all sorted?
@maiden wadi yes i did thank you sooo much. I just learned so much too thankyou for dealing with my noob self.
@trim matrix For the record, I strongly advise learning about references and passing them along to other instances instead of using GetAllActorsOfClass, but for learning it's all good.
@spark robin What's the issue you've encountered? Can we maybe help you fix that? The workaround you're proposing seems likely to cause other trouble down the road
@maiden wadi will do thank you!
https://discordapp.com/channels/187217643009212416/221799385611239424/699185023873581137 I cant find a way of replicating variables inside of my widget component
I've tried plenty of things, if you search for my latest messages you will find out more about the topic, I will have to brb for a bit, ping me if you have any ideas of whats going on and I will read it once Im back ❤️
Like I said before, I strongly advise against replicating stuff in widgets. They shouldn't be used in server stuff. Just replicate the stuff on the actor and let the client side widgets show what they need to from the replicated stuff in the actor.
Widgets in general should never be used for functionality. They're just there to receive input and display information.
@spark robin Widgets themselves don't know about where they are in the world (because they are designed to just be on a screen - a Widget is never aware that it's being used in a WidgetComponent) and they're not set up to have an owner like Actors are... things that are important for making decisions on replication
As @maiden wadi said, put the replicated variables on the thing that owns the widget component and use the widget as a dumb component for display only
Hey! Kind of new to unreal so sorry if this is a common question but I've come up empty. I've got a cockpit mesh that I'm turning into a blueprint. I'm trying to figure out how to make the joystick in the cockpit moveable. I've got a limited understanding of dynamic mesh interactions. I see that there's a bone for the joystick in the skeletal mesh (there is also a physics mesh and static mesh included), and i'm not sure if I should be exposing that somehow to the user? Or should I edit the asset and make each item I want to move a child component? Ultimately I want the user to be able to grab the joystick and pilot the ship, but I'm having a hard time figuring out how to do that. Thanks in advance.
hey, is there a way to get mouse acceleration in a node to feed into a controller input?
@upper lark You can use an Animation Blueprint to accomplish what you want
Animation Blueprints are visual scripts that are used for the creation and control of complex animation behaviors.
The node at the top of this page (Transform Bone) in particular will be useful to you
Animation nodes that enable direct manipulation and applying solvers to the bones of the target Skelet
Thanks @cinder dirge ! I'll definitely investigate. I'm assuming it doesn't matter that I'm doing this in VR and the user could push in any direction?
As it lets you set the rotation of a bone
Made a Actor with a simple plane and a scene capture component, I have set "only owner see" on the plane, but the scene capture does not see the plane. Is there a other way, or did I miss something?
PERFECT!!! @cinder dirgete ++ you have no idea how grateful I am haha. I've been going crazy trying to figure out how to do this.
Indeed, VR and non-VR work the same for anim blueprints
You're very welcome 🙂 Let us know how you go with it!
@odd veldt A scene capture component can't be the owner of a plane. Only an Actor (normally a the player's Character) can be an Owner
You will probably need to toggle the visibility of the plane and do a manual capture with it visible, before disabling visibility again for the main render. Alternatively you could perhaps make the player's Character own the plane and set it to Owner No See, but we would need to know a bit more about what you're trying to achieve to determine if that will work
🙄 the plane and the scene capture are part of the same actor, so both have the same owner... its like first person weapon models (the plane) but using a scene capture and not a standard camera
@odd veldt Scene capture actors don't work that way, they're not like regular cameras with respect to ownership
This is why. There is no view actor during a Capture Component render
so, there is no way to hide the plane to the player?
To the player?
Or to the capture component?
There's an important distinction there. The capture component is not the player
only the scene capture should see the plane
Does the player's Pawn own the plane?
no
its a child actor to the player, and it should render the whole time
I want to use it to capture the light color at the player location to use it in a widget
"player stands in blue light" widget is blue
A child actor to the player pawn? That could be made to work then I think
Hmmm
If it were a component directly
Then you could use Owner No See to hide it during the main scene render
yeah... but this does not work in MP
Ah
But
Does it need to be replicated?
There's no way you would need it on every pawn on the client-side, right? Only the local player's one
Since it's basically part of the UI
Could that + Owner No See suffice as a solution?
Why wouldn't it work in multiplayer? If you spawn these on the client, they only exist on the client. In theory if everything else is accurate with the client/server, the widget would be correct as well.
Unless the player needs to be able to see the colour planes for other players too? What's it being used for?
Hello! I am new to UE4 and curious to building a trading simulator with candlestick and line charts. I am trying to figure out the best way to do it. Overall I would like to have multiple charts on the same level, but I will start with one. So how would I spawn and place and scale say 1000+ objects in a Blueprint? Ideas or links would be helpful.
@trim matrix Are you looking for 3d or flat 2d style?
Hi all - How/where would I set up a dynamic material instance on a mesh for meshes that I am swapping out in game? i.e. the mesh does not have a blueprint and is being swapped via a widget as a multiple choice thing
@maiden wadi Either to get started.
@trim matrix I am intrigued by your project - in another life I work on data visualisation from time to time. If you had less objects in mind I would say you should draw your graphs via a canvas to a render target, but I'm not sure that will scale to thousands of them. Same question as Authaer about 2D or 3D. I suspect some instanced mesh + material fanciness can be employed to draw them efficiently
@trim matrix Do you need axis labels and stuff, or is it just the lines or candles you need to render?
@stable plume Swap the materials at the point you spawn the mesh... surely you have some code running that does the spawning/swapping?
Eventually, the axis labels will need to be there for reference purposes.
Ah cool - so that is ok to do - just before I set static mesh in the widget hover? @cinder dirge
Just not sure if I should be using a Level to place all of it in, or it's own BP if I want to have multiple charts on a level.
@stable plume Before? You probably need to set the mesh before setting materials on the mesh
@cinder dirge @maiden wadi Yeah I mean this sounds nice, and indeed I want to do all the logic in the actor and have as little as possible stuff going on in the widget, but like currently the way Im sending variable data from my actor to the widget component is by calling a custom event in the widget event graph from my blueprint actor, that has a pin with a reference to itself (the blueprint actor), which I then tried using to drive a widget binding, but I only get that binding to update on the server, never on the client devices, no matter what method I seem to use lol
Like, could you come up with some working example of how I would drive a widget binding with variable data from my actor then?
Edit: By working, I mean a method that will actually update the widget with new variable data even on the client
@trim matrix That's a workflow thing more than anything else. There are some advantages to be had in using an Instanced Static Mesh component, which lends itself to everything being in one blueprint. That said, I think I would start by having a single chart per BP to get a feel for how it works and plays, and look at making it fast once you know a bit more about precisely you want to do with it - otherwise you run the risk of limiting your flexibility with early restrictive technical decisions
@cinder dirge doh! - yes of course - thanks 😄
Sorry @maiden wadi The second i sent u a message something happened with the internet , got it up rn. So this is it
And @cinder dirge So basically this event doesnt run ,
@hoary marsh All good. But first of all, disconnect that branch and put a print node there.
Make sure it prints, start there.
@hoary marsh Does the event not run, or the branch not pass to True? Because they're quite different problems
but like currently the way Im sending variable data from my actor to the widget component is by calling a custom event in the widget event graph from my blueprint actor, that has a pin with a reference to itself (the blueprint actor), which I then tried using to drive a widget binding, but I only get that binding to update on the server, never on the client devices
@spark robin This sounds like something we can help you solve. Can we see the code for that blueprint event?
@cinder dirge Thanks for the info.
@cinder dirge I've tried all of these
@trim matrix You're very welcome 🙂 Feel free to hit me up if you want optimization help later on - I quite like data vis type stuff
This is the binding function itself
@cinder dirge Thanks. I am also interested in Data Vis. Ever heard of Bad VR? They are into doing XR with data.
Several questions @spark robin . Starting with why do you have a cast in the bottom image? The Owning Control Zone should already be of the correct type
(Ive tried using both of those variables in the screenshot above, just to see if it made any difference using local variables insead of casting to fetch a variable)
Because otherwise I can not get the IsBeingContested variable
@trim matrix I have not! But having just googled them they seem like they're doing cool stuff 😄 I shall look into them further, thanks!
@spark robin What type is that variable?
Its a boolean
I mean the Owning Control Zone one
object
When the widget gets created, one of the custom events in the first screenshot gets triggered from the blueprint actor, sending over a object reference to itself, which I then use to cast in my second screenshot
I've also tried having the custom event getting called every time the IsBeingContested variable gets updated, wont make any difference
Every piece of code in that flow knows what type the reference is, so you shouldn't need to use 'Object' for it
Wdym?
Well the parameter that you pass into your Widget can also be of type ControlZone reference
That way you don't need any casts
Since you're just passing around a ControlZone everywhere
Oh okay, well I didn't know that actually
That's more of a code clean up than anything else - but might make your code easier to think about
It looks like you're using replicated variables for the ControlZone? That won't work very well since Widgets aren't designed for replication. Have you tried using a not-replicated variable and setting it on every client?
I presume the set happens on BeginPlay?
At first I didnt use replicated variables at all, but where/how do you mean I would set it on every client?
I've tried this (but before that error was a thing, Im changing everything to controlzone instead of object rn) :
I just mean in BeginPlay, which runs on every client
Oh, well no
Yeah I connected the BeginPlay to call those custom events in the widget
WIth a reference to self
I went looking for it eh, but I've changed it now, I can recreate it tho
Ah
That's not quite what you want
You don't need that server event at all
Just go straight from BeginPlay to that Cast
Okay
Cool, better
It wouldn't have run on the clients otherwise - being a server event
Ok you should be in pretty good shape now
That variable isn't replicated anymore, right?
Which, the IsBeingContested in the blueprint actor?
Nope, the variable in the Widget
The Control Zone one
IsBeingContested should indeed be replicated
Yeah I set the var in the widget not to replicate
Alright, I will need to scan through the code a little bit first, I've messed so much with everything I just need to make sure its working with what we setup now
Thanks a lot @cinder dirge You've saved my day lol
(Or well whats left of it, I've seriously been wrestling with this since it was morning)
You're very welcome 🙂 I'm glad you got it sorted
Right, now I will do the same thing for the other bindings and get my Control Point up and running in full glory
Nice! Those should be easy now you have the hard part taken care of
Yeah
hmm i i have a class defined in c++. how can i access the properties in blueprint
class THOUGHTFISHCOALAPLUGIN_API UCoalaStreets : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category="typ") FString typ;
UPROPERTY(EditAnywhere, Category="data") TArray<UCoalaStreet*> data;
};
How do I programmatically add widgets/components to a UI using graphs? I have a list of strings that I want displayed in a grid, and I want to highlight one of them by index... The best way I could think of to do that is to have a separate text box for each string, and color the one I want highlighted individually, I just don't know how to make a separate text box for each string. 🙂
(P.S. I'm using the Ark Dev kit, but I don't think they changed much about UIs... I guess peoples' help will answer that question 😛 )
@spark robin Show us what it looks like when it's done though 😄
hi
Cool!
please i beg you it's a very simple question but which node do I need to use for transition ?
betwwen 2 animations in the animation blueprint
@pallid crescent That's more of a question for #cpp , but you need to set your UProperties to be BlueprintReadOnly or BlueprintReadWrite. See this page https://docs.unrealengine.com/en-US/Engine/Blueprints/TechnicalGuide/ExtendingBlueprints/index.html#readableandwritableproperties
Technical guide for gameplay programmers exposing gameplay elements to Blueprints.
I know it's something like Get Relevant ANim Time
but i didn't find how to link this block
Is it possible to convert a static mesh object reference to a static mesh component object reference? I am trying to change a static mesh attached to an actor
@cinder dirge alright cool! thanks dude
@maiden wadi @cinder dirge Yeah man it prints on the screen
How can I get mouse acceleration to plug into controller input?
I want to rotate the pitch of the mesh and it should work if I change the rotation of the actor.
How can I convert my relative/local rotation to world space.
So from OnComponentBeginOverlap I connected to Print Text trigger
And it printed it
But another doubt
I thought BeginOverlap will keep executing when the pawn is inside the trigger
I designed my damage as when the pawn is near center damage is highest and when on corner it is lowest
How to do like that
Cuz BeginOverlap executes only once
@chilly moon I think you should be able to do that using a list view, they include selection mechanics
@prisma dragon Normally you transition between nodes by transitioning between states in your anim state graph. Those are controlled by the transition rules
Data list panel?
@prisma dragon See here https://docs.unrealengine.com/en-US/Engine/Animation/StateMachines/TransitionRules/index.html
@chilly moon One of these
Or perhaps a Tile View as you said you wanted a grid
I think Ark has existing tile views you might be able to copy? For the inventory screens etc
Alright, this isn't appearing so I'm gonna head over to the Ark dev kit discord to see what they have to say. Thanks Jette
Is it possible to convert a static mesh object reference to a static mesh component object reference? I am trying to change a static mesh attached to an actor
@proud zincNo, you can only convert the other way. Why is it that you have a SM object but not its component?
An SM object isn't attached to any particular component, it's just a reference to the type of mesh
@chilly moon Have a look at some of the existing stuff too. The ark devkit should include good precedent for grid views and I believe the widgets for inventory screens etc are included and viewable
@cinder dirge I'm trying to make a procedural level generator. Right now the way I have it structured is there is a static mesh actor that is spawned. I want the user to be able to easily change the model that they use
@quaint portal Do you want to calculate mouse acceleration? The figure itself is normally abstracted away by the operating system/engine, I'm not sure if there's a way to retrieve it. You could though calculate the change in mouse velocity between last tick and this tick. What do you want to use it for?
@tidal crest What you have there looks more or less correct. Is it not doing what you want it to?
@hoary marsh OnComponentBeginOverlap happens when the overlap Begins. Sometimes you will indeed get multiple events, but it's certainly not every frame the objects are in contact
@hoary marsh On begin overlap you can add the overlapping object to a list, and remove it again on end overlap
I also suspect that the reason your previous code wasn't working is because Get Player Character was returning nothing. You might like to try Get Player Pawn instead.
@cinder dirge Wab OnBeginOverlap I make a boolean to be true and On end overlap it to be false and in event tick if that boolean is true run the damage code?
Will that work
@cinder dirge Ok will try get player pawn then
Yes that should work nicely
How to delete the lines between nodes
Hold Alt and click them
@tidal crest Ah I see you're trying to add to rotation. But you're starting with a world rotation adding to it, then converting it as it it's a local rotation
@cinder dirge No, it rotates the mesh much faster on X/Roll when I change the roll of the actor.
@tidal crest I think you want to add to the local rotation and also store the local-space rotation, but convert it to a world rotation just before using it in SetWorldRotation
yes
At the moment you're storing a world-space rotation, which you can't then add to like it's a local rotation
I have it, thank you 😉
@proud zinc Ah! A static mesh Actor, not a static mesh Object! In that case, yes! Absolutely! Just do this
@tidal crest Wahoo! Perfect!
😀
@proud zinc Static Mesh Component being a property on Static Mesh Actor
Anyone know why this isn't working? I think it's pretty straight forward, but I'm trying to create a dynamic widget switching system where you can just select the 'tabs' (buttons that control active widget index) in instances. Here are some screenshots:
@cinder dirge I want it for smooth camera movements in my horror game. If player stands still then starts moving mouse or quickly stop the mouse I want it to be a little bit smooth. Not enough to be annoying but enough to make it feel more immersive
@quaint portal as long as you can toggle it on/off in settings
@cinder dirge So i m good now with executing the IsInsideTrigger part , now for invoking the Fire Damage function in thirdpersoncharacter should i again cast to tpc and then invoke the function or is there any better ways
you can just use a spring arm + camera rotation lag for that
@cinder dirge Oh ok thanks!
@cinder dirge pick me! pick me!
@quaint portal Sounds a bit like (presuming you rotate the camera with the mouse) you want to use some sort of RInterpTo on your rotation
@quaint portal Or just use a Spring Arm and enable a bit of Rotation Lag
Nvm @cinder dirge I think if i could just get the pin from the same Cast to TPC it will work
good idea
Ah as Shogu suggested 🙂
You're next 🙂 Promise
Alright thanks!
2d arrays still not a thing in blueprints, or am I looking at outdated search results?
@quaint portal btw if u use the spring arm and you want a first person view, use a target length of 0 and set the spring arm transform to that you previously had for the camera, then zero out the camera's transform.
@hoary marsh UE4 includes functions for damage. I'd probably look at using those as it will make it easy to integrate parts together. I think your damage is radial? There are functions for Point damage too, and you can make yourself a damage type for Fire Damage
Ok onto you Shogu
Does someone know how to get radius of sphere?
Ok
Oh i see will look into it @cinder dirge
learn urself some algebra
r = sqrt(v/pi)
@cinder dirge Should I post my question again? Don't wanna spam.
I'm reading your pictures
A little unsure as to which part wasn't working
And also wondering why the use of interfaces - your buttons can't use real events?
So children of the widget switcher are 3 borders with varying colors (white, gray, black).
i thought an interface would work better, otherwise id have to use delegates and stuff, right?
Your buttons look like they all do thing that you know in advance though. Is it all completely dynamic?
All I'm doing right now is trying to select the buttons which set the widget switcher to the corresponding index (1st button sets widget index = 0, etc).
I can work on making it all fully dynamic later, this is just the start.
Sure. I think I would use overridden functions rather than the interface, or just directly handle the events in what I presume are sub-classes? but there's no harm in the interface either
Is the part that's not working that you can't get the correct index?
hm quick question: in a sidescroller, how would you go about making the character or a component of it rotate towards the mouse on screen?
the index isn't updating
So I have an object reference and an array of object references. I'm trying to find that object reference's index with respect to the array, if it is in the array. Am I going about this the right way?
Because I should be able to just take that index and feed it into the active widget index for the widget switcher, and it should update just fine.
@zealous moth This might help
of the texture?
multiply it by a vector 3 parameter
@zealous bear That seems like it should work. If you inspect the incoming reference while at a breakpoint, is it what you are expecting?
this adds a tint
Ah
@cinder dirge I know about that one however it will work in 3d space; i want to constrain it in 2d so wherever the cursor is on the screen is good enough
@zealous moth Just ignore the unimportant component of the vector, you can make a Vector2 out of the Vector3
Nothings happening. Either I have a problem with debugging, a problem with the reference not coming in, or both.
@zealous moth I'm not experienced at 2D stuff in UE4, but presuming your word is in X and Z, this should work
(I just split the pin I referenced before)
@zealous bear Nothing at all? How about a breakpoint on the click event itself?
Ah
(which is from the interface)
yeah i was just gonna check
huh, not only is the breakpoint on the click event successful, it updates the widget too
but only with the breakpoint active
Ah
i just happened to be expecting the gray border widget
Blast, tricked!
something wrong with how im calling interface functions, perhaps?
You do hit the breakpoint, though
yes
It looked standard-ish. It did seem like overkill though... you might as well handle those events in the subclasses, it's not all that different from implementing the interface events
@cinder dirge i want to do the opposite though. I have a 2d space that is the viewport. And in using the convert mouse loc to world space node, I create a 3d vector. Now all I want is to face that vector
like i said just a prototype atm
In your example, you take a 3d hit and convert it to 2d
@zealous moth Oh! Then that's what I gave you the location of in my first picture
@zealous moth
again, almost but that is 3d to 3d; meaning if there is nothing to hit, it will default
im so confused
If there is nothing to hit... well in that case you need to decide what to do
No code in the world will help you
Breakpoint for the interface call of the click event is firing in the first screenshot, but the event side isn't
So your Button in the 1st screenshot is of type BP_WidgetSwitcher?
Why is a macro library that extends UObject not usable everywhere?
no
this is all thats in BP_ButtonDynamic (the first screenshot, inheriting from Widget Blueprint)
It's the BP_Menu that contains both the BP_ButtonDynamic and BP_WidgetSwitcher.
Sp BP_WidgetSwitcher is a BP_ButtonDynamic?
no
BP_WidgetSwitcher inherits from Widget Switcher
Button_0, Button_1, and Button_2 in the BP_Menu are the only instances of BP_ButtonDynamic
nothing inherits from BP_ButtonDynamic or BP_WidgetSwitcher, they just have instances
How does the call against Self in BP_ButtonDynamic work then? Like how does it call any code if you don't have any subclasses?
What do interfaces have to do with subclasses? I don't think I am, but am I using them completely wrong?
You have handlers directly in the graph then?
I think your setup might be somewhat overcomplicated
rly?
Ignore everything in BP_ButtonDynamic except the OnClicked (Button) and EventOnClicked.
I call an interface function that sends a reference to itself (the button that was just pressed).
This should come out the other side in BP_WidgetSwitcher and set the active index to the corresponding widget.
Its this one:
The only EventOnClick I have seen in in BP_WidgetSwitcher, which is not a BP_ButtonDynamic, and so a call to self on a ButtonDynamic within BP_ButtonDynamic can never end up calling a BP_WidgetSwitcher
I think perhaps you're thinking that interface calls work like event dispatchers?
maybe, but i rly dont think so
let me show you the interface
reference is a custom input for the function
Yes, but how is it that a call to the interface against Self on BP_ButtonDynamic can end up executing code inside BP_WidgetSwitcher?
How does execution pass from one class to the other is my question
you dont understand how it does, i dont understand how it doesnt lol
It can't
just a sec
In this series we go through how to add the functionality to inspect items that you are holding, revealing details about said item.
In part 2 we add the ability to pick up the item and add it to the player's hand.
Support me on Patreon and get access to videos early, join ou...
it works here question mark
3:00
I think there's a misunderstanding about interface calls going on perhaps, particularly about that Self reference you're using. A call against an interface function on Self can only ever execute code that is in the current blueprint or a subclass of the current blueprint. It can't jump to an unrelated blueprint, interfaces don't have dispatch functionality like that
im not trying to call against an interface on self, im trying to send the self reference out
im gonna look up the documentation on interfaces
ahhhhh
Is possible to blend between animation sections in anim montages ?
From your image:
Huh? Of course the target of an interface call is an interface
But you can use any object
The call will just fail if it doesn't implement the interface
I would recommend doing it again but start with direct function calls
A dispatcher will only further confuse things
You don't have that many types
And it will be faster to get it going without the added complexity
Once it works, in order to extend it, you could think about bringing the interfaces back. But given that your interface was just a copy of existing widget events, I don't think it was really adding anything
but then ill have to select the widget switcher for button instances, as well as button instances on widget switcher
@pallid vector You can't. You can change it on an instance in the world by holding Alt and clicking a location. In a blueprint, you can use a Scene node as a mesh's parent in order to then use the mesh component's Location property to move it around
@zealous bear Congrats!
@pallid vector You can't. You can change it on an instance in the world by holding
Altand clicking a location. In a blueprint, you can use aScenenode as a mesh's parent in order to then use the mesh component's Location property to move it around
@cinder dirge thanks
you never know when you're actually a complete fucking idiot lol
if i change in blender it can be an option ?
@zealous bear This stuff is hard to get your head around, and you were trying to do quite a lot at once I think. Nice work getting it going!
@pallid vector Absolutely
big part of it is my ocd, wanting everything to be perfectly organized and optimized
@cinder dirge thx so much for the help!
@cinder dirge is there a way to automatically have the 'caller' sent?
would anything i dont know about (like event dispatchers) do that
@zealous bear You're very welcome. And I get it 🙂 I try to remember that I'll always be able to do a better job of organising and optimizing after something works than before, because all the required information is available then, and there often turns out to be a better way than what I envisaged at the start
Hey. What would be the best way to prevent my player from spam firing arrows? On pressed input a float is charging up the arrow's speed, while on release it releases the arrow. I tried to do a delay before the charge-up to make sure the player actually draws the arrow before he can fire it (otherwise it would just drop dead to the ground if you spam-clicked), and I made a delay at the end of the release making sure you can't spam it. However, I would prefer to make the player unable to fire the arrow before the bow is fully drawn. I guess I could make an anim notify on the bow since I'm already casting to it and check if the bow is fully drawn or not, if true release the arrow?
bool
if you want something like a min draw, you could use a bool when start drawing to make sure you cant draw again and on release if min draw is not reached do a bool that hasbeenreleased and on draw charge if mindraw is reached check if hasbeenreleased is true
so on release set both of them to false
Thanks, I will try that out 🙂
what happens when you do Set View Target With Blend on an actor with multiple camera components? How do you control which camera gets activated? Is there an alternate way to activate cameras besides this function?
Btw; I'm attaching my hand to the bowstring during draw, but the hand over-reaches to fit its hand to the bowstring in the draw's first frame; how can I make the hand attach to the string bone at a point where it wont stretch the arm mesh?
As seen here:
@pulsar moss I think only this and possessing pawns
@mild pine probably rework the animation
you could also do some ik stuff in the animbp
never did that though
Well, almost got it...
Problem is this offset
it's driving me nuts
it follows the mouse but has that slight offset...
@zealous moth I'd propose using a plane at the Z vector you're wanting the mouse at. I've never had much luck with using MouseToWorld without it.
Oh, I didn't look at the upper part. Is this topdown style?
sidescroller
so the Y and Z axis are the right and top
which adds on to my confusion
Is that X in world space? Like, running to the right would be adding to the actor's X location in world space.
pfffft.... ok lemme get you a rundown
world uses Y an Z
mesh and capsule uses Y and Z
Sphere uses X and Z
you need to rotate your mesh
the... sphere mesh?
it's the default sidescroller though; always uses Y
hm... could change the sphere axis
lies, deceptions
i know the feeling... yeah that's an additional mesh i use as a pivot
feels like flying a kite in rough weather... it's all over the place
so i need to rotate the sphere on its Y axis only based on the angular difference between its normal (forward) and the position of the mouse on the screen in world space as a vector
@zealous moth Try something like this. The PlaneNormal needs to be changed to 1 on X or Y, dunno which in your case, and Z needs to be 0.
@trim matrix Yeah, that is all IK stuff in Anim BP, the attachment etc. The bow uses a different anim than the player mesh so I had to go for IK. Im trying to find a way to set a boolean that would allow me to trigger the hand attachment on the string after like 0.2 sec after the draw begins, so it doesnt stretch, but its tricky hehe
whats the blueprint equivalent of #if WITH_EDITOR
I only want this key to fire if it's in an editor version of the game
@mild pine there is blendposes by bool
but you probably might wanna change some sort of other parameter on switch not a whole pose
maybe use an anim notify
Halfway down there is a mention of With Editor in BPs but I can't find it. Even with context sensitive turned off
Build powerful visual scripts without code.
there isn't one
I guess I'll just make one? So weird that post showed blueprint nodes "With_Editor" and they also talked about "IsShipping" and yet I can find either
Even linked a picture of the node being used...
does anyone know how to get specific child of grid panel ?
there is get child at node but its only with index
how can I get a child of a grid panel by specifying it`s row/ column
this is annoying lol
do I have to make a for loop for that
#umg :d
and #old-rules @trim matrix don't post the same question in multiple channels.
yeah sometimes I cant make sure which one to post
thats why I duplicate its k wont happen again mb
yeah but it is a specific UMG issue tho
anyways will try better next time, do you have any tips on this ?
Anyone know why 'delegate' shows up as if it were a variable, but can only be used as a parameter?
show us
i've got a character with yaw and pitch input with mouse but when i put a camera on the character i can't look up or down. why?
set bUseControlRotation = true on your camera
if it's a character it should already have yaw enabled, that's all you have to do
is that found in details?
cause all i can find is use pawn control rotation which is already enabled
Check that 'UseControllerRotationYaw' is enabled on this ('yourcharactername'(self) in components panel), though it should be enabled by default. If it still doesn't work, send a screenshot of your axis mappings (LookHorizontal and LookVertical is what I usually call them).
that worked. thanks
np
when i was starting out in bp i would just watch tutorials about setting up mouse and movement input over and over again until i understood everything and could do it from memory
yeah i tried that but the ones i found featured already made characters :/
from ue4's presets
Hey everyone! In this let's create video, we'll create the foundation for all future Let's Create episodes. I hope you enjoy this video and I hope you're excited for the future of this series, let's learn Unreal Engine 4!
Support me on Patreon: https://www.patreon.com/matthew...
In this UE4 tutorial we'll learn how to create a first person controller from scratch using C++!
Most people create their character's control using blueprints, but I personally think that's a poor practice.
Why is that? Most axis nodes act just like event ticks (meaning that...
thanks... again
np
go to the left hand side of a blueprint editor and click '+' next to macro
I'm assuming that it means 'IsInAir'. If you're using a character, you don't need a macro. Just use the pre-existing 'IsFalling' bool getter.
Quick vector question, how do you restrict a vector from going into a certain direction? The effect I'm looking for is like when you try to walk against a wall but you slide along it because you can't go through it
Didn't get that effect with multiplication or subtraction
Such as this, red line is the wall normal, blue arrow is player input direction, purple is the resulting restricted movement vector
Now that I really think about it, multiplication should do the trick 🤔
Maybe I screwed it up somehow
Hey. I'm making a space scene. So, right now my basic controller can look all around, but of course can't like turn all the way back when he looks up (it stops when he looks up). What's the best way to allow the player to sort of look up and roll back to their position freely if they'd like instead of it stopping the player when he just looks up? Not sure if I make any sense lol
(further clarification - it's a space station, and I need to be able to allow the player to basically flip/roll if they want to)
why is it so difficult to update values in a struct? what am I missing?
Not sure if this is the right place to put this, but I'm trying to allow a player's character to follow a spline, but with some wiggle room to the left or the right. It's a highway, and I essentially want the player to be able to move side-to-side and lane-to-lane, but still generally heading along the path of the highway. I'm not sure how to clamp the player's position along that "axis"
@late cave cause Grid is passed in as copy
not a reference
so you are applying changes to a copy.
This is the highway layout, will explain more in one second
The spline runs along the center of the road (Red line), and if the player does nothing to steer for the whole time, they will follow that red line for the length of the road. However, they can steer left or right and will continue to follow roughly the same line, except moved over by that much along the road. All along, they should not pass outside of, say, the yellow lines
I post here because at present I am using blueprints
Hey guys. What's the easiest method to take a skeletal mesh with dismembered body parts and make those parts react to a hit, i.e line trace? As in I want to break off an arm, by instance.
Swap out the body part and simulate physics?
@worthy frost I think this is what I was missing...
In a component on BeginPlay, I'm binding an event to OnDestroyed of its owner. When owner is destroyed (which it definitely is), the event doesn't fire. Why?
gonna guess you get an error pending kill?
most likely it is already deleted and your bound event did not see it
I would use a message/bpi instead
Does anyone know how to spawn a custom mesh (not the pawn) on mouse left click?
I want to make like a little icon showing where the player has clicked
Tried the decal option but it doesn't look good
and the reason why I want to be a mesh
@feral estuary You can spawn a new static mesh at a location, but you might have a better time creating an actor that has a static mesh and on begin play in your actor or player controller, store it in a variable reference and on click, setting it's world location to the hit result via the reference.
Am I able to store mesh in a variable?
or I am not understanding you
New static mesh sounds good, but I cannot find the function in the blueprint that does that
It always takes the pawns mesh
you spawn an actor
which has a static mesh component
we just use a particle
for it 😄
@zealous moth Thanks for the tip
@feral estuary https://www.thegames.dev/snaps/5feN1guUuD.mp4
Exactly what I was looking for @worthy frost
I have 2 actors, both have the same skelleton, and i have differentmesh and animations for each one, when i imported the animaitons for the second actor, it's previews are with the mesh of the first actor, each time i open it i have to set the preview mesh manually, how can i make it so it will always open with the preview mesh i want to?
what is the best way to create such particles?
I am familiar with blender only
but dont think I can export particles from there
thanks ill look into that
#visual-fx might be able to help
@dry pewter what did i do?
Hi
@late cave in your second window, you set it as "auto input disabled". You can also force it to get possessed by using the node "possess" and referencing your controller.
@halcyon trellis you can check what the z velocity is. if it is 0, we assume the player is not falling anymore
@marble agate you can make it debug only in the console
@dry pewter use a save file or game instance to save your stats. next time you create/spawn that character, fetch them
@zealous moth 🙂
Does anyone know how I can get the Event landed node?
@worthy frost Any idea how to destroy the actor once the pawn reaches it?
@feral estuary I dunno... that sounds impossible... in Unreal Engine? :/ what do you think @worthy frost ? Is that even doable? 😉
@dry pewter ...you just repeated what Zanet already told me
Sorry i was thanking Zanet for the help and quoted his message
🙂
Speaking of which im sill not sure what to do with my current Z velocity checks as i have the following and checking if velocity == 0 didnt work:
Hey I'm a total BP scrub, trying to make it so particles only spawn if the actor hitting the collider is going above a certain speed. In my mind this should be doing it but I'm still getting the particles spawning no matter what speed I'm going. Any ideas?
Also tried it with EventBeginOverlap and without casting to MACharacter
I'd start with printing the length of the impulse.
Quite a few different things go into that, so you're probably getting quite a large impulse despite your slow speed.
How can I reference my bow's anim BP inside my player's anim BP, to get a notify within the bow animation?
Currently accessing none when casting to the bow anim BP.
Alright cheers
I wouldn't expect to be able to use the velocity field, but you can try GetActorVelocity
Yeah I tried that too with similar results
Though shouldnt it be the case that if I set the impulse limit absurdly high there it would at some point not spawn the particles? Its doing it even with values of millions
Update to my post above:
@modern hound Is it perhaps set to auto activate?
You can set a breakpoint to see if that node is what causes the leaves to spawn
Pause execution using Breakpoints to inspect graphs and the values of variables.
Ok, thanks for your help!
Ok I was just being dumb, this actually works 😄
Related question though, I'm sure there's a better way to do the particles than to have them attached to the BP by default and then activating again based on this? Because right now I get them spawning every time I move these actors and on BeginPlay etc. How would someone smarter than me do this? :P
The component has an auto activate field. That'll be why they trigger on begin play and while drug.
There's better ways to do this. Most people implement a pooling system to reuse particle components.
Aah, Ok.
You could also spawn the particle component via a node. I think it's Spawn Particle At Location
You could then store the reference and re-use it if your actor needs to re-play the fx
Hello everyone, how can i move character in Z vector? (in zero gravity)
Does anyone know why my pointer is not getting destroyed when I click again on the floor with this blueprint:
The input execution pin is blank.
Nothing is triggering the call to DestroyActor
If you've ever wondered how blueprint determines the order of execution of your logic, this video will give you a quick rundown of how the two major types of nodes differ from each other.
twitter: https://twitter.com/KorkuVeren
twitch: https://www.twitch.tv/immutablelambda
Here ya go, a basic rundown of how BP works. It's dense so you may need to go back through a few times.
I have a question, in my project there are times when the mouse cursor is visible and can click stuff, and times when it's hidden and it control's the player's/camera pitch/yaw/roll
But when testing in viewport or standalone it's messy due to the "press shift+F1 for mouse control" thing
How should i handle that?
Thanks @sand shore I did try to connect the pin from the spawn actor to the destroyer but thast instantly destroys the pointer
bShowMouseCursor and/or Input Mode Game/UI are really brittle.
without displaying it at all
@dry pewter What I do is make a replacement to those so that I'm never using them directly.
As for it being ejected? Should work okay, what cases are you running into?
@sand shore When i click a button whose blueprint sets the mouse pointer to hidden, it still's being shown (as if i pressed shift+F1) and does not go back to control the player's camera until i click on the screen
Such click triger's another event and it's messy...
Yeah, that sounds like it just being brittle.
You should rethink how you handle mouse visibility.
You can do a few things - like making a number you add/subtract from - when it's nonzero the mouse is shown. When it's zero the mouse isn't shown.
Same deal for game/ui
I don't quite get the game/ui relation ot mouse control
@sand shore Delay works alrightish, is there a way to make it destoys only on pawn distance ?
There's a thing called Set Input Mode @dry pewter
Almost every time I want to change between a menu and 3d gameplay, I use both of those (indirectly).
They're really closely related concepts.
@feral estuary Yeah! You can have it work whatever way you can express via BP
Sweet, cos the delay also bugs out when you click multiple times
it doesn't destroy all of the mouse clicks
Hello everyone, how can i move character in Z vector? (in zero gravity)
@stable reef Is it player controlled or blueprint/AI?
@sand shore Thanks i didn't know about that node, will look up to it
blueprint
Do you have a navMEsh in your map?
Normally Jumping should add movement on the +Z axis
if oyu don't have gravity your character should move upwards
Is your question "how to remove gravity"?
yeah, only if player staying on something
Is your question "how to remove gravity"?
@dry pewter no, I already did it
Oh so you need to move your player on Z, while it's already "not stepping onto something", like floating in the air
player can,t go down or move up in space
I think it's related to these two on the players blueprint
ond efault third person characters, movement input section
I haven't done it, but making the rotator with X and Y =0 makes it so the character only move's on plane
have you tried this? https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/23964-player-movement-along-z-axis
Build powerful visual scripts without code.
I guess you could replace Event tick and Gate with something else if needed.
thanks
All good, hope it helps you
After adding a variable to a struct, Get Data Table Row with that struct becomes super flaky, like sometimes it will work, and other times it doesn't, and upon restarting UE it will fail to compile unless I recreate the same exact nodes. Any advice on how to fix this permanently or avoid this situation?
@sand shore Input mode did effectively solve my issue, thanks a lot!
@pulsar moss In general the only way to avoid it is to plan out your structs beforehand. If you choose to alter them, you're going to have some issues.
@dry pewter Feel free to make an abstraction over that so that you have more control
It's pretty low level and detached from each other
Abstraction?
@maiden wadi that's pretty unfortunate. what does one do in this case, short of restarting the entire project?
How can I activate "On actor component begin overlap" using destructible mesh or its rubble parts? I've been trying whole morning and can't make it to work.
This is very frustrating. This will work, except after I restart the editor, then it will break. Then I link it up differently, and it will work again.
hm, is there a way to use meshes in umg or hud?
Why won't this work?
This is the output of that function
Being called this way.
Within that "Squad Move V2" function, this:
Yeah so I guess the message of the day is to show full context.
Sorry 😛
My mistake
okay
so
what..
SquadMode better be enabled
but what do you mean "doesn't work"
there's like 100 things that could mean.
Sorry, should have been more clear. It doesn't print
And I can't see any reason why it wouldn't.
But it seems like something in that function isn't letting it continue, but it's literally just a series of line traces and math, and a branch (seen above) if a certain trace condition is met.
Because you aren't calling UnitMove
You're calling
UnitSquadMove
Which
by the looks of things, you've got 2 newer versions of that function/event anyway.
It's either that, or whatever array is being looped has only nullptr entries (or is maybe empty)
it happens
That was it
@daring mesa Tell @vocal urchin about your times having me look over a BP
(bet he doesn't respond)
Bit of advice.
Look into source control
This way, you don't feel compelled to version things within your graph.
Solid advice
You'd instead just change how Unit Squad Move works
Yeah, 100% should do that
Some other things....
Get better names.
You go ObjectMove -> Squad Move -> Unit Squad Move -> (presumably) Unit Move -> Unit Squad Move V3
No.
CommandMove -> SelectedArray -> HandleMove
Any peons don't do anything directly.
All squad leaders figure out a formation to move towards, issue a move to their peons.
If you've only got peons selected, with no squad leaders selected, you probably wanna make an impromptu squad... or maybe not.
You got a tank?
That doesn't need a commander (probably)
You happened to select a building? It does NOTHING - it can't move.
Hey just a question, is there some sort of method in which to record sound from one location in the game and play it at another during runtime?
@tired arrow No.
@sand shore Thanks man. I will rename stuff. It's a good point
Very confusing even trying to go back and troubleshoot the flow if it
@tired arrow You could record events which lead to sounds, including the timing of them. Actually just sampling the audio at different points in the game is .... possibly supported in BP but there won't be a utility to play those back automatically
I'm trying to get a system down to play audio through a portal so that you could potentially here the other side when you open one
Not necessary, just would like to learn. I could definitely just do this in blueprint and play audio depending on what environment it's in, but I thought it would be a cool experiment.
Yeah that's more of a question for #audio
Some really cool folk in there, they'll get you sorted out
Thank you @sand shore
Beware..OCD intensifies 🙂
Hello does anyone know how to make it so when i left click it shoots, plays animation, ends animation, shoots, plays anim again and looping it again till i release button
my bps
Hello there! A quick question: is there a way to somehow connect multiple actors to one target pin? As it is done with boolean variable or something like that? Instead of making more "Get component by class" nodes (it's just for example). Thanks
Hi, I have a problem with time dilation that is not affecting my camera. I countered global time dilation with custom time dilation to create slow motion and I wanted my camera to move at normal speed but somehow this reference node is not working. I am using Advanced Locomotion System from UE marketplace. Maybe you can help me 🧐
@outer zodiac Maybe something like Set Timer By Function Name on pressed. On pressed/released, first set the variable to true/false respectively. Then set a looping timer on the Fire function on pressed.
Inside the function, first check if the variable is true. If true, shoot. If false, Clear Timer By Function Name.
Hi all. A question regarding CSVs and Datatables in blueprints. Is there an easy method to grab the value X in row Y in column Z without having to do massive loops over columns and row values?
Moreover, are there any readymade nodes for getting the row name that a specific value is in?
hey guys i tried to make a videosettings widget but cant get the onclick event to work: https://gyazo.com/567ab8cbe33645bbd3f1d27e7ebb42fb can somebody say what im doing wrong?
@trim matrix you need to add the widget to the viewport
ah thnx
must i do that after the input mode?
cause when i add it after the widget it doesnt show
From the Create Widget node you should Add to Viewport
i did that still the pauze screen is showing its like its not stacked properly or something
gives the error widget pausemenu_c was already added to the screen
@trim matrix you need to tell the widget to remove from the viewport to stop showing (remove from parent)
Guys on which channel can i get help with lightning?
Thanks
Hello everyone, I'm implementing a simple XP and level up system on a project I'm working on but I'm having some issues
the system is working fine in the Game Level but on the Main Menu Level I cant access it
This is in the main menu, where the following cast fails
Giving me the following errors
While in the Main Menu map it can't seem to set the variable Level Component, the one from the cast, any idea why?
Do you have a player character in your menu?
What are you expecting, exactly?
because if it's just a regular menu, You don't have the "ELS_Base_Chearacter_BP" there, since you don't have a map with one loaded.
I'm very new to UE so I can't tell you where you should store playerXP and other important save data, but it's probably not in the playable character class
@gloomy hornet Two things, you don't need to cast a class if it's already that class. That's what that note is for on your Cast node. If that variable is populated, it will always be valid because the variable type is already the same as the cast. Since it's already casted correctly, you should use a Validated Get node there. Secondly, remember that those variables are a reference, they don't actually hold much information. They're just a contact card to the actual actor. The card isn't any good if the actor doesn't exist. I could be mistaken but I think what you need here instead of getting the actor that won't exist until you load your game maps, is a way to get the information you're looking for from a save game file. It'd be the same information you use to reconstruct the player character on another map as well.
Hey guys, I have a height map for my ocean containing a few dozen textures. I'd like to loop through them using material instance and blueprint. Is it possible to store these textures in an array when I use proper naming convention, such as heightmap_01, heightmap_02 and so on?
@jovial canopy What I'm trying to do is show the player XP level on the Main Menu, but that isn't working because on the main menu map the character doesnt exist
@gentle inlet I'm not exactly sure what you're looking for, but you can make an array of type Texture2D, and then just populate it's defaults with your heightmaps in order to use as you need.
@maiden wadi Thank you so much, I didn't have thought of that, I Will give it a try
@maiden wadi Yes that's exactly what I want to do - but is there a way to populate them other than going trough all of them hand by hand?
Enslave a minion.
In all seriousness though, I don't know. I doubt it. Stuff like that in blueprints is usually just do it by hand or go to C++
what do you mean with 'enslave a minion'?
To iterate on Peter's question, since I'm new...
Can I just create a new blueprint, tell it to somehow have a singleton instance and use it to store relevent data like I would do if I was coding normally?
@jovial canopy Are you talking like a manager class, or just like a class that holds data for retrieval? I'm a little dense with some coding words sometimes.
A singleton is a class that has only one instance, and can (usually) be retrieved from anywhere at any time
That's what I often use to store character stats, like their inventory or something so it persists if I change gamestates.
I just wanted to know if the process was similar in UE or if somehow there's preset things for it
I'm looking at things on youtube, there seems like I have a lot to learn still ^^'
Like, storing the nodes your character has selected on hios skill tree, that's a good exemple
can i get a quick help/look at this delayed for loop i tried to make? it doesnt work
I'm not sure what you are trying to do, but you probably don't want to use a loop delay...
Check how much time has past in your actor internal logic (ontick is called every tick) and do your stuff here
well i want to use a for loop that gives me the option to place a delay behind the loop or before it
sounds like delay loop to me at least 😮
If you really want this to work, you probably want to connect the "onfinish" of the wait block instead of the run continuation
sadly that does nothing aswell.
i gladly take another route if there is one
@jovial canopy Hm. So that's the fun part. Generally nothing persists between levels. I'm excluding level streaming from this and talking about simple level switching. You can do stuff like that inside the GameInstance, but in general you're better off doing things like that inside of the SaveGame objects. I do all of my inventories in classes because the actors aren't actually spawned until I need them to be. Actors themselves are spawned into the World, the world is destroyed and recreated on level load. Therefore if you have lets say a player character. Going off of Peter's question earlier. It's level five, you're storing that in the player character and no where else. If you load a new level, that character would be deleted and would be back at level one in the new level. The only way around that is to either keep that data in the GameInstance class which persists from the time the application is opened until it's closed, or savegame objects which are written to disk. And on character load, you would set it's stats based on your information saved in one of those two places.
Well the GameInstance Class seems to have what I'll look for then
Is it possible to change the pivot point location in blueprint?
I mean I don't really know what you are trying to do @blazing ridge
Unless you're dealing with UI, delays are most likely not the way to go.
I don't really want to say anything because I'm very new to UE and I could very easily misslead you. But in games, each actor has an update function called n ( often60) times per second, and each tick is independant from one another. If you want a delay, you make a counter at the start of the delay, each tick you reduce it by one, and if it's 0 when you tick you do the ondelay behavior
Maybe there's something different in UE, maybe people use behavior trees for AI, I have yet to look into it, so maybe I'm just spewing bullshit here
that's juwt what I know from non UE game dev
@blazing ridge I'm confused. Are you trying to delay before or after the loop, or inbetween each loop body?
inbetween
im trying to do this
your code seems to work tbh
I now tried to write another standardmacro as seen above with a task delay node, since delay nodes cant be in the macro lib i guess.
I tried an approach i found posted by a Dev as a workaround, simply copying the nodes from the macro lib into my graph and edit as needed. that doesnt work for some reason?
and i found an old video where someone explains how to use custom loops, but its from 2014 and he uses a delay node in the macro lib, which, as stated, doesnt work
@jovial canopy yea it looks like it, but it doesnt. im spawning 3 widgets inside the loop and want to have a short delay between the spawning. however all of them appear in 1 frame
Is it possible to change the pivot point location via blueprint?
@blazing ridge Your error is either: your delay is somehow 0, or there's something going on with the TaskOwner.
@jovial canopy i have exactly the same setup as you do and it doesnt work for me
i just have the first and last index coming in from outer
think i found the issue, gimme a sec
own stupidity, but thanks for the help tohugh, helped me figure the issue out
i had another problem around the loop itself which randomly ran 3 times aswell (that gave the illusion that the other loop was a problem because it ran 3 times aswell)
@stable plume nope, got to that in something like Blender or 3ds max
Good to see you have a working macro then :p
@gloomy linden Bummer - thanks 🙂
nice nullpointer Mario
but huh, btw... @blazing ridge
that's probably much cleaner code
If you have to delay a loop, I would assume you're doing something incorrectly
in UE4, we get a free template for a rolling ball... if you roll fast enough it will start bouncing. Additionally, if you disable the WA key inputs, W will make it jump... does anyone have any ideas why this is?
he was adding things to some UI, so... I guess it's one of the few exceptions where it's not that bad to use a delay ^^'
was my first response too
nvm about the W key
what do you mean by null pointer?
Accessed None Trying To Read Property.
yep, you have no character movement
I don't know what can cause this, would have answered otherwise
time for brainstorm then
Walking speed is an attribute of Character movement, you can't read/set it if you have no character movement