#blueprint
1 messages · Page 146 of 1
Does anyone have the BP_FirstPersonPlayerController blueprint on hand? I managed to delete it and can't remember how to remap my input system lol
I don't but my character does it like this
Hello , i have to calculate the shortest angle between two actor to decide wich turn animation is used with a motion warping to turn an npc when my character fire the dialogue, what would be the solution ?
i found this thread https://stackoverflow.com/questions/56749073/getting-yaw-angle-between-two-actors-unreal-blueprints that look valuable but it doesn't seem to calculate the best path but just the delta rotation or i dont understand it completely
Dot product gives you a value between +1 and -1 for how alike are two directions
And when the directions are perpendicular the value is 0
completly opposite in direction gives a value of -1, and completly the same gives +1
Hey, so I changed the Scene root component (in CPP) of one of the actors I've placed in the world. But if a map that had that actor was loaded in the background the editor would crash.
After loading as different map I could compile the blueprint but the actors that were already placed in the world don't have the correct scene root component.
Image 1 - If I drag and drop the blueprint now, this is what it shows
Image 2 - the actor I placed before making the change to the scene component
Does anyone know how to fix this?
thx ill try to use it
just filter by value
test it with print string and event tick to see the values and how they change,,,, i think it is linear with respect to angle, meaning that a 45 degree angle difference would give a value of 0,5
The issue is that dot product doesn't give direction. It gives differences. It's values mirror on both left and right side. To get a reliable direction you need to convert the target into the turner's local space, and get the delta between the current rotation and the look at toration and then use the yaw to determine if it's negative or positive.
i tried just to see the thing from the thread i linked for my own thing and it worked giving me the range on 180 degree with find look at. yeah @maiden wadi i find this
And 45 dont give .5
#cpp message f.y.i
and why my key button was disable
can any one hlp me
i am creating fps game so why my key button was disabled
key button disabled? I don't understand what the problem is
wdym "key button" ?
You are asking about animations in a BP chat. ASk in #animation
See I Want To Create Gun Shooting Anim Montage To Make Shooting Ak47 More Relastice
seees so help
key button was disabled
i need to create new track
@grand surge You are asking in #blueprint , ask in #animation
hi guys im trying to throw the charcter in reverse direction and in ther air if it hit obstacle but it still in its place and not throwing i dont know why i set collision to ragdoll and everything is set to simulate generate hit events but it still happening
Hey why cant I get the 'Set Max Engine Torque' node from my vehicle movement component?
Read the error, it tells you why.
The compilers just saying the node can't reference itself (the blueprint)
But when I try and input the vehicle movement it won't allow it
Sure, but read the error when you are trying to plug the bluepin to the target. That also tells you the exact problem.
hmm
I see now, I have to add the other component and redo all of my configs
idk why there's two
Hi all !
Does anyone know a tip to change my character animations related to which weapon he is using please ?
Actually I am using "Montages"
Do I have to use Animation Blueprint or can I do this with Montages as well ?
(Each weapon has a Blueprint Actor)
A "best practice" question, I think, kind off. Is this better than placing something inside of the tick-event? Since it "only" checks as often as I set the looping timer to be.
Hello, i'm rotating a turret on a vehicle through the animation blueprint by setting a rotation variable.
It currently rotates towards the mouse cursor. The problem i'm having is that it follows the mouse as fast as i can move it.
If i rotate left and right using keyboard i can use a value of degrees per second and a timeline to slow down the rotation to whatever speed i like. But i can't work out how to do this when i'd make it follow the mouse.
I''ve been trying to combine the 2 bits but at best i get it to either slowly rotate in 1 direction without stopping...at worst it becomes a helicopter.
I'm trying to get this:
to do this:
Is anyone available to help me with a tower defense issue? I'm trying to set it so you can't build a wall which would completely block the enemy path, but I can't get the ghost to affect the pathfinding of the path tester, and not the enemies already there.
If the ghost effects the navmesh then it works on both, if it blocks but doesn't affect the navmesh then the path is always clear apparently.
maybe try to interp ?
hmm..i'll have a look at that
Can you always depend on an oncollisionexit after an oncollisionenter?
So I have to set the blendspace in the anim blueprint right ?
So I have to get which weapon I am using (a variable) in the Anim BP ?
What's a simple way to setup a blueprint such that I can destroy it N seconds after it spawned? Tick? OnBeginPlay? Any other events?
SetLifespan
it still in same position : (
wow, thats mad brilliant - thanks! I never heard of that node
is this what you had in mind?
it's like a VFX for a projectile
so I'll try that too
If the system/components reside in the bullet it wont work ofc^^
For the OnDestroyed
would I have to spawn them after the destroy then?
Well the actor and its components is a frame away grom being removed so
They be gone before they can show anything
i got it to rotate smoothly with a finterp..but not quite how i want.
I'd like to set the rotation speed in degrees per second. What it also does now is slow down when it's almost aligned. I do want smooth movement, but not eased near the end of movement.
right, I'm a dummy - I forgot you can't just "unparent" components in UE (like how you can unparent Game Objects in Unity)
Finterpconst
Ah that works, thanks 🙂
Do you also happen to know how to make it not turn back and rotate the other way when it hits -180 ?
The code seem a little strange to me tho
Wouldnt you simply want to set target rep through OnRep ?
And react to that event on clients?
You mean multicasting the rotation ?
It did function in multiplayer...although probably not the most efficient way of doing it.
Yeah i found that tip already in a tutorial, didn't know i could replicate it like that too so was using rpc's everywhere. I decided to just start over and maybe 'do it right' this time 🙂
and change the controls while i'm at it
This now works, except when rotating backwards -180, then it turns back the other way:
Wellll they can be set by the client, but they won't get sent to teh server.
anyone else noticed that UI buttons fire twice when using touch?
found a fix which solves this but it introduces other issues with click/release not getting recognized properly...
[MobileSlateUI]
bTouchFallbackToMouse=false
Hello. How can I make a datatable entry for a piece of text (story) that has paragraphs? Text and string do not allow ctrl-enter to go to a new line. How does one do data driven stories?
nvm found it
True
They're only set locally
Untill server sets it again, causing replication to happen
Hello ! Does anyone know what type of variable an int point is ?
I see screen resolution uses it, but I dont understand its structure
It's two integers.
cheers !
Is there a way to add new blueprint code to the game after it has been built? Using PAK files?
I've been looking into making the game more modding friendly,
So far, I can add new textures, Materials to the build and it works.
Unfortunately, adding Blueprint does not seem to be working this way
For e.g. I have a master blueprint packaged into the base build version of the game,
I created a child blueprint from the master BP, and packaged it into another PAK, I thought it would load after mounting the PAK, but it doesn't.
It's only blueprint that does not seem to load this way, other assets seem to work fine. (Textures, Sounds, Materials, Data Assets, etc.)
Hey, folks. I'm new here with a physics tick/packaging question!
After packaging my project for Windows, my post-physics event tick (used to get move my character's hands to the handlebars of a vehicle each frame) doesn't work as it should. In the viewport and standalone test modes, the hands stay snapped to the bars no matter what. In the packaged game, they slowly lag behind as the vehicle moves forward, and eventually catch up when the vehicle stops.
I have this set up on a Post-Physics Event Tick, as if the engine computes it at the same time as physics, the hands lag behind and jitter around a ton. This works flawlessly in-editor, but not packaged!
Could there be some packaging setting that affects physics that I'm missing? Does my Event Post Physics Tick just not work when things are packaged?
I followed a youtube tutorial to set up the Post-Physics Tick, I can link it if that'd help solve this puzzle. I was hoping to contact the video creator, but his Discord link is broken. Let me know if there's any bonus info I can give to solve this, or if there's a better place to post this question. Thanks!
Class Reference vs Soft Class Reference. What to use and when?
I assume soft is best if you're just dealing with the data or 'idea' of a class, ie data tables, because you want to know what class you're talking about but you don't want to load all of them into memory?
vs a place where maybe you want them ready to go in memory to avoid hitches or keep memory more managed?
I would check out the User Generate Content plugin. Not sure how up to date it currently is, but it was a great option for that not too long ago. I think it was even packaged with one of the learning examples if memory serves?
Can a component keep a copy of its owner. To remove its owner from world anytime and again spawn it?
Like remove from world and add to world? Not spawn.
I'm setting up a state machine and had a few questions if someone wouldn't mind helping:
I have an enum with my different states in my character bp and anim bp and was using those states in the anim blueprint state machine to drive the animation transitions (enum == x). What is the best way to set that state enum in this scenario? If I setup bools that meet the conditions based on the character's stats (vector length, velocity etc) is there an efficient way to set that state enum without doing dozens of if branches?
When the character's "is jumping" bool is on, whats the best way to translate that change to an enumerator that can scale well when any state is set?
It seems the example project has been taken down from Github
SoftClass if you have a data set of classes that may not all be used. Hard reference otherwise. This turns into a very complex topic because you generally still want to load up everything you'll need to keep the game snappy and not wait on async loads constantly. Specially when it changes gameplay on slower HDDs. PrimaryDataAssets can help with this a lot too if you dig into them with C++ as they can load in bundles for different situations.
How come IsPlaying is always true in this case?
This doesn't necessarily make sense with the terminology you've used. World maintains Actors. Actors maintain Components. If an Actor is removed from the world it is destroyed, and when an actor is destroyed it's components are destroyed.
I don't want to destroy the actor. I just want to remove it from the world like in case of when putting in inventory
Because it's thread blocking. You just soft crashed your game in an infinite loop. Except it's BP so it times out.
It exist in the inventory as a reference but not in the world
Removing an actor from the world is destroying it
If you're working on an Inventory system, you can try using UObject for an item instead of AActor.
They're more lightweight and do not have 'physical' presence in the world
Then how do I put it in inventory? When I put it in inventory I don't want it to still exist in the world. How is this commonly done?
Is there a better way to do this rather than OnTick? My goal is to change the material while the audio is playing then change it back
Delegate?
By destroying it
Do I need to destroy it every time when picking it up and spawning it every time I put it out of inventory? Even when the player is just switching items? Won't that be quiet wasteful. Plus the changes won't be easy to maintain
Btw, what's the use of 'Explicit Assets' and 'Explicit Blueprints' in a PrimaryAssetLabel?
afaik, It packages those specified assets into the given chunk ID, right?
I tried specifying the newly created blueprint as Explicit Blueprint, to no avail
When you add something to an inventory, you destroy the item and take some loose data of it into an array, like a struct or data asset that contains a soft ref to the icon, it's stack size, it's class to respawn in the world etc
What if it contains data that I don't know in advance? How would I make struct of that? Like a torch's battery, liquid inside injection, durability of an item etc?
Of course you know that in advance.
How wouldn't you?
If there's a battery on the floor you know how much juice it has
It either has some, all or none
I mean some scenarios where an item has a criteria that is unique to it.
If I drop a sword that has 300/500 durability, then on that sword in the world it has 300/500 durability, and when i pick it up it also has 300/500 durability
I will do a bit of research on this matter.
That's when using UObject derived items are better than using an array of structs
data assets ftw
You can make child blueprints derived from a master BP and give each of them unique variables if you want
Ofc, data assets are a must, but they contain static data, which is not going to be changed,
For something like durability, battery juice, an UObject dedicated to that item works well
Use pooling for both the Inventory items and the actual Actors in the world so you don't waste performance in spawning and destroying them
oh of course, but it's not uncommon for the uobject to hold a data asset reference for it's static data
Whats pooling?
(Honestly you won't lose much performance because GC, you'll gain way more by just not using bp)
That's what I'm saying
I know, I'm agreeing 🙂
You should google it, plenty of info out there
Basically, you spawn a bunch of actors at the beginning and then just hide/show them instead of spawning/destroying
This was coming when I add montage play to my blueprint see
Pooling is a task for later after you run into spawning performance issues. Need a working system first. 😄
Wouldnt worry myself with that from the getgo
When I add this the error was coming why can any one fix
Win+ shift+S my guy
Lovely motionblurred picture
And the montage not playing
With some reflection
No, we don’t see, cause you cut off the most important part which addresses where the problem actually is
Anyone?
hi guys im trying to do a slow motion here when the charcter is thrown but it still fast how to slow it more
It’s for assets rated R 🙃 runs
I think so. Also did you uncheck EditorOnly on the PrimaryAssetLabel entry in the project settings?
Yes.
As I said, it's fine for other types of assets, only BPs are not working.
I'm thinking it might not be possible to add new Code to the game after building.
So how do modders do it then
It's definitely possible, Epic have an article on adding UGC actors. Somewhere in the depths of the docs
There's also a UGC sample project
i hope there is channel for physics because physics is really hard in unreal like add force and and impulse all those stuff hard : (
adding a force and impules are the fundamentals of any physics engine
yea
but yes, there's #chaos-physics #legacy-physics and #game-math
Can someone explain the use of transform location // transform inverse location? How is this different from grabbing a location and plugging it in to an Add node? and why you would use inverse instead of just adding a negative sign to transform location// add?
I'm probably grossly misunderstanding the nodes.. the description mentions changing world location to local, or viceversa, but using some print strings, all i saw was the world location having X (or -X) added to it
a meter forwards (100, 0, 0) becomes two meters upwards (0, 0, 200) for a mesh pointing up with 2 scale
not sure I follow.. between these 4, Inverse Transform Location and Subtract return the same value, while Transform Location and Add also return the same value
well it doesn't do the same thing, it transforms from the local space to world and vice versa, (0,0,0) in localspace is the center of a mesh, (0,0,0) in world space is the center of the world
right! Thats why i was expecting inverse transform to change a world location to the location relative to the actor's root component
btw, one of the operations it will do is adding to the ActorLocation, that makes it move from local to world
but instead of getting like -100 or whatever, it always gives me the world location modified
you are doing halfway what the node does, just not taking into consideration rotation and scale
i was expecting inverse transform to change a world location to the location relative to the actor's root component
thats exactly what its doing
Hello everyone, I’m following this tutorial on souls like combat and just trying to learn blueprints and. I am stuck creating a stamina bar. The bar shows up, I don’t get any errors and the stamina does decrease as the player starts moving slow but it isn’t showing? https://m.youtube.com/watch?v=cwIOh8guNkk&list=PLQsT2_2HjEiMyHNCo1ZN5LalGz_9ffR6Y&index=2&pp=iAQB
Hi, This is first part of my Souls-Like melee combat tutorial series where I show you how to create and handle Stamina, Run and Walk.
Thanks for watching and consider subscribing if you think my tutorials might help you.
Marketplace Animset:
http://marketplace-website-node-launcher-prod.ol.epicgames.com/ue/marketplace/en-US/product/paladin-ani...
im so sorry, i feel really dense haha.. the node only outputs the location vector, so how are the rotation and scale being factored in? Or is this what you were referring to earlier in your example of a scale of 2? since my scales are 1 its essentially the same result as an add or subtract on the location vector?
here is a screenshot
that depends on the rotation and scale
transforming (1,0,0) from local to world will give you a vector pointing towards the front of the character, whether it is at rest (1,0,0) or eg rotated 90 degrees (0,-1,0)
I think maybe i understand (dubious lol).. because I'm using a paper actor with a root that never changes rotation or scale, it essentially works the same as add/subtract
but if i were to modify rotation/scale, then I would see a difference with add/subtract
have you ever used the node "GetActorForwardVector"?
yeah, for movement input
and that's what you were referring to with "what is in front" im guessing
that node is just a shortcut for the c++ code
FVector USceneComponent::GetForwardVector() const
{
return GetComponentTransform().GetUnitAxis( EAxis::X );
}
FORCEINLINE TVector<T> TTransform<T>::GetUnitAxis( EAxis::Type InAxis ) const
{
if ( InAxis == EAxis::X )
{
return TransformVectorNoScale(TVector<T>(1.f, 0.f, 0.f));
}
}
so its pretty common, when you need to get a position relative to a character
That's what I'm trying to find out
I'm trying to detect chaos geometry simulated phys, but they aren't triggering overlaps. So I'm attempting to attach niagra particles to the trails and detect them instead, helpp
Unfortunately, it's no longer available, Github link is down
Are you sure?
Still up, you just haven't signed into a github account with access
Make sure the github acc is linked to epic games, and you've accepted the inv to the organization
Huh, I thought it would tell something like that
It just shows a 404 not found page for me.
I'll try that
Hi!
This piece of code is part of the VR Template project:
What does Is Over Hit Test Visible Widget?
I'm trying to understand, but I have no idea.
Thank you.
help find this
`Returns true if a widget under the hit result is has a visibility that makes it hit test
e.g. Slate widgets that return true for GetVisibility().IsHitTestVisible(). `
Yes, I've read it three times. Do you really think I'm going to ask this without reading the documentation?
Sometimes it happens
Sometimes, people don't help.
I’m having a issue trying to get my stamina bar to work could someone help me understand why it wont regenerate stamina? It’s showing the widget and player character clearly loses stamina but it isn’t showing the stamina Lost or regenerating. Been at it for 2 days now😩
show code
To what I understand it returns true if the "Target" is over a widget that is "Visible"
i believe this is where its being called
im a noob bro im sorry
people here ask things like how do you get an array's length, which means the bare minimum of right clicking the screen and typing length was not done. so expect people to make sure you did your due diligence
are you following some tutorial?
Yes exactly I didn't want to be mean
yes i am
its the souls like melee tutorial
Thank you.
ok, wdym by "regenerating stamina doesn't work"? A widget is not updating, the variable is not changing, etc. ?
Hi, This is first part of my Souls-Like melee combat tutorial series where I show you how to create and handle Stamina, Run and Walk.
Thanks for watching and consider subscribing if you think my tutorials might help you.
Marketplace Animset:
http://marketplace-website-node-launcher-prod.ol.epicgames.com/ue/marketplace/en-US/product/paladin-ani...
got an odd question..
Is there a way to have something along the lines of the event 'On Release' working even when the mouse is no longer over the specific component? Aware that it doesnt work with that event, more curious if there is a way that does the same thing.
For context, an actor gets selected by clicking on it in-game, using the 'On Clicked' event, but by the time of release its possible the mouse is no longer over the actor
The stamina depleted but doesn’t regenerate
what regenerates it, that timeline event? also people don't have time to watch bad tutorials to troubleshoot lol
If I play in editor when I jump a couple times the character becomes stamina depleted but he never regenerates it and it never shows in widget that I created, although widget is showing
ok, do you know how to use print string and break points to debug your code?
No I was just using chat gpt to troubleshoot and it said the same thing
You have to look where you are calling the "event" to "regenerate" the stamina thing
chatgpt to troubleshoot
...
Is this where it’s being called in character bp?
You should know
Trust me I have been investigating for days and just needed help
rule# 1 don't use chat GPT for UE5. It wasn't trained on it, you're likely to get better answers from a Roblox kid that's never done UE.
I wasn’t sure that’s why I asked
It's ok and we will try to help you
How would we know?
😂 okay I won’t
Sounds like an event that should start regen
#1, you have to have an "event" that regenerates your stamina
from your screenshot, it looks like you're calling that event on your Sequence
on BeginPlay
#2 You have to "call" this "event" when you need it
yeah, begin play only gets called once in the beginning. and if that tutorial told you to do this stuff...maybe trash it
Ok, my apologies
Im just trying to learn it’s somewhat difficult to decipher thru these tutorials
it's why they call it tutorial hell
To be fair, the learning curve is pretty steep
if you got no prior programming experience
I am knee deep in it rn!🤣
aye, it's ok to get your feet wet in the beginning, but if you keep following those, you will start hating the engine and uninstall
When you say “call” an event could you possible elaborate for me?
right click the graph, type the name of the event
you'll see a new node that's blue instead of red
that calls it
I have about 1 month
So I should call it to regenerate stamina? It goes before the event?
it goes where/when you want it to regenerate
where is your stamina depletion functionality?
The question is : "When do you want it to regenerate ?"
It is a souls like stamina bar so as it is used it is depleting and then upon inactivity it is replenished
When character isn’t attacking or running
is there any OnActorClick released event?
So you have to find (in the code) where the Character finish his attack or his run
So I am fairly new (less then a week) to UE I have set up a basic dmg system with health ammo and reloads. My problem is that I tried to set up a basic health bar. Everything is working trough actor BP and an interface. The Widget should call Health and Max Health Variables and display the percent after that. My problem is with the calls for some reason for the life of me I do not know why the get Health function calls the Max health Variable and the Max health just call "0" at all times. I have attached some pictures
also the interface and everything is attached to actors as it should
I don't think so
What does this do?
Mouse released event
are both events implemented ?
quicky bumping this
(also, having this as a component makes way more sense )
more precisely, when left click is released on top of the actor
track the clicked actor somewhere
or as Neo suggests i gues ?
Suppose that fires even if click is pressed
This wont work, as the mouse is likely no longer over the actor
when mouse left
reply was to jinwin
mb
but isnt that the moment you wanna know anyways ?
If someone clicks (and holds) while unhovering the actor), nothing usually happens
so you'd simply reset the click when ouse leaves
here it does matter unfortunately
you can do this but it's something you need to code yourself
yes everything works if set up the widget in the actors with local variables
thingI may just do is increase the clickable collider massive, kinda crude but hey
not sure if that confirms their implementation
can you describe your use case @thick pond ? i'm loading up an old project to see if I have what you need
sounds very crude indeed
Yeah im getting curious aswell
No, i need both
I`m highling character on click
need to remove the highlight on release (anywhere)
On release, or also on unhover?
I'm confused, are these 2 separate issues or 2 people working on the same issue lol
Anyhow, if only on release, then you track it somewhere
xD
Jinwin seem to have a similar issue
2 seperate
can you tell me how I can check that or is it too hard trough discord?
uploading clip, one moment
god this network connection sucks
if release anywhere but over the actor resets it, can't you just reset it on mouse leave?
Basically, I have an actor that acts as a 'pivot. a clip below.
its possible the mouse is no longer over the directional collider used for the pivot to know what direction to travel in.
When clicking outside of the actor (after release, which is not picked up by the pivot) it destroys it, hence why it goes away
IN this clip, release happens a second or two before the pivot goes away for the final time
Click event is broken as fuck
Sometimes it does not works
Do click event needs somehow a click+release idk? it does not always works
My mouse is working
how about locking the mouse cursor in place while dragging
is a posibility yeah, would require a rewrite of the entire pivot 
I didn't quite understand jinwin's tbh 😅
the 'part' is tracked, the pivot not exactly
Also, you can change the actors tick group
to atleast reduce the 'drag'
i've atleast had good luck with that before
for mouse / world coordination
sure you're not hitting anything else?
OnHover works 100% of times
you can do a check in the Playercontroller on tick
On click not working
kk
since you're pretty much copying UE's gizmos, if you look at what happens in editor, they lock the other axes in place
so you can still move the mouse but not the object itself
here the 2 axes are also locked, only one can be moved at once for the parts
what about caching the initial direction on click, and using that until released?
hmmm
if I'm understanding correctly, being on top of the wrong axis on release is the issue right?
or on no axis
specifically if you are not hovering the entire gizmos anymore
so the focused axis get no release info
yeah, I would make the release function agnostic of what it is currently over
in UE, your mouse can be in Africa, so long as it's down
true, but it wont recognize the release properly if not over it
why not
we don't know where you put these prints
Is there a way that I can use audio and particle components in my vehicle blueprint without them taking up so much memory?
since the event literally wont fire if you are not over the actor
so you just need a global mouse release
yeah, probably will then. Kinda unfortunate as I was hoping to get it sorted with just the click events on Actors, but hey
weird, maybe do a hit under cursor and see what prints for actor
But released works, also it is "over"
shouldn't this gizmo be a widget instead of an actor tho?
Also "double clicks" always works somehow
idk what you mean by "over"
that was the original idea, but that started running into some other issues, which could have been bc of missing knowledge tbf
I'd say so (use widget that is)
does it happen every time or only once when you hit Play?
I've an issue when spawning in characters
im not seeing this issue in another random project

one of these things might help
idk how you make a widget own the capture but it might be a start 😅 and #umg might know
breakpoint has informed me, just as you guys said, it is the refresh stamina node but i dont understand why it isnt working
yeah, had a feeling it had to do with input mode
Okay, found a solution that for prototype phase probably will suffice: Add a collision sphere, and enable it when the gizmos is moving. Release will always be captured that way
that looks so cooL!
and im stuck making a stamina bar lol
Create a base class that uses variables for holding all the audio and particle effects but leave them empty. You then use this as the "logical" class that has all the logic you want for that actor that you can pass around everywhere, but then have a child class that has all the audio/visual variables defined but has no additional logic defined - this is the class you spawn.
You can also use soft references and async load them when necessary if you also don't want to load everything from the get-go.
I'd prob still track it elsewhere instead , surprised that works tbh
Anyone know how can I combine 2 vectors ?
I mean, its still over the actor. In the long term i'm probably gonna replace the entire gizmos with a widget instead
If I "add" them the result is weird
what result are you after
Combine a "forward vector" and a "right vector" for the "Add Movement Input" node
you must normalize
the result
Ok thank you
as they'll become a vector with length of 2
Before the "+" operation ?
after
Ok thanks a lot
1 + 1 = 2
Add Movement expects 1
how did it inform you of this
I will try that, great explanation
btw which node will get rid of integers and only use who numbers?
@regal iron put a print string on Cast Failed and see if it prints
when i press play it stops the in editor play immmediately. i assume because at event play it cant find that data. okay im doing it now
does it show a big red arrow on that event when it stops?
that means the code is firing
that's what breakpoints do, they tell you, hey I managed to get here
you should be concerned when it doesn't stop
oh ok i misunderstood that thank you! it didnt print on cast failed tho
Even if I "Normalize" it always goes to the "right" I don't know why
I figured it wouldn't when I realized your code went past that point
so find out what is not firing
should i breakpoint all stamina related variables?
show the code
no need
Refresh Stamina Regeneration gets called
you know that now
now find out what in that event doesn't work as intended
you had a branch, a timeline and other stuff in there
does it get past the branch, does the timeline work, etc
okay im doing so now, thanks Neo!
Yes it is
Normalize 2D Vector
so you should be able to use that
Nono
It does not make sense I guess
but...
Or I have to multiply them ?
For the Get Forward Vector ?
Ok so the Red is Forward and the blue Right
How did you do that ?
No the pitch is always 0 for both nodes
debug is ofcourse just Draw Debug X
on Tick with duration 0.0
helps visualize
If i dont normalize, this happens
How i can make when i press left button to automatcly go at infinite and dont stop at fullscreen or windowed! like i try make to dont go right when you want to select windowed and press left until you find fullscreen. like to repeat the text
Can you test your code into a "Add Movement Input" please ?
I did the same but still same issue
So maybe I have a setting that is disturbing the code
Ok I guess I found what the problem is
It was my "Scale" value
It can't be always positive
My bad.. sorry
Thanks a lot!
glad you got it sorted
may you help me to :(
wdym exactly?
Is ok now?
i believe this is the issue @lunar sleet
that exclamation mark is pointing to the fact that the node is not connected to anything
so if that Macro handles the stamina regen, you need to connect it to the execution path
Is this better?
and how i can make them work both of them?
sould i do exactly like that?
yes
but use your own LeftRight thing
(all those conversions seem a little crazy mind you)
thanks!
okay, how let me try that right now
connect the node
connect it to the branch? ive been trying to figure out where to connect it. im sorry im really a beginner in code smh
Heya, sorry for such a long delay for the reply, had to step away plus spent some time testing out what you were saying. Thanks so much for explaining it to me.
Will setting the value of a text component in my widget ui on every tick cost a lot performance wise?
Sorry for a basic question but I am new and at my wit's end with this particular thing... how do I output the change in yaw speed? I have tried using the GetLastUpdateRotation and the GetWorldRotation but no matter what they seem to output the same value, so the delta is always 0. My ultimate goal is to output the character's turn speed in such a way that I can make it a variable that affects their sprint sped modifier. Thanks in advance
Track last frames rotation in a var
Tick -> do current vs last calcs -> update last
maybe watch the tutorial again for now, and see where they connected it.
im watching it now its not connected.
so they never connect this macro throughout the entire video?
I tried testing it, and I think I understand transform location better, but not so much inverse.
I made a dummy with location 0, 0, 200, scale 1,1,1, rotation 0,90,0 (forward vector 0,0,1)
I used Add, Transform Location, and Inverse Transform Location, each with a value of X:100, Y:0, Z:0
At first the results were throwing me off a lot, apparently get actor transform was having some updated values despite me setting actor location back to original, so I created a variable with beginplay to store the original transform, and there results became closer to what I expected.
Add: 100,0,200
Transform: 0,0,300
Inverse Transform: -200,0,-100
Tried upping the X value on add,transform,inverse transform to 250 and results were
add: 250,0,200
Transform: 0,0,450
Inverse Transform: -200,0,-250
This is what I have but it still outputs 0. I'm sure it's something silly though, literally on day 2 here haha
Delay
Remove it
And do the calc before storing last rot
Not after
If you want you can branch with a 'InitialRotSet' to avoid fiest frame weird values
Is there logic built in somehow that prioritizes the smaller number (in this case 30) over the larger? Because if both branchs meet are True wouldn't they compete?
or am I thinking about this wrong?
exclusive?
If you only want one of them to trigger
yes
So exclusive.
So what's the alternative?
Mutual exclusivity
A gate?
I tried that
Try again
oh so I should do smaller numbers first?
Dont have to
I removed the delay but not sure I understand what two things to run the subtract between in order to figure out yaw delta over time?
These just return 0
But you gotta know where what triggers
Well if x<70, and the branch for x<30 is after and it is only triggered if x<70 then it will never run
Store the rotation in a variable 'LastRotation'
bc if x<30 then it's <70
Yes, but <30 is the significant of those two
Anywyas
You wanna check <70 if its not <30
yea thats what im doing
Not with the sequence you're not
that doesnt rlly make sense to me
yeah i got rid of it
Show code
works
Running this on every tick isn't gonna be performance heavy is it?
It's just setting text values and changing the color
Based off?
the mph of a vehicle
Then its alright
okay
oh
Lerp color green to red
thats what I forgot, the lerp node
No need for the checks in that case
(Unless you need a 2 stage lerp)
Sadly theres no multi lerp
Out of the box
So you gotta make it yourself
so I'll just* do the check method then
how long would that take?
Not long if you know your way around in ue
I have like intermediate experience
This is what I started with before but I am just not sure where to go to get it to display what is essentially the turning / rotation / yaw speed, since whatever I would subtract from the LastRotation would just give me 0. Thanks for the tips so far I appreciate the help
Between the tick and the set node
Delta = get last update rotation.z - LastRotation
3* select nodes and a value check
Hey all, I have a static mesh (the key) and a material billboard (fake glow) inside of a blueprint.
Currently the billboard clips into the static mesh depending on the camera position as shown in the image. I want the material billboard to always render behind the static mesh.
How would I go about this?
Not understanding what to put there?
I just fixed my bug but i got a mini bug that i dont understand the sense!
When i press the left arrow its working as wanted but if i press the right arrow its just shows Fullscreen and windowed fullscreen and not the windowed to :(
value check?
The delta calculation
Value <= 50%
What would that do?
Btw do you know any good tutorials explaining how to measure the damamge on character bones? I'm trying to make a game where you drive a patient to the hospital. And if they receive damage on their leg for example, on the Hud the skeletons leg would turn red indicating damage.
Max+1 for up
sounds too complex, I already got a working system but I appreciate it
so i set this to 2?
or?
if a blueprint bool type function doesn't return anything, will it compile?
let me show you a screen shot
are you talking to me?
@spark steppe
that compiles yes
ofcourse not
so bp versions don't need to return if they have a return type?
Hi does anyone know why blueprint lines sometimes become faded? I've tried looking up this but couldn't find anything, I thought it was a popular question 😬
In my control rig I've got functions with all lines faded, another with only partial fade, and the last with none faded
i mean not important right?
i think at least one return node is necessary (if they have a return parameter)
logically it will have one return node yes
but the question is we look at it according to the C++ side, not all branches are returning its type!
bool foo()
{
if(bCondition)
{
return true;
}
print("Hello");
}
this will not compile since the last branch is not returning its type
so bp by default is returning something out of the box if we don't return anything?
which is one more reason to do it the same in BP
idk the rules for how BP generates the return value if there's no return node
return bCondition;
no
(unless you want to do something on false)
1.) this is example
2.) it would alter the behavior of the function
i just created a native code from that bp example, now everything is clear
UFUNCTION(BlueprintCallable, meta=(Category="Default", OverrideNativeName="TestType"))
virtual void bpf__TestType__pf(/*out*/ bool& bpp__NewParam__pf);
they don't have the bool type functions
they take them as void
and body got 10 switch cases with a while loop 🤣
will never use bps if extremely don't need
someone can help?
a by 1 error prob
why are they different btw?
consider doing these things in C++
idk
you can use a Wrap node
i found the tutorial on Google
i mean game user settings
i am sure he will need more options in his menu
wrap node?
I mean it's a tiny bit broken but workable
but where i place it
or what to do?
not rly, you just gotta adjust the Min or max accordingly
i think it's wrong then, too?
updated screenshot below
might need some adjustments, testing it out
that can be applied to a big part of UE 😄
here
on a default value of 0
seems to work fine
see if that works for you @trim matrix
Games can be made entierly in BP, never say do it in C++ here
they shouldn't though
they can be ofcourse but shouldn't be 😄
mix of both is the right way, solely one or the other is generally bad for business
Why is the min -1 btw?
because that node is partially broken 😄
supposed to include both Min and Max values but it fails to do so
ic
lol, you may have been right
it breaks after several iterations if I use only increment, and doesn't work if you start by decrementing
Hello, do you know how to make a tutorial widget like "Press F to interact" but "F" changes according to what the player chose in the key binding settings?
uh prly CommonUI, but you'd need to have an image for every letter
some bindings you probably should not allow the user to customize IMO
Does particles have collisions? I want it so that if the player overlaps then it damages them
or just implement it, simple
but I don't want to use a box collider as its a cone shaped pipe leak
yesn't
things that they should collide with need a Collider Gametag
i try now
Is that fairly simple?
it won't work, that node is more broken than I remembered
depends™️
for one actor, yes. just add it to the game tags
it's just a "string/name"
I'm not following
Right I've done that
i don't know if they fire events tho
or if you have to do it in the niagara system on collision
it only works Fullscreen and windowed
but not windowed fullscreen
So I put the tag on niagara and the gas leak bp?
it breaks anyways after several iterations, that node is cursed ^
you put the tag on whatever the niagara particles should collide with
probably as few as possible
Okay but how do I use these tags?
???
they're just for niagara to know that it should consider the object as collider
just add one and check if it's 2 then set it to 0
how does it communicate with niagara?
Do I put the tag on that too?
ahh okay
how to add one?
like i try from 3 to 2?
just use modulo div....
why? how would that work
I've put "Collider" in the tag of the third person character and the gasleak bp but still nothing happens
now what i do?
i don't have messed much with that part of niagara yet, so i can't help you further, sorry
delete the wrap integer node and never add it again to anything
ah okay
and what i sould replace with?
did you debug print the modulo division thing that you had before?
i can't recall exactly how it behaves with negative values
might need an abs() node behind (if it spits out negative numbers)
like this?
no
i typed abs and click on absolute integer
is there a way to spawn the collision and despawn the collision in time with the emitter timing?
I'm not sure the nodes for it
why are you telling him to use random things that he doesnt know how it works
then what to do :((
I mean just for a box collision to spawn > delay > respawn > delay > loop
he HAD modulo before
@trim matrix this should be pretty straight forward. the print strings are for testing only
i said he should try it again and debug print it
but yeah modulo is also viable I'm sure
THATS WHAT I WANTED
question on approching mutliplayer in blueprints
lol i completely skipped that one my b
tbh the wrap int might also have failed because I didn't cache the incremented/decremented results before printing them, but at this point I can't be bothered 😅
Bruh the up one works the Fullscreen and windowed
and the down one works for fullscreen and windowed fullscreen
whats the sense
I WANT THE 3 OF THEM
THE WINDOWED,FULLSCREEN,WINDOWED FULLSCREEN
SOMEONE
i am dying in pain
Any idea for box collision to spawn > delay > respawn > delay > loop
otherwise, if you want to use the one you have, you'll need to do the other 80% of another game dev's job and debug
for what i want the blueprint for?
what video
my math?
.
should be >=3 i think
isn't there only 3 options?
wait
it's index 0 to 2 no?
0,1,2
why are you posting this
but it's confusing to read
i would increment/decrement before the branch
I considered it, but thought maybe it would break things
in retrospect it prly wouldn't cause you overwrite the value
still, the math works, and I made sure to increase and decrease dozens of times, to make sure it doesn't break like wrap
just do what he wrote
1h later we got a number wrapped between 0 and 2
I still don't see any of the math I gave you but like I said, my solution might not be the best one. If you're going to use modulo though, you need to debug and find out why it fails
Anyone know why the collider isn't being activated and deactivated but the particles are?
the part you need is the math. Plug the enums and everything into it and you're golden
idk
me?
I had events and print strings so I can make sure it works
why would it suddently not?
i am afraid
not sure what you mean
you shouldn't copy paste code in your project which you don't understand anyways...
settle for something that you understand and that you can fix/adapt later
I mean I was hoping it's legible enough to understand
Basically every 3 seconds my smoke particle will start and stop for 3 seconds. I want the collider to do the same so that when the player overlaps the collider it kills them
so maybe just go with a clamp -_-
yeah I was gonna suggest clamp but then the options won't wrap in the HUD, which is prly fine
that would even be better in the game
you could know that there's 3 options
I don't understand this "I want the collider to start and stop for 3 seconds", these things don't work the same way
(it's not)
i think i made an decision
i will make the code that you give me
the entire one
I've tried this and I feel like it's getting somewhere
I still don't know what the actual issue was but I'm glad you're making progress
can you resend the image
to completly make
it looks more complicated than it is. remove the convert to string and print string nodes, adapt it to your code and you should be golden
it looks more complicated than it is - So basically like all 🍝 code
also sucks to refactor
ugh
spending alot of time on this lol
you can make this into one function with multiple return nodes and it's super simple
that node setup is your PhD thesis now
Title: "On how to re-implement Wrap (Int) because Epic failed to do it right"
I dunno man... Some spaghetti, even though it looks more complicated than it is, likely is too complicated simply because its spaghetti.
Also, I made this some time ago.... probably be better as some C++ but whatever 😛
Hi, can someone explain to me how the "On Component Hit" event works? I created an axe BP and attached it to my character's hand socket. I have created a BP of the object I want to trigger this event for and added the component "Cube" to it. When I run into it with my character the event actually triggers for my character's "Capsule Component", but it won't trigger for my BP Axe, which is held in the character's hand. Why is this happening?
its good to test?
i hope i did right
no you didn't
WHAT
nothing there is using/updating your window mode
now he comes to the rescue 😛
he told you to use window mode instead of test number
my bad
don't worry my guy, I'll code this one for you, from start to finish. First and last time I do this for someone tho 😄
i want discord timed alerts
so that i can be remembered in 1 year to congratulate you to your wrap integer day
int rangeSize = (max - min) + 1;
outputFactor = (val - min) % rangeSize;
return outputFactor < 0 ? (max + outputFactor + 1) : (min + outputFactor);
Yeah, alot more readable and cleaner but spaghetti is quicker
better?
OMG FOR ME?
THANK YOU
does it work first
let me try
I mean you pretty much have it, missing a couple of Set nodes, but if it works, then I don't have to do it
i wonder how the increment on a temporary conversion result works out...
since it changes the var by reference
yeah
I think it might be like the y = x++ discussion I was having in #programmer-hangout but not sure
also why can't I find this int to enum conversion node he has
it's automatic
convert to byte first
that's what I thought
it's harder than the gta train mission 😄
use Datura's function
put it in a blueprint function library
and stop finding a ugly hack
not an ugly hack 😦
dude
I made it pretty
- My fucntion is not guaranteed to work™
it's not a hack, it's literally the way to understand how to code basic stuff by HIMSELF
then put it in a macro lib
it sould work this image?
from my understanding he doesn't even come close to getting it
true lol
bro is just asking if it works
incremented and decremented
but Ben wants a one node solution so I guess I'm doing that now fml
Datura did post the solution
it wasn't one node
yep, multiple nodes in a function, I can do that too
it's a matter of collapsing and moving some stuff around
mind you
I like his better tbh
anyways, that concludes my thesis
So this should be put in C++, in a BP function library, right?
variables?
Yeah - if it works right. I haven't used that in quite some time.
the test number is a temp storage. you might not need to use it, but I haven't tested if the math holds without caching the information before altering it.
fastest PHD ever
you aren't done yet
no, you said Datura already won the Nobel with his formula so no point now
alright, no PHD for you
whaty's PHD
a doctorate
did i do right?
seems legit. does it work (x4) ?
what x4?
for the 4th time
you're really good at building suspense I'll give you that
implement it in your games and you've got AW2 😄
looks like your missing a line
the false from the top one @trim matrix, it just ends when you decrease
the print is not needed, this is so I can show that it works
yeah, connect the 2nd row
I prly should've put the redirector on the very top line but f it
wtf?
fixed it
maybe mising somthing
the Enum?
a few things according to your last screenshot
where?
the text is E... seems like an enum
maybe this is the issue?
ahmagad
ok
let's start fresh DnuSmoker...
rightclick in content browser and go to blueprint => blueprint function library
Name the new asset MyFunctionLibrary
no, it's 2 in the top row, 0 in the 3rd row
anyways, yeah just do what Ben says at this point I give up
i c your trying to loop around this thing ?
yeah, avoiding the cursed Wrap node
I think at this point you may need to give it to him in BP UE, so he can just copy paste
xD
stop helping him lol
he doesn't know what is 1+1
we gonna make it faster than this
ok so i wanted to make an menu that has an option called Settings
yep
so fun.
yea i'm almost tempted to open UE, create the function and copy it...
the real hard part is how to change the size of the window
hmm
delay nodes?
nvm
but i think this is the code but i think we miss something inportant there
maybe play less fortnite 🤷
I told you
3rd Set node is 0 not 2
using delay nodes might help for faster code btw @trim matrix
you should consider them
