#blueprint
402296 messages ยท Page 861 of 403
Same^
Regular AActors, moving
I mean you can put a skybox with 256k texture on ut and cry, too
Untextured boxes with basically nothing in them
Dunno how i can go much lighter tbf
What magic hat did you find the framebudget for that amount
good culling probably
Wrote your own nav system ?
100k moveable actors, right?
Alright that sounds better
Well, with attached actors more
100k, even 10k moveable would be impressive to say the least
Depends how they move
But if i were to say go and simulate a star dystem in detail
Id probably have all celestial objects move from world subsystem tick
And turn off ticks on the actors themselves
Yeah makes sense
Thats somewhat what im doing aswell, except subsystem part
And obv not star system but anyhow
So as it is now the 'npc' register at the manager and is assigned an ISM, by a reference and its index. On hover i ask the manager to cycle all npcs and return the first one with the correct ism ref and index.
No guarantee actor youre looking for ids akready there @random plaza
i know for a fact the actor exists though
i placed the skysphere actor in the scene, just curious if rotating my directional light will update the skysphere
yep it does
the bp_skysphere needs an actor reference not a component reference
ive tried to get it to work but it refuses sadly
you can make your own actor
I'm not sure what a skysphere is
but the sun_and_sky BP exists
it is working, thank you
Your array doesn't contain the index it's trying to access.
How do I cast an Actor in BP to an interface I created in C++? It's not showing up as a "Cast" option.
Did you use UInterface?
I mean, it has a UInterface that was automatically created but I put my stuff in the IMyInterface part
So you used UInterface to make the interface, alright!
// This class does not need to be modified.
UINTERFACE(MinimalAPI, BlueprintType)
class UInteractableInterface : public UInterface
{
GENERATED_BODY()
};
/**
*
*/
class PROJECTFROG_API IInteractableInterface
{
GENERATED_BODY()
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, meta=(ToolTip="Should return false if the interaction failed."))
bool Interact(class AController* Instigator, AActor* Interactor);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, meta=(ToolTip="This is the tooltip displayed to the player."))
void GetInteractText(FText& ActionName, FText& TargetName) const;
};
That should be it. ๐ฆ
The actor reference that comes out here allows me to call my Interact function but I can't return an "IInteractableInterface" reference. I can't cast Actor to my interface in order to return it:
Normally I think you just pass the actor into the interface. Can you show what you do with the return value from this function?
Holy fudgesticks batman. A correct use of interfaces in the blueprint channel. ๐ฑ
How do i make players see an object in different colors without duplicating the object and network stuff?
What is the correlation to the colors you want them to see?
One player should see an object red the other ones in the other color
And it should be able to switch the player that sees it red
Without networking each object, you'd need to bind those object's to a delegate somewhere and network a value of some kind somewhere maybe like GameState to decide who sees what.
Almost sounds like a selected playerstate pointer in gamemode maybe. Unless you already have that data on the clients.
What makes this so right? ๐
Interaction is one of the few things interfaces are actually good for.
Considering in a normal game you can interact with many different things. Light switch, vehicle, npc, pickups. All wildly different base classes, etc, etc.
And this you figure from a single screenshot?^^
What doc says and what people do tends to be wildly different ๐
I wondered whats the easiest way to do it. My first thought was to make two materials on the object and just change who can see it. But i there is not a setting like for the collisions, that you can give a group the authority to see them.
Wait, collisions or colors?
You could use the beginplay of the actor, which will be called on each client, and set the appropriate material / material params there.
I can give specific objects the authority to collide in some ways with the object. But for visibility there is only "Owner can see" and something else
Generally if you want to just change a bunch of object's colors, your'd just have a material instance(not a dynamic one) and set it's property value. It'll change everywhere that instance is used.
So i could just give every character the instance of the object and change material there so its only been changed clientsided?
Each object will already have a unique instance on all clients
Good to know
Each client is a separate copy of the engine, objects aren't shared. They're just copied and then kept up to date between clients by the server and a network id.
Technically, you could have each client have a completely separate view of the world
Basically the material itself is machine wide. If it's on three actors on a machine and you change it's value, it'll change on all three actors on that machine. But as Daekesh mentioned, that makes it only valid on that machine. So setting it to red on client 1 and blue on every other machine allows you to easily change a ton of actor's, with a globally accessible pointer to a material instance without even having to access the things the material is on.
Not to mention it's also a ton cheaper to do than having a bunch of dynamic instances, so major wins all around.
The object is been spawned and destroyed then respawned many times during the game. So i guess i still have to give an instance once spawned to every character bp
You can also just make it a default on the mesh.
What do you mean by "giving an instance to every character bp" ?
hand them out like flyers
A variable type of this object class, to tell all character bps the object they have to change the color for
I dont understand that
Sec
So each character sees 1 specific object in a different colour?
One red the other ones maybe blue or white idk.
And the object spawns and eventually gets destroyed and a new one of that type spawns
But it's just 1 object? When that variable has replicated (use an onrep) just change the colour of that object! (and reset the colour of the old object)
Usually its just one that spawns, but im looking forward to make it so that more object could spawn
In that case i think i have to make an array of that type on the character class, if this solution works
onrep=repnotify?
Yeah.
But wdym by reset the old object color
Well, you replicate a variable pointing to an actor and change its colour. Then you replicate a different actor and change that actor's colour. But the old actor is still red because you haven't told it to change back to blue or white or whatever.
Im gonna try it as i understood ๐ Hopefully it works!
My eng isnt the best, sorry
How does the Completed pin work on PlayMontage? Does it just set a delay with the montage duration as the delay duration?
The completed pin will execute when the montage is completed...
presumably it's a built in delegate that fires when the montage has ended
irrespective of time
Got it. I'm trying to achieve something similar in c++. I though using a timer would be fine but there seems to be a tiny delay after the montage has ended
latent nodes is probably what you want
even a delay functions the same way
is anyone here having an issue where the editor's panels begin to flicker and you have to restart the editor every half hour or so?
Yup I'll just go ahead with that then
I don't know what kind of template you're using, but it seems correct apart from "up" being a thing. however if it's a top down template it would make sense
then it's correct
well is the player possessed?
did you change anything?
in the player controller or in the scene?
then... change it back, if it worked before?
go into your project settings under maps and modes
there should be a bunch of default classes there
can you screenshot that
Is TagBP a pawn derived class? is TagController a PlayerController derived class?
Surely you wouldn't be able to set them if they weren't?
well one would think so but stranger things have happened
my concern is that they didn't work from the get go
and the fact that your player character is a circle and not a character
is tick enabled in your controller?
Is that a screenshot?
that is correct though. can you show which functions you have in your game mode?
That looks awesome. What actor class is that black circle? Find references to it
those aren't functions
this is for the skysphere. this converts the 1440 minutes in a day into 360 degrees, but after it hits 180 it starts flickering from one side of the sky to another.
Press shift escape to eject while the game is running and figure out what actor is associated with that black circle. Are you sure it's not an artifact of your rendering system and you're really not just controlling a empty pond around?
on the lefthand side of the event graph I believe?
is this the right channel for this kind of thing?
i can provide a video that demonstrates it
what thing?
the BP i posted
pitch only goes -90 to 90
You want time to be on the roll or yaw
thank you
chances are your sphere is a hemisphere. I haven't worked with that BP you're using. like I said I'd recommend using the sun_and_sky bp
it probably means your pawn class is invalid
where would that bp be?
it should be searchable from where you can find light actors
@humble sage Is TagBP what you want players to be controlling?
I'd create a new pawn class and assign it
i'm writing everythiing from scratch, not using a template. it it in the engine content?
ensure that it has the correct logic for movement
it's a BP that I believe is only accessible through that search menu
i just fixured it out, its a plugin you have to enable
What class is spawning in and being given to the player instead?
Try make a pawn real quick and test if that works. Just set it as the default Pawn in game mode
Are you sure you're even using this game mode?
and give it some movement logic that you see
and see if it moves
there is one, in world settings
is the sunandsky bp supposed to be extremely bright?
my scene is completely white
nvm i fixed it
time display code is fixed, babey
Hey there, I've been analyzing level streaming and it was an interesting idea for AI crossfade JRPG though I'm not entirely sure if its the right setup for the turn based JRPG I'm making but I'll give it a try. My reasons for using level stream is for cross cade level loading in battle level. The AI must crossfade along with the level and the level it was from must un-load though I have reason to believe the AI will un-load along with the level it's from though it just needs to be in the other level for a short time after the other level is un-loaded. Can anybody have an idea for AI character to stay in the loaded level stream after the level it's from un-loads? I've heard some ideas say it would have to be loaded by game instances by chances.
I've had some idea that would be the case though other AIs would have to be disabled and only have the one that was triggered. So what I'm saying is there's a lot more AIs then one to worry about. But I'll consider your current statement.
is it possible to turn off rendering like can i just pause everything in the game? I want to take two screenshots but the leaves are moving so the screenshots are different
These errors show up when a non-host player turns up.
BeginPlay should be client-side and not replicated to server though right?
The Character Cards are meant to be children of the GUI so likely their read-none are just a result of the first error.
Can you use an interface as an input to a function in BP? Or make a "template function" (like C++)? I.e., i want to make a function that finds actors of an interface which you pass in
No. BeignPlay is fired on both server and clients.
UMG is client only, so that's why you seeing errors.
You should have a switch has authority(and use Remote pin)
Cheers. I'll load up and give that a try, wait a moment~
there's how i can use a interface to call one time a funcion into tick, now i have a trouble xD , this only work for 1 actor , the variable "is in screen", only take 1 actor , how can i add it to a multiples actors
Set Game Paused
Remote pin removed the error for the GUI widget.
Still getting errors for the Character Cards though, guessing that's same issue?
If it's in another event that is fired on the server then yes
Controller blueprint but I know that's run on server and owning client.
Added switch authority to that too and cleared up last of errors.
Not actually seeing GUI but I think that's just my poor understanding of how to make GUI so I'll work on that.
Cheers~
Iterate over actors
And make the IsInScreen variable per actor. Not sure what you're trying to do, so that's a wild guess
I'm new to unreal engine and playing around with a tutorial series learning, but when I went to change character mesh, it doesn't let me edit anything. not sure if this is how it's supposed to be or a setting i need to check off. any help?
What do you mean change the mesh
under mesh option where there is the t-posing skeletal mesh. I can change it right?
Yeah, if it doesn't let you change it, that might mean that that particular actor has some Construction Script logic which is resetting it
It could also mean you have 2 windows of hte editor open simultaneously
Oh wow... I just closed and reopened the window and now i can edit it
Thank you and sorry for the stupid question
Not sure if this would be done though blueprints or ai. But im trying to get dolls that are pickups however run from the player when they get close. Any idea on how i can achieve this?
Do you already have pickup items and things that run away?
No, not really. I have pickups like keys, but i want the mesh of the doll to be seen in hands of the player. So not entirely sure where to even begin.
Before smooshing 2 things together, try doing them seperatly. I'd make Picking something up an interface, and make the doll a pawn with that interface
so it's an AI that runs away that can be picked up
Rather than a pickup that runs away
Alight thanks, i will see if i can manage that.
I can get the display name of an actor but can I set it? I'd like the names to match a variable that's auto-generated so that I can keep better track
Alternatively I can make that variable match the display name but that's more work
I'll do it the alternate way, it's fine
The actor names are mostly for organization purposes in the level
Hi i need some help. when i play a animation my character do it and after that it goes back to the point where he was. I have enabled root motion but isnt working can someone tell me how root motion work and tips to do it correctly
if an animation moves the root bone, it will affect the actor location when root motion is enabled
otherwise the actor location wont change @mild crystal
having hard time finding on overlap end in bp's, what is key search to find it ? ;0-0
Just type in end overlap
Also you should be able to see the delegate when you have the collider selected
and I get , get render bounds, nothing else
HM
oops
sorry, going back and forth between sequences, forgot to select the right one ;0-0
argh ;)(
ty
For a blendspace, how do I actually get if the character is moving left/right or forward/backward?
My main code is in c++ but for the blendspace I need a reference in the bp
How do I cast to a NPC object? https://gyazo.com/bc05dfd94781ad385463bb3c2030ad8d I tried ai controller and then getting get controlled pawn but it doesnt seem to work? I keep getting an error saying Accessed None trying to read property (im trying to cast from gamemode bp)
How do I get the value of an axis mapping in bleuprint?
https://i.imgur.com/m3xmaAM.png
https://i.imgur.com/m2JGZKL.png
Anyone know what nodes I need to use to achieve the top result using the bottom structure? My thumbnails are a button style instead of a 2dTexture
What property are giving you that error? It says that.
I think that's the AI controller and so you should be doing a GetAllActorsOfClass for the NPCs and iterating over them.
Split the struct pin of Ability Thumbnail(right-click on the pin and select Split Struct Pin. This exposes all of the variables contained within the struct as individual pins on the node, allowing you to enter values or manipulate them independently)
Then you get the states of the Button(Normal/Hovered/Pressed...)
Which are structs you have to split and then you can find the relevant property you want
is there an blueprint event for "FellOutOfWorld"?
No
You get that using the axis event(Parameter called Value)
Oh
such a straight forward event. i'm surprised.
I'm not into anim graphs sorry
The time has come to move to C++
Well you get over it by putting some volumes around the map
And doing overlap checks and stuff
And then use set brush with the exposed normal image from the button?
Yes
Thank you
Can I substitute an Image in place of an Object? I would like to replace my ball with an image of something else but I don't want it to be a texture just the flat image in its stead.
Haha yeah, I just created my own volume.
@keen shard
@night herald
Still that's a Texture2D
so I go into the material and find "Texture2D"?
oh I gotchu
but is there any way I can just make it the picture?
without having to change anything about the ball?
I got it figured out myself
I just made the picture a 2D sprite placed it under my ball and hid the ball
When a player possess a character then unpossess. How can I let event begin play to reinit.
You can't. BeginPlay fires only when level starts
What you need is an event called OnPossess
Just put whatever you have on Begin Play that you want to fire into another event or function. Then you can call that event or function both on begin play and in OnPossess.
Yes I ened doing something similar. But in controller OnPossess with delay
Does some one know how to use this node to toggle visibility of layers in sequencer?
Should I be using timers or event tick? Seems to be some disagreement here: https://forums.unrealengine.com/t/executing-every-second/18789
Iโm trying to get something to execute every second but feel like the method I used isnโt proper. People have mentioned using a timer to achieve this but I donโt really understand how to use the timer nodes. This is the method Iโve ended up using http://puu.sh/erau5/0a09f8720b.png Is there a better way to go about doing this? I understand blu...
Depends on usecase
Never had issues with timers crashing anything
Maintain the timers? Not sure what that even means tbh
Shit, I misread it as Timeline
Worst thing you can do is using looping Timers with ridiculously small duration ( < 16ms)
That is actually worse than Event Tick because it can execute more than once a frame.
Timers are more userfriendly for flowcontrol compared to tick.
Due to their interface
Timer is NOT a loophole to Event Tick
Atleast imo
I still prefer using tick in many cases , but depends on what im doing
Timers have their use, tick has it's use. Timers are no better, tick is no better. You use them correctly. Anyone who says that one is better than the other doesn't understand how they're supposed to be implementing things.
Also if you want to have better performance, might as well sideload the ticking job to C++ altogether.
^ Key!
I'm trying to keep things to blueprint for now, trying to implement spell cooldowns and the like
Putting a bunch of checks on event tick will slow the framerate, right?
It's like an argument over a static mesh or skeletal mesh being better. Seen that forum post too. :/ Some twit thinking that animating static meshes in code was better than an "overly expensive skeletalmesh".
If you have enough checks, sure
Depends on what you're doing
Also for ability cooldowns I don't recommend either tick or timers honestly.
Pass things to C++ lol
Wrong.
๐คทโโ๏ธ
That's why I'm asking lol
Maybe I could have a map with the spells to timestamps, when spells are cast I can calculate the timestamp for when it will be available again; then when they try to cast run a check if the current timestamp is past the cached cooldown timestamp
The question still stands for match timers and stuff though
Nah. You don't need anything ticking for that. You need a framework that simply checks a last cast time versus current game time. It's much cleaner to do that and tick UI than deal with complex fuckery in gameplay code.
Gameplay code doesn't need to do anything but run the ability and set the last time it was used.
๐คฃ
That's close to what I was saying, right? Might be misunderstanding
Nah it is^
The comparative game time check might work if it's a Souls-like game and no real pausing happens
Game time is affected by time dilation.
Comparative game time is a lot like timer internals
Just exposed, instead of hidden behind the FTimerHandle
FWIW you might as well wrote the function and calling them in Tick in C++ altogether. The BP's job is just calling non tick functions and change variables around that C++ code reads
Performance wise there should be no difference
But ease of use is a quality you wanna keep around
Asset loading can be hell in C++, and exposing the reference variable to BP can make life much easier.
I'll keep things to the time stamp check for cooldowns
If I need to do a lot of event tick stuff I'll write a C++ function
Thank y'all
Still I wonder what the fuzz maintaining timers was about
I guess entanglement in invalidations
Hmm yeah i guess
Can someone tell me how to fix audio not playing correctly when repeated very fast?
Im trying to make a 23 bullets per second SMG but the audio doesnt wanna play correctly at that rate
Code?
Spawning/playing sounds every 2-3 frames shouldnt be impossible id imagine
Albeit not how id imagine it set up
Id have one sound for single fire, one sound for the burst mode(if that exist) and one looping sound for continous firing ..
how would i replace the default running animation with the defult walking animation ?
Should be as simple as swapping out the animation in the animation blueprint.
is it the main ThirdPersonccharacter BP ? @maiden wadi
Nah. Click on the.. Mesh? I think it's called.
Sec, editor not open.
Yeah. Click on the mesh and look at the details panel. You should see the Anim Class.
Click the little magnifying glass next to it to find that and open it.
Dunno. I'm not insane enough to try using UE5 yet.
I'd assume it should be relatively similar. Pretty core functionality.
But then they have done quite a bit of UI overhaul. Who knows.
yes i am watching ue4 vids if i cant find ue5 and then trying to find the same stuff in ue5
it has worked soemtimes
I have this system for weapons, and i want the firerate to be framerate independent, because right now if you have a low FPS your fire rate is also low
The way i calculate the bullets per second is a variable called
Fire rate
, and so if i set my fire rate to 14 it will do 1/14 = 0.07142857142
0.07142857142 being the amount of delay between each shot. But on lower FPS the delay between shots is way higher, so how do i fix this?
Image
Multiple the firerate with the tick time (delta seconds) and use that. It's inversely proportional to fps so it reduces the rate on higher frame rates and vice versa
^ was about to say
how would i make a blueprint so that if i hold shift my character moves at a certain speed and if i press shift and then space he moves even faster
will i do same thing but add AND operator ?
This sort of thing is best done with a function that can just update your speed based on inputs. On any key press or release, run the function. In the end you end up with the correct movement speed.
ok thanks i will try that
hey what is the difference between pasting a cube from the add actor tab then adding a blueprint to it AND creating a blueprint first then adding a cube to it? in the first variant i dont have the cube as accessible component in the blueprint editor, why is that?
The difference would be inheritance.
In the first instance, the cube belongs to the parent class.
You might be able to edit it if you enable 'show inherited values' or something. It's been a while since I did anything with bps.
@mental trellis thank you
How do you make a character detect ledges that it can vault on?
There are YouTube tutorials about this. Search for ue4 ledge climbing and you will find them
I will, ty
Though take YouTube tutorials with a grain of salt.
More specific tutorials tend to present questionable setups than can backfire when scaled up.
I just want to understand the logic behind it
Why can't I artificially rotate camera?
Is there some checkbox that prevents it from having any Roll?
Are you referring to rotating editor viewport camera?
no, the camera that's a part of the first person character
I can change it's relative position no problem, but not the rotation
For example I want to add a slight roll when you move left and right
Very likely trying to use control rotation
The camera I mean. There's a setting for it to use control rotation.
ok I managed to set up the control rotation to rotate the scene component instead
What's the function that turns a negative number into a positive one, but not the other way around?
It's just a basic ternary that uses a unary minus operator if it's below zero.
return Number >= 0 ? Number : -Number;
yep
thats... surprising, but does the job
It's template safe. Which makes it work on many differing systems without issues. If a system handles numbers differently, you can still expect their unary minus and >= functions to return same values and on many differing types.
optimized to perfection
it is good codeโข๏ธ
Does any system not handle negative numbers with a signed bit?
getting the bit sign might be more costly than a single arithmetic comparison
It's less about that and more about each system's lower level implementation of type comparison. Probably less of an issue these days, but not every system checks >= the same way for example. And it also accounts for types since it's templated. You can use the same function on a float and an integer.
I'd be surprised if it was really, but idk. Computers are weird in that sense imo
I am wondering if < 0 would be a better call here
imo there's no need to do a comparison at all
regardless of the number you simply mask out the sign
sure if we're on graphics hardware
but yeah it could be masked
although it would essentially be the same thing
return Max(-Number, Number);
heck it might cost the same aswell
but yeah on graphics hardware avoiding the comparison would definitely be better
I dunno. ๐ If I was doing lower level hardware programming I'd care more. ๐ Makes me want to go play Stationeers though.
hey i am using random sequence player can anybody tell me how to stop my animation looping i also used do once where i set the command to play anim
why does Crouch command do nothing? It's at least supposed to make you move slower
It should change your capsule's height.
crouching is disabled by default in character or cmc
you just need to enable it from there and it should start working
this was the issue, thank you
I made a room by for-looping a bunch of floors and walls. Is there some way to recognize the floors and walls as "one object" so I can move it as a whole?
If they are separate actors you can attach them all to a shared root, such as the floor actor. Alternatively you could instead use components
These were the errors i was getting: https://gyazo.com/c8938b7ef1d906fd07234e75fc944352, and I tried doing what you said with GetAllActorsOfClass: https://gyazo.com/4940d51141c47effd93e31b8d806c016
This won't work if you have multiple npcs. You need to iterate over them. Also AI Ref will keep getting overwritten. So it will be set to the last npc Out Actors array.
I have only one npc for now, the actor that im casting to is the base class
but the one actor is being spawned overtime for rounds/waves etc
Hey! I have one question
I'm creating the combat system for a project, and I've seen one video where the guy uses a component for the combat stuff
Should I do so? Which are the best practices for this?
Need a better definition on "Combat stuff" Not sure if you're talking about visuals, abilities, stats, or what.
The combat system itself (at blueprint level)
The logic behind, for example, holding and releasing click to shoot a bow when the bow is equipped
Or attacking with left click
I'd say it depends. If you have access to C++, some things are better put in simple UObjects as a throwaway logic similar to an AI BT's Tasks. Other things like shooting a bow are best done in a separate actor that is spawned on equip.
Very highly depends on what kind of game it is for as well.
Nay, the shooting logic is inside the bow blueprint, I mean, I have to define the controls and logic for the bow, attack etc and activate them through the player controller
Right now, the player controller has an event that is fired whenever the "Fire" (LMB) button is pressed, that calls an interface set on whichever object is selected
The fact is, i don't know if I should move that logic to a component, and have it to store stuff like attack, shoot, dodge etc or to have them all inside the controller
It's a weird question, idk if I expressed it correctly ๐
It is perfectly fine to keep that in it's own actor like that. There are too many moving parts to correctly move it to a component.
this is just a semantic question, but what you would call it if you implemented a way to get index + 1 of an array, but if it was at the end of the array, it would cycle back to 0? Just trying to think of a good name for a boolean variable that would allow that behaviour lol
Wrap?
Nice! perfect
Yeah I remember seeing that used in some similar circumstances :)
I'm trying to get the relative rotation of an actor's controller, how would I accomplish that?
Controllers don't normally have a transform.
A PlayerController does though?
Basically I'm trying to get the "look" velocity (so x and y with the mouse) without casting the actor
doing it in a "reference-free" way
From a Pawn?
I wouldn't advise this "cast free" ideology. You're going to make things much harder for yourself. APlayerController CDO is literally always loaded. Casting to it has zero implications.
I'm trying to make it so the same animations for an actor's skeletal mesh can be used both in a player controller actor or an ai controller actor
if I plug my player's variable (literally getting the axis values from the input) then the blendspace would only work if a player is controlling it
I found a way to avoid this for the movement but for the look blendspace I still have trouble finding it
Depending on your gameplay setup. You could probably do this with the control rotation. That is from the base Controller class. If you cache a control rotation in the anim bp, and delta it each frame for your values.
Would work with AI that way as well since they use the same control rotation when set up for it.
exactly - so from "Try get pawn owner" i do "get control rotation" but that is still relative to the world space
not relative to the actor itself
Shouldn't matter if you're only after the delta from it. It'll be the same in local or world.
If you need the local though, you can easily inverse transform it.
inverse transform it?
also you're right, get control rotation can be used for this - the only thing I don't understand is why the "pitch" is inverted - if I look up it goes negative and if I look down (from 0) it goes to 360 and counts backwards
this works only for pitch, I don't get any change when panning (so yaw)
thank you
How do I actually get an actor's transform in that specific delta time?
Even if I put a delay between two variables it gets the same value and then sets it on execution
One message removed from a suspended account.
this somehow returns the same value in both variable, even if there's a delay between setting them
this wont do nothing
its not connected
...yeah I know, I disconnected it for the screenshot
I assure you even if I connect it I get the same value on both variables
even if I put a 10s delay between them
if you dont rotate the actor it wont change
I do rotate the actor
show the code for it
That's the code
if I exec that and print the two rotators I get the same exact value
show the code that rotates the actor
it's the default rotation code, so it adds controller yaw input
but getactorrotation does return stuff, the problem is that even if I rotate it the two variables are always the same
if I press play and swing my mouse like a madman obviously getactorrotation changes, but rot1 and rot2 get an equal value stored, even though there's a delay between setting them
what is target connected to?
pawn owner will be a controller?
Yep
either a playercontroller or an ai controller
right now I'm testing with my character
controller wont connected depending on settings
Could you elaborate on this? I'm doing well with Blueprint but I realize that I just don't know what you mean with that comment
I assure you the controller is not the issue
look, this is every 0.5 delay between setting the two variables
how is it possible that they are the same?
obviously I was moving around when these values were printed
Is there anyway to fix this or will I have to find a work around?
They're read at the same time
Flow control being keyword
exactly @gentle urchin , how do I make them read at different time?
I believe you need two variables for it
One for current that is read every half sec
And one for last current, read before updating current
those are two variables
--
Yes but you're reading the same one
And its not properly flow controlled
Read from var first, then update var
Get actor rotation returns its current state
Not ehat it was 0.5sec ago
It will only be true half sec ago right before you update it
During the same frame that the update happens
I'm not getting it, would you mind providing an example of this?
2 sec
There is a lot of bullshit surrounding casting that people throw around. So every time someone says they're trying to avoid casting, I assume it's because of that. They go as far as to create interfaces to avoid casting. The real problem is that the people who have experienced the casting issue have made idiotic posts about it and have not actually learned anything from their mistakes. They just blame it on casting and ditch it entirely instead of taking ten minutes to understand stuff. The core basics are that Unreal loads the data from disk once to create a CDO(Class Default Object) for everything you cast to or have a normal pointer property or class property to in your classes. This is because the engine needs direct fast access to that stuff at runtime to be able to create new versions like spawning new actors or reading default data, etc. Normal code only classes are extremely small and take up exceptionally small amounts of RAM. But stuff like assets, such as sounds, meshes, textures, are all massive. A large enough game being all loaded into memory at once causes major problems and chances are the game isn't even using half of it at runtime but it still has to load it all because of your coding. Understanding the way Unreal loads these CDOs and the way that Hard and Soft pointers work can solve all of that with correct architecture.
I actually don't mind casting at all, I use it a lot in c++, but for my example here I'm trying to make the animbp independent from whoever it is assigned to, and usable by anyone (and anything) (obviously anyone that uses that skeletal mesh)
thank you very much
Yeah, I didn't mean to imply you. ๐ I'm just quick to jump on it in this channel because there are a stupid amount of people who end up in here with dumb interface messes who are avoiding casting.
the name "current rot" is actually bad. Its a decaying/ageing rot
Like.. They make interface events, which give the same hard pointer to an object back, and don't even understand why they're trying to use the interface. They just do it cause some twit on Youtube said "Dur Cast Bad"
Exactly
People, hello) Help with a trifle, I'm still poorly oriented myself (
There is a function by which I destroy trees, activation, as you can see, goes through an overlap, that is, a Persian, or rather, I have it ai, went up to a tree, cut it down, found another tree, cut it down, etc., what I want. Since I have trees in a separate spawn blueprint, there are a lot of them, and ai goes in order, sometimes crossing those trees that do not need to be cut, but the trigger is launched. Question!) How to add a time limit with such a function at the beginning, like if the Persian or the Persian trigger is in the activator for less than half a second, then we donโt turn on the function, if we turn it on more, Iโll be glad to help)
Hey I don't know if this is an appropriate time to insert an unrelated question. And this might be a dumb one, but..
Does anyone know if you can control paper2d sprite flipbooks with the animBP interface, like a statemachine and such?
Im guessing there answer is "hell no"
Thank you, it works - but I have yet to grasp why a delay doesn't work but this does
I'll try to understand that before I use it
I have this actor's "SetActorLocation" updating every tick, but it's not moving, even though the debug log says it's at a new location each frame.
If you read Time2 rot before you update it, it'll work
but is it important to have a new getactorrotation node every time a value is read?
or is it okay if they all flare off the same node?
Getactorrotation will be your very current rotation. So you need to store it in a decaying variable. The decaying variable (Time2 rot) is 0.2 sec behind when the delay executes again, and must thus be read before updating with a fresh rotation
Not sure i explain it well but
yeah no I get it, it makes sense
but one thing I still don't get - "Get Actor Rotation" for example -> if I flare it off the same node do I get get same value regardless of timers/delays or is it relative to when the value is being read?
this is your version, and it works
would this one still work?
the only difference is that I'm using the same getactorrotation node
for setting Current Rot before and after the timer
yes, this would work
Why not?
Thank you
I wonder how much performance gain/loss you get for having multiple nodes of the same type
like, having Get Actor Rotation once per blueprint instead of 10 times
Each wire has a cost
1 or 10 doesnt matter
but if that means 1 vs 10 million, we're talking big gains
not that anyone would reach such numbers but
This depends on whether you mean editor performance or runtime performance.
Runtime performance there is zero difference between using one node on a million other nodes vs using a million different nodes on another million different nodes. It's all processed the same way. In editor, there is the slate drawing cost and some minor overhead from K2 Node code.
I meant runtime
I have another problem... I got the value I wanted (when I turn my mouse I get the delta yaw value between old and new)
but the issue is that when I do a full spin suddenly it shoots up to -350 or whatever (normal delta is around +/- 20, depending on my mouse speed)
I assume this is because I'm doing a full circle, but is there any way to avoid t his?
Hi, I have a system where when I wallrun, my camera tilts. The current tilt is an instant snap and I was wondering how I could make it smooth. I thought using FInterps would help but it doesn't
What node do I use to make this thing move around? It doesn't seem to respond to any of the move to location nodes and I don't need it to have physics, since it's just me translating it to a new location when it spawns in.
Set actor location should do it.
If I run a log tracker on it's "current location" it updates per the log, but the actor itself doesn't actually move. It's just stuck in its starting position. #blueprint message
Are you using a interp or lerp?
No, just updating it every tick. I don't need it to animate at all, I just want it to move to the new designated spot.
Then wouldn't it be better to do this on begin play?
I need it to all happen in a specific order, I'm procedurally building a house so that I can iterate and randomize it during play. I think I got something working tho, thanks for the response!
perfect
hi i am watching a video tutorial and the guy says: adding a blueprint class of the type actor... i dont get it, i thought actor is a class, what is the difference between actor class and actor type, is there also a blueprint type and actor class of the blueprint type... very confused here
i think what they mean is "lets make a blueprint class that extends from the actor class"
are you sure, sorry for this "stupid?" question i have no clue so i will memorize this but i need to be sure
so there are blueprint classes that extend from other classes than actor classes, meaning they have another parents then the actor class?
he literally says blueprint class of the type actor, over and over again
this is what you get when you try to create a blueprint class, look at all the choices
blueprints are just abstract c++ code so they can be "child" of any class really, even the ones you create
so blueprint is not a "normal" class?
i thought there is a fixed hierarchy of classes, so how can the blueprint class just hop between the parent classes?
so my question is there a basic difference between the blueprint class and for example the actor class, in the way that actor class is fixed in the hierarchy and blueprint class not?
the hierarchy is dictated by the parent-child relationship
if I have class A which is parent of Class B, then Class B is the child
but nothing stops me from creating a blueprint class, call it "Class C" and make it a child of Class A as well
can i make a actor class and make it child of a pawn class?
No, the actor is already the parent of the pawn
that is the point of my question
so the blueprint class is not yet placed already?
there is no "blueprint class" - a blueprint is literally a file you create
and who it belongs to (as a child) depends on what you decide at the creation of it
GAS in blueprints any idea how do I use that ?
by itself, you dont
yes, but the setup needs to be done in cpp
There is configuration that you need to do within C++ in order to get it functional.
I was trying my best not to go to the c++ side of things guess this has to be done whatsoever
if you want to avoid cpp as much as possible, GasCompanion on the marketplace is a great plugin for GAS/Blueprints
otherwise, you'll need to set it up in cpp
can't pay don't have money i'll just make it do with the CPP and learn that thing in some guide xD
here's a decent video, but if you have no cpp experience, you'll just be copying the code directly.
https://www.youtube.com/watch?v=Yub52f4ZUU0&t=27s
so you may not be able to extend it until you're more familiar with cpp
oh thanks
yeah I've last done coding about two years ago
and last done CPP coding like 6 years ago
though you can create the actual abilities in the editor as you discovered
and since I'm not good at maths I always tend to avoid programming as much as possible
if you're working with blueprints, you're already coding
but guess it's not bad time to learn it again for this system
not like using a typed programming language magically has you using math all over the place.
with way less santax issues that cause my eye burns xD
good luck
return true;
exactly xD
I think this playlist might be good
https://www.youtube.com/watch?v=CO_wifp8jR4&list=PLeEXbS_TaXrDlqQv753CpKqDlpNXixFMg&index=2
UE4 Gameplay Ability System for Blueprint Programmers is a series which allows you to leverage the UE4's powerful Gameplay Ability System, without any C++ knowledge.
In this video I will show you how you can implement UE4 Gameplay Ability System in your own project. We start by creating the very basic classes inside of C++ and then check the fu...
just to mention, there's a channel for GAS as well if/when you need help
#gameplay-ability-system
oh damn nice man that's neat NGL
THanks
Does anyone know how to make two blueprints share the same functions and code?
Without them being necessarily child of eachother
In particular, two animbp with different skeletons
I need the raw code that I built for one to work with other eventually, it's just for variables generation anyways
The guide itself isn't very good, but the concepts in it are fine
I went through it a while back and little is explained when it comes to methodology or reasoning
Hi im updating an old game to use line traces instead of projectiles for all my guns but i can't figure out how to do penetration with the bullets (as in one bullet can go through multiple people) any suggestions?
i was trying this
but it doesnt work
Im trying to learn animation stuff by just copying the base one, the original has this event happen every tick
but mine only happens at the start
this is mine /\
this is what works /
That's the proper thing to do, but what are you doing with the "out hit" array?
just into a loop for the rest of my line trace code
i.e. tell the npc its taken damage
Try printing the names of what's being hit
you need to give it object types in the object type array, just type make array, and add object types like static and dynamic
That's another one, yeah
i have but it just hits the first object it collides with
and doesnt read the rest
this is what it looks like abit more zoomed out
what is this error?
like how do i get a reference of the object i want
i just told you, pull from that green array pin called object types, type make array
and give it some inputs
Can someone tell me how to get the Character Instance of this controller?
pull from AsPlayerController, type get controlled pawn, cast to your custom character if you need to
thanks vassili
I will try
thx guys
It doesnt work
Cast bp_character cast fails
well after thinking about it its highly likely that the controller may no longer control any pawn at that point
what are you trying to do? You might want to look into the Event Unpossesed on the player controller, since that returns a pawn reference
I want to remove the player character from an array when left
hi i am watching a tutorial and see the tutor creating first a blueprint of the the type actor and then adding another components to it. what if i paste a cube actor and then press the ADD button at the cube and add a blueprint to it? is there a reason to do this like that? what is the difference to the first way? the tutor never did that the second way.
you might just have to add the pawn to a variable on that controller when you possess it
So on player controller, event possessed, Set Pawn variable to that
then you will still have access to it on event logout
its just im betting that on event logout, there is no longer a controlled pawn for that actor, because theyve already run the unpossess
So do i have to make a custom player controller class then?
to do what i just said specifically, yes
but also look into the player state, i think the player state array in the game state, has always accurate information of the players in the server and their pawns if any
Okay i think i will do the custom player controller. I would guess i can easily copy all settings from player controller to the custom one
Hopefully this works
anyone know the blueprint alternative of this?
World->OverlapMultiByObjectType(Overlaps, Origin, FQuat::Identity, FCollisionObjectQueryParams(FCollisionObjectQueryParams::InitType::AllDynamicObjects), FCollisionShape::MakeSphere(DamageOuterRadius), SphereParams);
ty
Hey guys, is there a way to combine the position and rotation of the actor to create a new location information?
using flipflop ( not sure it will work for this instance) and 'play' on one, with play reverse on the other. Player walks on trigger, presses a key and block moves up to a landing. The 'reverse', I thought, is player walks back on trigger and presses key again and blocks goes back down, for the reverse. That seems wrong, so if not flipflop what would I use for this block moving ?
I just started using BP for this trigger stuff so I'm not fully aware of all other ways of doing things
What exactly do you mean by "new location information"?
sorry pt 2 : trigger executes a level sequence which moves block up, or back.
suppose to anyway ๐
Sorry for my bad english. When I hit the actor, I know from which region I hit, but I couldn't find how to add an impulse from that position. Always based on the actor's location in the world
I don't know if character movement component supports impulse at location
With "regular" physics based actors you can use "apply impulse at location" I think it's called
If you just want to apply the impulse in the direction of the hit, apply it using the Hit Normal. You can simply multiply it with some large number and use that as the impulse
actually supports it. but when i hit the actor from x direction it adds impulse based on world position. not based on actor rotation
I wonder if we combine the x or y information in its rotation with the information in its location, can I solve this?
I'll have to explain a little more. I hit the actor from the opposite side, I add impulse from the opposite side, but since it stays on the right side according to the world position, it adds from the right side. I couldn't do it according to the direction the actor was looking at
if you want to do it into the direction it's looking at, use Get Actor Forward Vector
Now its not add impulse, i will try this thank you for your help ๐
hey i have two cubes with physics and gravity. then i change the location of the lower cube, so the upper cube should fall, but it stays in the air, like if there was no gravity simulation for it, why is that?
i just changed the location of the lower cube
Hey everyone I got a tough question!: How can I best find the player with the most points?
I have player zones that track points with an Array of Structs, the struct contains: PlayerAwarded (Actor), and Points. How could I more efficiently determine which player has the most points?
My initial thought was to make a Map of Player and Score, but then I would have to compare every player score against each other player score, and if there are 100 points or more I imagine that would not be efficient. I considered a Map but I donโt think that would help. I need to find each unique player in the array of structs, calculate the total of each player and compare all of them to determine the one with the most points. Help! Iโm stumped!!!
Shouldn't Score live in the PlayerState?
You just iterate through every ayer and see if their score is g
Higher than the highest score so far. If so, they're the new high scorer. Once you're done you'll have the dude with the highest score.
It's O(N) not O(Nยฒ)
Yes, but each โZoneโ stores and replicates its own score. And each player โscoreโ can be more that 1 โpointโ. It could be 1.001 or 100+ points scored per player at one time because of any multipliers, bonuses etc.
And because each score can be more than 1 point, itโs possible a player only scores once and beats a player that scored 99 times, or any variation thereof
So I somehow need to calculate the total for each player. Then compare all the players totals. But that seems Iโd have to dynamically make possibly hundreds of maps/arrays to calculate and compare
I have an idea??
The way Iโm currently doing it: each time a player scores in a zone it builds a struct and adds it to the replicated Array called โScoreโ.
I could instead of adding a new struct to the array each time a player scores, instead see if a entry already exists in the array and add the new Score to the existing Score field in the Struct and if it doesnโt exist then add it
Hello. I'm trying to store a single integer index value that is replicated on a PlayerState. It looks like there are supposed to be functions GetPlayerID() and SetPlayerID() for this purpose: In the blueprint I only see the GetPlayerId()! However it looks like set should be available as documented here unless I'm reading it wrong: https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/APlayerState/SetPlayerId/ -- Unless there is a difference between "PlayerState" and "APlayerState" ? Does anyone know why I can't see this function?
Sets the value of PlayerId without causing other side effects to this instance.
What is best way to apply damage to an object on impact? Ex. Car hitting a wall or an object being thrown to the ground.
so im trying to make a function where when a button on a widget is pressed then it will call an event from a different actor but I cant seem to figure out what I have to cast to in order to make it work
Use a collision event to trigger an function that subtracts from a health variable stored on the actor
You need a reference to the camera actor in order to call your "Camera On/off" function, because it needs to know which one to call the event on
So you need to find some way to get a reference to the object that's being hovered over, whether it's a line trace, collision, or if there's existing functionality for hover events, I don't know
I'm not sure if it's ue5 specific or caused by any plugin I'm using but whenever I start PIE (seperate window, 2 players, listen server) immediatly focus the client window and press WASD before it's ready setting up I loose connection to host
so somthing like this
What exactly is Camera in this case
its an actor that will move when an event is triggered
Is it the player or just a random actor?
random actor
Then you need a reference to that actor somehow
If that's in a widget, don't think that would work
Well, you need a ref to the Camera Actor, you gotta get it some way or another
Depends how it all plays out
If the camera is a child of the player blueprint, you could get player character, cast to your player class instead, and get a reference to your camera actor as a child of the character
Get component by class, and get a copy if you have only one camera.
it seems like you're trying to set it up like you would a click event or something. You need to figure out how you're going to interface between the player input and the actor
what it really comes down to is that your widget needs to have references to the actors you're interacting with
Heya everyone - by any chance is someone any bit familiar with the Tree View portion of Widgets and how best to leverage them? I cannot seem to find any good information on them for the life of me and am wanting to try to build out a series of collapsible lists for quest logs and such (think similar to how many MMOs like WoW does for separating out 'area' and underneath it, the quests within that zone). Any help or insight would be greatly appreciated ๐
Is there a better way than this to detect if the input axis mapping is triggered from a keyboard press or the game pad?
maybe a boolean that detects it at begin play? Or every tick if you want to be able to change it mid-game
this is every tick, but I am just allowing both options for the player, but when it is the keyboard I need to modify the data, it works but I was wondering if there is a node or something to say what was used
actually I like the way you did it, it changes to reading the controller input only when the said input is present
I can't see how it could backfire tbh
I don't think it will back fire, it just feels a little bit clunky
any gaming platform is a calculator on steroids, I'm sure operations such as this barely cost anything
yea, but if I was boss of unreal and this was a mapping then the Yaw event would return 1 or -1 for keyboard input, and the actually gamepad stick value if the gamepad was used
or have I set that up wrong?
that config looks fine to me?
Sadly there's none iirc. There are plugins that handle it, i believe on a lower level than this if im not mistaken.
Reactive input mappings, or a simple menu option for the player is some of your options
I'll carry on as it is then ๐
Im not sure why games try to be so flexible towards the inputs tho, (beyond supporting other input methods),
Is it common for players to swap mid game from keyboard to gamepad etc?
Its something that has never crossed my mind ๐
Then again its probably not that much extra work, and it feels nice for the player
I've never thought about it but now it haunts me
Hi so I entered my ai in the world I created from scratch and it works fine but when I stop playtesting I get this error and when I check everything it looks normal but I'm not sure what this means.
what if somebody decides to and they encounter a BUG
It means a variable was read before it was set to an actual instance reference
to me it seems easier to just accept both inputs than to make a menu for the player to choose and then have two functions for every mapping, but if there is an easier way I am open mined ๐
ok thank you for responding
u can use "is valid node" so u can avoid this error
I figured how to make a character perform a vault jump mid-air and I'm super proud
How do I make my character move forward and backward independently of where you look?
So for the "target, Self" what should i connect it to?
if you look straight down for example you cant move forward at all
show me a screenshot
I connected it to the "Set as float"
u get the error for the patrol path var, so u need to check that. For this u can use the is valid node with exec inputs, outputs or the "is valid" function with a branch or u can right click the variable and "Convert to validated get".
It would still be the same mapping, just not dynamically updating all contextual menus with the proper button all the time ๐
Do note that using IsValid doesnt "fix" it if it's a running error. It removes the error if this is purely a flow control issue, and the variable gets set at a later point than its first read ๐
Ok, thanks. I'm kinda confused about this, but ill see if that solves anything since everything looks like it runs fine.
@swift gull Light blue variables in blueprint are called memory pointers. Memory pointers are just a number that point to a location in your RAM. When you try to call a function on a pointer, it uses that number to find the actual object in RAM and apply the function to it. If you do this on a pointer that has a number that points to an incorrect object, or a pointer that has not had it's number set, you will get an invalid use error. By default, pointers are null and point to nothing. Some of them are set by default. The ones that you yourself manually create are never populated by default and will be null until you call Set on them and pass in a valid pointer from an existing or newly created object.
It turns out I was doing it wrong
this is the better way, in stead of using left and right just use the axis for the stick then the axis value is analog for game pads and no need to test for keyboard or gamepad
Is the issue possibly related to you leaving the spawn collision on "default"? You're trying to spawn an actor inside another, and you may be having issues with it being prevented
Thanks, everyone for the help. Turns out all I needed was to add another blackboard to it.
Do I need a separate blueprint for each and every prop?
You can just drag them into the level as is without putting them in a blueprint.
but it only applies to basic shapes right?
Applies to any shapes as they were imported to Unreal.
The only time you need a blueprint is if you want to group multiples together or randomize them.
hey, how can i add collision to my wall textures that are in my level?
So make a prop in blender or similar program?
what if I want to make different kinds of bottles that have the same properties like breaking on strong enough impact?
but in different shapes and sizes
do I use several blueprints or just one but assign different models to them?
hey i have a third person chararacter which i turned into first person using camera but the problem is whie running i cant see the arm can anybody tell any solution for that
If you look at the fist person template, the 'arms' you see are actually fake and only visible to the player owner. They are in an awkward position which they normally wouldn't be in for the sake of visibility to the player
If you want to swap between 1st and 3rd person, you should have two sets of meshes which are each visible depending on the mode. Check out that template and see what I mean
Collisions can be edited in UE4 on the 'collision' button at the top of the mesh editor
Ya I know that but I am using a third person template and all my animation are compatible with third person template only
I change the camera position to the head and make it look like the first person but I want like when I run i can see my hand when i slide my camera goes inside my body how to fix that issue
Hi. Trying to make AI for car. Need to determine is the target location is on the left side from car, on the right (-1 0 1)
Compare direction with right and right *-1 vector, smallest dot product is the winner
I'm not at a pc rn, but I believe this would work:
You can do this with a little vector math.
You need to direction vectors.
The first being the forward of the car, the second being the side the character is on.
To get the characters position relative to the car, you'll need to use the GetUnitDirection node. Plug in the cars position and the characters position.
Now that you have the direction of the character relative to the car, you can now calculate if the character is on the left side or the right.
This can be done with a Dot Product vector node.
Plugin the cars forward vector and the previous calculated direction.
With the output, you can determine which side its on. The output will be negative or positive and between 0-1. I'm not sure which one would be the left or right, but you could figure this through testing.
.... Ehh maybe you don't need that other calculation, yeah @gentle urchin that should work too.
I guess you only need to compare once
@foggy escarpThanks that a lot of new info. Going to study
Compare to right vector, and if dot is below zero its on the left side
The same can be done with forward vector if you also need to know if its in front or behind the car
But don't you need two direction vectors to do this?
One for the direction of car and the other for the side the character is on.
Right vector is relative to the cars heading direction
does anyone recognize this dialogue system asset?? That would really help me!
Yes but this would only work of the car was non moving and couldn't turn the other direction correct?
It would always work
Unless ur insane and turning the mesh only ^^
So you'd need to calculate the direction with a get unit direction node.
Yepp
Ahh, I just got done working on a runtime transform gizmo, so now I dream in vector math lol.
๐
So dot product between GetUnitDirection() and GetActorRight
Positive = right side, negative = left side
And the same if you wanna chevk in front or behind. Dot product between GetUnitDirection() and GetActorForward(), where positive is forward, negative is behind
I've started on level transitioning and I'm wondering what would be the best way to transfer over the data to the next level (character health, equipment, selected characters in party, etc.) Creating a game instance is fine, but I'm asking if there is a better way than having a set function for every single variable tied to the instance.
Hey everyone, wondering if you can help.
Iโm working on a turned based RPG, my combat is coming along but iโm stuck for critical hits.
I want the player to press a button at the right time to give extra damage on the attack (critical hit).
With Anim notify state i was able to do this, i give it a small window to press the button and I print string โCritical hitโ and itโs working fine. Where iโm stuck is we canโt set valuables in the anim notify state. How should i give the information that there is a critical hit on the attack?
I have a combat component where the damage is calculated so it would need to communicate with that i assume.
Any help is welcomed and appreciated ๐
What to you mean cant set valuables?
I assume you're already telling the cimbat component to do a regular attack at some point? Perhaps during a notify?
yo, is there a way to flip these during runtime depending if you stand inside or outside trigger volume?
In the anim notify state you can only get valuables. And yes in my combat component i have an attack command event but it doesnโt know if the player pressed the button at the right time for a critical so that i can multiply the damage ๐
As far as I can figure out, this seems like the way to go with saving for the next level, though I'm a bit unsure as how to load the character afterwards.
Hi all, I'm using Map Range (Float) to control a cutoff frequency in MetaSounds. The function maps the range linearly, but I need a different kind of curve (logarithmic?) so that it sweeps the lower part of the frequency range slower. Is this easy to achieve?
Manually, percent * percent @jaunty drum, nvm this is for quadratic, not log
Set collision response is a node
You can also set values. Id listen for player input and set a bool to true if crit hit
okay thnx
I recommend not async saving in this case. Beginning of game and end of game don't need to be async. Async should only ever be used in the middle of a game, on a larger save file, on data that can be safely saved mid game.
Okay, so just a regular save then. Still trying to find out how to load the character afterwards.
What are you saving here?
Hi I have been trying to find out how I can pause my game for the steam overlay with (Tab+Shift) and a gamepad home button using blueprints and I also need a blueprint for when a controller gets disconnected to pause the game please help
and just to let you know I'm kind of new to blueprints still so if you can send me a picture that would be appreciated
I'm trying to save the inventory content and stats of a character (health, equipped weapon, etc.) to load into the next level. Later on I'll have to do this with multiple characters, but I'm trying to get a starting point.
Is this evening something you can do in blueprints?
What are you saving though? Structs and pod or pointers?
Can you save, for example, a structure containing all the variables of the character?
Pod variables yes. Pointers, no.
pod = plain old data = integers, floats, FName, String, GameplayTag, etc.
References no, because anything they point to is deleted and recreated at a different memory address when you load the game.
Haha i said valuables when i meant variables ๐คฆโโ๏ธ
Ah, then I see. Most of the stats should be fine then. The equipment I would have to reference as a name I think and then re-add upon the next level start. I'm a bit unsure of how to do the inventory then as for the moment it is a structure inside an inventory component belonging to the player controller.
There ain't an easy way to add buttons to blueprint detail panels, right? I've been adding a bool "Do The Thing" and making it Instance Editable, and on Tick I check if it's true, and if it is I set it false and do the thing I wanted. The bool kinda acts like a button there. Is there a cleaner way to do this?
Make a function callable in Editor, if that's what you're looking for
That's EXACTLY what I was looking for! Thanks!
Is your game singleplayer by chance? No plans for multiplayer?
Yes, only singleplayer.
If you want a really easy way to handle data that will save you a serious migraine later, then make a single system around loading a savegame file and create functions in your classes to read/write to it instead of saving stuff in the classes. You don't have to do this for everything, but if you do it for anything savable, it makes your classes really easy to manage. An example. I have one subsystem that loads with the gameinstance. Loading a game from the main menu or starting a new game creates a savegame file into this system. Because it's part of Gameinstance it persists level loads. I read/write all game data to this object that I need to save through the course of gameplay. It never gets written to disk until you actually call Save, so you're free to alter this savegame object's state all game long and still reload back to where you started or even load a whole different game, etc. But more importantly it's available long before beginplays and such. All of my classes like a FinanceManager, EmployeeManage, etc etc all just have functions to read and write data to this object instead of saving it on themselves and then writing it to the Savegame object before saving. I find it very clean. It's only drawback is of course you can't network those states, so it only works in singleplayer.
So far like 80% of my personal project code is all just 7 subsystems handling data from that one savegame object. ๐
Thanks. I'll dig in and see what I can figure out ๐
Thanks. I wonder how logarithmic could work.
I've done this and can recommend
So I created an AI behavior tree and made a child BP from it. But it takes on the exact same BT of the parent BP. How do I alter the BT for the Child, because I want different AI types but all under the same Parent.
you can't inherit from the BT itself
in the end a BT is just a data structure to pointers
what you can do is run subtrees
I need to start that at some point in this project too. AI ๐ฆ
have a subsystem for it
I did that
I basically have a component that I put on AI that registers them to the subsystem, and the subsystem then acts as the high level director (which makes decisions on a macro level)
individual AI still retain their own perception (and decision making on a micro level)
Yeah. Right now I'm just simulating matches randomly from a different map. ๐ Haven't even started working on that side yet. Half of this project was created in the attempt at doing a better version of the new CommonUI plugin. Made a little plugin that wraps most common widgets. Applies a default style to them that can be set at the project level, and allows setting a small data asset pointer in each one to style it. Very useful little plugin.
tbh I should think about moving logic structures into plugins as well
Next goal is a colorable blur. Bugs me having to wrap it in a border every time.
just for that extra portability between projects
isn't that just a screen tint + blur?
Kinda. To do it in basic UMG you have to either use an image with your own blur material you can color. Or you can use the BackgroundBlur and wrap it in a border, set the border's opacity lower and to a different color. I find myself doing that a surprising amount for styles, would be nice just to have it as a colorable blur widget.
makes sense
Sounds like a good setup ! Do you ever have some autosave incase of power outage or the likes?
Or is that just "shitty luck" scenario
hey all - is there a way to disable collision events while moving? i want the character to still simulate physics and be able to move but i only want to fire events when velocity is zero. is this doable?
you'd have to replace the collision with some other collision while moving
It won't be any different than any other saving system. The only difference is that instead of having data on classes, I have data in the savegame object and classes that reference that data through the object. The save game object is written to disk at intervals, or on manual saving in different slots that the user wants like any other save system.
setting up delegates would be the first step, so you know when your character is moving and when not
just to be clear: BP save games aren't written directly to disk
they remain part of the game binaries
Yeah. Setting a property on the SaveGameObject doesn't write it to disk. That stays in RAM until you literally call SaveGameToSlot on it. So I can load a savegame slot, alter it to death and then just reload it and be back where I was before all of those alterations if I don't actually call SaveGameToSlot.
Sorry for the confusion, I just looked at my question and I made a mistake. I didnโt make a Child from the BT, I made a child from the BP Actor that the BT was allocated to.
If you still want the main tree, you still need to consider subtrees or some form of logic switching on blackboard values.
How do I make subtrees? Is that an option for BT or do I need to do it manually?
it's literally another tree
or even the same tree
any tree can be a subtree
Ok
I just need to figure out how to connect them to whichever AI I want it to be connected with
Iโm new to BTโs
I'd keep it at a sketch level of 1 BT for now
and just use decorators to prevent branch execution
then later you can consider moving to subtrees once you know the full extent of your BT
As part of a traversal system I do a bunch of checks on Jump to determine what traversal state should be activated. Currently I'm checking all states in an order based on priority. Is there a better way to set this up without a bunch of if-statements?
Appreciate thatโฆI am a fast learner and already have a good understanding of how BTโs work. That being said I want to do the subtrees. The problem is when dealing with a child BP, it does not show the event graph. Or the AI controller thatโs connected cannot be accessed either from the child, you know where you tell it to run a โspecificโ BT. So my question is, how do I tell the child to run a specific BT that I make for it? Where is that decision made?
when you say child BP, what do you mean exactly?
You know how when you right click on an actor BP then at the top it says create child?
okay and you dont have an event graph why?
The event graph for the child just has a node connected to begin play that is just a reference to the parent
Nothing else
right yeah, that's expected
the graph runs its parent functionality through the parent nodes
@gentle urchinThank you a lot. I don't think that I could figure out something like this in a short time.
however you are free to call functions and events as you would on the parent
So I need a reference to the child in the parent event graph?
Dose anyone know if you can store a data structure as a variable? Cause right now it dosent work for me. And i just have to know if you actually can store data structures as variables or if im doing something wrong.
no not at all. the child is the parent
show your code for you parent graph and tell me what you want to do it with it
yes you can, it's likely that it can't find the row name
or the row name contains empty data
Right, I understand and I appreciate the responses. Donโt worry about the event graph I was just using that as an example. Because the AI controller is where you run the BT correct?
Oh it can, all that works, its just now that im trying to redo a system it stoped working ๐ Before i too the out row and put it straight into my "Add to inventory" but now i want to store it as a variable when the item spawns, and then when the player picks it up add it to the inventory.
So letโs say I create a subtree by duplicating the BT Iโm currently using. How do I connect that subtree to the child?
use breakpoints to see if the data transfer to the variable. setting a struct should be fine
you need a new BT asset that contains the tree
Yeah thats what i thought, so then its wrong somewhere in the code not in that a data struc cant be set ๐
which is why I said keep everything in 1 tree first
then branch once you know all the variables
Right gotcha
this may seem like an "optional" step but the idea is that you don't know when you actually want to subtree certain things until you have the full scope
structs have issues when you try and set individual members, but a struct variable should be fine
this is also due to the fact that you are not having the ability to use inheritance for BTs in the same way as you do classes. so when you iterate over it you'll have to iterate over multiple assets instead of just a single asset
What do you mean with members?
Members == Variable == Property
Anyone know if there is a way to do wildcard maps in macros? Both keys & values will always output as whatever the Key type in the map is.
edit: The values don't even seem to be passed through
Is there any practical difference between using interfaces and using event dispatchers? Is it recommended using them in different situations?
There is no correlation between a delegate and an interface. They are completely differing systems.
Delegates are used to subscribe an event to a function call without the caller having to save all references and loop over them and cast to them and call their functions, etc.
Interfaces are used to call the same event on classes that cannot share a base class. Typical use case is interaction, like opening a door, and opening an NPC dialog screen from an AI, or toggling a light on and off from a switch, or picking up something from the ground all just from pressing F and calling the interface function on the hit actor without caring what it's cast to.
The fact is, I have a character that can hold different weapons (which all inherit from a BP_Item or child). This is set by a child actor slot that can change its content (for example, change holding a bow to hold a sword). Right now, when I use the attack button, I fire an event and call the interface of the child if available, and let the child actor to manage the rest. For this case, would it be better to use dispatchers, interfaces or it doesn't matter?
I am looking to get all these splines into an array in the MainGrabPoint child blueprint.
The functionality should be within the child blueprint itself. Anyone knows how to do this? I can't figure it out, I've been staring at this for the entire afternoon ๐
You don't need an interface or a dispatcher. You've said yourself that they all inherit from a single class. Put a function in the base class and override it in the children and call it on that.
how do i create a save game for a level. So if the player has never player before level 2 will be locked but if he completes level 1 they will unlock level 2. if the player closes the game and reopens it, level 2 will still be unlocked
I tried this just to test it but it doesnt print out anything
I have no idea but i suggesting googling a tutorial it sounds like a very easy concept
i did but they are all int stores
Save & Load Game! Unreal Engine 5 Compatible!
โ Come join the Team Beard Discord: https://discord.com/invite/hhv4qBs โ
โ Check out my Marketplace Asset: https://www.unrealengine.com/marketplace/en-US/product/flexible-combat-system โ
โ
Ways to Support The Channel โ
Patreon: https://www.patreon.com/JonBeardsell?...โ
Buy Me A Coffee: https://www...
this guy seems to know what he's talking about using integers
srry if its no help
ill check it out
Hey guys, I have a specific question about "splines".
Is it possible to control the sections of the splines (i.e. the "point sections" of the spline route) (using blueprint).
So I want to create a big spline route and drive to the single "point sections" (the points that you copy and move for the spline route) of the spline with a cube.
I want to create a spline route and drive to spline point 3, stop there, then drive to spline point 8, etc.
How would I implement this (via blueprints)? I have not found a function to control (or find) the coordinates of the spline points.
Thanks in advance
There are these nodes that you can use to manipulate the spline points
There is also a node to set the tangents
But the math for how those will be handled will probably be very custom to your scenario
First of all, thank you very much, that really helps me a lot
I can then say theoretically:
Please drive to spline point 3 via the spline route?
If so, how would I best approach this?
https://www.unrealengine.com/en-US/onlinelearning-courses actually have courses on making save games.
Quick question: is storing a variable for how many secrets are on a level within the level blueprint a good idea? I want to be able to use that variable to show up on the viewport when I press tab and then to disappear when I press tab again. I've read that you can't really call variables from level blueprints. So where should I store that variable instead?
I also want to do the same thing for how many enemies are left in the level
I'm thinking of storing those on Game Mode. Those persist on one persistent level, and AFAIK in multiplayer case are good for storing stats and whatnot.
Okay so create a gamemode and have that level use that gamemode? And then just store all the variables and information in there itself?
Yeah, and then Game State would read those value over for the client
Though my knowledge on multiplayer specific is rather spotty, so I might be wrong in that regard
Still, feel free to experiment with that around and see if that works out
I guess that whatever is driving over it knows its distance along that spline. In the tick you increase the distance a bit. Once it reaches the desired distance you disable the movement that you built in the tick.
Hi guys i was wondering why this specific part of code is making it so when i jump to try and grap onto a ledge it snaps my camera to the side?
im trying to make it so when he is in the hanging state it limits his camera yaw and pitch
hey guys, I found this nice tutorial for bullet holes https://www.youtube.com/watch?v=gmMPcLSlhHU Thing is I'm pretty sure this method only applies a sticker to the surface. Is there a way to give that sticker uv maps so it has depth to it?
Download:
https://drive.google.com/file/d/1KL8TBg9LlcE9YYz_6dFcI7Pk0nrW6zHO/view?usp=sharing
In this tutorial I am going to show you how you can make bullet holes very easy.
Subscribe to our newsletter:
http://eldstormgames.com/
Engine Version: 4.19.2
Don't forget to like and subscribe!
you probably actually want to use the 'Time' element of splines... like GetTransformAtTime which is probably on a 0-1 range (check your spline). If so, you would interp your actor transforms at an appropriately scaled time using Tick. if you only want to move to index 3 you may need to check each tick to see if you've arrived at index 3 and then respond accordingly
Probably is. Those are set in world space, not local.
Great Photogrammetry scan of this monastery, that you can find on Sketchfab (see credits for link). Thought I would bring it in to UE5 and add a it of photorealism, and package it into a tech demo
Added scans from megascans on top of the Sketchfab mesh, and did some color correction to make the 2 assets match., and then let Lumen and Nanite do ...
does anyone know how to have a great camera movement like that?
Hi if i make 2 eqs tests one being a grid one being a donut
only donut shows up
if i delete donut
nothing shows up
grids are not working
circle test works too
but pathing and simple grid dont show
cone also doesnt work anymore
nvm fixed it for some reason nav mesh wasnt built
is it possible to cast soft classes?
e.g. actor soft class to something more specific
load the class asset and cast it or use child of on whatever
but your question isn't really specific
I have a function that takes a weapon soft object class (child of actor) but I have a Actor soft object class I know is refing a weapon
yeah can load for sure, but using soft refs to avoid loading!
do you really need the class if you have an object?
could just get the class from the object and do a ischild of check on the class of the actor
but i have a hard time understanding what is loaded/what not and what should be checked against what and why
Have some trouble with saving. For some reason, upon loading, the game reads none for all the saved variables. Any ideas of what is happening here?
its an inventory system,. w/ soft objects I can work with inventory without loading in assets
and I have helper functions to query the soft objects for info, mostly assetregistry stuff (i store weight and stuff in asset data)
the functions could in theory expect soft classes of certain actor subclasses, but I cant cast them
so I think my helpers just need to be actor soft classes and not specific
Hi now i have a different problem
get query results as location
is always failing
hello I've been searching for ages to do this, im trying to do an app in unreal engine that allows you to control all of the arduino pins from unreal, im using serial port for that, but as you can see thats kinda inefficient so i discovered firmata protocol to do that instead of building my own protocol, the question would be if theres any way to implement firmata protocol into unreal. thanks in advance
That's up to C++ and the plugin interfacing both Unreal and the Arduino device.
It's not something that's doable solely with just BP
Hi guys, I'm currently trying to figure out how to get the surface area of each wall inside a standard box shaped building, 4 walls, a floor and a ceiling. I'm trying to calculate the RT60 of the room using the Sabine equation, and for that I need to work out each materials total surface area. Using line tracing, what would be the best way to go about doing this? I've seen 'Get Component Bounds' mentioned online, but i'm unsure where to go from there. Any help would be greatly appreciated!
can I cast to the level blueprint from an actor blueprint? I cannot find the option
You can, using GetAllActorsOfClass, but it isn't a good approach.
You should be using EventDispatchers instead
@undone willow nope, level BP is not available to actors
thank you, I have made it work
I have solved it a little differently, but thank you very much for your answer
Glad I could be of help! ๐
that is just high fps
high fps first person camera
High fps first person camera how do i make such thing?
it's already built in
just increase the framerate
Ah okay gotta check in unreal engine
be aware that the higher the fps the more performance intensive it will be
well if you use 24 fps that's the problem
if you use 60 you normalize that
anyway there is no magic here it's just increasing the fps to get less stutter
#umg?
i was told to send blueprints here but ill send them there too.
well no pick a channel
cross posting is frowned upon
ok well Ill keep them here then...?
your call
OK glad to hear it!
What does the widget reflector have to do with this? Don't see a mouse on the first screenshot.
Mouse doesnt appear on the screenshot, but it is hovering over the Exit button. It shows the different areas of the widget but on the first screenshot it doesnt display that greenline around the widget at all. I thought it may help narrow it down.
Great Photogrammetry scan of this monastery, that you can find on Sketchfab (see credits for link). Thought I would bring it in to UE5 and add a it of photorealism, and package it into a tech demo
Added scans from megascans on top of the Sketchfab mesh, and did some color correction to make the 2 assets match., and then let Lumen and Nanite do ...
but i think this has special blueprint
