#blueprint
1 messages · Page 214 of 1
so you don't really want to access reference like this directly
instead create a boolean in your ANim Blueprint locally that is set from the value of As AIC enemy AI every Tick
See this example, we don't use Crouching directly from the reference, instead we set the IsCrouching in the Anim Instance
Ohh okay sweet, that worked. Thanks a ton!
I really just could not think of another way to access it, but this makes things really easy. I really appreciate it
Not doing the async / thread safe setup?
how to do that? 😛
I am not fammiliar with thread safe keywords
seen that used in cpp talk but never explored it
Use a variety of methods and techniques to optimize Animation Blueprint's performance and stability in Unreal Engine.
ohh multi-threading
this is good stuff, thanks for letting me know. I can relocate the tick stuff now
If you want more to read:
Multithreading & Performance in Unreal, by Bastien Cruette
https://docs.google.com/document/d/1uw9Dfui5ZepSrBpMc1DrxFOeRFnDu8ubzFse8Mr_s7E/mobilebasic
turns out I didnt need this I just had the wrong equation for my blueprint and was trying to account for nothing by using a thin Capsule
If you wanna know what I am talking about.
I wanted the animation to play only when within a certain rotation window to the left and right of the front of the blueprint box collision in the world (even if that collision is rotated). I got the yaw rotations in the world of character and blueprint and for some reason I had it adding them when character is negative rotation and bp is positive. How it is now is the right way
Sounds like something that could be done with dot product
Wait... Do I even need everything on the left? Can't I just plug the purple "Rotational region equations" straight into the branch on the right? It's all subtracting anyways right?
I think I way over complicated it all
I agree 😅
That's crazy that I never noticed, oh well gonna fix it tomorrow
is there any way to store data which wont be reseted once a new level is loaded ? like i m storing some variables in my playerstate once a session is being created but it will reset once the new level is loaded. I wanted to access each player's player state from game state too.
game instance is persistent
The game state has a list of all the player states.
But those are not persistent
Should always try to rely on SaveGames for that.
imagine client crashes during level change
then they will lose their data
if you save before level change, and just restore on map load this wont happen
Yeah anything important id save tbh
Hi, I have datatable that consists actor and image. how to let system know that if I spawn Actor A only Image A appear in my widget, If Actor B Image B. Right now when I spawn actor A or B all Image A & B appear.
Hi, I’m having an issue with a widget system I’m creating to track consumable stats in my game (Wiki system).
I use two widgets (Wiki_Button and 1412, my Inventory). The system works fine when toggling the Wiki system using a button, but I want to move the widget initialization logic to Event Construct to avoid recreating the widgets each time. However, when I move the logic, the integer array values from my GameStats don’t update properly, and I’m struggling to figure out why.
*System Overview:
Wiki_Button Widget: Displays consumable info (image and integer showing the count).
1412 Widget: Creates 40 instances of Wiki_Button and arranges them in a grid. A custom function UpdateStats handles the updates.
Data Handling: The GameStats variable (struct with 40 integers) is pulled from my character blueprint, tracking how many consumables are used.
Issue:
When using a button to toggle the visibility of the Wiki, it updates Wiki_Button correctly. However, this approach recreates the 40 widgets each time, which is inefficient. I want to move the logic to Event Construct to just update the stats and toggle visibility, but when I do, the integer values remain the same across all widgets instead of updating correctly.
*What I’ve Tried:
I moved the widget creation and UpdateStats calls to Event Construct and used a visibility toggle, but the array values from GameStats don’t update as they do with the button click event.
Debugging shows that GameStats increments correctly when consumables are used, but the widgets don’t reflect these updates when initialized in Event Construct.
P.S.: The GameStats variable is working fine when debugged with print strings and tracks consumable updates correctly. Any guidance or suggestions would be greatly appreciated
Does collapse mean it destroys the widget?
the UWidget is still there, but the visuals counterpart SWidget is not being created, meaning it will not take up any spaces in the widget tree
no
Awww :<
I'm having an issue where a stat is not being saved despite me just adding stats that are saving yesterday. was wondering if anyone could maybe think of whats going on here.
As I add to the stat I can see that it is applying. but after leaving the game mode then going back in, it loads back to defualt.
show where you are saving , the save node on last pic is clipped off
the save system doesnt go anywhere after that. thats actually the load
the second pic is where its saving
it saves level, xp and health just fine but its not saving agility
are you saving before the level change?
yea
like i said the other stats are saving fine
as far as i can tell they are all set up the same which is why i'm confuesed
the level transition can be seen on the second pic after the for loop completes
did you just add Agility to the CharacterInfoStruct? might be the BP struct bug
i did just add it before implementing the rest of the save
i'm not familiar with the bp struct bug
BP structs get finicky when you add members to them after you already have the struct in use . Like when you restart the project , anywhere the struct is might be broke with red pins
Wanted to post this to raise awareness for those creators that may use BP generated structs and enums in your projects. TLDR: When you need to modify a BP generated struct or enum follow these steps Save your current work Make the change to the struct/enum (rename or add property/entry) Save the struct/enum Exit the editor WITHOUT SAVING any...
not sure if its your issue
also, the changing level on the same tick as saving the info...
Try a small delay between Loop Complete and Load
hmm
put a 1 sec delay before load level
is the save a SaveGame ?
yea
gonna try restarting the editor but I'm not hopeful
kaboom
yea still not seeing the changes reflected. I've been at it for almost 2 hours and have no idea whats going on.
no
and after looking at the forum post i'm not seeing any error reports in out log either
so i think theres something wrong with how the stat is being applied
nope nevermind. I thought it was but i tested another stat and that is in fact applying
Not sure I follow? It's not a function. It's jus the graph in a widget.
SavePartyUnitInfo I mean
Yeah, should be fine. Though I would maybe add them all, and then save to slot. This will cause a lot of disk writes.
yea intend to clean things up along the way. just trying to get it functional at the moment.
I just added another stat to the struct and its loading and saving just fine
i'm so lost haha
I would consider it being because i'm pulling it from a component on the actor but im pretty sure some of the other ones that are bing pulled from there are working fine
anyone know how to make a jpeg compression like post process effect
why i am not able to update my player state vars from a widget blueprint?, the variable i m trying to change from the bp is marked as replicated and also i tried to do it by making an even on the server playerstate marked as "run on server" and then calling that even from the widgetblueprint, but the change is not being took place
Hello guys I was working on a first person game where character can also equip weapon so I checked some tutorials but most of them attached camera to the head socket which makes the camera shake when moving because of animation but I want stable camera. So looked furthur other guy did it but he made 2 meshs attached camera to 1st mesh and made it only owner can see and made another mesh for others to see. Is there any other way I could do it?
The thing is I don't know how to make the pitch rotation work if I don't attach the camera to work because the hands don't fixed but if I attached the camera to the mesh it shakes
I want the effect of dying light.
i think its because player state gets reset once new level is loaded?
just don't attach to socket then?
If I don't attach to socket then when I rotate in pitch it don't align with the spin movement and face appear in front like camera is inside the face. If I remove the rotation part I don't know how to make the hand gun holding position absolute with respect to camera pitch rotation
Hey folks, so I have a multi sphere trace on tick, and I need to fire an event once every time a new actor is hit by the trace, and another event when a previously hit actor isn’t being hit anymore.
Currently I have this. The new actor hit event works, but the actor not being hit doesn’t. Any ideas what’s wrong?
How can I stop this sphere from damaging other spudbugs? this is in the supudbug character blueprint
I am assuming the problem lies here, I don't think I am referencing it correctly
I would have assumed saying don't damage self would include others of the same blueprint, but that is not the case
self = the object, not its type
one way would be to use collision channel that excludes the bugs specifically. less performant option would be to check on collision if the hit thing is a Spud Bug. if not, then proceed to damage it
my camera is infront of where the actual view is, anyone know how i can fix this?
collision channels would be the way to go then
is there a way for an actor to know if he is getting hit by rays?
lets say im casting a ray on tick from the character's camera and sending a message through an interface. is there a way for the actor to know when i look away?
show all of the code
simplest method would be
Sphere overlap -> for each entry -> if entry cast to SpudBug fails -> damage it
you're casting SELF to spudbug, that's redundant
self is a spudbug
Hey guys, I'm trying to implement a bolt action sniper rifle that uses procedural animation for its bolt-sliding mechanism after each shot so that the animation lands accurately on the bolt. I'm using this because I have dash and double jump animations that will cause the bolt-sliding animations to be inaccurate.
Has anyone done this? I tried using control rigs but it doesn't work really well. It's really hard to get the character to always target the bolt while playing the bolt-sliding animation. The hand is always placed either too low or too high
could use IK to adjust to bolt's location
Does anyone know why my ppv exposure compensation is only showing in editor?
Anyone know why my character might be reverting to a T-pose every time I use a "Play Animation" node?
You should very rarely need to use the play animation node.
basic ongoing animations based on the character state should be handled by the animation blueprint. One off purposeful animations should be triggered as a montage.
hey all! Is there anyone using Oceanology with Ghislain Girardot's Boat Splash System? I'm having problems with that implementation
Can you elaborate?
I understand that - just using it for debugging. But I'd still like to understand why it's reverting to a T-Pose rather than going back to following the ABP
I think under the hood it changes the animation mode of the skeleton mesh or something.
but I wouldn't recommend trying to accommodate that
if i put an enemy (blueprint) into my world
is there a way to save the world location into a variable?
automatically?
to keep that position as reference?
Sounds like you want something like "Get Actor Transform". It stored the variable as a whole transform (Location, Rotation and Scale) and you can retrieve the individual components of that if needed later
but it's during the code. i was more thinking about a variable that is automatically set based on the actor location. maybe on the constructor... but not sure if it make sens to put it there. or maybe on event beging play to set the location
ahhh
yea that's probably the best bet then, if you only need to set the value once then you can just fire it in the EventBeginPlay and not worry about it later
Idk how anything about the performance cost of doing it in the Construction Script but if you need to access the variable in the Editor directly, then yeah you can do it there
i think i will start with that first
In short: play your reload animation and use IK on top of it to move solver attached to a hand so it matches the actual bolt's location
https://dev.epicgames.com/documentation/en-us/unreal-engine/ik-rig-in-unreal-engine
Create your custom IK Rig using goals, solvers, and settings.
Can we use control rigs as well/.
?#
not that proficient with all this stuff, but I bet you can combine everything in Animation Blueprint with proper blending and layering
I have a "Call in editor" function that spawns a bunch of child components, like spline meshes, child actors, static meshes, and attaches them to the actor from which the function was called.
It works fine, but whenever I move the actor, or reload the level, all those child components get destroyed.
Any way to prevent it?
The construction script is empty
So it shouldn't override the call in editor function
C++
Here's a piece I made that allowed me to add components like that. RegisterComponent and AddInstanceComponent were necessary IIRC. Though I was adding component from another component, so you might want to play with it and see which combination works for you.
is there a "get static mesh" equivalent?
all static meshes planted directly in the world are actors of type StaticMeshActor
To get all static mesh actors? To get all static mesh components? To get all static mesh assets in the content browser?
to get a specific static mesh in level
for a line trace target
Not really. If it has a unique bp you can use that as the actor class, but that's not a good way.
You would need to save a reference to the actor somewhere.
this is what I was planning on doing, why is it a bad way? because its a slow operation?
It's actually relatively quick because all teh class instances are hashbucketed.
But it's just not really extensible and prone to bugs. What happens if, in the future, you want to put 2 of them in the level? Or you accidentally spawn 2 of them and then wonder why your code doesn't work?
actually just on that topic real quick, does UE have a way of making sure there's only one instance of a BP (and never any more than 1) in a level?
Star Engine has a GUID thingo you can enable on Entities to make sure that there's only ever one of them in the scene (e.g only ever one instance of the Player, or a specific cast member). So if you try to place another instance of that Entity in the level, it throws an error because there's already an entity with that GUID string. Does UE have that?
so it turns out you cant even plug an actor reference into any of the line traces 😅 is there a way to get this to go in?
why would you want it be attached here?
i should probably just set up linetace by profile
That's line trace component. Is there not one for actor?
Something kinda like this, so the BP has a GUID string (automatically created by engine) and you just toggle whether the entity is Unique. If true, you can only place one copy of it in the level.
(sorry for cluttering the ongoing conversation)
no, i was expecting there to be one but this is all of them
Gotcha, will try that out
How can I uncap the FPS? I have a project that is capped at 30fps and I want to uncap to see how well it runs.
t.MaxFPS 240?
I think 0 completely uncaps it
Think you might genuinely be getting 30 fps, I'm almost positive it's t.MaxFPS 0
In the console
Try t.MaxFPS 15
And see if it drops your frames
Console commands override that I'm pretty sure
oh wow. 15 did lower it
They override everything
And once you setup a console command, the engine cannot re override it with lower calls
I was sure too, so I tested it and it didn't change 🤷♂️
but t.MaxFPS 10 didn't change it for me either, so I bet in @noble ledge case it's just a poor performance
or magic
hi. to anybody who sees this and is good with replication and blueprints i have city sample vehicles - optimized and it has enter and exit animations with destruction but I'm trying to get it replicated so i can use it for this game I'm working on if you are interested in helping dm me ill give you the project and you can keep it and do what ever with it just dm please i need help 😁 .
is there a way to force th aspect ration in the built version?
So I tried my best to explain the issue, I've been trying to debug this for 3 hours and I have no idea what to do, I'm at my wits end with this XD
I need a second pair of eyes on this. Im working on the framework for a weapon switching system but I'm struggling to figure out how to get rid of the previous gun. The string prints will eventually be replaced with cast to nodes for the different weapons.
any one know why Get ref is not there ?
I need to mess with the original items and not a copy with this one
Because it's an array of references, if you copy a reference it's still a reference to the same thing
The only reason to get a ref in this case would be to change the array element to a different reference, but at that point it's just another way to set an array element
Hey folks, so I have a multi sphere trace on tick, and I need to fire an event once every time a new actor is hit by the trace, and another event when a previously hit actor isn’t being hit anymore.
Currently I have this. The new actor hit event works, but the actor not being hit doesn’t. Any ideas what’s wrong?
Question; in this instance I am trying to make an array of classes
my Cloth manager should be able to call the individual functions of the components.
how can i make the variables inside components visible to manager to set there vales ?
thanks
how do I pass a variable to a child from parent? (i.e. gun damage to the bullet class it spawns)
How does one decide between using the concept of owner vs concept of instigator? Is it fair to say that if it's an item on a character, like an equipped weapon, "owning" the weapon makes a tad more sense than the character being the "instigator" of the weapon? But otherwise if the character shoots the weapon, the character is the instigator of the action of shooting someone else?
have a variable in your child set up like this. then the spawn node will have it as input
instigator is the player controller that chose to do the action that caused the actor to be spawned. Owner is the actor hat spawned it. There's no particular need to think about these things unless you feel a need to have them though. It's fine to leave them blank if it doesn't matter.
Awesome, thanks! I was mostly trying to figure out which path I should take when figuring out "which player does this weapon currently belong to" type of situation, and it seems like GetOwner would be a more fitting option here, especially since the logic already sets the owner to the current player when they pick up the weapon in the first place.
you may want to just make a variable that represents the owner in your unit class and expose it on spawn though.
for convenience
I agree with the instigator part but owner plays a crucial role in multiplayer and in the event someone is making a multiplayer game. They need to know the implications of "owner"
Actually, I'm pretty sure multiplayer is "owners" intended use
is that true? that doesn't sound true. I haven't done replication stuff in a long time but why would the it matter which actor spawned an actor? Off the top of my head I don't think this owner is related to whether the server or the client owns the actor. I'm pretty sure that's just a function of whether it was spawned on the client or the server (and 99% of the time you just want to spawn any non-trivial actor on the server)
Does anyone know why when button is clicked it is not adding to viewport? I suspect it's due to the sort order
Actor owner, owning connections, and what this tells you about an actor for Unreal Engine network replication.
I take it back. I guess it calls GetOwner() repeatedly until it finds a playercontroller.
you didnt drag the pin representing the widget onto the add to viewport node
:) to add to this. owner is primarily used for replication purposes. Whoever owns the actor (non related to spawning) is allowed to make remote procedure calls to the server on that actor.
It is a crucial part in unreal engine multiplayer replication
If you don't understand how ownership works you will quickly find yourself confused on why some RPCs work, and some do not
this is a dumb question but whats a common example of an owned actor, that is not the possessed pawn, needing to trigger an RPC on the server?
Controllers and possessed pawns, another example would be having a gun in a shooter game. If all the logic was inside of BP_Bazooka for example, and trying to fire the gun required Server call. You would not be able to do it unless you had ownership
This is why other players cannot force you to jump or fire your weapon for you, or reload and etc
Even though they have a direct reference to your character
But I guess my mental model for how most people code things is you have some sort of antecedent character action, like firing the gun; and the firing action would occur on the server which would in turn cause the gun to shoot and replicate that.
although yes I follow your example
The firing part always occurs on the server, but someone has to tell the server to actually fire the weapon
And that can only be done by whoever owns the actor
what I mean is I feel most setups would have the client tell the server that the CHARACTER wants to do the firing animation, which in turn triggers the shot to actually occur
in his case it doesnt really matter who owns the gun, right? Because the player ownership for establishing who has the right to begin the firing sequence was respected.
I think we might be getting too specific with examples. At the most basic level, who ever owns the actor is allowed to tell the server what to do. 😄
If no one owns it, no one can tell the server to do anything with it
yeah I think I'm fine
Also implies that the server owns everything by proxy, so it always has the right of way
Glad i could help clear it up a little
hello. im making a platformer using 5.4's trajectory. I used the template and slowly learning how it works.
Id like to make the player turn around instead of walk backwards. (anim i'd like to use shown at the end. is there a place where i can start on doing this?
Does anyone know why this works on "next media name" node but not "media name". The first media name doesn't change but the next one rotates perfectly through the media playlist
Anyone know how to get a character rotation value relative to where bp is facing in world? I want the BP's rotation to be angle 0 for Character
Is this the channel to ask about UI and Widgets?
Hello! I sometimes get these kind of warnings when loading up the project, but then everything works fine. Is this something I need to fix, if so, how? 😅
it might be a load order issue. maybe try using some delay nodes. something might be firing too late.
nah, that warning comes up when you boot the project
yea possibly. its not much to go off of haha.
I just ignored it 😔
hey cold, i've got an issue i'm, on day 2 of. was wondering if you had any ideas.
I'm at a total loss here.
yea i've run it by a couple people yesterday but everyone seemed to think it shouldn't be happening
oh man i dont even know where to start
Goal and the obstruction toward the goal maybe
so i have that save system. i'm building a leveling system where i can let the player choose a stat on level up. I'm going to say this bit because i saw something about a bug in UE, though i'm not convinced the bug is an issue. I used an enum to decide what player has leveled up then direct it to the proper widget
from the widget the player then can select the stat and it adds to the stat
but the stat is not saving
to make sure it wasnt the process or the struct, i added another stat to the struct and hooked it up. that one saves.
so lemme show some code
unfortunately, my brain shutdown when looking at other people code. I can only help with the basic of save and load
For simple setup, you probably want to load from main menu and use that save game object to save and load
I think rather using enum you can pass the actual character that level up?
so this save system is actually to go between different game modes
maybe though i'm not convinced the enum is the issue.
yeah, I think the save system it self should not coupled with the game mode at all
unless by design for specific reason
i got it from Ryan Laley, and its because of the way my game handles game mode transitions and how to party is controlled
for a start you should never fallback to a delay, especially for a save system
that was added after
you want to broadcast at the end of your sets in the save game object that the saving is completed
while trying to figure out what the problem was
i can just delete it
i was making sure the save actually finished before the transition which wouldnt have made sense anyway since its off the complete of for loop
yeah, that's fine but for production, make sure to have a callback when the save game have finished saving
rahter than hard coding a time
this second picture is where i am setting the stat
i thought this might be the issue. but then i added a new stat to the struct and that one applies and saves fine
which doesnt make sense
a single stat is not saving
despite adding an additional stat the exact same way and the new one saves
which stat? but the rest are fine?
not sure without thorough debugging
have you tried deleting the .sav file and start a new one?
Nothing much I can say sorry, If I were you the only step I would take is to add a break point and see the code line by line
the only other things i can think of as to why this specific stat might be different is its 1. in a component attached to the actor, but i have others that are set up that way and are fine. 2. I'm using the stat for a timer thats paused durring application
perhaps a print string, Checking if the value that is being saved is correct, then making sure the value is set in the save game object, then finalyl checking if save game object is saved to slot
man this ones actually got me nervous
would start by checking if the value is correct just before save game to slot
yea
if you ain't getting a correct value to begin with, the save ain't gonna be right
theres a print string in the screenshot
thats to check that the value has been applied
it does reflect the change. but then i have a print at the start of next combat and the value is back to default
Yup, but I would personally do it right before Save Game To Slot
just check if the SaveGameObject->TheVariableYouWantToSave is set correctly
hmm. i dont think it will make a difference but i'll try it there
because if that's correct and you succesfully save it to the .sav, I don't see any reason you wouldn't get the same value when you load the object again
so the save happens on another widget after this widget has closed
i should put a print with the stat right before for loop?
not there
yea second one
@iron idol Btw the one that you failed to save
it's not the XP right?
no thats an old variable i just have not cleaned out yet
i changed where the xp was located
so i cant retrieve the variable the same way in the save system
the change wouldnt be undone by the widget thats applying it before removed from parent?
remove from parent doesn't even destroy the widget
Widget gets destroyed when it's unreachable
yea i didnt think so but im just grasping at anything
hello i a m making fps game with https://www.youtube.com/watch?v=TrS5oaimIII&list=PLxYB4IVFm8q6tf3boC1Nm4A8AB2RMCpXn he was creating in fps template i want to play the idle animation in motion matching i mean this idle anim have just arms so i want this idle arm animation in motion matching like upper body
.
How's it going everyone! This video marks the start of a tutorial series made with the intent to explain how to create a smooth first-person player controller in Unreal Engine 4, inspired by games like Halo, Destiny, and Splitgate. Over the course of the series, we'll be covering topics such as weapon sway, first-person camera animation, thir...
Is it possible to have actor no see on and still have the mesh cast shadows and reflection through mirrors or objects?
hey, so relative noob here, was wondering if i could have help figuring out how to get a blueprint interface to trigger the event node in blueprint B after its function is called in blueprint A, the BPI is implimented in both, and im getting a string print in blueprint A after the call node, but the Event node isnt printing in blueprint B following the call execution
is there something obviously wrong here?
BP A: Actor - BP B: Character
anyone
Would prly need to see the rest of it and maybe what’s not working
Try #animation
I was under the impression that when that call "item picked up" Node is run, (it's from an interface blueprint) that it will trigger that event "Item picked up" node from that same interface blueprint function, in the second blueprint
It should if you send it right
Your current node isn’t sending any message (envelope icon)
And how do I set the target if you will
Iirc for one make sure only the receiving actor implements the interface (the sender cannot implement it if you want it to work)
Then, use the Message version of the node to send the message
hello, how can i set resolution for standalone game window ? i could not find any settings in project settings or editor preferences
There should be set resolution and apply setting in the game settings object
Oh wait stand alone, nvm
Thought packaged
Prly buried in some .ini 🤷♂️
ya because i tried even putting it to full screen with alt + enter but still , next time when i open, it again defaults to either center or random
i asked chatgpt but its settings are not even there in Unreal engine .. maybe for older versions it showed data i guess 😅
Er, just took out the implementation in the first blueprint, not sure how I'm supposed to use that function now though
Is there an event that fires when I destroy an actor in editor
Like with a backspace
The OnDestroyed doesn't seem to work
Does anyone know how to duplicate an item in an array? I tried SetArrayElement in 2 different indexes but it only shows up in one ( It's an inventory )
https://gyazo.com/00adbcf8641924157aabac3c9b87d102
Anyone know how to fix the camera jittering when using the lock-on? When unlocked, there's no issue, however the way the lockon is set up it constantly tries to stay focused on the target, for normal play and movement this is fine, no issues, but I also have a function where when the player throws an attack with a locked on target, it attempts to rotate the player to face them, this also attempts to rotate the camera as a component of the player with them, causing the two functions to fight and create this jittering effect as the rotation moves the camera and the lockon nudges it back on target
How many array elements are in array
May need to size to fit
If the array has no existing space at the supplied index set won't work as there's no entry to set, you would need to add a blank entry and then set it or add directly to the array
it's like this, im dragging a bomb to another slot, and i replaced add item with add 2 items , the second one at the next index, but it doesnt show up
Checking the size to fit option should solve it but you may want to define your size elsewhere if it's an inventory
Yasss I got it working tysm @lunar sleet
I'm not following what you mean by this, wdym you replaced add item?
i replaced the function "add item" with the blueprint in that screen above, which is just adding a second SetArrayElement in the next index. There is a checking for available space before that
You're using a grid, are the indexes linear?
when i add +1 to the index and i do a normal AddItem, it ads it to the right slot to it
But on the grid is it just top row is 0-5, 2nd row is 6-11, etc?
yes
What's the for each index node doing in this scenario?
the thing is, i think the item becomes 2 slots
I think you're gonna have to back out your scope here if you want help, a lot of what's going on here seems to be happening in other places we can't see how it functions
honestly im not sure, i used a tutorial for diablo style inventory, and it all worked perfectly, and i tried to add a simple stacking, rn im trying to duplicate an item, the only problem is i can't get an item to duplicate properly
Probably best to learn what it's doing first
^
Can't really help diagnose if we don't know the intended chain of events to begin with
Right click and find references and you can go through the code and study it
I just wanted to know what's the normal way to duplicate an item in an array
It's kinda contextual
Like is that SetArrayElement is normally supposed to do it?
It's a way to I suppose but without knowing what the loop macro is doing can't say
So the macro function is OnDrop, after I dragged and released an item
Its on the InventoryGridWidget
It checks for space before
It normally adds it
I'm talking about for each index
ok lets see
Also a problem you can probably avoid now is you don't seem to be duplicating that space check for your additional item, so if the first space is clear, it would potentially just overwrite anything in the following needed spaces
But again, without knowing how it's checking space to begin with might be the culprit of why it's not working anyway
ok im gonna show it
Yeah so the first time it does index 0 and 1 second 1 and 2 overwriting the duplicate etc
What is this "top left index" variable? Is it being set by something? Otherwise wouldn't it just always be 0 if you're using linear indexes? The indexes shouldn't care about the grid factor unless they're not linear
Its the top left index of each item
What does that mean?
It's an input which I'm guessing is doing a for loop
I get that but I'm saying it's odd to me that it's labeled top left because 1. that implies it's checking 2 factors to get top and left which wouldn't be accurately represented by an integer, and 2. I haven't seen anywhere where this actually gets tracked so either it's not hooked up when it's supposed to be or it should just always be 0 anyway
What is this function? It's multiple loops that run into each other and output multiple times to what end?
So this is the literal For Each Index function
But... that outputs 2 X and Y integers and the function you showed in the other screenshot outputs a Tile struct
It's still odd to me that it doesn't create that struct anywhere in the function but okay, we'll run with it
so each slot has x and y
when i test the index, it shows O O
0 1
0 2
until 4, then 1 0 i think
each slot is like that
4? What is the significance of 4? Your inventory is 6 slots wide, and supposedly linear.
oh yea until 5 then, i thought its 5 slots wide
The image you showed is 6
It would read as 5 I guess
But that sounds like your indexes aren't actually linear then?
Its separately defining rows and columns
yes
you can just set the number of rows and columns in the component
and it changes it
So, if I'm understanding this system correctly, I think we're back to where is the "Top Left Index" variable getting defined for use in adding the item?
looking for it
found it
so the isRoom function takes it from here
and
So actually this is the function that is called to check for available space
But this still pulls it from this "Dragged Item Top Left" so we still aren't seeing what it's actually getting from this variable
Honestly I think you're better off scrapping the entire "add2" approach and moving your attention before the space check happens and figuring out a way to just tell it you need to run this check multiple times on different indexes, otherwise you're going to get into a pandora's box scenario where your function no longer works for adding 3 or 4 or so on
What i need is when i drag from a stack isntead of an item
to leave the original item there(the stack and -1 to the stack) and also bring it to the new spot
that was the idea
So what does this have to do with adding 2 items?
because i wanted to add 1 in the on drop location, and 1 in the original location of the stack
and just set the correct stack numbers
Well you shouldn't need to add 1 in the original location, I'm assuming these stacks already have a variable defined for their count?
yea so thats the problem, when i drag from a stack to somwhere else , the dragged item doesnt show up
actually it becomes part of the dragged item from
Just -1 the stack and then create a duplicate item when you drag it instead of dragging that item itself
With 1 as the quantity for the duplicate
yea the stack -1 but the new item just doesnt show up
the slot is empty and it actually is part of the dragged from item
thats why i tried to add 2 items
it only adds 1
functionally the new location becomes part of the initial stack
when i drag others on that ghost slot, the original stack increases
But what happens to the original stack?
however i tweak it, either the original stack dissappears, or the new location item dissappears, but actually they merge
functionally they become 1 item
with 2 separate spots
Are you dragging the original item or making a copy?
im using that add item at function
That has nothing to do with the drag/drop operation
Your drag and drop is literally 3 separate items, the location you can drag items onto is an item, the item occupying that location is an item, and the item you're moving around when you drag them is another item
It's 3 separate entities passing information to each other with each action so what you need to do is figure out what's actually happening when you drag it
yea im working with those spots, its OnDragDetected
When it drags it calls a drag drop and then remove from parent
i tried to remove the "remove from parent" node, but then the new location doesnt work, it become ghost slot
Yes, so you don't want to remove from parent when you're dragging off a stack, you want to have a way to execute a separate function that just -1's the parent and creates a duplicate with 1 set as the quantity to drag instead
yea yea
thats what i kept trying
the -1 is easy
it just cant seem to duplicate
it becomes 1 item
with the 2 both slots
You'd have to see what is happening in the drag operation and what data is being transferred when you do that
It's likely referencing an object directly so if you take out the remove from parent, it's just not removing it from that slot, but everything you do to the object still affects it
Hence, you need to make a copy
yea like how do i make a copy
so this is currently OnDragDetected
omg is it that i didnt return the operation on true???
It's not executing anything for stackable items at all right now it looks like
hey guys so i have a BT set up to change inplayerrange? bool to true or false depending on distance from eachother and its works just fine until in runs the second branch and wont abort if anything is running below the sequnce on the right** and doesnt even print that the players are out of range
You definitely want to be doing something off of that
yea i returned the operation on true i think its better now
im gonna check
You're telling it to abort both branches whenever it's true, which looks like it would be when it is in range, so the second they get in range, they abort the in range functions and go back to trying to get in range, which they already are ad infinitum
i changed it to abort lower prio when its not in range and then is should go to the right sequence like it does when you are, but the right sequence never aborts when out of range
Does it set that variable anywhere on the right side?
yeah i figured this service would do the trick for both?
I could be wrong but I believe the sequence is technically only being "activated" once so it only checks once and doesn't actually update as things are happening so it would never figure out it's no longer in range
Could try moving your service onto a recurrantly firing node
Why does this simple timespan shows 2 minutes passed when only 1 minute has passed?
Anyone incounter that problem?
just unplug Minutes, you are adding Game time twice
Ohh that was stupid of me ... Thanks!
you weren't entirely wrong they do fire in intervals but i was using an event receive Execute AI instead of Event Receive Tick AI, all these hours for such a simple issue
thank you for your help tho definitely you got me to the thinking space
Hey folks, so I have a multi sphere trace on tick, and I need to fire an event once every time a new actor is hit by the trace, and another event when a previously hit actor isn’t being hit anymore.
Currently I have this. The new actor hit works, but the actor not being hit doesn’t. Any ideas what’s wrong?
looks like new hits is empty at the time you're checking if it contains things
assuming its a local variable
At first it is empty yeah, then it skips the first check and proceeds to the next one
Which will add new hits
is it a local variable
It’s not
is it because you're testing with just one unit and this entire thing doesn't do anything if nothing got hit
you're also removing an element from an array while looping over the array which is going to break things
This makes sense, however it never gets to that point, for some reason it never fires the “actor no longer hit event”, but the “new actor hit event” works fine
I shall try then updating the arrays after completing the loop, instead of on each loop
are you testing with more than one unit
because your code won't do anything if the only unit in the area isn't hit
there is no reason for this
That branch just checks if anything is being hit, if false it doesn’t do anything. My multi sphere trace checks for anything being hit by that trace channel so it can return multiple actors in that initial array
and thats wrong
because if you have one unit in new units and it is no longer hit; you want to do something.
Aren’t them just low res?
Did you change compression settings in the image asset?
Hi everyone👋🏻
I have a problem that i cant think a solution of. So i have a character blueprint and i scale the character ,the game is about scaling. And the problem is that the camera is also scaling ,and its weird when the character has a big scale
so its like this when scale is 1
how can i fix it
the solution is math (trigonometry to be precise)
or cheap out and try your luck with find look at rotation
I have a template asset from MP where AI Enemies attack my player
However when i add many enemies they all come at once and trap me where theres no escape
How can i make them attack like 2 at once or just 3 not all
no this will not help,the problem is with scaling objects not looking at them
i heard of camera manager,and that its more flexible than having the camera in the player
am i right?
i doubt that this will fix your issue
with math
as proposed before
or aim at component, not sure if it would work in that case
what if i add a value to the target arm length when he is scaled
sure, add 42
yeah adding a value to target arm length helps
@spark steppe Do you use spring arm for your game? It never become a solution for me. Especially when hitting corners.
The camera penetrative feeler from lyra saved the day tho... and my camera movement doesn't look crap anymore.
not the best solution i think but it works
why do people ping me today for all kind of questions!? xD
i didn't have trouble with spring arm (yet)
but i'm not at the point of dev where it would really show
Any reason why this doesn't actually play the montage? I know the ability triggers and the print string at the end gives a value
LogAnimMontage: Warning: JumpToSectionName Slash bEndOfSection: 0 failed for Montage Attack_PrimaryB_Montage
LogBlueprintUserMessages: [Ability_Slash_C_0] Client 0: 1.399983
LogAnimMontage: Warning: JumpToSectionName Slash bEndOfSection: 0 failed for Montage Attack_PrimaryB_Montage
Is there a way to disable all postprocess via blueprint?
Like a setting to override any prostprocess that might be in the level
Sry, not gonna do that again unless we in convo
Gonna repost from reddit if that's ok:
"Currently I'm using an input action, doing some checks for things like not crouching, jumping, swimming, things of that nature to make sure the slide is possible, then I'm using a timeline to shink the capsule collider, change the mesh Z location, and change the speed over time.
It totally works, but I'm wondering if a timeline is the best case for this. I want to be able to make the slide time, slide speed, and slide "friction" variable, which doesn't seem to be possible with a timeline.
I found the finterpto function, however that requires a tick, and would be wasteful for a slide mechanic.
Does anyone know how to better implement this?"
Does the montage have slash section? Does the character have montage slot in abp? Does the montage play at the correct slot?
Oh thanks mate I think the wrong ABP is selected let me try
Hey this is my animgraph and you can see I have a layered blend per bone node which I play montages through to blend with my standard locomotion, however when I play montages it's not blending per bone... my character comes to a locked stop while playing the montage until it's over. I thought layered blend per bone was supposed to let you move while playing the montage?
This is my settings for the node
It was working before, however my motion matching PSDs somehow got corrupted, so I just remade my entire motion matching system and now suddenly I can't move while playing montages
I didn't have to touch anything other than the motion matching nodes
Can we open levels with a given gamemode?
Sure but then the game mode dies and the next level one spawns
Well, if I have 3 different gamemodes that I need to progress through this is fine then?
Yeah if you want to set up a function that opens a level in the game mode go for it why not
Put it on the player controller, inside the player, inside a level transitioning component does it matter
As long as you know the game mode in your current level gets destroyed, and the game mode for the next loaded level is created
I should clarify:
Server: Picks a 3 random maps.
Server: Will also need to choose 3 random game modes
Server: A, "match", would be the progression through each of the maps, each with a specific gamemode.
Oh you didn't mention it was multiplayer
Unless! There is something in the gamemode that can account for a different scoring model?
--and I just don't know about it.
How can you pick a random game mode? You have to set the game mode in the level settings before you package it. How do you set the game mode for a specific level at runtime?
well this is my question.
I think it's no problem opening random levels, but they need to have defined game modes
So sure make capture the flag, team deathmatch, extraction, battle royale mode all their own maps, or hell even make multiple copies of the same map with different game modes
I didn't know that had to have pre-defined gamemodes as the gamemode only exists on the server? So that's why I was curious.
DESSSSPERATELY Trying to avoid exactly this.
Set the texture files to use UserInterface compression and use the UI texture group.
The GameMode existing only on the server just means it handles stuff that why would the players ever need to handle or the stuff that players shouldn't be able to handle at all, but I've never seen it as a dynamic thing that can be handled around
Well I would imagine or had thought it meant literally only existing on the server if you're running a dedicated server?
I'm just mocking things up.
You're correct that's what it means exactly
But wanted to make sure I'm off in the right direction.
but look where are you gonna put this logic that players should never touch? Character class default info? No way clients are deciding their character class info. The server is the only thing that has a connection to which enemy spawners spawn what and tracking all the enemy kills and player scores. Also specific overrides for PostLogin, PostLogout those specific times that logic doesn't exist anywhere else like it does on the GameMode.
I haven't gotten that far yet. Right now...what I'm doing as a place holder is putting all of my "server tasks" in a blueprint class that's created alongside the game instance. I'm guessing I'll have to write some sort of manager class that keeps track of a "match" as the game goes on.
UNLESS there's some ThInG that the engine has for this functionality.
I haven't really poked around in the gamemode class itself. If there's an option to just leave it as one gamemode class but change the rules between levels. That's fine too.
You can make a master class that dictates which functions to call based on the level and keep 1 master class game mode sure but idk if I'd do that personally. Your game might require it if that's a specific feature must have tho
Yep, just removing that branch worked. Only tested one actor being hit, so that array being changed on each loop might break it later but should be an easy fix. It’s working great, sometimes you just need a little help to see what’s right in front of you heh, thank you very much!
The game mode can change its values at runtime, but I'm really not sure how you could do like making it where the server selects a set of rules for the next level's loaded map because the game mode for the current level is destroyed before the game mode for the next level is created. They have no way of communicating and there's not a way for you to say "Ok game on your next level load use these settings in the future" and then you generate a game mode class with those loaded settings
Actually yeah...I ran into that funny little thing! I had forgotten.
When the GameMode is created on level load it always loads default values then changes what it needs to while playing
If you need different default values between different levels the only way I see it is different game modes
--with different maps.
Every time

I'mma dig around. And see if I can't come up with something before work. DX
hold up
What if
hear me out
What if you had a settings struct or something that existed on the GameInstance instead
you could make it where after the game mode is created you could get the game instance and retrieve those values and set the settings maybe
The game instance lives for the entire session the game is open
So like make a function the server can decide a set of rules in a struct that you define, and then it packages one up, sends it to the game instance and then waits for the next level to load?
why are collision boxes visible n game for me?
idk I've never tried it
I mean that should work.
The game mode can remain singular But all the rules which I am free to define which only ever differ in the scoring...should work?
I mean the server in a conquest mode only cares if you're standing on the point.
--or overlapping.
How do I spawn objects in a pattern?
I have 4 spawn points, but want to spawn 2 objects at random spawn locations.
Edit: At the other spawn points, randomly.
I would think you could make a big master game mode with all the different stuff. Up to you how to design something that can handle a bunch of different rules tho
Right right!
I mean the only explicit difference between the modes is the scoring.
Conquest: Points are awarded for standing in a circle.
DeathMatch: Points are awarded on enemy death.
The only thing changing is which event is firing.
In my enemy spawner actor class I just make a vector I fill with random values, then add it to the location of the spawner actor and things spawn within the sphere you define
Right but you would have to bind all events to all delegates or do a lot of logic for disabling functions if the game mode is certain settings
I feel like it's a big thing to make one master game mode class
Would it be though?
I mean if the FINAL endpoint comes down to a matter of which function--or class rather is calling on some variable? Would it be any different if I made 3 different modes entirely?
When I spawn them I make the random transform and set the location of the transform as the return value of making the random vector then spawn them in
Well you're going to have functions for 3 game modes inside 1 game mode and you're going to have to consider every single function which settings disable or enable exactly which functions and if you need functions for 2 of the 3 etc
lmao I just look at my code I forgot to delete those spawn params when I was spawning them a different way
damn it's crazy how you miss things so little things sometimes
I don't know I think It'll be alright...I mean if very little is changing between them.
However for right now I just need a mock up. So I'mm ago Poke around in the GM.
Also Thanks again for the pointers.
I think it's possible to override the character movement component on a default character. Is it possible to do the same thing but on the skeletal mesh?
I have a bit of a casting issue: why is this failing to cast? The BP_SceneCamera has the parent class of Actor, so why is the reference no good?
You're not casting to Actor
whatever ref is coming through is not a BP_SceneCamera
put a breakpoint on the cast, hover over the Object pin when it hits
my money is on you failing to set the ref properly
that question does not make sense, please try again
Put your spawn points into array and pick a random spawn point using a changing seed
Where is set VR interpupilary distance (IPD)? the scale seems off when I try VR template, but I can't find any place where it is set
I just need to force it to specific value for testing, it doesn't even have to be a clean solution
@soft lion Aaaaye we fuckin got it!
I can dynamicly load a gamemode with a map at runtime.
At least with the editor.
The BP's are a hot mess buuuut the long and the short of it is.
In my Stand In Server class:
Manual loop through a list of map names add random 3 to a set. 0, 1, 2 <---Return
Manual Loop through a list of gamemodes....with string aliases...add random 3 to a set 0, 1, 2 <----Return
call this function from the game Instance through my constructed BP.
Convert the lists to arrays pass in (0, 0) to the open level node appending (prepend?) the Gamemodes aliases with, "Game=", <Alias Name>
Each level and Gamemode rattles off a lil message on each of their begin plays!
@lunar sleetthanks, for some reason that channel was hidden for me
massive bro
I just gave up on my multiplayer project I'm tired of arguing with it
I promised my wife I could have a game on Steam within a timeframe and all I'm doing is sitting here fighting between server and client in editor, then fighting back again between server and client in shipping builds because those are 2 very different things. All my stuff works in editor but shipping breaks 80% of my mechanics
And I haven't even got to injecting packet loss
or simulating any 200ms lag or anything
That's gonna break a bunch more
I can make an editor multiplayer game but I don't have 10 years to make this spending a week to figure out every little thing
Hey guys, my fps is absolutely tanking whenever i enter combat and do damage to an NPC, how can i best troubleshoot this?
learn how to do #profiling
thanks, will check it out
Man I BELIEVE you. I've damn near come to hate Unreal Engine.
I am not writting code for each independently yet.
But that fighting with every damn part of the engine the entire way...almost convinced me I can afford another monitor.👊
But I just don't know what the f the engine is doing between modules.
And while I'm also learning c++...well I just gave up with unreal plugins.
And this seems to be my problem.
Epic announces some feature I think it would be nice.
I try to make use of it (as good faith towards good practices) and it just doesn't work somewhere along the way.
Something just Does. Not. Work.
My initial thought of approach was to have the server set up so I can prototype in a more "live" setting but Epics solutions literally just drove me to the point of...
hate. I couldn't manage the EOS (And the entirety of that hot mess of naming stupid conventions)
So I tried the SDK. Everything was fine...Up to a point.
After that. I just said Fuck it.
Went to steam...Paid the 100 bucks. (Jumped the shark a bit)
Grabbed the sdk.
And it just....worked.
Just toying with it out of the box.
It's documented and I'm sure there's thousands of people that have real working products you could reach out to for help.
UE5, an aftethought now. I don't know if I even have any singular game in my steam library that uses THIS version of the engine.
And as far as I'm aware. I don't know any games that have launched with this version of the engine.
But yeah...I feel what you feel but a few floors down.
Yeah well I can't even use motion matching properly. The server and client can't calculate the same direction for the anim instance so they're constantly arguing and my client movement animations are so stuttering but the movement itself is smooth
I replace it all with just regular state machines it's even worse
I'm having this issue with the water plugin in my packaged builds, out of nowhere it just started looking like this, I tried to build it again, make it render again, but with no success.
In the editor it plays properly and it looks good.
Has anyone had this issue before ?
the built-in water plugin is...suboptimal
I gotta run but I wanted to say thanks for speaking up again. Appreciate just having someone to knock ideas around with.
Hello everyone, what is the best way to learn blueprints? I took a course in YouTube on basic aspects. What to do next to create a knowledge base for further use of it for your own purposes
Honestly, learn programming.
"your first hour in Unreal" on the Epic portal and the BP Comms Live training pinned in this channel will get you started. From there, learn how to use breakpoints to debug, and you'll be able to solve most issues on your own
Do you mean C++
Any language really. Blueprints are just visual scripting, learning how to program will take you far beyond blueprints.
Thanks, I'll take a look at this
Is it easier to learn C++ after you know blueprints or can you immediately buy a course in C++?
Good question. I learned programming first so I couldn't give you a good answer. I wouldn't buy a course tho. There's plenty of intro to programming videos on YouTube that'll give you the foundation to learn any language, including blueprints.
Sorry, I'll know for the future
Thanks for the information
Knowing OOP, the concept applies to both blueprint and cpp.
Basically know how to use function, event. What classes are, inheritance, instances, data types, etc.
Got it, thanks
I reparented some components and then deleted stuff and now it seems my default scene root has a scale and rotation applied to it. As you can see in the image the sphere looks squished and the blue arrow which should point upwards is pointing left
anyone know how I can reset it?
Found the fix: Make the sphere the default scene root, apply transformations to it till it is normal and then delete it
seems like the default scene root will inherit the properties of what was deleted to create it
Hello. Thanks for that video but the video that you sended don't helped a lot so can you help me a little more please? I was just looking for a simple thing like access the variables from another blueprints and things like that... I didn't understand the video because i don't speak English very well so i'm using translators
So I can set Generate overlap events for instances of this rock mesh in the level but how can I do it on the base asset? There seems to be no option for it and I dont want to set hundreds of them by hand.
Make an actor bp
ty
When you add a spline point, can you get the point index that it just added?
I wish that was an output connection on the add spline point node
Hi, why remove parent only remove the last index of the widget? How can I remove all of them?
Get number of spline points -1 (minus one since the first point is index 0)
Hello! I am having a very weird problem.
I have a system setup to simulate realistic collision with the default VR Template hands using physics constraints. Now, the problem is is with the colliders that are attached to the finger bones.
When moving your hand around and colliding with objects, they work and stick to the bones perfectly! However as soon as you bend your fingers, it just floats.
I attached a YouTube video showing what I mean.
Don’t mind the colliders rolling around I was just testing with one collider for now haha
I can provide any screenshots that anyone may find useful! I'm going nuts tbh haha
While this is using VR, I don't really think its a VR specific issue so I'm posting it here. Sorry if it's not the right place!
either channel, don't cross post
What's the best way to have some UI appear when the player dies, after a delay?
I'm using GAS so I already have a death tag and ability I'm applying to the player.
I'd just spawn it instantly when Death tag is applied, and do a controlled /delayed fade in inside the widget bp
why is triggerbox giving me errors
I'm assuming cause it's a streamed actor
is doing like this good
ohh there is new can you name it
enhanced input
hi, is there a way to add a curve to the Move To?
For what
or it's something to manage with the max walk speed an acceleration
No, you cant include a curve
Nothing to do with the move to node
you'd need to append that logic manually
to make a smooth acceleration for pawn that doesn't have the character component
That’s a CMC/ pawn movement thing
Maybe you can do something on the pawn movement component, but this does not tie into the AI much. The AI tells the pawn to move and where to go, not how fast, etc
yes that was the goal of my question, to know if something was available for that kind of stuff
but ok 🙂
Nothing prebuilt afaik
ok 😦
so mixing that kind of movement with a behavior tree seems to be complex to put in place
its mostly something like
OnTick -> ShouldMove? - true -> Accelerate_Clamped() - false -> Deaccelerate_Clamped()
Not really. The BT doesn’t need to know about it
Hello, I have a zone in my game that is a shrinking capsual collision and i have ai in the game that move to a random position. My question is, how to I make that the ai only goes to a random position insize the zone(capsual collision.)
how do I add this layer?
this is how it is right
and btw pressing a while i was holding w and d not working it goes to w/d not w/a
but while w/d i can press s and i start to go s/d
how to make it if i am holding d and start to press a to not go a just wait there
ohh done it
Hello Guys,
I wanted to create a Mini Map, and I am curious about if World Partition System map be used to create it. Like Using the backend from World Partition to Widget
Example - New Level and Matrix Level
how do I make a camera render as material texture? Basically I have a camera that only see certain objects, whatever it renders I want to show it on a material of say a screen in the scene.
You mean like a security camera?
is this ok way of doing this or there is better ways.
and is there a way of doing pressing e to interact(it sends alot lines) but after collision happens it stops for a duration or stops for good till holding e again for interact
why would you cast self to object
generally you'll never need to cast self to anything
everything that self is , can be accessed directly
Also, generally, I'd recommend to always make things a variable, and not rely on hardcoded values
in this case it would be a float "InteractionDistance"
ohh it works thanks
u mean from this
this part
where you multiply by a hard coded value
you should multiply with a reasonably named float
Like this
like from this right
reasonably named
is also important
Ofcourse, it only needs to make sense to you/your team
yeah yeah sorry for that i was just rushing to reply to you
but yes, like that, a variable
thanks
I am often running into the issue in unreal of not knowing how to best handle changing a value dynamically.
For example say I want to have a headtilt that happens when you move to the right or left, you need to smoothly change that variable constantly to either slowly tilt to the right, left or revert to the neutral position based on your input. But whenever I implement these kind of things they kinda feel.. bloated? I feel like there's a better way to do this. What's the normal way of handling stuff like this lol, I feel like this should be very easy but that i'm doing something wrong to make it feel bigger than it needs to be.
I think this is the cleanest I could get so far. This was for a flying vehicle which rotated a bit based on whether you go up or down
Is there like a easy common practice way I never heard of or is this pretty common
I'd just do it on Tick
using things like Velocity, Heading direction, Target direction and so forth
the bigger the delta between current direction and target direction, the bigger the tilt..
or based on current rotation delta
Hmm so a tick function, I guess that would be cleaner and not too different in terms of performance loss vs this tween thing
Im personally not a fan of having a ton of things on the input events themself
Me neither
they serve to do and handle the inputs, not all the glossy extra effects
So it would be something like
Tick -> UpdateTilt(float Delta) -> UpdateFlaps(float Delta)
I'll go tinker with a tick function to kinda compare and see if that's easier for like organization sake thanks
I'm also a fan of wrapping things up in functions
keeps them easy and 'separated', and lets the event graph largly work as an overview of the logical execution
easy to see "oh shit, i updated Tilt() before Flaps(), yet Tilt() relies on Flaps() final values !"
definitely agree on that, I could just collapse it in the event graph as a node thing which would work similar enough
but functions are just more convenient
and let's me find stuff relating to it quick
yea like that
but I am more specific on what object that camera see, basically I want to recreate a robot facial system from some other game where they have a plane with shapes of the face and a camera where what the camera render with pass through some kind of post process effect to make it pixelated and slap it onto the robot's face
You simply use a SceneCaptureComponend2D. This works similar to a camera. You can place one at the same place as a Camera if you want. This renders to a texture. You can then use that texture as a texture param in the material you're using as the screen.
The robot thing might be slightly different.
well I assumed that's how it worked since I saw exactly that setup in the playground mode the game has
just a flat plane on the world origin with the robot face and another plane above it of the rendered face with the pixelated post process applied
Just know that scene capture is expensive
How do I open the Blueprint Data window, the one that's open by default when opening your blueprint?
apparently structs are pretty much notoriously bugged for blueprints in unreal
tfw renaming a variable crashes unreal 😩
how do they expect you to do these things without structs is what I want to know because inventory systems need to handle a lot of data
Genuinely just lost when a basic feature of the engine is just broken
Do people just forgo structs altogether for some kind of alternative in blueprints?
I heard there's an alternative somewhere
no they usually just declare structs in cpp which makes them infinitely more stable
I read about that too but couldn't find a way to do it
also you get to have struct function and can also define operators in there (like ==)
It's kinda insane how this is notoriously bugged and yet not fixed
because this is such a basic thing
like this is such a foundational requirement
How do I take a snapshot pose of an actor, and export that to another actor to use (assuming they use the same skeletal mesh)? through BP ofc. ive been at this for hours 😦
well in unreal you are excepted to use a mix of BP and cpp to some degree 🤷♂️
I mean why offer the option for blueprints structs at all if it's this broken
that is a good question
maybe the same reason why they offered nativazation back in UE4
guess i'll try adding a c++ struct class to see if its usable for me
(for context was trying to use the above for an afterimage effect)
hello
i try like in the picture to get the sequence player as an variable to get the last frame in the level BP to jump to the next level after the sequence is done
when i try to get a variable on the leftside there are all sequence player variables that i cant connect to "bind event on finish"
can somone help me?
Hi all, I open a widget on tab button and want to close it also on tab button. For this I use Set Input Mod Game And UI, that would work keys in the inventory, because if the Set Input Mode UI Only is enabled, they do not work and therefore can close only on the widget button. And in Set Input Mod Game And UI I can close on the tab button, but if I clicked on an item in the inventory, I can not close until I clicked on a place outside the inventory. As I understand it, this is due to the fact that these two modes are turned off. How can I do it right?
Sadly struct functions doesnt translate to bp either so those also need to be bp exposed through some native bp function library
Sort of annoying double work
But also.. they got native header previews now, so im sure they could make a struct editor that simply made the native struct directly. Would solve most issues
Assuming this input is in the player controller, setting input to UI only will disable player controller input. You have to add key input in the widget itself.
hopefully they'll do something sooner than later
whats the easiest way you can think of to add an afterimage effect on a character? i tried using the snapshot pose node in BP, but to no avail.
probably a niagara system that leverages the skeletal mesh
I don't think I should fuck with c++ right now, I am not in equipped to learn all that stuff now. Maybe I can make a empty actor as janky struct alternative for my needs? we'll see
Honestly yeah this sounds like it may be your best bet
that was my original approach, but i need the afterimage to be in the exact pose of the character at the time of the afterimage being created
that should be doable if you're generating particles off of the skeletal mesh
I suppose you could look into creating a render target image saving it and then turning that into a afterimage somehow but that might be convoluted..
making a struct is the easiest possible dip into c++
yeah but apparently it needs extra stuff
but would i also be able to have the particles be the appropriate color, based on their position relative to the surface of the mesh? i dunno.
"need to be bp exposed through some native bp function library"
I just need structs lol, I don't know how basic functionality is so broken in bp
I might look into c++ but honestly I may just see if I can find a bp alternative
c++ sounds like way too prone to failure
// Struct used to represent an individual Objective Task
USTRUCT(BlueprintType)
struct FObjectiveTask
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FText Description;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool Complete;
FObjectiveTask()
{
Description = FText();
Complete = false;
};
FObjectiveTask(FText inDescription, bool inComplete) {
Description = inDescription;
Complete = inComplete;
};
};```
here's one of my structs
I don't think you even need the bottom half for bp but you might as well
when you say you need it to be exposed to blueprint you really just need to write USTRUCT(BlueprintType) and UPROPERTY(BlueprintReadwrite)
oh really?
damn
I'll try that out thank you, I found another struct thing online but that one gave errors while building lol
For a pure ustruvt, id say go for it
That and function lib is a perfect starting point even for a completely new person (imo)
pretty sure that's supported
I'm curious like, once the c++ part is done can I just use like it a regular bp struct?
yes
I don't understand why epic themselves haven't done something closer to this lol I guess building is required this way
thats good
ill try a bit soon
guys I have one thing I have this cockpit in plane and when I turn on game its loaded like this but in few seconds it will fully load and it is in good resolution how to fix it to be loaded whole time?
its like 20seconds till it loads
How are you loading it today? Is it a LOD loading issue or just a texture streaming thing...
Even games like ff7r struggle with texture streaming, if thats the case..
Theres not really a lot of info to go off of here
You could make a fake load screen widget until the game has fully loaded the textures. I can't offer a lot more with the information given.
It could also just be your gpu if your gpu is on the lower end.
Stupid Question of the Morning: I am attempting to get all actors in an array, and print the name of the first actor in the array. When I use BP_Bob (name Bob) it prints Bob twice, when I delete BP_Bob and only have BP_Steve (name Steve) it prints Steve once
i might be wrong with this one since i have not done this
but put the array in a For Each loop?
Nope, that prints Bob AND Steve, and does it twice, lol
Steve's are often problematic...
Oh huh, if I delete Steve, it only prints Bob once
So I assume it's doing something with the number of characters in combat, and not the actual list of characters in combat
I bet if I put in 2 Steves and a Bob, it'll print 3 bobs
turn based combat yea?
I would think the for loop method should work here. but someone can correct me if I'm wrong. it might be a problem eslewhere. just my 2 cents.
Attempting, idk why every tom dick and harry wants to make dark souls, and nobody wants to make baldur's gate 4
my brethren! I'm also making a turn based game
I am newer to unreal engine. had only made a few projects before this one and the turn system absolutely put me through the ringer.
If the code shown prints more than once, its because you're calling it several times
There’s no code other than variables in the characters in the array, and I’m calling the start turn function on beginplay - I’ll have to keep digging
my instinct is that the for loop method should work
and your problem is somewhere else
making baldurs gate 4 is just not very feasible for an indie studio. The gameplay wasn't very good. It simply made up for it with high production values and writing
gameplay wasn't very good?
Several instances? Multiple beginplays?
this is so wrong
i agree a massive rpg like that is not feasable, but saying that bg3's gameplay was not very good is nuts
Which class has this code ? Show how its triggered?
I’m not trying to argue, sorry - I meant I’ll have to look to make sure I’m not calling it somewhere else somehow
can someone help me, im trying to stop a sound that was played because of a trigger but the place im trying to make the sound stop does not have the trigger, how would i stop the sound?
shrug. You're welcome to a different opinion, but I would strongly voice that the gameplay of baldur's gate 3 was just not very good because it's based on the 5e system which is just not very good. Larian's previous title, Divinity 2, was much better in terms of gameplay.
you need to do something to get a reference to the sound asset and call stop on it.
I also love dos2 more. but I still greatly disagree with saying the gameplay in bg3 is bad. but whatever floats your boat i guess.
how can i do that
promote the sound to a variable when you play it
nono it is a variable
how would i reference the variable tho
if the trigger isnt there to cast to
You'll just need to figure out something that makes sense to get a reference to it. Worst case being "Get Actor of Class"
drag off of get actor of class return value
you also shouldnt need to get actor of class and cast
oh
but i would think you should just be able to drag off return value and search for stop node
Your problem is that your grotesquely named "New Var 7" is a sound cue, not an audio component.
if i make it an audio component i cant reference my sound tho
can you just destroy actor?
iirc calling "Play Sound" means you're telling to play and have no option to interact with it again
yk i actually didnt think of that
if you want to make it something you can continue to interact with you should spawn it as an audio component
play 2d is also a good option for a one off sound
guys ,here i set the widget on the screen but i need to remove it also with the esc key ,but it is ui only so the key does not read?How can i fix this?
override the on key down function on the widget
i think i need a tutorial i dont get what i need to do here
@rugged wigeonsorry to bother you but where is it supposed to show up? Maybe my build failed but I copied this into a empty class and don't know where to find it
I put it into a empty c++ class and built, I think something went wrong because all the possible locations show nothing
something like this?
Hey guys, why I can't find Timeline in behavior tree tasks or in widgets?🥲
Becausevwidgets cant have regular actor components
maybe use the animation feature in widget?
You didn't state what you are trying to achieve, but if its a widget, that might be what you want
OK thx 🙂
Why the delay doesn't work in the UI BP widget when I create it in a task of the behavior tree?
I think you try to call it in function.
Because I'm trying to make a delay for the spawning of the game over buttons screen: so if the player lose, start a short widget animation and after 3 seconds the buttons to retry or back to menu, spawn. But I'm having issues with the delay and spawning of them
You should probably toggle their visibility after 3 sec instead
On construct -> play animation -> fade in -> enable buttons
^^ This. Normally most of the stuff I find that requires a delay in a widget, should be done on the animation timeline rather than a delay node.
Most things that “require” a delay node don’t
Quick. Go put a delay node in a widget, seamless travel to a decent sized map.
Hint: You'll crash in 4.27. Dunno if that still happens with the changes in 5.2+ 😄
yes
Might need to delete your .sln and regenerate project files. I don't know the correct way of doing things but I need to create new cpp files so infrequently that this is fine for me.
You can just regenerate without deleting anything too. That'll also pick up unknown files as well.
neat
I don't know exactly what is going on, but I am creating a widget that requires a class to be set when it's made.
Before the widget is made, the class is valid. However, inside of the widget, the variable is always invalid.
Why is that?
Anyone know what happening here ?
for some reason my player isn't being rotated to face correct way but instead is just being moved to the respective location
thats my settings for the motion warping notify on my anim montage
any help would be appreciated
don't use pre construct
I tried it on both construct and preconstruct and it throws the same error on both
how could I transition from the player controller to a camera actor?
say for example, the player overlaps a trigger which starts a level sequence. I want the player to no longer be able to control the player character and to have the viewport be the cut scene camera
unpossess and set view target probably
Is it possible to pass a SnapshotPose from 1 actor, to another assuming they have the same skeletal mesh? im trying and hes just t-posing
Can someone help me figure this out, I need to get it so that the delay after the open playlist index, calculates how long the duration of that specific playing video is before continuing
If anyone has any ideas itd be greatly appreciated, i'm at wit's end and have been @ this for almost 15 hours. i just wanted to use this for an afterimage effect
What do you mean with "Fade in"?
This is the wrong approach. A delay will be a different time on each machine for starters
This is my new approach, it is working but now I have to add the amount of seconds for each video in the data table
It will only be going on my machine
I tested it to make sure the level sequence is actually playing, which it is. Using un possess does work correctly, but when I try to set the viewport to the cut scene camera it does nothing, the viewport is still just in the center of the map
I need datatable to know the duration of each video in seconds
Hello, i have short question. I have a Parent Class called (Melee Master) where i added a DataAsset with Montages/Sounds/Etc. I assign those in my Child Class. It works without problems, but how should i add a Static Mesh (My Hatchet) in my dataasset so i can assign it in my child class and modify it when needed?
What i did was : I assigned the Static Mesh in my Dataasset, i can get it without problems, but since i need to modify it (to change the material in runtime) i need to find a way to tell the Parent Melee Master that this is the exact Static Mesh i want to use.
Isnt there bindings for this? Seem you already got one of em ?
I'm lost atm tbh
Heya folks, do you know how to inspect the active custom game state during editor runtime? I have some variables in there I'd like to look at as I test stuff
Sooooooooooooooo
I want to sample a curve. And I want to use a timer to sample it over the course of a given duration (idk, say 5 secs for example)
while that timer is running, I want to then use that timer value into a curve float to toss the curve value into a scalar parameter from a material
But I don't get a float output from a timeline node - how else can I do this?
Wow, I actually found how to get a value from this - as it turns out, I don't even need to use a curve sample -
if you double click the timeline node (because that's very intuitive? <.<) you open up a window where you can create curves
Hi, I got this blueprint that move a platform using InterpToMovement component when a button is pressed, when the button is released the platform stop but I would like that it return to its home point. Is there a way of doing it with this comp?
Have you thought about using a timeline node which changes its vector position? That way it won't have to run off an event tick and can just loop after being executed once from a custom event.
I'm ready to throw my laptop out the window
Hmm thanks ! I finally got what I was looking for
Hey, one of the next steps next steps for my prototyp will be creating first own assets (some basic materials, grass(already done), trees and stones) grass, stones and trees can be harvested / cutted on a specific area of the level they should also respawn. Some tipps in which direction I should research / looking for tutorials? Actually my grass is also handled by landscape -> if I want to cut / harvest it this isnt the right way hm? also I want that grass for example should spawn to a distant of other actors.
Is it possible to make a Blueprint class that is only built for server targets?
I would say yes, don't bother?
Just use cpp and wrap it with the pre processor block
i made some code to detect if my mouse is out of a menu but it only works when my mouse exits the game tab
After a sequence is complete, what function do I use to make it so the sequence ends?
What sequence?
Sequence node? Player sequence?
Stopping the player sequence should end the sequence
level sequence
Hi guys! I have a question but hate to interrupt the flow of things, do you mind if I post my question? Or can you let me know the best way to post it?
I want to script server-side logic.
There's a few things I am not understanding when it comes to blueprints and Dedicated servers:
- What on earth happens with blueprints during the packaging process.
- What happens when blueprints are compiled?
- Do blueprints run on some virtual system during runtime? Or do they become c++ equivalents?
If I wrap a class with a preprocessor that is extended for blueprint Use:
What happens to the blueprint? 👀
Where does it go?🤔
So if Annnnyone wants to throw me a bone it'd be nice.
that makes sense lol. Well I have it so the level sequence possesses the Player character after overlapping a trigger. For some reason when the player spawns in, they automatically start at the start location of the sequence, rather than the player start. why is that?
So I have a few TriggerBase blueprints in my game and they work as intended in the editor, but they don't work with the packaged built version. Other trigger boxes work though. What can be causing this?
I also have the character being un possessed when the sequence starts that way the player can't interact until the sequence is complete. How can I have the character be re-possessed so they can interact with the world afterwards?
Your server side script should be cpp imo or it will get packaged together with any target since I don't think you can filter what gets build and what not in blueprint
In cpp it's as simple as adding #if server
If my memory serve me right
You can expose the function and code to blueprint from cpp but still wrap the actual implementation with the pre processor block so even if the class got packaged, the code is not
But the Gamemode and Gamestate BP's "Only exist on the server" I want to recreate a generic class like this for the time being.
Game mode and game state get packed to client build too...
I think you are confusing the concept
I must be.
It's like this if i make an online game
Ok
I want some script to only exist in dedicated server
So when I package the game for my server using server target
Only that .exe have the script
Right
When you build for client they won't have the script
If you just need to ensure the server does some things (not building related)
You can just check with the IsServer boolean node
So your script still get packaged to client but it won't run the script because of the conditional check
interesting.
But since the script exist in the client, it can probably be hacked but you shouldn't make competitive or hard to cheat game if you don't have the man power or someone that knows what they are doing
I'm starting to learn Mp too, not gonna worry about cheating too much
That will just hinder my progress
I mean...I am reading what you're saying but it's not making sense. Just between the whole packaging thing.
--I do appreciate the back and forth cause soemthing about this I am just not getting.
wait, would it be easier to render the level sequence to a movie sequence and then just play that?
I know (deleted coz was dum)
Can anyone give me advice or recourses to look up to complete the following:
- On game launch, create a random seed that will select a character from a data table of characters. (The goal is that a new character would be triggered each time the game is played, kind of like how animal crossings rolls random villagers)
EDIT: This is for a visual novel game, for reference. I'm using Visual Novel Machinery plugin if you are familiar. Thank you ❤️
Anyone know a fix for this?
Is it possible to suppress Get Class Defaults from adding new pins every single time you add a new variable to the class being referenced? It's a super useful node, but it requires that you constantly save all of the BPs using it for the referenced class, which is somewhat of a source control hassle
Im trying to use the Two Bone IK node and I’m very new to animation blueprints so any help would be appreciated…I have a socket on a weapon (static mesh), how do I use my weapon socket’s location as the effector location for the two bone ik node? In other words, how do I set the two bone ik effector location to follow the location of the socket on my weapon?
Use azure dev ops to host your repo
The error is pretty clear, your file exceed 100mb
I also probably wouldn't be pushing the logs folder
Aren’t those just KBs of text ?
why aint this working 🙃
it wont call the event in the top down controller
nvm ive got an idea
Print string also make sure you set the reference.
If you get accessed none then that's your clue.
What would be the best way to check if an enemy is within a player's view?
Like a weepiong angel
Idk bout the best way, there are many ways, depending on what type of game you’re making
Line traces, AI perception system, dot product, etc
I'm assuming by players view you're not referring to them actually being rendered on screen
If so then dot product for sure
I'm thinking usinging a "Line of Sight To" check with the player, and then checking if it's within the camera frustum
Dot product is a cheap start
Well, an assumed camera function given that it's on the server and we don't know the player's aspect ratio
Followed by an actual linetrace
Yeah
Or maybe 10 traces, idk
How would the dot product be used in this case