#blueprint
402296 messages ยท Page 859 of 403
though that will only fix one issue
I've got another one.
There are some targets to shoot at while playing. If you miss a target and it goes behind you, I want to somehow, make the player lose.
Player only moves in Z right, everything else moves?
yes
Do you have a "make the player lose" event already set up?
kind of. It is currently a boolean.
I use casting to make it work
Just make it an event somewhere.
Event GameOver
Event hit on player pawn -> get whatever has the event, call event GameOver
TargetActor
Event Tick -> if self.X < 0 (has passed the player pawn), get the thingy, call event GameOver
Or have a trigger box behind the player, same idea.
Event Begin Overlap -> Call Event GameOver
just make it so only TargetActors overlap with that box and it'll filter everything else out
Probably would belong to the Gamemode.
Event GameOver -> Get all moving things, tell them to stop moving -> Get player pawn, do the game over animation, etc etc
Hi ! I created my own pawn movement using addrelative rotation+location as well as setworld rotation+location and I am trying to put a bit of physics on a mesh that is inside the pawn. I would like to constrain it to the scene used to move the pawn/actor so it would move like a spring locked on Z axis and following the linear movement I made. But I tried without success. Is there a way to achieve this or will I have to also code the physics for my specific case ?
This would be #legacy-physics but you can give a spring a constraint with the constrained components being the character root and the spring.
it depends on how the spring is supposed to work, but a constraint with limited linear range and a linear motor should do the trick.
any way to get 'on animation finished' event from a skeletal mesh component?
If you mean a montage you can do this:
Thanks!!
how can i headshot with live trace on an enemy without skeleton using box collision?
Determine what elevation you consider to be their "head"
If you use a capsule collision you can also calculate directness of the hit
But you could do that with a box too with a bit more math
ok but how can I make the line trace detect where the head is and where the body is?
Multiplayer Movement Jitter
Hey all. I am having an issue with client movement jitter when using P2P. Using a standard set of movement inputs and the character, and components, are replicating; Replicate Movement, Replicates, Component Replicates. and Net Load on Client is ticked.
Is there something I am possibly missing with what I have mentioned? Or could the issue be else where?
I don't know, but you may be able to get help over at #multiplayer
I thought someone would help me
You could detect it via bone name on your skeletal mesh or attach some capsule components
my enemy has no skeleton, i've said it before.
Gave you 2 solutions
Hello guys any course that could recommend about data structures and design patterns to apply on UE? or books
and what are they?
๐คจ read the message?
.
I already did the second solution, and the line trace does not detect the enemy's head
From there you could either check is the hit is inside particular component, or foe some little optimization, smth that I've done in my cpp project, you can save only essential values about the component and delete the component itself
It won't magically happen, you have to code it
do you think i downloaded the unreal engine now?
With cpp magic it is designer friendly as they can use the component to set up everything and it will delete itself in packaged game
Looks like this
I've been using the unreal engine for 3 years, and I've never made an FPS system because I don't like it very much, it's just now that I need it because I have a school project to deliver
I couldn't care less
hey does someone know what the box with an X is?
with the vector and the float going into it
multiplication
vector * float?
yes
neat
Compare the hit location to the hit actor location.
If the hit actor is 2m tall and you hit it at least 50cm higher than it's location, call it a headshot.
crouching?
could add a bit of a flaw
why don't you just add an invisible sphere for the head and line detect that sphere?
if it hits anywhere else do x damage
if it hits the sphere do x + x damage
doesnt traces return bone hit or whatever?
nvm, no skeletal
for crouching you'd just reduce the hit Z value for headshots
so instead of 50, it's reduced to 25 while crouching, if crouching even is a thing
I believe that static meshes can have sockets too can't they?
Er. Head thinking backwards. Might not work for the detection case.
closeness to socket could work
I'm lazy. I would just split the meshes and call it a day.
Is there a node like the MultiGate, but instead of just started at the given index and going down the pins per execution it stays with the pin the index is giving to the node?
Switch on int?
yes thanks, I have yet to use switches much, any videos on them? I want to learn more about nodes I have not used yet. Thanks for the quick response as well.
I have a situation that I need help with
Well they're not hard to use
It's basically like having branches for every value you want
I want to Cast To an object but it only spawns whenever a player desires
You can find a lot on blueprint nodes in the documentation
ok, I have used other switch nodes (mainly string) just never knew there was one for Int
there's a switch for enums aswell ๐
only one can be spawned but I've no idea how to tie the cast to this specific instance
Int and enum are more common than string switches actually
Also, it is a good idea to connect up the "default" pin aswell!
that way you can catch and tell future self about the lack of implementation
C++ (which is what UE uses) doesnt support strings by default in switches
Then you should either let the player or spawned object tell the other thing it spawned
ok I will try to stick with using Int switches so far it seems to be working great for my purpose, the string was just what I saw someone else was using in a forum post and I just kind of stuck with what they were doing.
Yeah it works fine tho, don't worry :)
Enums are usually preffered to raw strings for states
Less prone to error ^
Thats the biggest benefit of FGameplayTags aswell as i see it
I think I might be onto something, ty Eezeh
yep it works, whenever an instance gets spawned, the spawner designates itself as the origin
Sounds good to me!
such a simple solution to this recurring problem I had, this is amazing
How would I destroy all instances of a given class?
get all actors of class -> for each loop -> destroy actor using the array element if you're talking about in game
tysm, get all actors is what i've been looking for
I have some BPs that were created by merging actors into a single actor with Child Actor components.
The child actors are all either static meshes, lights or particles. Is it possible to merge them automatically into components instead of using child actors?
Doing it by hand is going to be very laborious...
How would I go about getting the position of an actor in another level, and copying it to an actor in another? I'm trying to snap my levels together but I don't know how to tell my BP to get the position of the specific actor.
Every level is parented to an anchor. BP spawns a new random level, then the new level needs to copy the transform of the old level's anchor to its own so that they match up.
I'm a noob but I think you should try saving positions in the Game Instance. I believe that can be shared across levels. Just a noob idea.
Save in the game instance? How do I do that? I'm a noob too, I literally started scripting for the first time 2 days ago ^^
Wait, couldn't I make the transform happen in the levels themselves after they're loaded? Like when the level loads, cast to my level spawner BP and get the transform of the first anchor? Maybe?
I'm not entirely sure how casting works
if you read up about polymorphism that should make casting more clear
How could I gather analytics? Example:
How many times player die in a certain level, how many abilities they use and so on?
I'd have to balance my game around this data
unless you use a plugin you'll have to write your own
Do you know a plugin that could do that?
hi guys - how do i make a UI button an image? do i need to blueprint it? cant find a setting within the button details itself
Hey everyone ๐ not sure, if #blueprint is the right place, but still ๐ Currently I have a problem with a procedurally generated level, I use ISM for the floor tiling to meet the room area shape expectations, and NavMesh for the rooms is failing to generate. I've seen a bunch of solutions, but they are mostly about adding some delay or other workarounds. The best what I've managed to achieve is to change the floor mobility state after the generation, then the NavMesh appears, but I'm kinda not happy with such approach ๐
Does anyone know a proper way to make NavMesh generation update with respect to ISM (floor in particular)?
Please tag me on response ๐
I don't know any free ones, I've only been with companies that use paid services
Not sure, but are you looking to just set a texture in the button's Brush?
Yeah - just want custom button images rather than the stock 'box'
isnt that just a set of parameters in the details panel of a button?
@gilded hazel
oh sorry yes it is, i didn't open up the 'normal' option tab. like an idiot. thank you.
i thought it would be as simple as changing an image
turns out it is
Hey everyone, i want to develop this mechanic where the player shoots an object to alter the directional gravity of an object. For example, instead of the object falling down as it would, it's going to move in a X, Y, or Z direction. Currently that is already solved, however, i wanted to move the object always to it's right, no matter what the player position is.
Basically, we have a cube, im looking at the "front" face of the cube, and i shoot to make it move to the right, and it would move in the Y direction for example, but if i go to the "left" face of the cube, and shoot it to make it go right, it needs to move in the X direction, because my position changed relative to the cube's transform vectors.
I would want to know how do i read the position of the player and make the object always move to the right from where i'm standing.
You can use GetActorForwardVector on the player pawn to find out which way it's pointing
there's also one for the Right vector
and one for up
you can get the remaining inverse vectors by multiplying any of those directions with -1
Or using Cross
i think?
Nvm, wrong ๐
cross would give you Up given Fwd and Right
But having the forward vector from the player to determine which way the player is facing, how do we make the object always move to its right. Because depending on our location, its gonna have to move in the X or Y vector
Can your weapons roll, or is this still a traditional shooter where characters stand flat on ground?
how do i do a line trace for my camera?
i've tried some methods and theyre always stuck on one location
GetRightVector would always be right relative to characters orientation
If it's instant, that would work. Otherwise you'd have to go based on the projectile's orientation.
Newbie here. Any idea on how I can move an actor (a camera actor in my case) via BP? I would like to move it via OSC in the end, but for starters it's ok with keyboard keys is ok as well. I found some tutorials on Youtube, but they were not helpful. Thank you so much!
what's OSC?
oscillator?
OpenSoundControl
I'm creating a really simple spline where per tick the position of spline points is positioned at the location of a corresponding scene component within the same actor. I'm basically doing some early testing of how to build a rope swing mechanic where I'm using cubes tethered together with angular constraints. I don't expect this will be the method I will stick with, I am aware of a method using tethers and bones, but right now I am just experimenting.
As you can see, the spline loops back on itself (first spline point highlighted) which, from my limited experience with splines, isn't the default behavior. Can anybody see from what I am doing why this is happening please?
is there any way to retrieve a function from an actor component without spawning one in directly? been tryign to do this but the cast keeps failing even though it prints the name of the asset and its the exact asset i am trying to cast to
Ok. I managed to do it by myself using SetActorLocation. ๐ OSC included
I bet what you're ending up loading is the blueprint of the actor component rather than an instance of the actor component, hence the cast failing even though the name lines up.
Maybe instead move that function to a Blueprint Function Library if it needs to be used in places outside of the Actor Component?
Hey guys! I'm trying to setup a player lives system for my multiplayer game and I've made the UI / widget blueprint with the 4 players and the white dots representing how many lives a player has.. and I've created a Game Instance which specifies the amount of lives via an integer. My issue is every tutorial I can find on how to display player lives on your widget is done using text which is easy to do but I'm not wanting to use text and instead use images by binding the image (dots / lives) 'Visibility' so that they can be one by one be set to hidden upon the health value lowering. I have been able to make my character lose 1 life / dot using that blueprint.. but when I bind the other dots using the same code (and changing their references of course) it doesn't work and I'm not entirely sure why. I'm not even sure if I'm going about this the right way in the first place because obviously with it being multiplayer I need have everything replicated through the server and each player controller value specified so that players can see each others health bars correctly. If anyone can help or point me in the right direction on how to go about doing this that would be much appreciated!
mm yeah, perhaps, i was also thinking perhaps i should use objects instead of actor components but i feel like id be missing out on some things.
but in a single player game an object can achieve nearly as much as an actor component anyway right
or perhaps make a data table of some sort hmmmmmmmmmmmmmmmmm
in fact if id really need an actor component in some instances i can just maek the object spawn one for me anyway
its basically for rpg 'buffs' so mostly passive and proc effects applied to a character wearing specific gear or casting spells
It it's not local multiplayer then having lives on GameInstance won't work
And you could have the dots added in an array and when a life gets removed it just removes it from the array
Pretty sure you can do that with container boxes too, like a horizontal box
Badically add a child to it and remove as needed, even based on indexes
Help pls, projectile through walls even with collision active
So where would you suggest I store the lives integer? The Players Gamemode instead?
Yeah that all makes a lot of sense, will give that a go.
I think a lot of people use actor components to represent each of those buffs/debuffs. So if you want say a player to have a heal over time effect, you add the relevant actor component to their character, and it manages itself - the component can have expose on spawn variables like duration and amount, it can get the owner's attributes and modify them as necessary, and when it's finished its duration, it destroys itself. You could still have a manager AC that handles any incoming effect and keeps track of the effects currently placed on the character, and decides whether or not it overrides an existing effect, refresh an active effect, if it should stack, or apply the effect.
PlayerState
pls help
oh, I see. But would you know whether using actor components in this manner is costly at all? better than using attached actors at least right
Guys, I have such a question. I need to make sure that I have types and subspecies of items. For example, Items and Weapons, from rich come Rifle, Food, and so on. Is it easier to use Gameplay Tags for this, or can you just create two enumerations, one is responsible for the category of the item, and the second for the type of item in your hand. And if I do all this through Gameplay Tags, won't there be any problems with StateMachine?
gameplay tags alone likely wouldn't be sufficient. A more versatile and popular solution is to use data tables for each type of object.
this way you have room to grow if needed.
You can do buffs as actors, buffs as components, buffs as plain old data, or jump into GAS. Depends on how complex you gotta get. HP regeneration buff is one thing, but "retaliate in an aoe when struck" is a whole other level of complexity. Depends on what you gotta make.
The fact is that I have a function of equipping an item by its type, for example, if I want to pick up something that adds health to me (for example, a first aid kit), I press button 3. When I press the same button again, I have to take for example bread or a bar that already has another Item Type in Enum. I could define all such items in one AddHealthType category, but I wanted to make an animation for each type of item. So that he kept bread with one state machine, water with another state machine, and all this logic was just divided through Enum.
that would work. It's all in how you want it to operate. Enums are good for picking between only a limited number of options.
Hello, good people!
Not sure if this is the right channel for this..?
Does anyone know why curves auto bezier cubic option in 4.27 + 5.0EA doesn't work as it does in 4.26?
In this video I compare 4.26 vs 4.27
Timeline curves, animation curves, niagara curves, all that I tried, has this issue.
https://youtu.be/DuAz9aeg2SY
Curves auto bezier, not working in 4.27 as it does in 4.26.
5.0EA has the same issue as 4.27.
As I understand it, in order to already take items by a certain type, I will have to create a new enumeration with the categories of the item?
So if you simply want to choose what animation to use for a specific item, the best method may depend on what you are already doing with the items and how you make them work.
How does the object system work? are they simple actors or is there more?
How does one increase a DateTime variable by one second every time an event fires?
DateTime + TimeSpan
I give up asking for help here, goodbye
if it had the correct collision settings the bullets wouldn't be going through the wall. So double-check it.
lol I checked it 5 times and I also just checked, it's totally correct, and it keeps going through the wall, people on this server are very rude
send a screen shot of your collision settings
and them not answering you doesn't equal that their rude
why is there no 'create sphere' for BP's, just cube ?
is there a addon or addition to project settings I'm missing
What do you mean
I want to create a sphere, at runtime in bp, but all there is , is a cube, closest thing
or does this not do what I think it does
Like mesh? Collision? Sprite? What is it you wanna spawn
Then spawn a mesh and Set the mesh to be a sphere
I tried hiding a actual mesh and unhiding it, but I was unable to figure out the bp , to do it so I gave up ๐
ok I"ll look thx ;0-
no tuts seem to exist for it either,,not that there has to be
anyway looking
Did you ever find a fix?
You gotta be sure what you want to spawn cause "a sphere" could be anything. If you know it's a static Mesh it's what you want to spawn
of course
I want a literal sphere
nothing fancy, like you would add in editor to a level
there is spawn actor, but no 'sphere' mesh
wait
maybe this it, dropdown > static mesh actor
Quick performance ask :
I'm trying to improve my workflow for LD, and optimisation in same time.
I set a bunch of modular wall. For a simple wall, there is 4 parts :
- Interior Wall
- Exterior Wall
- Interior Border
- Exterior Border
To avoid re-draw 4 time each wall by having 4 material on a mesh, i split the 4 part on 4 differents mesh.
To place them easily on UE4 i set up a blueprint who good origins, but those wall have texture who can be changed (for different room...), so for convenient use, i've added a "Material" variable for each part, setting the material on construction.
And now the ask, cause i try to imagine what gonna happen on a huge map with this system. I just trade my basepass with my memory, right ? does it look like worth ?
Hi, I want to make a camera rotation system like in Astroneer. Simply right click dragging to rotate camera around player. I'm using top-down template right now. But I cannot do that. If anybody helps I'll be appreciated. Thanks in advance.
https://www.bing.com/videos/search?q=ue4+create+static+mesh+in+bluepr8ints&view=detail&mid=5AD8D4789E7887AC62A55AD8D4789E7887AC62A5&FORM=VIRE , found this chances are it will do the trick ๐
Hey guys
So, I made this Health component in C++, which is supposed to store every variable concerning Health, Armor and stuff as well as calculations for it and events, now, I have made this for two reasons:
- Easy and Quick implementation of health and death not only for characters but for any actor, by just adding the Health Component
- Avoiding casting to 300 different actors when I need to trigger a damage event
Now, the only problem is that to call the Health Component event I need to fire it up from the blueprint it's included, and this forces me to do that casting stuff where I need to cast to 300 different classes, so my question is if I can somehow make this event callable from outside the blueprint, like if it was a native event of the blueprint
Use an interface.
That's just not the problem. And the fact is that I need to make sure that on a specific button I choose not only a specific item, by type of bread or first aid kit, but something in general. Press the same button so that I can choose both the first aid kit and bread and so on. And it is also necessary to keep their specific type in objects, bread has bread, water has water, etc.
An Interface?
Never worked with them, it's an all new field for me
Oh wait - you want it to be like a red event, right?
But yeah, use an interface to avoid having to cast to 20394823049823 different classes.
The blog post I linked will help you out in that regard.
Why cast to different classes? Just check if the actor has a health component
I'm looking that out, thanks
Yeah, it does that, but I have to fire off an event
And as you see from the screenshot, I need the Event Health Change to be like the red ones
I know how to do it in actors themselves, I have done that, the thing is that the Health component is external to the actor I put it into, so I can't call a "red" event from the actor, only the blue one
Bind to the component event
Oh ok
So this way would it be callable from any blueprint?
Let's say I have the health component in a Character and a Pawn
And that I have a bullet
When a bullet hits one of them would I still have to cast to each of them in order to fire off the right event binded to the Health Change event?
You shouldn't need to cast your actors at all if you are using component events. Let me get back to you in 5 mins
ok
This is kind of an odd question, but I'm looking to create a prototype character, where I'd like to be able to easily change each animation they're using via the Details panel. Nothing is set in stone - idle could be modified, walk, etc. I just want to fly the character around and trigger different animations.
Does it make sense to do this purely by triggering montages for each animation using variables you could adjust in the Details panel, or does it make sense to do any of this via an anim BP? I normally think of an anim BP using fixed animations you don't modify, but wanted to check if maybe there was a reason to still using an anim BP for this purpose.
(Sorry if this is more of an animation question - let me know)
I think it makes sense
I don't have a too deep knoweledge of AnimBPs
Do 2 bottom nodes are equal in terms they will both bind to event at the top? Does Create Event only exists in case you want to bind a function instead of an event to a delegate?
I have no idea, I am trying to figure out delegates as well
Right, so in your component, which is in cpp, what you want is a Dynamic Multicast Delegate. What you want to happen is:
- Bullet will know about the health component and trigger some function there
- Heath component will broadcast your delegate OnHeathChanged
- The actor BP can create one of the Red events for it's own heath component
Because the bullet and the actor both know about the health component, there's no need for either of them to know about each other, so no need to cast
Ok
So I would need to implement that Dynamic Multicast Delegate somehow...
They are effectively the same. The red version is a shorthand if your blueprint has some intrinsic reference to the target. Sometimes that's not possible though - for example if a actor component is trying to listen to a character event - the component can't know it will be on a character so you have to jump through the extra hoop of binding
To Include that I would need a
DECLARE_DYNAMIC_MULTICAST_DELEGATE(OnHealthChanged);
right?
search DECLARE_DYNAMIC_MULTICAST_DELEGATE in code and/or follow the instructions here: https://unreal.gg-labs.com/wiki-archives/macros-and-data-types/delegates-in-ue4-raw-c++-and-bp-exposed (you can stop once you hit "Responding to the Delegate" as you want to respond in BP)
FOnHeathChanged is generally prefered, but yes
Ok, an F before the function name, thanks a lot
The Create Event node essentially allows you to do what the red rectangular delegate pin does, but without needing to connect the event node itself directly
Actually F before a struct name
It's very silly
Oh, sorry, that link is incomplete
Main benefit of Create Event is that you can use it from inside functions to link to an event elsewhere in your graph, where you normally can't link to events otherwise
Trying that, thanks
I'll see if it works!
@wanton galleon what it says on blue "note" part
"No value will be returned by Reference. Parameter 'Actors'
It looks like it binded to the delegate, it complains about something different
If you want to ensure it will work, use Create Event node
Its more explicit about errors
In your health component class, you'll want to declare a UProperty so that you can bind the delegate in BP
FOnHeathChanged OnHealthChanged```
I had written this
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, category = "HealthSystem")
void eventHealthChange(int32 resultHealth, int32 resultArmor);
Yeah its complaining about param declaration or something else
So on the Cpp side ?
Can you show the declaration in C++?
yeah probably you used &
and didnt use const or UPARAM(ref)
UPROPERTY(BlueprintAssignable, Category = "Trigger|Settings|Events")
FEventOnCollisionBP EventCollisionBP;```
I guess I'll have to change it then in something like this
UPROPERTY(BlueprintNativeEvent, BlueprintCallable, category = "Health System")
FEventHealthChange EventHealthChange?
Try using const TArray<AActor*>&, it should disappear
Its just letting u know it will copy data
since its an expensive operation
Ok I try
You want the BlueprintAssignable, not BlueprintCallable / BlueprintNativeEvent
@dense mica I think it works thanks ! (But don't really understand why xD)
Arrays can contain too many elements and each element increments the size of that container by its size, with 1000 actor pointers it makes 8000 bytes
If you dont use & that data will be copied
& tells the compiler to access its memory location and use the data that way, so it eliminates copying
BPs still do tons of copies but ๐คทโโ๏ธ
Also for simply passing data, don't forget const. Just marking & implies an output.
Yeah I'm aware about the reference&, but it's on the BP side that it will ensure to only works with reference and not really working if you don't do so for container that can be big ?
Yeah, it's still not working, it says it's missing a ; in variable declaration
Probably gonna write in #cpp for this
oh ok! Thanks anyway for the help ๐
Oh wait I think I figured what the error was
yeah it was the brackets
alright, thanks. id want to jump into GAS eventually but the project lead wants to be careful when adding cpp since were still figuring out some quirks working with github, it has given us some issues before
I'd do buffs as actors or components for now if you need anything even remotely complex
if it's just speed boosts and regeneration and dots then just do them as plain old data
ok, now that I have binded the event, how do I make it fire off?
OnHealthChanged.Broadcast()
from BP?
From cpp
oh ok
You can call it from BP as well if you make the delegate's UPROPERTY BlueprintCallable.
You probably don't want to do that though
Wait, lemme write it and I'll send you a screenshot from the IDE
The general pattern is
- call function on component
- component changes its values
- component broadcasts the change
I am confused on where I should write it (sounds dumb)
Like this?
I mean, it would be EventHealthChange,Broadcast() but you know what I mean
I had a blueprints problem that required C++
I think CE is right that this probably needs to be in cpp now though
how would I go about stopping rotating movement? I thought it would be simple like this but I can't figure it out
e.g. weapon rotates, upon interacting with it I need it to stop rotating
Try StopMovementImmediately.
Assuming RotatingMovement inherits from the default movement component and overrides that.
still rotates my config must be off
activate and deactivate don't do anything but turn tick on and off
ensure that the key button also works
otherwise set the rotation rate to 0
The key works, I've set the rotation rate to zero too, idk I'm lost tbh but thanks for trying to help
Hi, I want to make a camera rotation system like in Astroneer. Simply right click dragging to rotate camera around player. I'm using top-down template right now. But I cannot do that. If anybody helps I'll be appreciated. Thanks in advance.
isn't that the default in the third person template?
What are these Field components used for?
different things, depending on the type of field
I gathered that much. Thanks so much.
if you want a more specific answer you can ask a more specific question?
There are a selection of field components to choose from in the 'Add Component' section menu. What sorts of things are they often used for?
that's the same question as before, rephrased. you'll get the same answer. you can also look up in the documentation what each field is. like I said, the word "field" isn't uniform, it just means "field"
a vector field isn't the same as a culling field
Nope, there is mouse-locked rotation. When you move your mouse around you rotate. But in Astroneer, if you want to rotate your camera you must drag the right click what direction you want to move.
I cannot do that logic.
I want to use left and right mouse buttons too. So I don't want to make mouse-locked rotation like in FPS and 3rd gamemode. In topdown mode our mouse is free.
sounds like something where you need set a screen position on click, then use the next screen position to test against that to get direction
Not exactly, if you watch gameplay of astroneer you will see what I say :/
@west beaconWhat is your desired behavior when moving mouse with the various button states?
looked at some gameplay just now, can't at all see what you mean sorry
Mouse left click for, click and interact Items.
Right click is for the rotation, like city building game or free-fly in Unreal scene editor thing. You rotate around with right mouse click pressed and being dragged.
WASD for movement etc.
OK so make 2 input axes, hooked up to mouse
right well if you want click drag stuff you need direction like I said
I've built this exact system in c++. I don't use much blueprint but perhaps you can work it out by looking at my code?
`void APN_PrimaryViewTarget::TouchStarted(const FInputActionValue& Value)
{
/* Override previous touch location when we start rotating again
so the camera doesn't snap */
PlayerController->GetInputTouchState(ETouchIndex::Touch1, OUT TouchLocationCurrentX, OUT TouchLocationCurrentY, bIsTouchCurrentlyPressed);
TouchLocationPreviousX = TouchLocationCurrentX;
TouchLocationPreviousY = TouchLocationCurrentY;
}
void APN_PrimaryViewTarget::TouchTriggered(const FInputActionValue& Value)
{
//Rotate current view camera
PlayerController->GetInputTouchState(ETouchIndex::Touch1, OUT TouchLocationCurrentX, OUT TouchLocationCurrentY, bIsTouchCurrentlyPressed);
float RotationAmountY = TouchLocationPreviousY - TouchLocationCurrentY;
float RotationAmountX = TouchLocationPreviousX - TouchLocationCurrentX;
AddControllerPitchInput(RotationAmountY * GetWorld()->GetDeltaSeconds() * LookSensitivityPitch);
AddControllerYawInput(RotationAmountX * GetWorld()->GetDeltaSeconds() * LookSensitivityYaw);
TouchLocationPreviousX = TouchLocationCurrentX;
TouchLocationPreviousY = TouchLocationCurrentY;
}`
basically using mouse delta to get direction on click
I dont want to drag stuff, think about Unreal scene editor. If you want to look around(mean rotate around) you must drag your right click in screen.
He's talking about holding rmb to move camera
Yep
ok so there's 2 ways to do this
The code I use uses touch but you can use a mouse instead.
either filter the mouse X and Y inputs by a boolean before sending them to update your control rotation or whatever you're using to drive your camera
the RMB input action just sets that boolean
It'd also have to do some more state management like hiding cursor if you wanted etc etc but you get the picture
Okay I'll try that. Thanks for advices โค๏ธ
Have you used any of these field components before. If so, which one have you used and what did you use it for? Haha.
ha I was going to link that
Never used any of them tho. Perhaps i need to check them out
some of them are python relevant I believe
like ToFloatField
but like radial mask is kind of cool to see here. I guess you can use that to create an in world mask for multiple elements
so it could affect gravity, materials, mesh types etc.
Yes exactly. Damn , how did i miss this part
Field isnt exactly the first search that comes to mind when looking for stuff
it's not a common type I don't think. I hadn't seen it previously outside of particles
I never got to particles before niagara showed up... still havnt touched that one either
Is there a way to make on object in my scene invisible to a specific camera but visible to other cameras?
turn off visibility when certain cameras are in use?
working on a seamless portal system that uses a camera on each portal to show the destination. The problem is that if there are any walls nearby they block the portal camera
... use render targets?
i am
i have a render target for each camera, then i use that texture to make a material
right so the plane with the render targets, are you ensuring that fits into the surrounding geometry?
wym fits into surrounding geometry?
that it doesn't overlap?
it doesn't i made a specific mesh for it in Blender
and have you made sure that the camera resolution fits as well?
yep, the render targets are set to 1920x1080
those are the things I did to make sure it works afaik
but I did all of that like 2 years ago
i know whats causing the issue but i was wondering if there is a way to toggle visibility for objects for certain cameras
there isn't
damn
and realistically that would be a hack of a solution too
i just thought of a possible fix but might be kinda wacky ๐
can you show your issue?
ha I've already read that documentation page. The wording is quite dry so I'm looking for how they have been used. If you don't know, its fine to say so. Saves people hitting their head against a barn door...
if you look underneath I posted a use case
but I mean unless you're actively having a problem that needs this very unique solution, I'm not sure why you are so held up by knowing about fields
I used a custom vector heightmap (sorta like the field) once, does that count?
yep, ship it
Used it for silo simulation/visualization
what kind of silo? ๐ค
Square one with coned outlet ? ๐
oh. well at least it's not nuclear
Tried to verify accuracy of single point laser for volumetric calculation
I saw. You guessed at what they are, which is... guessing haha. There's quite a few of them and I was interested in finding out what their uses are incase I can make some of my own processes more efficient by using them. Perhaps they can speed up my workflow. I mean, what's the harm in actually knowing things haha.
no I know what masks are, and how they are used
are blueprint interfaces bad to use for multiplayer games?
and a field is a field
so a masked field is just putting 2 and 2 together
I've used vector fields in the past for particles
Well, of course. I wasn't questioning whether or not you know what a mask is.
I don't think there's harm in knowing them other than they seem very rarely used
and implemented by just one dude
so beyond working with python or perhaps particles or the above use case, what could you use them for? where is that optimization of workflow that you are looking for?
what are you even trying to optimize?
I take it you don't really know much about them then....
I mean it's not like a game engine is a store where you can shop around and just "impulse" use systems
I don't know if you're actually reading what I'm writing
It is actually. I rarely use blueprint. I mainly use c++. It's fairly common to 'shop' around the code base for pre-implemented functions so you don't have to write them yourself.
interfaces work bad with a server call is this a bug ?
Try #multiplayer
ok
I think you're the first person to ever say that
but, you do you
I generally try to solve problems instead of inventing them
No, how do you think multiplayer interaction works in the first place
it hosts a "world" on server and client
You can think about interfaces as non replicated functions in this case
So it's up to you to make it work
ok but if i call an interface how would i know which client is calling the interface
because i always need to call it from the server
I don't think you have a grasp on what I'm saying. There are a vast collection of functions, algorithms, structs and objects inside the code base which have been written by the folks at epic so you don't have to write them yourself. Things like quaternion mathematics and all sorts. Why on earth would you try to write them all yourself if they are already there to be used haha. This is programming 101. Ultra basic stuff.
I wanted to know what fields are used for in case they come in useful to me. No sure what the issue is.
If the client calls it, then you can pass a instigator reference?
Interfaces support input and output values
you'd start with having a problem requiring them though, not just look for them without reason
i know you can put input and ouput. what exactly is this instigator reference
Who called it
A reference to who called it
as in a client or what does it give or actor
how can i know if they may be able to solve a future problem if i have no idea what they are used for haha.
why don't you just wait and see if you ever encounter this "future problem"?
are you self taught?
The player's character, the player controller, the player's player state... Any of these would work.
Sounds like a tall order to check out every creek and corner of the engine to solve a future problem that may or may not arise
Nothing wrong with a little window shopping.
True that
Professional curiosity is a good thing.
But it helps with a direction ^^
Are we looking for big windows, small windows... curved ones?
Are you trolling me? haha. There is an element of the engine - fields. I haven't used them them before but would like to know about them incase they prove to be useful.
I'm self taught in unreal engine but I have a masters in computer science from UCL. Why?
I'm trying to figure out how to write K2 nodes at the moment and I don't have a reason other than that they might be useful later.
Thats exactly the point I'm trying to get actross...
When you solve it (๐ค๐ค) do a blog post about it !
you're the first person I've encountered that cares more about future problems than present problems
well actually that's not true
but it just reeks of premature optimization
Well, clearly you haven't worked in software development before then haha
you're the first person I've encountered that cares more about future problems than present problems
That's the most ridiculous thing I've read today haha.
is it though? you're caring about an imaginary problem you don't have yet.
I think that's pretty ridiculous in itself
but w/e
you do you
I don't think you've worked in the games industry for 10 years.
ok, thanks for your opinion. it doesn't invalidate my experience ๐
i have a server function on a blueprint which i call from my character. this server function then calls a on owning client function which show particles only on the client that activated the server function. how would i call this on owning client function only on the client when using blueprint interface.
One of the most fundamental parts of games development is building systems which combat problems which may occur down the road.
well, i still new to VS, only go in there to learn stuffs because i created C++ template with UE
that's assuming that you know which problems are down the road. in your case, you don't
In planning and policy, a wicked problem is a problem that is difficult or impossible to solve because of incomplete, contradictory, and changing requirements that are often difficult to recognize. It refers to an idea or problem that cannot be fixed, where there is no single solution to the problem; and "wicked" denotes resistance to resolution...
have a look
I don't think you have fully grasped what I'm saying. When building systems it's best to figure out all the fundamental elements of it so you can make use of them. Just image if you didn't know Unreal Engine had an AI system and you started building one by yourself.
That's your logic haha.
people still do? if you head over to the #gameplay-ai channel you'll see people building their own utility AI. just because it's in engine doesn't mean it's the gold standard. in fact many modules in the engine aren't greatly developed because epic only used them for the projects they worked on
If you sit for a second and just think about what I'm saying instead of burring your head in the sand, its clear that it is best to know about each element of the game engine you are working in in case said element comes in useful is it not? haha
Someone said Octree?
nah I've thought of what you said. it just doesn't make sense. you're attempting to invent problems. why don't you head over to #cpp and ask them the same question?
you've missed my point yet again. I was talking about people who have no idea there is an AI system in there. Not people who are building suplementary ones. haha
Because I saw it inside of a blueprint and was curious to what it is. A concept which you seem unable to grasp.
Clearly its just two different opinions/viewpoints on the matter
sure you can take a look at what an AI system is, but you're not going to look at the AI system if you have no use for AI in your project. which is what your case is. you don't know what fields are used for, but you're thinking you "might" be able to solve a "future problem" using them
Its fine to not know things you know. Just because you don't know doesn't mean its not worth learning lmao
I told you what I know. I literally gave you examples. I don't know what else you want
Yes, you have hit the nail right on the head finally! I don't know what fields are but i thnk they may be able to help me on a future problem! Thats it!
I've been saying that all along, genius
I don't think I've ever come here for a little information and went away with even less than I started with until now.. haha
but yes if you think a hypothetical future problem is more important than solving real problems here and now, by all means
Solving future hypothetical problems is one of the main parts of software development Mr 10 years. But you know this I expect.
Can't build with concrete when you don't know how to mix it.
Everything you see in blueprint is architecture. What on earth are you talking about.
you can buy it ๐
yep, thats the way!
You don't know what it's for though, why would you buy it?
New unexplored flavours
maybe if you see another building built with concrete you can then figure out to build a building with concrete. but if you have no preconception of a concrete building, how are you even going to know what concrete is useful for?
Yeah, so you go to a discord server to ask people how to make the concrete. Is that right? haha
But he saw concrete. And he wants to know what the fuck it's for.
Something like this.
well, no, that's you. you ask to mix concrete, not having seen a concrete building and just assuming that it'll solve a "future problem" for you
it's OK if you don't understand architecture is more key than features
but don't act as if this is the norm in software development when clearly it isn't
I'm sat here wondering why I'm having an argument with a 13 year old about the basics of software development and the need to know how things work. haha!
Thats how software is built haha
I'm sure of all people they would be able to tell
Thank you for your help. You have been very helpful.
good luck with your attitude. I'm sure it'll serve you well
I gave some use cases for it. they were rejected. I can't really do more.
the particles are being spawned on the object is that still possible?
I hope so. Hopefully I can get 10 years experience and be as knowledgeable as you. Thank you so much! Appreciate it.
Can you guys thread your beefing at least?
I got the answer from another thread. Your use cases were incorrect.
I don't think there's a thread option for the server
figures
well.... room then
I like turtles
You know, I've always liked turtles.
I mean you can also use the block option, it'll help out a bit
i dont they make me use paper straws
I like #blueprint
There's Spawn Emitter Attached
Sure, just pass back a reference to the target actor in the Run On Client, then get that actor location to spawn the particles on that actor.
Thank you so much.
so i should use the run on client in the character? if im understanding
Hey guys. Following a tutorial to try and learn more, and its gone pretty well, haven't had many real issues finding my own errors until now. Everything works perfectly fine until I open this new widget, and now i get this error. if i don't
open the widget, i get no error. Im going to keep messing around, but anyone see anything? i cannot find anything in the video i did differently The problem i am having is off the completed of the for each loop
If you only want to see it on a single client, you need to do the Run On Client on any client owned actor. That's normally their possessed pawn, the player controller, or the playerstate. I just used the character as an example for no specific reason other than it has inputs on it, and having a particle system spawn in the world somewhere makes the most sense to do while on the character.
The problem i am having is off the completed of the for each loop
@noble cargoProblem is this here. You are trying to pull from this array when there's nothing in it.
you have an array that's out of bounds. looks like some inventory system?
ah shoot I didn't even see the second image
Thank you i understand that, now do you have an idea where i would go about starting to fix this problem
thanks this helped me a lot to get more perspective in what Run On Client does and how it works. is there any way to make an actor change their (Run On Client) to a different client? except possessing a pawn
yes it is, and it works on my actual "inventory button" i can pick stuff up and all, but this new widget isnt working. In the video, the guy didnt do anything different from what i can tell
just going by this it seems like you're either not passing the array of inventory items to the widget, or that you are moving around empty spaces in the array somehow
You can set the owner of the actor on the server.
ah thanks that really help a lot :0
and i got it all working how i want to to again thanks!
Thanks. I'm not sure what's going on. If I put items up it displays on both, but I get the error message again. What kind of information do you think i would need to gather for you or someone else to help me dig deeper into this?
show the code where you spawn the widget
1 sec
this code?
player bp
ah right
can you check, before you spawn the widget, that the array of inventory items isn't 0?
im sure i can, i just need to find it haha
because the array when you get it in the widget is empty. let's see if it's empty on the side of the player too
also I see in your widget you got a bunch of stuff going on with creating icons
but you should only be doing that if there are items in your inventory
otherwise you are creating icons for empty slots
understandable, i dont like it, im just following what this guy is doing for now, which is why i dont understand why im having this error
Can you post a link to the tutorial you're following?
generally I would advise against using tutorials step by step. use them to get an idea of a solution, and then do your own implementation
The crafting system is a little difficult to use in it's current form, so let's fix that! we'll set up so we can display the recipe for each item similar to how we did the objectives and rewards system, and we'll put a display in our crafting screen to let us see what is in our pack without having to jump back and forth between menus.
most youtube tutorials aren't going to be great
is there a more efficient way of going about this besides using an event tick? I was finally able to stop my floating rotating weapon upon interacting with it but it seems inefficient... it works though
probably just going to scrap that, and continue on for now if i can, i have no clue where i would find out if the inventory was set to 0 before the wiget is spawned. i cannot find it. I keep digging
it's probably not set to 0, but the question is if there are any items in the inventory
my take is that there probably aren't
what do you want to do?
heres the build inventory funtion
are you trying to propagate that into a blackboard, or?
Why do you have a tick with a timeline
I believe AI perception has a pawn that you can cast to a player variable?
you can never tick enough
this just builds the widget inventory
Hi friends, i need little help. I created a hit / take damage logic. When i attack the npc, its not react or not lose any health. But if I automate him's attacks and go to front of him, my character reacting to attack. What I'm missing
are you not using the AIPerception events that are built in?
https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/AIPerception/ this shows that the events give you an actor. try casting that actor to the player pawn?
Is there a function to return the object that has spawned you?
then you can pass that into the blackboard via a BT Service
GetOwner
... yes? why would it be complicated?
Quickly skimming most of the videos, I couldn't see where he created the "Inventory Size" variable on the Player_BP. The idea is you should be resizing the Inventory array to the "Inventory Size" somewhere on Begin Play so it initializes the inventory to be the appropriate size.
It's just a little anticlimactic to bang your head against a wall for so long then get such a short answer
we've all been there, it's the code equivalent to finding out you were missing a ;
Thank you. Frustrating. got through 60 some videos to get here to get stuck. Not a big deal. i can move on, but id like to figure this out so i can learn from it and move on
have you tried breakpointing it?
The "inventory size" shows nothing when i search on the player bp
again, I wouldn't trust youtube tutorials a great deal. they're often made by people who don't know how code needs to be setup to work properly
So Owner is the object that spawned something? And if it was already placed in a level, it has no Owner?
Can you help me please? I haven't been able to take any action for two days. The characters I control get every reaction, but the others remain unresponsive. Haven't you encountered a situation like this before?
I think the Outer chain will eventually lead GetOwner to be the level itself
what value is the actor?
it's really difficult to say without posting code
yeah if you used breakpoints you can see the value of the actor. what is it?
I see you active here often, would you mind if I leave the code tomorrow by tagging you?
just post it and anyone who can help, will help
I can't guarantee that I can help you
but your chances of getting help are better if you post more concisely what your issue is
and screenshots of code help immensely
can you show your code while you're at a breakpoint?
Alright thanks for everything ๐
yep. if you hover over the actor pin on the event node, what does it say?
is MyCharacter_Soldier an AI?
or should I say, does it derive from the AI_Character class?
if it's not AI then the cast will fail
but that's intended
it will only succeed on seeing an actual AI_Character derived actor
if you're casting to an object type, it needs to have that object class or a subclass of that object class to succeed
I don't know what else you're doing, but that's the idea behind casts
sorry for the late reply, my power went out ๐ I 'solved' the issue by toggling to visibility of the wall blocking the camera everytime I went through the portal. Works like a charm now ๐ thanks for the help
stupid question
no such thing
is there a node for inverting a boolean value
the NOT node
^^^what he said
the I would suggest casting to the character class
I have a boolean that dictates whether or not the player can move, so I'm gonna use a flipflop node to auto-toggle this as needed based on input parameters
MyBool = NOT MyBool is also a flipflop
Theres also the "Disable movement" function
That exist in the cmc /character
Is there any way to select a data table row based on a specific value? For instance, say I have a DateTime or a Float, what's the best way to pick the Data Table row which contains that DateTime or Float?
For instance, I want to select the third row, "3 - ShoweringWashing" when my DateTime is greater than or equal to its "ActivityStartHour" and less than or equal to its "ActivityEndHour". Thanks in advance ๐
If they are sorted, cant you just go row by row?
Morning starts -> row 0.
Row 0 done -> row 1
you'd have to implement your own comparison operator for date time if there is no equals function
Well, the time of the game is exposed to the player, so they can change it, therefore it's always different, and every time it changes I need to go through this table again and again and make sure I select the correct row. I'm using some variables from this table to then do some AI stuff.
On time change, grab all row names,
Loop them and find the fitting row
Where currenttime > activityStart and < activityEmd
Thank you I'll try that! Sorry I'm new to all this ahaha...
how would you do a 30% chance
Does adding a Delta seconds to a variable eat more performance than a conventional timer?
ah yeah you can random it like that
1 - (chance%)
what would min and max be
Hello , guys i have an interesting challenge, so, im having 1 widget and 1 actor, and i set the visibility of the widget from the actor, now i need put an interface , to tell to the widget , that it was for example invisible from actor. How can solve it using interfaces
random float (already goes 0 to 1), check if it is less than .3
sorry for that, had a brainfart
@small halo
Less than*
30% , not 70 ;p
Y
noiceeee one
True means within the 30%
I think there's a default RandomFloat that doesn't need input, it will just give you 0..1 all the same if you want to remove that
but otherwise yes
If you had to, how would you go about picking random x and y coordinates but if they had to be within a circle with a radius of 500?
Like if you just pick random x and y then it may pick any point in a square
I believe there is a function called GetRandomPointIn for either circle or sphere
but how you would do it on the regular?
RandomUnitVector * 500 * RandomFloat
unit vector for direction, float for distance scale (value will be 0..1)
Hi, does anybody know how to get angular velocity from rotator? BP doesnโt provide โget physic angular velocityโ for scene component
๐
So RandomUnitVector is a random one with a length of 1?
forgot to add, if you want this anywhere but 0,0,0 you have to add + Location
and the unit vector will be 3d
if you just want 2d, use a 2d vector
then convert the 2d vector to a 3d vector with the last value being 0
How do people get to know all these functions? Asking others like I do?
Nah I understand how math works, I'm talking about all the functions that you find only after hours of trying to do it yourself and failing miserably
Like I spent a whole day essentially making a LookAt function
is there a built in look at function? I wouldn't have thought so
I had some success but it was a little wonky
Math is great if you understand it :D
I created an inventory but when i open the inventory (in game) my slots doesnโt show upโฆ does anyone knows how? Iโve been struggling for 1 hour
And i set the numberOfSlots on 9 for testing but it still donโt show up
I differentiates properly but data are not smooth, itโs kinda like a digital signal :/
lol
GetPhysicsAngularVelocityInDegrees ?
I tried but I cannot pass as input the scene component
*as target
Is it linear velocity, isnโt?
This is the angular velocity (pitch dot)
This is the pitch obtained by GetWorldRotation ๐ฆ
The velociti is not smooth as desired
interesting, it seems I can only get the physics velocity to work with a primitive component. I'm not sure actually
Yes physic velocity, itโs good but itโs only the linear component
Iโm struggling in order to get the angular velocities ๐
I've just looked at the source for GetPhysicsAngularVelocityInDegrees for the Primitive component. It seems it extracts it directly from the Physics Component. Is there a way you can get hold of the physics component for your object and get the physics velocity that way?
if i have a blueprint which derives UObject, is it possible to get a UWorldSubsystem? i know that GWorld exists in C++ but its not available in blueprint
maybe... with a context object? I think this is a grey area
the problem is that the subsystem node doesnt have any inputs. its not a big deal ive reverted to using AInfo
or maybe you can do a k2 node version that takes a context object
it seems like UObject for anything is asking for a bad time
yeahh BP isn't really setup to work greatly with UObjects
ye in general too. every time i think "i dont need an actor, uobject will work" theres some reason why uobject doesnt work. first it was replication, now its that i cant GetWorld() in blueprints with a UObject even though that function exists on it ๐คท
#nomoreuobject
there is that special actor subtype
called AInfoActor I believe?
I see you've already been there ๐
its annoying because i dont need a physical representation in the world but i digress
game instance subsystem?
or do you need world
it needs to be UWorldSubsystem because the subsystem spawns in my things
maybe one day i can pay a competent dev to fix it
well tbh... and I don't necessarily recommend it, buuut... level blueprint?
can you even do a level blueprint in C++?
yeah you can pick the class in project settings
LevelScriptActor
huh thats actually pretty cool
Then reparent your level blueprint to this class
Why exactly do you need UWorldSubstem over something like Game Instance Subystem?
this, although i didnt know that there was a delegate for exactly the event i need so.. it probably doesnt matter now actually and i could go back to using GameInstanceSubsystem, but i dont want it to persist between level changes
I see. There are helper functions to get select subsystems inside Actor blueprints but I don't think they are present in the base UObject derived classes which is annoying
Can you use c++ at all? The only thing I can think of is to subclass UObject and cache your Subsystem inside the c++ class. Then make a blueprint from that. I can't think of a way to do it directly through blueprint off the top of my head.
How can I tell a user created widget to toggle visibility of another user created widget, if both widgets are within the same widget? lol
W_Add is what I've called the dropdown menu. When you change the drop down to monkey for example, I cannot get W_Add to show Animal Profile.
I could use interfaces but seems improper.
I am storing the widget that both of these are added to as "Main" variable within the level blueprint.
Any way for W_Add to reference that Main variable?
Here is the hierarchy for W_Main
here you go
What is the Struct: Hit Result Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
i see now
If I dont have the playercharacter to store a widget as a variable, but I'll need to toggle visibility of other widgets within a widgets hierarchy, where should I store the main widget as a variable?
trying to make a purely 2d game without the need of a character.
If you were making tic tac toe using boxes and buttons, how would you make changes to that interface without storing variables on the playercharacter?
The HUD class.
where were the garbage collection settings at again
ok, then how do I cast to the new HUD class to get Main?
Get HUD
uncheck the context sensitive button
after you get it, you may also need to do a "get owning player" to plug into the target if you're using it within widgets.
ok. I did that, but I still do not have access to the children of the main hud
Just double checked and they are marked as variables
Your "Main" variable is only of the "User Widget" type rather than "W_Main" type. You'll need to change that.
I had to do this and it worked
is this the correct way? running through 2 cast tos?
If they are both user widget types, then yes
That "Main" variable itself is the wrong type.
There's no need to cast from the create node as it gives you the right type coming out of it, so casting to the type it already is, gives you that note.
Ah so that has to be the Main, and that basically removes the need for the cast node.
the variable type acts as a filter basically
I mean I guess that is one way of looking at it
Well, you define what the variable can contain.
If you use a "User Widget" variable, then it can store any User Widgets, regardless of what it's actual class is. If you define the variable as a W_Main type, then that variable can only contain W_Main User widgets.
how to I overload this with parameters from the object class? like in other programming languages?
for example, exposing "BulletSpeed" so it will set when constructing
Ypu can tick expose on spawn on bulletspeed, and it will give it you as a pin there
Ah! it worked! ty
Np
is it possible to add the post process volume to the level and animate/edit it in the level blueprint? Or should I create a BP specifically for this?
I want to add an event to change the chromatic aberration.
not sure of best way to do it but if you had a bp you could simply spawn it into world wiht it already set up and add a delay for how long you want then destroy the actor
Well, I don't mind doing so. But what's the node for it?
what should I drag out to modify chromatic aberration?
I want to increase the intensity, when the event is called
oh, I get it.
so, I spawn this BP once the event is called?
This will work, I think.
but what if I wanted to edit it in more of a...better way?
i know you can "make post process" then show pins and change them havent messed with it though
would have to mess around and figure out how it works exactly but seems yo ucould do that then plug them into your current post process settings
seems you may of figured it out, it works that way if you want to do it in level blueprint
on a trigger so would assume you can do same way with event
so for instance thats what i tested it with
and it changed the settings when i walked into trigger
so i need this to face the same way as the pawn.... what do i plug into rotation?
pawn->GetRotation?
*World rotation, probably
is there a world rotation for pawns? all i can find is scene component
not sure exactly what your trying to accomplish so cant test, but you can do a find look at rotation, and off of pawn can get actor location to plug into target
so maybe that is what your looking for
what's the simplest/reliable way to check if a widget of a certain class is already on screen?
Normally you manage that by keeping a pointer to the things you add to screen and check it. You can GetAllWidgets call. Might not be so bad if you don't have a ton of UI.
what if I have a bunch of different actors who might want to add the same UI to the screen
Not sure. I don't generally do stuff like that. All of my UI is created from HUD or inside of other widgets. Actors have zero idea it ever exists.
Basically UI should be a layer on top of the game. The game should have an API built around it that UI can use to handle itself along with user interaction. Otherwise you end up with some really messy implementations.
Anyone ever have the debug pulses on the execution lines of blueprints get hit or miss. And only the visual part. The code works every time and I'm setting the debug reference of course.
I have a relatively long blueprint for clicking on actors. On the beginning part it pulses every click and release, but farther down the line it pulses more intermittently and at one section stops pulsing entirely.
I belive what's happening is the pulse is acting shorter than what the graph can render for some reason. If I click really rapidly or use a tick, the glowing executions are fully visible. I will say that I've tested merging the blueprints onto a new project without any visual or themed plug-ins, but it's didn't have any effect. I even tested another system and different install.
It's really hard to debug with this behavior.
what am I doing wrong? This is a BP for a projectile that the Player spawns, but it prints nothing
Sounds like you should divide it into smaller functions :)
On spawn projectile, is owner plugged in, and is owner bp_player?
If a gun is spawning it the bullets owner may have to be the same as the guns owner , and not self(unless you wanna run up the chain)
owner is the object that spawned you, right?
get pawn works instead of get owner but I won't be able to use it for enemies for example
If you read what i type, you should be able to plugin what you need as owner...
Dont use statics like that
Atleast avoid it when possible
Tech debt will come back for you
yea I found where to plug in the owner, thanks!
When you spawn the gun -> plugin self(bp_player spawns the gun) as owner
When you spawn the bullet (gun spawns it) plugin GetOwner(owner of the gun is bp_player)
Is there some tutorial on correctly using built-in things like BP classes, or NavMesh, or character movement? Right now I'm using AddForce to move the player
There are many, no specific ones comes to mind
For player movement one would usually use add movement input
Unless its AI
Then you use the AI MoveTo nodes
Along with a ai controller
and a navmesh^^
you need to get pawn world location and get the forward vector i believe
I made this thing where the claw of the machine picks up the object assigned to it correctly (Claws don't go through the model) that's the left one. But with the right one which I scaled up, the arms don't work correctly anymore. Does anyone know a way to fix this? my blueprint skills are very low so I don't know what other to show then this screenshot
when it is spawned, owner is the object that spawned you. usually you go by the Outer ring for objects and Owner for actors
How would you make a flashlight? So far I've only figured out the Half-Life kind that puts a light source where you point
some kind of a restricted point light?
I believe they are called spotlights 
๐คฆโโ๏ธ why do I always think the solution is something incredibly elaborate
thanks again
Create the widget in your character bp or player controller, and set it up similar to this:
Am I the only one who got this issue? Does it happen to anyone else as well?
I reported it as a bug, but if there is a solution, they're not telling me, they said in an automated mail afterwards..
maybe it's worth keeping occam's razor in mind
mhh i give it a try and asking here any, Wise Man, that knows how to Load Text Files, with umlauts? , looks like Ue4, replaces everything with "?"
ASCII strings (I think that's what FString used) don't support umlaut or extended Unicode letters
so no thing to get it to working?
Not until you make a C++ function to parse text file to FText, which DOES support Unicode range
is that a lot of Work?, and would it work with an Blueprint libary?
I think there is a free plugin for regex
Depends if you know C++ or not.
rip im an absolute noob with Code, so nope, Well good to know that thats an Problem in 2022, i cant event read an Normally Text file here
umlauts are normal? ๐ค
here yes
soo as exmaple /// TestHUDText = FText::FromString(TestHUDString); , would doo the thing?
Hi all, I've a math question. Here pitch (yellow) and pitch dot (dark red) are plotted. Data are obtained by the two function: GetPhysicsAngularVelocity and GetWorldRotation . The target is the same, a static mesh. So, why are they mirrored over the x axis? They should be in the same quadrant ๐ฆ
Does anyone know how to choose a random item from an array, without choosing one that's already been chosen? So a unique one every time and no duplicates.
I need my level streaming bp to choose a random level, but it can't choose the same level twice in a row or it breaks. So I need to exclude levels that are already loaded from being chosen again and then add them back to the pool of possible levels once they're not loaded anymore.
Have an array of all the levels, then have a duplicate that is empty.
Then do a random inrange with min=0 max=arraylength-1 , get copy, and add it to the empty array, then remove it from the first array, and load the new level.
i have a raycast that wont hit a pawn that i have, i dont know how to fix it
it just bounces off
is it possible to get editor name of the skeletal mesh? In this case it would return a string or a name with "SkeletalMeshName"
no it just doesn't register what I'm hitting
GetDisplayName()
Is this right? It doesn't seem to be working
Lets say i have 9 static mesh components divided into 3 groups, inside a bp.
Per group there is a material instance, and the instance has 3 parameters (RGB)
Now when i get a channel, i get from 1 to 9, depending on which button you click.
Can someone help me how i can range the input by the number of channels per group has?
Modulo and Division ?
And for some reason my level unloading isn't working either. When it choses a level it adds it to a list, then it checks if the list length is greater than one, then it unloads the level at index 0 (the oldest one). But it just doesn't work at all and the levels never get unloaded.
If im understanding it correctly you want;
Switch on (int / NumberOfChannels)
and parameter being (int % NumberOfChannels)
You can't have multiple pins coming off the output of this get as each call to it would be generating a new random number. Save the random number generated in a local variable first, then use that variable as the input to the get and it should work
Now.. I need my level unloader to work
Wait, it's kinda working..?
Does anyone know if its possible to access the Editor Viewport Camera attributes through Editor Utilities? Id like to get access to the Camera Types Ortho/Perspective and set from the selections of Top, Down, Left, Right etc.
Well not exactly, because the number of int is from 1-9, but they are divided into 3 parameters per group, so 1 to 3 = group 1, 4 to 6 = group 2, 7 to 9 = group 3
Just do -1
Then its 0 to 8 :) for the division/modulo part
0.0
0.1
0.2
1.0
1.1
1.2
2.0
2.1
2.2
Switch index and parameter index respectively
does anyone know which node I need to add to this? it's in animgraph
AnimInstance is the cpp superclass of AnimBP
what does that mean? sry my blueprint skills are very weak
animBP is a special type of BP
perhaps a better question would be: what are you trying to do?
You got the machine on the left with 2 claw parts who grab a object when its assigned to it. but I want them to rotate to the object untill it touches it. rn its very choppy if you know what I mean
I did something wrong didn't I, lol
Can anybody help me ? plz ๐ฆ
you're running this on the animation thread. you aren't supposed to use blueprint nodes there, because that will make all of your animations work on the game thread
You're removing the item before trying to use it as output.
Instead, try do this, and use that as output, which gets the level name from the dupe array instead.
ah alright
There's also a new fancy "Last index" ๐ so you dont have to do -1 ^^
Nice! Thank you! โค๏ธ
Oh.. I never noticed that.. ๐ Thank you
its new from 4.26 iirc so its easy to go by it when it wasnt there in the first place ๐
Ah ok. I haven't been paying attention to the updates then ๐
Guys, I have such a question. Do they use Gameplay Tags to create categories, types and subtypes of items? I'm just thinking of transferring item types from Enum to GameplayTags
Oh? The last index node will work for this?
I think I got the randomizer working, but now I need the level unloader to work too. I tell it to unload the level at index 0 from a list of currently spawned levels but it doesn't do anything
This is supposed to check the length of the list of currently spawned levels, then if it's greater than 2, it unloads the last one on index 0. Then it removes that level from the list. But it's not working 
The levels are supposed to spawn in front of you and despawn behind you as you run away
Wait I'm confused where I'm supposed to put this 
hello, guys any have knowledge working with interfaces?, need help :v , i need to communicate a component with widget (this need to receive a variable), so i have the interface on the widget and need to send a function to this widget from another actor , how can i make this , if my actor doesnt have a interface
No idea. How are you even making those graphs?
I think you're looking for event dispatchers, not interfaces
both works similar no? ๐ค
Sorta opposite of each other one could say
interfaces are generally for specific multi hierarchy functions that need to be the same
they are being abused in BP as delegates, which is what event dispatchers are
You are removing the selected level from your array before the execution chain you have built has even completed
Now you really messed it up.. ๐
Go back to what it was before, and right after the Remove node and before the Return node, you add what I made, and use that as the output
I'm not super familiar with ACharacter, but I have this character getting launched horizontally (0.0 velocity on Z) from gun recoil.
And for a brief moment, their "IsFalling" bool turns true, which is messing with some anim things I set up.
This is happening on a totally flat plane. Is there a way to change the "detect ground" threshold, maybe to stop IsFalling from triggering so easy?
Just add a custom one if it doesnt suffice
As in: make a custom bool and trigger it yourself whenever you leave the ground or smth using a trace and playing with the distance value for treshold
That's just the thing, though. Maybe it COULD suffice, I may be just ignorant of the features of ACharacter and UCharacterMovementComponent
ah yeah, that's a good idea
Dunno about good, but its an idea atleast ๐
It's only for a half second anyways. Flying may work
Just make sure there's no way you stay in flying mode afterwards ๐
Dont leave any edge case unhandled
Nah I don't think it's an issue. It's part of a firing process, so i can just turn it off when the process ends
I have set up an event for my npc to walk to a specific location using a location array within an actor. I've run into some problems with trying to activate an event when the npc reaches that point. Tried multiple versions of checking if the actor and point locations are the same, but for some reason the actor location seems to always come out wrong.
Any idea of what might be causing this?
i want to make a counting hud for picked objects, but i dont know why gracz_gra2 (my playable character) doesnt inherit from character ._.
Dont use ===, have some tolerance
Are you using ai moveto?
Using move to. I've been using = with tolerance and I've also tried subtracting both vectors with and check if = to 0 with tolerance
gettint player pawn instead of player character fixed it... im confused a little bit, but hey, if it works :v
If youre using behaviour trees, moveto tasks have buikt in acceptance radius iirc
At the moment I've not expanded into behavior trees with the npc. Would that probably make it easier to set up the event?
Yes, if you have ai, you should probably use behaviour trees
Makes all the branching logic a lot easier imo
Do they have a completed move delegate tho?
I cant recall, but i think they dont. I made my own for that atleast
Show the logic:) are you removing the vevtor when triggering the moveto?
Here's the movement. I think I'll set it up with the behaviour tree instead as then I can simply set up a selector to run the movement and then the event.
Hi i try to understand the word Blueprint. I am watching a tutorial and the guy says a blueprint is when you put multiple things together like a camera, collider and a mesh to one object, but three seconds later he totaly contradicts himself and says blueprints are the c programming language nodes you can put together to create dynamic like with programming the objects with c++, whats going on here?
When I scale text/image slowly they wobble, how to get it smooth?
Generally speaking "A Blueprint" is a class. "Blueprint" or "Blueprinting" is a visual scripting language.
You cannot without a retainerbox material or some slate coding that doesn't use pixel snapping.
Thx will look it up
@maiden wadi so why would a certified tutor from ureal say something different? he says when you put multiple things together and add some specific parameters then its a blueprint.
Maybe look at world space widgets too
Only 50% that a scaling material would work here. Should.
What is a certified tutor? I have to see this.
In a sense a blueprint (or a class) is a set of predefined and planned out stuff
Like the blueprint for a house
Not an analogy i'd use but oh well^^
@maiden wadi it starts at 30 seconds: https://learn.unrealengine.com/course/3756115/module/7278381?moduletoken=UHxxnDLPW8R9k~r2zA5oH0-U-ODSRsyrT4JZwawJaZSSZQs3-gi9Hc3sBUjJr-cb&LPId=0
its a unreal tutorial
^ good point
not fully sure why this has happened. but the base cpp class creates the root, item mesh and arrow component and attaches the item mesh and arrow to the root. But for some reason there are 2 roots?
@willow aspen hes not wrong though. Blueprint is a visual scripting language built with C++ that lets you call functions that run C++ code behind the scenes. A blueprint in the sense of an editor, is an editor asset that can describe something as simple as collection of walls that make a house, or the logic for an entire game (you shouldnt put your whole game in one Blueprint class, but thats a different story. When you open a blueprint in unreal engine, you are using the blueprint editor, to add pieces to the class, or to describe how they should interact with other blueprint classes.
Yeah. Technically these are both correct. They don't actually contradict each other.
Sad. I was expecting a trashy Youtube video. ๐ฆ
The important distinction is between A blueprint and blueprint
A blueprint is most likely gonna be used to refer to an actor, whereas blueprinting will refer to scripting stuff with the visual language
oh nooo
My favorite so far is the one where the guy keeps his whole inventory in a widget.
I think we scared bux off ๐
๐ i am computing it, thanks to you all !
Anyone in here familiar with getting GetWorld working in a Blueprint UObject? I have GetWorld overriden in both C++ parent classes which is all I thought was required?
Maybe that's how they'll integrate verse. Swap out the visual scripting part for verse. So now it is blueprint + verse ๐ค
I mean, I know our only exposure is them using it in VSCode, but still.
"Introducing... Blueverse! A revolutionarry way to code your games!"
AI or player controlled?
You don't have any blocking volumes or anything there?
did you double check with collision viewmode?
in your viewport, where it says Lit, change to Player Collision
hard to say, does your camera have collision? it might be a bit more work but if you can send a little gif of some kind it might help understand whats happening
Ooooooh so turns out Launch will automatically set IsFalling to true because it's for jump pads and shit. I'm not going crazy ๐
i could be wrong but i think whats happening is you have camera collision
your character blueprint, does it have a spring arm + camera setup?
spring arm does have a setting for camera collision, just search collision in its detail panel, and maybe try turning it off
im 90% sure thats the issue..
actually wait, thats probably not it
oo, niice
np!
Anybody know why there isn't the "bind button" ? Do i need to set it manually in a blueprint ? (please @me if you want to answer me)
Daym ๐
What class is this in?
Not sure. On a side note, I recommend not using Bindings. They're fickle, and you can do the same thing on Tick.
yeah i know but i wanted to know if we could still use bindings anyway, thanks!
Yeah, if you make it in UE 4, then copy the node, then paste it in UE 5
I think that worked
hi everyone! i created an inventory system but when i open the inventory (in game) the inventory slots won't show up... please help me. i've been struggling for 1 hour.
you are only adding your widget to row 8 column 8 for starters
oops sorry i missed the part after that
my bad ๐ณ
oh no problem
Try to resize it
Begin play
Does it make sense to use components for everything? What is the cost of binding a component to the character?
Within MatLab
Components depend on the use. Components are generally for one of two things. First is reusable code that you could use on different type of actors. Consider a StaticMeshComponent for instance. Another reason is to clean up a class into a subset of logic. If your class is massive, and you have a clear set of logic that could go into a component, it can be worth cleaning it up into one. Realistically normal Actor Components don't cost much. They're pretty cheap. SceneComponents on the other hand can very quickly get expensive because they have to be movement calculated every time their owner moves and movement code isn't always cheap.
