#blueprint
402296 messages ยท Page 665 of 403
That's my standard projectile scene
And here is a blueprint of it
now it's not disappear when it hits enemy loool
@novel ice on your box collision you gotta enable hit events
Oh
It really worked, thanks!
Aaaand... how can I hit an enemy with it? Is there any option for that thing too?
OH IT WORKS NOW TOO
Thank you man!
trying to get the angle between 2 widgets inside a canvas
but the angle is always positive
?
ops
worked
ss for someone in the future: angle between widgets in 2D space
I have structure passed by reference to function. Getting values works fine, but trying to set them borks out with warning "The NameOfInput is a Read Only property and can not be modified directly.". Is there anything I can do with that?
this is how I set value:
@modest gulch looks like you are replacing the struct ref when its not done that way. You are using Set Member In STRUC_GlitchTimer
then how I should do that?
If I can't set values in structure (by reference), then whole "Pass-by-reference" option is half-useless
It seems to work regardless, so long as "Glitch Timer" is in reference to the input structure, no?
yes, it is reference
I can check if it actually works, but warning worries me either way
If you don't want the error to show up, just connect the input directly to the set members node and it goes away ๐
So, in order to get multithreading, I was gonna make a simple plugin that exposes a node to blueprints. But all my templates in New Plugin are missing, I just have blank
Sure
Just do it in C++ lmao
I literally have to make a node in C++ that does it
Just make one UFUNCTION with BlueprintCallable attrib in the header file, and define it in the C++ file. It'll appear in the Blueprint editors once you compile it.
My idea here is to take an event as an input and an event as an output, the input event gets called on a new thread, the output event is called when the function is complete
... why is my Visual Studio running so badly?
That's literally the entirety of C++
I mean, I'd really rather not have to do this. I pretty specifically wanted Blueprint, but Blueprint by default doesn't do what I need.
multithreading in general is a recipe for nightmares
No clue where to post this, but I added a C++ class into my project with default settings. I restarted my session and now I can't load into the project and am getting this
It starts to do it
Then says it can't be compiled. Try rebuilding from source manually.
But I installed turbochargers on my horses. If I don't add a perfectly slanted windshield the spoiler doesn't prevent the carriage from taking off!
Ok, how do I generate visual studio project files?
As for the multithreading becoming problematic, I should be fine because my thread is only going to add instances to instancedstaticmesh components, then post an event for the main thread to switch visibility of things
Unless there's a GOOD way to get some sort of async behavior in BP that I don't know about
Ooo, I see. I didn't know which part I was right clicking
Okay, I will use latent nodes if I can find any sort of information on using them other than "drop a delay node" that seems to do absolutely nothing
I need to be on the gamethread to add instances to ISMs?
Cuz that means even multithreading won't be a solution
wtf #blueprint seriously?
what am I even doing here
don't use the Compile button
it's not that?
yes
you need to thread the needle with ISMs
...
So, since I'm back to the drawing board here.
Delay with a duration of 0 functions as a Yield, right?
delay w/ 0 is 1 frame delay
and there's a trick of doing that x2
not sure what the trick is but it's a trick :P
so it functions as a yield
no it functions as a one frame delay
in general, don't try to do multithreading from BP
that's what c++ is for
Multithreading isn't a solution anyways
because I need to edit instances on ISMs during my async stuff
I mean, that's not STRICTLY true, but even if we ignore being pedantic, I still can't add instances to an ISM on another thread, so there's no point
all right, dropping a delay in did nothing
I put it in my for loop that builds my chunks
apparently I'm refactoring to do this 1 tile at a time in a tick
do I have to do something special to make tick work?
no, there's some other issue. Great.
okay, I figured out what I was doing wrong.
It just will take 16 years to actually build the map out at this pace
Hey how do I refresh a widget when applying new Values in a structure? I tried this but no luck
Are you using binds to set the widget display values or do you set the values manually?
I mean the components within the widget. Like, this is set to a bind?
while it runs, this is painful for a whole different reason
I already did that.
I've got it batching 50 things per tick
It's hellaciously slow and ALSO gives terrible framerates
It doesn't give a freeze, but building the map is easily going to take 10x as long this way
Hey just letting you know I figured it out by referencing the Data from where I set it manually and taking it's values and setting them on the widget
I need to figure out building chunk by chunk I think, so only one chunk gets built in a given tick, then increase the amount of tiles it builds in that chunk
I don't suppose there's an easy way to sort actors in an array or other container by one of their variables?
is it only possible to call a 'get player controller' inside the level blueprint, can you not do it in any other?
should be able to do it anywhere
I can't seem to call it in a Pawn/Gamemode/Player Controller / Actor BP
I swear I have plenty of times before, but it just doesn't let me
cant copy & paste into any other type either
either, cant copy and paste and it's not in list either with context or non context
just, not available
but in the level BP, it is under Game
WAAAAAAAAAAAIT
You can't call it in Construct, but you can in Event RIGHT...that makes sense! xD
I did think it was really strange, but there we go me being an idiot ๐
ive done that with construct too
ill be honest, I have never seen a construct limited node set before, not that I have noticed at least!
This... is interesting.
this tells me that something about my building is pear-shaped and might actually be a large part of why it takes so long
I'm gonna have to step back from this and give it some thought or something. It's making my head hurt and pissing me off at the same time
I thought I had an epiphany and finally understood Blueprint Interfaces, but I'm lacking something here. I'm just trying a simple destruction message. Pressing B on the Right Oculus controller should send a pulse that is picked up on an actor that has the BPI loaded in class settings and should execute a DestroyActor. I just can't figure out the Target, which I think is what's holding this back
print string works so I know the button is working, and the actor is calling the event with just a destroy actor
The target is the thing that implements that interface and the code you want to run.
So if you were say, holding some "thing" in your VR hand that you want to destroy, you'd want to pass the reference to that "thing" as the target, and that "thing" needs to implement the interface and have code to destroy itself.
I need to formulate a small idea that doesn't rely upon procedural generation because this terrain is about to make me throw my PC out the window
Yeah, I feel a bit stuck there, the thing/actor has that code to destroy itself when it receives the pulse. But if I already put the actor in the target on the "VR hand" what's the point of the interface (the underlying issue for me here is trying to get used to thinking with interface instead of cast to)
How did u guys master BP?
Did u watch tutorials and tried some stuff or what did ya do
The interface allows you to generically do something with multiple different classes. For example, I could have an "Interact" interface. With one object, that could be as simple as turning on a light switch. With another object, it could start up a bomb countdown. Maybe with an NPC it starts a conversation. It allows you to do this without casting to or knowing the exact class of that specific object.
Not a master, but I have other programming knowledge and once you take that + learning a large handful of nodes, it's pretty cake
Hmm
watching tutorials first and A LOT of experimentations.
Okay thanks
ooooohhhh maaannn, it worked. oh sweet nectar of the gods, if they could somehow encapsulate that feeling you get when you solve something
thanks @dawn gazelle the actor reference I realized in theory but now in practice finally found the 'Get Actor of Class' and put in the Actor Class I'd created. and then it finally went through. Pressing B now destroys that object
What if you have multiple of that actor though? Your "Get Actor of Class" will return only the first one found.
Is it possible to Get(a copy) of an array with string and not with index?
Is it an array of strings?
nope
@dawn gazelle what did u do to learn blueprint?
Then you may want to consider using a Map variable instead.
Dived in head first.
I've been a hobbyist programmer for many many years... It was fairly straight forward for me to pick up. The more complicated aspects such as multiplayer is where I sort of started with BPs (and I'm still not super great with multiplayer)
First things I was doing in BPs was mods for Conan Exiles.
@dawn gazelle I see what you mean, created a few duplicates and it destroys one per press. Which is still somewhat OK for this specific prototype. I lack the node knowledge to know which inputs would be needed to solve, at least not until I get some sleep
Oh yeah, I'm also a Doom modder since 2008 (literally when I was a kid), so I'm not going full blind when started game development or Unreal Engine 4 programming.
So liek as a begginer how would u learn blueprint
If you're a complete beginner in programming, you need to learn about variables, variable types, arrays, and then maybe some object oriented programming basics. If you know all that stuff already, then just learning about how UE4 works - like what different "things" are like Player Controller, Game Mode, Game Instance, Characters, Pawns, Actors, Widgets... The nodes involved you will learn over time as you interact and want to create different things.
heyo guys, can someone give me an idea of where I'm going wrong with this?
Trying to have the player being pulled towards the hook point, but from what i've read the difference should just be put into an addforce action?
Doesn't seem to be working though
addforce is connected to Event Tick
how can I make that in c++?
Oh, as simple as just realizing there was a Get All actors of class node as well
Same sort of problem --- which of those actors is the one you want to interact with?
๐
TMaps are primarily defined by two types โ a key type and a value type โ which are stored as associated pairs in the map.
Any tutorials for that tho?
honestly all of them at once for this specific prototype, supposed to be a fun little easter egg/frustration button of destroying everything at the end of the demo. I'm working on a more traditional destruction from hit events with some vr gun
I couldn't recommend you any as I myself didn't take that path. I had ideas for what I wanted to do and looked around and found videos or messages in this Discord.
Oh
So from those hit events you'd get a reference to the object you're hitting (probably from a line trace or an overlap or something) and that's the reference you'd want to pass into the interface.
Pretty sure I follow, will look at that tomorrow!
That doesn't really seem like the right solution to me.
I would think that the solution here would be a vector from the actor to the hook point
pretty much this would send to that specific actor correct?
Yep, something along those lines ๐
Is that not what is going on with the self GetActorLocation and hook point?
Thx
Admittedly I've just added a multiplication of 1500 to the vector - vector calculation result and it seems to be working
makes me think if this is a jank fix or if there is a genuinely better way to do it 
it's add, not subtract
targetPosition + sourcePosition = vectorToTarget, I believe
Ah, ^^ there ya go then
likely your vector is just too small before multiplication to generate a noticable amount of force
hi all is it possible to fade out sound wich is playing now at location? can't figure out how to turn it off... it's looping thanks
yup, got it thanks ๐
No, you need to use something like Spawn Sound at Location which gives you a reference you can plug into the fade out node.
Hey, I seem to have a problem understanding a fundamental thing about unreal. Perhaps somebody wants to help me out ๐ I just spent a few hours trying to fix a problem and the solution was really weird to me. I have a Blueprint BP_Weapon_Base and children of it representing weapons. I attach a collected weapon to the players arm (3rd person template with paragon character). When i attack the swing makes the sword go far behind me, colliding with the camera and thus making the spring arm go forward into the character. my solution: weapons should not collide with the camera. I updated the bp_weapon_base but it didn't fix anything. after a few hours I found a strange hint in the internet suggesting that I have to put the Weapon in the level again, because my bp-change will not be represented in actors that are already in the level. I tried it and it worked. Shouldn't updates in blueprints update the actors in the level that are based on them? ๐ค
hey folks, working on boss waves and the number that spawns. I am trying to figure out how to work this bluepoint. The first time boss wave happens, I want it to spawn 1, the second I want it to spawn 2 and so on. Right now I have it set to my Boss Wave Difficulty is 1, Boss Difficulty Multiplier is also 1, so 1 spawns each time. If I make either 2, it will spawn 2, then 4 and so on. Any ideas?
I'm trying to add foliage where it once was, what is the object reference for that?
I used this to remove foliage I clicked on, but I want to have foliage return but I have no idea what the reference would be.
@rugged zephyr Not sure if this is what you're experiencing, but things dropped into the level editor are new instances of the blueprint asset, and can have instanced changes that deviate from the default
once you change a property, the editor thinks you want the new value rather than whatever is default
usually you can revert to default values by pressing the yellow arrow
in your case, maybe your collision response what overwritten on the instance
@narrow kelp Thank you for your help! Your suggestion seems to bring me on the right track. I still struggle a little with that thought though. If I don't change anything on an actor after putting it into the scene and then update the blueprint unreal still thinks I want the old values? Even if they are not customized to the blueprint?
If you haven't modified the instances, they should be updated to what is on the blueprints
if not, that could be a bug or something I don't understand
@narrow kelp Is there a way to make all settings of an actor revert to its blueprint state? So I could be sure it was a modified property I perhaps forgot?
You could try clicking on any of those yellow arrows you can find
other than that, you may need to just delete and replace
@narrow kelp Wow ok, thats irritating! It's easy to overlook a yellow arrow in one of the components, so I thought this should be a common need. Perhaps I am still thinking too much in unity-prefabs ๐
@narrow kelp Your assumption must have been correct! I just reset everything on the faulty actor and now it works like the new one. I also found a way to reset an actor to blueprint default if anybody needs it:
@narrow kelp Thank you for your help! ๐
I found what I was looking for.
@rugged zephyr cool, i didnt know about that ๐
@narrow kelp Glad to be able to give something back! ๐
This has been bothering us for a while and nobody found a solution yet:
"Cannot pass a read-only variable to a reference parameter In Effects"
This happens after accessing a TArray<..> member of an object within a blueprint. However, this value is neither const nor otherwise marked as readonly in code. We do not understand why this is flagged as readonly. We are using 4.25, this happened repeatedly, and I found no info on it online
This issue seems to be specific to members of type TArray
A workaround is to store it in a local variable (copies it) and then using the copy but that is very inconvenient
The incident occured in a widget blueprint for what it matters
are you doing it in a for each loop?
no, if i pass it to a for each loop i can use the outputs of the loop just fine
i pass it to a function that i created, a blueprint function
the function is part of a different widget
hmm
has nothing to do with that
unfortunately
UPROPERTY(BlueprintReadOnly)
TArray<UEncounterEffect*> InitialEffects;
Ok actually the member is marked ReadOnly but i still dont understand the issue
How can i make a copy of this array in BP?
I really dont want to expose this to be BP-editable
Is this bit of code within a function itself where Encounter is also an input variable that is passed by reference?
Also trying to mentally work out how I'd go about making a system that allows the player to press "W" once that would set the ship to a certain speed and then they can either press that again (to increase the speed further) or press "S" to bring the ship to a stop (or slow it down). Basically a WW2 ship throttle system.
However I am struggling to wrap my head around how to translate the concept of speed to the transform of a object in UE4. I am thinking I'd use If (Branch) statements, but I am getting hung up on how what nodes I will need after that to set the "speed" of a ship to certain amounts.
Currently what I have and where I am stuck.
I started the more advanced throttle system (bottom of picture), and you can see the more basic one at the time.
no, but the Encounter is fetched from a value that is also an input variable passed by ref
Perhaps consider using Action Mapping that happens to share the same key. One key can be mapped into multiple action/axis.
hey guys, is there way to stop rendering fog once at a certain height
how would that matter though?
Thank you, I'll give that a shot. However that doesn't answer the bulk of my question, which is where to go when figuring out how to apply speed levels to a object in UE4.
I'm not opening the UE editor, but IIRC there's a setting of it somewhere in the Exponential Height Fog.
You can store your speed level as a basic integer value that is added or subtracted to based on the input and then you can have your movement done on tick and the scale value should be raised or lowered based on the integer value variable you've created. I wouldn't necessarily recommend using an inputaxis for this style of control though as Input Axis fire continuously while held.
Hmmm okay. Thank you.
Am I on the right track with using a branch?
Since there will be about 4-5 levels of speed that the player can use (not including a single level of reverse), and I am thinking I'd use the branch to check if the ship is moving and at what speed level.
hey guys, is there way to stop rendering fog once at a certain height
Oh wow. Okay holy shit ya my brain is still working hard to wrap itself around how BP works on a advanced level. Since I am thinking more in a linear fashion rather then that multi way with what you showed.
I tried details and there might be a way but I cant figure it out
I made a return-by-copy getter - this seems to fix the issue although I still find this whole thing odd i guess i ll just make it an internal policy to write such getters for TArray members:
UFUNCTION(BlueprintPure) TArray<UEncounterEffect*> GetInitialEffects() const { return InitialEffects; }
I want to make a custom component that instead of adding script to its actor, adds a collision box and some script attached to it. is there any way I can do this? I havent found a way to add anything like this from the 'actor component' BP.
You could do it as a child actor component.
good idea. thank you
can you not do a child of collision box in bp?
no
this node doesnt set the niagara system , is this ue4 bug
I have an item stored within a struct as a soft reference to a data asset, and a float. When I pass this soft reference into a widget drag payload object it isn't accessible from that payload until the asset is loaded, despite being a soft reference. Anyone have any thoughts on this?
It acts as expected and returns the soft reference if it is forced to load prior to being put within the payload
Update: Passing the soft reference alone, outside of the struct seems to work fine. Maybe a bug in how soft references within structs are handled in widget payloads?
ok anyone here have some knowledge about BP interfaces?
When dragging off an Array, I can't seem to find For Each Loop? Even when un-checking Context Sensitive, it just doesn't exist for me.
I'm working in a Widget Blueprint. Any idea why this may be?
It has happend to me once and I just went to another blueprint and created it. Then I copied the loop to the faulty blueprint. Never figured what caused it though and everything works as intended
I will try that, thank you
It worked. Wow, ok. That is a really weird glitch. Thanks a ton
Get an Engine Crash with the following error:
*Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000048
UE4Editor_CoreUObject *
When using (PIE), packaged works fine.
Anyway to figure out what blueprint or reference is acting up? log is of little use as it pretty mush states the same.
Error: [Callstack] 0x00007ffb700f69b8 UE4Editor-CoreUObject.dll!UnknownFunction []
Error: [Callstack] 0x00007ffb6cef2e58 UE4Editor-Engine.dll!UnknownFunction []
Error: [Callstack] 0x00007ff7767b9bda UE4Editor.exe!UnknownFunction []
hi how can i increase the speed of a projectile when it bounces?
@low heron You won't find much help with this. The short version is that something in the engine tried to access a null pointer in C++ somewhere. If you're using third party plugins, disable and test them maybe. If you have any C++ code, check it. If you have any C++ code, it's also advised to run the editor from the IDE, so that these crashes can be better observed. If the crash happens all the time, it is likely something specific. If it's very random and only every couple minutes, it's more likely related to a garbage collection issue.
is there a way to pass a parameter to a python script in a blueprint?
oh it's possible to use arguments when the script called in the python node with sys.argv, nice
Thank you for the in depth answer, managed to narrow it down to the offending BP so its just a matter of time before I find the null pointer.
How can i get if he is moving right or left?
compare float on y and the sign give you if it move right or left
thank you I'll try
Is there a way to get all actors you own?
i have a problem with projectile movement, i use it for throwing items, it works fine the first time, but if i pickup a throwed item and try to throw it again - it stays in air, doesnt move, any ideas?
Have you tried adding impulse to it?
Im using SetVelocityInLocalSpace
yes, im doing, but as far as i can see im reversing everything
but i will check it again
as far as i understand your opinions, it should be somethin with physics and it should work to alunch it twice, so i just need to find this little mouse
Hello everyone !
I'm using the "Set Static Mesh" node to change a static mesh component of my pawn at runtime (for example a cube that becomes a sphere), but the problem is that the new mesh (let's say the sphere) keeps the material of the old mesh (the cube), instead of updating with the materials of the sphere I gave it in the mesh editor
Isn't there a way for my mesh to update itself with the right materials?
Hey, I've got a weird bug- Every time I start the game through the editor in a new window- everything works perfectly fine however, if I start playing through the level editor viewport, my player controller keeps spawning higher and higher in the level for some reason in increments of 1000, it only resets when I play in another window again. Anyone have any idea what might cause this?
Probably because your material slots have the same name
Clear the materials after you set the mesh. It'll reset all previously set meshes with new Material Instances based on the materials predefined in the mesh.
I'll try both of your answers thank you
Is there an easy way to clear all materials of a mesh with BP ? Can't find a node for that (my mesh has like 20 materials)
How would I spawn my player at the correct place when my player starts are in streaming levels?
which I stream in at beginplay in the gamemode
It worked perfectly, thanks a lot !
ok, i just checked with actor laying on ground and repeat every 2s to change velocity and it doesnt work
it works first time, not working any other time
so its something inside o f projectile movement
Hi? Can Someone Help Me With Somethin?
I am trying to turn on and off a screen widget with the TAB key, not sure what I am doing wrong as the only thing that happens is that when I pres tab the mouse comes up. Can anyone help ๐ I have changed the bottom visibility to hidden but no luck
Do you have the TextScreen var defined after creating the widget?
Brilliant thank you, I am currently doing this in the first person character, is that wrong?
it well work in first person tell me if it work for you.
Yes amazing! Thank you so much. I wasnt managing to get remove from parent as I wasnt draggin off the return value
Yes, just boil the chicken with some seasoning.
Please state right away what do you want to help, else nobody would chime in and offer solution. You're having difficulties making chicken delicious for all I know, instead of help in BP related stuff.
how can i show a widget when fps is lower than 6
can someone tell me why i get this error?
You could check the delta seconds from event tick, which is basically the frametime.
The condition check would be like this:
if ( DeltaSeconds >= 1.0f / 6.0f )
{
LowFPSWidget();
}
Of course you would "translate" that into BP nodes.
Is this a Bind function?
how can i do this in blueprint
nvm it seems for some reason it had 2 of those green pins, but after deleting the return node and re creating it fixed it
Hello, I am trying to get a player/camera movement similar to that in GTA5 where you can rotate the camera around the player, then when the player starts moving forward the player moves forward relative to the camera forward rotation.
The camera movement is working but I cant get the mesh to rotate to the camera rotation when the player starts moving?
Hint: it's all between your input event nodes and Add Movement Input.
That worked brilliantly, thank you, I have tried to add in the feature so when the screen widget is on, it shows the mouse, pauses game control and then when tab is pressed again it goes back to the game. I get stuck with the mouse and screen widget and TAB doesnt take me back to game mode. Do you know why this could be happening?
In the Event Tick, compare the delta seconds with a float division node with 1 / 6 (or 0.16667). The bool result goes to a branch node that executes on Event Tick, to set visibility of the widget accordingly. You don't want to create widget on tick - it's unnecessarily expensive and can led to issues.
I can't give visualised answer, as I'm compiling C++ codes rn.
yo can anyone spare two minutes, im in the programmer parlor. im having problems with getting in and out of my car
I have looked at that, however, its hard to get something such as a timeline to work properly as I dont know how often the execution pin is activated for the input event.
This should absolutely not require a timeline. Exactly what part of it are you stuck on?
You need to decouple ControlRotation from the Capsule rotation if you haven't done so yet
Set Input Mode To Game and UI instead of UI only, and typically you want to do the check in the widget BP as well, with OnKey Pressed event.
idk why it happening
why is my player not spawning at the location im telling it to spawn at when i get out of the car?
Hm. I was trying to make the rotation of the mesh to the desired rotation to be smooth, let me just set the rotation and see if that works.
I was also mistaken and did it after the movement input.
That happened because the widget basically fed your input, and the widget itself have no idea what the Tab button does.
Hi, does anyone know if there is a limit to the length of variables names and function names ?
is this line of code can show widget when fps is lower than 6 fps
@prisma stag just think of it this way. You have 2 rotations, the direction you're looking, and the direction you're moving or last moved.
Arh I see, Thanks, that first solution worked, thanks, I will now a button to come out for the widget, see how I get on, thanks again ๐
Made a small oopsie there, it should be larger than.
The larger the delta second/frametime, the lower the FPS is.
Correct. So I have cleaned up the code, and have a SetWorldRotation for the mesh after the inputaxis, then add movement input. Now the mesh rotates properly but it is locked to the rotation of the camera. How do I only set that if the character is moving forward? Should I add a W key event and do on pressed, then do SetWorldRotation there?
No, but do you really want to have variables as long as Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch?
(it's a legit town name in Wales btw)
It's a simple concept.
Frames per second : how many frames you get in one second
Frametime: how many milisecond it took to get a new frame
Is this ok to do with the tick event?
So I may not be fully understanding how to add input actions... I've went to Editor > Project Settings > Engine > Input then added an action mapping under Bindings. But I can't get it to show in my blueprint, any ideas what I am doing wrong?
This is only for the player, and it is just grabbing the z rotation of the players camera.
ok
Oh. Ill look into orient rotation to movement. Im trying to get the player mesh to rotate to the direction the camera is facing the the player is moving forward.
did i want to do like this @icy dragon
...it's a generalisation, so that you can translate it into BP.
I'm compiling some C++ code, so I can't open the editor right now to give visual example of the BP.
Thats what I thought but somehow mine got messed up I guess ๐คทโโ๏ธ Let me see what is different.
ok
i can't understant anything idk anything about the coding stuff
ok
i well do it later
So there was literally just a tick box for orient rotation to movement then you can adjust the speed ๐คฆโโ๏ธ however when moving it also rotates the camera.
can anyone help me out with a simple problem?
ive used the "destory actor" node when i get into my car, but when i get out what would i use to get him to respawn
I wouldn't destroy it, or just spawn him again. Depends on your design.
@prisma stag Yeah start with the 3rd person project and look how it's set up. You should NOT be rotating the mesh inside the capsule.
You would do strafing and looking left or right in animation
I got it. There were a multitude of settings already in the Character Movement component that can do what I wanted.
It'll all depend on how you want it to behave. In our project, rotation is oriented to movement when sprinting, but when walking or aiming down sights, rotation is locked to the AIM direction. It depends on if you want backwards motion to have the character running toward the camera or running backwards
The suggestion you gave did give me the "level" based speed that I was looking for (as in I only have to press the "W" key once for it to hold a speed). However there is no change in speed variation past the first speed level.
From what I know about Add Movement Input, the scale value can only work between the ranges of -1 to +1
So I am thinking that I'd place some sort of max speed variable after the Add Movement Input node.
Is this the right way to go about it however?
The speed scale value should be set to a value < 1. Base the scale against how many steps you want - so if you're looking for 5 steps, set it to 0.2 so when you are at max speed it'll be 1. If you're looking for 3 steps, set it to .33 etc.
What are those orange nodes for? Didn't quite get that..
If you've made a blueprint a child of another blueprint, those will call the functionality in the parent.
Without the parent node, if you have the begin play (or other events/functions) in the child, then the child's version will completely overwrite the parent's.
is there a progress bar fill option,instead of left to right/right to left ,top to down/down to top option , u can get a square box rotation countdown
ok
ah yes that makes sence
now
Need help with projectiles... again!
Here is simple projectile's blueprint
And it's scene
So, there is a character which spawns projectiles
Using the controller, here's a function
AttackLocation is here
In a character BP scene
When character attacks, projectile just disappears, like they hit something already!
Actor destroys, emitter spawns and all of that
Here is a Box's collision settings
What should I do to make them spawn properly and disappear after they hit something?
Please help
has anyone got a mic that can help me out with my car blueprint. nothing complex i promise
im in programmer parlor
Is there anything else I am missing to get these events to show in blueprints?
whats this for?
Literally just trying to make a custom event triggered when I press a key
so u want that to appear in ur blueprint?
go to ur blueprints click tab and type in the name of the ones u want to put in, so for instance type in jump
No you're missing the point, it won't show in my blueprint....
omg never mind I was putting it in the wrong blueprint, sorry
Hello! Does blueprint interfaces works between two widgets?
I miss actual words for programming...
Sure, so long as they both can reference one another somehow.
they dont need to really. They can just check for implementation of the interface
well technically that is reffing each other but you know what I mean ๐
Hm, I have WidgetA with the interface implemented and WidgetB(that is a component inside WidgetA) that have two buttons. Inside WidgetB with the buttons I get a reference to WidgetA and use it for the event messaging. But it doesnt work. ๐ฆ
you overcomplicated that I think
when you create widget. Simply store a variable with the reference. If you want to access a Widget inside another Widget, use it's child structure to get it. If you want to interface it because it might be dynamically placed in variable structures, then the second widget should store a value to itself on construct.
hmmmm, what do you mean that the second widget should store a value to itself?
Let me phrase it a bit different. I have two widgets - Main and Welcome Page. The Main one have the Welcome page as a child.
Inside the Welcome Page are two buttons. So I made a blueprint interface with two functions/events that I implemented inside the Main widget. How do I get the buttons that are inside the Welcome Page call the events inside the Main?
Probably I completely misunderstand how blueprint interfaces works.
Why not just put an event that works and then make that event run your custom one?
well you start with a question
Hey folks, need a bit of assistance with rotation. I'm trying to get my flipbook to point where the laser hits. It kind of is for floors and ceilings but not for walls.
Don't mind the speghetti
the flipbook is pointing xforward
hello, i am trying to make a ball to change direction of going afer Begin Overlap with wall collision. So i make wall cast to custom event in ball blueprint. I tried a lot of methods AddActorRotation, SetActorTransforms, etc. but the main problem is, that all this work only one thick, and then return to previous position. I record a video, to show a problem
here is what i use to rotate ball by wall for now
this is wall blueprnt
how to make ball go to another direction after hit a wall. Like in video, but nor for one thick ๐
@trim matrix Aye, I ended up finding a fix online. Works like a charm
LOL
It def needs cleanup haha
@trim matrix @gusty shuttle do you know answer on my question by chance ๐ ?
@fading wren Start with how you're moving the ball. You just doing your own movement?
Do you want it to bounce off the wall?
If you're just doing your own movement on tick, you presumably have a velocity vector. When it hits something, mirror the velocity vector using the normal of the hit. Why aren't you using the Projectile Movement Component though?
yeah, and start moving to another direction, like ricochet
@fading wren you have a velocity vector somewhere right?
because i am noob in blueprnt
how to check it
@fading wren show the part of the code where you move the actor
Add an impulse on impact normal?
No just lemme handle it lol
Lol deal
ball is just placeholder, i will make 3d later, so ball is character , if i understand correctly your question
So are you using the character movement component? What is actually doing the moving
here you go
i just made blueprint that allow ball
aka character
move whith inertia
i am using Add Movement Input
what do you mean
The character movement component already has inertia, mess with the settings on that instead of whatever hacky inertia emulation you're doing there.
what is pawn ? i thought it just name of "character"
For some reason I cant seem to hide my crosshair when I click on a button via widget, I have gone to the widget, added a character variable and add a custom event of hide crosshair, is there anyreason this may be happening.
You're basically trying to simulate inertia by modifying the inputs instead of just changing the setting in the character movement component
seriously? where ?
Character is a subclass of Pawn which is a subclass of actor
Dig in the character movement component settings, there are settings to control friction etc
I saw one guy who was trying to make a kart racer using the character movement component LOL
it will be character in future
@fading wren what is your intended end result? How do you want your player controlled object to behave?
it just a character that will runaway from enemies fighting with inertia
i cant see any inertia here. Does it name something else ?
Mess with the friction settings.
You basically kind of want something like somebody running on ice right
correct!
looool
i spent so much time to make custom blueprint
ok
so what shoul i do now
what shoul i do
to move a character ?
it will be animated character in future
@faint pasture i still better not use "character"
@fading wren now all you need to do is solve the question of bouncing.
If you want them to bounce off walls
I would somehow detect the collision, then apply an impulse in the impact normal direction
does the node call impulse ?
Does what node?
" impulse in the impact normal direction" i thought it is node name
Hi! Is it possible to disable the input of the player, but not of the player controller? Thanks in advance (:
In a widget, I want to disable the input for the player (running, attacking, etc.) but I want to use an axis mapping to move the widget
@fading wren no, I'm just saying you need to add an impulse whenever you detect a collision with a wall, and the impulse should be in the impact normal Direction
thanks bro
Add lol
Oh right, thanks so much!
example of impulse ?
sorry not sure if i understad you
Adriel you free pretty sure u helped me earlier. im close to completeting it but got another problem...
Event dispatcher / binding i think?
Hey guys I have a super simple problem that I have no idea how to solve
it's about casting
I'm trying to cast to that Door to the right
but what am I supposed to put in the object?
Is there any way I can get ahold of this?
Alright
Okay
Any simple method for getting ahold of this?
I just want to activate a custom function on that door
I'm not asking for the best most perfect solution
fair enough
I guess I'll read the documentation
@crude sun Just think of it this way. You're playing your game, and press the DoorOpen key. Which door should open? The one you're aiming at, the one closest to the character, a specific door across the map, what?
tbh this is a one time thing
it's exclusive to the tutorial
after a target is destroyed, that door opens
no
I'm creating a tutorial level
I'm guessing doors and targets are going to be a thing elsewhere in the game right?
and in that tutorial I need a door to open after the player destroys a specfic target
actually no
Just this once
Just get actor of class Door and call the open event on it from the destroyed actor
if it's a one-time thing
how do I get actor of class Door in blueprint?
right click, type in "get actor of class"
start there lol
damn
get actor returns the first restult, get actors returns all
if you know you only have 1 door then just get actor
alright that makes sense
any idea how to fix this so that when my ammo reaches zero it doesn't start printing ammo string as negative value?
yo thanks a lot for your advice and patience @trim matrix and @faint pasture
why are you storing ammo as a float instead of int?
@faint pasture could SetActorTransforms be impulse ?
I would add a return node after that print string too
i use ammo bar so it shows like these bullet icons that decrease and i also want to show the ammo as number so i also need to convert float to int somehow @unique harness
@faint pasture how can i make an impulse ?
so it looks like this @unique harness
anyway the < 0 worked fine thanks, but how can i convert the float to string so that it shows as int?
just change the float to an int
@faint pasture ok, got it! thanks
mm if i change that then it screws up all the calculations of the ammo
does anyone know how to pull game objects towards the center of an actor kinda like a tornado
hmm okay
thanks
@unique harness this worked!
Awesome!
Hey, i have a linetrace spawn, that uses the mouses for rotation input, however the camera also moves while doing this. I tested it in the fpp template, and set a varibale that stopped camera while using it, but im using als and the camera input is handled by a parent base character bp, and the 'portal' spawn is in the child character bp. Pictures below, esentially id like to know the correct set up to use a 'get' variable from different blueprints
this is how the fpp looks
this is the als one, this movement input is inside the base character, and the variable im trying to get is in the child character bp
if its physics, just add force on tick towards teh center and with some tangential component
This about my camera question?
thank god because i got so confused
what do you mean by linetrace spawn?
i spawn a portal using linetrace
AI will not have anything to do with the input events
Hmmm, okay, but how would I saw a max speed? Since different ships will have set max speeds. Like if I wanted to eventually set a max Nautical miles up, I'd need to be able to set different top speeds and using the scale value wouldn't (I don't believe) allow me to do that.
Theyre not ai, als has a base character that handles 90% of the characters functions, the child actor handles the rest, the overlays and so on, they are the same character but two bps, idk. Just dont know how to get variables from a different blueprint
That sounds completely screwed up, what EXACTLY are you trying to do?
I couldn't follow your earlier messages, what exactly are you trying to do?
One sec, I'll grab you a message link
This is from \first person template, with the same code, i can stop the camera moving, while i use the mouse to rotate a spawned object. Because this code, and the code to spawn the object are in the same bp, the 'get using portal' appears and plugs into the condition node no issue but...
Because this code you see here, is part of base character bp, the parent of animman character bp with the spawn code in it, the get variable node appears this way, because its a variable in a different bp, im wondering how to connect this variable
i have added a widget to my scene with some basic buttons, they have roll over tints but when I play the game they dont seem to be interactive at all, can anyone help
@sterile quest Have an Int SpeedLevel. Pressing W and S add or subtract Speedlevel. That should be simple enough.
Have a float MaxSpeed. This can vary by ship or whatever.
Have a float CurrentDesiredSpeed. Whenever you change SpeedLevel, set CurrentDesiredSpeed = MaxSpeed x SpeedLevel / NumberOfSpeedLevels
Then however you're doing movement, implement the CurrentDesiredSpeed
Could be as simple as setting
Location = Location + ForwardVector x CurrentDesiredSpeed / TimeStep
I am using Add Movement Input.
The user I replied to provided more or less what you described there, but the issue is that it limits my top speed (from what I've been able to tell).
create an actor and add a projectile movement component
i tried so much man
Got it, few methods from what i saw but this worked fine, using this you can use variables from other blueprints
That doesn't give much context to help you debug it
copy paste the one from fpp gamemode, change the mesh if you want, make a new input mapping for the firing?
what does this error even mean?
Calm down and start just by looking at the first person shooter template.
It's somewhere in your color binding and not in the function you just showed
you probably had color bound to something then renamed the variable or whatever
The joke is I don't need a bouncing projectile. I want to do a projectile which just flies and destroys when it hits wall/actor
i removed the color bind thing or atleast i thought i did
so you're using overlap functionality but also using simulation generates hit
pick one
works now
This is so simple but for unknown it doesn't work...
I picked one, I used Event Hit, I used just On Component Box Hit, I used...
uhhhhhhhhhhhhhhhhhh
I'm literally creating a Dialogue2 widget, but it's showing the Dialogue1 widget
THE BEST RESULT I AM GETTING IS when i am moving, projectile can hit me
and it pushes me
if opposite, they will go through me
and through walls
Instead of the select?
ya
assuming you have some sort of movement component, that 2nd bit should work. Using floating pawn movement?
show the collision settings for the box
Nope. I am using Add Movement Input.
That is probably doing nothing if there's nothing to consume it
Is there a more appropriate node for what I am trying to achieve?
SOMETHING has to do the actual moving
start with floating pawn movement
or just write your own system, or use physics
I don't know how to do CPP, so writing my own is a no go. Would have to hire someone to do that, but alas don't have the funds for such a thing.
I am using the Ocean project for my water system.
Since Epic still hasn't really gotten very much with their inhouse water system.
im trying to make the ammo number string red color when i have only less than 30 ammo left, indicating ammo is almost empty but i don't understand how to do it and this keeps giving me error
It's not really Epic's responsibility to make a water system. They gave us to tools to make them. But Shaderbits' water system is fine. The ocean plugin isn't being maintained anymore though right?
@thin robin Rich Text. Check it out for widget text.
error/warnings is always a bad sign
@severe turret does it need picture because the text looks gibberish with the rich text?
Nah, those are Anim Blueprint ones
I am confused because the ship does move. So I am not sure what you mean by this.
@thin robin no. It's called Rich "TEXT". The clue is in the name :/
And they are still working fine
It's just that there is no way for me to control the top speed of said ship, or ships.
@thin robin https://docs.unrealengine.com/en-US/InteractiveExperiences/UMG/UserGuide/UMGRichTextBlock/index.html
UMG RichTextBlock provides a more flexible text block that supports markup for things like style changes, inline images, hyperlinks, and more. UMG RichTextBlock accepts decorator classes, which you can write to define the markup behavior you need for your project.
im pretty sure thats not what im looking for @severe turret but thanks though
Show your code for what's supposed to happen on hit
Is this a Projectile Movement Component?
Switch your ammo variable to an integer as it will save you headache later on. You may one day start checking if ammo == 0 and it won't work as expected because you have 0.001 ammo or something silly. There really is no sense is storing it as a float. You can convert an int into a float when necessary.
I'm assuming the Get Text 0 function you're using is a bind to a text field that would've been generated when you set up the field as a bind. You can't add additional return values as it's only expecting the text output, not the color. You can have this function call another function to update the color if you so desired by using the "Set Color and Opacity" node with reference to your text field:
already did
now switch collision settings to BlockAll
Show the ship components
no effect
what is the object type set to?
@dawn gazelle thanks
actor
worldstatic
so now change it to custom and set it to world dynamic
There it is...
anything I should change here?
@sterile quest That component is what is doing the moving
you should really read more documentation. The projectile movement component system is straight up easy if you read first
add movement input just talks to it
no, now show player mesh collision settings
open the presets
try turning on hit events there too
no result
not the old stuff, take new screenshots please
spawn logic is untouched
it's the same
spawns from a controller, gets scene position from a mesh
and it spawns fine
i really should rest now
thanks
this shit takes my time for a day or two
thats because you never read the documentation
and now people are wasting their time helping you decipher what gibberish code you wrote
Can you send me the link please? I couldn't find it
if you can't find it, I ain't googling it for you. Thats the first thing you learn in any of this. How to google for yourself.
if you can't help just don't say anything but "read documentation"
i asked you for it but i can't see any help from you still
https://docs.unrealengine.com/en-US/BlueprintAPI/Game/Components/ProjectileMovement/index.html
the only thing i found is this
Projectile Movement
and i don't see anything that can help me
Sorry if I sound like I'm picking on you. I'm not. But before others can help you, its best to help yourself. Learning how to use a projectile movement component is one of the easiest things to do. It's been covered many times in youtube videos and has documentation for it. But if you don't understand how the system works, you will be guessing until you get it right. And other people wasting time on helping you guess isn't productive for anyone.
@tulip berry unfortunately any of size of friction in any setting that name as Friction doesnt have influence at all. What could i do wrong ?
@fading wren Have you tried setting ground friction to near 0?
turn max acceleration down
try 200 to start
idk why they have a friction and acceleration setting seperatly but whatevs
thanks for help
Maybe friction only comes into play when landing with motion, idk
seems like it should be rolled into 1 setting
It's how fast something increases (or decreases) its speed up to the maximum movement speed.
When I imported my tent model, the textures all just turned white. Does anyone know why this is happening?
^This is what the model is supposed to look like
It depends on how your mats are set up and your export/import settings, but in general, materials don't export or import
Oh okay. I thought you meant the BP node. Not the component.
Hey guys, I have a Level Sequencer that is possessing an actor in my Persistent Level, is there any way to unpossess the actor after I'm done using the sequence? It's not working no matter what I do.
use the event track and have a blueprint manage it. I find that is the best solution to many problems with sequencer so having a BP_SequenceEventMgr object in the level is great.
hey guys, anybody know how to check if the game is running in simulate mode?
i added an impulse, it defenetly reacts, i am using print string to check
but no impact at all
did i make it correct ?
nvm, solved
Guys
@fading wren that is a very tiny impulse. Try some stupidly large number to begin with
ok
I'm running into a very strange situation that doesn't seem normal
I have a vehicle pawn which is a character
its a very simple character with just a static mesh instead of skeletal
its in flying movement mode and its top down X/Y movement
all simple stuff
I've added a box collision to it
@obsidian moon why exactly are you building this off of a character class? That sounds like a horrible idea
and set the collision to vehicle with ignore all except vehicle
yes, it works! thanks!
and for whatever reason its just not firing hits
@faint pasture why is it a horrible idea?
its not a horrible idea
i've done dozens like this
its just a character with character movment
Because the character class implies certain things like using am upright capsule for collision, movement that is well defined by the character movement component, other things like that.
that makes no difference. The camera is the object that is top down
โ๏ธ
the world doesn't move.
โ๏ธ
@obsidian moon chances are it's just your collision channels.
Characters have a bunch of things on them that might not be applicable to vehicles
its not a vehicle
@narrow kelp the word vehicle doesnt mean an actual vehicle in this case
gotcha
Is its collision still well defined by a capsule or are you adding extraneous collision to it?
character movement does everything needed
yes but you can modify it as I use character class cause I dont feel like making my own vehicle movement component in NP for mulitiplayer
Because the CMC is not going to play well with anything besides a capsule
not true
the capsule isn't the issue here. It's a collision detection for a custom box being used as collision
a character class can have any collision component added to it
it might collide with the character capsule but then its about the channels and collision ignores being setup right
and its a flying movement
gravity isn't an issue here
its about a box collider not firing hits off itself
I really wouldn't even use a character movement component for this. If you are just moving on X/Y its probably a bloated component for task.
vehicle on two or more characters set to block vehicle aren't firing events
@severe turret i get you
did you setup any custom collision channels?
but there is no need to write something from scratch here
this isn't about being perfect or over optomizing
well sure. Plus if I was prototyping I might even use that method. But its more optimal to just lerp locations manually without all that stuff. The only thing it would offer is the replication
its getting max performance on all andriod platforms
no need to add additional "work overhead"
behavior with the character is perfect
its not the issue here
@faint pasture Sorry it got lost in all the messages, but what would you suggest I do to set a max speed? Set it in the FloatingPawnMovement?
(Please tag me, as I have to jet for a bit)
@severe turret so any ideas?
I would ensure your collision channels are setup right really. If you want to you can create a custom collision channel and use that. But without seeing your project I wouldn't know. However my wife just brought me Burritos so I'm going away to scoff them and start boiling tomorrow's poop.
I feel like itโs a bug
sorry for the pic quality
I've tried the dynamic channel, vehicle channel and even created my own
and don't worry the "pawn" channel is ignoring "vehicle"
but I think the capsule being inside the box is causing some wonky behavior
its 4.26.2 btw
I could be totally wrong, but I believe UE doesn't like multiple collision bodies with different properties on them
it might be wielding them together or ignoring them
Hello, for some reason the player stands on top of the box collision for the static mesh below? I have tried setting the collision settings of the box to no collision but no change.
@sterile quest I haven't dug into floating pawn movement but I'm sure it's got a speed value somewhere.
@narrow kelp I think you are right
I think its ignoring them in this case
But I've moved the box collision away from the capsule and its the same result
I find this strange as my previous projects have been VR
and I have overlap spheres in the controllers a capsule collision for the character and seperate sphere collision for HMD wall detection etc
I just find this very strange
@obsidian moon does the capsule fire hit events?
Yes
the capsule is fine
its just the box collision doesn't do overlaps or hits at all
And box is an immediate child of capsule?
well it was a mesh child
It is just set to the normal Pawn preset.
but i can move it to capsule child
you could try making the collision settings match
is there a way to have an menu anchor-created widget close itself from the blueprint? running RemoveFromParent() doesn't do anything since it was created by a menu anchor
yeah the box collides with the pawn channel
but not with itself
thats the issue here
it won't hit its own channel
yeah so if i set it to pawn it kinda does what i need
the capsule will fire hit events on the box
but the box ignores itself
What do you mean the box ignores itself or it ignores another box?
even though the box is a pawn channel collider
yes this is very easy to test
just do a template project add a box collision to a template character set it to pawn and ingore all except pawn
print on overlap and hit off the box
the box will not fire events from two collisions between itself
only if the other component = player capsule
and I find this strange
again I've done two VR projects now and have characters with multiple collision components firing overlap and hit events
I don't know the CMC that well but I'm guessing it only sweeps the capsule
hmm
I guess teleport controllers sweep colliders
and hmd camera movement sweeps colliders
wait a second
this can't be true
I have a belt inventory that works off overlaps/hits
that is attached to a relatitive position to the character mesh
it detects overlaps and hits fine
but again thats 4.24.3
I've been working with the engine a long time and I just can't accept that a character class doens't support any collision other than the player capsule because it uses the CMC
it's actually amazing that it does that
but yeah I understand the limitations that that entails
your serious?
but i have previous projects that this isn't the case?
well
i guess its not the cmc moving the actor though
its a tracked motion controller
yo how come the instanced static mesh only collides with the player
Neither worked.
The foot placement on a normal static mesh is fine but only when on a collision box or sphere is it messed up.
I'm trying to make this AI follow me, but it's not following. I have a NavMeshBoundsVolume in the level. Anyone know what's happening?
have you tried asking nicely?
Can't seem to find "?IsValid" node in the blueprint search
isn't that node a macro?
does any1 know how to reverse a linetrace
for example linetrace 1 goes from 0 to 10
and linetrace 2 goes from 10 to 0
It was to check, if the Reference to the character class is valid or not.... So I can't seem to find that specific "?is valid" node
just switch the start and end location @trim matrix ?
that function does the same thing
just plug it into an If Statement
@white lynx if that node is a macro, how to access it?
that IsValid pure function that you see in the image does the same thing as the macro
How do I debug an Editor Utility Blueprint? Breakpoints don't seem to work...
oh, wait... they do if I hit "simulate" ๐คฃ
@white lynx i ran across a trell on ue4
talks about supporting box collision for non walking pawns in later cmc implimentation
looks like thats been there a while though
like 5 versions now
so yeah
appears your correct in that cmc only updates the sweep checks with the capsule response
it brings all meshes/collsions objects etc
can i start a new linetrace a few inches of where i hit the last linetrace ?
it just doesn't respond against them only if they hit the capsule
so i have created a vaulting/climbing mechanic, but my camera is of course always attached to the capsule so my camera will be at the actual location where the climbing anim is going but the mesh isnt there. has anyone ever dealt with that?
@bitter ingot you need to develop a system for moving your camera
Anything more in depth to that?
Like what should I even attach the camera to?
I guess it depends on if this is the only time you'll ever have to move your camera
I've used a a cue of control objects that each specify world space, local space, offsets, etc
that pop when they're done
that has worked pretty well for me, since I can't anticipate what kind of stuff I'll need to add
for you, maybe a wall actor reference or something is all you need
So the main problem I don't really get around is when I teleported the camera will always be up there with the capsule for at least one frame, so I guess I should attach it to something different
I already tried attaching it to the mesh but of course the mesh is attached to the capsule and only the climb anim makes it look like the char is there
If you just want your camera to always follow the mesh, look into skeletal mesh sockets
The problem is then the camera gets very jiggly because of the movement of the bone attached to
Is there a way to Place UI lines in the UMG Editor like In Photoshop using the Ruler feature?
@bitter ingot There's lots of ways to get around that. You can use a spring arm, set the camera position to some kind of average, or animate a bone specifically for camera movements.
Can't use a bone, I'm using epics skeleton and how does a spring arm component prevent jiggling? If it's still attached to the bone then it will always follow the bone
You want to either set the location of the camera, or smooth out the mesh movement
whichever way works best for you
hey sorry to butt in, but im making a VR game and idk how to change the player's height, and I need to make the player shorter.
What's usually the best method to determine if my character is in the air?
If you have a CharacterMovement component, you can get the Is falling function.
is there a way to bind data to a button's OnClick via blueprints? I want to pass a reference to "GuildData" when the button is pressed:
@blazing wasp not in this case. A event is defined with it's arguments. What you can do is set a variable, then when On Clicked is fired, it sets off another event, gets that variable and passes it.
ah ok. thanks
does isfalling determine if the pawn is in the air or if it's falling?
it determines if something is within a navmesh bounds but not touching it I believe.
what do you think https://blueprintue.com/blueprint/2tuu8zvd/
Did you solve your line trace issue?
nope not yet
@severe turret why couldnโt he just use an interface
so what are you trying to do at a high level?
And pass the data
make my bullet decal show up at the otherside of the wall thats penetrable
rn its juts showing on 1 side while the bullet goes trough the wall
Bind to the dispatcher
@blazing wasp
If you have a button that has an event that passes some struct
Create a dispatcher that takes the argument
Or an interface
That passes the struct
Implement the interface or bind to the dispatcher call
What about just making the decal thicker?
@trim matrix get the bounds of the mesh you hit
Scale the decal to the width
Attach it at the impact normal
Should do the trick
and if that doesn't work, you can use the bounds and scale your impact point by the impact normal and use GetClosestPointOnCollision to find the best point without another trace
My character doesn't move using the run animations. She only moves in the idle animation. Can anyone tell me what I did wrong?
@static quartz you need to pass both speed and direction
And you need to keep get pawn owner
Cast to your character from it
You also need to connect the execution pin to the SetDirection node
Not get player character
Hello. Earlier I was trying to create behavior for an actor that allows me to click and drag to move it around the scene. Does drag detection for actors already exist somewhere? Anytime I have to do something in blueprint that feels low level, I feel like I'm doing something wrong or at least redundant.
That will only work for index 0
And may not return properly in all cases
Try get pawn owner will always return
And cast to character base
If your using your own variable types then just cast directly to your class
Would be cheaper to do on begin execute
Store the character ref
Then use that ref instead of casting every animation frame
@obsidian moon Okay thanks! I tried following a tutorial but maybe it's out of date. I'll give your suggestions a try
So youโll have begin execute-> try get pawn owner -> cast to your character-> promote to var
Then in animation update pull from that ref
Means youโll only cast once
Get velocity pass and set speed
Get velocity and forward vector calculate direction set direction var
How does one pass around a delegate from class to class? I have not found a way to store delegates, nor set them as a type of parameter.
If your in vr get forward of the camera
Not the actor
@regal venture dispatchers
Or you can implement an interface with a return and override
Like a normal function
For example create a custom component
Add an event
Call the dispatcher
You can then bind to this in your listener
And it will show up like โon hitโ
Or on overlap
In the delegate list
Of the actor youโve added the component to
Sorry, I mean that I want the delegate to be passed to another class, so that the class doing the binding doesn't need a reference to the bound event's class
You donโt have to if itโs a child component class of the actor
It will have the delegate listed
Like a normal component
ex, I have an inventory component, and an inventory UI widget. That has a context button widget, which I want to bind a function from the inventory component to one of its events, without needing the context button to know about the inventory component.
Which I would think would require me to have the inventory UI get a delegate from the component, and pass that delegate into the context button widget to do the binding
Well not exactly
You would bind to the inventory component in the widget
Somehow or another the widget needs to either be a listener
Or implement an interface
Or youโll have to get owner in the component, get hud and cast to your widget
There are multicast delegates but they are expensive
And cpp only
Executions in blueprints need a target
Yeah
You can also set a var up in the widget to store your reference to owner on beginplay and get the inventory component
Bunch of different ways to do it
Iโm not sure exactly of your setup as Iโm assuming the inventory component is part of your character class
What Id do for that situation is setup a dispatcher on my component
On begin play in the widget I get owner cast to character get component bind to the dispatcher
I pass an index and the value
This index and value control the target and value I want to update
That way you can call the same dispatcher for each item
Yo hold up
Makes it easier