#blueprint
402296 messages · Page 799 of 403
Where are you guys getting grants lol
also if you did most of the work for 2 years I'd have found someone else wtf
We wanted to build a team, learn hard while making some money meanwhile, have a target, all that. I strategized all of it and in the end, he just worked like a mercenary - only what needed to, didn't know how the game was until he played it off steam...
sounds like multiple plates spinning
@faint pastureEU Commission
a 2 year grant is pretty damn good regardless
We don't have that over here in freedom land, sounds sick tho.
Do you have to demonstrate something novel or can just any old hack get a grant to make a commercial game?
@faint pasture U want it, and don't at the same time. We had ridiculous targets & impediments for subsistence money (500 euros/month)
I can post the game here if it's fine with u, check out for yourself - it had to be educational, so I needed to get creative to convince them lol
It isnt'... Romania 😂
Wrote 300.000+ words in that game 🤦♂️ 😂
I got friends with PTSD from working there
heh... I live in Germany now, but still have a job as a lecturer in a Ro university for ... another 500 euros/month 🤣
actually a little less than 500 lol...
why not get a job at a german place?
more like 430
Funny enough I live in the town where BMW has their North American manufacturing plant.
nobody will have me with my qualifications w/o knowing the language at a certain level, besides, I want to make it by doing what I like honestly 😄
fair enough
so B german won't do to teach shit...
it needs to be top notch, and I just... can't man 😂
weird given ur name is after a Hamburg station 😛
love hamburg, my fav city from Ger - as a visitor tho
someone got the ref
😛
I live in Augsburg 😂 let's switch lol
nope, flooded with my compatriots and others
the biggest romanian community in germany is in Stuttgart
ofc not, it's irrelevant if u don't know the romanians lol
look... I was earning more in RO than I am now, we left because of the people there man...wow! just... wow, nvm.
I've heard stories
and we came from the best part of it - the west. You don't even wanna hear stories about the south and east - now that's hardcore thuggery
lol
aaanyway, I'll try to see if I can get some artist(s) with my next grant. Btw, if the same grant would've been hired me from a german organization, the salary for the same job would've been 2.2k euros instead of 500
EU citizenship for u in a nutshell
so i'm new to this engine and wanted to know if it was possible to change the specular values on a texture? i can't find a good answer anywhere
this is all i have
You can Multiply specular and then plug it in
So I have a direction vector from my camera and direction vector from the tip of a weapon, what is correct way to find the resultant (combination of the 2 as a direction)?
This is weird
When I add a Vector variable to an actor in blueprints, it's rotated
Like it displays it's location in the editor relative to the actor's rotation
(v2 - v1).Normalized()
yeah... that's how things work inside actors
anything you put on the actor will be relative to the actor
yea it is weird although I guess I can use something like this
that way I can get the locations in blueprints as I see them visually in the editor
it is weird though (seems convoluted)
@agile edge those nodes above the execute node are triggering lol
I had to summon my computer graphics 101 matrix math to make it match what i see visually in the editor
What is the normal convention? I guess I'm more used to C++, Python, Java, C# (not visual scripting)
I thought I was making it more compact
Btw I wish they made blueprints easier to edit as text. When you copy a blueprint and paste it in a text editor, it pastes text but it's so verbose
I do it like this. Same idea just below. Feels right.
idk why this is better though
Maybe it's like passing arguments to a function. Function name (arg1, arg2, arg3). Reads top to bottom and left to right
I just like it better. I also never drag pins off of sets, just get the variable again. Logically the same thing but cleaner.
Loc1 and Loc2 already exist so just get them instead of spaghetting the pins all across the graph
I have a node that needs refreshing when starting unreal
Upon refreshing I see this and all is well until the next time I restart unreal
I suspect that there is a cached version of this node somewhere in the project files that it keeps reverting to, though I'm unsure where to look for that
I've not used hot reload
Have you tried to delete the node entirely and recreate it and hooking it up as needed?
Yes, I've also tried deleting the node, saving, closing the editor, restarting the editor, creating a new node, and then saving & closing the editor
did not work as well
can you set the dilation on a timeline as an input
oh maybe I can just set the actor dilation
is there a way i can destory an AI when its dead to save resources but leave the ragdoll skeletal mesh on the ground
This is a mixed blueprint/animbp question, but I have a animbp which sets the bone locations of two bones in a skeletal mesh (rope end points). Anyway, I noticed when moved, the refresh of this is lagging behind quite noticably. Is this just down to how often the "Event Blueprint Update Animation" runs? Is there any way to mitigate this? 🙂
hi guys how can we change graphics settings in game like going to settings and changing graphics like high, low, epic something like this ?
without changing in cmd
This is also causing the same error when packaging the game
guys can any one help me?
you can unpossess the pawn then destroy the controller
Seemingly fixed it for now by renaming the pin, compiling, and resaving. does seem to do with old cached variable type
haven't done it yet, but there seem to be youtube videos for this
i see so thatll leave the body there because its destroying the controller specifically
Thank you I’ll check it out tmrw
Like this? This didn't quite have the expected result
Can someone tell me how to understand the blueprint code please. I know how to make stuff from remembering tutorials but I can't do what Matt has just done FROM memory without one
Any easy way to think about it?
I'm trying to do something I'm sure is really easy for others, but not sure what I should be doing. Basically, trying to make a cube rotate in a circle like if it was on an invisible Path. I figured I can do something like get the actor's forward vector and do an offset on tick but what I'm doing just causes it to move in one direction out towards the horizon:
How do I replicate widgets so I can send/recieve information from the server?
I tried this and the event never gets sent to the server:
Could just add a rotation at the same time. So add relative rotation to the Z axis at the same as moving forward.
is there an easy way to remove the acceleration that seems to happen during a blend when going from an anim with root motion to your walk or run state
oops bp chan sorry!
well maybe its bp related too
lol
i think i found it
oh hm i removed requested move accel but it still maintains no movement during blend.
I got this weird ghosting - it's not motion blur, as it's turned off.
But it's kinda like MB - anyone have any ideas? It's a new project on UE5, so probably some kind of post processing effect I'm guessing.
i added root motion to the anim but it still eases in. its being called from a state machine . i dont see the ease in/out options that are on montages
oop - sorry, was AA.
Sorry, I'm not sure I'm following. That's what I was trying to do with the RotateVector?
why are you not using a timeline? tick is kinda expensive and the timeline would make it a lot more easy imho
imagine it like this: you need to have the actor move forward and backwards (or side to side) first. like +1 to -1.
then you have to move the actor on the second axis too.
and then you realize you are talking shit
xD
wait
Simple question, how do I make a widget animation play on a button press and/or add it to the character as necessary?
Just a blink animation, 2 bars come in and out of view in a fraction of a second.
I don't know how to tell where I should put anything like level blueprint, character, gamemode and all that, but I can't seem to just add it to an f key already (pic).
Tried Adding it as a custom event that just has play animation but I figured it needs to be added first (Don't know where or what) and I don't know how to play a custom event as I'm trying to do, which is probably the wrong way.
given Forward Vector X, whats the proper math for adjusting it according to a normal vector from a trace hit? I cant seem to wrap my head around it
create the widget first, then add it to viewport and then you can play blink too.
either add it on begin play, save it as a variable or have some "is valid check" if you want to create it the first time you press F
ue forward vector is 0 or 1. so just multiply with a float
For the rotation issue, couldnt you just use Polar Coordinates?
multiplying by float will just adjust its magnitude, not its direction
then you cant use the forward vector and have to do the vector math for the direction you want
Which is what the question is about 😛
atleast, was intended to be about
seen in 2d space, this is what i want to achieve, (it's in 3d but hard to demonstrate)
Given the root of the BP actor is on 0,0 and the object rotates around it, I guess this should be possible
x = radius cos "degree"
y = radius sin "degree"
Meaning you could just start off with degree 0 and just increment it over and over returning the x and y coordinates
he means this
but if you want to ahve something move predictable in a game context i would not use this method, id use a spline, attach the actor and make it move along the spline
https://www.youtube.com/watch?v=bWXI91FdMtk <- like this
In this video, we show you how to make an object move along a set path using Splines. We also show you how to control the speed of the object, it’s starting position and looping options.
is there no method to check if a material is an instance of another material?
How do i check if a text box is empty ?
equal None or check the length
ok ty 🙂
the math is correct. you can try switching the vectors. if it still doesn't do what you want perhaps the solution isn't this
I can't seem to make this node work with any input type event it works with beginplay but nothing else
Feels like this can be optimized but atleast it works now (Y)
If it doesn't work with input, you're trying to do that in an instance that doesn't have input enabled. Or something else is consuming input before that instance.
Cross multiply 1stTraceDirection and Normal, then cross multiply that result with Normal again (maybe a more efficient way to do it exists?), that should get you the 2nd trace direction
2nd trace start position is the hit location + normal
Get normal and get initial right and then cross product?
Is it dot or cross, I can never remember
Some combination of that anyways should get you what you're after
Ill give it a try, thanks ^^
Cross product gives you a vector at right angles to both inputs
so the first cross will give you 2ndTraceDirection.Right
thanks a lot!
2nd cross between that and Normal will give you 2ndTraceDirection.Forward
not sure on the input orders, just mess with it
for the love all that is holy, use the parameter variables
ah you do
I usually leave the pins on the start node empty
I should be more consistent with it, thats for sure
I like the distinction of not using them on the start node because they show up more as reference
I also do a lot to tier blocks so that you can clearly see the step by step calculations
That makes sense. I tend to do it more if im making it for others than for myself, not really sure why. It's not like it's easier for me to follow a stack like this when its not tiered properly 😛
I do it for myself as well as for others
nothing worse than opening a function you made 6 months ago and go "what the f was I doing"
I've been caught in that trap way to many times already, one would expect monkey to learn at some point
the glorious result!
as in, GetPath didn't work out?
get path isn't accurate enough
going up that slope gave me 4 path points
its respecting step height upwards,
but not downwards
so my ai cut through terrain like butter
very strange
costly
interesting
so im testing 1 uu above ground , and if it doesn't hit i trave below ground,
if neither hits, it means i've safely arrived at target
well here's hoping it's not too expensive!
It seems fine, and all path request are queued, so i think it'll be alright
I could probably move it to async later on if needed
guys, may I post a youtube video explaining an issue I have?
even though my english sucks, it might be faster 🙂
thanks a lot in advance for all the help
I just can't figure out how to fix this issue (or if its even fixable at all)
I'm starting to think that using a light is not the way to do it at all
k
.5ms at some bad scenario with uneven terrain at a relatively long distance was more than expected
that per AI?
per path request, so currently once per frame
Well, was it?
just compare them to a known location ( the ground below f.ex)
If they are wild, perhaps using the Impact point is better?
look, if i just print the location
i get all these numbers
without moving the character or anything, of course
print time to 0.0 gives me this
i don't like this at all hahaha
the distance also gives me these 0s I don't know how to interpret them
How is the lifetime of objects created by "Construct Object from Class" managed? GC, ref count, manual, 1:1 to "Outer"'s lifetime...?
@spice smelt Usually by hard references to it. Also do not use that for most things. Most objects have their own construction functions.
not objects i make
I give up. THe same actor is giving me all those distances with 0 on them. I mean, its a line trace, once it hits something it should stop giving me the distance
Makes me wonder whats infront of the trace
if you have some code that makes it so, then it will 😛
enable the built-in drawing of traces
I mean...I'm doing it from scratch to see whats wrong
aye aye...the thing is I was playing with these assets just to learn, and came into this issue
for all we know there's a loop with invalid vectors coming in
i see like a 128*200 pixels image or something xD
Zeroes sounds like you're not checking if the hit blocked
You're not checking if the hit blocked.
Uninitialized float == 0.0f
whats calling this function?
i took everything out
even with this, it gives me the 0s
the event is being called by the tick
I had it on a timer before
i prefer to know it all
LasterStart, is that a scene transform?
usually one wants to go a tad outside of the mesh to ensure no weird hits
thats it
This was just a test, nothing serious...but I still don't get why it's not working
Can you print the hit component? Because if distance is zero and it's hitting something, it has to be finding something immediately.
the amount of prints doesnt make sense to me tho
it should only print once , regardless of hitresult (now block by an actual hit, but still just once)
I know, that's what is troubling me
the hit component is giving me all this
hmm
try to: start == end > to string > print string, make sure it's false
also you ignore the character, but if the character is attached to another actor and it's inside that actor, the trace will collide with it
try enabling drawing like in my picture, it can be helpful sometimes to find stupid errors
this is the hit the debug line gives me
so...I still can't understand why all the other components
Let me do something. I'm gonna make this from scratch
then you're definitely inside some collider which isn't the character itself
is the character holding another actor right where the ray starts from?
yes, I took it out and put it on the floor just to get out of its way
and now it works?
;-;
don't bother anymore man
I'm doing it from scratch
playing with a scene made by others when I don't know that well UE is not the best practice
just wanted to learn how this guy did the laser sight
thanks again for your help
gotta hate edge cases. Loop detected
Hello. I have a question about a scene capture component. We've changed the FOV system of our game to vertical lock (from horizontal lock default) but the scene capture components still seem to be using the old default horizontal lock system. How can we change the scene capture components to also use vertical lock as specified in our defaultengine.ini file (like normal cameras) ?
is there a way to get a reference to a struct instead of the whole struct in order to change individual values from outside?
there's a set struct node that allows for individual pins to be exposed and set
I can't find it 🤔
Why do LineTrace nodes have a "Return Value" boolean to determine if there was a hit? Could we not use "Is Valid" on "Out Hit" instead?
@crisp lanceBecause it's just a wrapper around a C++ function which does the same thing. You'll often use them in if statements like the following.
FHitResult TraceResults;
if (GetWorld()->LineTraceSingleByChannel(ArgumentThingsHere))
{
// We know trace results are validly populated here.
}
uh nevermind, why doesn't it use TOptional? 🤔
It possibly could. But bear in mind trace code is probably ancient. I don't know if TOptional is.
Hey guys I need to play and stop a timeline many times during my racing game, How is it possible that the third number is always a 0, 3, 6 or 9? I got 5.483, 5.500, 5.516, 5.533 bla bla, is this normal? I am doing something wrong for sure 😦
Framerate most likely affects it
if you run at a consistent 60 fps or such for example, the play/pause would generally hit at the same fraction of a second
it's 60 fixed, how can I fix this?
How can I use another character in my character customisation made using skeletal meshes?
that's the nature of floats
Does the fact that this number pattern is showing up make what you're doing not work?
Hi. Anybody experienced and issue/bug with binding to a delegate in blueprint where the function to be bound errors out with having non-matching signature ?
it's not a bug, your event or function needs to have a matching signature
I don't understand what you mean sorry
@wary tinsel Why do you think there is a problem with it? Is it not working correctly?
If it works correctly I don't think there's anything wrong just because the numbers hit certain fractions
okai
Hey can any one help me out with something? I have a blueprint with a bunch of static meshes in them and am trying to make a check box to toggle the visibility of those static meshes but i can't seem to figure out how to do that with toggle visibility i have a bool with a visible parameter hooked up to a branch but the toggle isn't doin g anything
Could you share a BP screenshot
It's not connected to an event or function.
So I'm not quite sure what you're trying to do with you variable, right now it's not doing anything other than being set to false which makes your condition not execute any code. Try this:
Just making a check box to toggle the visibility of different static meshes in my blueprint
through the details section
does this toggle visibility only work in the actual game ?
Why not just click on the component and set it's visibility?
because that will trigger it on every single instance of that blueprint
unless you're making an editor tool, code only executes in game
Anyone knows if you can get more info of the stacktrace when a Game crashes within a BP? Now I'm getting something like MyGame_Win64_DebugGame!ProcessLocalScriptFunction() and I'd love to know which BP or function is that
Ah. Then you need to handle that in the ConstructionScript.
Check the bool there and set visibility.
@random crow What is the crash reason?
hmm it seems to effect every instence what i want might not be possible
Assertion failed: Result [File:Runtime\CoreUObject\Public\UObject/Stack.h] [Line: 252]
Launch from Visual Studio or Rider in debug mode
most of the time if a BP crash occurs, it will break execution where the crash happens
at that point you can try to inspect the variables that are in scope, or possibly lower in the stack... they sometimes contain the name of the BP currently being executed
Ok, I'll try that, I don't have the debugging symbols for the editor installed right now, but I'll check that way
@hazy cobalt I'm still not sure why you need that. Drop your actor into a level. Click on it, select the component you want hidden and find the Visible property under Rendering.
it effects them so i have blueprint that is made up of an 4 static meshes
and i wanted to be able to toggle visibility of different parts
to have variation of damage
You can select different components.
the issue is it effects every single one of them
Not if you place it in the level and then do it on the instance you've put in the level.
Drop your actor into a level. Click on it, select the component you want hidden and find the Visible property under Rendering.
I need to change the blueprint from harvested
let me google if that's possible
only hides in viewport not in actual game
:/
What setting did you change? If you change the visible thing in rendering it definitely affects game and not just editor
there is a separate visible in editor checkbox iirc
Hey, anyone free to quickly verify if my BP logic is ok? It's very simple, just onoverlap and endoverlap with a do-once and reset for curtains - if I'm in a curtain's collision box, it'll draw the widget telling player to press button and on exit it destroys it.
What happened is that before I had a do-once, it would draw thousands of widgets everytime I made contact with the triggerbox. For instance, since the box is a box and the player capsule is a capsule, that means you make some slight contact with the edges of the box as you move around or whatever. I noticed that the remove from parent node could not keep up, there were always more that were drawn and remove from parent would not remove all of these. I don't know why but this is what I observed. I fixed this by putting a do once and resetting everytime I left the box, which worked everytime ... until now where I packaged my game and gave it to someone for testing. They went to a curtain and no problems were had but then one of them had the widget frozen on the screen meaning something happened that wouldn't remove all the widgets. I can't figure this out why it's happening.
When using the Get Game Instance node it is returning the Engine's default Game Instance object instead of my own Game Instance Object I've set in project settings
any idea why?
Thats how the getter is set up
You need to cast to your new type yourself
Any idea why this cast is failing?
WW_GameInstance is the game instance set in project settings
@earnest tangle yes there is actor is hidden in game
but you can't apply it to the child static meshes
only the the actor as a whole
You definitely can, it's called "Visibility"
There is a node also called Set Visibility which changes it in the node graph
because I need to translate that time into 00:00.000 format and the last number is always 3, 6 or 9, it's not accurate that's all 😦
How is it not accurate?
Yes but my issue is it changes all instences
Show a screenshot of what you're changing I guess
if i perform function from parent bp i dont get those var values in child bp?
Are you changing the value in your blueprint or in the instance of the blueprint in the level?
same bp, same event graph
milliseconds are always .133 .256 .239 .253 .246, no matter how the last number is always 3 6 or 9 not so cool for a racing game
Ah. Try locking your framerate to something else to see if that affects it
in the blueprint that visible doesn't exist on the instance it setlf
only to hide the whole thing in game
not to select the children individually
was that affecting the timer...thanks a lot dude 🙏
it was the framerate dude but thanks 😄
Is the "taking an output pin twice will execute the BP node twice" always true?
If I take an output pin twice from a SET node, will it be harmless, or will it also call again the node before the SET ?
Thank god, for a moment I thought that some lazy programming chaining madness might happen.
Thanks for your answer
Yeah I can imagine.
for some reason functions do have access to parent class values, but calling them from child somehow gets their new instance and getnnone
what do i do wrong 😐
should i call functions from child class and do a lot of ctrl-c ctrl-v for every child this way
@twilit gull If you have a parent class and a child class, and you're calling a function in the parent class, and getting parent class values instead of what the child has set those values to, then your instance is a parent class one, not a child class instance.
no, i mean:
i have function that i setting up value for var
if I call another function - it has its value
if I try to reach this value from event graph - i get null
Print the displayname of the gameinstance
Setting Game Instance to the Engine's default Game Instance, and then setting it back to my WW_GameInstance fixed the problem 🙂
same goes for child, its not getting this value while being inherited
but if i set up value from event graph with, for example keyboard event it gets it and holds it.
and if i set this value after calling the event, also in event graph, i don't have this value anymore
don't use child actor components
they are notoriously buggy
and perform badly
thats string 😦
Still have to be careful
Basically any time a pure function is called by an impure function it runs (which becomes logical once you really understand how the code runs: if I get the location of your character and manipulate it, and then the next impure note gets your location again and prints it, it should be different. Even if you use the same get actor location node)
If you have a big pure function, it's better to save the results as variables and use those instead of running the function over and over again
Except if you need the result to be different every time you get the informatiob
Or use a pure function which caches the result
I will try to keep that in mind, especially as I need to implement a few functions involving randomness.
Doesn't that go against the idea of pure functions, to be stateless/depend only on inputs or something?
Impure I meant
Also BP pure functions aren't really pure unless you make them const
Try using a set node
It works
Unless you use constant function
Well a set node on a local variable would be fine for purity, but it even works out of the function scope? That's weird.
Is there any real disadvantage to setting variables in pure functions though
Except that they can be easily abused if not careful
In BP I mean
No disadvantage. It's just very odd.
I guess I did do that but I used the variable only within the function
It's confusing as hell for anybody who knows the original meaning of pure function.
Would that be considered a local variable?
The function still only relies on its inputs to determine its output so it is theoretically pure, but it's not implemented as such.
Concerns about scalability later and people being able to work on the same code base with you are the biggest concerns and the reason there are such explicit ways that things are supposed to be done in certain ways.
Yeah I'll do that as well, can't hurt.
Hey all...I have a blueprint class I created for a window...it has 4 meshes (frame, sill, upper sash, lower sash). in my blueprint, I created a variable for OpenRatio which is float 0-1. I'm multiplying this ratio value by the maximum z movement of the lower sash (76.2cm), and applying the result to SetRelativeLocation Z for the lower sash mesh...My question is: My building has multiple sized windows (smaller ones for upper floors, etc). Should I create a different blueprint class for each window size? Or add the different size meshes to this window class and have another variable for window type?
I don't know the context you plan to use this is in, but you might be able to use an interface with 2 functions (open window and close window) and then each bp has it's own implementation of the interface. idk if this suitable for your use case though (this would mean each window is a bp)
Rule1, don't repeat yourself. All these classes do the same thing. Should be one class with a switching mesh. Meshes should be SoftObject Pointers.
I haven't really streamlined the final use case, but I actually envisioned a trigger with a drag action of sorts to raise the window using the mouse...haven't gotten that far into the engine yet to know if it's possible...I just want to know if I should make a separate class for each window size
Now you're talking...now I gotta figure out switching mesh and softobject pointers, lol
Here's my current script
It's much cleaner just to specify some differences based on the window itself. Choose what you want your key to be. Can be a Name, GameplayTag, Integer, Enum, whatever. If you really want to cleanly implement, have a couple of maps in a data asset and let that window class get the static data from that data asset via a pointer in it. You can specify each window's mesh, size, etc in the same data asset and change your logic based on the key you choose to represent each window.
You end up with no extra useless data laying around per window, and a window that can be thousands of different types with two classes total.
Question, Does BP not support the use of a switch statement on something like a damage type?
Damage Type enum?
So this is like week 2 for me learning the engine...I know a lot of the words you said from a C standpoint...but from a blueprint standpoint and in UE, I am nowhere near ready to do that...you wouldn't happen to have any examples of this type of setup would you?
Specifically the object type
cannot get my punch collider to interact with a player character by hit or overlap, anyone have an idea what is going on here? it works fine with other dynamic objects it seems
these never trigger
Is it possible to extract/copy the functions inside a broken blueprint without opening it? (trying to open it results in the editor crashing)
@spice smelt did you try and open it in a blank project? might open for you that way
Or copy the bp in the project (breaking references) tend to work in some cases
I changed a variable type, which I think broke some reference and makes the whole engine crash
Doesnt let you fix the original tho
Hmm. I don't. I don't really follow tutorials that much. Basically to start, I'd start with data assets. They're a key tool you'll need to keep static data organized. Static data being data you can get from anywhere in the engine in BP. A Data asset is two parts. One is the actual class. You create it and specify your properties there. And then you create an Asset out of that class which acts very similar to static meshes. You specify a Data Asset pointer property on your window and then you populate that property with the data asset same as you would do if you create a Static Mesh pointer and then populate it with a mesh. This lets you get your data from the data asset directly in the window class.
@full flaxAlso on the remark about pointer types.
To further cover on that a SoftObjectPtr is just a WeakPtr and a path to where the asset is on disc so that it can load it up, but not force it to stay loaded.
so I'm creating a DataAsset and it's asking me to pick data asset class?
Did you go to Misc -> Data Asset?
yup
You'll need to create the class first.
Right click and create new blueprint. Search for Data Asset there.
this is separate from my window class right? I'll add the pointer to the data asset in the existign window class?
Yep.
All total in the content browser you'll end up with two classes, Window and DataAsset, and then also an asset of your DataAsset type.
PrimaryDataAsset?
Hi, so I have animals.. And I'd like to have a radius sound attached to them. Is this just the normal audio component or should I just play sound cue and it will work? How does this sort of thing work with actors?
That'll work fine.
moo
I guess it depends on how you want the sound to work
you'll still have to query it
I'm learning! So to start with I just need to create an enum for window type in the data asset class?
The idea is its louder when closer to the cows, not so much further away, and doesn't play constantly so there is a random delay
which i think leads me to just doing a begin play play sound node
but how does that deal with distance?
yeah.. just found that channel
there's a bunch of stuff that I had to setup to get sound to respect environment
@full flax If you're going to choose windows via Enum, then you'll probably want to start with a map of Enum/SoftObjectPtr to the mesh. It may also be worth creating a simple struct that you can use instead and map the enum to the struct. Then in the struct you can have a property for each changeable thing about the windows. The multiple meshes as SoftObjectPtrs, Size, etc.
Also as a side note, bear in mind that enums stop at 256. If you have any plans on long term scalability keys like FName or FGameplayTag is a lot better.
I have 10 total window types for the building, and that's all there'll ever really be.
you'll be fine
which woudl be the best way to do it?
Enum will be fine then.
which is good because FNames are a pain in the behind
lol nice
holy crap...there's a long list of enums for variable types or is that not where I create my enum?
You create that in the content browser if you're blueprint only.
Under.. Blueprint? If memory serves.
I think so
Been a while. 😄
the layers keep adding up...trying to follow along...ok so I created an enumeration...let me add some types.
Hmm. Not a bad autobiography title. "Programming. The never ending Onion."
I could do this in my sleep once I learn the api in C...C++ a little tougher...Blueprint...never heard of her...but I am tryign to learn it for my day job.
archviz?
no, aeromedical research...I'll be doing simulation vizualization and a lot of cognitive distractor "games"
the archviz is for my side project, which is the asylum building I'm learning with.
ok...so I have my data asset class and my enum...I need to add the enum to my data asset class right? is that a node or a variable?
Thanks for your help!
Aeromedical is stuff like Spatial Disorientation, Hypoxia, Fatigue, Motion Sickness, Color Vision, etc...anything medical related to aviation.
it's a pretty cool job, lots of cool toys.
@maiden wadi do I add the enum as a variable or a node to my DataAsset Class?
as a variable
ok...so if that's all I want to start with...where do I go next? Do I need any blueprint nodes in the DataAsset class or just the enum for now?
tbh I haven't been following the entire conversation, but is this so you can easily swap out windows?
yeah...I was asking if I should create a separate class for each window even though they all have similar function
He presented to me the proper OO way to do this, but it's way deeper than I've dove thus far...
I mean I would probably have settled for the enum. but I'm not sure of the full scope here
data assets make sense if you're making complex actors
Isnt the enum to define which data asset to pick ?
not sure if they are relevant when just picking out static meshes
ah like that
perhaps
with data assets varying depending on the need of the windows?
Well there's also the amount of vertical movement the sash has to move to be all the way opened
I've never done data assets, so i got no clue, but i'd imagine something along those lines
not sure why a struct wouldn't be enough for that though
so I need a different data asset for each window type?
but I guess data assets are the rage
If they're very different i guess ?
I have 10 window types, only three of them have the ability to open.
a difference instance of it I suppose
and the open amount is variable
if one slide up, one opens inwards from mid, one opens inward from top etc etc
I'd handle it through a struct that you can then make into a data table. but maybe that is now considered "old school" 😔
enum for selecting dataAsset, to minimize variables?
so I need a dataasset class with all the variables in it. And a datasset asset for each window type?
startign to sound like overkill for windows, lol
yeahhh
if you want you make a WindowStruct instead
populate it with a static mesh class and your variables
and turn it into a data table instead
Do I still need the enum for selecting which window?
yep
How would that work with just a struct?
with a data table the only asset you need is the table itself
I guess there's only so many ways to open a window,
and the struct used for the table
so it should be fairly limited
then you can just create new rows of static data
it's a 19th century building, so there are only a few ways to open the windows, lol
Hey, I'm trying to fill up box with some potatoes (3 different meshes). I have very precise collision for potatoes meshes and I would like to fill up box randomly. In addition I would like to use Hierarchical Instanced Static Mesh bcs of optimization. I was thinking about spawning them randomly and simulate physics on them but HISM doesn't allow to simulate physics on meshes. Any ideas how to do this? Finally box with potatoes will be just static thing and it will stand on the floor.
Then a struct will get you a long way
Some enum or data table row handle for picking the window type, which has the mesh and data you need
if HISM doesn't allow for physics then I guess your only option is a regular static mesh
ok...you keep mentioning adding the mesh...each window is multiple meshes...(frame, upper sash, lower sash, sill)
ok, do I make the struct in the content browser?
yessir
yeah, same as with Enum^^
sweet
so basically create a bunch of StaticMeshComponent soft references
for each of your construction types
Ahh, it sucks then :/ Maybe I can somehow transfer transformation from regular static mesh to HISM array? In this case I could just randomly spawn potatoes, simulate physics on them and after simulation copy their transform to HISM array?
That would work, but depending on amount would be quite expensive i imagine
I would just do it once, and then, after copy, use only HISM
what if the potatos move?
they will be static thing, as I said
I'm just trying to figure out how to fill up box
try it I guess
So in my struct I have: WindowTypeEnum, CanOpen (bool), OpenCm, HasSill (bool), and now I need to add the 4 mesh slots?
Ye, I'll. Just thinking out loud 😅 Anyway thx for help!
yep
Make a box. Make an actor that is a potato. Spawn hundreds of potatoes, simulate physics, fill box. Have editor function to save transforms of potatoes in box. Delete last two actors.
Create new actor that is the box and an ISM. Use transforms to spawn ISMs at said location at runtime.
Static Mesh or Static Mesh Actor?
so I have the struct...I need to make a data table of the struct and add that to my window class?
as a variable
Nah. Only thing the window needs is an enum.
Struct should go in the data asset. Should be a Map of Enum as key, Struct as Value
You create the map in the class version of the Data Asset, then you populate the Map's values in the asset version of the data asset.
I gotta admit I don't get the data asset part of this
I would just use a data table
but maybe there's some fancy stuff about data assets I don't know
Enum to name conversion is ew.
Unrelated; Would it be cheaper to have a UObject with a vector and a rotator, compared to moving an Actor with a transform?
Much easier just to have a map.
can just include enum in struct
I might go the data asset route when I learn more...but enums are familiar to me...
where do I create a data table?
Content browser
Then you have to reinvent finding functions the map already has. Learning Data Assets is a good thing anyhow. They're extremely useful in the engine.
I believe it's under miscellaneous?
Ahh yup...
Datatable searching is only cheap when you already have the key. Otherwise you're iterating over every value. Trivial in C++ with pointer returns, but that returns copies in BP. Costly.
I don't disagree with the usefulness of data assets, but I wouldn't store everything in a TMap
default values for collection types in BP are surprisingly finicky and buggy
well we're talking about a set of perhaps 10 types
I deal with UI all day. 😄 TMaps galore.
@odd ember so I can delete the static mesh components from my window class and pull them from the struct?
you still need them
Hmm.. I wonder if UE5 will have SetMeshFromSoftObject.
it would be nice
I'm using UE5...I can look, where is that supposed to be?
On the StaticMeshComponent
I find it weird that UI has that and something as core as a Static Mesh doesn't.
@odd ember I guess I'm confused again...where in my window class does the data table go and how do I switcheroo the mesh based on enum choice?
Datatable works same as the DataAsset. Just make a pointer to that type and set the value.
data tables are external to your class. you use them in functions like GetDataTableRow
or add them as a variable
as said above
Oh yeah, that is a Static call isn't it.
To be fair, he'll still need the table pointer. Needs to get the Names Array.
ok, I have the data table logic built I think. I'm gettign the row based on the selected enum value...I then BreakWindowTypeDataStruct which gives me all the values from the data table. Now I need the mesh switching logic...should I be dynamically adding the meshes to my actor class from the struct row or do I need to already have existing meshes that I change out?
Here's my logic thus far...the HasLedge, and CanOpen logic will depend on the mesh setup stuff...As you can see I only have the large window meshes in my components list....but the small window, which is row 2 in my data table has references to the small window meshes.
Components are just a wrapper. They're the class that displays a mesh at a location. You can put different static meshes in the same component, just not at the same time.
So in this case. You would get each of your components, and call SetStaticMesh on them after calling LoadAssetBlocking on the softobject pointers in the struct.
You can also load the soft objects async, but it's a little trickier.
And there is no one active there hahaha
patience
Is a virtue
LoadAssetBlocking return value is not compatible with new mesh?
Cast it back to StaticMesh
Yeah 😦 im being super motivated haha, one of those coding storms and knocking out lots of things.
Here's my first stab at it. Thsi is in construction Script, so it's not changing when I change the window type variable...what do I need to do to get it to change when it needs to? Event graph? @odd ember @maiden wadi thanks for the help thus far...if this is horrible work, please tell me 😉
It should change there as long as a table row is being found.
This was one reason I was iffy on the datatable method. It requires you to look up the struct by iterating over the datatable.
how can i cast to random overlapping actor and get inherited variables?
Casting just changes a pointer type to another pointer type. It doesn't actually communicate with objects. There should be a function that allows you to get the instances of overlapping actors, a few of them. If you have a specific mesh, use that and GetOverlappingActors. If you need to do it without that, use something like SphereOverlapsActors to generate a sphere and test with. Some of those come with casted arrays. Otherwise you just iterate over the returned array of actors and cast the pointer type to the one you need. If it succeeds, use the data.
well. i need to get specific variables from random actors in case they are implementing interface
and there are multiple possible classes inherited from one main that contains vars i need
So cast each actor from the returned array to the main class your variables are in.
How do you even simulate a construction script? It's not changing when I change the enum.
when is the construction script triggered I mean
Sorry for the interuption! I am a bit confused. How does Get Velocity work? It remembers my velocity before lerping between two locations why? The zipline is clearly nopt going in that direction...
when I run simulate it doesn't show anything happening
because it is already constructed
You can open the blueprint. It'll run whenever you compile. Or whenever you place a new instance of the actor class in a level or move it in the level.
its not begin play
it happens even before game initalizes
its when it is
"constructed"
yes...so therefore, when I place the class it runs the script...then when I change the window type variable, nothing will happen because it's already constructed...I need an event right?
Changing instanced editable variables will rerun it. But you don't have to place one to test it. Just compile the blueprint.
or if i cast till the parent class it will do changes in inherited child class this way?
cus variable value is specified in child class
not in parent one
I would set up an interface function in the parent class that returns the variable you want, which then is valid for any child class from that parent.
That way you aren't hard referencing the entire game so easily.
It doesn't have to be set in the parent, as long as the variable exists there. Then probably check if the variable is valid just in case.
Why would you create an interface for having a child and parent class communicate?
Thats not parent/child
Thats actor overlap and get vars from it 😦
casting not leading to the variables i need unfortunately or i'm doing that wrong
Do the actors you're trying to get the variables from all inherit from the same class, which is originally where the variables were specified?
Nope, vars are specified in child actor class that i'm interacting with
Wait. When you say child actor, do you mean class or child actor component?
I have this structure:
Parent BP, that have var1 = None, var2 = None
Child BP1 Specifies other stuff
Child BP2 where var1 = blahblah, var2 = blahblah
And these are what you're overlapping?
And i'm overlapping actor made from Child BP2, yes
Then you can cast that overlapped actor to ParentBP class to access the variable.
but i get None
From where?
get overlapping actors gives me Child BP2 if i cast to its parent i dont get specified vars
but i cant specify cast to Child BP2 cus there can be other actor with those vars, but have different values
If you're casting to the parent class and getting the parent class's values, then it's an instance of the parent class or a class that hasn't overridden the values.
Sounds like values are defined in the wrong class?^^
That or you're trying to access class default variables, or you're trying to access a nullptr, and mistaking the value returned none as a set variable when BP is just returning an uninitialized type.
If you're actually overlapping an instance of Child2, and you cast that instance of Child2's pointer to ParentBP, you will get Child2's values.
hmm, should i somehow setup parent class for that? like abstract class or smth
You already have, that's what your ParentBP is that has the variable created in it that you're setting inside of Child1 and Child2
Cast the actor pointer to a pointer type of the parent class, not the class itself.
That's why you're seeing the parent class values, you're getting CDO values.
Drag from OtherActor, CastToWeaponBPMain
Should give you a new pointer of type WeaponBPMain, you can drag off of that to get the Hold value
Every day I get something weird with simple things... I have a simple teleport actor from point A to point B. Debugged everything, the values match, the actor returns the proper values, but it just doesn't move...
Any ideas? 😮💨
Will an array find node throw errors if the item in question isn't valid?
Like is it worth doing a contains node and branch before it or is that redundant?
@astral epochIt will return accessed none if that's the question, as soon as you try to access info. From 4.25 or 26 if the array is empty it will simply early exit, before if it was empty still returned errors.
Or were u asking about the Array Find node? Then no, if any of the items u search are not valid, it will just ignore/skip them, and will return -1
I mean this thing
Inputs an array and an item to search for.
Though I'm thinking just validating that the item exists is worth doing anyways.
I'm using it in an event to essentially remove an inputted item from an array. Said item should have a particular index.
@astral epochye 😂 sry, misread the first time. I had a bad experience with that unless it's simple data (ints, strings, names etc). For actors I got weird results 🤷♂️ And don't get me started with structs. But it works well with simple data
Right.
Why not just simply call Remove?
Because I want to retain array's size.
So setting the array element to null works better here I think.
Ah. Yeah. I'm fairly sure that passing -1 to a SetArrayElem will just not do anything. So you could likely just pass the Find value straight to that.
Yeah that's what I'm thinking. Current setup looks like this.
Validates that the inputted item is part of the array.
If it is, find that items index value, and then set said index to null data.
@astral epoch Seems that passing an invalid index to the array will cause a warning. Could get extremely annoying for logs.
Interesting. Cheers.
Checks IsValidIndex on both statements before defaulting to the error.
But it would work, no logic problems. Just an annoying log. 😄
Hi can someone help me im loosing my mind there's a simple thing that im missing and its driving me crazy
it eighter phases or goes backwards
and sometimes it works
its suppose to be seconds so i get the seconds and *6 so we will get 360d and ill do negative so it would go clockwise but idk what im missing
@rancid juncoYaw and Roll go between -180 to 180 for 360 degrees total. Pitch only goes between -90 to 90. -90 is looking straight down -Z axis. 0 us perpendicular to Z axis, and 90 is looking straight up on Z axis.
im now im confused cuz first i didnt know that
second so im using it wrong? cuz -90 on this pitch in the editor is like this
oh ok i think i got it, im just being stupid again thanks
Think of a rotator as representing the camera in a FPS game. You can't look up above 90 pitch, which is straight up, character would break it's back and fall over backwards. That was the consideration when FRotator was originally created.
yep got it thanks mate
should be okay now just change a few parameters and should be good
My point is having this will reference and load the whole blueprint even if you aren't using it, and if that blueprint is hard referencing anything else it'll also load that, regardless of if you're using it or not.
Especially if you only need one variable, which is a text.
Although if every variable in the parent class is blank it may not be an issue, just something to keep in mind in the future, otherwise you end up loading the whole game into memory in the main menu.
Does anyone know why this would happen? In my parent BP I set collision on a component to ignore a certain object. In the child BP, the collision is set to overlap on that object. If I then check ignore for that object and compile, it goes back to overlap. I'm so confused why this would happen.
collision is a two way street. both objects have to have the same collision channel active to work
I don't know if the editor would self correct it though
but it may be what's happening
why does a character blueprint work even on an empty level where there is no character?
it doesnt make sense to me
@rigid fractal GameMode spawns a default pawn when the controller is created from the class that you set in the GameMode class.
i have an empty level with no characters, but even when executing that level, the BeginPlay event of the character blueprint is executed
Ah, yeah it's what Authaer said then
but is it possible to get around this?
Set your default pawn class to something else than a character I guess, unless there's something you can override in GameMode to stop it from being spawned at all
thats exactly what i want to do, a initial menu
but i can't find the option where to change it
Your project has a default GameMode specified. But you can also override that default in each map's world settings.
but it is possible to change this through the blueprint, right? because when the game starts, i think i need to switch to the default game mode
aah, now i understand that each level has a different world configuration
but the initial menu level no longer has a gamemode by default, should i change this to spectator pawn?
If I have a Widget as part of a Blueprint, and that Widget has a Text component in it, what's the easiest way for the Blueprint to change the text in the widget?
I'm aiming to input a value in the placed-in-scene Blueprint, and have that value translated on Play to the displayed Widget text.
I have a DoorManager cpp class extending AInfo spawned by gameMode.cpp.
How do I fix my cast to that class? New Var 0 is AInfo
Pretty sure you need to set that value. If it's spawned on GameMode, make a UPROPERTY(BlueprintReadOnly) pointer to it on your GameState. Your spawning code can Cast<AMyGameStateClass>(GameState), and set that pointer. Then you can call GetGameState->GetDoorManager->RegisterDoor(Self) in the BP
Thx!
I like how often times BP/cpp are just completely meshed together. So a bp question just ends up being a cpp thing haha.
Bind the text of the widget so it makes a function for it in umg. Make a variable for that text and hookup to return. In your bp you can get that widget text and set it to whatever you want.
So just this? @brazen merlin
This is within the Blueprint. Widget class name is in gold, component for it is in Red, but I can't seem to call the variable?
Never did it like this but im guessing you need to first know that its the teleport menu of the fadein component. Is there like a get widget node? I usually create the widget then store it as a var instead of a component.
I have a question for you though, since it is called fade in... you know you can animate widgets in umg?
I do know, yeah. Point here is to fade in the widget itself as basically a splash in front of the player with text set relative to where they are
I created this simple widget blueprint, however it's not sending this event over to the server for some reason:
Server bp:
The opacity-animation of the whole widget component has been taken care of, thankfully, I just need to find a way to pass text from the exterior blueprint into the component and its text box
If your willing to wait i can mock it up in a bit
Sure, I've got time if you're willing to show the method, would be much appreciated
yeah, looks like you need to cast. You should probably do the cast on event begin play so you can store it as a var. Your FadeIn is considered a WidgetComponentObject, therefore generic, so its specific variables wont be accessible.
Is there a way to poll a variable on map instantiation, and change game mode based on that?
I know I can pass parameters into the open level to handle this, but in editor when i simply hit play obviously I cannot pass those parameters in.
Hey there, can I ask someone how to sort out a map with two enums base off of element and resistance reactions? I've tried to do it myself but nothing I've done so far has been working correctly. I've creation enums for these two things that must cooperate with one another and go to the switch setup for damage to get what kind of reaction but it hasn't been working. I'm just getting errors.
This structure was made to sort out units element reactions weather weak, normal, or repellent in some way.
what errors are you getting?
Mostly errors that go all the way to the damage event graph which I can show. When I add Event dispatchers from the attack, it only errors the dispatchers then.
can't you just say what the error is?
battleskill is what?
Battle skill is one of my actors for battle attacks.
okay so it has no relation to what you're trying to do with enums?
I added the enum for the dispatchers from the actor to the unit actor and it still gave the same reactions of not the correct reaction and errors at the end. I would imagine it will be hard to talk about cause one small thing seems to involve many. I only ask is their a way to make a reaction of element from first the skills as well as the resistance reactions to units.
my first thought is that default collection values bug out often
so I wouldn't be surprised
my second thought is that you could probably solve this using breakpoints
By break points, you mean by?
Ok, you mean the breakpoint on the left click, I don't have a lot of experience with them so they wouldn't come to mind so easily.
they just pause execution where you place them while playing
and you can hover over any pin while paused
and it will give you the current value
if you step over, it goes to the next node in the execution thread
I'm uncertain if this will help me. Should I explain the structures and how the enums are in place? It may take a bit of time to.
Why is this event not being sent to the server? I feel like I'm missing something with how UE replicates widgets.
probably better to ask in #multiplayer
Alright
So, I made 2 enums based on elements and resistance reactions. I've added element enums in the battle skill attack base which was to sort out their elements. For the units, they have a map with variables based to both the elements and resistance together. The damage setup is in the unit base for reactions and a switch of the resistance. I then have a child blueprint of the unit base for separate units cause I tend to make different functions for units. I already added the default of the battle skill in the child blueprint and added their map. It's hard to explain it nicely but I'm trying to make units react to a element which is shown in the images. Is that any clearer?
I'm unsure of any other way to explain.
I need some time to think, maybe it has something to do with controller I think...
im trying to generate random amount like so but it ends up being the same for all iterations of the for loop, am i missing something here?
the issue is that you have to find your breakdown. I can't understand your architecture for you with just short descriptions. the best thing you can do for yourself is learn how to use breakpoints and apply them to this. somewhere a battleskill isn't getting parsed when it should. breakpoints allow you to find out where that is
I'm sorry that my description isn't very good, too much to involve for a good understanding which I'm not too good with.
you're focusing on the wrong things. forget the description for now. just try and get an understanding of breakpoints
Your now the second person to say that after the transitions I used to talk about with someone else. Man, I'm in oblivion of this...
whats a good approach for the blue box to detect red boxes within a certain defined range, but not through walls (unless specified)?
basic on component begin overlap on the sphere collision doesn't fit this use case
i am familiar with raycasting in 2d, not sure how best to use it in this scenario
approach wise..... to know/have an array of all red boxes, with another array (suppose a map could work instead) that knows their distance from. Updating that sort of thing doesn't seem too performant though. So maybe you could just do a line trace to box in the array to determine which ones are close enough
Hey guys. I'm using an Input Key Selector for a control rebind menu. Is there a way to set the text to show the currently selected key? Cuz theres no default option to do that, but idk if its possible through BP
you mean keep track of all blue boxes, or maybe just keep track of them when they enter a certain range, and then send a line trace to their location, checking for wall hit?
red boxes, yes, have them in an array, but why does overlap not work?
overlap works but it can detect through obstacles, unless i am using it wrong
this kind of overlap at least. are you referencing something else?
have your overlap only detect a specific collision channel and have your red boxes only register with it
for example, the pawn channel
yes but wouldn't that still detect behind those black boxes? or are you saying then draw a line trace after that
or else you need to filter it by a different means, such as checking if the overlapped actor has a matching tag
yes, it will overlap all, true, but this is still better because you can add and remove (based on begin and end overlap respectively) which red boxes to check for and then perform your raytrace to those whenever you want
no point raycasting to those beyond the sphere
gotcha, yep makes sense. thanks for the help
great, sure thing
Conrad I tried doing unposess then destroy and it still deleted the mesh
wait nvm i was deleting that character class not the controller works now
Ok so I've progressed a little in my keybinds and now I'm trying to set the 'No Key Specified' text to display the currently selected key, but somewhere in this BP I'm not getting something right. Anybody have any experience with this?
😭 Help! I'm going crazy!
I have that code in the GI - it runs those functions. I reset the God damned var to 000, it shows 000 after exiting the function. I load a level, and it just goes back to the value it had before being clearly set to 000. WTF?!
that old value should not exist in memory anymore - right?! where does it retrieve it from?!
Really depends, you have 2 vars here
One from SaveGame and one from GI
GI is indeed kept in memory till you close the game
no, I'm setting the savegame var to the GI's var
not vice-versa
so when I read it there, it should say 000
I don't get it. And be that as it may for the savegame obj, my problem is that var controls another function handling player spawn on the next map - and i spawn 100kms off map because this isn't 000 as it should be when i transition (that's why I handle it in the gi)
the savegame function was just so i can cram in the example. The var is the "old" value when I grab it with the player pawn on the freshly open level.
This is driving me crazy 😶
This is from the PP on the freshly loaded level:
it's soon after beginplay & there's no other function setting that var anywhere else. double & tripe-checked.
I think you may be overcomplicating things
You can handle it all directly with SaveGames
Only use the values inside a SaveGame, reset the value inside SaveGame when needed or read it from there
If it needs to be saved on disk
If only while playing, then you can use only GI
Half my game is programmed in the GI because I jump levels for every encounter/fight. I can't re-write anything, it's released and this was a bug reported by some players "falling through the map" - then I find this. I don't even remember how the whole thing works - it's convoluted and old - not the best of my work.
Yeah, it's rather messy to understand tbh
So since i'm far beyond the point in which I can refactor a whole mechanic w/o introducting God knows how many bugs, I just want to understand how in the world a var set to 000 which appears to be set to 000 can suddenly fall back to some old value which shouldn't even exit in memory anymore since its been rewritten - wtf?! Could it be a bug? Should I just try to delete my interm and saved (loose the build and have to rebuild from scratch but meh - idk).
Question is: should it technically be 000 or am I missing something?
Turn based RPG eh
A rather complicated one apparently, yes...
Are you sure the value is set to 000 in the first place? Debugged it?
The flow is important
I just posted a pic while debugging - you can see the breaks 😆
how else would I hover over values and see them?
that's the exact flow there 😐
You may able to get away with an encapsulated area somewhere far from the main map
Having an entirely separate map for battle is sooooo last millenium
I made this last millenium 😆 tell me about it: was a pain in the arse: GUIDS for respawns, no persistent values for anything so all is constantly tracked by the GI, actors reporting back & forth etc, costant worry about performance cos u don't want ppl to wait 15 secs every level jump etc.
The only thing I can imagine is something running when you open the level and setting the value to that
It was my first thought too - the problem is that the only function setting that value at that point is that. Nothing runs on tick so that can't be it, and the value is only called to set again when the player enters combat so GI can register its location and knows where to respawn next time (there are no enemies there).
@icy dragonAnd when I think I used some bones from this project in my current 😐 same thing, all tracked in the GI. I wouldn't want to rewrite this one either, it's faster to make a new game from scratch really... So guess I'm trapped doing this crap.
aaaand there's the level I should be on:
falling lol 🤦♂️ 😆
player start?! 😮
but no no... that should be in the right place and can't do that nvm... It's too late
3AM lol
It doesn't mess itself, there's totally something going on, you could try to see if the reset works properly without the OpenLevel
If it does, there's something that runs that messes it up
For anyone who runs into the same issue I was, this is how to remove current keybinding(s) set new one(s) and then show the currently displayed keybind in the 'No Key Specified' text field
Good idea, i'll try to dig & see if the open level node messes things up - thanks! 🙂
You could use Find in Blueprints tool too to see every place the variable is called
Never know if there's a cheeky forgotten something
Oh lol, ofc I did that - did everything except probably what I would have done - but what...
I try to only post here if I just can't figure out myself - which is often lately for some reason xD
If i can't figure something i sleep for 2 days and hope to dream about the solution
sob in a corner or such
@dark crow ye, ima just fk it and check it fresh tmr 😆 thx anyway 🙂
is there a way to hotkey scripted actions?
Hi there, for some reason the AdvancedSessions plugin is not being detected when I try to package the build.
Could not find a function named "FindSessionsAdvanced" in 'BP_Multiplayer_Menu'.
Does anyone know what I can try doing or looking for to debug this? I did Refresh All Nodes on all relevant blueprints.
Cheers 🙂
how do i lock a mesh's movement to a relative axis?
for example, i only want the center (which controls where the strings end) on the bow to only move in the relative x axis.
as you can imagine im doing this in vr so the player can pullback on the string. I tried the constraints settings but to no avail
how about using sockets instead? 😛
looks like you sort of have them with lower/upper string no?
just realized its a static mesh too, sockets are for sk
oh
do you have a way of just constraining it so it wouldn't move on any other axis? currently even doing the most dumb (event tick set location) doesn't work
this bow is somehow attached to the player's hand yeah?
yea
what that attach code look like?
gimme a second gotta boot up unreal
sorry for the spaguetti
this is in a hand bp which the character has two of
each hand is attached to a motion controller
and using the grab function, a keypress on the player is relayed to the hand
id guess Weld Simulated Bodies is overriding any independent transformation
it "welds" them lol, i think its more more physics, but its also a guess
those are in the physics section?
does your mesh simulate physics?
i think it's more for controlling the physics solver yeah
i dunno, probably
ok I did it on event tick and it seems to work this time
this is a really stupid solution but idrk anything better
shouldn't be too expensive though
considering physics is on it own custom tick, doing things on tick aint to bad
its also only while in hand, so i mean, thats pretty important while the player is interacting
tick doesnt work in vr?
nonono i mean the string constraint
i think ik why
bc i attach the end of the bow to the other hand when ur archerying
i think in that case the local location is still 0 0 0
if lower and upper string have world locations, cant you get the midpoint between them?
How can I bind to an event of a different class (An AInfo class from AActor)?
I tried this:
you have the event dispatcher made in the class to reference? Door Manager I assume?
doorManager.h:
UFUNCTION(BlueprintImplementableEvent, Category="DoorManager")
void OnTriggerMazeChange();
i dont do cpp, but i assume its no different since you've simply made the ED. After making it, I drag off the var (DoorManager) then search for Bind and that should list your ED among them
yeah, maybe its not called BlueprintImplementableEvent but something else
Maybe I actually want multicast RCP...
multicast would be good for mp, but ED is essentially a function call
if you're called an event (red node) then just drag off your var and search for OnTriggerMazeChange
binding and calling events are different as you can see 🙂
Does BP have functions?
yes..
is there any way to convert a blueprint actor to a scene component for a character?
maybe you could change the parent class so it comes from ActorComponent instead of Actor, but i would imagine some problems, depends on the logic therein
I'll try that!
Look up 'Child Actor Component'
disagree that its buggy, but i do think using Child Actor Components is more complicated
How can I place the reference of my "FirstPersonCharacter2" in the level blueprint? Do I just drag the object to the level BP or is that wrong?
If its the player char you wanna change, doing it in GameMode might be the better way
Is it SinglePlayer? Get Player Character / Get Player Controller is the easiest way
Because I tried it and checks if the Tarray I made in the c++ script contains the actors I set in the BP but the game crashes after running
Hey. Anyone know a solution to this issue I've been getting? After packaging a game and launching it, some events wont fire off
You are trying to cast from the Controller to the Pawn
Either you need to "get player character"
Or get the controller -> get controlled pawn
ahh yes, it should be get player character
Just note that it works like that only in SinglePlayer
In Multiplayer the player index would be required, but as in SP there is only 1 Player, the index 0 returns it correctly
@gentle urchin Wouldnt calling Index 0 always return the client?
(if its run on the clients side)
another problem here is that the code found nothing in the TArray elements but I thought the level blueprint already set the Actors in the array? Here's my code:
{
// Call the base class
Super::BeginPlay();
this->collectibleList.SetNum(4);
UE_LOG(LogTemp, Warning, TEXT("SIZE: %d"), this->collectibleList.Num());
//gather all the collectibles
if(this->collectibleList.Num() != 0)
{
UE_LOG(LogTemp, Warning, TEXT("SIZE: %d"), this->collectibleList.Num());
for (int i = 0; i < this->collectibleList.Num(); i++)
{
if(this->collectibleList[i] != nullptr) //false result
{
UE_LOG(LogTemp, Warning, TEXT("Delete"));
this->collectibleList[i]->SetActorHiddenInGame(true);
}
}
}```
yeah to my knowledge
Id rather ask that in #cpp tbh
And did you try running it again after the cast was successful? As it always failed it never created the array
yes and its giving me null values
But you are literally creating them on beginplay
Ofc they will be null
You are saying in BeginPlay: make my array 4 long (starts empty), if there’s anything in there hide it
But nothing will ever be in there like this 🤔
I mean... the code just hides the actors, but it doesnt destroy them, so they should still exist?
Yeah but I don’t get the use of the script
If you make an array in blueprints after
Could you try adding a delay right after Begin Play of like 1 Second
Bc. I sometimes encounter weird situations when using code right after begin play as it basically runs before an actor has been spawned
yeh, I shouldn't be adding this cause it will remove the actors I set in the level BP?
No the C++ code should run first
The list here doesnt make much sense
or rather
the list might
but the check doesnt
But regardless, you are literally creating a new array in BPs right after and copying it
So that makes the C++ code useless
as pointed out the list is full of nullptr's , so it won't do anything
If you want to initialize the array in bp
you must first call a bp implementable event
before doing whatever your listcheck should do
Well... I guess thats the beginplay part
still its a bit odd. why even initialize the array, especially with a hardcoded value like 4 ?
Being set from BP it will be resized and filled from there
Well it won’t be resized/filled
It will literally remove the old and replace it with the new array
Couldnt you create an array directly in the level blueprint that gets called in C++? (Not filling it after Begin Play)
So you dont mix up Begin Play in C++ and BP where they basically rely on each other
refering to this part*
That’s interesting, I would imagine it did a copy
If it did, i'd have no clue why some of my bp's work 😛
Yes you could
If you fill in that array in parameters
Seeing that im mixing things here tho! Beginplay is in levelbp, so its not the super::beginplay 😕
