#blueprint
1 messages · Page 299 of 1
alright sorry about that, does anyone see any noobie mistakes in this logic? I want to set the angle at which the cacti are deformed, so i grab the locations of the explosion and the cactus, and interp the angle to be the one facing the explosion (then a 90 offset which seemed to work in previous iterations, then minus the random rotation i just added to the cactus)
yeah sorry this problem has been driving me up the wall for a few hours today
and blueprint certainly isnt my forte
Is this intended to lerp its rotation overtime?
not really - i really just want it to jump to it, which i figured setting an interp speed of 0 would do
this code is basically a frankenstein of different tutorials for different applications
is there a diff node you would suggest using?
Probably something like this.
Oh, if Delta doesn't work, you can try swapping it for the 'Combine' node. I always mix those two up. 😅
here's a code for my pause menu i can open it but cant seem to close it with the same input
because your input is set to UI
awesome man that worked
you got a patreon or smth i can donate to - literally saved me ripping my hair out
in the input action you also need to set it to accept input while game is paused
you can subscribe to his yt channel 😛
being a vfx student i dont get many teachers good with blueprint so ive tried learning on my own where i can
consider me his number 1 fan
if you can code you do be amazing technical artist
yeah a lot of that comes in with houdini which im just starting to pick up
just arent a lot of UE vfx artists where i live unfortunately
i'll check that out thanks
update on my Slime game💚
You sent your trusty minion into the nearby human city to gather intel. But it's summer.. keeping that slime hydrated is a serious commitment
this guy worked in epic, made amazing stuff
unfortunately didnt solve the issue
I see stuff like this and just think... 'But how?' lol. It is amazing.
IA events don't fire while in UI only input mode.
while ive still got you guys here is it ok if i ask about this? Im trying to basically say, further away cactus is, bend less, closer bend more
i'll try switching it to game and ui
Thanks man it solved the issue
i was also considering using the distance actors node but i cant have the explosion center as an actor provided as a default
Instead of the clamp float node, use the map clamped node. You can specify the min/max input range and then the output range it'll get remapped too.
ahhh crap ur right i was thinking that was the min max out
ty
lovely that works great
thanks again so much for your help
very much more helpful than my uni lecturers
Maybe I should start taking £9,000 per person per year and start doing courses haha.
good idea lol
ill try having a crack at the last problem of this whole rigmarole - getting the cactuses to keyframe their bend during a specified frame period, where closer cactuses bend first etc. ill come back here when i have problems with that (no doubt i will)
the main reason im doing the course is because half of it you get to do with Rising Sun Pictures, just the other half of vfx related courses by the uni staff have kinda sucked so far
Hey there! Another QQ! 😛
Ive got a main menu (with its own gamemode & level) -- theres then a gameslot blueprint to save load a slot and then load into the game -- my question is; how do i get the slot number from the GameMode_mainmenu to GameMode_Game what slot to load. IVe tried using a gameinstance as a middle man
Have you checked gas and mp tutorial in udemy?
Dude is racking a million dollar easily.
Looks like you don't really need GameMode_Level to do anything. If you have your main menu, each button does something and saves the variable in the game instance. For example clicking level 2, set's variable Selected Level in the game instance.
Then on Begin Play in GameMode_Game you Get Game Instance and take that variable that was set and load.
Set whatever you need in gameinstance and then read it when loading something new.
I haven't no. lol.
Thoughts on baby's first health system prototype? It does work, surprisingly lol
- LimbArray Test gets a random body part, and adds a random injury to that limb array each time it is run
- UpdateLimbStates Checks for any injury states that are not IsOk, and for each instance, subtracts the appropriate amount of blood from total blood var each second
- Each pass over that loop, it checks Total blood amount, and if zero sets player state to IsDead and prints a string showing that, if player is still alive, it prints current amount of blood instead
Maybe not readable on diff screen resolutions, my b if so
Not bad, the only thing that comes to mind after a quick skim is to instead of using the switch on enum, is to instead use a select node to specify the amount of blood that should be removed. This will reduce the 4 exec paths down to one.
Is there a reason each limb has multiple injured states?
Awesome thanks, knew there was something I was missing there
Yeah, I want to be able to support having multiple cuts, lacerations, and fractures per limb, though I will have to include some type of exclusionary logic to clear other injuries if 'Severed' is triggered
If thats the case, you might want to use to TMap instead. Have the key as the enum and then an int as the value. If it already exists, increment the value. You can then use the value as a multiplier when applying damage. Saves you having to add multiple entries and reduce the total number of potential loops when checking.
But yea, solid start. 👏
Nice, will look into reworking that and thanks for the feedback
How do I delete blueprint categories?
The variable cats?
This thing man
Have nothing in the category and it'll be removed.
Well It clearly does not work so is there a more manual solution?
Wait the categories are also on functions
Yea, functions share the same cat list.
I want to make a use item action that well, uses the item the player is holding. But I would rather not use a massive list of booleans and branches so is there another way I could do this?
Hi, I've been folowing a tutorial how to make a combat sequance and I got kinda stuck. I created notify in the Montage, but I cant add EventAnimNotify_canmove to my ABP_Manny. I also noticed I'm missing one icon in the animation Montage, that the person in the tutorial has. Any idea what am I doing wrong?
does anyone know how i could make my gui also get effected by my post process effects? currently i have a workaround of putting a widget component close to the camera but that has the drawback of not scaling with the users resolution and moving around if the camera gets camerashake applied to it.
Does anyone know why my nanite mesh flickers, it looks like there are two meshes - the nanite displaced mesh and also the base mesh is visible
Having empty cameras on npcs shouldn't matter right? They are not rendering.
What is an “empty” camera?
A camera that is attached on an npc but it's not the focus
Hi, can someone help me? I'm new to unreal. I'm trying to make blueprint for arrows like in need for speed games. I need them to change color depending on the speed of the car. I manged to do basic change, but I want to create gradual change between colors. How do I do it?
Are arrays getting resized dynamical each iteration? I created array, resized it to 5, then I iterate always on the same number 0-4 indexes (5)and each iteration it actually ads +1 to the size of the array. I either insert or remove at index and never add to it. Is this how it's supposed to be? Or I need to manually resize to back to what I need it to be every time? like with this system I could end up with array of 800 if it gets resized and resized..
Pretty sure that still comes with some cost, but you can profile and find out for sure
You can use a Timeline with 0-1 float track over a period of time, plug the float into the alpha on that Lerp node, then set the A and B values you want on the actual lerp node
Wait, do I actually have to remove before inserting, I thought inserting is swapping and not ''moving'' whole array. Damn.
hmm ok I've got it, but I don't know how to connect it. what should be connected to timeline etc. should it be speed from car?
The Update pin
And play from start when you want it to happen
You can have 2 separate timelines with diff value lerps for true and false
thanks but I just started learning it yesterday and have no idea how to do it even with your advice. I've created this monster XD
Hello guys I have an issue with my main level where a I have an actor starting an event when overlapped but that start to work only after many seconds after playing the level, In default TP level it works fine, any help?
Solved, Just needed to disable is spatially loaded
maybe you are already overlapping it
I tried removing the actors on the scene, navmeshes, checked level BP, but issue persist
Do you mean something is overlapping the actor?
Just checked things start working after 60 sec 😄
hey guys i have a question, im making a tutorial and an ingame menu with gif integrated and i would like to know what performance or vram if i can say it like this it would cost me cause the menu will be loaded and probably stay loaded i dont want to put gif in it if it cost to much performance, since those gif are animated texture in a flip book im scared of what it could cost
"premature optimization is the root of all evil" - slightly exaggerating
I wouldn't worry about it too much unless the file sizes are really staggering.
But in case you want to do it properly : you can control what is loaded and not loaded - for example:
- you could have the heavy stuff in a separate widget which you destroy after use
- you could access the gifs via soft references, so that they are not loaded up until they are really needed, and then clear out the references when done
probably still more ways, but that's a couple of angles
Hey everone, since this method will still execute the nodes after Get Equippable Data, even if it doesnt find any interface on ItemAssetRef right? So i simply check Does Object Implement Interface then get the interface node. But is this even differs from casting?!
no, since the doesobjectimplement.. branch has nothing happening in false, it will not continue
No i meant the Get Equippable Data node, lets assume we didnt use "Does Implement Interface".
Normally the node wont work if it doesnt implement already, so we dont need to check does implement interface, but if we add additional node stuff later on that node, it will still keep executing them.
Like equip Item node. If i didnt check for Does Implement Interface, it would return null for my equip item inputs
Okay this helper function seems like such an obvious thing to need that the only reason it wouldn't be included out of the box is if it's a bad idea somehow. Is it? Or does everyone end up needing this?
Sorry if i wasnt clear. Normally, we are reduntant to use "Does Implement Interface" because if we call a interface method, it does nothing already if target doesnt implement it.
Ah. Well, I would say for code flow clarity it is wise to control clearly with the check, but might depend on the situation
But for that case, i need to check Does Implement Interface, because i use that data from Get Equippable Data, even if it does nothing, it will still continue to execute the next nodes like Equip Item. But since equip item is getting values from my BPI_Equippable's Get Equippable Item Data, it will return null. So i need to extra check here Does Implement Interface, but is this even different than casting and performance /optimization stuff?
Interfaces are better than casting for a variety of reasons
- easily spread out functionality amongst different objects
- keeps things beautifully decoupled ( casting == hard reference )
Hey guys. I'm using data assets to set up varied AI enemies. I want to have dynamic animation blueprints for different enemies initialized via begin play from the data asset, but it looks like "Set Anim Instance Class" doesn't allow for specific object references and wants a generic animation blueprint class. How can I get around this?
Well... I think unreal is pretty tight on datatable accesses if i remember right, so editor will error out anytime you make typos in rownames. But that said, it might not hurt
It does exist. It's just not BP exposed.
Yes, But **ItemAssetRef **(PDA_Item) in the picture is my Data asset, and Get Equippable Item Data is inside the (PDA_EquippableItem). So i am doing it to get child data asset's method. So it will still load the children's data + itself still exist. So is this even differ than casting as ram, i want to deep into on this
Once you start accessing objects, yeah it will load it up. But the decoupling and easy spread still applies. Like
- if you have 100 different items, are you going to duplicate your Equip code 100 times? No! You want to do things smart
- decoupling is still great - sure in some cases you can't avoid hard referencing things, but often you can just say Equippable->DoSomething and it will never care what it actually was = not loading it up, not coupled
It's not redundant if you need to ensure if the target implement interface.
Silent error is bad error.
Close enough! That makes me feel better about making this actually
Oh sure, but sometimes you want to check if something's invalid and then have fallback logic instead of a hard error.
Those that think interface is better than casting, please read this.
Interface is not replacement to casting, if you have interface everywhere your project will be harder to debug.
Interface is good but not when misused
I would say the use-case in question seems like a perfect candidate for interfacing ( Equippable ) - as certainly you are likely to have hundreds if not thousands of various items that might be Equipped. Or would you take another angle on it?
The only time an interface replaces casting is when you're casting to several classes to perform different functionality for each.
You use interface when you want to communicate between classes that doesn't share the same base class.
As for equipping, I would probably use actor component
"communicate between" - rather I would say "share functionality", but yes, I believe we are on the same page here
actor components are definitely interesting, I haven't used them a whole lot yet but hope to explore that area more in the next project
thx i choosed to compress it and make it in jpg cause no transparency needed and it should be loaded unloaded its a bit much but i dont want to optimise everything and have my tutorial kill performance x)
Thank you very much for the explanation
Hello all, I want to make an http request and the url comes from command line arguments but if there are no command line arguments I want to use the default one. Here is what I have so far but I can't figure out how to do the false branch
I could duplicate all the nodes after the condition but there must be a better way
Personally, this is all about attributes and abilities to me. No need for some complex code hierarchy with an interface meshing between them when you can make everything but the abilities and visual attachments all in data. And the abilities for equipables like weapons or throwables can stay very clean and generic.
Ok, this is a good insight. Thanks!
hey wanted to know if youre able to Make Noise in player controller?
or would this be in ONLY player character
Why would your brain make noise instead of your body? Sans weird alien movies.
Hi everyone,
How do you deal with replication that has to happen every Tick from client to server so that the server can replicate to all.
For example, replicating which way the player is looking
Hi I am trying to make a simple Food Inventory that allows trading fruit, The goal is to make it generate a random value for requested fruit by the npc (Handled in AC_Inventory_Food, Child of AC_Inventory ) and populate the inventory with it, then if the player has the exact amount of fruit the Compare Fruit function will return as true. I am stuck on how to make this work, I made a less perfect version that worked fine however the goal is to make it more efficient.
-I have tried assigning the Food component (Child Of Inventory Component) to the npc Via a function but this causes it to fulfill it's own order
-Remaking the system (the inefficient way) twice, which works but is done incorrectly
So I am not sure what I am missing if more is needed in screenshots let me know, I have found myself stumped by this
controller vs controlled
ty for the reply regardless as sarcastic as it is
@frosty heron So if I understood correctly, it's like if you use a Timeline with a Vector Curve that represents where to spawn a Trace, right ?
Because Timelines are frame independent
Does anyone know how i could make my gui also get effected by my post process effects?
Currently i have a work around where i put a widget component close to the camera but that has the drawback of not scaling with the users resolution additionally it shakes around if i apply any camerashake
You cannot, not directly at least. What you can do is replace your UI with materials, which is a good idea anyhow for performance. If you do, you can do screen space post process like effects on your UI which match up with whatever is happening in your post process shaders. Also as of... I don't remember if it was 5.4 or 5.5, you can read the viewport pixels and other UI pixels inside of materials now as well. So your UI itself can act as a post process to some extent for overlay effects at least.
what do you mean by replacing the ui with materials?
Instead of placing textures in your Borders, Brushes and Buttons, put Materials in them.
People, I already have my Spline Points in a Vector Array. I also have a Float Array which contains "when the Spline point was created"
i see, but i have stuff like bloom (a custom version not the default unreal one) which i would like for it to get effected by, would that really work using just a material?
But I'm getting trouble to Spawn a Trace at the "Position" (Vector Array) at a "Time" (Float Array) frame independently
I read that Timelines are frame-independent so maybe I should use that
But I don't know how
didn't they add post process for UI in 5.5?
Little into tutorial going of the new Slate Post Buffer in 5.4 to get post processing effects in UMG and your UI
Link to the documentation:
https://dev.epicgames.com/documentation/en-us/unreal-engine/using-slate-postbuffers-in-unreal-engine?application_version=5.4
Link to the content examples project:
https://www.unrealengine.com/marketplace/e...
that's most likely a normal rotator
if you rightclick the output pin you can choose split pin
which makes it 3 separate outputs
but which one rotator? sorry I am completely new
i don't understand your question, and with that blurry screenshot one can only assume what's going on
in other words how is "normal rotator" node called ?
cause I only see break rotator
and it doesn't look like above
the one above is a variable of the type rotator
the name of the variable is on the node, but it's not readable in your screenshot
I got it like that but there is no target
you have to drag from something else and search get [variableName]
Asking this again as I did get an answer, but I didn't quite understand the specifics, sorry
Newbie here, trying to make star fox-ish rail shooter. Plan is connect player BP to spline for X axis for forward movement (currently working), add input for movement up to certain limit on Y and Z axis. Thinking I can add some nodes here between GetWorld and Set Actor to achieve that, but not quite sure how. Any help appreciated, sorry if answer is obvious
You could maybe use clamp node and clamp min X and max X so it cannot go lower/higher even if you are adding something
To set the limit of X and Y distance it can be from a reference point mesh I have running on the spline?
whatever you are doing, before you add that offset or change location of the actor on X or Y, before you plug these values (individually), clamp it first and then plug
Okay that's really helpful, thanks
My plan is Player Ship's X location defined by mesh "Reference Point" that is moving along spline
Player ship's Y and Z location will be "Reference Point" + or - what is input by controls, up to a certain limit
Just trying to figure out how to blueprint that
what is reference point and is it 2d game?
3D game, and reference point is an invisible mesh I have running on the spline at a speed, that will keep the player ship within a certain distance of the spline
- Do you know how to make variables?
- Have you got Inputs working, so you can get keystrokes and or gamepad? ( or the abstraction up/down/left/right from the input systems, rather )
yeah so if you move left and right from reference point you need to clamp it at the''edges'' so it doesn't go further,like if it's a distance in a square/rectangle, you can probably calculate distance and check if the distance < X, if it is then allow to add offset, if it's not then you don't allow to the movement,
but like take it really slow and first add moving right left top and bottom and when you got it working think about clamping it
I got inputs working for basic movement using input actions, but they don't work in reference with the spline system I'm setting up
I (think I) know how to make variables. I'm making variables for distance between player ship and "Refence point" for both x and y
Perfect, that's one of the things I'm looking to do, thanks
Start with very basic system and work up from there
Wire up the Up and Down to variable OffsetZ
Most likely you will not want to directly control the Offsets, but adjust them with velocity, but you get to that after you get the basic controls wired up
It can be very helpful to take some gridpaper and draw what you want to happen : where is the spline point, what is the constrained plane you are working with for the flight pattern
like
......................
. .
. x .
. .
......................
make sure the plan is clear in your mind : is the center point the default, what is maxY,minY, maxZ, minZ
I can understand what you're recommending, but I can't figure out the node system to make it work
the point is it's not about nodes right now but understanding small steps that are needed to achieve your effect
Yeah, I'm going to figure that out by getting the camera and the player character ship to the positions on the screen I want, then measure, etc
- Get some inputs in that blueprint, add "print string" nodes to say "yes Up is happening", and "yes Down is happening"
- Make variable OffsetZ, and mess with that number in the inputs
- hook up OffsetZ into your spline follower
We are assuming your spline following works already at this point
OffsetZ is float
use Set OffsetZ node to give it new values
I appreciate your patience with this
You might be well advised to go through some tutorial videos on blueprint basics and just mess with stuff a bit to get the hang of things
docs start from very basics : https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-basic-user-guide-in-unreal-engine
I've gone through like 8 hours of basics of blueprint tutorials already lol, frustrated that this is still failing me
you need like 10x more 😄
Well, once you get 1 variable up and the inputs hooked up, can ponder things more
If this is your first engine ever, yeah, it's a big system
Yeah
But I have heard of people getting up to speed even from scratch. Blueprints are pretty friendly
what I can recommend you just watch as many beginners videos as possible and then watch best ones again.. get to know your tools before you start doing anything
And not just watch, but follow, make, twiddle stuff
Yeah, that's pretty much what I have to do. I can only sit and learn for so long without actually making something before I go crazy lmao
keep it simple to start with, just get something moving on the screen, it will slowly grow from there : )
you are kind of trying to jump straight too deep to immediately make star fox
but it's a worthy goal, and not inconceivable : )
but starting with pong can be smart to get the basics in
Fair! I did get it moving earlier with EnhancedInputAction IA set up, aixs 3D, etc etc. The problem is I need it to follow a spline so it can move dynamically around a level while still keeping the "up down left right" movement for the player
there's going to be a lot of tricky bits in that plan - i would start by just being happy if you can get the thing to fly straight ahead and maneuver within the box. Then come back to spline
If the player ship path was just going to follow a straight line the whole level, I wouldn't need the spline
yeah, but get the simple straight line working first
I actually did get that working earlier, was very happy with that
breaking problems up into smaller pieces, doing easy things, then fitting up and growing.
Well, if you have that working, does that not use variables and clamps or what?
It does, but it won't allow it to follow a path like I want it to
Try to make the simple up and down thing, I see how you get on again later... you should have enough clues here : variables and inputs
Super rough mockup, but do we think this would be neat to have, distinctive colors like that, to quickly jump to the right section?
Or is there already some plugin who does that?
Maybe it'll help if I explain. The camera and space the player ship can move within is essentially on a roller coaster. The path of the roller coaster will turn left and right and up and down, and the camera and player ship will rotate to follow the path, with the player only being able to move on Y and Z axis in the box the whole time
The spline, a reference point moving on the spline on x axis, and player character using variables of distance from the reference point on y and z axis are the best way I can think to achieve that
Please tell me if I'm off base here
So does your aircraft moves on the spline forward already or not?
Yep
That's the nodes I posted earlier
do you have any input actions?
I have an EnhancedInputAction IA set up with working controls
literally you have to start trying things, set is as 50 and see what happens
if you see it moved, nice, now you can add it with input actions
maybe you need to get actual location and add +25 to it and then set
Okay let me try that
Again, appreciate the patience
Right, connecting input actions to those pins is what I'm struggling with
to these pins you need to plug variables, and with input actions you will modify these variables
Right, making the variables now
click input action left add+1 to variable, then get current location, add to it variable and plug to the sec actor transform
I don't know how to do that with my current EnhancedInputAction set up, sorry
time for tutorials about enhanced input mappings then
Well thanks anyway
Yeah, I'm still struggling to to find what I need to hook up to the EnhancedInput node to have it add a number to the variable
I have everything else
I think I'm there, just missing the piece between the IA and the variable
Okay, throwing the question to the room: What is the node or series of nodes I need to have my EnhancedInputAction IA add a numerical value
I'm watching multiple tutorials and not finding the answer, nor google. Any help appreciated
Don’t understand the question. You want the IA event node to “add a numerical value”?
It's possible I'm not wording it right
If you’re trying to add +1 to x drag from the x pin
And so on
Action value Y pin for your use case, from what I can see
I appreciate that, I'm just not sur what I'm supposed to connect the Triggered pin to
The next node that is not a pure function (has a white arrow pin) in your execution path
In your screenshot, the set actor transform if that’s what you’re going for
Perfect, that's what I was looking for, appreciate it
Okay that is actually beginning to work holy shit
Thank you both for your patience
@dark drum Was wondering if you had any insight (or anyone lol), on why this might not be working, following on from last night, via a trigger in sequencer i am trying to make sure the cactuses bend at the right time, with an animated bend.
Is it something to do with the timeline paused message (i was tryna figure out how to get rid of that)
Im trying to figure out this, my logs have physics but somehow it's like Schrodinger's logs, they both fall down, and they both stay up at the same time
by default these are the settings of my log
and physics is off, but i enable physics but the time the tree is cut
could be something related to do with the PCG actors
Anyone knows how can I spawn a Trace at each Spline point over time ? But frame-independent ?
Timelines are frame independent, if done right
How to set this reference after beginplay without clicking it first? I want to trigger the event after start.
But how can I call an event for each "key" inside my Timeline ?
I mean I have 3 keys (float) in my Timeline and I want so at each key (so at each different time) to call an event
go to where you're creating the widget and SET the reference there
you can try creating multiple event tracks and setting keys for them at the desired stage
But I can't create event tracks dynamically at runtime
That's my issue
nor should you probably. what is the use case ?
I have created a Spline related to my Attack Animation
I want to spawn Traces along this Spline but frame independent
But I want it to follow the rythm of the animation
I already did this but it only works if my Animations are "linear" with a constant velocity between each frames
Yes I know but why do I'm doing that ? Because I want to have a Sword Hit Detection frame independent
but if timeline doesn't work for your use case you can just do some math with world delta
I already did that but it only works with a constant velocity along Spline
Is there something you can use to find the points in spline?
Pretty sure you can, I don't have editor on me to confirm though.
You want to determine how long your swing last.
Then do some book keeping like processing the points of the current time.
I already have the Points in Spline in a Vector Array, yes
Then you probably want to determine the length of the trace, then when you start tracing keep track of the time.
You basically want to reach the end point on end time
So you mean I have to get the length of the "Spline" which represents the animation's motion ?
No that's irrelevant.
Given a point you have a start and end
Where start is 0 and end is 1
That's your alpha
Every frame when you are tracing, you check which point of the spine you should start given where you at.
OnTick -> get time -> calculate current spline position, calculate end spline position -> trace
Set processed time to current time and repeat until you exceed or reached the end.
Might be easier to draw this but I'm on my phone.
This solution is for spawning a Trace at each Spline Point but on a constant speed, right ?
But my animation is not linear, it's not at a constant speed
It's just an idea to process every points at a given time.
Ah yeah that would be more difficult
Because atm I have a code for spawning X Traces along the spline at a constant speed (which takes into account the duration of my animation)
With a spline that is
The problem with my actual method is that the traces spawn at a constant speed and my animation is not linear
Just a thought btw, is the plugin from the market place doesn't entertain you?
I can't figure out a solution
Doing this manually is very taxing imo.
Not to mention the edge cases you have to resolve.
Some people said that the plugins in the market do not work well depending of their animations.. so I'm afraid
That's why I'm trying to find my own solution
Well I personally don't believe they work for my use case either
Unfortunately you are doing something more difficult than the straight forward way.
Which is to just play an animation and record the socket locations.
I already made that. I have the socket locations in an Array
One array for the Tip of the sword, one Array for the Base
Not sure how they are recorded.
But mine will just follow along the sword precisely
Because I don't create a spline or w.e I simply record the points when the animation is simulated.
They are recorded upstream in the Editor I'm playing the animation at 0.1 rate
Then constant or not doesn't matter
As long you know which points play at what time
I made a Spline with that socket locations just to display them
The issue is that in my animation, there are some frames too far from each other
For example my socket location at frame 10 and at frame 11 are very far because in my animation the sword goes too fast
Well the way I do it is by slicing the windows (animnnotify states)
I can just write any number of slices i like.
You can slice any number between two frames ?
I'm just slicing the anim notify state
I know the start time and I know the end time.
Then it's a matter of simple division
So you can decide to spawn 10 traces between frame 10 and frame 11 ?
I know the start time and the end time of my Animation, but I don't know the time between two frames
I'm just deciding how many points need to be simulated, as for the frames, that's irrelevant and happend on run time.
They can be 1 frame or 200 frames
It won't matter
The point here is to go back to the past to trace the missed points, I simply check the time.
So sometimes you have gaps between two frames if the animations is fast at that moment
But you fill that gap with making a new trace between current frame and previous frame ?
I don't really have gaps unless I slice too low
If there are noticeable gaps just slice some more
When you say "slice" in the animnotifystate, you mean your C++ code, right ?
I mean the concept it self is not language specific
But yeah I do them all in cpp
Because I can't access the anim notify state inside an asset from bp
Yes you can ; you can open your ANS and override the "Receive Notify Tick", no?
Nah that's not what the goal for me.
Say in my montage I have anim notify states
Yes, like me ok
In cpp i get get all of the anim notify states
Reading them starting from the first
What the begin time and end time is
I can get that in BP also
Then slice , record anim and bake the information to the anim notify state.
By bp i mean from a blueprint class
Not received anim notify
That's the anim notify it self
Maybe I should made this into a plugin 🤔
Yes in my Character Blueprint I can access to the Total Duration of it
That's not what you use ?
To have the end and begin time is just math, no ?
I'm not grabbing them at run time. I am grabbing them at editor time from by melee bake actor object class.
Yes me too
I have an specific Actor to play animation at low rate and I generate the Spline points with that
Show bp?
This float variable has the total duration of my AnimNotifyState
I am not sure how to incorporate my idea with your splines
Because this seems to run at run time too, then it's not baking?
But with spline you don't really need to bake provided they have existed.
Unless you are generating the spline? I am not sure wat you end up doing on your end.
What I'm doing is that I'm creating Spline Points from my Weapon Socket (base of the sword) with a Timer when I play the animation
Then I store these Spline Points into an Array
Then at Runtime, when I play my attack animation, I create a Spline with those Points (array)
Upstream. I play the attack animation in my Editor with a 0.5 rate
And during the animation I tell the code to create the Points on the Spline each 0.01 second
Right but your points are created based on timer.
Does tuning the timer helps with creating more points?
Your points are created based on what ?
Yes it creates more points if I reduce the "Time" parameter
So all of your points are equally ?
I mean the distance between each point is the same ?
Equal in the delta between time? Yes. Distance? Nope because it's recorded based on the socket locations of the weapon.
So if the weapon stand still the points won't move much until it swing
So it's just like me. You have some points close from each other and some points far, right ?
Sure thing
And if some points are too far that the trace becomes inaccurate
Then I just slice some more
But from testing 30 slices provide more than good enough result
We r talking about an anim notify state that last for 3 to 4 frames
Ok so me if I need to slice more I can either reduce the Time in the Timer
Or I can play the animation slower
I think so, that will be the first thing I try
I think playing the animation slower makes more sense.
But you don't need to do that with your method to slice more ?
Well what I'm doing is slice by 30 times then I get an array of times of the ans right?
All I do is just, play anim at array 0 time
Record
Then play anim at array 1 time record
And so on
So you divide your ANS duration by your slice number (let's say 30)
Yup
And this gives you a float, right ?
I did not know you could have Float and Vector in the same array
You need struct
Oh struct ok no problem
But blueprint struct is atrocious
Just a heads up
Well try to play with your anim play rate, see how that go.
I gotta run. Good luck
Ok no problem thank you so much !
I just have another last question about how you trace them with your array of time, so when you come back just ping me please
Does anyone know if its possible to set smart object gameplay activity tags at runtime?
What is smart object?
It's just an easy way to have configurable behavior for objects when AI interacts with it. You can add "slots" to objects and it lets you tell other AI that the object is in use and if the slots are full wait to use it.
I figured out that it isn't possible through blueprints. I just subclassed USmartObjectDefinition and made a wrapper around SetActivityTags in C++
Interesting, never know those exist.
I just have a problem to use these "socket locations" related to my "Timestamp" array
On Tick event of course
Every frame, evaluate and process all the socket locations from the last processed time to current time
Does it paint the picture?
But what is this "last processed time" and "current time"
From my Timestamp Array I guess but do I need to use the World Delta Seconds or something like that ?
Something like that ?
Ok thank you very much
I'm sure I need to have a "While Loop" somewhere to check if I should continue or not
But I'm not able to find how to know my "actual current time" to compare it to the "index" of my Timestamp array
How far it jump will depend on your fps
But you can see that you want to process any location on the window
And the windows is last processed time to current time.
I have 0 while loop in my codebase.
Little misused and you crashed the game with infinite loop error.
A loop will work just fine here
So how you check OnTick ?
You get all the points in the windows and do a for each loop
Ok and you use your total duration of your ANS in the code, right ?
Anim notify state tick -> process melee trace -> get points from last processed time to current time.
From the top of my head, I get the start time and end time.
But i think those are only needed when baking.
For the run time I just evaluate the montage time iirc
Ok so I use a For Each Loop from the Socket Locations and put this on my Trace, like that
Then I need to understand this processed time to current time thing. Sorry I know I'm boring :/
You need to loop only the points that is inside the time window
Refer to the doodle, i know its not much
It's a lot for me, thank you ! I'm trying to understand it
So I need a branch somewhere or something to check if I'm inside the time window or not
I will check my code later to see how I get the time.
Ok thanks a lot !
@odd kiln
float CurrentTime = MeshComp->GetAnimInstance()->Montage_GetPosition(MeshComp->GetAnimInstance()->GetCurrentActiveMontage());
so it's pretty much just the position in the montage
the codes in larger picture.
Below runs at the start of the Anim notify state, basically, I am setting LastProcessedTime to 0 or I guess you can set this to the BeginTime of the anim notify state.
void UANS_MeleeTrace::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration,
const FAnimNotifyEventReference& EventReference)
{
Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
// ** Init data ** //
// Generate FGuid for the mesh component. Valid for the duration of the ANS.
const FGuid MeshGuid = FGuid::NewGuid();
AnimDataGuid.Add(MeshComp, MeshGuid);
// Default last processed time to 0
LastProcessedTime.Add(MeshComp, 0.f);
// Process melee trace.
ProcessMeleeTrace(MeshComp, Animation);
}
Next one runs every frame.
Current time is the montage position.
Basically you want to process all the trace from the last processed time to the current time and when you are done with the trace, set Last Processed Time to current time.
This way the next frame will start where you left off.
void UANS_MeleeTrace::ProcessMeleeTrace(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation)
{
float CurrentTime = MeshComp->GetAnimInstance()->Montage_GetPosition(MeshComp->GetAnimInstance()->GetCurrentActiveMontage());
if (MeleeTraceData[i].TimeStamp < CurrentTime && MeleeTraceData[i].TimeStamp > *LastProcessedTime.Find(MeshComp))
{
// This is the window, do your trace here
}
LastProcessedTime = CurrentTime;
}
can't paste the code as it's too long but I will just post what you need to know.
Thank you so much @frosty heron I'll try to understand it. You are very kind thank you very much really !
Translation for the conditional code.
Loop through your array. If time in the array element is Smaller than the current time And if time in the array element is bigger than last processed time.
Then trace that array element location.
And as I can read in your code I need an "index" to increment after each successfull trace
So I can retrieve the good Element in the array
In case you want a different perspective. Cold and I do the same thing but different ways.
This function is called on tick when I start the weapon trace. Because I calculate the locations based on offsets to the hand, I store the history in the component this logic is setup inside.
Once it done some stuff to figure out how much time has passed, (frame stable bit) it'll add to the location history and then perform the trace. Might help you get started.
Does anyone know if there's a structure time for just hours and minutes? Without the days and seconds/milliseconds?
Never mind, i'll have to make my own structure I think.
hi, i have a question
why is it that sometimes I receive nothing here?
i pass here rock and boolean for example
- rock
- true boolean
but when i receive it here, i receive nothing
NoneNone
Show more of the logic.
Anyone have a tip for how to make a shortcut for revision control Diff Against Depot?
I want to be able to just press ctrl+D with a file highlighted to diff it
Would also be nice if I could use ctrl+D with the file open to get the diff for it
FTimespan? Or just Timespan in BP
I did look at the time span but it's not very nice to enter just the hours/minutes plus it has days, seconds and milliseconds which just aren't needed for what I'm doing.
It's alright though, i created my own 'TimeOfDay' struct thats just an hour and minute with some clamping/wrapping.
the first picture is a change i made to the second picture which i saw in a tutorial. is it a good idea to swap "cast to character" and "get capsule component" for "get component by class" ? i thought it looked cleaner this way. are there any problems that could arise from using it my way instead of the tutorials way
With the Get Component By Class method it could work with anything that has a capsule component. Just remember to check it's valid first, (as in it found one) before you try do anything on it.
Anyone know a way to check if random reachable point is inside a navmesh modifier?
i forgot to say it is an actor component and it is attached to the character, but if you say there arent issues beside that im happy with it!
my npcs keep getting a reachable point inside an nav mesh obstacle
Project to nav mesh.
I tried that node, I'm not sure where to go from there, this is my current simple setup
oh, sorry, i miss read you're message. I don't think there's anything exposed to BP to check if a point is inside a nav modifier. Whats you're end goal?
can some one help me i have a map that loads up from a save file the rooms of the level but when it does it spawnes the room 2 time for every element in the array but its not showing up in the code the array does not hold the element twice. does anybody know why this is happening.
well, the upside is that you can create it from seconds, and that it works with DateTime, so you can subtract/add to Dates
i am having a bit of an issue here
i have an array of objects that i use to feed data into my function
bear with me its a bit difficult to explain...
names square and triangle are only there so we can easier talk about it,
the print function correctly outputs whether the input skeletal mesh is square or triangle, however the moment the sequence starts the data it receives is only ever the first entry of the array
the data id expect to receive from this function for the example array i drew in would be :
square
Triangle
however what i am actually receiving is:
square
square
despite the print telling me the correct skeletal mesh, and despite the function only storing its data in local variables
Hi, short question is there a difference between these two nodes in the way they work other than the way they determine the level to be called?
I am asking because the "by Object Reference" is breaking my game, while the "by name" doesn't
This is wrong way to get some variable, you don't have control if that actually will happen before as sequence runs all pins at the same time, it doesn't start 2nd pin when 1st is finished, even if it worked you dont have guarantes that this variable is still valid (the pink array)
Can you zoom in foor each loop part? and how do you know it actually returns only square square two times? did you try to print names of each for each loop element (after Add Unique) for example?
what error do you get, is breaking my game is too general description
I take that as "there shouldn't be a difference"?
There is no error message sadly, but the game just resets every other second
show code
This is in the game mode blueprint
i mean you are calling it on event tick so how does its not supossed to reset literally every sec? 😄
tbh this blueprint is from my teacher. It wasn't briking until I changed the player character
And funny enough it works when I change the Open Leven by Object to by name
Classic teachers opening level on tick 😄
okay that requires some more explaining
the function i posted is called like this
once its done doing its stuff it removes the first index of the array and does the whole spiel again (second pic)
what this function outputs is video 3 (with skeletal mesh print)
jesus what, are you supposed to find mistakes and fix them in the project?
generally itsn ot the problem with the open level but rather that you call it every frame to open the level 😄 and you have delay of 1s before every level load because you start with ''false'' open level and after 1 sec it turns true, and tick starts calling it
Defualt ship hull and default ship hull wide are our "square" and "triangle" example
But then why did the problem only start appearing when I changed the player pawn?
I am sorry if I am asking stupid questions
probably because that cast is failing
Your player one
So the level cast --> open never gets hit
I already changed the Cast to Player node. That there is the new player pawn
the data the function shown earlier receives is correct
despite this it will only create the first entry
@rain egret so can you show me this part of code that is supposed to do this but it's not doing it?
the data id expect to receive from this function for the example array i drew in would be :
square
Triangle
however what i am actually receiving is:
square
square
I'm a bit lost what you want
I will ask the other way around, what should I do instead of that blueprint? The job of it is to make the player respawn, once the player spawn gets destroyed and basically reset the entire level
In theory you shouldn't need to do anything with the player if you have a player start and the pawn is part of the game mode.
You should just have to load the level
It doesn't matter and these 2 things should need to worry about each other. Everything works as expected and this pawn doesn't do anything. Maybe you were trying other level with other gamemode settings or something like that.
But if I remove the blueprint and the pawn gets destroyed the entire game just gets stuck
When you open a level, everything in the existing level gets dumped and the new level is loaded.
So spawning a pawn and then opening a level does nothing.
What you need to do is open the level and either handle the spawning after OR just let the game mode + Player start handle it. By default if you have a player pawn in the game mode and a player start in the level, you'll just spawn there when the level opens.
That doesn't solve my problem
What's your problem? You made it sound like it just wasn't opening the level
The level is opening and starting. The player spawns and can move around. At the current state the player resets every other second if I use the "Open Level (by Object Reference)" and that problem doesn't appear when I use "Open Level (by name)". When I remove the blueprint, the game works aswell until the player dies at which the entire game just freezes.
I only wanna know why it makes a difference if I use "by name" or "by object"
the function i have shown you, thats where the data is calculated, showing you how it is generated down the road will not help you understand it any better, nor is that really important. for the sake of this issue here anything past that function can be treated as magic that just happens.
FrameData is a transform array to feed into a instanced static mesh
WallData contains procedural mesh data to feet to a procedural mesh component
and SocketData contains a vector array that goes to a instanced static mesh
those parts work. regardless here
notice how the first entry is labled ship_wide
this means it uses the skeletal mesh with the same name
the outcome is this
all three generated ships use the wide skeletal mesh, despite correctly being spawned in their assigned location
so its not an issue that it only ever reads the first index
now i change it back to basic, the spawned ships now all share the basic skeletal mesh
This entire thing started when I changed the player pawn to my own new one. Meaning before hand everything worked fine. Now I feel like that shouldn't have worked from the beginning.
As an FYI, a sequence node runs the pins in order, hence the name 'Sequence'. But I agree, you should avoid crossing exec paths.
so basically all your ships use static mesh of the first one in the array while they should be individual ones?
What is "The problem exists"? What difference do you see btween the two
skeletal mesh but yes
That the level gets reseted every second.
but heres where its getting interesting...
i changed the skeletal mesh to a different one and it did it correctly. meaning it has an issue with the specific skeletal mesh that i used...
Please keep in mind I am asking from a position where I don't have a lot of knowledge about all of that. I am currently still learning.
ok got it, can you show me the part where you actually spawn that actor/static mesh? is it this part?
So the only thing I Can think of is that this cast is failing or the current level name isn't valid.
Open Level by Object Reference uses a soft reference to the level object.
Open level by Name uses the actual text based name of the file.
If one is working (By name) and one isn't (By object), the reference is likely not valid.
Why changing the character would impact that? Hard to say, could be that there is another check in the game instance that you're getting that current level from that breaks because the character changed.
the thing i am spawning here does not have any data yet, the procedural/ instanced -static meshes are assigned later using the data that is being calculated in the sequence part...
ok, so where are we inserting and setting new mesh of that thing that spawned?
literally learn to use breakpoints and editor debuger and you will see what is exactly happening in both cases
So my new player pawn is missing something, causing the problem or something else is checking the player aswell?=
notice how they all use a struct named construction data...
thats the data calculated by the function i have shown you earlier, the function that causes the issue.
Do you have a tutorial you can recommend?
open BP_Dungeon_GameInstance.
Find where "Current Level" is set.
Make sure there isn't a cast to the player character or something before that is set preventing it from being set.
The Current level only has a default value in the Game Instance.
and is it valid?
No error in compiler results and it's the correct level
right click on the open level, select "Set Breakpoint", then run it. It'll stop there, mouse over "Current Level" (The little blue dot), is it valid or null?
Does Debugging your projects take forever, and some bugs are hard to debug with print strings? Do you end up with a bunch of Print String Statements spamming your HUD and messing up your project?
In this video, we'll be discussing debugging tools in Unreal Engine that I Wish I knew earlier. Tools that will make your debugging life much easier a...
thank you very much
Hmm, but these construct functions work on what? like you spawn the pirate ship, it has some default static mesh, and when do we set new static mesh exactly? which node/function operates on that just spawned ship?
sorry but thats way beyond the actual issue. i appreciate your helpfullness but this is going nowhere. those areas are not the issue
It is valid and shows the correct level.
Not sure then. Honestly I'm not even clear what you're trying to do. Why do you even want the level to restart every second?
i think you are targeting wrong ship and the one that is spawned is never changed/worked on, rather you are everytime changing constructed ship which is created only once and all the next constructed ships are not targeted with the changes
That is a question I can't answer. This blueprint is not made by me and the only reason why I am tinkering with it is because of the reset every second.
This look like bad practice to me. A game mode is created as soon as a level loads meaning this it loading a level and then a second later told to open another level. I'm not sure why you wouldn't just open the level you wanted in the first place. 🤷
Anyways, the open level by soft ref calls the other anyway. It just extracts the name from the soft ref.
what blueprint is this?
Is it a custom blueprint that is just in the level? The level blueprint? Something else?
The Game Mode Blueprint
Ah ok, so ya when you load the level you're waiting 1 second, then restarting the level haha.
hm, i doubt that, the value is properly assigned here
but why doesn't that happen when I use the "open Level (by name)" node? Thats the thing thats itching my brain.
What happens instead?
What's it look like blueprint wise when you use that node instead?
How was it setup before you change it to use a soft ref? Where was the level name coming from? The GameInstance?
Assuming it's a variable, chances are something probably sets it to null/none so if it attempts to load another level it's not valid and thus doesn't load.
The game runs and only resets when the player pawn gets destroyed
So my guess would be that the "Name" you're putting isn't valid
so the open level does nothing
It was using the by Object reference. The problem starting appearing when I changed the player pawn
and there's another Open Level on the player when they die
so Construct NPC ship is only one, but it spawns new actor of class and set ship reference as this one?
But then why does the game freeze when I delete the blueprint?
hard to say without seeing more
I bet there's some logic in the other pawn that sets and nulls it at some point.
^
When you try to delete the game mode?
no no no only this blueprint inside the gamemode
correct, i assume it has to do something with the mesh... when i output what mesh is being used it will correctly tell me the mesh i am expecting.
I will swap the Open Level and set a breakpoint
You could just look at the pawn/character that doesn't break it. Or right click on the Soft Ref and find refences to see where else its used. It'll probally shed some light on things.
problem solved!
The old player pawn only has movement logic
i am having the ship spawn system in the game mode so its easily centralized... to get the socket information i have attached a poseable mesh to the gamemode, this poseable mesh i assign a skeletal mesh to, apparently the two meshes were so similiar, despite being different skeletal meshs with different skeleton, that it did not change the mesh.
now after setting the skeletal mesh to empty before assigning it, it works
weird
Right click on the Soft Ref you get from the Game Instance and find references to see where else its used. You might need to click binoculars to search all BPs.
It should at least show in the Game Instance as well but it doesn't look like that's showing. 🤔
Is it a BP only project?
Yes
Well I'd assume CurrentLevel would get set somewhere. Any logic in the level BP?
Only sets the visibilty of an actor inside the level
What version of UE are you using? 5.5?
I think it should be in 5.4. Right click on the CurrentLevel var in the game instance and find references (all) see if that shows you where it's used.
Hey, so I have a question. I am about to spawn a car and set its data. But because I use a class variable the return value of the spawn actor is just an "actor object reference" and not and "vehicle object reference", so I cant put it into the target node. Is there any way to get the "vehicle object reference"?
Such a weird setup. If its not used anywhere else, the whole thing is pointless to be honest. 😅 It's just adding extra steps to what UE already does. You can set the default level to load in the project settings. Just change it to the level it should load and remove the load level stuff.
Do you remember the part where I told you that the game just freezes when the player dies and that blueprint doesn't exist? Give me a sec...
because it is already the default map. (I never changed that btw.)
I am gonna check the player start just in case
nvm
cant find anything regarded to this tpoic
In 5.5 it might work the way you expect. But the class type should be of the specific type of class you want.
If the class is always going to be of type 'BP_Vehicle' change the var type to be class ref of BP Vehicle. Otherwise, cast to BP Vehicle after you've spawned it in.
casting worked for me, thank you so much
Do you think the "issue" could be caused because that project got imported through many different versions?
how to make that node highlighted? 1:1
No, definitely down to the setup. It doesn't make sense to be honest. Either it's redundant or there's logic in other places.
Not sure what you mean.
I tried making break rotator or smt but it doesn't look like this and I don't know how to make that also to pass target
You've split a get relative rotation node by the looks of it. This requires a target that you'll be getting the relative rotation from.
Ok I solved it now but just killing everything that is referenzing that blueprint (Not the Game Mode) and making my own logic, which basically only consists out of an check in the player pawn if it's destroyed or not.
hey, I'm very new to UE, I'm setting up a real time mocap scene and I need some sort of functionality which rotates a blueprint actor with a skeletal mesh in it in the Y axis, so that once the game is packed, I can adjust the character's orientation if needed. What would be the best way to set this up, if I wanted to use, say, a keyboard key to increase Y rotation?
something like this should work
there's plenty of tutorials on how to set up enhanced input actions
you may or may not have to do this step too
Sometimes My Unreal Engine does intresting stuffs.
For example this interface was filled with logic. But after pushing some stuff, it literally deleted everything inside, And I crated the logic like 2-3 days ago.
What literally can cause to that?! I have been trying to understand why my interaction doesnt work with items to pick up..
that's simi8lar to what I was trying but still no luck. Does it have to be an enhanced input action by the way? Couldn't it be just a normal keyboard event or normal input action set in the project settings? I did try making an enhanced input asset like you said, and put it in the blueprint's event graph and connected it to an add actor world rotation, a local rotation, a relative rotation, and set to self and to the skeletal mesh components. Nothing seems to work.
Btw, The scene is just a background, the blueprint actor with the skeletal mesh, and a camera. I also have it in the level blueprint so that the camera is set as the view target by using a set view target with blend node, if that helps.
Maybe this one is in the children of the parent? and maybe you still have logic in the parent bp? can you show screenshot of your interface and functions panel on the left in this bp?
you need to assign each Input Action to Input Context Mapping and then use node Add Context Mapping and add it so game starts detecting it, you have to do it on runtime, it also allows you to remove Context Mappings during the game and enable new ones or override with priority.
Always debug with editor debugger, breakpoints, printing things and see if things are even firing or what is exactly happening. Also the more code you show how you setup things usually the easier to help.
I did create the context asset according to a tutorial but wasn't sure it was needed in this specific context since quackcharg3 didn't mention it. Here's all I got inside the blueprint's event graph so far tho. The input asset has a trigger on pressed, and the mapping context has said input loaded in, with a keyboard key assigned to it.
you need to enable it like this or it won't be detected
what's connected to the exec input of the addmappingcontext node?
its on begin play
yep, that finally did the trick! Thanks for the help, that was tough to figure out haha!
hey yeah sorry should have clarified that - you need to always do the whole mapping context stuff.
"enable input" might only be necessary for enabling debug keys in an actor that is not possessed by the player (debug keys allow you to quickly set up input keys without having to create a new IA asset, they only work in editor though) I don't quite remember if it's necessary for enhanced input to come through for non-possessed actors - you could test that by removing the enable input and checking if it breaks or not
Hello guys, i am currently developing an multiplayer game. Everything works fine, but now i have a challenge. I want to load a second map, when the player enters a volume. But each of the players should have its own map. Like the garage system in GTA (this is btw what i want to achieve). The code for the system overall is done, but I dont know what I have to look up on Google for my needs. I hope you understand what I want to do 🙂
You cannot do this out of the box with what unreal provide. Multiworld is not a thing Unreal network support.
neither does GTA V
the buildings that you enter through loading screen are below the map
i guess the garages/etc. just apply the decoration/vehicles client side
That's my plan to spawn a room for each of the player 
it's probably good enough to load most things just client side
as long as the rooms share geometry you can just put all players in the same room and hide them from each other
Though what is the fuss about new unreal feature for future update?
Oh thats bad
Certainly looks interesting when they showcase the "mmo" like game.
it's still the same map tho?! it's just that different servers handle players which are close to each other
I see
if we talk about the same thing...
Yeah I think you are right
The closest thing one can get to travel to individual map is probably to connect to another server
A dedicated server that manages each map 🤷♂️
well, you could place the rooms way out of the bounds of the normal play area and have dedicated servers for them, if you really have the playerbase....
but guess teams who achieve that will figure it out eventually...
@spark steppe Correct me if I'm wrong but the net serialize function requires a world right? And only one world can be opened. So i guess this is the restriction?
So I basicall telport the player to the Garage, which is hidden in the real world, but wont the collisions block each other?
Even when "hiding" the player and cars for the other clients
Yeah I know
Is there a way to tell which character physics capsule I impacted with a trace?
For something like a headshot mechanic
by default they would, but all this can be disabled
You can get the bone name
When you hit a physic asset
Ez pz
If you gonna shoot the head don't check against the capsule
That will block the head from being shoot
Use physic assets for the skeletal mesh instead
Yeah I meant the actual collision from the uh, ragdoll
Ye physic assets
Get Bone name from the hit result
Check if the name == YourHeadBoneName
If it is, do your headshot logic
I guess I could also do physical material as well if I wanted non head hitboxes, 
How do I disable these things, ONLY on the other clients
Never done these kind of things
You execute the logic to turn off collision on the target client.
Every node is executed for your own machine.
The only communication between network is
Variable replication
And RPC (target, run this function)
i don't know enough about replication to help further
Is this just for local player only stuff?
You can do that by spawning a room per player or having 1 room with replication shenanigans
for my project I decided on a room per player for reasons
Great I will try this with level streamin
But for some reason my level streaming is greyed out in my level streaming volume
Hello, I have a little problem / help, I set up my day night cycle, to have an impact on the game I control the duration of day, dusk and night and that 3 values change depending on the season, the color of light changes with the seasons. But for now, the switch between day and dusk is instantaneous. I'd like to create a smooth transition between light color and intensity. I confess I've been racking my brains all day, but I can't see how I'd come up with this, if anyone has any ideas.
You should probably use lerp. And start with something simpler, e.g. only day and night. You would have the value be from 0 to 1, with e.g. 0 being day and 1 being night. With 0.5 being in between. And then any colors which you set from the blueprint you would blend the day and night colors based on that factor. You could also add a float curve to control the transition better, e.g. have the values from 0 to 0.45 be 100% day, then a sharp transition to night, etc.
But yeah the basic premise: have the "phase of day" as a kind of loose float value, so you can represent stuff in between. And lerp any values you set/output with it.
Hi all I have a question, im making a top down game and i have the omni directional movement implemented, but im trying to make it so wherever my mouse is pointed, the character attacks in that direction like the game ravenswatch i dont want the whole pawn rotating.. how can i achieve this? im a bit stumped right now
where do you think find look at rotation should start at
probably not the world origin
although it's mathematically either the same or the opposite
Okay here's my question, I'm pretty new to UE, but not to gamedev in general.
I'm wondering what's the usual pattern for creating logic and having it work with different meshes, scenarios etc.
For example, I'm creating a gun. It has a physics based recoil so I need a reference to something to apply the recoil force,
as well as the sockets/transforms of places where the bullet will spawn, etc.
I want this blueprint to work with different meshes so I've kind of settled on a component blueprint, as opposed to actor blueprint.
So I can even have 1 guy use two guns for example.
But how to get those references between components? For example one approach I considered is have my gun component as a SceneComponent,
and then have it spawn a StaticMeshComponent based on a StaticMesh parameter to the blueprint.
Is that kind of direction OK? Or should I let the actor spawn the meshes and whatever, and have my component just get the reference?
Looking for some general advice for this kind of stuff, I guess it's not even strictly a blueprint question.
you can get owning actor and from there discover components you care about
@faint pasture how would i make it so that the character dosnt rotate though? but wherever i press the character would then attack in that direction?
just don't rotate it
your code is rotating it
just don't
but save a rotation to be used for the attack logic, or just save the aim position and use that directly in attack logic (that's what I'd do)
I'd just tick -> get hit result -> set aim location
then:
Attack -> math based on aim location -> ??? -> profit
@faint pasture alright thank you i will try to get this working
Sure but what if I don't want to detect/hardcode stuff. E.g. there could be a bunch of meshes under the owning actor, maybe even including a separate gun mesh in each hand.
Is there a way to point to the concrete mesh more directly? I made a StaticMeshComponent variable, but it still takes in StaticMeshes for some reason. I guess it should be done in the actor constructor ?
There's some goofiness around component refs at design time, but you can certainly hook things up from the actor context or do something like get attach parent or whatever
even the constraint component in engine uses names
if your gun component is a scene component (to indicate the muzzle), I'd just consider attach parent to be the "gun"
cast it to primitive, check if it's simulating physics, and bonk it on FireEvent
might need some more code to handle the case where you're attached to a skelmesh but that's all pretty easy
Yeah GetAttachParent seems interesting. My gun component actually gets the muzzle from the socket on the mesh, so I guess it's kind of redundant that it's a SceneComponent since it doesn't really do anything interesting with the transform, but I guess it makes sense that it can be parented to something.
I've also noticed there's the "Component Reference" struct, but I can't find any node that would actually dereference it.
from what socket
You'll probably end up with something like I have for my mechatronics plugin
I basically double clicked a cube mesh, scaled it a bit to have "gun-like" dimensions, and added a socket where the bullets would spawn. From what I understand sockets are pretty versatile, since in the future I could hook that up to an actual skeletal mesh. So I guess I'm gonna attach my gun component to the mesh, then GetAttachParent, and then get the socket by name to spawn the projectile.
you're already getting socket by name, I'd just keep that same energy
I think if it was trivial then the constraint component would just have a component picker field but it uses names too
Ok so you're suggesting to use names? If so, then would it make sense to make the gun component an ActorComponent instead?
Sure, depending
a scene is just an actorcomponent + transform and attachment, whether or not that is interesting for the use case depends. Scenes aren't free though, that's why I'm just using ActorComponents and metadata for my system.
I'll have gobs of these components though, thousands in a scene
I wonder if anyone made a plugin for lightweight spatial addressing like this
Yeah I'll probably try to go with something similar then. Since the component already hooks up to a mesh component there isn't much point for it to be a SceneComponent.
Thanks for the advice
Can someone help me with a problem I'm having. I am trying to flip my first person character to the ceiling and treat that as his new floor. I set gravity scale to -1 and he floats to the roof, but when Itry rotating him 180 on the x axis, nothing happens. I also tried doing that with the player controller. Is there an easy way to make my character walk on the ceilings?
Thank you very much pattym ! I'll try to make something with your 2 logics. Thank you!
@faint pasture pretty sure i finally got it seems to be working now
what is the best way to set array in structs
Hi there everyone, quick question. I have setup a behavior tree (now disconnected) that decided which attack my enemy was going to execute based on the distance to the player:
Issue is, the float variable was not being updated. It was always 0, so the enemy would only ever use the short range attack
I was trying to use the following code to update the BB:
But for whatever reason, it didn't worked. Does anyone have an idea what could it be ?
I tried searching google and the closest I could find was to make variables public. I did try that, but didn`t worked
is blueprint similar to c++?
Kind of but not really
C++ in unreal is much easier than C++ on it's own.
But C++ has concepts that blueprint doesn't, even though you're using a lot of the same functions
Hello, i'm doing scoreboard for my multiplayer game.
And i have problem. I want allow player move when menu is open but don't allow move by left mouse button camera.
(I can add invisible button on full background screen but i want best method)
Just spend 2 weeks on learncpp.com and harness the power.
Im trying to make this enemy stop when a boolean is false, but for some reason it ignores it, I can't figure out what Im doing wrong
Im making it pause for 5 seconds, but it completely ignores the pause boolean
My guess is that it wont issue a new move command during the pause, but will continue running the existing one. You might have to ask it to explictly stop (e.g. try with: move to it's own location, not sure how else atm, but there is probably a more canonical way) when pause is true.
you never stop the movement task. You must call "Stop Movement" (I think it's on the character movment component) to do that
What value does "Distance from Player" have here?
Did you specify the correct name in the "Distance from Enemy" variable?
for widgets (in my case mostly inventory and menus like settings), should i create them onBeginPlay and then just add/remove as needed or rather create and destroy when they are opened and closed?
I would assume it's mostly based on how often you expect it to be needed, but i just want to to make sure before i start implementing stuff
@frigid jasper the answer is depends
And you get to decide it as designer.
If the widget is quiet heavy in resource and instantiating them cost frames. Instead constructing them when you want to open it, you can do it at the start of the level (when the loading screen still up for example)
If lightweight, then you can just construct them when the menu is first open.
And set the visibility to collapse instead destroying and recreating them again.
The most annoying thing I find about the widgets system is where you are manually setting z orders. These magic numbers slowly stack up, and tracking manually what z orders are in use is a massive pain. We ended up making a 'popup' system which automatically increments a new z-order for popup widgets on opening, to guarantee any new widget will always be above any others.
I don't think I've ever had to manually set the z order.
Adding to what cold said, another thing to consider is how many resources it might use. UI can use many different textures at varying sizes. If you create a widget and store a ref to it and just hide/unhide as needed, these textures will remain loaded. This might not always be desirable.
In short, there isn't really a right answer and you may find you're self reworking near the end of a project to what fits bests for individual cases if performance becomes an issue.
We use layers currently through gameplay tags due to the CommonUI stack stuff. I strongly encourage people to avoid using ZOrders. Even in canvas panels unless you're doing somethign where you need to affect it performantly in a programatic way(like always keeping children in the center of a canvas as the most forward)
I'll keep those things in mind, thank you^^
That makes sense
I'll simply add methods for both that should allow me to swap things out fairly quickly
The only use case I think of with ZOrder is for windows/panels that can change their ZOrder. Pretty sure there's a widget for this though. (Granted I might be thinking of something else)
would you mind elaborating on why using ZOrder is discouraged?
Oh god I didn't know people actually used the ZOrder. That would be a nightmare to work with.
Already enough of a nightmare dealing with the hierarchy order.
I will incorporate common UI for my widgets
Because you shouldn't need to use it. By default you shouldn't be using a canvas panel anyhow unless you explicitly need the ability for widgets to be anchored specially in ways that other parents like Overlays and V/HBoxes cannot.
Even in a CanvasPanel, children are already ordered based on the order they're added. In the editor you can see this easily on the left in the hierarchy in a nice list from top to bottom.
Setting ZOrders here is pointless because you can just drag these around to reorder them as is and visually see which are meant to be behind others based on their position in the list.
All of that above is just detailing working in a single canvas though. If we move on to individual widgets added to screen, and their ZOrders, then some of it still applies. The latest added to the same ZOrder will be the highest on screen for that ZOrder.
But the issue is like Karma mentioned, tracking said ZOrders is a nightmare. For this reason Lyra makes use of the idea that you have a single main widget pushed to screen very early called a PrimaryGameLayout. This layout has a bunch of layers already. Game, Fullscreen, Notification, etc. And you push your widgets to those layers instead of directly adding them to screen and this allows you to both keep track of what general layer they should be at so that correct things display over others, and also manages if you have multiple of something. It'll push the old one out until it's dismissed.
Anyone have a good approach to handle music in the game?
I mean I can find "Play sound", "Create sound" and such, but none of them seem to have a "Completed" output I can use to play a new track.
Figured there must be a standard or common way to handle music in the game?
You'd need to use an Audio Component. It has an event you can bind to for when it's stopped.
Oof i used canvas panel everywhere
Yea, you shouldn't do that. 😅
How do you guys re arrange widgets then. Most of the elements can have multiple widgets
I normally have cp_main
Then sub canvas panel
Like cp_toolbar, etc.
Ofc you need a main canvas panel lol, thats not an issue
Some sub canvas panels arnt issues to
overlay with horizontal/vertical boxes.
Where would it be normal to control the music from?
Do you make an Actor in the world to control the logic, or is it in Game Instance or something?
I also run into problem with vertical boxes where it doesn't push element like how i want it but can't show what i mean till I get home.
This is an example of a clock widget (only used for debug) but it might give you an idea of the layout.
I'm all for canvases. But used in the correct way. One project I was on was literally using Canvases as a Vertical box. Someone had placed a bunch of widgets in a canvas, and had spaced them by hand in a vertical way. Like.. dude, why did you go through this much effort? You effectively did by hand what the VBox does for you automatically. :/
ngl trying to use a canvas panel as a vertical box is just harder then using a vertical box.
So bad
thanks a lot for that comprehensive response
That makes a lot of sense
current I'm dynamically setting the ZOrder based on a similar system like Lyra it seems
But Lyras method sounds a lot better in general, I'll take a look at it
Can be anything. I would probably use game instance Subsystem or you can also just have an actor manager that you spawned with game mode at the start of the game.
Depends on what audio you are playing.
Depends, you could just have an actor that gets spawned in the level. Or add an audio component to something else. Game Mode could work if it's a single player game.
I will manage audio component for my multiplayer game with actor component.
For background music, volume control, etc. That can just be a subsystem or actor
Still waiting for a way to create subsystems without C++. 🤷
I think there's a plugin that does that? Not sure anymore.
AHUD is usually best for a music thing. It's local only, and in the same thought process as most UI
Probably, its not difficult to just make a C++ one but for BP only projects you end up recommending work around for something that should just be a sub system. 😅
TBF I'm not sure if I'd like BP subsystems. Maybe if they could find some way to force no assets. But I like that if I use a subsystem, I have zero worries of heavy linkers. Cause it can't link to anything heavy.
I created a plugin for managing UI stacks. (a player subsystem) Makes it easy to push things where I want.
That is true. 🤔
Am I looking for a specific node or how do I bind to when it is completed?
(Audio I drag from is an Audio Component)
OnAudioFinished
Or...
Ah, a Dispatcher. Thank you.
I miss my BP only days. In a way, they really make me want to try out UnrealSharp. Maybe I'll do that this weekend. 🤔
Yea, BP is much more enjoyable. (for me at least) Feels faster to iterate as well. Whats unreal sharp?
Definitely faster to iterate but they become spaghetti real quick for me.
Allows C# in engine. AKA can code without restarts. My only main drawback with it is that it isn't multi platform supported I don't believe.
what is the best way to set array in structs
There's only one way to set and add.
Not sure what other ways you are looking at.
with break?
more worried if the struct is bp or cpp struct
cuz bp struct is broken as f
*use break I guess.
bp struct 🤦♂️
could anyone help me in #ue5-general please im new asf to this 🙏
not trying to be in high horse here, just trying to save someone from suffering the same fate as I once had @ruby ivy
declaring cpp struct is actually not hard
you don't even need to know C++
you can just right click your bp asset struct and view the header file.
create a header file MyStruct.h in your source file and paste the header content.
Pistol damage is probably set to 0.
lemme take a gander, thanks man
okey ill try it
C++ structs are actually pretty powerful. It's nice that you can include functions for them.
1st is my npc interact code 2nd is the code when conversation is closed but even after the 2nd code runs my camera inputs are weird i can still see my cursor and need to hold left click to rotate camera
yeah but afaik the function can't be exposed to bp
sorry, where does a brother change such a thing im new to all this
still great nevertheless
Yea, I had to create some BP wrappers for some I made. Not the end of the world but it would be nice if it just did it for you haha.
i think i need learn c++ asap
by any means.... my regret a decade into game dev is, I didn't learn it sooner.
starter material learncpp.com
If you're not sure how to change a variable, it might be worth starting with some of the 'Getting Started' type tutorials.
However, locate the variable in the variables panel, select it and then change the value in the details panel.
please anybody help this guy
i got it, thanks man you the real one
im doing a getting started type tutorial now. would you say this is begginer friendly or not
Hello guys, in this detailed and simple tutorial we are going to learn how to make a full First Person Shooter game in Unreal Engine 5.
↪️Project Files: https://bit.ly/GorkaGames_Patreon
💪Join my Discord Server: https://bit.ly/GorkaGamesYouTubeDiscordServer
🎁FREE ASSETS:
💃Arm Animations: https://drive.google.com/drive/folders/1nzcv6NpHjD_eyV1iW...
step back from implementing whole system, you will just end up copy pasting codes that is probably not great either.
ive got like 4 months to make a custom game for college and ive got to learn how to make it and make it in that time, do you guys think im cooked or naw
I'm torn on this one. For me, spending years with just BP makes you understand more about the limitations from a BP perspective so you know which areas to focus on in C++. Probally just me though.
learn the basic of Object Oriented Programming.
Variables, functions, events, object reference
then casting next
what would you suggest would be other ways to learn efficiently?
learning OOP and check listing what;'s listed above.
there should be guide or tutorial covering those basics
I try to do minimal things in bp once I found out asset can get silently corrupted.
re-doing every single logic in bp is NOT fun
but that's just me I guess.
ok ty
deffinitly not cooked, just have to work hard to be the best among your peer. Gl
Depends on the tutorials you watch. I tutored someone which accounted for about 20-30 hours and they had a pretty good grasp after that. Granted there's still lots for them the learn but UE is a black hole and you'll never learn it all.
.
my peers arent even doing a game man, im in a film course and im the only person even doing anything with computers lol
do you have any tutorial suggestions? as i personally love a good tutorial
Is posible use find in any struct item like this
probably fine, as long all of the struct member contain the same value.
that said, I don't know for sure.
Once you know you're way around the editor. I would choose tutorials that show how to make more scalable systems. Once you've made a few of these you pretty much learn how to tackle most things. You have to remember that you're not going to find a tutorial that is exactly like how you want so you need to understand the concepts they use so you tweak and modify them. Or even better, use what they show to create your own.
looks fine though and you can check your self by printing the int output;.
@frosty heron Do you have any idea on this one
okok, thanks man i really appreciate that
u a real one
Ye, if you can still control your camera by clicking some foreground and rotate it, means your input is still set to game.
if you still want to use Game and UI input while actively NOT moving your camera.
you probably want to block the mouse click on the widget with a canvas panel or something.
As an FYI, I do have some tutorials on my own YT channel for some systems. Might not be the sort of thing you're trying to do though but you might still learn some things.
ill give it a gander ty
enable input doesnt work right now
i cant do anything
This one is when im interacting
this one is for when the conversation is closed
you shouldn't need to disable or enable input, at least I don't do it that way.
Is there a reason you enable input on the NPC when the conversation closes?
Edit: Nm, you've updated it in the recent screenshot.
Set Input to UI when UI take over,
and set Input to game when UI is closed.
You probably need to handle input for closing the U.I in U.I
i solved the issue by running the code on the npc not the player character
but my sensivity goes insane when i close conversation
xd
code is the same as this one excluding enable input.
These interfaces may make things harder to debug
is this
Just be aware of actor component declaration.
Absolutely never use Edit specifier at the UPROPERTY for actor component.
Or you risk breaking your bp
i dont think there is anything about sensivity at the code
but let me ss that aswell
This setup looks familiar. 🙃
You need to learn how to debug. It's very hard from someone to work out what gets called or not without having the project at hand.
indeed 😄
yeah i get it
just want to know
what might be causing the sensivity
what node might cause that like in general
it seems weird
anyway thx for the help i'll keep looking
How are you handling the look logic? The default template setup?
yes default camera input
base unreal template
Nothing jumps to mind.
it might even be about my hardware i'll test it with other people
anyone here has any experience with Async loading screen plugin from marketplace? its free and I thought to use it. but it looks like i cant disable the startup loading screen...
#pragma once
#include "CoreMinimal.h"
/**
*
*/
struct KASAP_API MyStructc1
{
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(DisplayName="Siparis"))
TArray<int32> Siparis;
/** Please add a variable description /
UPROPERTY(BlueprintReadWrite, EditInstanceOnly, meta=(DisplayName="SiparisActors"))
TArray<AActor> SiparisActors;
MyStructc1();
~MyStructc1();
};
i build header like that but its not working
#include "CoreMinimal.h"
/**
* MyStructc1 - Description of this struct.
*/
struct KASAP_API MyStructc1
{
public:
/** Array of integer orders */
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(DisplayName="Siparis"))
TArray<int32> Siparis;
/** Array of actor references for orders */
UPROPERTY(BlueprintReadWrite, EditInstanceOnly, meta=(DisplayName="SiparisActors"))
TArray<AActor*> SiparisActors;
MyStructc1();
~MyStructc1();
};
``` try this
still icant find in this menu
if you want to expose it to blueprint, you have to make it BlueprintType
okey how can i do that
USTRUCT(BlueprintType)
struct KASAP_API FMyStructc1
#pragma once
#include "CoreMinimal.h"
/
*/
USTRUCT(BlueprintType)
struct MyStructc1
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(DisplayName="Siparis"))
TArray<int32> Siparis;
/ Please add a variable description /
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, meta=(DisplayName="SiparisActors"))
TArray<AActor*> SiparisActors;
MyStructc1();
~MyStructc1();
};
Compile with the editor closed
forgot the pointer before the edit, make sure you add * on the AActor so it points at object reference
a better way to declare it with more GC support is
TArray<TObjectPtr<AActor>> SiparisActors;
i get exit with error code 6 in visual studio
show the build output in #cpp
also install rider for easy mode.
vanila visual studio is almost like notepad...
i am using an object to run some logic, it uses a dispatcher to wait for data. however i think my object gets deleted by the garbage collector before it can receive all its data...
for cpp theres a simple variable to tick to exclude the object from garbage collection. how does this work in blueprint?
#include "CoreMinimal.h"
#include "MyStructTest.generated.h" //updated
USTRUCT(BlueprintType)
struct FMyStructTest //fixed
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Siparis")
TArray<int32> Siparis;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Siparis")
TArray<TObjectPtr<AActor>> SiparisActors; // Use TObjectPtr for UObject-derived types (UE5 best practice)
};```
Store a ref to the object to prevent it from being GC'd
so just make a variable X of type object and store itself in it? thats genius
Storing it in itself won't work. The GC removes anything that isn't linked to the world in some way. (There are a few exceptions such as the GI)
You're struct name needs to start with an 'F'. This is omitted when showing in BP.
11>structdeneme.h(11): Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 11>structdeneme.cpp(6): Error C2653: 'structdeneme' is not a class or namespace name 11>structdeneme.cpp(7): Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 11>structdeneme.cpp(8): Error C4508: 'structdeneme': function should return a value; 'void' return type assumed 11>structdeneme.cpp(10): Error C2653: 'structdeneme' is not a class or namespace name 11>structdeneme.cpp(11): Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 11>structdeneme.cpp(12): Error C4508: '{dtor}': function should return a value; 'void' return type assumed [2/6] Compile [x64] structdeneme.gen.cpp 11>structdeneme.h(11): Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 11>structdeneme.gen.cpp(20): Error C2039: 'StaticStruct' is not a member of 'FStructdeneme' 11>structdeneme.h(8): Reference C2039: see declaration of 'FStructdeneme' 11>structdeneme.gen.cpp(30): Error C2039: 'StaticStruct' is not a member of 'FStructdeneme' 11>structdeneme.h(8): Reference C2039: see declaration of 'FStructdeneme' 11>structdeneme.gen.cpp(97): Error C2039: 'StaticStruct' is not a member of 'FStructdeneme' 11>structdeneme.h(8): Reference C2039: see declaration of 'FStructdeneme' [3/6] Compile [x64] KASAP.init.gen.cpp Trace file written to C:/Users/cemeg/AppData/Local/UnrealBuildTool/Log.uba with size 4.6kb Total time in Unreal Build Accelerator local executor: 1.44 seconds Total execution time: 3.45 seconds 11>Microsoft.MakeFile.Targets(44,5): Error MSB3073: Exited with code 6 from command "C:\UE_5.5\Engine\Build\BatchFiles\Build.bat KASAPEditor Win64 Development -Project="C:\KASAP\KASAP\KASAP.uproject" -WaitMutex -FromMsBuild -architecture=x64"
check now, I fixed it
11>structdeneme.h(6): Error C1083: Cannot open include file: 'MyStructTest.generated.h': No such file or directory 🤦♂️
Needs to match your header file
change it to name of your file or change the file name
#include "structdeneme.generated.h"
also 3rd time, close error list forever. Read the build output.
check the tab next to error list.
11>structdeneme.cpp(6): Error C2653: 'structdeneme' is not a class or namespace name
11>structdeneme.cpp(7): Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>structdeneme.cpp(8): Error C4508: 'structdeneme': function should return a value; 'void' return type assumed
11>structdeneme.cpp(10): Error C2653: 'structdeneme' is not a class or namespace name
11>structdeneme.cpp(11): Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>structdeneme.cpp(12): Error C4508: '{dtor}': function should return a value; 'void' return type assumed
i think i have another problem
can you print screen without cropping
also paste the .h file
and don't be discouraged, I went thru a lot of syntax error at the start too.
after a while you can build with less error
where is your file and where is your .cpp file?
should i try to create new class
you don't need .cpp, just header is enough for struct
its in private header is in public
you don't need constructor and destructor
and that shouldn't compile?
just delete that .cpp file
then compile again
okey its compiled ill try in the editor
Always run from IDE
hit the play button at the top
If you really want to run from your uproject, set to development config when compiling so you don't end up opening outdated build.
still i cant found 😭
oh my bad
I had a node that got broken from changes I made in C++ ... it somehow became invisible in the graph. I've just been ignoring it ("out of sight, out of mind"), until now when I want another node to have the same name .. and you can't do that ...
Ideas?
@frosty heron @dusky cobalt thanks man its works
Struct FMyStructName for future reference.
Probably ask in #cpp
If you do name shadowing, then nothing good will come out of it. I guess.
I think it was affected by something I did in C++, but it's a blueprint issue, is what I would prolly be told
name shadowing?
, as long its related to cpp you have a chance of getting help
Name shadowing is when you use the same name multiple times within the same context.
E.g. having the same function name in blueprint and cpp
ah ok
That said I don't know the issue on your end
Probably give them screen shoot or some material to look at
still not works with c++
Do you know about using reroute nodes to straighten your connections? 😄
of course but i do this end of code
I tend to do it as I go ... keeps things organized, helps me think better ... just personal preference
you can just hit R to add them quick
It's not gonna magically make other problem go away.
Also looks like you are grabbing a copy there
did you have a idea how can i fix that
you need to get a reference, not a copy
you solved big problem so thanks
example
diamond pin = Reference to the struct
circle pin = a copy
so if you use the circle pin, the changes doesn't reflect to the actual struct you want to add but the copy.
okey but how can i do that with for each loop is there any way or i need copy the for each loop and create new macro
i create for each loop with ref version in new macro works well
is it possible to make it work or i need use map
hello hello, i'm having problems doing something that should be simple but i can't figure out what i am doing wrong
I want to spawn a widget on the screen at the screen position of an enemy, for some reasons , the project world to screen node always gives me a 0,0 coordinate when it shouldn't
Anyone had any experince working with the day night plugin for unreal, how is it possible to set a trigger in the DS_24Hour sequence I have tried adding two triggers in there to trigger a print string and send Interface call of event in the level blueprint but it seems there is issues as while I can get event calls from level sequence to call trying to get trigger in DS_24Hour sequence to actibate event in level blueprint is almost impossible, anyone have any experince on fixing this or know how to make it possible.
Are you referring to 'Day Sequence'?
yes
yes, I am trying to find a away once its dawn to trigger lights off in map and I put a trigger in the timline but nothing do is letting me communicate with the level blueprint.
Hello I have a small problem and I confess I do not understand, basically I have a BP that simulates a cycle day night. I made it so that I could control the duration of day, dusk and night. Everything was working fine so far, but I've integrated a system to have smooth transitions between the phases of the day. To go from day to sunset it works, but to go from sunset to night nothing, and the same from night to day.
I confess I don't understand why on 1 it works but not for the others 🤔
It's probably because it dynamically creates a sequence for updating the rotation of the directional light based on the parameters you've provided. The sequence you're editing most likely has no bearing on the day/night cycle. From what I've found (in the last 60 minutes of first learning about the plugin) DS_24 just affects the material for the sky dome. It's not even the correct length to account for a full day/night cycle.
It must be Day/Night cycle day. 😅 I've just learnt about the 'Day Sequences' plugin epic provides that creates a day/night cycle for you. It might be worth checking it out.
yes the Day Sequences' plugin is what I am using one thing I might not to use squence if I could find some way to just get current time and then have the intervalue trigger something in the level blueprint
You could probally use the 'Get Time of Day' on the sequence actor.
tried that , but all it prints out is 0.0
Is there a way to access On Click / overlap etc., using the mouse in blueprint using editor?
Not sure, as far as I can tell it should get the time based on the sequence that's playing.