#blueprint
1 messages · Page 393 of 1
It's a softref
pained me somewhere to make it a soft
You can double check
Print uh..
Hmm. Thought you could get the name in BP. Guess not. You could just hackily LoadAssetBlocking for now.
if I change it to a hard ref, is it just a pointer or the whole thing is loaded
Would work for concept testing.
I wanted an object variable to be able to easily select my level, then convert it to a name, to load streaming level by name.
works nice now lol
Issue solved, copy and pasting the asset clears out old data
great, now it won't let me save, because the thing is not valid

gonna go back to my old name setup, I hate this so much
As a guess the asset it references gets unloaded. The 0 delays most likely behaves like a delay for next tick which gives it time to potentially become unloaded. This means when it then attempts to resolve the soft ref again it's null.
Edit: Also don't use 0 time delay.
the question is, why it gets unloaded, when it's not even loaded in the first place
I don't even know anymore

Editor behaves differently in terms of loading/unloading assets. If you open the asset in the editor it can persist during play. The editor can keep them loaded for longer than normal though.
hmmm
yeah I think ima go the easy way out: Data Base of level names + My current System
A soft ref is just a string anyway so if you just want to print it you can convert directly to string without resolving.
Try searching for path.
isn't that it?
Maybe a soft ref system can still work? maybe one last try tomorow
No, there's another one. I think it's to path string.
Because you're trying to print the name of the object. Because it's not loaded the object is null after attempting to resolve and this prints none.
oh
if I were to print the string
would it?
lemme check
yep
so resolving was the problem
thanks man
As another bit of information regarding soft references. Because they're just a path string, be careful if you save them in a save game object. If you change the name of the asset or move its location, it'll break the saved soft ref and be the old path.
It shouldn't be an issue when you do a build unless you're doing updates after release but can be good to know during development.
oh that's a pretty cool piece of info
luckily I probably won't use soft references in a save file any time soon, maybeeeeeeeee
I use soft references a lot so when I saved some data assets (for some purchased upgrades) after I changed the name of a few they stopped working. Took me a little while to figure out why. 😅 Especially considering when I cleared saved data it started working again because it was using the new path lol.
Hoping I hear something from anyone, ive been stuck on this for days and i feel pretty stupid. Im working on a card game and using a data table for the stats of the card. I have variables Id like to change while in the game but having trouble figuring out how to. Example: When i add a card to my deck, I want to change that cards boolean value from true to false.
Feel free to DM me if you do not catch me on here, Im desperate
So you need to distinguish between runtime data and static data.
Runtime values should not be in your data table.
Some data you'll use from the static data directly.
Some runtime data you might init from the static data and then use it.
Some runtime data will only exist in the runtime.
Are you saying you want to change the data table boolean or the boolean of whatever you use for your data table?
The short answer is you can't. Data tables aren't editable at runtime.
Can you provide more details about your current setup and what you're trying to achieve?
I'm getting a weird issue where I have a basic actor blueprint with a collision box. For some reason when I integrate a overlap event it is ONLY triggering on the client and not the server. I don't ever remember having this problem?
The collision appears to be setup correctly, as the client is activating it? But the server is not?
I'm trying to diagnose if my collision settings are changed server side but I believe that only changes on death.
Update: Quite literally all overlap events are not being triggered server side for some reason. I've deleted intermediate / saved / derived data cache with no change. Made a test level with full new Game Mode actors and was able to get the server to detect the overlap, so something is wrong with the character server side.
Fix: Couldn't figure it out so I restored a previous version through perforce and its working again
Check the collision setting of the character on server.
Hey a very rookie question. How can I input the BP_Block I just spawned into my Component pin in the Move Component To node?
The BP_Block is just a blueprint with a cube in it.
I'm just learning blueprints and I'm just spawning in a block and moving it basically.
Seems like your block is an Actor, not a Component
Oh yeah of course. Can I reference the actor in the component pin somehow?
Actors can be moved by setting world location, teleporting, moving with AI
If you want to move the cube shape inside the BP_block - you need to retrieve it first. Drag from the BP_Block reference and in the search box type Get Cube, or Get StaticMesh, depending on how the cube is named in the BP_Block.
No, they are differenct classes. You can't use a component function to move an actor
What are you actually trying to do here? In game terms, what is supposed to happen and how
I'm just learning so it's not going to be anything. But what I want to do is have a blueprint that spawns a cube and then move it. That's it 🙂
So for moving actors just for the sake of moving them from position A to position B you can:
- set their world location/teleport - instant
- use an Interp node inside a tick, using the deltatime as an alpha - this gives smooth movement
- use a timeline together with some interp node or setting location depending on what you put into the timeline - also smooth
- use AIMoveTo node if they are a pawn or a character and you placed a navmesh in level
MoveComponent shouldn't be used for moving actors. Sure, you can move the Cube Mesh from the actor with it - but only the cube location will change, the actor will stay in place. Which most often is not what you want.
And in case you don't know it yet - you can drag from the blue output pin of the spawn node. This is a reference to the spawned Actor. When you drag and drop in the blueprint, a search box will show up. By default it is contextual, so you can search for functions that work for this type of object
Thanks for the explanation. All of this is still way over my head 🙂
So there's no simple just move actor like the move component node?
SetActorLocation is the simplest one
Alright I'll try that thanks!
Well that didn't work. It's so hard to know where to start learning even with all of these tutorials that are available. Like I just want to learn how to move a cube. I'm probably lacking a lot of basic understanding of how stuff fits together but I'm not even sure what to search for to be able to get that info
Try to get RootComponent out of your BP_Block thing.
I can only get root component from the BP I am in it seems
Hello, not sure where to post this, I can move if necessary.
I have this setup in my project: two post process materials named M1 and M2, and three instances named i1, i2, i3.
i1 and i2 are children of m1, i3 is child of m2. All three of them have the exact same behaviour (m2 is in fact just a copy I made to fix this issue).
I use them as dynamic materials to add to a post process. If I add i1 and i3 they both affect the post process. But if I add i1 and i2 (in this order), only i2 affects the post process. Is this the expected behavior? I'm on version 5.3.2
I would strongly suggest doing a few intro tutorials. If you don't know what a root of an actor is and how to get it when spawning - it shows you have no idea how to do anything in the engine. Going in blind into something as big as UE is just not feasible for 99% of people.
Do an intro tutorial from someone (I did one form Unreal Sensei. The video was like 3h, but only 1h was what I did, the rest was just level building so not needed). This is meant to show you hwo to move in engine, how to add/place things etc.
Some intro stuff into blueprints maybe, I think I saw some people linking CobraCode for this. But I can't say, I didn't need this since I'm a programmer. But if you are not it will give you the basics.
Then you can do a course going through making a simple game. It doesn't need to be paid, Unreal website had one of these with a little robot but I don't remember exactly. The purpose of doing a short small game course is to show you the basics of how to make actors interact with each other.
To know what to search for you still have to have at least some basic knowledge about the engine.
I'm taking a course but I started yesterday so yeah I don't know how things work in the engine yet.
I’m happy to show you if you’re able, it would be easier.
My data table has all the stats for my cards. Right now all I have is a deck editor widget that allows me to see all my cards and their stats. I also can create decks by adding cards, that is where I want to edit values. I know data tables can’t be changed in gameplay, but I know it can be made into a variable in the bp so I can adjust its values. Just having difficulty figuring out where to put that information so I can call on it; player controller, game state, game instance , game mode? I’ve tried many options but can’t get the value to stick. When adding a card to make deck, I want to edit that card’s value “can add to deck” from true to false so it won’t be able to added again. If I remove the card from the deck, I want to change it back to true.
Using the same structure as your data table is based on, have a runtime representation of the cards
if it was poker, a deck would be an array of size 52 of those structs
deck (array of structs) should be a property of the PlayerState or Pawn most likely
if it's per player. If it's global it should be a property of some actor or the GameState
if it's hearthstone/MTG then your deck, hand, played cards, graveyard, etc, are all arrays of this struct
Are you able to chat and look at my code ?
No, I'm at work. Post it here though.
Ok, I apologize. Not sure what part of my code to post. I bought the CCG Template from the store and using some of that code, but it is not the way I want to set up my game.
If you're talking about this then it 100% would have some opinionated way to do what you're wanting to do.
https://www.fab.com/listings/b9d7f0ae-d9f1-4086-9014-4c5c5bc04872
You'll want to ask on their discord
Didnt know they had a discord. Ive been trying to use it as a guide to build my own because trying to edit something I dont know how it works was mind numbing.
If you're new to this I wouldn't recommend jumping in the deep end with some big plugin like that
Are you wanting to make your own system or use that plugin?
Im not sure. Right now Im just trying to understand it by replicating it myself using ways I know how to do things. Trying to do a little bit at a time, but not sure how stable the ground is Ive set up. Right now I am just trying to focus on getting the deck editor correct. It works well, but keep running into difficulties when trying to change values. Like making a card become greyed out when i add it to the deck.
Show what a card and deck are in your system.
Not sure what part of the code to show you, sorry. Found that discord though and hopefully its still active
This is where I call for all the information in my data table, its currently in a function library
Hi, I need help with some blueprint widgets for contoller support. I have some working menus but I keep getting a "not a UClass node" message my code is below
I also fixed the array having an empty pin and it still doesnt work
is there a way to trigger these two commands via console command or pyhton?
trying to implement these two as functions in an utility widget blueprint
Do you save copies of those structs to be the representation of the card instances?
there's a function to directly start pie in utility widget i think
Where would be a good place to save those copies?
Depends, probably PlayerState for the cards an individual player has
you'd have an array that represents the hand, array that represents the deck, discard, etc
any ordered container of cards
is there anybody who can help me with this please
Yeah, havent gotten to any of that yet. I apologize if Im doing a terrible job at explaining things. Would you be able to voice chat later when youre off work? It would mean a great deal to me.
Just make an array of this type
don't even start with array, start with 1 card
make it to where the player can hold 1 card and modify it
You could use a is valid node, it would help not throw that error, but not sure if that would help the overall code
Ive been trying that, i have trouble figuring what place for the code. Let me mess around with it and see what I can do. Can you message me later when youre off work?
thx! this one triggers "play selected viewport"
found a workaround to trigger alt + p via python which starts vr preview when the mode is selected. so at least then this one is active, both modes can be triggered...
I'd do these things in order:
- Get a bit of code together to pull card structs from the data table and put them into an array (deck, hand) or just 1 card variable on PlayerState or Pawn or PlayerController.
- Get another bit of code together to actually visualize this card data. Whether it's UMG widgets or what, doesn't matter. Just get it to show the card data.
- Get another bit of code together to modify the data and update the visualization.
I'd literally start with:
Begin Play -> pull some random row from data table -> save to a variable -> print string all the stats
You need to understand that you basically have 3 layers of data here:
- The datatable. This is where the BASE cards are defined. This is where you say what cards exist in your project.
- The runtime data instances. Hands, decks, piles, HeldCard, etc.
- the visualization of 2
This is my editor with the library cards that show the individual stats
How did you get that far but you don't know where the deck or anything of the like is stored?
Is that your code or that plugin?
I created this on a new project by using that plugin as a guide. Still trying to figure out how everything works
I tweeked a few things to fit my needs
All the info is stored in the data tables, I havent gotten to editing it yet, which will be a big deal
Did it inside the library card widget and got it to work. But i will need that same block of code to work within other widgets or bps. Where should i put that code so I can access it anywhere?
Make the widgets able to display a passed in struct. You'd only have to do it once, at your card widget.
card widget shouldn't touch data table at all. Data table is just there to provide a starting point for the struct instances that represent individual instanced cards.
Display a passed in struct?
Im going around in circles getting nowhere just like the last few days, its so frustrating.
If this is the case then you're most likely biting off more than you can chew. It would be best to put your current project on hold and learn some of the fundamentals first.
It's like you're trying to build a car engine but you don't know what a manifold is.
Take a step back and learn to walk before you try to run. Your journey should become less frustrating.
Thats why instead of trying to edit the CCG Toolkit, I just created a new project and building it piece by piece. For some reason I just cant understand this concept. I know Im making it harder than it is, but dont know what to do. I appreciate the help I am getting, but im a hands on person, have to be shown things, not just told.
Show how your current widget gets all the data it uses to display stuff (image, text, numbers, etc)
Show where the text "Double Bite" gets on that card widget
This right here. Make the widget use a variable of that type instead of getting data from the data table.
So when you create a card widget, instead of giving it the card name and set, you give it the struct. Then it doesn't care how the struct got there. The thing upstream can call GetCardData if it wants.
When building systems you tend to need to combine multiple different concepts using a variety of different methods. If you don't know much about the methods or concepts you won't get far.
In terms of your initial question, I'd most likely use data assets for the static card data and then have a custom uobject for the runtime data (one of which would be for the data asset for the card type). Widgets can be assigned the custom uobject and access both its runtime data and the data assets for its static data.
To make something reasonable you'll need to understand hierarchy, custom uobjects, making manager classes and event dispatchers. That's on top of needing to know about the different other types of classes such as game mode, game state, pawn/character and controller classes and that's only scratching the surface.
Having smaller learning type projects can be very beneficial.
Interaction systems can be a great one to start with as they can cover a lot of different aspects. Follow 5 different tutorials for making an interaction system then try to make one yourself from scratch.
Other people might have other suggestions for little projects but it's the best way to not burn yourself out at the learning stage.
Like this?
show that structure
the contents of struct all cards
Because the sniff test isn't making it seem like that structure represents ONE card
This?
What does Deck Contents mean?
The way im trying to build a deck is by having a deck leader(avatar) can only be one, a number of creatures which will be on the field immediately based on the leaders power, then the actual deck contents which will contain the other cards.
Do you have any where that stores the data for each card currently in the deck?
That's a property of the deck not of an individual card.
Trim the struct to represent JUST the data that represents a single card.
btw if you're not using source control, use it. BP structs are known to go kaput.
A deck contains cards
the card data shouldn't care about the deck at all
now, a deck can modify the cards within it, that should be reflected in their data
if Poseidon makes Charon stronger, then the strength number for Charon should be increased for that instance. But the struct used to display a single card shouldn't link back to anything to do with the deck
Basics involve shared values of all cards; the other structs involve only values restricted to them
I gotta step away, Im so frustrated and discouraged, maybe I need to redo the code from scratch, i just dont know. Im going through the code and it makes sense to me, but i get lost if i want to change something in the struct during gameplay
Here's a few screenshots that might help if you decide to redo some stuff. This is a quick data asset / uobject setup.
A card is defined in a data asset, then there's a custom uobject for runtime data. (Things like current health of the card or any effects currently applied)
There's then another uobject for the deck. This keeps track of the cards currently assigned to it. At runtime, this list can be used to create the runtime card version.
The advantage of this over structs is its much easier to work with. There's of course lots more to add such as event dispatchers for when cards are added and removed from the deck. These can be useful for the widgets/UI so they can update when the data changes.
Note: All these functions are in a deck class.
I wish I could say this is the worst blueprint crime I've ever committed, but I've done so much worse (and don't intend to leave this as is, was just curious if it would work)
i should not be allowed near blueprint
Most of this is fine. It's fairly clean over all, but you have an obsessive overuse of reroutes that could be simplified into just copying the pure nodes you're pulling. Your reroutes don't save you anything and just complicate the visual look.
the layout itself (and reroutes) are done by a plugin, i'm more commenting on the absurd amount of logic in there that really shouldn't be in there. lots of math.
. . . are you aware that you can not only make functions, but whole sub-graphs?
No comments with that many blueprints should be a crime
this is why i should not be allowed near blueprints, lol
and this is the subgraph, haha
it's just my pet feature creep project that has never had a refactor. in the process of converting the complex parts to C++ and then i'll clean up the blueprint.
what kind of component should I add to an actor if I just want to use a number to compare weights of objects on the fly without having to enable physics all the time
do you have to actually physics on to use the mass field?
what is the best way of spawning the main menu widget from. As main menu is the feature and player is also the feature, i don't want it to referenced by player. I can do the later logic with interfaces, but spawning it the right way is going around my head for now.
yes for the thirdpersoncharacter it's creating issues
What in the actual heck is your username.
How did you even do that.
That is the progress bar of how much my game is completed
that is a secrete
Ascii art prob
Use the HUD class or Player Controller.
That is still a dependency.
Something has to know about your UI to get it going. Nothing wrong with using HUD or PlayerController. What is the concern you have with something knowing about your UI?
there is no concern, other then i want the feature to also use in any other project i want,
i goooogled too much, currently looking into subsystems may be that will help as i think.
Hi. Has anyone here used Instanced Structs before?
Unfortunately yes.
Then, use a component on the hud, or player?
You can just copy/ paste, or just remove/ add the component as a seperate "system"
(Thats what I personally do for my more feature based mechanics)
Is there a way to tell if an instanced struct has a certain value in it? Some of my item payloads have Durability, some don't. How do I read it without having to cast to every single struct type?
If I were using UObjects I could just use an Interface for this
You can't. This isn't instanced struct territory so much either as much as a map or array of Tag/Value
Got it thank you for quick answer
To be clear. I think you can slice the struct to a parent type? But this doesn't sound like your case.
A subsystem is no different than any other class in that situation. something has to know about your UI and launch it and a subsystem doesn't really fix this problem as you would still need to have something tell that subsystem to load up a specific UI, and therefore, something has to know about the UI anyway.
The HUD class is usually a good choice because it goes along with UI stuff, is created for each local player controller only, and can be subclassed easily through blueprints if needed. You can very easily have separate HUD classes that are designed for when you've first started the game up before the player is dropped into the gameplay, or when they're actually in-game playing -- something that your subsystem wouldn't be able to do without something else telling it what to do.
The only thing that really changes with using a subsystem is how you may communicate to the UI, in which case, you actually shouldn't be directly communicating to UI - UI should be independent of gameplay systems and instead listen for event dispatcher signals to make it more plug and play. Opening a main menu while in game should be an event dispatcher. The HUD class can bind to that event dispatcher and when triggered toggle the visibility of the menu UI and manage player input.
Actually now I'm curious if instanced struct's getter allows slicing. 🤔 Test for later.
I don't think I can do struct inheritance since I'm Blueprint only, forgot to mention
Not being able to replicate UObjects in bp really forces me for a workaround
Oof, yeah nope. If possible I'd try to reconsider into a map or array that you can look up the value by tag. Then it doesn't matter if you have 3 or 9123 attributes.
Ahh i got it more then i thought, but can we access HUD in any blueprint like subsystems without casting
You can, but getting HUD in random classes may not work how one expects, especially in multiplayer. If your target is only single player, then it doesn't matter, it'll always get the local singular HUD.
Thanks, it is only single player
i haven't found a way, and i don't think it's possible, but is there a way to genericize structs with the same data types? this would be an order of magnitude cleaner if i could just...have a struct input into the macro, and then do the same logic with the struct in question within the macro
Same thing as the above conversation with instanced structs. You need an array or map of Tag/Value for your attributes. Then your mods can just be a FAttributeMod that has a Tag/Additive/Multiplicative.
Then your logic there becomes condensing those into a single entry by iterating them and comparing Tags. Which leaves you with a simple list of Mods to apply to your attributes, where your Tag is already the attribute tag to affect.
oh that makes perfect sense and is so obvious in retrospect. thanks very much
Whats the issue with casting? If its the memory overhead its not because of the cast but because of the hard reference to the blueprint asset.
So simply having a reference to blueprint class already cause depdency.
Your solution is to create a native class. Then you can cast to or have a hard ref to the class without the memory overhead.
when i said that casting is overhead for me in case of performance, but i don't like casting design pattern.
I did with subsystem, and it is too powerful now, the widget classes are only referenced by level blueprint. And any where i need them, i can get from the subsystem.
Widgets referenced by the level BP? I think this is an odd choice personally. Very few people use the level BP and wouldn't associate it with UI which could cause a lot of confusion when working as part of a team.
As an FYI, performance wise, casting is marginally better than using an interface. Each interface call has a tiny overhead.
If you're worried about memory footprint (size map) you should look at composition, hierarchy and soft references.
Having a user widget soft class ref that you can load and then use the loaded class (cast to user widget) to create the widget before storing it in a user widget variable keeps everything at the base class level. Having the soft class ref also allows you to change the widget that gets created without creating a hard ref to a specific widget class. You can even lean into hierarchy or use interfaces if needed.
Going back to your initial comment, if you want self contained logic for creating a main menu widget, create an actor component that handles it. It can then be placed on the player controller and have properties for defining the menu widget to create. It can also then act as an access point for things outside the system should it be needed.
Pattym still fighting the good fight against the Anti-Casters! 🥳
I gave up. I just quietly leave the room these days.
why would you attempt to crusade against them
never interfere with a self destroying enemy
i am against casting based on the project structure that they depend on one another asset, due to which if one thing is renamed all blueprints that use cast node for that rename blueprint will need to resaved, or may be recompiled, due to which the source control history is filled with unnecessary things.
But my solution is this.
The C++ UISubsystem only have the three variables and one fucntion.
But you are right about the level blueprint, i also hate it, the good solution will be to call that in GameMode, PlayerController or just actor with having this function.
IMO your issue isn't even casting or whatever here. Your issue is that you need other things to care about these menus.
Yea its odd, plus you'd normally have a dedicate game mode, pawn, controller and level for main menu's anyway so I'm not sure what the issue would be if something within that scope referenced a menu widget anyway.
Someone did that in our project a while back with some widget visibilities being affected from some gameplay stuff. My first time finding that hard reference to the widget was...
Event dispatchers for the win. Also being able to pass a uobject as a payload to a widget is pretty useful. The uobject contains the data and some event dispatchers and the widget just bind to them and pulls the data.
The only thing that knows about the widget is the thing that created it in the first place. And if you really want to get fancy, you can even create the binding outside the widget when its first created.
Hi everyone,
I'm working on a rally game. I have implemented a system that collects race results (player + AI drivers) and displays them in a leaderboard widget at the end of the race.
The system is mostly working: all participants are correctly added to an array
The widget displays all 10 racers (including the player). Each racer has a recorded finish time.
The problem: The leaderboard is NOT sorted correctly from best time (lowest) to worst time (highest). The order seems inconsistent or based on insertion rather than time.
Current setup: I store results in an array (struct with Name + Time)
Time is stored as (insert your type here: float / timespan / string)
After the race ends, I populate the widget with this array
I am not sure if my sorting logic is correct (or if I am missing it entirely) Any help or suggestions would be greatly appreciated!
I just made a new container UWidget that listens to a subsystem. Designer wraps things in this container and sets tags. No code needed besides the wrapper widget and the subsystem.
Now the same callsite just adds this hidden tag to the subsystem, poof, widget hidden.
Cool. That can be nice if you want to change the visibility of multiple elements in different widgets at the same time.
Oh hell yeah, how you did that, is the code complex :
Not really. I can't give the full files, but they're only about ~400 lines of code total. Half of which are comments. 😄
UIronwardUIVisibilityWrapper : public UContentWidget
Widget with the values you see above in the VisibilityRules part. Binds a delegate on the subsystem to listen for tags changing and handles it's own visibility state based on them.
UIronwardUIVisibilityStateSubsystem : public UWorldSubsystem
Subsystem with a delegate for tags changed, a bunch of add/remove/has API functions, and a single FGameplayTagContainer for the applied tags.
I'm trying to fully follow this, but one immediate red flag is that you're not actually swapping anything. You're calling Swap on a MakeArray with one entry.
Doesn't fit in my 🧠 . as there ~200 lines of comments, it means that it is complex for you. Then i don't imagine how much will it be complex for me
Would start with this.
IMO, take what I wrote above and take it to an AI, they can lay you out an okay starting point for it.
Unfortunately, it didn't work.
Everytime you have to swap two entries, you should call the forloop again when it's complete. If you go through the whole list without having to swap the sort is completed.
how do you finish before someone else and have a worse time
Does anyone know whether SceneCaptureComponent2D can do anti-aliasing?
example of why i would need it:
ehhhh
Maybe you wanted to do it longer ?
Sometimes the road is more exiting than the goal?
add more pseudo philosophical reasons here
I don't believe so. I recall someone having done this in the material for the capture though.
Er, for the display I mean. Like capture the texture, then where you're displaying it, use a material with the AA.
It worked! Thanks for the tips!
Did you know you can make variables? And that you can have more than 1 getter for a variable?
IMO reroute nodes are a symptom. I don't have a single one, anywhere.
I'd say symptom of not knowing how to make functions and limiting yourself to the event graph.
@raw spindle Dont listen to him
Reroute nodes are awesome
What do you mean? You are not supposed to put all your code in the event graph ?
But putting all your code into one class is fine right? RIGHT?
This is the way. 🫣
On a serious note, I only tend to use the event graph it if I need to use latent nodes or require a replication based event. Keeps things tidier.
I think that are the only things you should use it for
Maybe this channel will be more on theme!
Idk how to fix this!
the sweep toggle button doesn't work either, something about being unsported by rotation!
I once worked together with this guy
He claimed to have years of experience in the engine
Bro did put all his code into one Blueprint because "its easier with the references that way"
He also never heard of a function and he became super mad at me when i told him we cant do this crap like that
Oh dear. Sounds rough. I can't even imagine having to debug something like that let alone add to it.
make the propeller a skel mesh then create a socket on it and attach the collision box to that socket
How do you even rotate it ?
Under normal circumstances the static mesh should have collisions already, if you are rotating it normally i dont see a reason why the collisions wouldnt follow
Unless you are rotating it with a animation
Im rotating it with "add local rotation" to make it spin and set relative rotation with a timeline to make it tilt!
Again, I'm not even the one putting them in. It's my blueprint formatting plugin, lol
Not even the "get actor overlap (component)" is updating when I move it!
Any idea if there is something Im missing?
Im using the "set relative rotation" and I have the propellers and collisions attached to the pods!
I cant show a pic as I had to vacate the classroom because the even class was ariving!
Out of general curiosity. Why do you need a plane's propeller's collision to spin?
I dont, Its because its a tilt prop Osprey and Im trying to make the collision detect when the plades hit the terrain!
So the collision isnt spinning, but it does move when you switch from horizontal to vertical flight
Ahh, I see, I read the original wrong. What are you rotating with the timeline? I'd assume some component. If so you'd need your colliders attached to that same component.
They are, I rotate the engine housing that has the propellers and the appropriate collisions attached!
They rotate visually but the collision doesn't rotate
Relistically though. This is kind of not a good case for colliders I think. I'd honestly do the propeller spinning with a scalar parameter driving a material instance's WPO. Probably same for the tilt maybe, not sure.
Then just do some sort of ignore self trace every few frames.
Three or four sphere traces every few frames is going to be a lot cheaper than every frame doing component update transforms.
And if you use WPO for the visuals, they're practically free. No tick costs, less component transform update costs
Well, The colider only moves when the prop tilts, the spinning is handled but just the blades themselves!
Not sure though. Would need to see logic for the rotations and probably the scene component hierarchy next time you can access it.
I see no reason why it wouldn't work, but would have to see the component layout and what component you're actually modifying the rotation of.
Yeah, I'll have another go with unreal on My PC tonight!
last time I tried I had to reinstall Linux...
Right, lets see if Unreal will shout at me for missing vulkan this time...
Whey it actually didnt this time!
its a mirical!
Here
Logic and hierarchy
This looks fine. How are you debugging that it's not moving?
Well, when i spawn in and press the "rotor tilt button" it should it the floor, visually it does, but the logic never reports the "prop smashed" print out
but does if I rotate and collide with where it would be if it wasnt rotated
its clearly overlapeed but didnt report so...
it works if I fly it manually and hit the floor while not in horizontal mode
Can you...
On the PropCol components here. Can you click them and look in their details panel and turn off HiddenInGame?
Or wait, those are meshes.
They arent hidden in game, they are meshes, yeah
Uhh... Can you put a weird material on them to visualize them to see that they're moving?
Im using the Transparent prop blur object as the collision!
happy accident! 😁
the transparent prop blur is also being used as the collision.
so I can already see it
its not spinning, but does move with the tilt system
Ah, gotcha. So you know it's moving, it's just not running overlap code.
Yeah
well, it is running the overlap code, just in the wrong place...
The overlap code still thinks its in its old position before it was tilted
Hmm. That's... really odd. That's the kind of behavior I'd expect from a WPO move. But you're actually moving the component where the collision lives...
Are you sure that the collision on this is correct? It's correcly circling that disk?
For the mesh itself I mean, inside the static mesh viewer.
Try turn off sweep
Sweep won't matter here. That's to allow hit results, which it still wouldn't do because the parent of this is sweeping, not this.
To reiterate, this is your setup
Plane
Pod
Collider
You're rotating Pod relative to Plane, and Collider is visually rotating but leaving a "ghost" collision where it initially was.
This correct?
Correct
yes, Correct!
Ok maybe yall can help me im working on a game I ha a 3d main menu and in it i have a tv playing on loop with a media player. I made a widget that has a play button. So I want when u hit that the camera zooms in to the TV and the TV will play another video how do I fo that. Most of my work is done in the widget but if there is a better way can you tell me
Put a camera on the TV actor where you want the view to be. SetViewTargetWithBlend on the TV actor. Change the video file in the media player
😅 yaaa im kinda new at this
Show collision settings for the prop collider, pod, and whatever pod is attached to, and the thing it should be detecting overlap against
also try replacing your prop with a scaled engine cube
yes, as ive said many times, the overlap detect works, but the area it triggered in doesnt change when the rotor moves
Yeah, the landskape stuff from the landscape tab
Is this plane simulating physics?
Yeah
is auto weld left to the default for all primitive components (on)?
Could be something weird with that, testing
testing without simming physics worked as it should
Ok wait, now its not working at all... wtf
Right its back, had the wrong collision setting selected!
yeah there's something really fucking weird going on here
Yeah, Idk what's causing it!
Originally its because I had a sphere that was resized but the colision stayed a sphere when I turned on the collision display, but now ive got a custom shape (a cylinder in maya streched to be the size of the propellor) to do it but its also not carrying the collision when rotating
Can you see the collision shapes when you do show collision
Yeah
And they're still or moving?
Welp, Unreal crashed :(
Yeah it has to do with the downstream children of the thing you're moving
their physics collision doesn't come with
Wdym Vulkan ran out of memory!
Ok, my PC does NOT like having the collison's showing and then doing play...
the VRam just gets all gobbled up!
I thought 6Gb would have been enough
So... I cant actually test this at the moment...
Yeah it appears that rotating a component is leaving its attached child behind with auto weld on throughout
bout to test with welding off
with welding turned off for the leaf collider it appears to at least get outta the way, bout to test overlap
it leaves the collision of its attached child It seems....
yup tested with welding turned off for the propeller mesh, appears to work
TURNING OFF AUTO WELD FIXED IT!
yes!
yeah something is fucky with welding
Kinda sucks for my project as I use welding all the time but I don't have any relative movement that doesn't use a constraint.
lemme test not teleporting
yeah doesn't appear that teleporting or not makes a difference
Odd, wonder why that happens then...
My hunch is it's somewhat related to this.
https://issues.unrealengine.com/issue/UE-231274
Something is getting lost in translation (heh) between the world and the scene
There apears to be a posible but very minor Vram leak in Unreal.... XD
That seems to move along with the component. It's like the child body in the physics scene is left behind. Turning off welding on the leaf fixes it, I haven't tested if it'd work with 1 more body in the heirarchy.
To reiterate:
A (simulating physics)
B (welded, rotate)
C (welded)
C moves visually and it's collider w.r.t. Show Collision moves, but it doesn't appear to move in the physics scene. All collisions and overlaps appear to behave as if it never moved at all relative to A
If you do:
A (simulating physics)
B (welded, rotate)
C (not welded)
All is well for this overlap use case. As far as physics is concerned, C doesn't exist. It has zero influence on the movement of A.
my Poor 1060 6Gb is craping its self XD
You should turn off new rendering features. Lumen, Nanite, VSMs, etc.
Well. Nanite should be fine.
As long as you're on software RT.
Lumen is actually disabled I think by default on lower scalability GI settings.
Kinda looks like the bit of code where the bodies in the particle get updated when you change one of their relative transforms doesn't propagate to children attached to that body.
Opinion? Curiosity.
Why might a complex game (ARK in this case).
Design there day/ night system as a map sequencer?
Is there some benefit I don't know of? Meanwhile popular stuff like UDS is just 1 actor with a ton of code in it.
Yeah if I detach then reattach it works perfect (of course don't want to do that per frame). Pretty bad bug, they should either disallow moving welded components or fix it. I'll try write a bug report up.
My first instinct is designer exposing with easy editing on the entire curve. If you have a strict system with no seasons where sun needs to shift angles, etc, and it's just a looped static day, it's probably pretty nice to work with. But as I just pointed out it's limited.
Does anyone have time to voice chat me, I need someone to visually see my code so they can help me understand what I am doing wrong
Is it possible to stop code from running in a child component? I have a few event ticks running on the parent but I don't need it for a child and don't want that code to fire
I also want to remove some components but it doesn't seem possible
Sounds like you might be designing it wrong. If a component is optional, it shouldn't be on the parent by default.
Other than that you can maybe destroy it on begin play? Never tried it though.
You can definitely disable ticking of components in child though
It's just this 1 enemy type basically, all the others are going to be 2D and the tick is essentially making a sprite face the player, I'm making a 3D mimic enemy
Then select the component in the child and in details set it to not tick
Okay
It appears I have a pretty major issue with my play controller. The player, and by extension any derived class from the master, cannot move and aim in the same direction.
Gonna need more than that to say anything about it
Hi I'm using two actors having the same struct as a variable, it is possible to change values of one struct from the other actor?
Yes, if you have the reference to the actor.
But maybe if both of them have to use the same struct, you should put the struct somewhere higher for easy access - like in the character/playercontroller, gamemode, gameinstance or in multiplayer game playerstate or gamestate
Hey that's a good news thanks! How I can tell or cast the other actor and changing values, e.g. in the viewport I can access the struct value of one actor if the variable is exposed, and I would like to set the same value to the other actor
I can do with variables but I'm trying to replace all of them with a single struct
perhaps I still need a variable
It depends what it is supposed to achieve. What are the actors and what is the purpose of this struct?
so I have this simple struct with a bool, a name and a quantity integer, with actor A selected in the viewport I need to pass the same quantity value to the actor B
with an quantity integer variable it's easy to set the value to the actor, just trying to do the same using the struct
I'm asking what it is for in game terms. Are you setting default values for drops? Shared resource between two players? Settings for an actor to determine what it is? It is hard to suggest anything if I don't know what it is for
I have some static mesh attached on the actor not visible by default and the quantity variable set if they're gonna be visible
I can solve by just using a variable, I'm asking cause I'm trying to learn how to use structs
I still have no idea what you are trying to do. So I'm just going to guess.
a) they are the same class and always share the same default value in struct - set the default value in the blueprint itself, not on the instances in level
b) they are the same class but have different values in level - you kinda have to set them on each one. But if you want to spawn a bunch of the same actors, set the value on one of them then copy paste the changed actor. Copies will have the same value unless you change them again
c) they are the same class, have different values but values are tied to something - example, you want a weight for an apple and you don't want to type it in each time. Make a data table with the struct, then on the instance you only set the row name and load the rest of the data for the item from the data table in begin play
d) they are different classes - this is the most complicated version since it depends how they relate to each other. If you want to avoid having a variable of this struct on the second class, you need to design how it is going to get it on runtime. If the struct is on the player, and the other class is an enemy for example, you can use a node called GetPlayerCharacter inside the enemy, cast to your player character and retrieve the struct. But as I said, this is a wide topic how to reference two unrelated actors and it all depends on what this is for.
Thanks for the explanation! Mine is option A 🙂
I'm pretty new with structs, just trying to get rid of unnecessary variables to make things cleaner
I guess I'm gonna use a variable for now, it won't hurt:) thanks for the help!
Becareful with bp struct. If you make changes mid way they can break easily.
Im not saying avoid struct, they r essential. But preferably declare them in cpp as bp struct is prone to break.
@livid flare
It's true thanks, still valuating if is worth using it for just a couple of variables
they are kinda unavoidable. There are a many data types that should be packed into one.
beside no downside of making a struct.
just don't do bp struct unless you are not going to modify the struct.
I'm gonna try with and without struct, if Its working fine without using it perhaps I can just use a couple of variables instead
thanks for the insight!
personally I don't see any project not utilizing struct.
they are all over the place.
perhaps at some point when the project get bigger we are, in a sense, forced to use it
not sure if I need it in my case I only have a boolean, a name string and a static mesh as options
If its for default values and you are going to use it in many other places use data assets they load once
data asset is for static data.
struct is useful when you need to pack data into one entity.
I mentioned default values yes
Actually wrong terminology config values I guess is best
Thanks I'm gonna check that!
I come to you with the age old question - where to put important stuff?
I'm making a listen-server coop game. I have Tavern component containing all the crucial data that is needed by many other actors in the game. I placed it on the GameState, and the component is replicated, with most of the data being replicated.
But I don't think the gamestate has a guarantee to be ready as some other thing could, like GI. And GI is not replicated, GM exists only on the server.
Is there really no optimal place for something that has to always exist? And I really need to programm every access of the tavern component with the fallback in case it is not ready yet? It keeps bothering me, like a thorn in my side.
Ready by when? GameState will always exist on any machine before BeginPlay is ran for instance. But need more context on the expectation.
The earliest would be BeginPlay of various other actors placed in the level or spawned
And I know it will exist but I have no guarantee if the component will be done initializing, right?
Depends on when you're doing the initializing. Is that in the component's Beginplay?
My initial assumption is a delegate on the component. It'll be valid to bind by beginplay anywhere else. And when the component is ready it can broadcast that.
So anything needing it can either check or bind and wait for it to be ready.
The Tavern component is mostly for replication, begin play (or more like OnRep) will have local calculations that can be derived from the replicated data.
Yeaaah, I know, this is what I wanted to avoid if possible
Yeah, hard to avoid that in networking without some other form of a wait pipeline.
Maybe I'll figure out a C++ check for this that passes a function for a binding to minimize having to bind it every time
Stuff like....
I think it was Russel's messaging subsystem? Might interest you.
If I recall correctly it was his. It had the ability to basically register and get the current state of the broadcast from anywhere without caring about the source. So your other things could just... listen, and do. It's run either at listen or when they're ready and it's ran later.
Hmmm I'll take a look. Is this a plugin?
Yeah, it's from Ramius.
https://github.com/MagForceSeven/Starfire/tree/main/StarfireMessenger
The Statefulness: part under the details was the part I was remembering.
Oh nice. I found the Lyra one and was already worried about the decoupled tag and structure.
hello guys, I have made a very simple pong game with blueprints, the ball is a rigid body, I wanna know how to add force from my paddle to the ball to sort of launch the ball at the start? I dont really know how to approach this
addforce?
add impulse or just set velocity
don't use add force for transient stuff like this.
Yeah, I was excited to see an Epic message plugin but then was very disappointed in the results.
Let me know if you have any questions, happy to answer them.
The main limitation is that you have to be compiling. No prebuilt stuff for pure-blueprint projects (though some of the blueprint support is perfunctory really)
i already use impulse at the ball itself, so whenever it hits a surface it adds a bounce, however what i wanna do is sort of like a ray, where there is a force applied at the front of my paddle
Is this meant to be like a paddle HIT, or more like the paddle is a leaf blower, smoothly pushing the ball away over time?
more like a leaf blower, but at once, where i can press and add a force at the front, mostly to change trajectory of the ball mid air as well
my CDT will not save in a blueprint component and its messing everything up, any idea how to fix?
Blueprint Runtime Error: "Failed to resolve the table input. Be sure the DataTable is valid.". Node: Get Data Table Row Graph: GetCombinedItemData Function: Get Combined Item Data Blueprint: BP_Item_Base
I also keep getting this error message
It was working just fine the other day but one day when i logged into my project it suddenly stopped working
beta
huh
Can you show the code with this GetDataTableRow?
Looks fine, as long as you can confirm that the table in that struct is always valid.
how should i do that
I'm slowly moving my stuff to C++ anyway so it's fine. I'll just have to look up how to add this to the engine. So far I've only used the official plugins
Well i think part of the problem is that anytime i set the data table to the CDT and then leave and re enter the project it gets rid of it
Can utility function modify actors which can be saved?
.
is there a simple way for letting unreal display a different camera on the screen compared to whats on the VR headset?
So the Player could be in the cockpit but the onlookers see from a different perspective?
Do you have that DataTableRowHandle limited to a specific struct type?
What do you mean?
Like actor only?
Bark up that tree
oh... apparently is not compatible with quest...
Grrrr
is that just the website missing it or does it actually not work?
I'll assume that's a no. Can you test something random for me? Can you put a SoftObjectPtr type to datatable on that same place where the RowHandle is, on that component class. And set that to the composite table, and then do the same steps that causes the RowHandle to reset?
Also, does this let me cover the entier spectator screen with the alternative camera?
I can not right now, but ill try tomorrow
If the soft ref stays, I think I understand what the issue is, which is unfortunate because I'm not entirely sure of a fix. I'm semi sure RowHandle might have some deserialization checks to make sure the row exists, and if it does, it could be an issue with composites not having their inner tables set up correctly at the time that the component loads it and deserializes it into the row handle.
Not finding code for that though, so. 🤷♂️
is there a way to trim all unused/deadend nodes in a blueprint graph?
I think what you want is to use hide unused pins in details panel upon clicking a nkde
naa what i mean is things like this
i just want to remove all of those
Oh, idk then
Hey guys! I’m trying not to spawn certain buttons in my map to my grid, but it’s always spawning..
Sequence in front of the BP.
I tried swapping where I run the for loop for my map but only the last index seems to be picked up, confused why it’s not fully iterating through
print screen or snipping tool
Tip: Use an Int Vector 2 for the to remove map instead of holding two numbers in a string
Okay, this comparison to ToRemove is wrong there. You are comparing every loop iteration against every to remove. Which means you will always spawn everything, since if the current loop (1,1) is in ToRemove, the next one (1,2) is not, so it will spawn the (1,2) block anyway.
Istead you should do a loop with break.
Enter the toremove loop. Check if the indexes match.
If true (index is in to remove), break the ToRemove loop.
Connect creating the buttons to the Completed pin on ToRemove loop - which means it will spawn the button only after it was not found in the ToRemove loop
Also the ToRemove loop migt be unnecessary, since you can check if the map contains a given value, instead of looping through it
To expand on this, windows key + shift + S key
Thank you & just to clarify, I’m changing the integer for loops I have in my picture to for each loops? Not the ToRemove loop I have right?
Will send my next photos as ss’s!
I’m trying to do what you’re saying but I feel I’m totally off. 😅
im like 99 percent sure i remember seeing an option for that. its under some menu at the top left of your blueprint (file, etc) i think its under tools? i think the tool is literally called “hide unused pins”
i forgot where specifically unfortunately
as said above, that's not what i'm asking
i want to get rid of any nodes that aren't being used, like this
basically "remove dead code"
apologize, i skimmed over the conversation
ya i dont think thats possible (to my knowledge anyway)
what did google say?
sounds like there's maybe some blueprint api function for it, but nothing in the editor itself directly
was hoping there was just a button to do it
i assume you have reasons for keeping it in your graph, but ideally you would just delete unused things
you could also just establish some colour to highlight unused nodes in a comment box
i know thats not the best but idk what else you would do
Something like this probably.
Btw, you can change the default behavior of the print screen button to open the snipping tool instead. Very convenient
Hey there. I have a weapon class (derived from the Actor class) that contains two components: a skeleton mesh and a collision box. The hierarchy is such that the skeleton mesh is a child of the collision box. Now: I’ve disabled collision entirely for the skeleton mesh. and I’ve disabled physics for the box (all of this is done via checkboxes in the settings). This was all implemented so that I can drop the weapon from my hands and pick it up from the ground if I’m holding something else. In the Blueprint, for the first and second weapons (the ones I carry with me) I set the logic at the start of the game to disable simulation and set non-physical collision, and when I start the game, the assault rifle that spawns in my hands is somehow on the floor and oversized. After debugging, I didn’t find anything that could be causing the problem (I’m talking about debugging in the print statements)
Show the code.
hey there guys, after conducting research on this i finally come here to ask if someone knows a way to save out the post processing values into a sepperate ini or json file or somthing alike?
i work in BPs and for this case in Editor BPs specifically. i do not know C++ sadly
I don't believe there's any way in BP only unless you find a plugin that does it.
Any logic on the weapon BP? I can't see anything in what you've shown.
There is no logic to the weapons other than adding attachments (sights, silencers, etc.); the attachments don't cause any collisions at all
hm ok, i do know a bit of python, do you think that could be a possible way to approach this?
In this video, when the game starts, the weapon ends up on the floor without attaching to the character's hands and doesn't follow the character
In this video, when the game starts, the weapon ends up on the floor without attaching to the character's hands and doesn't follow the character
https://gyazo.com/9507fbde5194afba55d57f2388f7511b - Here's what happens when you press buttons 1 and 2 to switch weapons
so the order will be like this
save all values -> json -> string -> file
if you don't do c++, u need to have a plugin to export string to file..
otherwise, u just can saved it using "Create Save Game Object" (which is binary) and not to export it to a file
the idea is to save it as a separate file for reusing it across multiple projects
i will have a look on how to do that, thank you
any tipp on how to get started on the research on this?
Which part are you confused about?
Is it how you save the properties to JSON, or convert JSON to a string, or write the string to a file?
or all of it?
i am just getting started on figuring json out, i am currently mostly doing research on how to approach this "problem". so for now i do not know a lot about saving the properties to jsn, or converting it. i should know how to write it to a file tho
I have a weapon class (derived from the Actor class) that contains two components: a skeleton mesh and a collision box. The hierarchy is such that the skeleton mesh is a child of the collision box. Now: I’ve disabled collision entirely for the skeleton mesh. and I’ve disabled physics for the box (all of this is done via checkboxes in the settings). This was all implemented so that I can drop the weapon from my hands and pick it up from the ground if I’m holding something else. In the Blueprint, for the first and second weapons (the ones I carry with me) I set the logic at the start of the game to disable simulation and set non-physical collision, and when I start the game, the assault rifle that spawns in my hands is somehow on the floor and oversized. After debugging, I didn’t find anything that could be causing the problem (I’m talking about debugging in the print statements)
HELP
To save to JSON, you just need to create a function that retrieves all the properties from the post process one by one, using the post process object reference as the input, and Set field nodes) then convert it to string using ConvertStructToJsonString() -> export to file
For reading from JSON back into the post process, also create a function—take the JSON as input, and output the values to the post process.
so Set Field nodes for writing, and Get Field nodes for reading
here is one of the plugin for you to convert string to file https://www.fab.com/listings/da84974f-1518-40e9-bc98-9442e88ee53f if you don't do c++
NEW 5.3 UPDATENew Windows explorer functions added:Can now open the native Windows dialog windows for opening and saving files and a new blueprint library to makes things easier.The previous functions are still there but it is recommended to use the new ones for simplicity.This plugin allows the user to open and save text files (to any extention...
Show the code, actor hierarchy and possibly the edited properties of the box/gun
oh wow, thanks a ton, i will check it out!
would you be ok with me pinging you in case i have a question?
https://gyazo.com/f6c2a5973a83582358ce8fbdfacd28b2 - Part 1 ( start game spawn weapone)
No Worries 👍
Yeah sure, hopefully I don't miss, If I’m not online, you can just ask here again— a lot of experienced people around 👊
Part 2 (spawn weapone function) - https://gyazo.com/5610db9dcd064a4745ec3a961beb9cb7
Part 3 (weapone hierarhy component and collision setting)- (https://gyazo.com/4ba07a42b5eb9d9115deaebba53735f9)
😭
The first thing I would check is the socket names and if it is possible to attach something simpler to them. I think there is a silent failure when attaching to a socket that doesn't exist.
socket names, are u sure that it exists?, debug it using print string
It works fine without a collision (it attaches to your hands). But with a collision, it attaches to the floor. However, I need to drop the weapon and pick it up
where do you setup the collision? is it on the class or at the skeletalmesh/static mesh
ideally you should set it up at the skeletal mesh/static mesh
It is configured on the grid; in the video, you can see the selected component and the collision settings
Collision detection is completely disabled on the skeleton mesh component
With this amount of information, it’s quite hard to pinpoint the exact issue without being able to debug it directly. However, I can already smell where the problem likely is (pay attention to the bold parts)
You should debug the code using UE_LOG or Print String nodes. Check the component hierarchy carefully. Make sure to compare the hierarchy setup between your weapon and character classes. Also verify whether you're using absolute or relative transforms, and confirm that the socket actually exists by checking PrimaryWeapon->GunData.BoneSocketName.
Ensure no other class or blueprint is overriding the weapon’s transform.
Since you mentioned that the weapon attaches correctly when collision is disabled, the issue is most likely related to the collision setup you changed recently. Check for conflicting collision channels and try to identify which objects are causing the conflict.
Also, are you simulating physics on the weapon? Because your collision is currently set to a Physics Body type.
If you're using Simulate Physics for dropped weapons, make sure the Skeletal Mesh (or Static Mesh) is set as the root component, and the box/sphere collision is a child of the mesh — do not use the Default Scene Root as the parent/root component
working fine here (if you setup the hierarchy incorrectly but simulate physics = off)
and if you set up the hierarchy incorrectly for your weapon, enabling Simulate Physics will cause it to reset to the world position (0, 0, 0)
so for your weapon hierarchy make it like this.. place the skeletal mesh on the root scene, and the collision as a child
@summer linden hope it helps 🙏
Did this, unfortunately my full grid populated. Seems like “contains” function doesn’t fire at all, tested with print strings 😅
What do you mean contains doesn't fire. Also this function depends on the data you have in the map. Using a string to represent two numbers is very iffy to begin with
Okay, I confused maps with arrays, I always forget their contains is for keys, not content. SO you need to use Values and then Contains on the array
does bp compile times increase when you cast to its C++ parent from other classes?
ok
The socket to which the weapon is attached exists (I verified this through debugging). No other class overrides the weapon's transformation. No, I'm modeling the physics using the collision box component.
The default scene root component cannot be deleted
(reposting from #ue5-general)
hey all, having some problems with the interactive world plugin. im on 5.5.4, and the demo level works fine, but the second I try replicate 1:1 what the demo level is doing, the render target for the snow will permanently go to sleep and wont capture my footsteps!
The dev is chinese and apparently not easy to reach and wondering if someone with some experience in using it knows what can be causing this? Thank you :)
Easily create interactive snow, mud, water and foliage area in large world. Playable DemoDocumentationGoogle drive:Documentation (English)Documentation (Chinese简体中文)腾讯文档Tencent Docs(For those who can't open Google)DocumentationGitHub Source CodeIf you want to get update immediately, you can get update as soon as we develop.If yo...
Oh my gosh!!! Thank you SO much. It was the map array contains I was missing. It works!!! 🙇♀️
Are there any signifcant differences between a composite data table and a regular data table beside the fact that composite data tables hold data tables?
Because my code has some sort of error that is straight up baffling me
The mythos surrounding casts is at times amusing.
References to native code within BP don’t really have much overhead at all, even if you cast
So it's only casting to bp classes which increases compile times?
I'm not talking about runtime overhead
No, casting doesn't affect compile times. However, when you compile it will update all instances of that class you have in an open level. This can make compile times seem longer where its actually the time to update those instances.
For Actor based BP's this can be particularly noticable if you have logic on the construction script.
but then why does the player class in so many projects see to have so much longer compile times
its not like the world has any players in it
the only thing I can think of would be the casts to the player
from various other classes
I never noticed it tbh. But the Character class is a pretty heavy class
in some projects ive seen the compile time be like 5s or something
There is also how much logic is in the class. I personally haven't seen any issues with compile times for any classes unless they use some heavy construction script logic.
no construction script logic
im talking about pretty big projects, you won't notice these things in smaller ones
How much logic is in it?
I mean, are you trying to solve some problem here or what? Because in general yes, bigger projects = bigger classes = longer compile times
im asking if its casting to the BP which is causing longer times or is it the same with the c++ cast as well
a lot, and theres probrbaly like hundreds of Bps referenceing the character
It'll most likely be the references to the character class. I believe when you compile a class it does a soft compile on every class that uses it to account for any possible changes that could effect it.
It wouldn't need to recompile them after the character BP changes that is for sure
But more references moved to C++ means the C++ compilation would be bigger. But it all depends on how well you structure your code and what you change. If you have a lot of references in C++ to the character header, and you change the cpp file - it would be short. But if you change the Character header file, all of the classes using this header will need to be recompiled too
You're more likely to get better results by looking at your logic that requires a specific references to the player character.
I rarely need to reference a player character specific class because most of my logic is split up into different actor component. This way I can just get these components without needing to cast to the thing that has it.
im talking about casts to C++ in blueprint
also yea the best case would be using an interface to fix basically most of the issues
but it will take too long to change that
and components
Interface is not a "best" option, especially in a case like this
Interfaces aren't you're solution.
Because if you change anything about the iterface, suddenly you have 100+ broken BPs
An important question to ask is why do you have some many things needing to reference the player character class specifically anyway?
yea exactly why im not doing it
it will just take too long
honeslty im not even sure, this project was worked on by tons of guys before me
You'd be surprised by how much refactoring you can get done in a day. 🤣
Be the guy that puts it right instead of slapping another band aid on it. 😉
well I did ask that but I was told no
That's why I don't normally ask. 😅
There was one project I worked on and changed half of what had already been done. I couldn't work under those conditions. The stuff worked but it was work around on a work around type of stuff.
It made adding new stuff much easier after I finished.
I agree
well anyways, so changing the casts to bp char to its C++ parent would help right?
Hi folks. I'm just getting started with working with blueprints (coming from a long programming career) and I keep getting lost trying to figure out variable lifetimes and where interfaces are implemented. do you have any tips for enhancing workflow/discoverability especially when using plugins?
Sort of. You have to remember that if there's things they are accessing on the BP character, you might not be able to change it anyway unless the properties/functions are on the C++ class.
Yep well good thing is most of the stuff does exist already in c++
In terms of interfaces, you can add these via the class settings. Once added the functions will appear in the interface section that you can double click on to implement. However, interfaces (particularly in BP) should be used when no other option fits.
BP interfaces can't have default implementations so you'll be repeating yourself a lot. Personally, I would focus on hierarchy and composition (actor components). I rarely use interfaces myself.
Variables added to a BP retain their values for the life of the object. Local variables (created inside functions) retain their value for the duration of the function call.
I also don't really enjoy interfaces, but the plugin of choice for this project has a huge mediator interface...
Out of curiosity, what is the plugin?
RPG engine
RPG Engine V6?
yep
guys i need help, why is the pawns not moving around, i made ai controller for them and i made it their controller class they're just not moving why is this
i made the blueprints for them and put navmesh they just dont wanna move
your acceptance radius is too low, nvm looked like 5 in the video
wait lemme try make it more
still, try if it works with 100
still not working ;-; ..
maybe it's not the wrong, mixed it up with the actor event
both these images are inside the aicontroller blueprint i've made
well, guess it's time to open the visual logger and record a session, and then lookup why the move request fails
one is function and one is event graph
woah
You sure that's a good component layout here? Can FloatingPawnMovement even move on a navmesh?
wait what do u mean
the static mesh is the hull of the tank and the staticmesh1 is the turret
is it bad if its in this sequence
move the box collision up a level, make it the root
but I dont' know if floating pawn movement can even move on navmesh
okok let me try
its a pawn blueprint, do u think it should be a character which has character movement thing?
I know for sure Character can move on navmesh. I don't know if FloatingPawnMovement can, I kinda doubt it.
i will retry with a character blueprint if its the same i will let u know if that doesn't bother u :)
still not working..
is there a better way to make this thing roam around 😪 @faint pasture
First off you shouldn't have totally seperate classes for the players tank and the enemies
make 1 tank, drivable by player or enemy
oh..
for out of the box pathfinding you'll want it to be a character. You can get pathfinding to work with floating pawn movement or your own movement code but that'd be more involved.
are they even set to auto possess when placed in world ?
yes..
when placed or spawned
both
i canceled the idea from my mind tbh.. this idea is just not working me for some god knows reason
im gonna try different approach using vectors and collisions to move and change direction of the tank
what else can i do man.. its been hours trying to figure out why\ the hell its not moving xD
Add a breakpoint
wdym
and see what happens after spawn
is there a way to do this in a way that doesn't throw errors constantly if parent is null?
i would have hoped it would short circuit and not even try to get the velocity unless the select value was true
Wut
just branch here
yeah, i was hoping to avoid having to do that 🙁 oh well
How can the parent be null ?
This is in actor
yeah what is this thing
So this is a child actor????
GetParentActor only applies to CAC situations I think, yeah
seems goofy tho
What are you actually trying to do here
delete the entire bp
and redo it properly
in a component
never ever touch child actors again
they dont exist
thats the plan longer term, but that isn't the part of the code i'm refactoring right now.
i have bigger fish to fry
Jesus christ have mercy on his soul
no god can help here
WHAT THE FUCK YO
thats only a small part of it rofl
that is disgusting. Nuke the whole thing
Not joking, your future self will thank you
i'm just rewriting most of the core functionality in c++
put those into a pure function and use branch in there instead
That is not a blueprint. That is a Tron landscape lol
I'm all about bigass functions and not breaking everything up into tiny 2 liners
but if you gotta zoom out to see where a value came from that's 10000% a smell
getters exist
absolutely
this was more a "cool little side project that will surely never grow into something big"
and i just kept addin'
Undertale style
a full multiplayer space sim with modeled orbits and physics based movement
Btw, no, there is no short circuit behavior in blueprints. Even with AND nodes all of the inpuits can be evaluated even when the "first" is false
even the netcode is custom written in blueprint rofl
That's fine, just make it readable.
ALthough moving heavy math stuff to C++ will be much much better.
yeah, that's what i'm working on. the majority of the nightmare is shit like this
That really would'n't be that bad if the offscreen vectors and floats were just there as variables.
moving that math to C++ will get you a 100x speedup btw
math in BP is incredibly slow
bro u did all that.. can u solve my issue im going insane because of it ;-;
rather than a sign to come to me for help, this should probably be a sign for you to run away
NO WAY U NEED HELP ON THIS
i can't even make a pawn tank move around in the navmesh and u want me to help u in this nuclear reactor code
thats not what i was implying, lol. i was implying that i might not be the person to take lessons from for blueprint 😛
okkk bro ;P great bp work tho
That is everything but great ...
this project started in like 2017 and has never had a refactor
just one crept feature after another
make a bare character, on begin play call MoveToLocation to a random spot on navmesh, get that to work, then proceed.
Sounds like my project but I refactor like every 2 years
@agile drum If your tank things still look like this, they don't have a navmesh under them. One of your components on the tank removed it.
ima try that even tho im hopeless but maybe i can make it work 🤣
every 2 years ?
how long does your project run already ?
11
waitt wdym
jeez
Release when ?
Look at the tanks. Look at the green. Look at the lack of green under the tanks. A component on the tanks is removing the green. Go through your tank's colliding components and uncheck CanAffectNavigation or whatever it's named.
OHHHHHHHHH
broooooooo
this makes alot of sense why they're not moving omfg
tho i have radius 1000 but they don't work at all if something is blocking that green?
Another 11
How can you even stay 11 years on a project?
You need a clear path entirely on the navmesh from the start to finish location. And the removed navmesh removes your pawn from the navmesh, so it can't ever complete it's path anywhere.
i wish i had that discipline
in my case i just work on it when i'm feeling motivated and then abandon it for years lol
1 year in and i get really tired of my projects
Off and on, hobbyist, very very hard technical systems.
Also I didn't know shit when I started, still don't really lol.
i seee broooo, thanks so much ima try to fix this and check :D
hey guys, I'm trying to make a system where time dilation changes relative to the player's velocity. Would it be efficient to run something like this on Event Tick, or is there a more optimized way to do this?
tick it is
unless it doesn't need to update that often but tick is fine here
I haven't messed with time dilation much but if you can set a universal time dilation then overwrite it for the character that'd be very much preferable to setting it to a ton of actors individually
I love the concept, it's def. my dream game but it's big and hard
So I work on it for a few months then hit a wall and do something else for a while, rinse and repeat for a decade lol
cool! physics based networking is a bitch, as i have learned
srry I'm kinda new to blueprints, how would I go about doing this?
https://www.youtube.com/watch?v=onOq3Oi7slI here's roughly the state of my game right now
is that with voxel plugin ?
the plan at the moment is that player velocity is the only thing that affects time, but I was thinking of maybe doing a parry that has a brief time-pause like in ultrakill
In Character
Tick/Timer -> set global time dilation -> set time dilation for self
i dont know what that is, lol
What's the concept, newtonian physics racing?
Thats ready for release
or is racing just a part of it
Gotta add more slop for the kidz tho
https://www.youtube.com/watch?v=HHahmUYq2OU
This is a serious game for serious gamers, no fun here.
Have you ever played scrap mechanics ?
same vibes
Haven't but seen a lot about it. It's on my radar, as is Stormworks. I'm going for more of the Stormworks crowd, people who like things to be a bit more scientific.
originally supposed to be something more like star citizen (before i knew anything about star citizen). i focused on racing for a while to sort out flight/UI mechanics and to give a piece of complete gameplay.
What's your networking setup?
Are the ships moving via Chaos Physics?
guess it also depends what your goals are
just the regular unreal physics system, with my home baked blueprint replication lol
i bet you could refactor this and sell to car manufacturers
i'll be honest i dont even remember the difference between chaos/legacy
If you just want to earn money with it
i just started working on it again after not touching it for a year
You know there's built in physics replication, always has been.
What's the elevator pitch for how it works in your project? Are clients predictive?
physics replication wasn't really fully supported, at least the last time i worked on this
Nah I wanna make the game, money don't matter. Fun does.
It always has been, even back to the early ue4 days, just poorly documented.
that aside, it would not work with my unique setup
i cannot rely on UE replication because i'm fucking with the physics system really hard
how so?
Like from the POV of the ship physics body, what forces are being applied to it?
it's a "composite" motion system, physics only applies in the local area for immediate movements
if you move too far it takes the position/velocity and bakes that into a keplerian planetary orbit equation
ah like KSP, a bubble of physics with everything else using keplerian orbit mechanics
yeah, i guess. i've heard KSP does something similar, i haven't played it
yeah KSP does physics locally but otherwise uses patched conics
but in any case - every player is essentially near the origin of their own coordinate system (or will be once i finish networking that part of it)
if you want to know the position/velocity of something, you traverse the "orbital tree"
i actually first implemented this back when there was only 32 bit physics as a way to get around the physics system breaking down ~10km from the origin lol
Everyone is working such cool Projects in here ^^
how deep does that get, like 3 or 4 right?
or are you doing orbits at local scale
usually just local->moon->planet->sun at most
this setup right now gets player's speed relative to a "base" speed (which I set to 1000 for now) and just plugs it into time dilation.
I want to make it so that if the result of the divide is within specific ranges, it'll run different formulas before sending that value to the global time. What nodes would I use here? I tried to search for "IF, or IF ELSE" but couldnt find anything and the logic operator nodes I believe just output true or false..
Also, if you could tell by the image, if the velocity is zero, then time is frozen. the ranges are just gonna be something like this, but idk where the right nodes are
also might need to turn relative speed into an actual variable/event/whatever it is but thats secondary at the moment
the in range node 😛
is that this one? I'm an artist mainly so my knowledge of this stuff is basically zero lol
yes
how would I get this to spit out the number that went into it instead of true/false
like "If value is in this range, send the value to the further node"
Why would the node have to spit out its input again ?
just drag off the input
Value = your current value eg 100
max the max for the range eg 120
min = min for range eg 80
if its true your value is in between 80 and 120
It's pretty much identical to how you'd do it in a material.
Er, that was supposed to be divide, not modulo.
thx, didnt know about select float
now i just need to set up the whole thing lol
If you know what you want and it's not simple math just use a curve lookup.
Anything piecewise gives me the ick tho, what's the actual description of what you're after?
"The speed of time for the world is based on the speed of the character where xxxxxxxxxxxxxx"
like what the specific ranges and forulas are?
Yes but more fundamentally, what's the shape of the response you want? Could you literally draw it on a graph?
excuse the MS Paint and time being on the y-axis lmao
wait the second math part is written wrong but 7.5 is the correct range
its supposed to say 3.75/0.5 = 7.5
Are those plateaus fundamental or just there so you don't have the sudden change in steepness?
Like is the character expected to spend some time on those plateaus, like those are effectively the run and Sprint speed?
If what you want is actually that and not a smooth function just make a curve asset. You can have arbitrary keys and just plug in a number and get the result out
yeah they're basically so time doesnt feel ugly when it suddenly jumps, bc if it was a straight transition (for example at relspeed = 5) it would go from 3.75 (5x0.75) straight to ~2.5ish (5.01x0.5)
so I'll just keep the time at the start-plateau speed until the following formula reaches the current speed of time
thx for the link I'll look at it later on, my brain is mushed from messing with nodes this whole time
@maiden wadi it didn't work for some reason i think its just the model i used or its collisions or maybe i did some stupid mistake that im unable to find, i made another approach that actually worked, its unfinished i still need to add collision for it so it change direction when it hits something, rotation.. etc
using 1,-1 for directions :p
really dumb way to make ai roaming around but thats just a way to make it work lmao
finally man xD
Look into EQS
its done :)
made these and now its moving randomly in forward direction, rotating the direction its facing, if it touches anything it change the direction :D finally bruhh
So you're totally just not doing pathfinding now?
not to delete it but replace it by drag and drop your skeletal mesh to it
Please can we start an official petition to unreal to banish blueprints
I always get nervous when I see a few square roots in maths logic. I find it amusing that its (still to this day) pretty much a brute force operation. 😅
Hey there, i created a trigger box and a camera. Plan is when the thrird person character moves into the triggerbox that the sequence starts where the camera is attached to. The problem is: Character moves into the zone but, is stuck due to the delay node, but the sequence dont play. I debugged it also with print strings but i cant find the problem. Summary (Sequence works, right camera is chosen, its the correct trigger box and the blueprint is in the level blueprint of the main level)
In Scriptable tools, I'm trying to start a Click Drag behavior through a button in my Scriptable Tool, is that not possible? It works when I connect the Click Drag Behavior directly into "On Script Startup", but not like this...
It triggers the Print String message but not the actual click event.
yes.. the pathfinding way is not working at all for me idk whats going wrong at all
tried every solution u guys told me about and used ai for help too
i think u are not calling the sequence properlly
what do i need to change?
try create level sequence player instead
does it work if u use this? i also noticed u are using frames as seconds in ur delay maybe change this approach to directly be seconds but its not that important
after the disable input get the camera to actually be used "Get player controller" and connect it to "Set view target with blend node" and put ur cinematic actor if u made one, after the delay switch it back to ur player character
???? your tanks were cutting out the navmesh
the issue was they're not detecting the navmesh and just refusing to move at all, fixed the nav mesh multiple times, changed the ai controller code multiple times aswell, checked collisions, possess.. etc and still not working
So a code error?
uhh
i will try to redo it today man, ofc pathfinding is better than vector movement with collisions
just make a new blueprint
place it in the world
add stuff one by one
check when the navmesh gets cut out
okok good idea ;)
From the screenshots you've provided, have you checked that the collision box is set to not affect navigation?
i dont get it i thought the tank is moving forward ?
Atleast thats what you said a few messages earlier
Ah nvm with add movement input ...
Put nav mesh bound volume and cover all your world, use AIMoveTo() nodes for moving the Agent, Use GetNavigablePointInRadius() for finding a random patrol point
hey! this question might be niche but maybe someone have encountered this issue, but trying this workflow where I bake my procedural material in to a render target then use this render target to alter my landscape height (in editor not run-time) but running in a issue of data loss along the way, seems to me that even if you set your render targe to 16 or 32 bit the result will look quantized, I am basically doing the same as Chris Sparks describes here: https://hippowombat.tumblr.com/post/180615213251/blueprint-powered-landscape-edits-in-ue4-420
In the past couple UE4 engine releases, there’s been a bit of talk about adding additional mesh editing functionality in-editor, which we first saw manifested with additional static mesh editing capabilities, with functionality eventually (as of 4.20) extending to landscape editing via blueprint scripting.
I was curious if this had made the cut as of UE4 4.20 because I hadn’t recalled reading it in any changelogs, but sure enough, it does indeed work. I was tipped off by a post that Ryan Brucks (@shaderbits on Twitter) had made. Ryan’s showcase is much prettier than mine is, but I was still pleasantly surprised with how easy it was to iterate on terrain generation just by sampling perlin and voronoi noise....
hey i am working on common ui and i have implemented a button and when i was navigating through keyboard on buttons the buttons don't take enter input but space bar input as pressed
can someone can tell me how this thing can be changed basically how can i override this
In "Functions" of the UI, you can set an override to key down.
You can then decide how each specific keys or actions are handled
i am using commonui and onkeydown is a traditional method
@agile drum i tried this out now and it looks like this but it still not works. I also dont get where the "get player controller" shall be embedded here
Ive got a bit of a design question, ive got a spline object here that my player is following like a rail. I added 2 markers that are 'sickied' to that spline (they find the nearest point based on where those handles are)
Im trying to find the best way to A) know when my player hits that point on the spline and then B) making something happen AS they get closer to the second point
I figure I can add like a trigger or store the spline point somewhere but idk if anyone else has a more efficient method
I made a timeline curve and am trying to get it to print the Value when entering the Relative Speed in for time (ironic), but when I hit T it prints 4.0 instead of 3.0
how do I get it to print the value at this part of the timeline? I think its just printing the moment on the timeline
💀 i think its because I specifically printed the "get position on timeline", but idk which node to use to get the value at that position
ok, does this blueprint function actually exist? https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/PerformanceCapture/Core/GetAllActorswithComponent
its not popping up when i try to use it
oh... looks like it may have been added in 5.6
that seems weird that this wasn't available
I want to smoothly scale up HISM instances over time (seed → tree growth). Would calling UpdateInstanceTransform every second cause performance issues? What would be the best approach?
I built a tentative Save File system, but when I Load a File I get 'Accessed None trying to Read GetPlayerCharacter' error and a blank screen. Anyone know what's up with that? The Class seems to go from my PLayer Character blueprint to Unknown when I tell it to Open the Level from the File. Curiously, this same error doesn't happen when I Open a Level from my Level Changer Actor
Nvm: My PlayerStart was located over a pit; couldn't see bc my game's 2D. Still doesn't make much sense to me tho; I would think that if the Player Start was in the Y=1 plane while all the floors were in the Y=0 plane, the player character should exist but just be falling forever
Yes and no. Depends on a lot of factors. If it's at all possible, doing most of this through materials would be advised. You should update a HISM component as little as possible usually. But this is also based on project scale and whatnot. Small game won't flinch at this, same effect could cripple on a large one.
you don't need a timeline here
just sample a curve asset
your speed ratio or whatever goes in, time dilation comes out
get the TIME at that nearest point
Time means "how far along spline"
It's this simple
nothing equivalent for timeline component I suppose?
ok, so i upgraded to 5.7
and this function still doesn't exist
any ideas?
seems like maybe that function is only something to do with Performance Capture
why would this not just be a build in for general use? lol
it's trivial to implement it your self.
iterate through the actors and just don't add to the result if the actor doesn't have the component.
max 200k hism
yeah i just prefer to use something built in if its there, but coding it up now
just dump that few lines of node in the blueprint function library
Hey!
I've tried packaging my game as a test and I've got issues with my data tables - it seems like my usual async loading doesn't work in packaged game. What would be the suggested way of resolving that if I don't want to load my whole DT and I'd kinda like to keep using it
Those are specifically VFX and SFX soft references that are supposed to load on projectile impact - I've got plenty of variations so I though it better to load when needed instead of preloading every combination
show code
the thing with editor is that objects that already loaded will stay loaded. So it can give you illusion that your async load func works fine when it isn't.
I would just hard reference the Data table. The content of the DT can be soft references and you can pick any of the content for loading.
I'm not at my PC so I can't show it right now but it's basically getting a data table row, picking the soft ref field, async loading and on async load complete it resolves the reference and sets a variable - after setting the macro finished and goes to play it
It works in editor right after start up so as far as I know it works
DT is a hard reference, only the content (Niagara and sound) are soft refs
comeback with the code so we can see what's wrong.
Sure thing 🙂
But overall - there isn't any special way that it needs to be handled in packed builds right?
Just create DT, async load and then resolve into variable
No need to set paths to anything etc?
btw a Data Asset normally a go to for this kind of thing too. Unless you need to view content in large scale like a list, you can use Data Asset instead.
I don't remember doing that, just async load, cast to the right type on completed, profit.
tested on shipping too no prob.
I've got like 54 responses depending on hit and surface type so I kinda prefer DT for the ease of use and config
can someone help me rq with a camera issue?
Can I trigger a box overlap with set location, somehow?
so im trying to run my main menu level, and for some reason the level blueprint wont run. any idea on how to fix this?
the main menu level is the default startup map so that isnt the issue
Show code
wdym by not working? the widget isn't created? do a print string right after begin play and see if its get printed.
nope, the string didnt show
show your level, uncropped. is the level a sub-level?
Do you get any error message in the logs?
Is there any tool which describes the default logs , I am unable to understand what's wrong.
Anything which show described error that this is wrong.
Kindly Help !
no which is weird
Guys I need help
im trying to update a score text when this enemy tank dies but its giving this error
Blueprint Runtime Error: "Accessed None trying to read (real) property MyHealthRef in BP_Enemy1Tank_C". Node: UpdateScore Graph: EventGraph Function: Execute Ubergraph BP Enemy 1Tank Blueprint: BP_Enemy1Tank
its a variable
I fixed it
How do you set 'MyHealthRef'?
dwdw i fixed it, i needed to set its refrence for it
\
on begin play, had to let the enemy tank understand it first, now thats the new working one
@agile drum are you following a tutorial? Because having the tank needing to know the widget and telling the widget what to do is anti pattern and terrible design.
The Mediator Pattern:
Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!
This video goes over the mediator pattern to build a "Combat manager" to coordinate actions between multiple enemies and the player.
We will also be combining the mediator ...
Take a look at the video above. It will help a lot.
Anyone know why this cast might be failing? BP_Adventurer is a character.
casting is just a type check. on Cast failed, print string the Player character and show the value.
either your game mode is using a different pawn for your player, or your the OOP (order of operations) is faulty, meaning you are attempting to cast before your player is properly loaded in
OMG I'm an idiot. My character wasn't set in the game mode.
Thank you.
i also suggest having a shared parent between your player and enemy tanks so they can share common attributes, like heath, etc. also as @frosty heron mentioned, you should really learn about dependencies and avoid anti-patterns early on :)
this video shows lots of good practices regarding that field: https://youtu.be/i_7p8-DE15g?si=FrbIwzSWMb6GDK3i
i also see you are manually hard coding in variables for health which is pretty bad, cuz if you ever wanted to use health in say, something else that wasn’t a tank, you would have to remake your health again
this is where components come into play. this video demonstrates the usage of components: https://youtu.be/xo0sbSeWKe4?si=fXgKAEU58bnx7a98
Survey: https://forms.gle/9sTgyNA1MMA4Z1No6
This tutorial was made as part of a college project, and I’d greatly appreciate your feedback. After finishing the tutorial, click the link above for a short, anonymous survey that only takes a few minutes to complete. Thank you for your time and feedback.
The goal of this tutorial is to introduce y...
The Component Design Pattern:
Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!
This video goes over the Component Design Pattern which is used to create complex systems out of smaller, independent, reusable parts, known as components.
Downloa...
haha all good
I always think something catastrophic has failed and never remember to check the simple stuff.
happens to the best of us dw
so now im running into an issue where ill test multiplayer on 2 PIE games in the editor, and both work and i can join the lobby, but when i test it on steam, it just teleports the client back to the main menu and doesnt put them in the lobby. can anyone help? im using advanced steam sessions
My guess is the level not existing/ not cooked cuz not in the maps folder.
But, run the client game with -log, and see what the log says for info.
hmm, ill do that right now
Thats the usual issue, especially when new.
The level wasn't cooked, cuz its not in the maps folder.
So you didn't say anything about multiplayer earlier.. context is important.
level blueprint (not that you should ever use this), isn't run on client.
no i promise its not that, i just stopped running things in the level blueprint entirely
as for having your client booted back, like joe said, make sure you package the map.
im running the widgets in the playercontroller and both client and server work properly with widgets
Thats interesting, and another thing I didn't realize, cuz ARK modding has trolled me.
(ARK has various map particles, and visuals controlled in the levels graph, even replication)
How do you create your widget? share the code.
I never like the level blueprint because it's restricted to that specific level.
Other objects would be a better place without the cons.
wdym
#blueprint message
where is this code reside in?
if you are expecting multiple players on the lobby (that is, there is the host and there's a player that join) then your code here is cooked.
as Server have a copy of everyone controller, the begin play will be called every time a controller is spawned.
so if server host, it create widget.
Then a player join, it create another widget for the server since the begin play of that joining controller in the server is called.
in the end the server ends up with multiple extra widget.
To ensure that code only run on controlled controller.
Do an if check at the start.
Get Controller -> IsLocallyControlled.
This seems like the perfect thing for a game state override, or some extra blank actor.
So, you don't do this weird level name check, and have a unique actor per like "case"
string comparsion sucks.
what if you change your level name? your game breaks pretty much.
Soft reference to the world.
but not exposed in blueprint, need some c++
not rocket science though, it's just one declaration.
I wouldn't even do that personally.
(Just for the random chance of what if you have 2 levels, or something)
Just stick the unique actor, or different game state override, and done.
Or that.
Yeah.
Like 5 different ways to do this, better then string check
no need to dump that logic on some controller.
New ue5.7 gameplay camera goes through wall unlike spring arm, is there any way to easy fix it or do I need to manually make spring arm blueprint for new gameplay camera?
hmm
what exactly do you mean? i have two different widget blueprints for the lobby and main menu
is that what youre refering to?
No, the actual HUD bp/ object.
Since, you can do the world settings override of the hud.
Rather then your string map name check.
Have the hud object spawn the widgets/ "hud".
and just override per map.
ah okay, so make two different huds for each level (ie. main menu level, and lobby level) and then put each create widget blueprint in those
that's one way and much better than having a controller keeping track of world.
alright let me try that and ill get back to ya
you want separation of concern and atomic functions. If your project become larger, you know what objects are responsible for what.
i see
okay, i did what you said, let me test now and ill let you know how it goes
how would i get the cursor to show?
for the lobby hud
set mouse cursor isnt working, and neither is the set cursor widget node
Same way as you already do.
show mouse cursor bool being set to true
Then, input mode Ui only?
tried it, didnt work either