#blueprint
1 messages ยท Page 287 of 1
The code should work in 5.3 too, but I assume you have no clue how to add that and compile the plugin with it or?
Could also try grabbing the 5.4 version of the plugin and copying it into your 5.3 project :D
But might throw errors cause of binaries
Ive compiled the actual project through VS before but not a plugin, not sure if there's any difference? I'd rather attempt that than the 5.4 version to 5.3 that scares me ๐ worst worst case scenario i'm gonna be updating to 5.5 when Nvidia hurry up and update DLSS so i can wait if i have too, its only sorting server names so its not that important
Well it's difficult to guide you through that. Almost easier for me to compile the plugin for 5.3 and give it to you.
But I don't have time atm.
what is this digital?
Digital is On/off.
Analog would be 0.0 to 1.0.
In other words, that Trigger, that you can usually partially press, would only react if you fully press it, similar to a keyboard key or other gamepad buttons.
If you use the non Digital Version you get a float for how far you press it.
for some reason, the raw input plugin, whenever i use it, anytime i go to set a key, axis 1 always has input, how do i fix it?
ty!
Naa you're good brother ill just wait and update lol appreciate ya help
Looking for some confirmation from someone experienced here: is the GameplayTag system a good choice for handling a requirement my project has, where there are many different types of actors that must be labelled with potentially 5-20 "descriptors", like the actor's color, size, type, subtype, rarity, general weight, etc.? The descriptors would be shared among many assets, and there will be quests such as "find X [COLOR] things" or "interact with X unique [RARITY] things", etc.
Yea, a gameplay tag container can have multiple tags and supports hierachy. You can do checks to see if something contains any or all of tags specified in another container. Pretty powerful stuff.
When i'm possessing a pawn, do I need to somehow unset my previous player pawn to avoid double input triggers?
ok nvm it's not what's causing the double input issue (don't know what is).
I have a very weird thing happening with timeline event tracks.
I setup an event track to trigger a few times along a timeline, and it triggers fine but only when my character (2.5D game) goes in one direction, but not the other?
I'm not even sure what to think about this.
probably the besty for something like this, yes a you might want to use actor component for whole system + different containers for different attributes
To those who may care, apparently events do not play if playrate goes negative while the timeline is playing forward. At least that was the edgecase here.
It means you fucked up
Why isn't this colliding, the train is set to collide with tracks and the tracks are set to collide with the invis guide objects
All the guide objects are Identical
Same with the tracks, there all identical! Yet there is no collision!
Pls help! Ive been stuck on this for like an hour and a half now!
Is there a strong reason to prefer a function or a macro inside of blueprints, assuming I don't actually expect the function to be called from the outside of the class, but I just want to de-duplicate some logic?
What does need to happen? Did you set it on all static meshes etc. ?
The guide wheels on the train should be colliding with the tracks.
Its all set in the blueprints, Unless I need to do the mesh settings aswell
Functions are easier to debug and can have input and output parameters, can also be converted to ''pure'' without execution nodes. I personally feel bad about macros. I once thought I'm clever and collapsed a lot of things into macros and boy I was struggling with debbuging shit. Everything was hidden, needed to click something 6 times just to find what is executed right now ๐
In mesh that is IN the blueprint. Not mesh itself
Aye, I've done both
It should all be set.
and this is on runtime?
Oh wow, I didn't know that, thank you. Is there anything redeeming about macros at all, or best left alone?
and they don't collide just ''collapse'' ?
Yeah, just Phase stright through eachother
They have their use I guess if you have some part of code that can be repeated in whole blueprint but usually it's not worth it I think.
Wdym? if you mean it spawns above the tracks at first then yes
Go to the mesh settings and check if it has Collision enabled (Simple or Complex)
they are, it was working before i added the "track" collision type
When they where all static meshes
I dont mean in Default Settings of blueprint, but actually inside mesh of track and static mesh of the locomotive
it should do, I havent changed anything
Show the static mesh of the tracks and settings
In a bit, I'm in a damn court room in minecraft*
Yeah, It was working fine before, but when I tried adding a "track" collision type so that the guide wheels don't mess with the flood when it derails
they're very useful when you want to create your own functions with logics, an example is For/While/Do Once/Gate/etc are all made out of macros, I usually use macro library to expose all my macros to all blueprints, an example is having a delay function that can be paused/resumed/stopped and also be able to get the time left of that delay through a macro 
this 
So I have a widget that contains information about towers that can be build (gets it from a Data table) No class is present in that data table. That widget creates buttons based on that data (so a brush, name, costs etc.) Then when one of those buttons is clicked it should make a tower of the clicked button type (for example a gattling tower button will create a gattling tower to be placed on the map). What is best practice when it comes to "linking" the button to the creation of that gattling tower without creating too many dependencies
I read something about a Data Asset (based on PrimaryDataAsset) but that doesnt ring a bell, can someone confirm that that is the way to go? Or shouold it be something else?
Just add Class of the building you want to spawn to the Data Asset and hold it in the Button. When Button is clicked it calls to the Placement Manager to ''Place Building'' and it get's that class from Data Asset and passes it trough. Placement Manager then takes care of spawning this building (probably preview first).
In your case just add Class variable to Data Table
Yea I have a tower management blueprint, but not sure how to reduce dependencies. last time I added the class to the Datatable the sizemap went crazy
Use a base class like "BP_Building" for all your buildables, and within your data table use a soft class reference of that type. You'd pass that soft class to your spawner, load the soft class, then spawn actor as normal.
You gonna have this tower in every level or it's a tower that is gonna be only in the last 50th level? ๐ If you are gonna spawn it anyway sooner or later it doesn't matter.
Unless you have 173 different towers
The white cylinders are suposed to colide with the top of the rails
So I'm confused. Let's say I want to pick up an actor, and throw it at another actor, and that other actor do something. Would I check for overlap, kill the actor, set the static mesh into my hand to that of the actor, and then whenever I throw it, destroy the static mesh and spawn in the actor at the throw location?
and show collision of these cylinders
They are just the default parts with unreal
Infact, the wheel parts arent coliding with anything for some reason
Does anybody know of a good relatively pre-configured service for CI/CD packaging of UE5 games?
I understand I can manually configure a box on AWS or something, but I'm ideally looking for something a little more pre-configured
For some reason, turning on "World Static" makes it work...
Even though all the tracks are set to track
you are probably looking at wrong static mesh or something
Im looking at my track blueprints
and the one you need to change is actually world static and not tracks
Odd, its only the stright tracks that arent working.
Looks like it was entierly a glitch... Damn it unreal!
If I have a tower or enemy that dies and it should explode. Where should the explosion "live"? Just on the tower or enemy that died and soft reference it there and spawn when its dead. Or should something else handle that?
There's no exact right strategy, but probably the simplest reasonable one would be to have the Tower or Enemy spawn an explosion object when it dies
Unless you require some high level orchestration of many explosions, pulling the logic out into some sort of "ExplosionManager" is only going to make things harder
does anyone have any tips on restarting a game from a certain point? my game is a local multiplayer couch game like gang beasts or party animals. It's from 2 to 4 players, and when 1 player is left or none are left, I want it to restart from the point when all characters are spawned and the camera has zoomed in. The only way I can restart the game currently is by using the restart executable command and restarting everything, making it impossible to track scores. If there's any documentation or even just a place I can try to learn from, anything would be great
The thing that is getting killed should have animation and logic on itself what happens when it destroys. So basically if your HealthComponent you check if after attack HP is < 0, if yes it means thing is dead. You call On Death.
The Owner of the component on Begin Play binds to this On Death event, and here you specify what happens:
Boom boom, Print: I'm Destroyed!!, Destroy Actor
Are you using GAS?
GAS? (which probably answers your question)
Lol. Gameplay ability system. It would allow you to literally "give your thing the ability to die'. You create an ability, you give it to the tower, the ability handles setting it's collisions or whatever else you need, spawning cues that are explosions or fire, sounds, etc. And then when the thing dies you simply activate the ability.
I'll look into it, thanks!
Making a 2.5D game. How do I make it so the player can go around this circle?
By just moving left and right
It's specially useful in cases like this. Because you can give individual things each their own special abilities to die. Characters can have special ones, towers can have special ones, etc. And they can all have the same tag which your health system can simply play an ability by tag and whatever death ability you've granted said thing simply runs.
My train phases through my tracks above about 35kmph, anyone know how I could stop that happening?
I have CCD on alreay, Soo
Not aware of anything preconfigured.
Horde maybe, but probably still needs the same setup and you gotta host it
does anyone know how i can set my exact center of mass for my rigidbody? i know theres an autocalculation that happens under the hood that precomputes it but i need full control over where it is placed. heres what i've came up with so far but i am unsure whether its reliablely/accurately
setting the center of mass. Thanks in advance!
How could I cull actors specifically for clients that are closer/further from them, and what would be the best way to do this
Right now I have a sphere trace that is on the ThirdPersonCharacter which checks every .1 seconds but its 30000 radius so it takes a pretty big hit on the clients performance
Is there any way to allow my train to Pitch and Yaw but not roll?
yo does anyone have any recommendations for getting to grips with scaling and formatting UI stuff, like tutorials and such?
It's a bit odd with how a lot of things auto scale to fit their content, and things like the buttons scaling to the text look ununiform because of it.
I feel it gets a lot better once you get to grips with it, but currently it feels overcomplicated
My best advice on this is to basically never use scaleboxes for a start. Not that you are, but generally never resort to them except for rare stuff like resizing a background. Absolutely NEVER scale text.
And always allow children to dictate the size of their parents. Like your BT_Control. It should be about 30% bigger because the text in it should be making it's container larger.
Most UI layouts get a lot easier when you learn the second part.
do you mean with scale boxes, like scaling horizonzal and vertical boxes?
Also is scaling always bad, cuz something like the slider is so small in its base size that I scaled like 10x
If there is another method to make it bigger please let me know
Also is it possible to make something like the text smaller, the more letters it has so it always stays the same relative size?
I feel that be nicer then having a bunch of differently sized buttons
Why does it feel like my "free" physics constraint is acting like a spring!
it wasnt, My forces where acting on the wrong place XD
Hey! Trying to assist my team with answers ... we're trying to add a diy solution via BP where we can load in a webshop as url embed (already made), take payment, confirm payment to player account and add to inventory ... the confirm and add portions are proving to be confusing to lock down on how to ... is there an easy to follow solution to do this?
Go to your game mode. There should be restart game function.
Are you not familiar with http request?
I don't think there's a bp only solution for something custom like that. You will need to program in some language, one way or another.
Like how the purchase even made in the first place? If steam then you will need the steam sdk/api.
Of course there's no bp solution for this, if you want to do something involved like that you need a programmer.
Also is the game multiplayer? If it's single player, the players can just hack the game and obtain the asset.
What's the consensus on using spaces in naming events in Blueprints? OK? Frowned upon? Doesn't matter? Just be consistent about it?
E.g. Event DoStuffForMe vs Event Do Stuff For Me
I personally use underscore to replace space
Or just camel case it
Both are valid, just stay consistent.
And just avoid space altogether imo
doesn't it place spaces in the name anyway?
If you work with other programmers they might not be accustomed to space, even if it doesn't break stuff
Timer By Event would like to have a word with you
hi, how to load "DetailsView" immediately so that it doesn't lag while scrolling?
anyone can help?
(Utility Widget)
its ok
I don't know about using space, it sounds cursed.
if you work alone it all on you to decide, if in team then there is probably rules or standard how to name things
That didn't do anything, even plugging it into my pause menu's restart button thats ran through the level blueprint, it did nothing. The UE WTF series on youtube just shows that function to restart the game, similar to using the command "restartlevel"
But that's not what I'm trying to do. I basically want to save at a point where all players playing the game are spawned, then once they have all died, or 1 is remaining, a score point will be added and it will "restart" in a sense back to when all players had been spawned in, with the addition of that point to which ever player won
RestartGame should lead to all actors calling Restart or Reset or so in them. That's up to you to implement then. There is no built in way to take a snapshot of your game and go back to it.
That's why the majority of peeps would ServerTravel with ?Restart, which re-opens the same level
Not sure why you can't track scores with that though. Especially in couch coop you could move the score to the GameInstance. And fwiw you can still try to use Seamless ServerTravel, even in couch coop. Never tried it but if that works then you can use CopyProperties in the PlayerState to move the score from old to new PlayerState
If that all fails then you will have to code the restart system yourself for your specific use case.
Sounds like you want to start a new round as opposed to restarting.
How can I get a string of the blueprint executing ? E.g. i have blueprint, Content/Assets/ThisShouldBeEasy.uasset. on an event, I want to print that path.
Uh yeah, sorry my wording is really weird with things lately. I just thought the easiest way to put it was to just restart in a sense, but I was wrong. I'm not much of a coder if I'm honest, I can get by with what knowledge I have and youtube tutorials out there, but I struggle. I've got 3 people relying on me to get this game coded ๐
Ref to self -> get path and similar gives you either blank or the path to the transient.
how much stuff in the world has to be reset?
Player pawns of course, but what else
it pretty much just has to respawn 4 players and 1 actor bp in the level. The UI shouldn't have to be reset since it's just a main menu and a pause menu with different tabs (settings, controls, credits)
just have some function that does that
calls restartplayer on all players then tells that actor to reset
probably gamemode or gamestate
try self -> get class -> get path
what about just traveling or opening the same level again? if its mutliplayer then probably just level travel with everetything reset
but IDK, never done it
That worked, cheers mate. You have helped countless people here
the thing is, I followed dev enabled's local multiplayer tutorial, so each input (player 1 to 4) has to manually spawn their instance of the character bp in before all the players can actually start, so because of that i think each player would have to manually spawn their character in again rather than just using restartplayer or restart game. maybe im overthinking it
Any way I can also retrive what function in my blueprint im in? This is to help organize debugging print statements
then do that. However the player's pawn is set up, just do that again
probably not
i just tried using restart player within the player bp, casting to my gamemode bp, and it doesnt seem to do anything, or is it something that can only be executed from the gamemode or level bp
you said you're doing some weird way of manually spawning characters etc
just do that
It's like starting, but again
restarting
when the game begins
also do it when you want to
when the game should "restart"
Start -> do your setup -> play
Restart -> do your setup -> play
make DoYourSetup do the cleanup like destroying old pawns if they exist etc
unless you want to leave a zombie wherever you restarted from
Is it possible to add an item in front of the array?
insert maybe
Like add an element with an index of 0 and move everything that is already there backwards
Yea, insert at index 0 will do that.
hey. im trying to make a game similar to mario party/wii party. and im trying to make the base game flow. trying to start with a minigame system. but im not really sure where to start. ive identified what i think i need for it, being a base system that other game modes can then call on later to have a minigame in a round if the game needs it, a minigame explanation screen, the minigame itself, and the results/ placement. something like this https://youtube.com/clip/UgkxICCenFwKinDomLmIrsh_mioYQI2ZzMWH?si=2x0DMMhoHFk_OIn0 im just not sure where to beginn
31 seconds ยท Clipped by KIRA ยท Original video "Wii Party - Board Game Island" by Typhlosion4President
not the actual minigame just the flow from explanation screen, to minigame, to results
Y'all i've got a widget physically in my Level - in the past i've been able to interact with it by clicking it with my input mode set to UI... but suddenly i can't. Any help>?
anyone know why my line trace literally ignore everything? I also did try toggle "trace complex", put other object in the way like a cube but to no avail
open trelo, write down what you need to implement and break them into small task.
Can always start with implementing the movement first.
What's a way to store information when changing levels? I know with code you can transfer information from old levels to the level you're changing to, but is there some way of doing that with blueprints?
shouldn't the white lines of the tick be "pumping" out when the game is executing? its not executing the code neither on BeginPlay nor on Tick =(
Game instance lasts between levels
Bit of a question.
Lets say I have a static mesh with some forces acting on it. How would I add another force that basically pushes it from behind? What nodes would I use?
Thanks for any answers
its not hitting the breakpoints
GetForwardVector should tell you what direction you need, but it will be values between 0-1, so multiply by some factor then use AddForce or something similar
I'll look into it, thanks
made a new project and the BPs execute, in main project this doesnt happen ๐
in the blueprint defaults, there is a checkbox for Enabling Ticks, is that on?
You store it in a persistence object. Either saved game object or game instance
in Class Defaults?
By saved game object do you mean saving to the hard drive?
Hey I'm looking for a way to detect continuous touching of two blocking objects, I actually use overlaps to detect continuous overlap, to create a small buffer of touching before killing my pawn, but this sometimes may allow the pawn to penetrate the object and when activating physics it will create a wonky effect when blocking is activated
forgot to call Super::BeginPlay()
If you are using seamless travel you can do that during the swap player controller event in the game mode (assuming both game modes share a common parent)
Guys, what the fuck? My character won't look up. I have my camera set to bUsePawnControlRotation and I have AddControllerYawInput set to it. IT was working before, and now it suddenly stopped working
I found the problem
sometimes I think my code is haunted
I just wanted to see how far I can go with macros back then

wtf guys i make changes to my blueprint code and for the last days no change is actually getting saved and I keep going back at the same place everyday. It looks saved but by the time i restart my computer Im back at level 0 in terms of the recnet changes.
I did try to implement some kind of version control program a while ago but if I click restore selected, it will say "failed to restore"
oh never mind, somehow it got fixed
keep getting this error
LowLevelFatalError [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\MallocBinned2.cpp] [Line: 1438]
FMallocBinned2 Attempt to realloc an unrecognized block 000002A6159E0000 canary == 0x0 != 0xe3
Only happens in packaged builds and the logs dont show anything. already tried disabling all volumetric fog but the issue still persists
Hey folks
I'm trying to create a system in which I can control camera shakes (When to do a shake, but also amplitude of said shake, etc.)
Currently trying to do this from the Game Instance so other blueprints just sends a "request" to do a shake, and a function decides if it should be done.
I've created a "DefaultCameraShakeBase", and I would like to control the variables in it on the fly.
How do I set up the reference to it and change values before I play it?
Hello, I am trying to implement a destruction in my game that works like in the game "Deep Rock Galactic". It is like mesh booleans but way more advanced. The meshes itself can also be subdivided into different substances. Any help on how to achieve this is appreciated
How do i get the first one with all 3 seperate scales to chose from so it doesnt error my Multiply node? They are the same node with the same name but i cant get the option to have 3 seperate scales anymore?
Right click the yellow pin and select split
BTW even the yellow one shouldn't give you an error
It will just multiply every single member
Probably doing something wrong.
thats what i thought it would do as well but its giving me the error anyways
thanks for the help though
Post the error code
So you don't want to have the output as float but vector
If you want to scale all axis, drag from the yellow pin and multiply with vector
Then convert the vector at the bottom to float.
Should give you out vector
In blueprints, the way you wish to update the camera shake is not supported by the camera shake system. The properties of the camera shake must be pre-defined.
After taking a look at the source code, it looks pretty doable to achieve this behavior in cpp. Although not like its actually supported, the system is still designed to be fire and forget.
The best you can do in blueprints is use the ShakeScale variable on the camera shake base in order to affect the camera shake during runtime. Most of the system is not exposed to bp. Even simple things like the function that returns if the camera shake is finished are not exposed.
I don't remember how many times I have ask this question but I am here again to ask the same dumb question ๐ . So if I remove an element while the for each loop is running, could it cause problem? Like skipping element because of index?
Yeah it could definitely cause problems.
thanks for the intel
If you are iterating through an array, and each iteration, there is a chance that the current index gets removed, you can use a reverse for loop and there will be no issues.
Indeed thats wat I used
hey all, making a tower in Unreal Engine that should shoot any enemies that walk past it. For some reason, it doesn't seem to be firing out the projectile when shooting enemy ai, however if I replace the cast to bp_enemy with cast to bp_thirdpersoncharacter, it will shoot them just fine. I have no idea why it will shoot the playable character, but not the enemy ai.
for some extra information, it does follow their movements, and I've used print strings to make sure all parts are working, and it triggers each time. It just doesn't spawn the projectile
Place Print Strings and Breakpoints to see which part of your code actually call and what the values are.
Is there a way to retrieve the names of all active variants from within an editor utility widget? I am trying to build a screenshot tool that adds the names of any active variants to the file name of a screenshot image
Looking for like a "get active variant" node but doesnt seem to exist
i do not wnat to control the variant manager from the blueprint, i just want the blueprint to see which variants are currently active
all parts of the code are being called, the print strings are telling me that the arrows are being spawned and that it is sighting the correct character. In the outliner, nothing is being spawned, nor is anything coming out of the turret.
i have turned off colission to see if that was the issue, but that didn't change anything, and with it being able to shoot the player character when replacing the bp_enemy with the player character bp, i didn't think it would.
guys, can you have blueprint classes as plugin?
is there a way to change the tooltip that was changed in 5.5?
by fiddling with source, I would think yes
Guess next thing would be checking the Actor you are spawning. Seeing if taht actually spawns and what it's doing.
it's not spawning when targetting the bp_enemy, but if I replace the target to be the bp_thirdpersoncharacter, it does
Is your code maybe calling a lot of times, constantly retriggering the Delay?
Can you try it without the delay?
that could be it, I will try that
Or block the whole thing with a boolean until the delay is over
Or just a Timer to beginw ith and use the TImerHandle to block the execution :D
In theory, you want to do this differently anyway. If some other enemy is sensed in the meantime it will stop the exeuction.
You probably want to add every sensed enemy to an array (unique).
even without the delay it doesn't seem to be spawning, but thank you for pointing this out. I can only imagine it would cause me more chaos later on
And when you add to that array you check if the array was empty before, and if it was, you start a looping timer with 0.2 seconds that loops over the enemies in the array and figures out the best one to shoot at (or picks the first one in the array, whatever your condition is).
There should also be something for like when the Sensing stuff stops sensing an enemy
How do you confirm this? By checking if it visually spawns?
Or did you put a print int oBeginPlay of the Projectile?
I have just done a print string on the begin play of the projectile, it turns out it is spawning. Sorry about this, I was confirming it visually, as when it targets the player, it spawns just fine and I can see it.
I have fixed it, sorry about all this, but thank you for the help anyway, the information on the array and delay will be incredibly useful
can someone explain why my spline points arent showing up to actually draw the spline? i wrote out the blueprint exactly like a tutorial yet the points arent showing up, just the actor (a basic cylinder - which im hoping to draw in an ellipse shape since spline seems to be the only way. a taurus distorts to a smaller dimention on the short side of the elipse.
Does anyone know how to create a UI material that would warp the size of widgets on screen in a small radius? Think like a magnifying glass moving across a map
Quick question regarding the enhanced input system. I'm trying to create a golf club swinging mechanic and I want to use the y-position of the mouse to control the backswing and downward swing, and I'm trying to use an input action with an axis1D value type. But when debugging the corresponding action event to trigger the swing, the action value stays a 0, and I'm sure it should be a positive value when moving forward with the mouse and vice versa with a negative value moving the mouse back but thats not happening. Any ideas?
I don't have a direct answer to that, but are you aware of the UI Material Library that Epic released a couple months or so ago?
Please share the whole setup if possible. Hard to give any suggestions otherwise.
No I was not! I'll take a look. Thanks for the help
Are you using Triggered pin from the Input Action?
No, ongoing. It seems to only register a value of zero from the action value when I try to debug it.
I think they changed it in 5.5 update and now it doesn't get value on Started or Ongoing pin, you have to drag it from Triggered to get value -1 or 1
Try it
Yep, that did it! ๐ . It's so strange. I've been debugging this for like 2 hours and it didn't work with any modifiers or triggers or anything. And ultimately it the execution pin.
Yeah I had similiar input action in 5.4, everything was working. I updated to 5.5 and suddenly shit stopped working, took me over 1h to finally try using Triggered and it worked.
Well i want to create a slicing animation. I have a knife mesh in my character BP and i want that knife to smoothly move to downwards then do that upwards to come to its first position. But as u can see it doesnt move because of the set location node. Is there any way to make it look smoother?
is there a way I can use both an AI controller and a player controller on the player character at the same time?
I want to do a point and click movement system but moveto and simplemovetolocation don't actually move to the place you click, it stops short
so I tried using ai moveto because that actually goes where you want it to which is important for the project I'm doing, but in order for that to work the ai controller has to possess the player character which kicks out the player controller which then stops you being able to do stuff like get hit result from cursor and also it breaks the camera
how can I have the AI moveto system handle the movement while still being in control of the player character? As I said it stopping short is not good enough for what I need.
When you click the button, set a looping Timer By Event at about 0.03 seconds (or whatever tick time you need). On each tick of the timer, add a small amount (e.g., +1, +2, +3โadjust as necessary) to the knifeโs Z location.
You have a few ways to โstopโ the timer. One option is to use variables like FullDuration and CurrentDuration. Each tick, add the tick time to CurrentDuration until it reaches FullDuration. At that point, cancel the timer and reset the knife to its base state. You can apply the same logic if you want the knife to move back slowlyโjust reverse the direction and reset accordingly.
Alternatively, you can handle it via the click event: if you click and hold, the knife moves forward; when you release the button, cancel the โstabbingโ and have the knife return to its original position.
Lastly, note that using a delay here may not be ideal. Generally, itโs better to use timers for smooth, controlled movement rather than relying on delays.
You don't need the player controller to possess the pawn. Just give it an AI controller, and let the player controller tell it's AI controller what to do.
but when I did that the camera completely borked
like the camera reset to a default position and was no longer following the player
You can set view target to the character manually. Possession does this for you. But you can do it yourself with SetViewTargetWithBlend and a zero blend value.
which blueprint do I put the "setviewtargetwithblend" on?
so I tried doing set view target with blend to the player character after being possessed by the AI controller and it still breaks the camera
thx for the advice ill give it a try
If you have more questions after you start, go ahead, just try yourself first ๐
You'll have to find somewhere that works for you. I don't know your logical setup to know when you can make the call after the default ones run. Your PlayerController's Possess function could work. But it's just a guess. It'd set view target to the other pawn whenever your controller possesses anything. May be worth also putting it on beginplay. But it just depends on the other logic at play.
is there any other way of making the player character actually stand on top of a waypoint using the regular moveto nodes rather than having to set up this AI controller?
because as I said the whole reason I'm having to do this is because simple move to location always stops short
and I can't find a way to get it to stand exactly on top of where I told it to go
Dunno. Not familiar with the simple move to stuff. But if you need a lot of navigation with AI anyhow, it's good to use it.
Thereโs not really a setup required, the engine gives you a default AICon when you use the nodes, iirc
Set acceptance radius to 5 or something and Bobโs your uncle
well the issue with that is trying to do anything in the ai controller if it's not possessing the player character is impossible, I've basically had to make it so that there is no player character, it's controlled by the AI controller and I issue commands in the player controller which the AI controller then follows
I just kept my logic in the playerCon, the AICon will just handle the movement part of things that is also called from the player con (can also be called from the character, in my case it wasnโt a single character game)
but whenever I try to have the aicon do anything to the player character while it isn't possessing the player character (which in turn removes it as the player character meaning the player controller doesn't have direct control) then it wouldn't do anything, the only time I got it to succeed is when it was possessing
What is it supposed to do while itโs being possessed by AI?
literally just ai moveto because ai moveto is the only method of movement I could find where the character stands on top of the clicked space instead of stopping just short of it, and the way the mechanics of the game work I need the character to stand directly on top of the clicked space
Hello, I am new to UE5 and I ran into a problem I couldn't solve. I am trying to adjust character rotation according to mouse hit location in the world. I am trying to do this whenever the mouse moves. Using Enhanced Input I created Input Action and bound it to Mouse XY Axis in Input Mapping Context. I also set Show Mouse Cursor to true. When I play in PIE, the mouse movement is only detected when the left button is held down. I tried setting Input Mode to Game and UI and lock the mouse to viewport but it did not work. I tried setting the mouse cursor to hidden and it worked. Also when I use the Event Mouse XY 2D-Axis directly in the Player Controller BP It works, but not with Enhanced Input implementation. Am I missing something here? Thanks in advance
I have a savegame problem, When I save Money It works perfectly and I'm doing the same thing, when I cast to BP_SaveCharacter the cast comes out as Unknown, Is there anybody who can help me with this?
how can subtract from the launch velocity when the player is in the air? launch velocity on the ground is 1000 but when in the air, the player is seemingly going further when launched. i want to subtract 500 from the launch velocity so both ground and air movement are somewhat similar in distance
Try to use the Overrides on the launch node.
just do the math
thanks, einstein
im trying to
your best bet will be a select node, select a vector to subtract based on falling
if not falling, it's 0,0,0
if falling, it's whatever you want
function library functions need to be pure
you can if you pass the object in as a parameter
you mean pass it through?
or pass it as a local variable?
What are you actually trying to do?
call an event on what?
on a widget blueprint graph
you need to pass in whatever you want to modify, a function library function can't get anything from the world
I'm starting work on a feature that allows players to delete placed objects in the scene. These objects are created as Instanced Static Meshes.
My current approach is:
Identify the hovered ISM component (via hit result).
Map instance IDs to world locations to allow iteration.
Find the nearest instance by checking which mapped instance is within a distance threshold of the hit location.
Since each ISM component can hold up to 200 instances, I'm concerned about performance especially if the player rapidly drags their cursor across objects in deletion mode. My idea to mitigate this is resetting the iteration process if the hit result changes location more than a desired threshold.
Would this be an effective approach, or is there a better way to efficiently identify and remove the correct instance? Any insights would be greatly appreciated!
(Attached: Current solution for hit detection โ not yet implemented, still refining the approach.)
what does "Pick A" mean?
If true, use A. If false, use B
so do i have it connected properly?
I guess so? It'll pick the same thing at the moment cause they're all zeros.
It's worth noting that the HitItem or ElementIndex, I don't remember which, will have the index of the ISM you've hit. So you can affect the ISM directly with the hit component ant that index. And I doubt you'll need to limit this, it's unlikely to be a huge performance issue.
I get it from outside right?
Central UI passes a (self) reference to an event in some other widgets. Then inside of those widgets we activate โก those events through keyboard and mouse events๐ฑ๏ธ โจ๏ธ , and then inside of those events we call our library functions.
So Im passing through these inputs/outputs pipelines my (self) reference of the first master "Central UI" ๐ but finally when it lands on my library function, I put it in through a "UserWidget" input platform, is that correct? Because it fails to find me my function through that.
Il say this though, there is something weird going on, as I can see 2 central UIs on the same name, thats why i avoided catching it through a "Central-UI" reference
but i wonder how is it possible that im able to open simutaneously both of these widgets at the same time and it is going to be the same blueprint
You're a lifesaver! Thanks to your suggestion, I was able to cut down on excessive and redundant code. Solution 1 (my original approach) was a bit clunky, but Solution 2 (your recommendation) streamlined everything beautifully. See the picture below for a comparison!
open on 2 tabs at the same time on my Unreal Engine editor
and if i make a change through there, it will be applied to both, but sometimes only one of those will work for some reason, its very weird. So I have to be careful on which one to use
i mean i think i have the right idea
hi can anyone help me and tell me how to make the user upload an audio file and the program read it and play it ?
you probably don't mean an actual upload
upload to where?
if you just want to play a song from your computer, you can simply just link the path to the file.
and use media source to read
no like actual upload like an music player app
is it even possible
assets are not cooked to the application once the project is packaged
if you want to play custom musics, you simply ask the user to link the path
you don't "upload" or cook them into the application
not with blueprint
the best you can do is just store the paths
and have media player plays the file from the given path
I mean, is it possible for example to install a plugin . so that it takes the file name as a variable and then runs it normally?
Next to anything is possible in terms of programming - it's just a matter of figuring out what is required in order to get you to that point.
https://www.youtube.com/watch?v=wGl5dc8XnVA --- here's an example where they are using a plugin and it looks to support importing mp3s.
thanks pro i really appreciate it i will see it and if i have another question i will text you โค๏ธ
I have a strange one I can't seem to crack - IA event to pickup an item on the ground, it traces to find item, picks up the item, then destroys actor.
I drop the item from my inventory, and pickup again - the same event/s trace and find item, add it to inventory, but then can't destroy because "accessed none trying to read hit actor". But the pickup part reads the exact same hit actor fine, and it all reads the hit actor fine the first time around?
not sure if there is a better place to ask this question.... but my ue5 keeps "freezing" when i try to convert a blueprint spline into a static mesh with the actor tab. and its essentially stuck at 0%. i cant click on anything in the ue5 program but the rest of my computer is still usable and functioning. ive tried it 3 seperate times now because i need the static mesh of the spline i created yet it just keeps happening. I have to force close ue5 with task manager even though it doesnt show unresponsive it is 100% frozen at 0% while converting to a static mesh. is there any way to fix this or alternatives that get me the static mesh created from my blueprint spline and the spline i created?
when the trace doesn't hit any actor it will be null
make sure that you hitting something or do nothing when you are not hitting any actor with an if check
It is hitting an actor though, as it passes this actor through to be picked up, but the destroy actor then can't access the same hit actor, even though both can access the hit actor the first time
cache it if that's the intention
You mean set it as a var or?
sure but it's hard to see the intention with 0 code
Also has the same problem - When it spawns the object (Dropped from invo), it spawns from class, and i'm now wondering if it has something to do with that.
ok that is not gonna work
don't cross pin
especially in multiplayer
in client it will always be null
you need to pass the actual hit data to client machine
your RPC need param
and even then it still wouldn't work
I don't understand the code here. YOu are doing input, which is local only, then you are doing client RPC?
only server can do client RPC, so what the actual intention here?
whole thing is scrambled with incorrect codes
It works the first time, which is what's confusing me, just not on dropped items
Input Pressed -> Hit actor? yes?
Server RPC (passing the hit actor)
Yup
"works" but you are just playing as listen server, maybe that's why it "work"
but the whole code is obvious mistake to me
Client specifically, don't think it works as listen
#blueprint message
^ try doing this instead
Isn't that what it's doing?
do you know what client RPC does?
it's server telling owning client to execute function
i don't understand the intention here
I've just replaced the additem event with a non rpc custom event and it still works fine, so that was pointless of me
oh well, I give up
RPCs cause execution of events on different instances (server/clients). You can't just connect the HitResult stuff like this. If you RPC you need to send the data along via Inputs of the RPC event.
Computer 1 will have the HitResult in its memory, Computer 2 won't. Sending an RPC from 1 to 2 and using 1's HitResult doesn't work without sending the HitResult too
So the hit actor gets passed through to the RPC event here via input(?), what's the difference between what you describe and what I have?
RPC is the instruction that get send over the network
so you need to wrap your hit result along with the "letter"
with what you have right now, the side that receive the RPC, only execute the function. The hit result is not valid on their machine
I understand this can be confusing due to the way the EventGraph makes it look. But as soon as you use an RPC, you aren't in the same Event Graph anymore. If you have two computers in your room, one you send an RPC from one to another, then you can picture the part before the RPC to be on Computer 1 and the part of the RPC on Computer 2.
It's just that the EventGraph allows you to connect the pins/wires like this that makes it wrong and confusing
So would I need player to trigger the IA, then the server to trace to hit the object, additem and then destroy?
that's entirely up to the design choice but be aware that the client location and the server location are not necessarily the same. There is latency so you may interact and have your cursor lined up with an item but when
the rpc arrived at the server, the start and end line trace gets offsetted and misses the item you are interacting (think of if the start trace is the character's location and remember the server's and client's version is not neccesarily the same).
@flat summit the easiest route would be to just trace locally and pass the hit actor to server.
But this would be "trust me bro approach" and can allow players to easily cheat.
if you are new to mp though, don't worry too much about cheating and understand basic RPC first.
you can try to do some server validation when you are comfortable enough.
Yeah I'm happy with trust me bro for now, just trying to wrap my head around it all ๐
Hi I have a WBP with an event on tick to calculate distance from the player to an object in the scene, it works but when the character possess a vehicle adding a new mapping context, it breaks the tick of the WBP causing errors, any tips to overcome this situation? The WBP is a quest component, I tried messing around with the code without any luck, I hope there's an easier solution ๐
Hi everyone! I need a help, my character stopped using animations while walking, running or crouching
Have you already double checked things in the Animations BP? Check if it is playing the right animations
check blend space inside locomotion
I have checked, everything is fine
I don't know from where the problem came from
having widget blueprint to do any gameplay logic like that is pretty concerning
why is it placed in widget blueprint?
Widget job is to just read values from it's source and display it in a form of UI
and you have distance check for gameplay, makes no sense to store that logic in the U.I. What if you have to remove the U.I? your distance check will break.
post your setup
this is the code of the WBP
everything that you can think of, from the character blueprint, to the anim blueprint, etc
there is a change in speed, but no change in animations
it is the easy quests plugin, I guess I'll have to move the code inside the character?
it stays in defalut mode, like when the character does not move
Hi guys, i have a problem ๐ . I keep getting a bone position issue while trying to run and ik. Anyone has an idea what might be wrong?
are you playing any montage?
Wouldn't that be more for #animation ? And the second screenshot is really low-resolution and hard to read.
No sire
They weren't asking you :P
yes
Unless you are the same person somehow :D
Check if they are in world or component space
there is a montage for turning and crouching only
damn, for real, I need to transfer my animations as animation sequence to montage, I guess this will help?
I am not sure
I am going to try it now
wouldn't use crouch as montage...
Montages are one-shot animations that get layered on top of normal animation flow.
cause there is an animation while turning left to right and crouching and other are not working
why?
hm
Like a Punch or a Sword Swing or so. Locomotion is usually not done via AnimMontages.
Probably returns null for the GetPlayerCharacter if you possess a vehicle.
GetPlayerPawn could resolve that fwiw.
the transition of standing and crouching is done by montage and turning also, and they work while animation sequences in locomotion does not work
Or so I think.
Transitions from standing to crouching etc. is usually not done via Montages either
That's usually a setup of 3 states in the AnimBP.
Standing -A> StandingToCrouching -B> Crouching
With Transition A being bIsCrouching == true
And Transition B being RemainingTime of StandingToCrouching Anim < 0.1 or something along those lines.
Similar to how Jumping is setup in the Third Person Examples
Fwiw, you could try and handle that via a Montage, but I don't think I've seen that setup before.
I am going to change some stuff then and see if thy work or not
I used the world space to set the aim socket and cam socket
thank you everyone for support!
But it seems the hand_r resets and the virtual bone tries to copy it at that frame
trt to check translation mode inside transform bone
in animbp, it says bone manipulation is disabled, maybe this is a problem? how to turn it on?
It's in world space
I set it to the weapon aim point transform
Do you think it's a frame issue ?
check the rotation mode (replace - ignore - add)
My best guess is to play with those settings and see what happens, or you could try to do all the logic again..
Seems like before the copy occurs, the location of the aimpoint relative to the hand is not same as initially read
I have. It's been 2 days now
did you set those variable somewhere
Yes.
try disabling them to test
It won't work at all. They are the key variables. I have also calculated a relative transform to aim_hand from the aimsocket. But it give an offset i have no idea why
what happens if you set the alpha to 0
The bone goes to the rootbone
in animbp, it says bone manipulation is disabled, maybe this is a problem? how to turn it on?
are you following a tutorial? You can try to redo this part of the logic, remove all the variables, and recreate them later when you're satisfied with results, at least you can see what is causing the issue
I tried but cannot find it
not a problem I guess
I was referring to the other user
ok
@frosty heron the tick is inside the WBP cause it have an animation running too in the UI so I guess I can't move the code outside the WBP? If you have any tips please let me know, thanks
later in the tutorial series, the als v4 will be implemented by using its content, so there is no need to think about problems from current movement system?
The issue is most likely because you're getting the character. When you posses a vehicle this isn't a character. Try getting the player controller and get the controlled pawn and get the location from that instead.
like moving als v4 content to the project file to renew the movement system, so current movement system won't be the problem, if there is a problem in movement system?
???
can client builds and server builds only exist with source engine?
i saw ": Server targets are not currently supported from this engine distribution." and same for Client when running binary version and trying to package client and server, I know server is supposed to be for source only but didnt realize Client had the same thing
typical <projectname> builds without issues
and that was for 5.5
I guess you can take a horse to water but you can't make them drink. ๐คท
Yea, you can't do a server only build without source.
yea but what about client. looks like client has same thing
received similar issue but server was exchanged against client in the error message and resulted in unknown failure (exit code 6)
@dark drum @surreal peak GetPlayerPawn doesn't work, I'm trying a few "Get's" the thing is the code seems to point to the "Actor" variable,I hope I don't need to change all the references ๐
The client would just be a standard build as far as i'm aware. Even for single player, the server runs in the background. The source is required to strip away the client sutff if I remember correctly.
client fails to build
using binary
projectGame builds work tho
Well the logic you showed only requires an actor type for the get distance too.
Finnaly got it working
wdym with "It points to the Actor variable"?
Is the Actor variable Accessed None?
๐ค I might be thinking of something else then. It might be worth posting in #packaging
Generally if you need a server only build, or a client build, you need source. Both are essentially the same thing, just one strips out server code, the other strips out client only code. You should be building them both from the same engine anyhow, so if the server one requires source, you should build the client one off of the same identical game and engine files.
If I don't use this Actor variable, the distance and the circle animations wont work in the UI
Show the logic that doesn't work if you change it.
it fails at set text
What is "Actor" here?
Well that's stupid. If you move an attribute from one set to another. Then go back into the GEs after loading the engine to go set the attributes to the right set, it crashes.
Hm, keep them in both, change it, and then remove the old one?
Shouldn't crash of course.
yea I'm aware of that, I'm trying to fix it
Yeah but what does the Actor have to do with that? Where are you setting that Actor variable to a value?
I did nothing. it's the easy quests plugin
In theory, the Actor variable, if set to something, should stay the same, no matter if you get into the vehicle or not.
The point is that you need to replace the GetPlayerCharacter node.
What is the Vehicle inheriting from that you are possessing?
It must be Pawn ultimately.
That's the only thing that can be possessed in UE.
Which means if you use this, you should be fine, cause that will continue to return the new Pawn (the vehicle).
ah it works now!
And unless you show a setup with that and Actor connected not working while you are in the Vehicle, and you give us some logs and print strings, I don't believe you that it doens't work.
Welp, there we go.
I guess I need a break lol
Maybe. But you also need to read what is suggested.
Cause this was already said half an hour ago or so.
And in the future provide more information in form of debugging attempts.
Put print strings up and what not.
We can't pull that info out of thin air.
I can only so much rely on previous knowledge to guess what could be your problem :P
I tried! But I guess I disabled the actor or something silly
On one hand. That's probably going to work. On the other hand. People working for a multi million dollar company should write safer code.
BUT IT'S FIIIIINE, IT'S EDITOR ONLY CODE, HURHURHUR WUTS A NULLCHECK
Did you leave this Discord at some point in 2024?
true, sorry about that!
I could swear you are part of this madness for a longer time.
You shouldn't be surprised anymore :D
Yeah. C++ channel made me ragequit.
Valid.
It occurred to me that I have a source build. Easier to put an if statement.
Do you guys actually use often Function Libraries in your projects? Like to not repeat function like: Get Closests Actor, Get Actor with lowest health etc. ?
If it's general enough yeah
if you ever find yourself making a function and you're like "huh, I could see myself using this anywhere" then you might consider putting it in a FL
Yeah, I mean the function is kind of complicated enough and because it's loop I want to put it in C++ and I got recommendation to put it in Library which I guess would make sense.
you could always make a better version of a loop in blueprints if you know what you're doing
Oh, yeah got it, but this one needs to use ''delay'' after each iterration and it's not that easy in blueprint and probably not good for performance either ๐
if it's complicated and you only plan to use it in one place for something very specific though then Idk if I'd bother with a FL, but you know it doesn't hurt
how are you planning on having a delay in a function in cpp?
probably setting timer by event for each iteration or something like that
You could use a timer as a loop at that point
๐ค by iteration do you mean after each element in the array? because if so can't do that in a function in cpp the same way you can't do it in bp
Because loops are executed start to finish within a single tick
{
if (!WorldContextObject || Actors.Num() == 0)
{
return;
}
UWorld* World = WorldContextObject->GetWorld();
if (!World)
{
return;
}
// Determine how many targets to process.
int32 EffectiveCount = FMath::Min(Actors.Num(), MaxTargets);
// Use shared pointers to keep state across timer callbacks.
TSharedRef<int32> CurrentIndex = MakeShareable(new int32(0));
TSharedRef<float> CurrentDamage = MakeShareable(new float(BaseDamage));
FTimerHandle TimerHandle;
FTimerDelegate TimerDelegate;
TimerDelegate.BindLambda([=, &TimerHandle]()
{
if (*CurrentIndex < EffectiveCount)
{
AActor* TargetActor = Actors[*CurrentIndex];
if (TargetActor)
{
UHealthComponent* HealthComp = TargetActor->FindComponentByClass<UHealthComponent>();
if (HealthComp)
{
HealthComp->ApplyDamage(*CurrentDamage);
}
}
*CurrentDamage *= ReductionFactor;
(*CurrentIndex)++;
}
else
{
World->GetTimerManager().ClearTimer(TimerHandle);
}
});
World->GetTimerManager().SetTimer(TimerHandle, TimerDelegate, Delay, true);
}
Will test if it works
there's no loop in this function, you could do this same thing in blueprints and I don't think it's gonna cause you any optimization issues
actually I'm positive it wouldn't
A looping timer like this would be far better for DoT than a loop with delay either way
agree
I just don't see why someone told you, you should do it in c++
unless they are just cpp enthusiast who will tell you to do anything in c++. Those people exist and they're everywhere
That I don't care about but it doesn't really matter
that was towards AmberleafCotton but alright lol
Ik, but it doesn't hurt to have it in cpp either way
nothing hurts to have in c++
I do almost all my "gameplay" function library functions in cpp. Most of my BP function library stuff is just UI related or small QoL I already have in cpp
@fiery swallow is it possible to add impulse to a character that is playing root motion montage?
I mean it works and it's better than this prototype I was starting with ๐ but thanks for help guys
now its much clearer and easier
I've never directly added impulse or force to a character before ๐ . Launch character has always satisfied my needs. Sorry
Don't be sorry, thanks a lot
I can try launch character. But I think the root motion is fighting it
The add impulse works if the character is not playing a montage with root motion.
I actually don't want to use root motion but somehow, montage froze if it's not turned on ๐ค
@frosty heron have you tried turning root motion off with force root lock on?
if you need the montage to behave like root motion, without strong-arming the characters location, force root lock usually helps
I generally try to make functions as generic as I can. If I can get away with making them project agnostic, they go in a library in a multiple project plugin. And most projects have a few project specific libraries that just make sense to put global static functions if they don't belong to one specific class.
Same thing could be done for BP function libraries too.
i use c++ BFL anywhere in BP
Hi guys, any idea on how i can get the hand_r bone to look at a target correctly?
I want to programmatically rotate the bone to a giving direction in bone space or relative
hello! i am having this issue within my base projectile class where if a projectile doesn't hit dead on with a target, it decides to avoid it. as this is a bullet like projectile, that is not what i need at all. here is the code i have for calculating velocity, this also happened with "suggest projectile velocity" and adjacent nodes as well. i am using unreal's built in ProjectileMovement component
Did you check true Is Homing Projectile?
"current loc" is equal to their spawning location, and "Go To" is the point it launches towards, which is the end point or location of a line trace. i have already checked the line trace and it is functional
are you asking if i've tried to use it as a homing projectile or if it is one?
is homing projectile is not checked by the way
well, not sure what do you mean that it projectile doesn't hit dead it decides to avoid it? like if you miss it is supposed to still hit?
He probably talks about the alignment with the crosshair
sort of yeah? if the bullet collider isn't 100% on the test dummy's collider it avoids it
it's on the video you can hopefully see it
I mean on video all I can see if you hit it deals damage, if you don't it doesn't ๐
Do you want it to be auto targeted missile basically?
if you hit in the air it should still find the target?
crosshair on the edge of the guy = goes way off for some reason
crosshair ON guy 100% = direct hit
the bullets going that far away is not possible
with my line traces
oh you want these collision boxes to detect the collision sphere ?
not the boxes that's for something not related to impacts, but yes a little collision sphere inside that box
and what is the rest of code?
this is all that there is, and the "parried" bool is not set on a normal fire as seen in the video
well from what I see it's not the problem with that it avoids it
it looks like each time you ''launch it'' it's coming from other place
like something is blocking it so when it spawns it adjust its starting location
and then it looks like it's going with offset
well i have it set to ignore collisions on spawn, so i'm completely lost on where it could possibly be adjusting at
like why it goes from the right suddenly
shouldnt it come from the center of you
maybe from ''over your head''
it spawns from here
just a scene component on my player controller i can adjust
so i think it doesn't rotate with your main mesh btw
u need to attach it
on my screen it looks like its from right of you not from in front of you?
idk but if it was spawning in front of you you would see every bullet meanwhile we see bullet coming from behind us randomly
the problem you have with how its launched not with how it ''avoids'' the target
probably better to parrent it to capsule component or to mesh that is moving and orotating
set hidden in game false and add to this scene component something so you can see it
and see how it behaves
you can even add box collision or sphere with lines so you can see it
the spawning breaks when it's not attached to the camera
let me record a video example
this is with it attached to the capsule component, cube is attached to the spawn location scene component with no collision
and it still has the same issue
disable physics collision on the sphere or something maybe?
same result, just with no hit events now since they have no collision
or, did you mean something else?
i just switched the collision preset to NoCollision
around the test dummy?
ye
that's just it's collider
it wasn't on
so what it should collide with this actually?
that collider blocks this
here is the one for the projectile
wait, i have an idea
this?
didnt work
this just makes it so that it doesn't collide with whoever is spawning the projectile, for example an enemy or the player
how do you detect hit? On Hit or On overlpa?
Event Hit
if my project says that lighting needs to be rebuilt (roughly 13k items) and when i build ligting, noting changes besides just some error messages about instanced foliage actor, how can i build this lighting so it actually cooks something?
still happening
did you set it on both?
check all meshes, all collisions
simulation generates hit event shouldb e true on everything
also check if you have something set as Root in the Target
sometimes it doesnt work if its empty scene
like set this mesh or collision sphere as root
if this is what you were referring to it does, this is the test dummy
on projectile disable generates hit events, and make it query only (np physics collision), also set it as world dynamic
also you might want to use on component begin overlap instead of hit
alright
how do I add two transform? I am using it for lerp
Add functon is not taking input for transform
Transform made of location, rotation and scale. What are you trying to lerp exactly?
You might need to compose the transforms.
Hi, Im trying to have this bind play at the end of my widget shut down
aka when the Pressed Amount becomes level 3.
The "Shut Down Cetral" is this
it's basically an impressive shut down animation for the central display
at the center is where the selections are being displayed
right now you are binding it when it reaches 3, not calling the event, but just binding
for example
you need to call the delegate
and bind on begin play for example
thank you, but bind on begin play would be very wrong
I need to bind it to an event right?
or call that event via the bind?
its kind of confusing
if you bind with event, then that event will get called when you Call
like if you bind like this:
and call On Selected Item Hide, this even in blue will get called always
you need to make binding in begin play, and then just Call that event dispatcher
and everyhere that it binded will get executed
each place can have it's own logic it
like if this is the thing you need to happen only inside this place, just call straight to that event and dont bother with binding
but if you need other places also to react to this event, then you bind and Call
Binding =/ Calling
you bind in 5 different places on Begin Play so they start to listen, then you Call in one place, all 5 places react to it and execute it's own logic
so it should be something like this?
correct I have 5 different widget blueprints, but they only give you the Okay thumb-up sign
aka this boolean will be true
if it found an item to display
thats where I wanna take this boolean, only if this boolean is true do I wanna play this entire animation logic thing
otherwise business should continue as usual
So, I want to create a button that controls multiple things within a level
Each of those things it controls have actions they perform based on timelines, when the button is activated it sets a boolean to false meaning it can no longer be operated, when the timeline is finished it, through the interface, updates the button boolean back to true again
the thing is I want multiple things potentially connected to the button that would all have different time scales
how can I make the button inoperable until all connected objects have finished their actions?
an idea I had is having a boolean on each interactable object that says "acting = true" then having something on the button's tick function that checks for each object connected to the button, if acting = true in which case operable = false else operable = true
but I'm worried that might impact performance
Can anybody test on 5.5.3 widget navigation rules keeps reseting to default after engine restart, randomly..
actually, another idea, instead of putting it on the tick function have a second function on the interface called "FinishedActing" so every time one of the connected objects finishes their interaction animation they send a message back to the button and that triggers the "for each" loop which checks if all of them are done, and if they are the button becomes operable again, is this viable?
This sounds like job for event dispatchers. Are all objects in question interactables?
so what I want is a single button that can close and open multiple doors and also activate certain things in the rooms that you go into, the way I was going to do it is have an interface built around it and have the message part sit on the button with the target linked to a for each loop linked to an array of actors variable, I could then in the level editor window place the button down, link whatever actors I needed to the button via the variable which would be visible in editor, and that then means whenever I press the button it triggers the event side of the interface in whatever actors are linked to the button.
the tricky part I'm trying to get around is I want the button to be inoperable whenever the linked actors are doing their animations and when the animations are finished, they then update the button telling it they are finished, then once every animation is finished, the button becomes operable again
I'm not sure how to use event dispatchers though
Event dispatchers aren't difficult to use. Are all the objects in question interactables?
what do you mean?
like the objects can't be interacted with directly they all need the button to do anything with them
the button is the only thing the player directly interacts with, the other objects themselves are all triggered by the button
I would use an actor component that you can add to actors that require this behavior. You could call it 'InteractionRelay'. It would then have 2 event dispatchers, 'OnInteractStarted' and 'OnInteractEnded'.
When you place this on an actor, you can then bind an event to the on interact started. This is what you would use to trigger your animations and what not. When completed, you'd then have it call/trigger the 'OnInteractEnded' event dispatcher.
When you go to start the relayed interact, you can bind to the on interact end and specify what function should be called when called. Then trigger the on interact started event dispatcher.
That way the button will get notified when the interact has ended when its starts ones. It can just keep track of what's left to finish. No need for tick, no need for an interface.
Hey all, I'm trying to create a golf club swinging mechanic (kinda similar to Wii Sports' golf mode) and I'm trying to think of the most appropriate way to implement it that uses a mouse's y-position, the club transform data and then translating the speed into shot power that wacks a golf ball with an appropriate force. I've got the the input system registered for the mouse's y-position and now I'm starting with just the swing movement for the club. I'm thinking of using a lerp vector and rotator to smoothly move between the clubs minimum and maximum angles but I'm just wondering if there's a better place to start or if I'm using the wrong approach.
ok so, to clarify the bit at the end, how will the button keep track of what's left to finish? How can it store the information of which ones have started and ended?
You could pass each one an index and have the relay return it when finished. The button can just store the indexes in an array when it fires one off. When it gets the signal back that it's finished its thing, it removes it from the array.
When the array is empty, it can reenable the button.
ok cool, and how do I tell the interactable objects which button to link to? Because I have multiple rooms per level and each room has its own button in, or maybe at some point I'll want to add more buttons to a single level?
Hey all,
The finished output has a delay, it's visually completed and there's a noticeable delay of about 1 - 2 seconds.
Any help would be good! Thanks
As you mentioned earlier where you store a ref to the actor that you populate in the level. When you go to activate, you'd get the relay component and if it finds one, call the relevant function.
Simplier.
Each button binds to Event Dispatcher. In every instance you have Update Current Status (boolean), which sends it's status back to the Widget.
You Call that Event Dispatcher. Everything that listens calls back and send it's status to the Boolean Array in the Widget.
Each button has it's own ID to it sets Status ID to true in the Array. After all these 3 call back, you check if all 3 boleans in array are True, if yes, True, if at least one is false, Then it's false. etc.
Or just have some sort of Manager that holds references to all these 3 things in the level, each time anything updates it goes trough the manager, and manager then decides what to do based on what is on the buttons.
like manager can have either full reference to these things or just interface event to the 3 things in the array he holds, he checks Get Boolean, and if any of them is true/false it switches.
Probably manager is the way to go
nevermind, fixed
using get actor location was the issue
Hi hi!! Anyone here got knowledge on replication in blueprints can tell me why my player's spawned item isn't getting attached correctly?
The item i'm trying to attach to the first person mesh of the local player keeps getting attached to the third person mesh instead, and i think it has something to do with the server overriding the attachment but I'm unsure.
Any help on this appreciated! I've spent days trying to figure this out ๐ญ
you say simpler but reading that goes WAAAY over my head...
There you go, an quick example for you. ๐ First two are in the relay component. 3rd one is on the actor the relay is placed on. And the final 2 would be the logic you can add to you're button.
thanks ๐ I'll give it a try
Anyone knows how to assign a physical material to a decal ?
Just a re-iteration of my issue. Still unsolved, if any1 has any ideas around a solution. Got a bit lost in translation ๐
On a float range I get the inclusive and exclusive but what does open mean? Is that the same as saying the side has no limit?
Trying to create scripts that randomly break some joints to glitch out a model.. that's a lot of variables.. but I organised them well by name.. why can't i build my target variable by name instead of building a giant switch tree?
i'd pick the finger, then the phalanx.. i can put together a string and convert that to my variable name.. that's like 2 lines of code or something
but i'm about to click about 500 times++ to set that up with BP ๐ฆ
I am trying to get an actor to move forward by a distance using a timeline. I want this to behave normally when I use the node "Set Global Time Dilation". The Timeline seems to be dilating as it takes longer to complete, but my player continues to move forward at normal speed for longer now. Does anyone know how to fix this?
Where would I add Delta time to account for the dilation perhaps?
Also trying to make a urn selection system. Does this make any sense?
Assuming you are multiplying some sort of speed into the GetActorForwardVector, then that's where you would multipyl the delta time into.
Yes, I am passing a float that gets multiplied.
It didn't work. Now my character barely moves in normal mode or with time dilation on.
Here is the original issue. The first try is normal, the second with time dilation on.
The AI answer is even more confusing. Makes it sound like it's the same as exclusive
Thank you, that makes sense. So both open would be the same as no range
Hi people, I am trying to implement a wall run. It is so janky... When the player is touching a wall, I turn gravity very low and attempt to negate their current velocity. I negate it so they can kinda fall/rise into the wall and get predictable result. I would you smoothly negate the characters movement?
hey, today is the last day of my uni deadline to finish this and i've ran into a problem at the last stage of my level, i want to do something like that - player needs to reach 4 different areas in the map - if he succeeds then a block appears which allows the player to advance deeper into the map (i created an appearing block and 4 tiggers - each in the area the player need to reach)
idk if its the right channel but i guess yeah
if someone is willing to help me please tag me or dm me
@spring hare break down your problem into smaller task and pick one to start with.
https://www.udemy.com/course/unreal-engine-5-the-complete-beginners-course/learn/lecture/6739956?start=300#overview
Learn Video Game Development & How To Design a Game From Scratch Using UE5
Section 6 - Collisions Lecture 52 and 53.
Nobody will likely save you today because it is Saturday. I know I won't, but I can try.
- Create 4 collision blocks and place them in the areas you want.
- Fire a "on hit event" that increment a variable value by 1.
- Constantly check if that variable is 4, If variable value is 4 make block appear.
thanks so much, i will start working on it in the very morning
when I duplicate Event BlueprintUpdateAnimation is gives me a substitute custom node. Will this still work the same or what do I do to get another one of these?
you don't get a second
use a sequence if you want to do multiple things when it executes
Where do I put the object node
casting is just a type check
@crude sedge try to understand what the node does
it's just checking what type of an object you input to the pin
so your question is incomplete or not on point
ok, how do I tell it I want an actor?
I helped you in #cpp I kinda expect you to know what casting is.
Is your code chatGPT all along or something?
Cast is a type check, you will need to provide an Object for the cast to check againts.
E.g. get Player Character returns a generic player character class.
If you want to check if it's your custom player character you will go
GetPlayerCharacter -> Cast to MyPlayerCharacter
if you are trying to cast into a player controller derived class (Assuming BP_MasterPC is a player controller)
Then you need to provide the PlayerController object reference for the cast
if you are doing single player, then you will only have one Player controller
So you can do . GetPlayerController -> Cast to BP_MasterPC
Casting for me has always been a sore spot
it's just a type check. Look into polymorphism and inheritance
Animal -> Person | Cat | Dog
So you have an array of Animal, each element can be a person, cat or dog.
You can check if the element is a Person by doing a type check (Casting)
in another word, you can think of it as IsA
Is this Object of Type X? if it is, let me access the properties and members of X
I mean, deltatime makes the number smaller, so it's normal that the speed you thought is high is actually low.
Try using t.MaxFPS with higher and lower values. If the distance the character travels is different based on FPS, then you need the multiplication with delta time and you need to adjust your speed variable.
Hey! @surreal peak I'm having same issue on another widget, as you can see I have already tried previous suggestions ๐
when possessing a vehicle it lost track of the points but when I stop possessing vehicle, it works fine, but when driving, it reset the values of the points, not a big deal so I tried hiding the widget when driving but without any luck (I tried to set a bool isDriving and with a cast inside the widget if it's driving to hide the widget)
It's ok if I can simply hide it, I wasn't able to implement it yet.. any help appreciated
@livid flare Do you not understand why that happens?
Cause it would be good for you to understand this tbh.
The Function Nodes with the Envelope โ๏ธ on them are Interface Messages/Calls.
In this case it's some Quest Interface.
Do you understand Interfaces?
Interfaces basically allow you to "blindly" call said Function on any Object (that's why you can plug Pawn/Character/etc. just into the Target pin without compile error), but they will only do something if the Class behind that Target pointer actually implements the Interface and the Function itself.
Otherwise some default value (for float I guess 0.0) gets returned.
Your PlayerCharacter BP probably implements the Interface. You can see that here:
- Open your Character BP
- Click on "Class Settings" at the top
- Check the right side of your Blueprint for "Implemented Interfaces"
It should be listed there.
And you can check for the Function(s) GetExperience and GetNeededExperience on the left side of your Blueprint, also under "Interfaces".
So when you have the Player Character possessed, the functions that it implements are called.
When you possess the Vehicle, it tries to call the same Interfaces Functions on your Vehicle Pawn Blueprint.
But chances are very high you didn't add the Interfaces and implement the functions there.
Now there are two ways to solve your problem:
- Add the Interface to your Vehicle Pawn Blueprint, and implement the Functions, then call the functions from there on the Character Pawn. This does require you to have a pointer to the Character Pawn somehow, assuming you don't destroy it when getting into the Vehicle.
- In case your Character Pawn keeps existing and is only unpossessed, you might want to maybe keep a references to it while being in the Vehicle. For example in your PlayerController BP. And instead of doing "GetPlayerPawn0", you could do "GetPlayerController0", cast it to your custom PlayerController BP, and always grab the Character Pawn.
It's pretty important that you learn this, so if this is above your head while reading my answer, please step back and google a bit to learn Interfaces in Blueprints.
That will make it very clear why swapping out the GetPlayerCharacter to GetPlayerPawn doesn't actually solve the problem in this case. At least not as the only steps.
Ah that make sense thanks! Ofc I need to implementing interface on the vehicle too..
fwiw, I would not do that.
I would either try to keep a Pointer to the Character somewhere, e.g. the PlayerController
Or, even better:
yes I guess just hiding someway..
I would not have Experience in the PlayerCharacter at all, unless you have multiplayer Characters.
I would have it in the PlayerState class.
That one won't change if you possess a different Pawn.
And given the name, it keeps track of the overall STATE of the PLAYER.
So in theory a much better place for your Experience setup.
(again, unless you have more than one Character, then having it per Character makes more sense).
Implementing the interface on the Vehicle will only partially solve it. You'd need the pointer back to the Character still, cause you need to ultimately call the functions of that one.
As that one has the Experience logic.
And then you have this weird "Forward calling of functions" setup, which doesn't scale too well.
Cause now you would need to do this with literally everything while being in the Vehicle to get data from the Character.
So moving it to PlayerState or having a more persistent pointer to the Character Pawn that hopefully is still alive while being in the car, would be miles better.
Exi any Idea what makes AddImpulse being called but does nothing =(?
I have it work on one character but not the other
but they are derived from the same base class
and debugger breakpoint at the function
ColdSummer, any idea why my bedroom light flashes up once when I press the button for lowering the blinds?
Gimme some info please, show me the code at least :D
I'm trying to be more descriptive but not sure what other info I can think of
okay one sec
will take a video too
The light actually flashes. Help. (don't help, been like this forever, not my apartment so don't care)
trying to copy this code from a ue5 project to ue4 and im having trouble doing so even with 2 monitors ๐ฅฒ
Blueprints From Hell
Like seriously, why do you do that to yourself? :D Clean it up.
Reroute Nodes are a thing. Putting some stuff into Functions to have Local Variables and Function Pins you can use as variables to remove wires.
Or did you shove that all there to be able to copy paste it?
sry about the fan.
void AAGCharacterBase::OnCapsuleHit(UPrimitiveComponent* HitComponent, AActor* OtherActor,
UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
// Only allow on server.
if (!HasAuthority())
return;
// Make way for player characters if character is move-able and not enemy.
if (Mobility == EAGMobility::NotMoveAble || Team == EAGTeam::TeamEnemy || Team == EAGTeam::TeamAscendant)
return;
if (Cast<AAGCharacterBase>(OtherActor))
{ // Only push if character is pushing.
// Other character forward vector Cross Vector from other character loc to this character loc
FVector VectorBetween = GetActorLocation() - OtherActor->GetActorLocation();
float CrossProduct = UKismetMathLibrary::Cross_VectorVector(OtherActor->GetActorForwardVector(), VectorBetween).Z;
if (CrossProduct > 0.f)
{ // Push right.
GetCharacterMovement()->AddImpulse(OtherActor->GetActorRightVector() * 50000.f, false);
}
else
{ // Push left.
GetCharacterMovement()->AddImpulse(OtherActor->GetActorRightVector() * -1.f * 50000.f, false);
}
}
}
Also why from UE5 to UE4 :<
High chance that won't work.
it will.
Why an Impulse anyway?
and i hate ue5
I am open to other method but I can't get launch to work nicely
I mean, I guess? I've worked with UE for over 10 years now. I can't say that UE5 is more or less hateable than UE4.
it just start tap dancing ๐
There have always been good and bad things about every fucking version.
Impulse is probably doing th same anyway.
void UCharacterMovementComponent::AddImpulse( FVector Impulse, bool bVelocityChange )
{
if (!Impulse.IsZero() && (MovementMode != MOVE_None) && IsActive() && HasValidData())
{
// handle scaling by mass
FVector FinalImpulse = Impulse;
if ( !bVelocityChange )
{
if (Mass > UE_SMALL_NUMBER)
{
FinalImpulse = FinalImpulse / Mass;
}
else
{
UE_LOG(LogCharacterMovement, Warning, TEXT("Attempt to apply impulse to zero or negative Mass in CharacterMovement"));
}
}
PendingImpulseToApply += FinalImpulse;
}
}
void UCharacterMovementComponent::Launch(FVector const& LaunchVel)
{
if ((MovementMode != MOVE_None) && IsActive() && HasValidData())
{
PendingLaunchVelocity = LaunchVel;
}
}
bool UCharacterMovementComponent::HandlePendingLaunch()
{
if (!PendingLaunchVelocity.IsZero() && HasValidData())
{
Velocity = PendingLaunchVelocity;
SetMovementMode(MOVE_Falling);
PendingLaunchVelocity = FVector::ZeroVector;
bForceNextFloorCheck = true;
return true;
}
return false;
}```
void UCharacterMovementComponent::ApplyAccumulatedForces(float DeltaSeconds)
{
const FVector::FReal ImpulseToApplyZ = GetGravitySpaceZ(PendingImpulseToApply);
const FVector::FReal ForceToApplyZ = GetGravitySpaceZ(PendingForceToApply);
if (ImpulseToApplyZ != 0.0 || ForceToApplyZ != 0.0)
{
// check to see if applied momentum is enough to overcome gravity
if (IsMovingOnGround() && (ImpulseToApplyZ + (ForceToApplyZ * DeltaSeconds) + (GetGravityZ() * DeltaSeconds) > UE_SMALL_NUMBER))
{
SetMovementMode(MOVE_Falling);
}
}
Velocity += PendingImpulseToApply + (PendingForceToApply * DeltaSeconds);
// Don't call ClearAccumulatedForces() because it could affect launch velocity
PendingImpulseToApply = FVector::ZeroVector;
PendingForceToApply = FVector::ZeroVector;
}
I see, I should go deeper into the debugger and check how far the execution is on the actual AddImpulse function
Like, it's slightyl different, I agree, but they both just apply to Velocity
Impulse adds on top I guess. Could swear Launch had the option too though.
void ACharacter::LaunchCharacter(FVector LaunchVelocity, bool bXYOverride, bool bZOverride)
{
UE_LOG(LogCharacter, Verbose, TEXT("ACharacter::LaunchCharacter '%s' (%f,%f,%f)"), *GetName(), LaunchVelocity.X, LaunchVelocity.Y, LaunchVelocity.Z);
if (CharacterMovement)
{
FVector FinalVel = LaunchVelocity;
const FVector Velocity = GetVelocity();
if (!bXYOverride)
{
FinalVel.X += Velocity.X;
FinalVel.Y += Velocity.Y;
}
if (!bZOverride)
{
FinalVel.Z += Velocity.Z;
}
CharacterMovement->Launch(FinalVel);
OnLaunched(LaunchVelocity, bXYOverride, bZOverride);
}
}```
Yeah it does
Applying Force I would get, but even applying force could in theory be done with LaunchCharacter.
But let me check what you actually wrote.
I can print string on the hit to confirm that it does get called on an actor that is moveable and the one that doesn't move X_X
I wish I could code like you guys ๐ congrats!
you can, I am newb my self. just spend 2 weeks on learning website
You can. You just need to start and get through the parts where you feel like you don't get it.
at the basic level not much different than bp, it's not a monster thing to tackle
None of us was born programming :D
@frosty heron What's teh difference between the two pawns you run into?
One is moving, the other one is standing still.
Are they both possessed by AIControllers?
One isn't possesed by AI controller
the one that can be moved
๐ค ๐ค ๐ค ๐ค ๐ค
Open that one, go to the CMC.
Change "Run Physics without Controller" to true
Try it again.
tyvm, trying now
Let's see if that then causes it to fail
No dice but this says a lot
will think this through, won't drag you to a spoon feeding session
have my undying gratitude
Can#t say that's the reason though. It would rather be the opposite though
If the one that is not possessed can be moved, then CMC doesn't even do things
Probably really better to breakpoint a bit where your Impulse ends up
Hi, is it like the tick event but for animation?
Yeah
so i guess it's better to use event dispatcher to set variable instead of looping into that event?
progress:
Depends on what you are doing. Things that can change every frame, like Velocity, are probably better to be polled.
i'm starting to wondering if it should be a good practice to set up "all" variable trhough event dispatcher. (I said all it's an exageration, just to get idea)
But as long as you are in the AnimBP, you are throwing away performance anyway.
i have re read ๐
Because it's Blueprints after all. And AnimBPs will tick a lot. It's a lot better to move all the "Get State of Character" logic to C++ in theory.
So I wouldn't worry too much. You can add some EventDispatchers for things that rarely change fwiw.
when people say put the logic to C++
do you mean, create node?
and call those node
or it's something different?
because when i create some node in C++
i use them in Blueprint
is it C++ or still blueprint?
Writing C++ code that you call from BPs is a bit more performant of course, but you still do Blueprint logic then.
When I write "move all XYZ Logic to C++", I mean that you'd not call that stuff from Blueprints anymore.
You would have a C++ parent for the AnimBP which has Variables exposed to Blueprints, like Speed, etc., that are used in the actual Animation Graph. But the code that gets the Character and fills those Variables would remain in C++ and called by the C++ version of that Tick node.
If you aren't comfortable with C++, stick to BPs. You can optimize it later down the line anyway.
But you shouldn't change the whole Tick thing to EventDispatchers, that doesn't make sense and could make performance even worse.
Things like checking Velocity for Speed is a per Frame thing anyway.
i'm now on the optimization process (already completed the game 1) now i redo it with optimization view.
I was a c++ devloper some 20 years ago, so i can relearn it, but my understanding of the usage of c++ inside unreal was wrong ๐
because tutorial on youtube, show node creation and use those node into the blueprint
but here if i understand i will create a BP_MyCPPAnim set that class to my character
and into my BP_MyCPPAnim write all the code
Blueprints are C++ Childclasses +- some additional visual based setup based on the BP we are talking about.
E.g. UserWidgets have the Widget Graph to place stuff in, AnimationBlueprints have the AnimationGraph to set up Transitions, States and all that stuff.
In a properly organized project, the majority of base logic would be in C++, with only the minimum exposed to Blueprints for Designers.
For things that have these extra custom Editors, like UserWidgets, you can still do 90% of it in C++ and expose pointers to the UTextBlock and what not that Designer will add so you can modify them in C++ while the Designer sets them up in Blueprints.
For AnimationBlueprints you could, in theory, also didge the whole AnimGraph and have a C++ based StateMachine, but there are limits to how much one should do in C++. Blueprints have their right to exist for visual setup reasons, as that's easier than coding it.
And allows non-C++ programmers to add/remove/alter some stuff.
are we talking about a huge performance difference between C++ and Blueprint?
Yes, Blueprints are compiled down to ByteCode and run through a ByteCode VM.
Small lines of code vs Blueprints won't show a difference, but there are a lot of expensive things that simply add up.
Even calling C++ code that calls into Blueprints (such as BlueprintImplementableEvent or BlueprintNativeEvent) have an overhead. Same as DYNAMIC Delegates in C++ that allow binding/calling from Blueprints.
So even there, if you don't need the Delegate or Function in Blueprints, it's better to not even expose it.
There are probably a lot of games that shipped with a lot of Blueprints and they are fine.
But if you are trying to optimize and you use UnrealInsights and see some Blueprints code being expensive, you can gain a lot by simply moving it to C++.
that sounds bad ๐
It's a thing that you can tell someone who has a small tiny project that has never been tested on lower end hardware or similar, and they will tell you that you are telling them bullshit.
And when they finally hit the point where the FPS break in it's too late.
It's also not something that counts for everything, but you'll notice that having core logic, types and classes in C++ will make the overal communication between things easier.
And of course the added benefit of being able to debug packaged projects, cause only C++ code can be debugged for those.
Aka, VS attached to the process and breakpointing.
If you do want to improve your game performance-wise, use Unreal Insights and locate the problematic parts first.
And then decide based on that what you want to move to C++ or generally improve.
Another benefit of using C++ in terms of Performance for both Editor and Packaged are load times.
If you have variables and functions in C++, you can cast to the C++ class in Blueprints and call them and you are good.
Hi, i dont understand how to change GASP to first person view in new version. Tutorials looking old coz they are making changes on blue camera that is not default camera. Gameplaycamera that is default now donest change it as well.
Ebglish is not my native. So, what i should clarify ?
If you have them in Blueprints, you would need to cast to the BP class and the BP cast will load the BP asset.
Which means you can easily end up loading the whole project at once when opening the Editor or level due to all the references.
GASP being?
The new Gameplay Camera stuff or is that some third party plugin?
Game Animation Sample
Oh the MotionMatching one.
@surreal peak Just reporting I fixed the widget ๐
I did different, basically I just edited the widget and make it collapsed lol
when driving, the UI isn't visible by default so it was even easier to setup, thanks a lot for trying to make me better at coding โค๏ธ
Yes sound bad because i have just now learn how to use BP and now i have to learn how to use CPP... so that sounds bad ๐
Thank you. Did not get back to you in time, but do not want to seem like I don't appreciate your help. ๐
I can do a few predefined shakes and pick from them even though it is a bit clunky.
Anyone have issues where collisions are not working right? I have three objects I don't want my player camera to "hit" and get pushed forward. I set the objects all to "ignore" for the camera, but while two of them have stopped blocking the camera, the last one, a primitive square, refuses to stop blocking it. Not sure what I am missing.
I want to do a function that's only run on the owner
is this right? the testing indicate yes but I'm not so sure
the print strings worked normally, but when testing the actual functions a bunch of accessed none warnings popped up
right would fell under the context. It's not a yes or not question.
I'd imagine having the server call a 'Run On Owning Client' event would be the way to do it.
I would say what you actually want is IsLocallyControlled
if you want the function to only run on the character that the current machine calling it controls.
With it being from an Input Action event, couldn't we assume it's locally controlled? It wouldn't trigger on other clients would it?
input is local
so no it won't
but to get things straight
client can't even talk to other client to begin with
there is no direct client to client coms, everything is. Client -> Server -> OtherClients
or Server -> Clients
but if you by chance bind inputs to all characters in the world
it will run on every single characters
isntead the one you just control
the function is to change the ui, and I'm trying to use repnotify to trigger it
So you will run function X on your own character, and player 2 copies in your world, player 3 copies in your world, etc.
Repnotify -> Broadcast delegate is the usual way to go about it
@dark drum I don't get why I can push a non AI controlled character but not the one that is controlled by AI controller.
Not even sure if AI controller is the reason at this point.
Are you using ''Get Owner'' somewhere in this logic that pushes them?
nah, nothing to do
I'm just doing OnHit -> calculate some vector based on the push from the OtherActor-> Add Impulse to the direction that I want (left / right)
What are you using to do the pushing? Add Impulse?
yeah and AddImpulse and LaunchCharacter is more or less the same, it just adds to velocity
as you can see, I can push one of the character
but not my companion, which are derived from the same base class
and the AddImpulse logic is at the base class
If i was to take a guess I'd say it's something to do with the AI controller overriding the movement. Kinda like how it forces the character to be upright.
You could try temperately setting the movement mode to falling (maybe flying) before applying the impulse to see if that makes a difference.
It could also be the AI Controller overriding the movement, so you could try disabling the movement for a moment.
Will try again tomorrow, thanks.
Another option is to simulate movement input on the character you walk into. It'll make it look like they walk as well. Can give mixed results though.
Yeah but like you said the character will orient to the location/ walk there. Not the kind of effect that I am after ๐
still stuck on this, any ideas? ๐ฅบ
Execute on owning client only works when called from the server i believe. As it's already running on the client, you just need to know if it's locally controlled and change which component it gets attached too. No need to call another event.
@wicked cairn Like this.
Hey, how can i get back the parent tick event?
it's only for function?
yes how can i get back the parent: tick?
does it involve c++?
looked up broadcast delegate but the results seems to have c++
Delegate == Event Dispatcher. Same thing, different name.
Hi all !
My Character has a Velocity (Vector Length) speed and I'm trying to copy that to move an Actor with a "Set Relative Location" but it does not work
How can I move my Character and my Actor to the same speed please ?
It's unclear what the end goal is. Are you trying to use a character's velocity to move another actor, or are you trying to use set relative location and have velocity also be updated for the other actor.
The end goal is : I'm trying to "push" a Cube with my Character; But I need to keep the same distance between my Character and the Cube when I'm "pushing" it.
Also I have enabled "Physics" on the "Cube" so when I "push" it it sticks to the ground
ok thanks
alright so get socket transform works on a mesh scene component but not a variable of type static mesh? Why?
Its a property set on the static mesh
As in the static mesh asset?
Yes
Socket manager is section on the static mesh asset
I just want the values
The 'Get Relative Transform' you're using is the wrong node. Pull from the return value and get the loc, rot and scale as needed.
yes I got that part too so I am working on creating a utility function.๐
is there a way to force cancel an enhanced input?
hello how can i make the setting to show or hide the fps explicitly?
stat fps toggles the fps, but what if i press the OFF button and then i do stat fps it will show it
is there a command or a function or a way to know if stat fps is on so that i can explicitly turn it on or off?
in the place that you enable show fps you could just have it update a boolean variable where if it's on "showfps" is true and if it's off then "showfps" is false
yes that's the best solution but then the player can do the stat fps console command if we allowed them to use console commands
but this solution is sufficient since we won't enable the console commands in the final game
i think they should have given us the stat fps 0 or stat fps 1 for explicit assignment
there is another way around it, get the ontick event node, drag off the "Delta Seconds" part, do 1 divided by the delta seconds float then output that into a ui element like a text widget then you could do it through math and not have to use console commands
because tick's delta seconds is literally just 1/fps
then your toggle can be showing or hiding that widget
ah i see
i haven't thought of that
thanks for the alternative solution ๐
here's a simple testing version you can do if you just want it to print to the screen
this isn't a widget it just prints a string of the FPS
and as you can see in game it just gives you 1 line of it and doesn't spam the console or cover the screen
So, I have a question of my own:
Say I have a level that's composed of a bunch of rooms, and each of the rooms is a prefab, what would be the best way to have the rooms change to a different prefab based on choices made in earlier rooms? I've seen sublevels and making the rooms into actors and creating actor from class as options, which is the most efficient or best to use?
I do want to implement a system where the door to the next room won't open until that room is fully loaded too. Like an input from room 1 decides what room 2 would be but I don't want the door from room 1 to room 2 to open until room 2 is finished loading in
I tried this solution just now and It's still not attaching to the correct skeletal mesh. Its like the server is overriding the attachment back to the third person. The UpdateHeldItem function in the other pic has a HasAuthority node that only lets the server go through to then call the Multicast event but idk if thats the problem
Is it recommended to learn blueprints from books?
Does your blueprints looks smoother or am i tripping?
Learn however suits you :b
No matter how you learn you also need to do some trial and error yourself 
the best way to learn blueprints, or any programming language imo, is to start with a project you want to do, and then break it down into the smallest possible chunks, then google ways to solve that chunk
@thin panther since you're here do you have any input on this?
This is a bit of an annoying one, and I was hoping for some advice?
I was following along with an UE4 tutorial in UE5, and one of the steps is to make a User Exposed Vector for this niagara system!
Annoyingly though, UE5 will only allow me to make a User Exposed Position for it.
I thought that it wouldn't make much of a difference, but now my blueprint won't work as there isn't an alternative for the Set Vector Parameter node that will work with my Position variable.
Could I get some help? I'm not sure how to go about converting a position to a vector.
Get Actor Location is a vector parametr. You can also try to use Set Niagara Variable (Vector3/2)
hello. This snippet I posted earlier works but I'm wondering if it's a proper workflow.. how would you build an Urn picking system that resets when it's empty?
Hi!
I have a very frustrating problem using UE 5.2. I implemented a settings menu to allow the user to change resolution (blueprints). It worked as one would expect in a packaged build. After some further fiddling with the project (not with the blueprints related to the settings), it no longer works!
The changes I worked on was related to turning off Nanite and Lumen, and switching to SM5 and forward rendering. It now runs with higher FPS in a packaged build, but I cannot change resolution anymore... ๐ฆ
I would be very grateful for some help or indications of where to look. Googling this returns nothing useful.
Thanks ๐
ok im getting absolutely bamboozled by some basics. im trying to implement an enemy getting hit by a melee attack if they have a HitInterface i created and then apply damage to them. is this like thinking along the right track or ?
I multiplied by a higher distance number and I believe it's working as expected so far. Will continue to test. Thanks.
No, you can use that in bp. It's event dispatcher.