#blueprint
402296 messages Β· Page 784 of 403
Hello guys ! Can you help me with a unreal task ? I'm not noob , actually i'm experienced 3d artist, but this blueprint programming thing is VERY hard for me =((( I have a cube mesh, i want to put 10 copies of that cube into level and have them automatically numbered and somewhow display each cube number somewhere on the mesh . thank you !
First step is to create one numbered cube, have a function to create static mesh component and a text renderer component (or 3D text component). Once you get it working, put the function in a For loop, with each index offsetting the transforms.
where i dont can find
Thank you very much for directions ! Now it's clear for me that i have to hire a programmer π π₯²
anyone know how to spawn a geometry collection and apply a transform to it? was trying to update the collection mesh but you need a geometry collection object not geometry collection component object
anyone know how to get the mouse position on the screen relative to the actual screen size in BP? for some reason neither Get Mouse Position On Viewport nor Get Mouse Position Scaled By DPI seem to work, when i go full screen with a resolution of 1920x1080, the mouse X goes up to 2040
That sounds normal in some cases. What is this for?
well, and i'm realizing now that this is probably a super inefficient way of doing it, but i was trying to calculate the edges of the screen to pan the camera back and forth with the mouse, so i was taking the viewport size and multiplying it by 0.02 and .98
but the number that was coming out of .98 of the viewport size is like.. in the middle of the screen
instead of the far right edge
i'm trying to get the actual boundaries of the window itself, and then the mouse position in that window, but it's not even close to accurate, especially when the window is resized. i'm not clear on why the viewport X size would be 2040 if my resolution is 1980
or i guess why the mouse X would be able to go to 2040
@unreal mossHmm. It's difficult to explain. It's just the way that Unreal's viewport handles scaling. It's rather annoying. Quite honestly I rarely rely on that. I would personally handle this in a widget. You can get much more precise values by converting platform mouse location to local space, and then back to viewport space. It's tedious but a static function helps with it.
Pixel Position here should be much clearer here for you in a UserWidget if you create and add this directly to the viewport.
You could compare this to GetViewportSize for instance to get your mouse location stuff.
Anyone know the best way to add a pre-loaded array of strings to a GameInstance? I'm trying to set things up so that I can call on the array with a Name, then get a location variable back.
Would I have to set the array on Event BeginPlay each time? Or is there a better way?
@maiden wadi alright, thanks. yeah halfway through it hooking up like 80 things to event tick i decided maybe widgets would work better anyway. i just get fixated on trying to understand what's going wrong with stuff
@unreal moss Something like this. Functions like this are so much cleaner in C++. π Note that X and Y are slightly different in that the 1 and -1 are inverted. Y has to be inverted so that the top of the screen returns +1 and bottom returns -1.
In my case for example I could convert this from a Vector2D to a Vector, and use it as a Movement Input for my camera pawn.
<@&213101288538374145>
thanks
how do i modify the output of a node under certain conditions? I want to multiply the value of InputAxis MoveForward by 0.5 if its less than 0 (slower backstepping) but I can't seem to figure out how to do such a simple thing in blueprints lol
If you're using InputAxis events, just check if Axis value is < 0, select float for the Scale value. 1 for false, 0.5 for true.
even easier, change it here
Maybe. But that's going to cause problems if you have multiple possessable pawns.
Best to do it on the pawn that has the slow reversing functionality.
this was not specified in the question
sorry im a huge blueprint newb. this is pretty much the root of my question: how do i set the scale value to 0.5 when the float < float node only returns a bool? is there another node i gotta use to return 1 or 0.5 based on a bool input?
i'll eventually wrap my head around this lol
gotcha
I have a child actor in one of my other actors and I want the parent to call a function whenever one of the child's functions are called. I feel like there was a way to do this with like binding events or something but i cant remember what it was.
my zombie character dont want to die and i dont no what the problem is
he dont say hello when i hit the ai
and nothing work
Wrong collision settings? Not blocking? Not generating hit events?
Event Dispatcher?
yep just figured it out. That's what I need!
Can you not have a map of arrays? I have a modular character which i populate with multiple meshes - Torso (shirt1, shirt2, shirt3), Legs (pants1, shorts1) etc. I then have multiple materials per mesh - so shirt1 has shirt1_mat1, shirt1_mat2, etc..
What is the best way to store this? I already have arrays with soft references to the meshes, but I want to define materials which are compatible for each mesh. Having another array of materials per mesh seems like the wrong way to do it.
I do that
Any idea on how to generalize this? I'll need this check 6 times in various places, and I just can't figure out how to generalize it:
I have a skill which diverts damage to another unit. The problem is that if they defend each-other, it obviously goes into an infinite loop. Atm, max units are 6, but there has to be a way of generalizing it for n units.
an array it seems
how are you getting these "defenders" seems like its the same one?
@brazen merlinThe defender can be any other unit that has the defend skill. RN I'm just going to filter the units with the skill and check self against each of those unit's defenders... I don't see any other way atm π€·ββοΈ
Any better/cleaner ideas? (w/o cpp)
so how are you getting defenders?
get actors of class?
are they stored at some point when they are spawned?
atm, it sounds like the first defender can take the effect, then the second, and then potentionally the first because all that's being checked for if it is not itself vs effecting each one that has it evenly
@brazen merlinSo, from top to bottom:
- I can get the defenders however I want, I have them stored in an array
- Not using (never) get actors of class - I try avoiding that node at all costs.
- Yes
- The checks are being run when damage is received by the "self" actor. So I don't need to check and see if the others aren't defending each-other to avoid inf loops, they will make the check each when they receive the damage (in case of AOE for example, which is the only way to have "actively taking damage" more than one unit).
it's turn-based btw (which simplifies things by quite a bit)
Is it only in an aoe case or does this ability transfer to near by even if the attack is directly at them?
@brazen merlinNo, if the ability is directed at the defender, it will go through normally:
ok so AoE only essentially
the exec comes from the "Apply Damage" function
so damage dealt - run this (and other similar effect checks) then decide who gets the final damage.
?
AOE basically calls this code on all it's targets
Heh, it's based on a targetting system, not collisions
ah ok, was gunna ask, so it has to work from the array you have
ye, all of it works with a targetting system, based on cells+cell occupants
chose this over collisions for easier "smarter" AI
Yep, it's basically my solution as well. I thought there was another - idk, more straightforward way.
@brazen merlin
this seems more straightforward than the initial spaghetti π
I know, but idk, sometimes I'm dumb like that lol π π€¦ββοΈ
thanks for ur time man! π
sure thing
I rly should just learn the freaking GAS and be done with fiddling with my own ability/skills system - so hard to generalize, have freedom & not get ran over by bugs every 2 clicks π
inventing our own functions can take just as much time to learn the capabilities of pre-existing systems
@brazen merlinFair enough. So making my own is better then since I also learn a truckload π
that's a win-win. Can't always do the correct thing in every facet of a game's design, that's why post-mortems are helpful; a reflection on what worked and what didn't. Technology advances, new systems and methods become available -- the next game you make can utilize that learned knowledge. For now, don't take steps back unless you can't move forward.
How can I implement a timer in an actor bp that starts at 0 sec, and freezes with a condition I decide
Not a widget, just a "backend" timer, and when the condition is true, then it freezes the time and prints it
Timer as in stopwatch timers?
Yea like a stopwatch timer, not a countdown
may i refer you to my most used screenshot
Okay, so it's the matter of adding float variable with delta second, but with branch before it
any one able to help me out here?
been working on using control rig to create gun recoil. but I cant seem to get it so show in game.
I get this error
Blueprint Runtime Error: "Accessed None trying to read property As Ue 4ASP Character". Blueprint: AK47CRA Function: Execute Ubergraph AK47CRA Graph: EventGraph Node: Set LASTSHOT
The getter below still had null pointer, so I think Event BP Begin Play don't work
In (lesser) laymen's terms, the object reference variable refers to nothing
Im trying to make a lighting effect and epically failing, looking to get some input. Suppose you generate a landscape, paint down a path. Now the player is walking that path. I am trying to make it pitch black no visibility anywhere but where they have walked. Any ideas?
hi! ive been trying to make an aim offset and it worked out pretty fine especially in the aim offset but when put in game my character just twists and becomes huge and none of my other animations show pls help?
Is there a way to trigger a specific key being pressed via a blueprint node?
Like allowing a button widget to be the equivalent of pressing the 1 key on PC.
Problem with UE4? I've been trying to get a float value rounded to .000 accuracy but sometimes it goes beyond that, I ended up trying everything EVEN FORCE rounding it twice! and it still didnt work
Returned print (ignore bottom 2 lines)
Clamping is not rounding it just means the value can't exceed th min or max
Yet they do exceed the min value
32.26 doesn't exceed 99999
oh wait duh youre right
And it's more than 0.001
I dont know ow how the totext works
But my guess it's also not working how you think it is
but shoundnt the bottom of totext work it says max fractional digits 3
This was my reference
so youre saying... float --> x1000 --> truncate (to int) --> /1000?
No use the floor node
It will change the float to an integer but round it to the lowest number
Or is that the same as truncating
Not sure
But yeah tou get the gist of it
Also I might have miscounted maybe it needs to be 10.000 but I'm tired you can check lol
That's correct yes
The reason you're likely having a problem is that floats aren't necessarily accurate. You can't always get exactly the value you want out of them 32.261002 might be the closest one can get to 32.261....
If you make this node, you literally cannot type in 32.261 it gets set to 32.261002
'
woah woah
Guessing that would be a better method than mentioned before
But I would have to set the accuracy of the value entering that anyway so maybe I should just use the first method
Also (My float comes from a get game time in seconds controlled by a event tick)
somehow BOTH methods together did not work
Doesn't matter. The float variables are only 4 bytes, and those 4 bytes have to represent all possible numbers and fractions from -10385013768181514240.0 to 10385013768181514240.0 --- you're going to run into accuracy issues of floats in between there.
The "literal float node" is not needed.
It's just a means of declaring a value in blueprints that can be used in multiple places.
You're not printing that part as a string
Sp you aren't testing if the math is working
You might be setting the value again later
the missing nodes are just setting it to string
Also I tried again with make literal float removed and it didnt work
works like 90% of time
I never said to use it.... if you read what I said, the issue is due to the accuracy of floating point numbers.
Shouldn't be because of the math formula
Oh wait
I get it
Is the solution to always store as int?
No. You literally cannot type in 32.261 into a "Make Literal Float" node. It automatically calculates it as 32.261002
It can't ever be those floats
Right
Does it matter exactly how accurate those numbers are really? Like, thousandths of seconds is pretty tight.
You can store whatever the value is, and use the ToText node to mostly accurately display the number stored.
You could change it into a string, set an array, and forcibly remove the last few digits but that seems like a lot of work
The accuracy does not really matter I just need it consistent for math im doing. This is causing an issue: I have split times for a level and final level time. The split times are lets say 1.0004 and 1.0003 so the user then sees 1.000 and 1.000 and then the final level time would be rounded up and say 1.001 so it makes no sense
I just need a close .000 value that I can use for math so its not rounding differently
So that's the thing, you can round those values up, but don't expect it to be exactly 1.001. It may be 1.001003 for example.
I'm fine with hidden values like .000003 I just want the presented values to add up correctly
yes, you can bind the widget to the key press event, probably in the controller
That's hard to guarantee with floating points. So then you would need to split up the numbers like Dean was showing you, but not recombine them into a float.
keep them as an int?
With 2 decimals after the comma instead of 3, would this problem be fixed?
Are there anough floats to cover that
yes
Not sure exactly what you mean, but if you type in 32.26 you get 32.259998 out.
Ah ok
I'll try to keep them as an int, I'll try float --> x1000 --> floor int --> format the int to text so IT seems I divided by 1000
Probably better thing to do would be to use timespan/datetime variables instead of floats.
wdym timespan/datetime?
thats what I was thinking idc about that much accuracy just want it to appear accurate
lemme try I'll share my results
I think not 100% sure, but it's hard to do if you're going to be messing with the math on float values since those values may not necessarily add up correctly.
Example:
And these values should be able to be added together to get a correct total since they're effectively stored as ints.
I'll try that
did you use timespan datetime or both?
Datetime. The output from the subtraction is a timespan.
DateTime - DateTime = Timespan
Is the datetime your subtracting from the date time the same or different variable?
Time Start is a Timespan Date Time
Now is Date Time
my bad, its broken to a timespan result
Also how is "now" setting the datetime?
"Now" refers to the current time. So in my example, the BeginPlay stores the current time. When I press page up, it's getting the time at that current time.
search Now, it will come up under DateTime
that returns the local date and time on my PC is there anyway I can set it using a float since Its an ingame level timer
so using a timer?
yes
Does it really matter? I mean, when you start the timer, you're saving a reference to the moment (on your local PC) that you started. When you finish, you can store the moment (on your local PC) that you finished . Subtracting these two values gives you the timespan which is agnostic to what PC.
I didn't think of it like that, your correct
Would I just have to hope people donβt start the time right before daylight savings
Oh good point
lol
if its always off of pc time, wouldnt that update accordingly?
Thatβs what I meant, if they started the timer 1 minute before daylight savings it would result in a huge negative time
Actually nvm βThe switch to daylight saving time does not affect UTC. It refers to time on the zero or Greenwich meridian, which is not adjusted to reflect changes either to or from Daylight Saving Time.β
when you use a inventory component. can you use that same component for other things other then the player. Like for a Chest or a Stove.
i think that depends on the logic
does it reference anything specific as an inventory that wouldnt work for other objects?
such as Cast to Player vs Cast to Actor or something
Yes, it does. I think. It does handle the players and Equipment
Would be a bad component if you can't..
Being able to attach logic to various assets is kinda the point
that's the OOP idea, but it doesn't sound generic enough to do so
It's the Action RPG Inventory System from the market place.
i know not
yes, I know. It's no longer support and the help for it is gone.
I would have to make an Inventory Component for each object or make a Inventory Component that can be used for anything. And one ever see a Inventory Tutorial Like this.
id figure its possible to make it generic enough
might need rework though
or else, yeah, duplicate the comp class for each one and just change it
I thought so.
that might give you insight into how to make it generically
I wish my stills were better then they are or I would. The biggest issue I have is under standing Inventory systems
nah, they're there, i dont have an easy time with them either
There was a tutorial series that used a component and structures to contain the inventory...
https://www.youtube.com/watch?v=yxqSkFNAzE0
In this new series I go through a method of creating an inventory system, similar to a survival game. In this first part I introduce the system and go through the process of setting up some key assets that we will need going forward.
There are unlimited ways to create a tutorial, all based on your own tutorial design. As per usual with my tutor...
Thanks I tried this Inventory over a year ago. and I never could get it to work. The the dev didn't have the time to help.
You don't need a tutorial, just make a struct S_Item and a component C_Inventory and take it from there.
You will learn 100x faster just struggle bussing your way through it on your own and only looking up specifics if you get stuck.
Lessons not learned in blood are soon forgotten
UE4 documentation recommends using async save game to slot for larger amounts of data but what is considered larger amounts of data and is it actually better to use that node instead? I watched like 6 tutorials and all of them use just save game to slot without even mentioning async and someone claiming that he made tests and with larger amount of data async was worse.
Async won't really be faster, just won't stall the framerate until it finishes. You'll know if you need it.
Sorry for delay but this worked like a charm! It was so easy since it gave the INT outputs
I made some arrows that spawn and fly and they get destroyed after a couple of seconds. Also when they overlap the character the character dies. Everything seems to work, but I get this error/warning. Could anyone tell me what it means?
Blueprint Runtime Error: "Attempted to access BP_Projectile_C_1 via property CallFunc_FinishSpawningActor_ReturnValue, but BP_Projectile_C_1 is pending kill". Blueprint: BP_Shooter Function: Execute Ubergraph BP Shooter Graph: EventGraph Node: DestroyActor
Screenshot is a little small
pending kill tends to mean the actor in question has been told to be destroyed (therefore killed) but something is trying to reference it after the fact
So its probably because of the delay timer? It will destroy actor every 3 seconds, but maybe there is no arrow at the end of that 3 seconds?
Got it π
how would i get my character to rotate and face camera instead of camera behind him all the time
Guys I can't figure something out that should be simple and should work.
I have these three zones (enumerations) N for outside a building, C for a special zone (still outside) and I for inside.
If i come in through the front then all is well
but if I go in between C and I using the side, it switches to C correctly but going inside, it switches to I momentarily but always goes back to N. I can't understand this.
The problem this is giving me is that I cannot start/stop the music I don't need. Why wouldn't it just stick to I when inside?
I'm not sure who conducted that test or what "worse" entails but of course Async saving took longer. It's Async. But it won't stall the gamethread. Neither is "better". They're tools for different situations. If you have a lot of data and you save in the middle of a player playing, then async save so that they can keep playing without issue. On the other hand if you save at the end of a game, Async is bad because you do want to save immediately and you're already ending the game so frame hitches don't matter.
Could probably just tier your music selection in a simple state system. Check if in special zone, play that, if not check if inside, play that, if none, play outside. Run that on each zone change check, do nothing if correct music is already playing.
I'm checking but the problem is that the it keeps switching to N instead of I when I'm inside only in the side door entry
pls help
it makes no sense I can't figure it out. Why would that particular area not overlap correctly? The whole interior space has a giant trigger volume, there's no way you can not overlap with it
Here the arrows point to the yellow/green bounding boxes of the trigger volumes
i would just put triggers on the doors
This "works" in the sense that it allows the correct switching when going inside or outside. But that does not explain why the enum does not switch to Inside when I enter the Inside area, even though upon overlap that's exactly what it's supposed to do. Why would it not switch?
While this would normally work, now there's the problem that it'll always remain on C if I exit this trigger volume at the other ends (it's an alley so let's say the front or end of it)
yea this might be the only thing left
but it feels so nasty lol
instead of having a lot of code inside one actor and choosing to run parts of the code by a bool, would it be more performant/better practice to break down the code into components and add them on the construction script?
you could, i just do that to keep things sorted
e.g. inventory is a own component which handles all inventory related things
another one is outfit, which handles all the cloth
otherwise your actor can get really bloated by time
Probably depends on the code in question. Performance is negligent. You can have 100,000 lines of code, but if only 2 ever get ran, it's still going to be pretty fast. Components incur overhead though. Not much but if you're trying to optimize to the extent of moving code out of a class, I don't think that'll help. But for organizational purposes, if you have an easier time keeping track of things in different classes, it's probably worth it.
yeah, i thought this would be 'easier' to keep track of things. only problem i see right now, the variables i set on my BPC (even if exposed on spawn) are not showing up on the actor that owns the BPC. is there a good way to work around that? for example if i want to set the movement speed on this BPC actor from my editor window
if i start adding in all those varibales on the actor itself, it will become quite confusing again π
you can select the component in the details panel and set variables on it
but not if i added it from within the construction script, right?
yea right
sadface
hmm maybe a struct for each component
thanks @spark steppe and @maiden wadi π
yea, thats probably better than exposing 20 variables on the actor
and you could implement something like LoadSettings(ComponentStruct) on the component
oh whats loadsettings? i would have done it like this on the construction script
thats something you would have to create yourself
I really need help any would be appreciated
not sure what you want exactly since you have only the Z Axis for rotation connected. but im guessing the "error" you are experiencing is because you have some form of rotation on the basic mesh already. that makes things with the find look at rotation a little strange. or basically super strange
maybe, add the local rotation to the world rotation. but i think is is rather hacky, and will lead to more problems when axis overlap and then shit hits the fan π
best way would be to have the character not be rotated by 90Β° (or what ever) in the character blueprint
is it the rotation on the char movement component
its at 270
this is what i meant
just for the lulz, set it to 0
and check what happens to your "find look at rotation"
character will walk super strange then.
but thats your problem then π
if you find a solution after that, teach me :>
Look at uses the forward axis, so you have to make sure 0 degrees = looking forward
Or manually change the result rotation after
Usually you just rotate the capsule of a character, which allows your mesh to have an offset rotation
how would I rotate the capsule of my character
it's the root of any character
or you use control rotation through player controllers
do you have any recommended tutorials so I can understand this better, pls
a root component is the top component on your actor
everything underneath will follow the root's transformations
so if you rotate the capsule, the mesh and camera will also rotate
same applies to scale
scaling just the capsule scales everything
I'm not sure what tutorial to link you for this...
I got the character to rotate towards me with root motion animations but whenever I use in_place animations. I can only see the back of the character , I don't was to use root motion as the character is quite slow
can you have 2 levels loaded at once?
like, be playing one level, go to another, pause your original level, do stuff in the second, and then go back to the original and resume once youre done with the second level?
Not exactly. Normal workflow is just to save the state of the first level, destroy it, load the new level. Play it, then destroy it and reload the first level with the saved data.
aw, what if i had a bunch of physics objects i wanted to resume?
Save their state.
do you have to write a custom system for every one of your actors to save and load their data?
or can the engine do that for you?
Uncertain. I've never looked into blanket solutions. I just save what I need.
Can someone please explain me why drawing the debug arrow works when the origin (green ball) is at world 0,0,0 but goes haywire when I move the origin somewhere else? And yes I know I could just draw the arrow directly from one actor location to another, but I actually need the vector data for something else and I'm just trying to use debug arrow to first make sure the vector always contains correct information, which it currently doesn't. I'm sure the problem here is something really basic
I think your line end wants the defaultSceneRoot.WorldLocation added to it.
At the moment you're getting the offset from sphere to cube and plugging that into the line end as a world position
track the mouse location where it is on the screen
That worked thanks. And yes I could figure out visually that the debug arrow kinda extends opposite to the balls location... I still quite can't compute in my beginner mind why it needs the world location added to it
like isn't the point of getting the world location, getting the world location without needing to add it in again
It's always a pain switching between local and world space - years of this and I still get confused sometimes. Ironically here I think all of your calulations are doing what you think they are, just the drawing is wrong π
Not really. In this case you are getting the world locations, and using those to create a look at rotator, which works perfectly. But to create a lookat, you are calcuating the position from the point of view of the sphere. It's only relevant for the sphere. But the debug drawing is an entirely separate action, that only cares about absolute values in world space. It doesn't know about the sphere's point of view, so you need to let it know
I guess that starts to make sense... thanks for taking time to explain it. Why I need this vector is because next step is to rotate the point (where debug arrow ends currently) around the origin to create an orbit, or pivot rotator more like where rotating the cube actually moves it around the origin while keeping the same distance. I just can't parent these things together so have to do it hard way
im like still stressing over which kind of system I should use for my RPG game, i want to be able to switch from an overworld type gameplay to a turn based battle gameplay, but in the same location. I dont know if I should be making my own manager actor to handle all of this? or something like gameState/levelBlueprint?
if I did use a manager actor, how could I make it kinda omnipresent? so any actor in the level could trigger functions within it?
without having to go into every actor and pick out where the manager will be before hand
I usually make Managers ActorComponents
And place them on the GameState
So you can easily do GetGameState->GetManager
ah
And Actors that the Manager needs to govern are gathered in an array
By a combination of GetAllActorOfClass (BeginPlay of the Manager).
And Actors selfregistering via GetGameState->GetManager->Register(this) on BeginPlay, as well as unregister on Endplay
The GetAllActorsOfClass could maybe be skipped
should I derive from GameStateBase? or just GameState?
^ doing the same but in Playercontroller
It's made so games that don't need the traditional Unreal Tournmanet match type game don't have additional code
But the split is done poorly
Just make sure you use gameMode then
Not not GameModeBase
cause you can't mix them
I hesitate putting everything under controller cuz it seems like bad practice
but idk
its a component so ill just swap it around if i find it necessary really
the 'workers' in this case just register like this
I don't really see the need to place stuff under PlayerController if it's about the whole game's state
Gamestate if it needs to be known by everyone and involes the state of the game in some way. PlayerState in the same regard but if it relates to a specific player and doesn't belong on their pawn. PlayerController if it doesn't need to be seen by other players and only relates to that player. GameMode if it's server only and client has no business seeing it.
why have player state when you have player controller tho?
network related
In single player this largely still applies, just with slightly more freedom since lack of networking. I'd advise following those guidelines though in the event that you ever plan on networking.
oh
PlayerController is only available to owning client
PlayerState is replicated to everyone
Information in teh PlayerController won't be available to other clients
So Stats, Ping, everything you wish to show, even if there is no character alive, like a scoreboard for exmaple, is PlayerState
Singleplayer you have a lot of freedom
Cause you don't have to care about that
I still do it the same way though
Habit I guess
Manager in an RPG sorta makes sense to keep in the GameState i suppose, but for my RTS i feel it's more approprate in the playercontroller..
globally accessible in any case
You never know when you might want to branch off into multiplayer territory.
yea
Plus even if you dont, you still stick to the same practice , which is good imo
instead of mixing your practice for no particular reason
yea, I eventually want to do multiplayer stuff, but all this stuff is real confusing I guess since I can just do whatever I want
in singleplayer
Hey does anyone know how to track mouse position in a 2d game? I'm trying to shoot a projectile towards a crosshair that's controlled by the mouse, I got the move to set up, but the end location isn't where the crosshair is. The BP in the picture is the Player blueprint. Any help to track the mouse location correctly?
I think you need to deproject screen to world location
like this?
what should be the screenposition?
cursor location?
bingo
Are you sure it should be 0
the crosshair screen location would still be Mouse Position
the actual in game aim location would be the deprojected world location
yeah as it's 2d. Y is the horizontal axis and Z the vertical axis. Everything is placed on X=0
it looked top down, meaning X and Y have variation, while Z is fixed..
deception^^
just nulling out X would solve it?
break and make vector, keep X disconnected
so it's not top down, it's like looking from the back. For the player it does seem top-down but the axis are Z for vertical and Y for horizontal
gotcha
after the deproject node?
hmm it seems we need some math here
https://www.youtube.com/watch?v=K3PRdupeCso Mathew can explain this properly i guess π
My suggest method failed hard
what you can do is use hit result under cursor , assuming you have a background to hit
this will give you the hit location
I'd add a custom trace channel that would be blocked at the correct X location
with an inivisible object taking in this particular channel
out of the box it'll hit at any depth wherever the blocking hit is
just got told to do it with a linetrace, maybe that would work?
so the begin of the linetrace would be the start location of the cursor and the end location the world direction * a big float
The under cursor is a linetrace :p
so i got this set up, seems like the cursor is actually fine now but the character placement is off and not on the mouse cursor
Cuz actor is moving far less than the distance travelled on screen
If you want the actor to follow the mouse, you could set actor location to the mouse hit location
ayee yeah got it working
i dont no what is wrong with my zombie death the zombie move when he is on the ground
quick question, i have a torch added to my player model but it is getting in the way of my enemies attacks. is there a way to disable collision on it or something? Thanks
SetCollisionEnabled to false.
Is it possible to get variables from other bp into my current bp ? for example get variables from an actor bp in my firstpersoncharacter bp
Yes, check out blueprintscommunications pin
Does anyone know if it's possible to put an exposed variable on the player himself, and access it in t he editor to set a reference to an actor in the level ? Because I can that with other actors but can't find how to do so on my BP_Player
Hey guys, i was looking Epic ARPG and i didn't understand what they did with this variable "Equip Slot", how did they change the return value?
Right click the pin -> split struct?
yes, but they changed the type to text
it's the same variable
What is BP_Player? If it's a controller, then no. If it's a character pawn, then you can if it's dropped into the level.
Split the blue one again.
It's a struct inside of a struct that has an FName
It's a Character
Your choice is to drop it into the level and use the auto possession settings thingy. I have no idea how to do that, I've never used it. Or to have your character get that actor when it spawns and save a reference then.
If you're using them for setup, caching a pointer from GetActorOfClass is pretty cheap.
do you know how can I see what the values of an array are during runtime ?
So I came across this https://github.com/sinbad/SUQS and am trying to implement it, but the doc assumes I know what I'm doing lol. Just wondering if anyone has had any experience with it? I don't want to bug the dev with questions just yet.
Breakpoints to stop execution. Or wire up a quick HUD Draw event.
@trim matrix I know it felt like I found a bag of money lol.
but less fun
sorta
I'm mostly just looking at how other people have gone about organizing the data to make quests/events.
I used a print statement to do that, thanks. Also I don't know why I can't set "FinalDoor" to the item at index 0 of my Array finding the actors of class with Tag "FinalDoor", does anyone know why ?
What kind of pointer is Finaldoor?
Tried to mess with Flow Graph in the past. Couldn't get it to work.
Odd. It should let you. Maybe compile and select all three of those nodes, right click and refresh nodes.
It works now thank you π Do you know why it does that ?
Not a clue. Just blueprint. π
x)
If it's not working and it should, refresh it, or delete it and recreate it. π€·ββοΈ
Also something weird, isn't possible to get the item at index 0 without it being a "copy" because I only found the "Get (copy)" and not something to change directly the item itself
Chances are it's likely a state issue with the underlying slate somewhere. Stops the drop process I'd assume.
And to that, no. The blue variables like that are called Pointers. They're not actual objects. Passing around whole objects would be extremely cumbersome. So instead, you pass around little tiny variables that basically point to that object's location in memory. So you create a copy of that pointer from the array, like jotting down a phone number to a business, instead of building a new business at home.
so that means, I can make my door rotate when I need even if the node itself says "Since it's a copy, changes to this item will NOT be propagated back to the array" ?
Correct. Cause you're copying the memory location it exists at. This means you can have two different pointers one in the array and one in the new pointer you've set. And both of these point to the same instance of the object, so either of these can be used to have this object rotate itself.
so all good, I have some prints in my code to check if my FinalDoor variable is valid and it still "Invalid"
like it keeps printing the printstring in the bottom of the screenshot
Sounds like your array didn't find anything?
oh wait I know why
nice it works thank you π
I had the Door Mesh instead of a BP_Door, that's why it didn't find it
Nevermind found it
drawing a blank here on the save data process
I have a cache of my save as a struct, I want to add a GUID to my struct array
when doing either add or append, it doesn't return the array
do i make a new array var and set it?
no no no, ignore that part, i just want to set the GUID in the struct
the set members
hm when i scroll over it it says it reads the data
so i am guessing it is a copy
true but I just want to set that particular member
nothing else
the GUID array
looks like i need a local copy and then set it as a whole
I just had a thought about this again, and I realized that if you have a pause feature in your game, using the time stamp won't work for start/finish since you'd have to effectively remove the duration of pauses from the timer which seems messy and overly complicated. So I think you're back to using a timer set to run every 0.001 which you can pause and restart, but instead of working with floats, increment a timespan variable by adding 1 millisecond on each tick of the timer - each millisecond will add up to create your seconds/minutes etc. in the timespan variable.
Being as easy to make as they are, it's a bit odd that bp structs even exist imo
Why are they broken?
generally a pain to work with aswell
I've got a lot of stats in my game and normally I'd store them in the player or unit, but I find myself typing them too many times, would it be better to store them in a component or object?
For cross reference
Any pitfalls for going that route?
A data asset perhaps?
I'll check it out
I'm talking things like HP, Mana etc. I think that channel is specifically for the UE4 ability system which is not compatible with blueprints?
or rather it can't be managed with blueprints
Isn't there a gameplay ability system groundwork template on the marketplace?
any nice tutorials on how to create widgets dynamically in bp
Do you know a good resource: youtube channel, documentation etc I could look into this at?
Do you mostly put your input management inside the character or the controller... I'm not always sure ... π
Is it possible to return an array of all actors attached to this one in World Outliner? Get All Child actors doesn't seem to return those.
I want to make an actor that can hide or reveal chunks of the map on a trigger (like, entire wall of a building disappears and reveals the interior, as the player enters it)
You mean between UI Mode and Game mode
Yes that's my point... I pretty get the whole architecture... but I'd love to see what studios with really good practice are implementing... Between a One pawn game to a Multi Pawn game (gta like)
how long does it take to master blueprints?
10 000 hours
Be able to do everything blueprints have to offer
Alright
yeahhh im only 13 so i cant really get hired yet
That 10k hours thing is an old wives tale
for sure
depends on what mastery you're aiming at
I got 5 years of bp experience. while I still learn new stuff, i feel like i can get up and around doing most things in bp
probably not the case at all but oh well
excluding multiplayer
You get far just knowing how the logic works, and knowing how to google really
There's a ton of bad habbits, pitfalls and just horrible practices out there,
but once you learn to identify them, and just take out the essential parts of it that you were looking for, you're good to go
Also
this should be swapped with a "NOT" instead of comparator
while the true statement only need the bool
it will be true when you can transition..
Sounds like you know the solution, by not using montages
Ignoring the fact that those one off animations were indeed usually played by montages.
Can I say that the tutorial is shit?
I followed lesser big YTer, 30 parter, and it uses montages.
That was back in 2017
Yes, least the basics of it
Lmao no
Devsquad/Virtus's tutorials are questionable IMHO
That's generous
Even back then when I just getting started, I have a hard time making sense of his tutorials. His setups are just not good, to put it lightly.
He doesn't teach good practices.. not that he's hard to understand so much
And if you understand what you did then you wouldn't need to start over
I want to have certain actors spawn in a scene, but I want the Static Meshes to be randomly picked from a list. My solution atm is create an SM array within the actors blueprint, and then within the construction script I get that array and pick a random SM. Is this a good way of doing that performance wise?
I always look at a few different tuts on the same thing just so see how they did it different anyway.
If you actually understand what you've done so far you can roll through a different series pretty quick and keep it moving
Not restart, just identify the equivalents in your project and keep building on it
I used to follow this tutorial back in the days, not the greatest, but this actually makes more sense to me as a beginner early on, and it use montages.
In this video we add combo attacks and setup the animation blueprint for handling animation montages.
If you have any questions or comments please let us know. If you like the video and want to see more, go ahead and subscribe. Or consider supporting us on patreon https://www.patreon.com/titanicgames for more great tutorials and games to come!
Yeah, the playlist do cover how to get the basics running.
Even if it's not start to finished complete framework
I should say that I do my own experimentations in between parts, and goes on my own.
If you need a start to finish tutorial then you need more practice with the basics. Without understanding it you can't modify it to make it unique and you didn't really learn anything
Not unless you want to.. but don't just copy what the tutorial does.
Do a thing, then play with it
See how it works so you understand what you just did b4 moving on
As I said, improvise from the tutorial and experiment with it. Copy pasting without any attempt to at least try something with it yourself won't get you anywhere.
I do used to (and still, at times) follow YouTube tutorials, but the difference from just copy pasting is that I occasionally tinker with what I had to see what works and what doesn't.
^
I took it a lil further and would make a different variation on whatever the tut was for..
Space invader tut became 2 player shootout
anyone have any tips to use a seeded Random Stream properly? i have a function to generate a random level that runs in the construction script and in Begin Play. the one generated in the construction script is different than the one that generates in-game through Begin Play
im not getting consistent results from the level that is generated in the editor VS in-game
ive not tried a seeded stream from construction script
by editor and in game, both are in editor right?
not a standalone build?
yes
i just launched it stand alone and it generates the same level as the PIE one tho
its just the construction script is different for some reason
ah ok
so i guess cs runs differently
where are you setting the seed?
game instance?
because that would explain it
Construction script indeed run differently. It shouldn't be used for gameplay/runtime reasons.
no, its within an Actor which serves at the level
would that even work between other actors?
the level Actor is the only thing that accesses the random stream
ah ok
the random stream is part of the Actor
Does anyone know how to integrate with the ETH blockchain?
i try not to
How can I change player pawn at level load? I have a default pawn setup, which is a base pawn. The player selects a player in a previous level, which is a child pawn of the base pawn. The child pawn class is saved to the game instance but I can't figure out how to switch the pawn on level load. I tried destroying the base pawn and spawning the correct child pawn, but the camera breaks and the player can no longer control the pawn.
but I want to ;P
Oh I wonder if it's because I'm not possessing the spawned pawn duh
Anyone knows?
Should have no affect on cpu perf beyond draw calls. Handling an array of references is tricky though cuz all those assets in the array will be loaded into memory whether it's spawned or not. The workflow to manage that is "soft references". Epic has a video called something like Soft References Demystified on YT
If it's just a few meshes then it's fine to use hard refs. Epic's example was loading a variety of skins on a game character.
https://www.youtube.com/watch?v=K0ENnLV19Cw
found it, love the intro music on these things lmao
This week Christian Allen will provide an overview of Hard & Soft Object references in Blueprints, why the differences are important to know about, and how you can utilize Soft Object references in your project to help with memory management.
Watch Inside Unreal live at twitch.tv/unrealengine, Thursdays @ 2PM ET
DISCUSSION THREAD
https://forum...
Cheers man!
I'll watch the video
Couldmt I also remove the meshes from memory after picking one?
Any reason why Event Shutdown inside a game instance is not getting called on Editor Shutdown or Quit Application?
Is there any disadvantage to using macro libraries?
Is this correct now?
nope, nor function libraries
So if I use a macro from a library, it wont load anything but the macro Im using?
sort of
if you dont use a macro anywhere in your code but its in the lib, it wont be used
No I mean, if I use that macro, that means nothing else from the library but that one macro will be loaded?
What I was afraid of is that if one of the macros in the library for example casts to an object, and I use another macro from the library that that reference will be loaded
pretty sure each macro is self contained
so if you have 3 different macros that use the same cast, essentially for the means of getting that actor, its based on when it gets called in code
if you're still concerned, then show the macros in question
Wait, can that be right? So a class wouldnt get loaded before the macro is called? I somehow doubt that , but got no clue
Since the macro is essentially thr code it contains, it should behave like regular casts and whatnot in that matter
i guess i dont understand the question, but ive used casts in macros
if it had a compiler problem it would obviously happen
Yeah no problem there
As i understood it , it was more a question about when or if an object where loaded into memory or not when using a macro
i guess, i dont know
As i've understood it, a macro is basicly a snippet of code (that is easily re-used) and thus should behave like regular code
macros work just like as if they are in the bp graph
Exactly ^
they're just unbound from a specific actor or w/e
I think we agree :p
yeah
fwiw, macros have one slight limitation and that's based on the class they are constructed from - i.e., actor macros work for near everything (all kinds of actors), but let's say not an actor component
I never used soft refs myself so I can't say 
I just know of them
I think you need to load the object first before you can use it
Yeah I guess I just dont get macro libraries yet
Yes, like that
think of them like any other kind of macro you make or use
Thanks for the info
yep
kind of a dumb question but I am quite dumb. how do I fix my movement axis being swapped. W/S moves the ship from side to side instead of forward to back. Idk if this is it but I think my mesh is sideways but I dont know how to rotate it since its the root component and it wont seem to let me rotate it.
Add an arrow component so you know what direction is forward
Yeah its definitely sideways
Add another root component
rotate your mesh
and make it the root component again
Im not 100% itll work
You can make an empty root component and have the mesh under it so you can rotate the mesh
I reimported it with a rotation and that seemed to do the trick π
is there a shortcut for making a reroute node when dragging a line?
Type "rer" once dragging out
Or make the wire then doubke click the wire
And yet we can one-click branch nodes... π¦
I'm trying to get my 3rd person character's camera to behave like the default/sample 3rd person controller, but I can't figure out which wires i've gotten crossed, or which setting i'm missing.
My character mesh's rotation is locked to the camera rotation. .. I can move in different directions, but you're always looking right at his butt.
the default character always faces the direction he's moving even if he's not moving the same direction as the camera.
I've pretty much copied all the blueprints, but I've obviously missed or mixed up something. Any hints?
You can make your own shortcuts
I know but I haven't yet and once I start, how do I stop?
And then the different computers I use will start to diverge unless I figure out how to check my keybinds into fucking plasticSCM or something, and now it's a project, you know?
It's always worth it to spend 10 hours on something that'll save you 1 second
That's the programmers way
check the camera settings on the spring Arms details panel
@hallow wraith
i have.. but i didn't find anything.. do you know what setting i'm looking for? I might have missed it lol
alright.. the default 3rdpersonchar has them enabled tho π
i'll give it a shot anywya
It work?
Hey guys can someone take a look at this blueprint and tell me why it works when I Simulate my scene but when I actually Play it the Zoom effect doesn't take place?
No⦠those settings just made me unable to control the camera.
Hey guys, can someone help me out? I have a system in my endless runner game, where if i run into meat, i gain coins, but if i run into barrels, i lose coins, I wanted to make it so if my Total Coins goes below 0, the player dies, however, that isn't happening for some reason
Suppose there might be a hotkey you can creat
Well you need to branch, you don't need to reroute. I use zero reroutes.
someone just told me i had it the wrong way before ffs
it still doesnt work no matter which way i have it tho
are you actually calling it?
You should be calling it every time you hit a barrel/meat
set a breakpoint to A. check that it is being called, and b. check the value of total coins when it is called
I am a bit, of a blueprint shitter, I've been using unreal for like 2 days. I thought this would be good enough, i have a score system that the total coins is based off
erm alright i'll try all that now
thank you all
Hey thanks for the reply! I connected the camera bp to the asset and it still doesnt zoom in when I hit Play but does when I Simulate
ah I get you
thank you
lemme try that
Hey again! How do I trigger or call a blueprint into my sequencer?
So if I had that to my blueprint I should be able to add this into my sequencer? @devout pecan
yes show here
its a dock over that
I tried following this but I didnt have any luck. thank you tho for the answers!
Do you mind if I show you a screenshot of my current blueprint and my sequencer setup?
So basically this blueprint has it so every few seconds the camera zooms in and then later it will zoom back out. My sequencer is currently setup (roughly) to orbit around this city I have right now and I want it to zoom in and out as it goes around
When I play my scene the zooming in and out is no problem. but when I render a movie it doesnt know to do the zoom and it just orbits around
Hey? Anyone knows how I could create smth like a dynamic cast? :o Basically I want to cast to a provided class.
It's kind-of the reason to use an interface like a cast to a shared parent class, or a Blueprint Interface, or to get and interface with a common Blueprint Component
so that you don't have to cast to / hard-reference a bunch of classes
(regarding a "dynamic cast", IDK offhand)
I need to get all of the street lights connected to my time of day manager. I'm assuming it would be more performant to do a single "get all actors of class" call on the time of day manager to get the lights, than it would be to call the time of day manager on every light, right?
<@&213101288538374145> ^
:no_entry_sign: AirNemke#8169 was banned.
Got it. Thanks for the heads up.
ah yes "dlisocrd"
You would probably be best doing it from the time of day manager, but you could even do one better - since the lights and the time of day manager all are placed in the level (I'm assuming), you could probably make an exposed variable on your lights for the Time of Day manager, and then select all your lights in the scene, and set that variable to the Time Of Day Manager, though of course, if you place more lights later, you need to make sure to do it on them as well.
Were you able to find an answer to this issue. I'm running in to the similar problem.
Were you able to find a solution to this issue (pushing the sound mix modifier)? I'm having a similar problem.
That's probably a better idea, thank you.
Blueprint Runtime Error: "Attempted to access Projectile_C_0 via property CallFunc_FinishSpawningActor_ReturnValue, but Projectile_C_0 is pending kill". Blueprint: Ballista Function: Execute Ubergraph Ballista Graph: EventGraph Node: Add Impulse
I'm currently getting this error
Idk why either
I'm trying to have something spawn a actor and then fire it or launch it
But it isn't even spawning it in to begin with
is pending kill = actor is being referenced after being destroyed
But I have nothing calling the actor to be destroyed
are you sure? Projectile 0 is having this issue
Nothing is in there
I used to have a destroy actor there but after seeing the error I deleted it
hang on, what are you doing here?
I'm having a basic static mesh spawn an actor (A sphere with collision) And then launch it
That's it
hmm
If you've set up the sound mix correctly, and are using a spawned sound in the world (Not a 2D sound), then it could be your collisions are not working.
well its the add impulse having issue, the pending kill is confusing now
i know this is set to counter, but maybe it is still failing to spawn it
Is there something else I can substitute for it? And yeah It's not even spawning the actor even though there should be no reason it isnt
maybe spawn it in front of the meshes
but i also think you should use a projectile movement component instead of trying to impulse it
it might also be that the impulse doesnt work if it has physics
projectile movement component, however, does not actually use the physics checkbox
Here is a video that covers how it's set up. The sound is in the world as a sound cue, and yea it's not a 2D sound. https://youtu.be/pkkKpnufSEg
Following this slick tutorial, but running into an issue.
https://www.youtube.com/watch?v=Lq2aq2reukg&ab_channel=MattAspland
It does have physics so maybe
well the impulse should work, dunno if that messes with collision inside of object
might be safer to use the component (be sure to turn off physics)
What happens if you give the character direct control of updating the the sound mix? Like below, and when in game does pressing and holding the key muffle the audio?
I'll give it a go. I hadn't though of this. One min.
Gotcha
No change with this set up.
WAIT Spawning it outside the Cylinder rather than inside of it worked!! @brazen merlin
Idk why though because the Cylinder's collision was turned off
great, i think this would work if it didnt have physics, but thats merely speculation to the fact i dont normally spawn physics actors
i guess it makes sense that there would be a problem since collision in physics is no good
I think I accidentally set my game state to gameStateBase a long time ago, and now my inputs break whenever I try to replace it, and I cant find it in the content browser, what should I do?
no, that is right
oh, it is?
did you make your own Game State?
yea
well, now I am
but none of my movement inputs are doing anything anymore
but they do work when I set them back to GameStateBase
are you sure the Game Mode isn't wrong?
whats your entire game mode settings?
as is anyone's...
i never mess with the last three much
those are usually left alone
So the reason was this it was set to something else and that's why it wasn't working originally
@brazen merlin
yes im right here
i guess try to spawn and adjust doesnt like phyics objects
well, I want to extend my own for some new functionality
alright. did you extend from GameStateBase?
no, I just did GameState, but ill try
hmm
that worked
I wonder why though
isnt GameState the default for GameModes?
oh
hmm
I wouldve thought GameState would inherit all of the functionality from BaseGameState and more
wonder why it would cause problems...
oh well, ty!
"action mapping Unreal Engine" - Google is your friend
But the simpler version of that message is "jump input action not defined"
There is a clear distinction in your videos when the audio appears to be getting quieter, though that waterfall sound is pretty loud. The only other thing I can think of is the frequencies of your waterfall sound aren't really centered around the frequencies you have defined. Below is an analysis of the audio in your video of all the sound received, and it's pretty hot in the low end centered around 200. Try the settings I have below and see if that makes any difference for you.
Wow, thanx for digging this deep. I'll see what your suggestions do for me.
no difference...
D:
FYI, I did edit the audio a bit on the recording through Camtasia. My voice gets recorded in Mono, and will only come through the left speaker. So I split it so it comes in both speakers, this might be what you are seeing. The audio from the game comes in stereo, and I don't alter it.
I think I figured out a workaround Iβll lyk once Iβm on my pc
@daring vapor I wasnt able to get it working with the Sound Mix modifier to lower gain. Still not sure how to use that. However, I ended up using the Start Camera Fade. If you transition to an alpha (such as the 0.6 that I used) It lowered the audio by 60%, then you can use Hold when Finished and Should Fade Audio.
If you set the color at completely transparent, it shouldn't change the screen in any way afaik
Idk if it's any better or worse than sound modifier but that's how I got it set up atm
Ahhh, clever. Cool, that could work in the short run. Much appreciated. π
Not sure where to put this, but besides making a foliage an actor and setting evaluate world position offset to true through that. Is there any work arounds to make it work as foliage? Or are we still SOL on foliage wind and ray tracing // Solved
Where do you change the web browser material? I've seen several threads recommending that one updates the material with a new material to improve how it looks, and several show an example of the material, but unless I'm going crazy, the web browser widget doesn't have a material on it that I can change.
I dont no what is wrong with my enemy attack. It dont want to play
Does the montage get called?
Also a delay after completion would seem very weird...
You want a delay after it started playing probably
My guess is you set up the animation blueprint wrong
But how can i call it in a custom event for my task
You donβt have to call anything from your anim blueprint
It just has to know what slot to use
Otherwise you will βplayβ the montage but not see anything
Hello friends,
I am trying to create an interactable gate using a pressure plate via ActorBeginOverlap which is sliding down on collision and lifting up on ActorEndOverlap.
I made that with a timeline and it works fine, but I need it to be more realistic, so I enabled "simulating physics" on ActorBeginOverlap, because I needed that "bounce" effect of the gate when falling down..
But here comes the problems:
On ActorEndOverlap the door just disappears. I assume it is related with the simulated physics that I've enabled but I cannot figure it out:
https://blueprintue.com/blueprint/qlyl6n3e/
Any help is highly appreciated!
Basically, I need when the door is down, to be able to lift up again to the original place of the marker, but instead the door disappears
ok
@vagrant flickerMy first thought to that is to have two timelines. Have a vector of where the gate should be placed. First timeline just offsets the gate around this vector based on it's own track. This will leave the gate "in place" as long as your track starts and ends at 0. Then on Finished play the second timeline. This one actually moves the gate. Also update your vector that the first timeline uses here so that it plays the first animation correctly when starting the effect again or when reversing it.
Oh, you are helping me every time.. Let me try and many thanks!
The problem is that every time I make a vector and set relative location in the same nodes in which I use set simulating physics on the gate disappears
Don't use Simulate Physics. In fact, pretty much avoid that for any serious gameplay related logic. In 95% of games, that feature is going to be nothing but cosmetic, like ragdoll bodies on death and such.
So u thought Is that I can recreate that "bounce" effect using the curve of the timeline at the end?
This is my working variant without that "bounce" effect which simulates the heavy door falling down https://blueprintue.com/blueprint/qs2zzhn8/
@vagrant flicker Did this just for showing what I meant. This is the overlap trigger. Just avoids any logic unless the overlapper was a character. Then checks if any characters are overlapping, and passes that through. You may need more gated logic here if there are multiple characters that can trigger this to avoid issues.
Actual movement logic was here. I was only affecting the Z axis in this case.
I think you'd get away with multiple curves inside the one timeline
Possibly. That increases complexity though. Introduces issues with keeping the starting effect at 0. You can easily end up with a slightly offset door without a few extra tests.
Personally. I hate timelines. π I'd do what Squize suggested with curves, and move this into a C++ actor's tick function.
Oooh. Let me try this. I was using this for my pressure plates. Seems pretty close to what you've provie me. I'll try to use yours version https://blueprintue.com/blueprint/kci16zev/
To be fair. If the gate is an actor. Putting it in tick with some decent interps and affecting actor's tick setting would be more performant, and possibly much easier to make some nice looking effects with shaking and the like.
Even in Blueprint I mean. Cause the tick will only run when it's enabled. So no performance loss when it's not.
Yes. The gate and pressure plates are two separate actors..
I've always thought that tick functions must be avoided to save performance..
Timelines are tick functions as well.
Anything that requires constant updates such as a moving object must be updated constantly, which is traditionally done once a frame(tick). Timelines are just a component that is added to the actor, and uses it's own tick to run the Timeline's Update callback. It's identical to Event Tick in an actor or Actor Component.
Oh... Thanks for the clarification.. I feel stupid now π
Is there any kind of tutorial for this? Maybe it will be an easier option. Otherwise, the first branch in your BP is my OnEndOverlap function right? Where the false statement starts
In my case with the two actors I mean
Hmm. Dunno about tutorials, but sec.
Goooood Morning :), i got a little BP Problem. (Im New in UE) i spawn an Actor (Item) from a chest, so if the Player Acor overlapps the item on Spawn, the overlap event didnt Trigger. It Trigger if i move a bit away from the item and go to it. (I hope i explained it clearly enough)
maybe those overlap events only trigger on movement of actor
i'm just guessing that maybe somewhere under the hood overlaps are only checked when something is moving, rather than appearing on spot.. if so then you'd need manual check
Indeed, some extra tests there is!
Never called myself an animator, but with some work this could look alright i think π
for some reason i assumed it was some bridge gate falling down π
Its more like a gate dropping down :))
@humble vine hmm, mb something with that locaiton stuff? Movable/Static etc=
And staying still, not rotating and falling down in the X π
same idea still π
falling down -> increasing velocity -> impact bounce
during return it'll go up in a linear fashion
(sorry for interrupting, short question: what's a better/shorter name for this macro?)
IsMovementKeyPressed?
that works
Yeah, almost like this! Is this BP you've provided suitable for third person?
U are awesome guys!
just for reference
I'd probably use two curves if i did it again. Working in vector curve was shitty experience π
yeah
Is it possible to split the logic for pressure plates? Since my PP is actually another actor
easy to split in two tho
Or it is not necessar
I assume that I would not change anything in here - https://blueprintue.com/blueprint/kci16zev/
Just remove the On Component Begin Overlap and adjust the timelines play's
Why is this begin play event? I cannot understand it
since it was in one bp, i moved the internals of the bp in the scene, adjusting their relative locations
thus i had to cache its starting location as a reference
In your BP i'd probably save the reference to the corresponding door at beginplay
to avoid calling get all actors of class every time you overlap
along with also having the option to instantly handle any "no door connected" scenario (e.g found no door with that ID)
I'll try to adjust that now and play with it... If I have any troubles I'll call for help β€οΈ
why I can't? Are maps of structs disallowed?
not as key
oh I thought it would be the content
start with key, make the map, pick the content
thanks!
Hmm hello, does code actually execute in BP right after an "OpenLevel" call?
Oddly though I am getting code to execute after it
some, sure
yeah not everything
just the containing function finishes execution
I thought it was a hard stop on the call
Hmm possibly yeah
Someone with more knowledge about it can probably fill in some blanks about it if needed
@wild moth@gentle urchin Open Level is not actually a hard open. OpenLevel literally just sets a string. UWorld tick, checks this string, and if it's set, will try to open a new level. So execution after OpenLevel will run fine as long as it's not async blocked by a timer or something, because next frame it won't run.
I see, it's similar to how I execute my OpenLevel actually, as it's used for loading saves if one is set to be loaded. Thanks for the information π
If you follow C++, you can see this mostly in UEngine::SetClientTravel. That's what OpenLevel calls to set the TravelURL. Then next frame in UEngine::TickWorldTravel is where that is evaluated.
its kind of the worst thing ever that the align hotkey doesn't consistently straighten the nodes left to right, or right to left
wait really?
doesnt look like it
no it doesnt
box select is a bit scuffed tho ye
yeye box select is scuffed
the selection box?
i only use it when aligning all in a single line
but if you select 2 nodes by ctrl clicking the order is all that matters
oh wait it does. youre right, but its kind of unintuitive
seems to always align with the last selected, but is a bit weird when you're just trying to align thing in one direction
but thanks π
it should really align with the first selected lol. but at least its consistent!
yeah it's a bit weird, but you get used to it π
what hotkey is that?
Q
You would hate my blueprints. They're usually all one long line that is straight, but I clump up my stuff. Targets go on top of a node, arguments on the bottom under it.
In the end, it's cable management
I don't mind something like this, it's closer to actual coding
but this, this triggers me
Or PCB routing, if you use Electronic Nodes plugin
why can't it snap horizontally by default is beyond me
It bugs me a little. But when you're on deadlines, you forget to give a shit about it. π
Sadly, my brain doesn't see it that way π
when you're on deadlines you spend more time fixing alignment than actual logic π
or is that just me π
stuff everything in functions, then the alignment gets easier π
looks at current date, looks at what has been done in the last 5 minutes...
No, it's not just you
A lot of my stuff just looks like this.
Not true, if you select a pair of nodes first with box select, and then the next pair of nodes it will also align in the same order as regularly but you need to use 2 box selects
I would just move the events to the left to avoid that "S"
but then again I do the same as you for accessing classes fields
I like my arguments directly under. I dunno why, it makes it much easier for me to read through blueprints quickly.
I spent about the same time making my blueprints as I do making them look pretty
Spend*
I just whish vertical sequences didn't make those ugly Z lines
Would be nice if they just ... auto combined somehow
yeah
Make it a pure condt function so it's just one small node π
atleast untill you pull a function from it
I mean, would be nice if you could just smash C++ implementations to functions in blueprint classes
due to the order in which UE compiles, I think it shouldn't be possible π€
Nah you're probably right
all C++ is compiled before Blueprints afaik
probably just mixing with some math expression node
same reason a C++ class can't inherit from a BP class
<@&213101288538374145>
:no_entry_sign: scp-4092#2955 was banned.
lol that was quick
SuperManny
i don't even get how do some people manage to fall for these, there's no tie to either discord or steam in the link
whatever
you'd be surprised what people fall for
Steam elitists are not the smartest kinds either, those scams prey on those gullible among them, maybe still salty after Epic actually give away free 3 month Nitro.
smart steam elitists take everything that's free on epic, and pay for stuff on steam π
my solution is prototyping with spaghetti and then converting to c++ π
Same really π works like a charm
still have spaghetti, just less visible
any idea why I can't "get lenses" from there?
if only I didn't have to mix my classes with existing bp stuff so much that I'd spend more time writing getters and setters than actual code...
I move core logic to C++. But I dislike moving Userwidgets to C++ without a performance reason. There's no reason to have a C++ base class just for simple logic. Just clutters the project.
Yeah, BP wins on iteration speed.
you probably need to break the struct
yeah
thats funny. I often do the opposite and end up making c++ classes for all my ui elements to override, so I don't have to do it later
Did i understand it correctly that we no longer need to use ISM for SM's ? engine handles it automatically?
its annoying to find out that you want to access a UI variable and find out its been defined in BP
so its less headaches to define all the variables in a C++ base class
tbh when it's about code-noncode interaction I think game maker handles it the best
you can literally put a code block inside blocks scopes
but yeah I wish you could access BP variables without having to define them in CPP, it would remove so much boilerplate classes
I found HISM didn't offer more performance for my game that had a lot of duplicated meshes. the automatic instancing seems to do a brilliant job.
sorry, what does HISM stand for?
Perfect. I made ISM machine for my NPC's but maybe i could just leave them as regular static meshes then
I built an entire HISM management system for my game, and decided to test it without and found it ran better
yeah wasted a couple weeks at least. but I was super glad that I wouldn't have to handle it moving forward
It wasn't necessarily that the performance was worse. but the garbage collection is handled much better with the automatic instancing.
@gentle urchin How to add door rot variables into timeline like this?
HISM stands for γHISM is not Instanced Static Meshγ
π
95% of my ui just gets added to screen. It populates itself from statics. I do have a couple of general base classes with general events that pass object references. But I don't use them often. My widgets with a base class do the same mostly. I just use it for c++ tick. Anything else is mostly an AHUD BIE.
Because nobody gives a damn at the question.
door rot ?