#blueprint
1 messages ยท Page 184 of 1
neither "that 1 game", just a game.
like finished, without bugs, without crashes, WORKING
true that
even if you want to make a game called "let's watch the sunrise" and put a day\night cycle
lol
you'll be like < CALCULATE THE VECTOR OF THE SUN * some other BS >
come on
it's ridiculous
:|
we're all gonna make it
so you want a magic wand that does something for you?
if you gonna yap for 3 hours go to your toilet
I failed to understand
that's not an Engine problem
if you need to know movement direction you can just use acceleration
or make your own like desiredinput or someshit
spend this 3 hours procrastinating
might as well just change 1 node and have your animation work
midjourney will be that
nope, just a simple way
imagine trying to built a car with a knowledge of a bicycle kid
and blame the toolbox is not "1 button build car"
the value is in the creativity , not in the technical part. in the next few years it won't matter
to build a car, there are I suppose 100001 manuals
exactly this ^
do you find manuals on how to build a car online?
or you can simply buy an engine, and place it on 3 iron bars.
or we can just blame putin
but if the engine doesn't work as intended because it needs to be fueled with water and not fuel, it's not a problem of building a car.
how about the 10k other moving parts
jeez.
wdym by the engine doesn't work as intended
that's just you not being able to utilize it due to your own inexperience
the engine is the least important thing about a car by the way
or incompetence as a matter of fact, seeing that you instant blame the engine for your misfortune
hahahah bro, come on
when something is sht, but the best alternative out there, it remains sht
look, long story short, its epics business model to provide a shitty default content and then sell people plugins for every shit
and the random crashes, or errors, or stuff, are the proof.
how about you ask your question about animation
you can move to unity and still face the same problem with that kind of attitude
im not going to scroll back 3 hours trying to find your exact bullshit
if you are not going to look for help and just going to yap
please go to your toilet
you are ashaming yourself in a public place
I'm ashaming myself? I was just noticing that I'm not the only one that faces issues with unreal.
maybe I'm the only one who says it publicly, not caring to say things how they are and being viewed as "inexperienced"
which is a different thing. ^^"
thats no difference than shouting "im stupid" at a public street
understand the complexity of video games! unreal has produced some pretty popular games, im no expert in game egnines but i bet you would be pressed to find significantly better.
glad to see that what I do has an impact on your day.
so are you going to ask the question
yeah, Final fantasy 7 remake was awesome
not everyone has worked with a variety of engines, you have to forgive them
make sure that the binding take place before the call. Also print strings to debug
better yet, you can use the "design" of, "bind and check current value".
after the binding in the widget, you can get the current value of the variable and do things with it first
the subsequent changes will be received through the delegate
@frosty heron @remote meteor thank you ๐
I'm very new to ue5 and blueprints, I'm working on a third person shooter, I have my bullets flying straight most of the time by having two line traces, one from the camera going straight out, and another from the muzzle of the gun going to wherever the camera line hits, this might be an issue that's been talked about before, but I just cannot find any solutions online lmao. There's actually two issues, both when hiding behind a wall, if the crosshair(and where the camera line hits) is behind a wall, but the muzzle of the gun is past a corner, the camera line hits the wall, which causes the gun line to go backwards into the wall as well, making the bullet fly backwards, in this case I want the bullet to continue forward but to not do any damage. The other issue is when the muzzle of the gun is behind a wall but the crosshair is on a player, the gun will shoot into the wall, ending the trace line, when I want it to still travel to the player and damage them, but without phasing through the wall(if that's how these games normally do that kinda thing, I haven't tested that in other games really so idk what the norm is), and a side issue this causes is when right up against the wall, the gun will clip through the wall, making the muzzle on the inside, and then the bullet will phase through the other part of the wall, along with the damaging trace line, hitting the other player, I just want the player to not clip through the wall at all tbh lmaoo. Anyone got help or suggestions? I can get screenshots easily for whatever you need
the best way to start thinking is to reference a game that you know that has the same control scheme. see how theirs would react in these scenarios
for camera behind a wall, one of the way to handle this is to not allow the camera to go behind walls
for barrel sticking in the wall, you can cast from actor to muzzle and see if there is a wall inbetween, if so, spawn there so it collides with the wall.
Ty very much, I'll work on the muzzle in the wall solution then, for the camera behind the wall issue tho, I have a spring arm on it, so the camera doesn't clip through walls, I meant like around corners, like in these images, the muzzle is around the corner, but the camera is before the corner, causing the bullet to fly backwards as you can see with the trace lines
I only really see 3 options here.
Your choice of whatever you want.
- If the impact point is behind the gun, or out of a defined like "forward" rotation, then prevent it
- Create a new trace collision, that is just
damagable, you can't damage walls, but you can damage players, so trace, it'll only hit players, then the guns trace will go the normal trace and be stopped by walls and the such - Or, like "transform" the cameras rotation, to be the direction the gun shoots, but I can see how that could be weird from a player POV
Arguably in any case you may wanna do the first one no matter what.
So, players can't just shoot backwards.
I "pseudo" fix if math is hard for the shooting backwards.
Allow the trace to hit the player your controlling, and have it stop (even if you have penetration logic)
You can also see that 2. will still cause issues, if you ever have like buildables, or some form of like "destroyable" wall.
Its damagable, and sometimes TPV camera can hit it and go backwards.
So, a like "is forward" check like 1. is good in general.
that definitely sounds like the best option, thank you very much! ๐ Do you have any idea what detection would look like for that? I'm very new to blueprints and don't know all the nodes very well yet lol
direction of muzzle to hit location, dot product with muzzle forward vector, if its negative, do something else
perfect! ty ty!
in these cases, you could also forgive that, it would fire with the muzzle's forward and call it a day
instead of directing to the center of the screen
that's what I started with, but I wanted to have the crosshair and for it to actually shoot at the crosshair lmao, as well as even when it's off to the side like that, it's impossible to judge distance for it to hit, so it can be hard to eyeball it
The only suggestion I would give to my self is to look at lyra implementation
But it's not in blueprint unfortunately
The issue you described is very generic problem but rarely addressed imo. Same goes how everyone probably use spring arm and not able to get a decent rotation for the camera.
just looked up lyra, I didn't know about it but I have seen other people using it in a couple tutorials, that looks like the perfect place to start for me, only I might want to change some more finite details within it, and I'm better with blueprints than C++
Please tell me I could add GamePlay tag to the actor with this node?
that points to a FGameplayTagContainer
I guess I have to create Gameplay Tag Container variable on the actor and set it that way?
if you can get the container from an actor, then it should be good
if you want it to be reusable, and not using GAS, you could make a component with the container, add to your actor, make a function library that attempts to search for this component from an actor, and do operations accordingly(add, remove, get)
an interface is also an option, but you would still need to implement the variable and the operations
creating a "BP_GameplayActor" that houses this feature, and every other actor subclasses from it is also an option
Yeah, I created interface to Get Gameplay Tags from actor, but component also seems nice
if you have access to c++, you can use the already made IGameplayTagAssetInterface which is only implementable through c++
Thank you for help ๐
Hi guys, i am making a mini golf game and am having trouble getting my pawn to teleport once it enters the hole. I can get a actor or object to teleport, but not my pawn. This is my blueprint, i have also tried set actor location which also doesnt work.
set actor location should work, the Hello prints ?
Yeah hello prints, i have even put the print string after teleport or set actor location and it also prints but pawn doesnt move
I also tried it on just a standard cube, and that will work i can get that to teleport, but no matter what layout i try in blueprints the pawn wont teleport
are you setting the location somewhere else ?
so maybe it moved, but moved back because you set it for some reason ?
ive checked the blueprint for the pawn its self and there is no set location in there, and no other blueprints other then these 2
you can move around normally just fine ?
yeah i can shoot the ball around perfectly fine, the only weird thing i have found is if i try to use the "cast to XXX" node instead it always throws an error, which i don't think it should.
when you cast you are checking if something is of the other
so you can't just cast
are you trying to teleport the thing that hit this overlap ?
Yeah so i am trying to teleport the ball once it goes in the hole and hits the trigger box back to the begining, so that i have the fundamentals to then teleport it to other holes etc once made
try to cast other actor to the ball, and set actor location of that
Still nothing, goes through the trigger box, and it even shows the print string at the end after teleport but ball doesnt go anywhere.
I am sure its something simple somewhere xD
don't get player pawn, use the result of the cast and set location on that
perhaps for some reason the ball isn't your pawn ?
I also tried it off the As Golf Ball target and that also didn't work. Maybe, it is set to the default pawn. Is there a way i can get it to print string what its trying to teleport?
hmm
do you move target point or what is that an actor in the level ?
i just wonder what the location
try to hard set it to like 0,0,0
see if you go there
so if i just leave nothing in to the location it should default to 0,0,0 right
you can split it to make sure but ya
check the return value of set actor location
is it false ?
it's just weird it all succeeds
I connected print strings off true and false and neither of them print, it will print the hello print string on the output of the set actor, but not the return value
well you have no execution to the branch
you just have it hooked up to hello
after you move it, press f8 to hop out and look to see if the actual ball has moved or just your camera isn't updated ?
Doh, that comes back as true. well i have the trigger box setup half way down thje course so i dont have to keep going in the hole, so i can see the ball is still in the middle of the course.
Could I swap this to Get Selected Units Loop once and then Switch on Gameplay Tag (I would change it) and it would Get Units and kinda ''sort'' them into ''switch'' they belong to and then I could set these to Work and others to Transport and even others to do so something else?
im not sure how its coming back as true when it clearly isn't teleporting the pawn. It must be teleporting something else??
do you have anything running on tick that might be setting that location is the only thing i can think it moves it but moves it back
What kind of concepts or phrase should I look for to figure out how to highlight where a spell is going to land (time will be slowed severely or frozen during this, I'm not sure which) (and maybe, though I'm sure it'd be more complicated, it'd be even better to preview the specific spell going off instead of just indicating the target placement).
Google is terrible now so I didn't get anything useful looking for targetting or placement.
google fu ftw
I probably wouldn't handle it like this. Rather than sending individual RPCs you could send a single RPC with reference to the units and the thing you want them to interact with. Like, add them to an array if they match your criteria and then send the array to the server and have the server do its thing and figure out the action the units should be taking based on the target. And yes, you could potentially use a gameplay tag to switch, but again, I'd maybe do that on the server.
There is an event tik for building up the launch velocity, but that shouldn't be setting its location once launched
ah wait I think I've stumbled into the ideas I need with the word indicator
Hmm, that's a good idea but I'm not 100% sure if that can handle one thing.
Let's say I have target building which is a Wood Cutter. I get all units and I want the Workers to Work, and Transporters to Transport.
I guess I would have to implement 1 Interface Event for all of them after ''Server | Asign Job", and that event would set *Working Building on the Behavior Tree. *
Workers and Transporters would have different Behavior Tree, but the same Blackboard Key (name) with the same Decorator: Is Working Building Set and then would do it's job. Workers would go gather and transporters would transport (so do their own sequence on BT).
Okay, I guess that could make sense, if you could judge it I would appreciate it.
But to add 1 more thing to complexity :/
Right now as you can see, I For Each Asign every unit to the building, and every iteration i check if the building has reached worked capacity, if it reaches, then I *Break Loop *and don't asign more workers. Where would I move that logic? Because I guess it would be in the Server | Asign Job event, but I guess that is why I need the switch? I need to basically run 2 logics so the Transports checks if they can get asigned and workers needs to check if they can get asigned.
Or that maybe should be handled in the whole end on the building when it receives Asigned Unit from Server? But I think I still have to put that logic before setting Behavior Tree for the unit, because the building would decline unit, but it would still go and work. Or building would call back, and say hello, you cannot work here!
So the logic needs to be before we asign the unit to even work (before Behavior Tree). So the problem is how to differentiate that there is cap for workers and cap for transporters, which are different variables on the building?
I guess I could set 1 event instead of Server | Set Transporting and Server | Set Working I could change into 1 event Asign Jobs, but I still need to switch like here?
What I'm wondering if this Break from loop will f up both of the logics, or it would run them separately correctly ?
Okay so i have used the same blueprint except i have set the object for it to teleport as a random sphere. This sphere will teleport to the location when the ball overlaps the collision. So there has to be something in the balls event graph that is stopping it from going back to that location
If anyone wants better picture how it's right now.
it's usually easier to simplify the situation to get help.
You want to do the same thing as in this picture but use one loop ?
More or less yeah
I will also need to check if the building reached Capacity on the asigned transporters
and I wonder if I can do this: and the break loop wont' affect the 2nd switch.
and I will add also Break loop before Set Transporting, so the break shouldn't affect the Workers... I hope you understand?
the break will stop the loop
thats what its for
so it will just break and go to completed
How I'd approach it:
On Client > Get Selected Units > Determine Target > Send RPC to server with Array of all units and the target
On Server > Loop through array > Switch on Unit Type, do the required logic for that particular unit type for the target
Eg. Workers > Check if building has worker capacity > If so add the worker to the list, modify whatever variables, if not, maybe move that worker to the building but don't do any other activity with it.
But first it would get all workers and tell them to work before it breaks ? And same with transporters ? Or if it would break on workers it would also stop assigning transporters?
Hi, why my Async Load Game from Slot gives "false" from node "Success"? The file does exist.
If you've modified the save file object in some way after using it here, it coudl be causing it to load incorrectly. Try deleting the actual .sav file and try again from fresh.
Perfect.
For some reason i did this and it does not worked
But now it does
Thanks!
Does anyone know what in here what stop the object from being teleported? The teleport function is working correctly but it will not teleport this pawn. I have tried deleting certain parts of the blueprint and trying again and it still won't teleport it no matter what. I can however get it to teleport random other objects.
Where is your teleport logic?
Itโs in the level event graph
Setup like this. It works teleporting other objects, it just wonโt teleport the pawn
Nothing here that would stop teleport from working.
I'd also recommend against using the level blueprint. If you need to teleport your ball around, you probably want to make an actor that can handle that so you can easily reuse it rather than having to code them all manually each time in every level blueprint.
What is causing it to not teleport is because your "Sphere" is not the root component of the actor. The sphere simulating physics means that it's no longer "bound" to the actor's location. If you make the sphere the root component of the actor, then it will move with the actor even when simulating physics.
Alternatively, you can set the relative location of the sphere, but there may need to be some additional math involved.
I will try this in the morning as itโs 1am atm haha. Thank you! Hopefully this helps ๐
Hi all
I'm trying to make a "Horse". Should I create a Blueprint "Actor" / "Pawn" / or "Character" class you think guys ?
This "Horse" will be possessed by my Player of course
Sorry if this is the wrong channel, any idea how to make these straws fall and freeze rather than bounce about as they are?
Do you want them to never unfreeze again?
Just fall naturally and be stored in that position?
yes sirrr
Ah, there's a button one can press to store the state of a physics simulated actor in play mode.
For exactly this kind of thing.
That's perfect!
Agonizingly I can't recall the specific key bind! But I learned about it in one of Unreal's own videos.
I can see if I can find it again.
Much appreciated!
Found it!
I simulated it in playmode and right clicked in the outliner to keep simulated physics (K key)
Thanks
Hey all,
I need to implement a basic flow chart/dialogue tree for a small project, to be able to more easily graph/plan the progression of characters through a chain of events. Passage of time, certain events, etc.
What's the best way to approach this using what's available in the engine?
One of the ideas I've had is to somehow repurpose the AI behavior tree for this, using an AI agent as a management tool for moving things around, enforcing events, and keeping track of things. But I wonder if there are better/more straightforward or better suited tools to go about this.
Ah right, K!
I had a hunch it was K or J!
Nice that you found it!
I would suggest the excellent (free) FlowGraph plugin, but perhaps you expressly want only tools that are included by default in the engine.
Hi, anyone know which part to look at for the cause of crash? It work fine during the login level, but once it go from login level into the main scene, it just crashed
I tried lowering the video settings but doesn't seem to work
Do you have the actual crash report? That would give a better indication of where something may be failing.
this?
The thing that pops up when unreal crashes - usually gives you a message that you can then send to Epic.
idk why but no pop up when it crash, it just close itself
I already enable "include crash reported" but still no pop up
Quick general question, if vs doesn't fully understand unreal's API, if I create my own engine, will there be error everywhere like unreal or is it just because the unreal engine is so big?
i think the intellisense will be the same either way
My question was more about why those errors occurs with unreal but when using other APIs, vs works correctly?
this is what google says
"Intellisense doesn't play nicely with Unreal Engine's source code because of the macros which are handled by the Unreal Header Tool/Unreal Build Tool."
okk, that makes sense ig
Have you fixed it
hey, sorry for crashing in the middle of convo, I have a quick question, is there a node in blueprints that could change the Editable bool inside of a struct? Basically I want only the needed options to be shown depending on Enum that I select before that struct ๐
yes there should be function to change just single variable in the struct
but make sure u have a reference to the struct, and not a copy
nope ๐ฆ
Hmm your answer is valid but I think there is missunderstanding.
What I have is basically an array of those structs.
I have also an enum independently of those in which I select either "Ground Level" or "Upper Level", based on this enum I would only display one of said variables from Struct either "Ground_Level_Part" or "Upper_Level_Part"
@limber parcel
basically QoL change to make level design less confusing with my construction script blueprint
i think it would be best to make this into a c++ struct
Yeah I tought so, I wanted to keep it blueprint only to deliver it to marketplace like that, so I guess it will need to be a plugin.
Thanks
Blueprint struct for market place?
I'm making a whole system for buildings that's just a part of it haha
trust
It's still broken, I saw people with unknown struct issue 5.4. I would avoid a broken tool altogether.
best to make ur own from scratch, even if its just blueprint
we have to boycot the dumb unreal business model lol
Ah, I am mainly a 3D artist so main part of my pack will be the models, I just wanted to add that system on top of it as a bonus and to show it in my portfolio that I can also implement stuff ๐
hey, im trying to make a grind rail object like sonic, but im lost on how to make it. i was hoping to make it a spline so i can edit the length and placement when putting it in a level
yeah splines are a good start
might want to look into lerp too
i tried this, but idk what im doing lmao
best to just watch some random tutorials ๐คทโโ๏ธ
thats why im here, i cant find any good ones for making grind rails...
try any spline tutorial
there should be hundreds of tutorials for making things move along a spline
I have a missile in my game and I want it to make a whoosh sound if it travels near the player but misses
I was thinking about having two collision spheres on either side and if the player ends up in one of those then it plays the audio. but it seems like if I add those collision spheres then my actor is going to fire hit/overlap events, which I don't want (I use hit/overlap to determine whether the missile hit the player!)
is there a smarter way to do this?
Just add a looping sound effect and have attenuation do its thing?
Is there any way to convert string to scale or transform? There are blocks for string to vector and rotation but why not scale?
Scale is just a vector.
but in my string there is also a vector. So how can i seperate them?
If the string contains both, then it won't properly convert to a vector either.
You'd have to somehow split out whatever elements out of your string into a format that Unreal would recognize to be able to convert it from a string to a vector.
interesting... I only want it to play once though
you can just store it in a list like x,y,z,rotx,roty,rotz,scalex,scaley,scalez
and split it up and make the things back
ok. I will try that
Set the attenuation of the sound effect so that it can only be heard within a short distance
but how do I know when to start the effect? I want it to start when it's close enough to the player to be heard
..The sound will always be playing, utilize a looping sound effect
Think about how real sounds work. When you hear a car engine going by, it's constantly emitting sound, not just playing the sound once and you're hearing it whizz by you.
You're far better off using a looping sound effect that is more the sound of a stationary rocket that is always playing and letting the engine simulate what it would sound like as it whizzes by.
Ah interesting! Yes I generally prefer built in tools but I will have a look at this, it looks amazing. Thanks!
modify the attenuation. (IE how loud the sound is relative to distance) so that its only audible within a close range.
Good ole Doppler does the job for ya
right but the sound is a non-looping low pitch -> high pitch, so if it happens to become audible halfway through the player will hear medium pitch -> high pitch -> low pitch which doesn't make sense
yeah I mean I can generate it procedurally but there's really zero way to have a collider on an actor and see if just that collider is overlapping something?
I have a nice sound effect I already want to use ๐ฆ
You need to go sit by the airport
look up collision channels
i made a spline, how do i make it so when my player walks onto it it moves them along the spline?
but I wouldn't approach the effect you seek by the method you currently atre trying to approach
I understand how collision channels work, but I can't get any collision channel info in my overlap event, can I?
No, but you can have multiple collision shapes
If youโre so intent on doing it this way
yeah but in ActorBeginOverlap I only get the other actor, not which shape created the collision, right?
You're going to have an infinitely better time with a procedural sound
unless you want to handle the sound effect of the missle zipping by both horizontally and forward/back~~
oh! I'll check out ComponentBeginOverlap -- that's exactly what I was asking about if it does what it sounds like
right now I don't want to get into metasounds and how to make my own sound effects, I just want something simple with this nice effect that I found. thanks though!
Like you could even do something simple by having the attenuation limit the range of what can be heard and procedurally setting the pitch based on the proximity to the listener
you don't need metasounds
its literally a single node in the sound-graph
Get a nice hum/woosh at a constant pitch, make it loop, and bam AAA
does anyone know how i could use niagara particles to do damage to a target?
Look up how to set up collision with niagara particles, though this generally isn't recommended tbh
then how could i make sure that the damage missiles correspond with the niagara particle effect?
i have the vfx part done (https://www.youtube.com/watch?v=cKwG9BZGyko) and now i want it to be functional, but i can't find other ways of doing damage
ik about the homing projectile component in unreal, but then i would just have 2 different projectiles
^^^I went through the same lesson
Use the projectile-movement-component on your projectile actor
Attach the niagara-vfx on the projectile itself
you can use 'SystemLocation' in the emitter updates so the niagara particles stay "attached" per-se to the Actor
that's a constant effect + doppler?
Yep
yo ngl that kinda nailed it
doood that's crazy good
ok, I just need to find or make a constant effect then... I'm guessing it's not as simple as white noise or something right?
Honestly white noise pitch shifted lower would probs work
Probably a decent "medium-large looping fire" sound would work to
Here's the setup now with a metasound - I'm not a great audio engineer, but with more tinkering you could probably get something you want.
Hey I tried adding a HISM to my blueprint but nothing appears for the static mesh
Won't show anything unless you add an instance.
how do i make an instance?
Either at runtime or you add an instance in the array during editor time.
ahh there we go
so nothing goes in the static mesh input?
Yeah whatever mesh it is you're wanting to instance.
oh wow
should I play with these settings? And why is there a seed for this...
Just came back and I'm brainstorming 1 thing. After I switch on unit type, I have to add them to array again and loop trough them again so I can assign only as much as needed and no more. Would it be ok? Because I cannot use the same loop with break and then break from each unit type? That would stop everything and not only one switch line?
also does it matter how many HISMs I have? Performance wise
I want to duplicate these 2 to the other side so i would have a total of 4
LOD Scale = Meshes have a built in LOD system. You can have the HISM scale this up or down.
Cull Distance = Meshes really far away you may want to not show at all.
Random Seed = You have your HISM drive a procedural generation, so if you just wanted it to have a scattered bunch of meshes all over you can do it within the HISM without having to have math external to it to drive it.
but i dont so i'll set the seed to 0
and it doesnt let me
im not understaind this correctly
Hello! I was wondering if there is any way to dynamically create and store an array of actors. I dont know in advance how many arrays there are going to be so I cant create them before hand, so looking for a way to create array variables during runtime and filling them with on runtime created actors so that I can access those variables again later. Does anyone have a suggestion on how to attack this?
If you want to split them out first sure go ahead, but don't loop again within the loop. Alternatively, you could just keep track of the count, and then ignore any further of a specific type. You may also want to move this into a funciton as it doesn't make much sense to have those array variables sitting around all the time.
Technically speaking, all static meshes are instanced automatically by the engine. HISM gives you a bit more finer control of it. I think it's fine to use one HISM component for each mesh you want to use within an actor.
Oh, so I would move the logic on completed right? but then I would have to use Sequence to distribute the jobs to each of Array I set?
That sounds like you just want an array of actors variable. If you want some way to hold multiple arrays of actors, then you can use a structure that contains an array of actors, and then use that as a value in a Map variable, so then you can look up which array by some key (like gameplay tag, integer, string, etc.) and get the corresponding structure that contains the array that is associated to that key.
Yeah
Ah yes that second thing is what I need, I;'ll take a look at structs thanks!
I basically need an array of arrays, because there going to be groups of different amounts of actors that are supposed to be grouped together, if that makes sense ๐
Should I worry about this whole thing beeing heavy or not really?
Again, I wouldn't bother. If you care about counts of things, then handle the counting in the main loop where you're going through them all already and if they're above the count do the alternative action you want them to take.
Then you're only looping through each thing once rather than potentially twice.
Yeah, but then can I use for each with Break like this? (and also same logic for the Workers). Will this break, break only one Switch line, or it will break everything?
You don't have to break.
Just don't do the action for that particular unit.
Or do something else with it.
I tested it and it worked like that if in that moment building was 8/10 but I had 5 units, it asigned it to 13/10, then it was 13/10 and it worked, like it couldn't assign.
So if I don't use break, it only works if in that particular moment I click, like it checks once and not once every new unit is added, which is weird.
That's likely something wrong with the assignment logic then. 0+1 = 1 Is Value < 5 TRUE. Do it again. 1+1 = 2. Value < 5 TRUE. Do it again, etc.
Until... 4+1 = 5 Value <5 FALSE don't do it.
Hmm, maybe it keeps reading the same Currently ASigned Workers for each of the worker?
It should update every iteration if I'm not mistaken, but I think it maybe use the same number for each
where do you update it for it to update every iteration ?
inside this component
there was also 1 more event Asign Worker which was doing it
You probably shouldn't track it like this either. The array itself can be the authority of how many workers are assigned rather than having a seperate variable.
1 less chance to create bugs.
so instead of checking this int variable I should get array of asigned workers from component, get lenght and check?
Yep
Are you able to give a quick example of what you mean? Not sure how the struct, array and map work together like you mentioned ๐ค
I'm gonna rebuild it and test now, hope we can figure it out ๐
Examples here of the structure definition, and how to find a specific structure, and manipulate or add values into the map.
oops, forgot on that ARRAY REMOVE to plug in a reference to "Dragon to Remove"
Managing actor arrays like this can be kind of cumbersome though. Not sure what your usecase is, but there may be a better way of handling what you're wanting to do.
Aight, thanks! I'll see if this idd will be the way to go. Appreciate the explanation!
Hi, how i can rotate pawn facing the player?
use the pawns transform?
Hi!
I have a question, I am currently saving my parameters with a technique which is certainly not optimized which is on Youtube, can I know if another simpler or even more optimized technique exists than this one?
Yeah, but how?
its only for options, if it's working as intended i'd leave it
Im sure some of you would find this usefull: https://www.youtube.com/watch?v=xTOrP-Pet5A&ab_channel=BoundlessBite
Looking to get more out of Unreal Engine without spending a fortune? In this video, we'll show you the top 6 free plugins that can help you improve your game development workflow. From lighting and visuals to level design and more, we'll cover the best free plugins you need to know about. Check it out and take your Unreal Engine skills to the ne...
depends on how you intend to trigger the "rotation event"
By the event triggered in the pawn
like an overlap, a widget button, on begin play?
No, like i have in ai and if it reaches the player it need to rotate player
I just need to rotate player by event
could anyone give me some guidance on implementing a magnet power up that attracts coins to the player char? ive tried a few things but this noob is stumped
indeed, so then you just need to have each actors transforms and do some math and manipulate the rotation?
Yeah, but it does not help, like i knew it before asking, i need to know how to do it
'Find Look At Rotation' node
Hey all, how can go about shooting projectiles in all directions all at once from an actor like so?
Yeah, and then?
I use start as my pawn location, and target as player location?
Okey, thanks!
Anyone familiar w/ the "Unreal Engine City Building Game - Placing buildings in Game (At Runtime)" from The Game Dev channel? https://www.youtube.com/watch?v=ZrM_CfOy1sU&list=PLFYGCCDpMHmHJwhIRY6qNumAts--W8bTy&index=12
In this video I show you how to place objects in the world at run time using the mouse cursor and a ray trace into the game world. Sorry this one ran a little long, there was a lot to explain and get through!
00:00 - Building Test Asset
02:00 - Setting Line Trace and Collision
05:00 - Ploppable component
11:00 - Character Controller Updates
21:...
I am having an issue with the "building" not showing w/ my cursor.
so the "building" is not showing up where the cursor position is ?
and you set up the custom channel right ?
what does your code where you do the line trace look like ?
i think so?
how do i get those in an input event
i'm looking at some of the code now trying to get an idea of whats going on i did it awhile ago and changed some stuff
does it actually spawn in ? just not follow the cursor ?
not doing both.
Did any of those screenshots help? or clarify?
i added a bunch to it, so thats a lot to look around and figure out by images
and i took some out
Can you tell me what you added and took out?
when you click it doesn't spawn one ?
Nope.
is placementmodeenabled true ?
Hey peeps,
Made a BP Actor with a spline in it and some variables which all works fine. I put that BP Spline into another BP as a child actor but I can't see the exposed variables. What tick box am I missing to make them show in the details panel when I put the 2nd BP into the scene so I can change those variables?
Yes.
If you created it properly check here to Show
Still not showing
on begin play you have placement mode disabled ? in the controller, set it to enabled
How did you put that BP Spline into another bp as a child exactly?
Child Actor
Hey guys would anyone know why when I add the child actor to my cube (second photo) it then returns is not valid on my call interact? (first photo) The third photo is what the child actor is trying to do in the event graph. When valid in the first photo the actor is destroyed and is added to my inventory but when invalid it does not do that. been trying to figure this out all morning if anyone has ideas or needs more screen shots of things to help lmk
check this box, even it's set to true your resetting it to false in the controller
you want it true so you are in that mode
the biggest change i had to make was how it finds the cells, instead of a loop i did it with some maths to get the right index, and i altered that to return the cell as well so i can access it's variables
thats in the snap to grid part
i don't know what i changed and when like i said it's been a long time but i would start with that box
Hard to see anything on the images.
How are you spawning the building?
Are you following tutorial like you should have building on the cursor when you click play or are you already implementing it into your system where you have button that spawns building?
Sorry I cannot help much because I never tried doing it like that. I think if you want to access what ever is inside this blue print spline that you added, you have to drag it and then try to access variables that are there, but this is not a ''child'' that you added. You added component (which happens to be other blueprint actor) to the blueprint. There is no inheritance like Parent > Child. You added a component to the blueprint and I think you should be able to access what ever is inside it if you drag it on the event graph.
OK. Thank you.
I am.
but a building spawns on map and does not follow the cursor.
You need to put the cursor location on the event tick so it updates all the time.
check in update placement if you get a blocking hit or if it's even running
Ok so it seems the child actor its self isnt the issue, the issue is the collision box on the child actor. I have two line traces set up one for the interaction of the object which is an interaction trace, and one for the highlight of the object which is a visibility trace. when the colloision box is deleted on the child actor the object is then able to be picked up but the highlight disappears.
I found it.
what node is cursor location?
You are not updating location of the building because it's not connected here
in the break hit you can click arrow and get more data
get locationa and plug it into Set Actor Location
do what mentioned, plug in the location to the new location of the actor
your definately missing that part, probably why it's stuck at 0,0,0
@dusky cobalt and @lofty rapids, Thank you guys it's working now.
You will have to rework how he finds location of the closest cell, because at 100+ it's way too heavy. Maybe engage can help you. I choose different system for that.
i did it with some maths definately a lot better than a loop
I wonder if you could use something like On Cursor Over tile get it's location and set it as the snap location?
the guy chose a loop and called it the easy way
and said there was another way, "the hard way"
i did this https://blueprintue.com/blueprint/y4e32ed2/
lol, at like 40+ it cells it starts to become unplayable
@dusky cobalt and @lofty rapids, it's with the cursor, but now it is not placing it.
You need to have some event first like Click E, and then Spawn Building and set location to the closests location / snap location or even just current cursor location (if you dont need snapping).
ok.
check that spawn building is running
check your variable if they are true / false and if the execution is going where you expect it
i do have set to true and nothing.
@lofty rapids I tried what you said but there is no way for my game to make it into a map or array. I have to use a string
what is this again are you trying to keep the transform in a string ?
I have a string with a transform value and i have to convert the string to a transform or scale
and how did you store that transform value in the string ?
X=-860.000 Y=-810.000 Z=0.000P=0.000000 Y=0.000000 R=-0.000000X=1.000 Y=1.000 Z=1.000 here is an example value
converting the vector and rotation part goes fine but the scale doesn't work
oyou have two x and y and z
but ig that doesn't matter it matters how you are parsing it
Try disconecting it and setting to true. If it's this then check how you are checking when is Placement Valid to true.
show what your doing that doesn't work
ok
if you can change the structure i would set the end ones to something like SZ
and you could use a loop to get the values
but i was suggesting just putting then in order x,y,z,rx,ry,rz,sx,sy,sz
so you would only have to split it once
The first one is the string its self. (I know my code i messy). The second one converts it to a transform
But for example the vector has 3 value's needed. Then i need to slit it again
i c your using the built in conversions
is that how you stored them in the string ?
with the built in conversion ?
yea
Why is the input data in that format to begin with? Something to clean it up into something more manageable like JSON or even using piped separation per variable for each line would be helpful.
but there is no block to bring it back to the scale. Since scale is the same as vector
That's because scale is a vector... Rotations are different and while they store floats, they have additional stuff under the hood that separate them from Vectors.
i want to save it as a file. Right now i use a plugin that allows me to save strings to a file
@dawn gazelle, just finished swapping it and everything works! I don't know why it didn't work when I first tested it, but now I'm using array lenght to check and it's perfect. Thank you so much for help today. I know it's not possible to see anything but it's working smoothly ๐
So save to the file in a better format.
eg: X=-860.000 Y=-810.000 Z=0.000|P=0.000000 Y=0.000000 R=-0.000000|X=1.000 Y=1.000 Z=1.000
now you can easily split them up by the pipe.
i need a way for the script to know when its a vector and when not. Now i used the one to convert it to a vector but that sets the scale the same as the location so that is not working
create your own is what i also suggested
that makes the transform
a function
takes the string, and outputs a transform
You can parse these three things into an array of strings by the pipe. You know the first entry is the location, the second is the rotation and the third is the scale.
so what you are both saying is that i should save it diffrently and then when to get the data back, i split them with for example this| and then i allready know what value is what? But will that work with the scale?
Yea
So when i have for example the scale value. I split it into 3 value's and then convert that to float so i can use that?
No, you can keep it as a vector. The scale is a vector.
Why doesn't it work with what i have now then?
It can use the string to vector and plug it into the appropriate thing you want to use it.
Because you have a string that it can't properly parse.
oh. But can i convert my transform to the string and then use that?
what is that parse into array block?
just keep getting the values in a string like x|y|z|x|y|z|x|y|z
it splits it into an array of strings based on the delimeter
you want to cache it first but i was just showing it quick
So when i have this X|Y|Z|RX|RY|RZ|SX|SY|SZ and use this block i can get every value between | these?
ya, if you have a string one-two-three
if you parse into array it will be an array with one, two and three as the items
ok. I will try and tell later if it works
Thank you so much @lofty rapids @dawn gazelle! It works now. Here is the script now
it's still not placing.
How does your logic for placement looks like? Like you click something? where is that?
check if is placement valid is false with a print string after the false of that branch
Does world partition affect how beginplay is called or is that always on level start?
Is there any plugin or something that everyone uses when doing UI ? I heard something about pushing widgets back and forth or something like that? I'm asking because I have some hover logic that when I hover, I clear child, add new widget, but when I hover back, I want the widget that was before to show up again (in some situations). I can of course make it with variable save etc. etc. but maybe there is something already built in?
it still follows my cursor and nothing gets placed.
Show how are you placing it?
It grayed out and not letting me check it.
logic?
put a print string on the false after you check if its valid from that component
because maybe it's not a valid spot
based on something could be wrong in that logic that determines that
like this?
put the boolean back into the conditiong
but just off the false print straing hello or something
and when it runs if you see the print string on screen then the valid placement is false
This what it is doing.
Do you have logic that when you press button you spawn building at cursor location or something like that?
no i don't.
Well then you cannot place it
is that set placement or in placemode?
Make event with a key from keyboard and on this event Spawn Actor and plug location either from Cursor Location (you can store it in variable) or plug Get Closest Grid
you got the right node you just don't run it, i'm not sure if it's related to your problem
^
need some way to check if there is solid ground under the enemy while paying a montage
so you made two materials here, do the materials change atleast does it set the material at all ?
and change if your colliding ?
if it's red that means it's invalid so it won't drop
I mean if he doesn't have logic to spawn it it's not gonna spawn
@lofty rapids and @dusky cobalt, i am taking a brake from for a bit. be back later.
This worked thank you so much, as soon as I made the sphere the root it all works perfectly ๐
How do I line trace only for landscape collision?
Anyone know how to stop and resume sounds when pauseing and unpausing games?
I didn't use BP a lot and I have a silly question. I'm trying to implement in my C++ BlueprintNativeEvent function a Timeline but doesn't work. How can I do that?
mmmm... in C++ I can create the _Implementation and add the timeline there, here how can I do it?
Right click add timeline
but in the Interact doesn't show, that's why I don't get about bps
As mentioned above, you cannot put timeline in a function
Also BNE is an event? This looks like a function you make in bp instead of the BNE from cpp
What is the parent class of SGItem?
an actor
this is the c++ function
then I have it here
It's because you've marked it with a return value, so then it's going through as a function rather than an event, and as ColdSummer already mentioned, you can't put a timeline in a blueprint function.
oh ๐
I wanted to return a true if succeed, didn't know that would mean that timelines didn't work
thanks :)
The diff between event and function is that event can't return a value
there was a blueprint node for bool input that would constantly tick when true and not tick when false, it was a white node but i forgot the name, anyone know?
Are you just trying to stop an object from ticking?
oh i found it, while loop is the name
Da hell
Loop is not quite the same thing as a tick.
Loop doesn't tick it all happend in one frame
my bad, was looking for it but i got it now
As long you know it doesn't happend across ticks
Meaning if you have a vwey heavy loop, your game will get blocked until that loop is finished
I have a noobie ๐๐ question I hope someone can help with. I have pickups in my game that are persistent actors I placed in the level, and when the game is saved and loaded, those same actors are spawned along with the actors that are saved, so I get duplicates now. Is there a way to load in the saved data and ignore the persistent actors in the level without deleting the persistent actors from the level?
Hey when I set the crouch half height, no matter what value I set it to, the height doesnt seem to actually change when playing. Does anyone know why?
Ive tested it by setting it to 1 cm height but there is no difference between that and the default 40cm
@broken lynx what doesn't change? I take it you understood that the height being changed is the capsule component?
Im testing it by having a tunnel that you cant enter when standing upright, yet if Im crouched, you should be able to enter it. However, since I cant enter the tunnel no matter what value I put in there, I could logically believe that the capsule hitbox isnt being scaled right?
no need for guessing, open console and type show collision
you will see how big the capsule component is
Ok, give me a few min
Im still adjusting from unity, is this not where I type in commands?
press ` when you play in editor
Oh yeah I see it working now
Its a bit hard to tell in 1st person though
Ill just drag the camera outside the player for now
you can eject from the character by pressing the up arrow button
the button is just next or around the play button
when using 'add local rotation' nodes, is it possible to prevent or counteract the effects of yaw on roll?
But it does seem that the collision is a tad bit taller
add 0 for the yaw and roll?
yup, still too high
And now if I set the half crouch height to 20cm, no difference
that's one tiny hole to crawl into, make it a little higher maybe?
i mean when i add yaw, it adds roll too, i want it to not do that.
X + 0 = X , you are adding 0 so it shouldn't affect it
just add the one you want
Can I not change the crouching height easily?
you just did, but I don't know why in your case it won't go smaller than what ever you have.
yeah, i'm saying whenever I add to the Z, the X is affected.
even if it shouldn't be
Thats odd then
i can look at the code quickly maybe
Are you talking to me or the other guy
// Change collision size to crouching dimensions
const float ComponentScale = CharacterOwner->GetCapsuleComponent()->GetShapeScale();
const float OldUnscaledHalfHeight = CharacterOwner->GetCapsuleComponent()->GetUnscaledCapsuleHalfHeight();
const float OldUnscaledRadius = CharacterOwner->GetCapsuleComponent()->GetUnscaledCapsuleRadius();
// Height is not allowed to be smaller than radius.
const float ClampedCrouchedHalfHeight = FMath::Max3(0.f, OldUnscaledRadius, CrouchedHalfHeight);
CharacterOwner->GetCapsuleComponent()->SetCapsuleSize(OldUnscaledRadius, ClampedCrouchedHalfHeight);
float HalfHeightAdjust = (OldUnscaledHalfHeight - ClampedCrouchedHalfHeight);
float ScaledHalfHeightAdjust = HalfHeightAdjust * ComponentScale;
this is how it works
"Height is not allowed to be smaller than radius"
oh
thats a weird restriction
Well thanks for figuring that out though
Much appreciated!
ahh make sense, capsule is just a sphere with height
What stops it from being a "crushed" sphere?
Ah wait I think I can visualize why
I can see why it makes sense now
just a little odd since it doesnt even look like a sphere at its shortest
Ill try messing around with the radius though
Hey, I build a Prototype and come to the Point i want to have a save Game, Player stuff already working but I want to save world Data (items that have picket Up, objects / actors that have been placed) can someone give me a Tip to search for in this context?
You can use FGuid to create a unique number to indentify the items
so your item data can contain that number
For pre-placed item in the world, at begin play
Get Player -> Find Item In Inventory that have the corresponding guid
If found , destroy the item in the world
What is about placed structures for example Houses
many ways, one way I can think of is to store the data of what ever you placed
it can be a struct with a list of the class that you placed along with it's transform
When game Loaded -> LoadPlacedActors
-> Spawn
Sounds Like a legit solution.
I have a room editor in my game, where I can place any objects in the room. Paintings, statues, TV, etc
each time an actor is placed, the info is stored in the save game object
when the time comes to load I just spawn those actor in the empty room and it looked just like when I last left the game.
Wow the Savegame stuff will be more complex then i thought ๐
Not really, think about what you need to save to re-create the scene again
for me it's just the class of the actor and the transform of the mesh
how are you getting rid of the level actors from the level?
as this sounds like a better solution than what i'm doing now (which involves destroying level actors on save load if they got picked up)
ah wait, i could imagine how.... setting them to editor only actors shouldn't cook them?!
from my old game, I just check on begin play for pre-placed actor >_>
If the item is found in the save game then destroy it.
It doesn't sound like a good solution hence why I was wondering how other people do it.
yea that's what i do
but you gave me the idea to make a default save game, and convert each actor to editor only so they wont get baked to the map
the only problem might be cooking then, as they have to be specifically included as nothing is referencing them anymore ๐ค
the cpp wizards probably have better idea ๐
can someone review this for me, its for a door opening event. for some reason one the second pic which is my linetrace its not triggering close door
sorry the first pic was hard to see
obvious mistake on Finished pin
On Finished -> Set Door Open to True Then Set Door Open To False
like what's the point of that? you will always have the door set to false in the end when finished is triggered
There are a lot of things on top of that, I would change
perhaps you should disable interacting with the door when the door is currently opening or closing.
That or you want to open/close depending on the current state of the door (meaning, don't have the boolean on finished, but flip it right away)
^How can flip a bool value
Ya pretty much my goal is to stop players from spamming the door open and closed.
So on finished node how can I go about that exactly?
You can have another bool bIsAnimating
When ever you open or close, set animating is true
On finished set animation to false
As for your bIsDoorOpen you flip it on finished
Like the image I showed you
That's basically just doing, if doorisopen is true, set to false
If doorisopen is false set to true
Oh ok got it thank you
don't forget to add condition for the interaction. If bisanimating is true, don't interact with the door
I have set up an event tick to get the location of the ball, I then want on the release of the mouse for it to get that location, so that if the ball hits the out of bounds trigger it can teleport back to the location it was. How am I able to get the mouse release to connect up to the get location?
print screen please
How can I make a method that instantiates a player for each connected local gamepad at runtime
Currently I have this which spawns in the characters fine, but the player controllers dont seem to be linked to the gamepads even though I pass in the Platform User ID.
It only works if i actually disconnect and reconnect the controller, but I dont want to have to do this everytime
On Mouse released, Set Saved position to the ball current position
When out of bound Set Actor location to Saved position
What is the node to check if 2 strings are equal?
equal? But why are you comparing 2 strings?
it has it's uses, but I would use it as a very last resort when there are no other mean
It teleports the ball but off the map ๐
show what you have
the last picture does nothing
you are setting a variable to self
it's equivalent to
50 is set to 50
that makes way more sens, altough i just did that and it still teleports the ball off the map
first one is the same as before
print string the value
make sure it is saved and that left mouse button released is called
Hi, why does the crash reporter not working? I already enabled it. The game crash and no crash pop up
Yeah its saving the location perfectly fine
get rid of the delay and show print screen of the result of current position
make sure the variable doesn't get set anywhere else too
i put a print string on the location its teleporting to and its teleporting the ball to 0.0.0 even though the saved location that prints is where it was.
please, show the print screen of how you print string the value
Oh I know why; itโs not referencing the current position variable from the ball, itโs referencing a blank variable. But the one thatโs referencing the ball location doesnโt show up to be used in the level graph
dont use level blueprint
abbandon that for good
unless you know what you are doing, it has some little use
Sorry I just meant the event graph for the map
that is level blueprint
So I can everything in the level blueprint elsewhere and they can still work the same way?
Sure can, you just need to know how to pass reference around.
One way is to place an actor blueprint that act as the manager in the level.
For your trigger box, you want to create a custom blueprint.
Problem with your setup right now is, level blueprint communication goes one way in blueprint. So you can't communicate from the ball to the level blueprint.
Oh right, so i can use a different blueprint that can reference the ball and the things in the level?
Make a custom blueprint for the Trigger box call it, out of bound Trigger or w/e make sense
On Overlap -> Get overlapped Actor -> Cast to your ball -> Get Ball (saved location) -> Set Ball location to Ball's saved location
Hmm, i still cant reference the sved location. If i was able to set the overlap to the trigger box in the ball graph then id be able to get it to work easy but it doesn;t let you do that lol
You shouldn't anyway, the trigger box should do it's logic inside it's graph
I must be stupid cause I still canโt understand how using the blueprint for the trigger box helps since I still canโt reference the saved location from the ball
Gave all the answer at the top
You can get reference to the ball via overlapped actor in your trigger box
In plain English, if something is overlapping the volume and that something is my ball, get that ball saved location and set the ball location to the saved location
If you are struggling with references you might want to watch Matthew blueprint communication tutorial
hey im struggling to get my single player working
when trying to launch the game in single player i get this error
when i go to function
it should be pulling a pawn from the controller but im wondering why its not
Your controller simply don't have a controlled pawn at the time you are calling it
ok let me see here i mean it works in multiplayer
i thought if anything it would work in solo and break in multi
Doesn't change what the error says
Iโll have to watch that because Iโm what you wrote half of that Iโm unable to connect to each other etc. Iโll watch the video
I guess this is too difficult to do.
Thank you so much, i watched that video and understood it straight away haha. It now works, i just have to make it set the velocity to 0 when it teleports so it doesn't keep going forward
Better to get the overlapped actor plugged to the object instead of get player pawn.
Also from as golf ball, drag it and set velocity to 0
Not at all, try to formulate the math it's rather simple
if i overide a BlueprintNativeEvent and implement it in BP, is there a way i can still call the cpp verison? i want both to run
call to parent imo
how do i do that? i couldnt find anything even when i uncheck context
right click the event and select add call to parent
it's basically Super::
oh perfect tysm
Hi anyone can help me understand the difference between starting a new C++ project vs adding a C++ to a BP project?
all your logic for input etc that comes with the template will be in c++
if you chose C++ project
Thank you (both), I am asking to start a GAS project, I see someone start with a BP pj and then they create new C++ class, I don't get why they choose that route
There choice.
Maybe they use the BP stuff of GAS, rather then C++, because they don't know C++, but can throw together tutorial videos to setup the basics for GAS
just start with a C++ pj then
GAS need some C++ anyway, there's no way to just go pure bp with it.
Hmm that's what I thought, so If I start with a C++ can I make things easier later exposing what I need as BP? Sorry for the silly question ๐
Yes
Idk if starting with a c++ project, vs adding a class to a BP project and turning it into c++ is any different. Def not in the long run but maybe they try to skip the default classes that get added via c++, especially if you use a template project.
This is sort of both BP, and C++
But, Given what someone just asked about with BlueprintNativeEvent.
I see it in some random videos, or just from modding games that support modding.
Is there either a known or just a personal choice.
But, I see some games have fully blocked C++ code, then an exposed BP function.
But, why not just use the 1 C++ function with BlueprintNativeEvent
(You have like Use_Item, then a BP_Use_Item will get called.
But, why not just a Use_Item, with BlueprintNativeEvent?)
Thanks I'm looking for something "simple" I guess, I'm not going to do any shooters using GAS, I'm looking for a "generic" template to do some multiplayer games, perhaps better start with a BP project?
@next hollow Thanks I'll give a read about the BlueprintNativeEvent
You'll need c++ for gas. Just go with an empty c++ one
Because the native version can be overridden
Only calling an implementableevent at the end guarantees that your c++ code stays untouched
Do you have any idea how I would get my velocity build up to fill up a progress bar. At the moment the node that is โlaunch speedโ doesnโt output a number. The velocity builds up tho as the ball goes further the longer you hold it down, just unsure which node I need to get the value from
If the blueprint designer/scripter/coder doesn't call the parent on that native event in BP, it won't call your c++ code. So in a lot of cases a native event is not a good choice. There might be cases where people could have used it and just didn't due to preference
Or maybe cause they wanted a clear cut, who knows
guys im going nuts lol, the first image is my door logic and the second is my character BP, for some reason my door takes forever to finish the timeline
Hmm so better go for a C++ one, why starting with blank @surreal peak ? If I already know I have to use a TP Character, still better starting with a blank project?
Normalize your velocity, that will be your speed
Progress bar takes value of 0 to 1. 0 being 0% 1 being 100%.
The value will be your current speed / Max Speed
Whats its length/ time?
Thats the only thing that defines the length
i have a float track thats 0,0 to 1,1
(it has a seperate length value, its length is not defined by the data you put in it)
Preference. The template code is pretty bare bones and usually not what I would code myself so I end up deleting it anyway
Ok thank you!
thank you too @next hollow !
What should the tolerance be? Itโs set to 0.0001 by default, but it will always come back as 1.0 even if I barely touch the ball. Which is impossible because itโs limited to 0.4
also this isnt a blueprint question but was wondering if anyone here had any experience on this. im using unreal dynamic sky in my game and i have a material i made to highlight my items when i interact with them. i added the material to the postprocess volume array material. The material is suppose to highlight the border of the item in white but the whole object just turns black. was wondering if anyone had this issue?
what tolerance?
your speed should be how many unit it move per second
actually scrap that, not normalize
Get the Length of the velocity, that is your speed
Anyone got any idea how I should go about setting up a rope/cable that ties two character BPs together with physics?
I have got it to show a value, but the weird thing is it will show the max clamp power of 0.6 regardless of how long you hold it down and power up for. So if you click it the ball barely goes anywhere but it still shows 0.6, hold it down for a while it will fire the ball off but still show 0.6
Hi, how during game in editor come out from controller to see what happening to your character? Forgot how to do that
Eject? F8 is the default key I believe.
Hey how many different nodes are there in Blueprint?
At least 3.
In total, like all of them
Go through the source code and start counting.
There's gotta be hundreds if not thousands.
where do I find the source code?
Hello I have a question about culling.
I have a ship in my game that the player can sail around. However, the player can also walk on and below the deck. My question is whether I can make the assets below deck visible and invisible through culling, depending on whether the player is above deck or below deck. The ship is a blueprint actor, so I need a culling method that works within blueprints.
Every help is appreciated! ๐
it's all math, just translate what you are doing in plain English first and formulate it before you implement it in blueprint
The point I'm trying to make is that it's kind of pointless to worry about the number of nodes that exist. It doesn't tell you anything useful, nor do you learn anything from it that helps you with programming or learning Unreal any better.
I can guarantee you that even if you do download the source code and try to start counting, you'll give up within the first couple of minutes as you realize how absolutely daunting of a task it is. You could theoretically create a program that could parse it, but then you're sort of wasting your time to gain no useful knowledge, and there's no point in keeping a checklist trying to "learn them all" as you may as well learn them as you come across the problems that they are there to help resolve, otherwise you're wasting time learning stuff you'll probably forget as they may not be used all that often and you have no context as to how they may be useful.
Instructions for downloading the source code can be found here:
https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-unreal-engine-source-code
how many 'usable' nodes exist, meaning nodes that are used most often
Again, hundreds if not thousands.
"used most often" depends on the person using them.
"usable" is all of them.
Why does one even need to know? How will that serve you? You just get the node that you need, that's it.
Ok here we go... "BlueprintPure" usually something attached to a UFUNCTION() declaration to indicate a node that doesn't have an execution path and is executed every pull.... There are about 4600 of them.
BlueprintCallable, same but this time there's an execution path... About 15000 of them.
So yeah... Upwards of 19K standard "blueprint" coding nodes, not including events, delegates, etc.
what do these 2 nodes do?
yeah i was looking for a more in depth personalized explanation ;-;
If you really want to know what nodes do, then you should download the engine source and get an IDE installed. You can then double click on nodes and it'll open them up in your IDE and give you the details of the functions.
Perfect, I will do just that
thank you
Hey guys, I have a problem that drives me crazy. I've done Gorka's tutorial on Top Down movement and attacks and I wanted to make both movement and attack to be looping actions, meaning if you held the buttons, you'd repeat actions on the fly. I've managed to successfully make it for the movement part, but when I tried to do the same for the attacking, it started doing weird things. Camera is jittering, player character turns into the opposite direction of break hit result. Maybe I am dumb but I legit can't find a fix for this.
I've tried to edit both spring arm and camera to ignore rotation but it seems like attack function forces spring arm to rotate anyways and it then snaps back to its base rotation
Is there any reason this shouldn't work? Bc it doesn't
looks cursed as f
calling a function within it self
Interp is something you do over time, just place this function on tick
and why am I getting a white line here๐ค
Graphical glitch? I"ve never seen that before myself.
doesn't work with tick, i dont think it's an execution error
yea it's gone now
not sure what you mean by that. Interp should be used in tick
it's something that happend over time
And that should happen every frame if you want it smooth
if you get this idea from youtube, make sure to ban the channel
dude doesn't know what he is doing
alright well the object still doesn't rotate
Otherwise, the logic there looks sound. When the player overlaps with the box, you want this actor to find the look at rotation to that player, and then rotate towards that rotation over time.
yea
Is the breakpoint hitting?
do you get any error message?
nope
no accesses none?
wdym
you never seen an error msg I guess
guess I haven't
is the static mesh the camera?
yes
OH
You're using the Actors Rotation in the function there.... You want to use the Camera's rotation.
works-ish
I like it already.
Hi, does anybody know why find session fails? I tried open ip:port and it worked, but find session doesn't
I would suggest #multiplayer or #online-subsystems
thanks, going there
that aside, I would just use steam
I think the issue is that the center of rotation is at A, and it needs to be at B, and A needs to be fixed
Ok, so now you probably want to augment the location. Right now its using the arbitrary point of the static mesh. You probably want it to use the the point of the actual camera lens.
yea exactly
๐
gotta go back in blender and reset the pivot point then
a socket might do the trick
socket?
Yea, you could even put a child scene component on the camera and use that, just move it into place.
Yeah but still, camera glitches all around despite having its rotation ability removed for both spring arm and camera. It's like the event forces the camera to be behind the character for a split second
Hi guys
So, it seems to me, that if you use hard references to an object, it loads the whole thing into memory, including all dependencies, parents, etc
Does that also include all the textures, practically negating texture streaming?
Is there a reason then why most nodes do hard references out of the box, rather than soft references?
I;m only addressing the part where you turn the wrong way
whoa
Yes.
You need a hard reference to properly utilize it otherwise it's just a path to the asset and rather than having every function attempt to async load whatever object it may be getting fed in, you're the one that needs to manage when that asset gets loaded so you can properly pass it to the functions that need to utilize it.
The way around this is to have everything you want to use as soft asset references (as variables) and have a base class of that object that is the one you pass around that has none of these variables defined, preventing anything else that references this object from loading anything but the class itself. Then you have the actual actor you will spawn that defines all those variables, but can still properly be accessed and referenced by everything else through its base class.
physics constraint isn't working :/
Hm
I kinda wish more tutorials mentioned or used soft references then, to be honest, only really been hearing about this the last couple days
Is memory just not an issue unless you're doing something especially big?
Loading stuff is very specific to projects
that's outside the scope of tutorials
Well, for example, most tutorials won't go over it as it's secondary to what you're attempting to do within the tutorial and they're not there to try and teach you about using memory management, they're trying to show you how to make a feature and it's just easier to show you using the standard hard refs. Memory is definitely an issue, and yea, it usually becomes much more important the larger your project is,
That's fair enough, just surprized I've never heard this mentioned at all before
you are not the only one, my old game is ruined with hard refs everywhere and a data table with hard ref
I was in the same boat, took me a while before I understood why one would use soft refs.
After 12 minutes of doing stuff, I can no longer right click in my blueprint to pull nodes due to out of memory.
Oh it's really funny how common it is then lol
consider your self lucky that you discover it this early ๐
Oh, only 4 years in, early enough
how does that work?
Add a scene component to the actor, child it to the camera, move it to the position you want (like the front of the camera)
is there any way to further change the settings of the editor billboard for actor blueprints? I want to change its texture and make it always draw on top
Good hierarchy is the best practice. Having base classes that don't have heavy assets but contains the core functions. Then when you reference you use the base class.
Soft references will still force load the asset type your using as the soft reference, just not any children of the specified class type.
Hi, my packaged game won't go into MainScene(level), it just crashed every time. I have already include the level in the settings
There's nothing in there to indicate a crash. It looks like it's just closing out. Do you have any logic in the level to exit the game? It makes me wonder if it's being called prematurely.
only this button
Depending on the type of game you're making you don't always need to use soft references. Using and managing soft references isn't always a straight forward thing. For one client, the only thing we've used soft references for is audio files. (music) Other than that it just loads it all as there's only really one level and would all need to be loaded anyway.
Probably nothing to do with it but I would add a print string just to make sure it's not being called.
alright, I'll try that
Using UE 4.26, is there a good way to force the Construction Script of an Actor to update while in the editor using Blueprints?
-
I've got an Enum for a time of day system where I can toggle between Night and Day via another Actor in the level
-
This preview setting sets the lighting conditions to what they would be when the time of day automatically changes while in-game so I can edit the level and see each lighting setting appropriately
-
I have code in the construction script of light BP Actors around the level that also turns on or off a PointLight, Niagara VFX, etc automatically in-game when the time of day changes, however in the editor I also need this to happen.
-
The problem here is that the light Actors don't update and run their construction script to do this until I select each individual light Actor, so I'd like to know if there's some sort of Blueprint Node I can run that will update the Construction Script while in the editor, thanks!
Edit: I just thought of a better way to do this that works great ๐
- I've now created a function within my time of day Actor that I can call in editor as as button, which loops through each light Actor in the level and runs the appropriate function to turn them on or off in the editor ๐ Can't believe I didn't think of this before
I thought the Impact Normal of Out Hit on a Line Trace For Objects would be the normal of the surface that was hit. But it's just the inverse of the direction vector of the trace... Is that right??
then what?
Answer: the hit point was the start of the trace itself, causing this issue
Then you should be able to use the scene component location as the location in the look at function. The rotation you would still want to use the camera's rotation.
something is still off
its not being called ๐ฆ
Hey, Last night I ask for strategies of save and load assets in the world ( items, trees, Stones, buildings etc.) @frosty heron offer a way with fguid to Check objects to Spawn / remove on loading. Maybe someone hast another solution / strategy?
If the actors are being spawned dynamically, GUID's are pretty much the way to go. If you also have pre placed actors, you'd have to have a system that would check if it should be destroyed when the level is loaded.
The camera mesh appears slightly rotated downward here despite the rotation values appearing to be 0. For this to work right, you'd probably need your camera mesh to be perfectly straight with the axes.
In your 3D modelling software, ensure your that the camera is positioned in such a way that 0,0,0 would be your desired pivot point.
The last thing I'm not sure about, it looks like the camera may not be facing the X axis to begin with? Usually that's what is considered "forward" and could be throwing off the calculations.
Is this Discord channel ok with people asking for help? I'm new to Blueprint and need some help
That fixed it! thanks
Yup
now i gotta clamp the rotation๐ค
I will have both ways, the Player can place actors, destroy / harvest actors. Also I want to pre populate the world with actors (trees / Stones that can be harvested) also place items for Players that want to Explorer the world. There will be more Levels (a Player owned Level, and multiple Maps and Dungeons (thats the Vision, actualy I build a Prototype with all concepts and mechanics in small scale)
Awesome. I'm trying to change the ColorLookUpTable (In PostProcessingVolume under Color Gradin, Misc) in my scene in real time using the number keys. So 1 for LUT1, 2 for LUT2, etc. (6 in total). I've come a far way with ChatGPT, which helped me before, but now it's not working and I don't really understand why...
Let me send some screenshots..
I can also hop on a call
If anyone has time
These are the input keys going to the Switch LUT function (which is a function I made that doesn't seem to work)
This is an Array, I have no idea what it is but ChatGPT told me to make it. It includes the various LUTs I need
This is the Switch LUT function
I suspect the problem is that that Post Process component has nothing to do with the PostProcessVolume in my scene, but I don't really know where to go from there
I'm completely new to this stuff
Hmm I wouldn't use chatGPT to help you with code
hehe..
For starts that MakeArray needs to be copied into the function you're getting an array element and used instead of that array that is probably empty.
even tho I have, and it can be helpful. It also tends to make some stuff up sometimes
Yes I've noticed, even with my non existing knowledge of programming
I'm sorry, but I don't really understand this ๐ Should I copy MakeArray to the Switch LUT function?
It doesn't make stuff up. It copies things other people have said. And people say stupid shit.
Yeah
Delete the set node. And plug the MakeArray directly into the Get.
ok
So how does it know that the Post Process component, or whatever it is (variable? I don't know), is connected to the PostProcessVolume in my scene?
@maiden wadi Oh my god it works ๐๐
It actually freaking works ๐ญ๐ญ๐ฅน
Thank you
How??
This did the trick
I don't understand how you knew but thank you so much, I have an important deadline Tuesday and this is a nice break for me, I'm so happy
Why did that work?
More importantly, why did ChatGPT tell me to do it the wrong way
And why was that way wrong
because chatgpt is a shitty programmer
I notice
But to be honest I'm amazed he can even sort of do it
He helped me with a much simpler problem, and after some probing he actually told me the correct way of doing it
or it I should say
And even here, it was just wrong about 2 things
Which is mind boggling to me, I don't udnerstand how an LLM can program, since they have a lot of difficulties with math and logic
But that's offtopic so I'll stop
I mean it just regurgitates whatever unreal info it has in its outdated training data
Maybe, I'm new to BluePrint so that probably explains why I'm so impressed
and new to programming at all
Sorry to ping you again but that completely worked and really helped me a ton, I can't thank you enough. I'll stop, have a very fine day!
Everytime i open my project i have to refresh these 2 nodes. How can i fix this problem before it affects my sanity?
Happy to help. ๐
What is the error message? Initially that sounds like you have some C++ code that defines a struct or something that isn't loaded in the right order.
the project has no c++.
I tried everything
remaking the nodes
refreshing refreshing
Can you go to your struct and do a View References?
On the struct asset itself in the content browser I mean.
I'm assuming you have a circular dependency.
reference viewer
Hi, so I set additional launch parameters then I run standalone game and this popup. But when the game crash it close the popup, and I did not managed to read the error, where can I access the log?
Yeah I think so. Editor not open atm.
Is there anything both on the left and right side that is the same class?
ah
there's a ton of classes okay ill check it
Usually this happens when the struct is needed by a thing, but the struct also references that thing somehow. So you end up in a case where something loads the struct first, and the other thing cannot and thus the struct is invalid at first load causing the BP to error out until opened and compiled now that all three are loaded.
there are no repeated classes left and right
but there are like 20 classes on the left
so could it be that they have something inside them?
because this follows a hierarchy
What all is inside of that struct?
so could be something up in the hierarchy
It's properties
though the problem is fixed by refreshing the nodes
the problem is refreshing the damn nodes everytime i open the project
can be annoying
i also noticed this one:
Yeah. Cause it's valid once everything is loaded.
But what is inside of the struct itself?
never seen this
there's like 10 variables of different types
and 4 other structs of different types inside it
i can try to find out by elimination
I would start with anything that is a reference or a class.
Pointers and class properties are likely the issue if I'm right and it's a circular dependency issue.
Hey how do I get lights like that?
rectangular light for the light output + a mesh with emissive on it for the white glowing rectangle + good GI
Hellllooo!!!
Waht im trying here is to say "Hey if you get 2 times a hit and your shild life is on 2 you need to have after the hits a value of 0 in the shild life float"
but waht happend is that it gos to 0 after 3 hits but why?
shild life is on 2
enemy damage is on 1
It needs to be:
2-2 = 0
so you can see that he is still in his block mode even if he haves no shilds anymore...
(Red pic is get DMG)
cant find the circular reference
i think ill refresh it everytime i open the project
thanks
!= 0 is typically not great for floats. You're better off checking if > 0 or "Nearly equal to"
!= 0 also means that it could be negative and return true.
You probably also want to check immediately after damage is done to the shields whether it has any shield remaining and if not stop blocking.
let me try
im checking it with the node "No Shilds?"
shield*
same problem with ">"
OK i try another check
ohhhh engage HALLLOOO ๐
thanks ^^
it doesn't print string 0 ?
no only after 3 hits
so when it gets < 0 it should print the string
so i dont know how to build with that a good check node because i need to check after it prints the 0
yes but why ...
That's because you're not checking immediately after damage is done if there are still shields or not. The third hit is what is finally triggering the event to check if you have any shields.
and it looks like it's taking health properly so it is running
What is this error?
ahh ok so check after every hit the shields right ?
Yea
ok let me try
Assertions are validations that make sure something is true otherwise it forces a crash. Looks like you may be trying to execute something outside of the game thread that isn't meant to be run outside of it.... It's mentioning some UI stuff there, perhaps you put something on the PreConstruct event in a widget which can run at editor time?
owh I see, I will take a look at the bp
thank you
Hi all. I finally got around to studying Niagara... Previously, I created the asteroid belt through creating instances. When assigning rotation to each instance, the FPS dropped to almost zero (4000 instances). Now Iโve created approximately the same thing using Niagara. Also 4000 particles (I think, I'm not sure, maybe 8000). FPS is a little better. In the video, the inner ring, this version with instances (rotation disabled), is called โAsteroidsโ, and the outer ring is โBP_Asteroids1โ - this is niagara. Please tell me, is it possible to somehow optimize the scene? I'm going to combine - most of the asteroids will be made instances without rotation, and a few created by Niagara with rotation.
is there a way to easily switch between CMC and physics based movement on my third person character BP?
without needing to create a whole new BP class deriving from Pawn instead
Anyone know how to fix their game instance not working in their packaged game? I looked it up and a forum post said that it could be that it could be an old game instance class being called in the defaultengine.ini but the name and file path are correct. My project settings are hooked up to the right game instance and it works fine in the editor. I've been trying to fix it for the past 6 hours and I'm completely stumped.
Just some screenshots of it to show I'm not going crazy
so i know widgets cant use timeline so i was trying to figure out a way of doing a ghost trail for my HP bars. I figured this was low cost for tick... but my tick function isnt even triggering
its clearly on screen and all the other events including receiving delegate broadcasts are working from GAS so idk why this tick isnt firing
tick frequency is set to auto. and its clearly in bounds