#blueprint
402296 messages ยท Page 756 of 403
have picking up the Teru (whatever those are) trigger an event on the actor that owns the niagara particle system
So would I continue to do this in the particle blueprint
is this just an actor with a Niagara component?
Yes
Teru Teru Bozu is a weather controlling doll from japanese culture
ooh, cool
The game is where you have to collect them to make the rain go away
I want the weather to decrease depending on how many terus have been collected
i learned that in minecraft btw. ๐
Could I use this event and make it trigger and decrease the values of the niagara ps?
Alright I am struggling
Is anyone able to give me a hand?
๐๏ธ
you should describe where you struggle, because actually i have the impression that you don't even know how/where to start
https://youtu.be/EM_HYqQdToE how about a feature length blueprint communication stream?
That is it yes
Hi all. I have a persistent level with sub levels in which I want to save and load NPS.
The question is how to store information about the NPS. I want to do it in Instance, but I can't figure out which variable to use. There is a Base NPC Class, but for some reason it seems wrong to use it.
Can i use playfab SDK for a 100 player multiplayer battle royale game?
didn't you just start learning the engine?
No, i started using the engine since januari
Got previous engine/multiplayer experience?
I learned multiplayer by tutorials
do you have a team of competent programmers?
Adjust your scope to some fraction of the original
Nope
and enough money to shell out for server space?
then I would suggest starting with something smaller
Nope
see if you can get a 2 player thing up and running if you're determined to do multiplayer
some coop experience
100 player anything is well into pipedream territory, even for some established studios
should be a minor task compared to 100 player battle royale thing
And you'd have to compete with... fortnite and pubg. That's not exactly an easy thing to do
Oohh okay thanks for the info!
the task is on the grandiosest of scales
Okay, then i will start my game with singleplayer and maybe later when i reached the point i will make it multiplayer
always start small. you'll have more motivation to keep doing things if you know you can finish them. and if you like what you're doing, you can always expand it
Yes, exactly
@worthy carbon It's brutal to hear. But that kind of game has a massive amount of requirement. It's not really solo dev capable. Not realistically. Even if you manage to somehow pull off being a genius level art and programmer to put the game itself together, you will not have time to do that as well as manage servers, deal with players, handle accounting, deal with QA. You can forget taking five minutes to get coffee in the morning.
Having said that, there are potentials to getting a backing publisher or investors. But there is a 110% chance that these people will not touch your idea without any prior development or release experience on a scale that a 100 player battle royale requires. Learning on a smaller scale is in your interest both because it's easier with less critical problems, and because it brings factual proof that you can handle it which is a good currency in develpment.
pretty much
I generally keep a rule of thumb that multiplayer squares development time (of a title that would otherwise be SP)
does unreal trigger a released event for all input events when the window loses focus?
cause if you lose focus before the event released then it is basically pending until you press it again
Battle royale game genre is an easy trap for naive newcomers to fell through. Look at the tragic stories like The Culling, a failed battle royale game where the devs kept failing to revive it TWICE (thrice if you count Origins). Barely anyone playing The Culling games nowadays, so much so that they resorted to bullshit arcade-y business model - and the future doesn't look bright to them.
SOS is one which was kinda cool. It had a much different basic premise
But I guess it didn't become popular enough and they turned into a generic boring BR and then it just died completely :P
At least with the editor, I thought not.
I don't even think I've heard of that game. O.o
Yeah, it was popular with some streamers for a while when it launched. It was a thing where more than one person could win, and it encouraged players to team up
So it was quite funny when some people would go around and play funny roles to attract people to their group and such
I find it hard to believe this game was released only five years ago. They should consider hiring a level designer. Some of their graphics don't look bad. Can't speak for gameplay, but their levels look terrible. Bad texturing, barren. Assets don't match well, some high poly, well textured things and then some ground that looks like it came from PS1.
does anyone know if it is possible to create a UMG Volume slider that updates the value as soon as you move the slider. I got the impression that it's not possible using blueprints but i might be wrong.
e.g i open options menu then move the slider, close options menu, re-open, and the slider is where i left it
@mild jacinthValue Changed binding runs billions of times per second while moving a slider.
I say, do something a bit scaled down. 5-10 players, it can still be FFA, but the design might have to change a bit.
You can fit tons and tons of cool stuff in a game that size to fit into a niche and have a solid shot. At least, more solid than attempting to compete with COD/BF/PUBG/FN (or far more likely, attempting to compete with their copycats)
At least with 5-10 player count MP, you could get away with letting players hosting their own servers or LAN party.
I know it does. I need to know how to set it so that it actually saved the value the next time I open the options menu. For now what it does, is, it allows the slider to move, music lowers/raises, but the value doesn't get saved because it's loading the default value of it.
Sounds like you're recreating the widget
You just set the slider value on Construct.
GetOptionsVolumeSettingThingAsFloatOrWhatever -> GetSlider->SetSliderValue. Then when you slide it, you SaveOptionsValueAsFloatSomewhereTheGetterCanRetreiveItFrom.
is it possible to encode a png as base64 ans the decode the same using bp?
But why?
I mean, if you want to imitate Doki Doki Literature Club's meta effect, you could encode any file into a base64 string, just that you have to use C++ for file I/O operations and the encoder/decoder function in runtime, because BP won't get you that far.
No it does not work. I guess I have to use C++ for this. The value does not get saved no matter what I do.
It reads the default value
Your variables might be sus.
Your saving it in the widget, which you're recreating, are you not?
Yes, but I tried using save game object aswell, and using maingamemode, both had the same result
You're saying that, yet i've done it succesfully in that manner (save object)
I am saying that yes. I'm not the only one working on the project, however that is another story. I don't see anything that would interfere with it, but that's just me
Showing the code you used is a better way for others to understand whats going on ๐
Old and not very organized code, but it works
I cringe a bit sharing this piece of messy code but it'll have to do ๐
i dont destroy the widget, so i just store it internally (and save it to file when the user "applies")
then on some beginplay i load the settings and update the options widget accordingly. Using a float array since i've separated the sound settings
this gotta take a lot of times
idk if it does automatically, but there's a plugin that allows UE4 to detect if the game window isn't focused, and then you could just make an event for it
i can send the link if you want
IMO starting with 2 players and then creating something scalable seems much more viable, if it has to be multiplayer at all
small count FFA from the start is much more realistic than tacking on MP after the SP experience is laid out
right but it's even easier to just do a 2P multiplayer experience than to make a 5-10 player FFA experience even so
and it's even easier to just to SP than that
hey quick question: has anyone here subclasses from the default UE4 Play Niagara Particle Effect notify class? I'm tryin to have a similar notify where I can preview the effect in an animation montage, but I want to be able to chose between 2 VFX based on a boolean from the pawn who is playing that montage.
(also not sure if this should go to #visual-fx ?)
sounds like #animation if it's inside an anim montage
How could I get a reference to an actor in a DLC .Pak that loads in after the game loads.
Like if i wanted one of my base game actors to reference it or call an interface function to it
if you use interface calls you don't have to care about what the other actor's class is
which is probably wise in this case
hey guys I'm working on a small reward system with unlockable items and I was asking myself, what if I want to patch my game and add content later on? I would like to 'expand' each category but at the same time I don't want player to lose the items they unlocked, is there a smart way to do this? I'm just using a struct and arrays
the TPS pawn is already configured for this out of the box. if you're talking about the smoothened movement on the side of the character, that is #animation
Probably by storing unique IDs for each unlock the player receives.
but each time the player need to download from server and set the data right?
Hello, I am trying to make a quick prototype, but am running into a weird issue, where my URPROPERTY doesn't allow me to select an asset.
sir this is a #blueprint channel
I've been instructed, in pretty clear terms, that things that cross the boundry between cpp and blueprint belong here.
If it's going to be online, then I'd imagine so, yes.
This is a direct question about the way that blueprint exposed properties and types show up in the property panel.
given that we don't know about #cpp we can only help insofar the issue is wholly #blueprint
yeah but UPROPERTY specifiers are strictly #cpp
Well I guess I will try in the other channel... but doubtless I get chased away for asking a blueprint question.
Well I shouldn't be grumpy, I just got chased around before here, where nobody wanted my questions ๐คก
But I will remember from now on to keep cpp-related questions in cpp only.
In this case I want a bit more powah
But its just a prototype anyways
Oh, I removed the instanced anyways
Whats interesting is the public editanywhere UPROPERTY attributes on the UWeapon object don't show up in the properties panel.
Instanced is one of those specifiers that is quite unlikely to have anybody in here familiar with what it does, #cpp is much more suitable for discussion of that.
Stuff directly related to the c++ class's BP API might have good discussion on either channel, but writing C++ for BP consumption is a #cpp topic for sure. And anyone who says otherwise is wrong
AllowPrivateAccess specified on the top level property housing the UWeapon ?
Didn't help. I also tried adding BlueprintReadWrite to the UPROPERTY in the UWeapon object.
But maybe something else is going wrong, I will investigate further.
@odd ember How would i give my DLC/Mod plugin access to the interface. I migrated the interface over to the separate DLC/Modding project, and added the functions to it, but they don't seem to be receiving the events from the main game
if they're actors, and you communicate with them normally through BP with correct references, there shouldn't be an issue? I assume the interface is in the base game
Hello guys I need help. Is there a way that I can run my blueprint in the viewport mode? Because I made a blueprint with a light effect but it only shows when I hit play. But then im in my character and not in my camera and I only want some camera shots with that blueprint light
Need something unique like names or GUID or whatever.
7 years of this stuff and TIL
I made my own unpossess pawn only to find out this?!
I swear u are a hero
Am i wrong assuming my code is wrong when spline points overshoot?
Yeah, just wanted to make sure this wasn't some "normal behaviour used in calculation of tangents" or something crazy
usually maths are pretty good at lining things up correctly
Did you ever resolve those warnings?
though I don't know if this could be a float point inaccuracy
Probably not, im surely just not calculating it correctly
Incoming vectors are from a nav query.
if you want less wires btw, then you can use parameters as variables if you type in Get <ParameterName>
question, if an actor component implements an interface can the event be executed by checking if the actor to which the ac is attached to implements the interface? i suppose i could check myself but decided to ask in case someone might just suggest a better alternative ๐
interface implementations are static, so no
but you could hook up event dispatchers, which are dynamic
and all the rage
hmm would it be more cost effective to retrieve variables from an actor component attached to the game mode actor rather than using the 'Get All Actors of Class' node? reason being im not allowed to really alter the game mode directly in the project among some other things
I use a component instead of an interface for Interaction. So it's not
"Call BeginInteract on Actor"
But it's
"Get component of class C_Interaction
CallBeginInteract on it"
Basically using a component as an interface with state
BeginInteract is an event on the component. Actor hooks to it typically like OnBeginInteract
are you saying my GetAllActorsOfClass nested foreach loop on tick is a bad idea???
I use a scene component so interaction can be said to happen at a specific point in 3d space
LMAO
Just to be sure, that loop should call a function on each of the actors that also gets all actors of class.
I'm calculating TREE(3) on tick in BP, is it gonna be bad for perf?
sounds like perfect harmony
anyone seen tutorials on this?
No but it looks super simple, what's the question?
Gotta git gud
Well it should be. Blame Linus.
Either tune your car spawning such that they can never align, or give the player the tools to work around it. I'd do the latter, by zooming out a bit and letting them move up and down some as well
make a git PR for the gud command
That should just go without saying. Spawn a car every x-x seconds on a random lane with a random speed and let them move for about 5 seconds before entering view and you'll get a nice organic spread of lanes and alignments without big clumps
Hey I realized how to get the info I wanted but its a bit more taxing than I originally wanted to believe.
So the "Search" for actors by class will give an array of "references" whcih then running a loop to check each "Reference" for its "UID" or "SUID" value > if it matches the searches desires > add to Applicable list > interact in widget.. etc etc..
Thanks for the help the other day.. mad I didnt think about how this gives us paddresses to reference further down the code... will def need to make some fail safes in this arch in the future.
Wanted to say thanks for your time.
If it's in an area, use an overlap sphere
Get overlapped actors, call interface on them
exactly
im using a cube
but really should be a sphere
havent decided if they should be able to use the QOL feature between floors..
That's actually how I do all interaction actually.
Get overlapped actors
Filter by dot product vs forward
Select by distance
trace to them
nice
if it goes between floors
good call
Check z
I was thinking that would probably be a thing I would need to change depending on how aggresive the use of walls/defenses would be.
that and a limit break
heaven forbid someone has it maxed out and just decided to dump 2000 objs into the area..
but then again there is always someone out there that wants to go beyond the design and see how they can break things
are you doing this for some designers?
Ha.. no.. but I do use a lot of my core projects to make stuff for interns and students to learn from I also have a bad habit of thinking about too many pointless "whatifs" and "canitbesimpliers" trying to get myself to be better about just making something and later guaging if its even worth tweaking for perf/opts.
a wise man once said premature optimization is the root of all evil
wise beyond years
Amazon Game Studios once said premature optimization is the root of all evil
we are the interruption, in fact
Itโs possible to attach the beginplay event to an actor, as I did with the actoronbeingoverlap?
im a bit new so don't laught at me if its something stupid xd
each actor has its own beginplay
i mean when i select the actor and add event it doesn't show the beginplay
I don't think it's setup internally to do that. generally actors don't have level specific behavior in their begin play functionality
if a level has level specific behavior for an actor, you can use their reference in the level blueprint's beginplay
Well, the problem I have is in a plugin where it generates slides for some kind of 3d presentation. But in the documentation, it doesnโt specify were I have to attach some custom events for each slide.
I mean when the slide is selected do an action or something like that
That menu is to add events in the LEVEL Blueprint. You want to work in the ACTOR blueprint for that object
yes, but when i edit the actor blueprint is linked to all the actors of the slides and I can't add individual events
huh thaanks for the advice
I'll link a keyboard input and see if it works, ty everyone
whats up with that?
what's the catch?
generally the reason I use the level blueprint is because of visibility
absolutely
I wouldn't argue it for something with world composition
what is wp
the way you mention it is ominous enough that I should perhaps know about it
I see
so the logic extreme of world composition
yeah okay
with systemic designs level blueprint might not be as necessary, but I like it for scripting individual per level things to happen. I also just like the fact that all the visibility on level specific code is in one place and you don't have to search around through various manager with various hard refs to find what you are looking for
I've never used a level BP since 2014, they're a nub trap I think.
it's a real shame if we all become forced to do ubisoft one dimensional overworlds with copy pasted content ๐ฉ
You can still get custom one off stuff going on
Just link things up with data instead of in the level bp
Ya true.
Although you can presumably have editor stuff that visualizes connections etc
even if you have that, the inside of the manager is still a black box
so if you have to go between e.g. different actors, you jump through the hoops of each individual actor
nothing is centralized
it's much harder to find level specific bugs in a manager than it is in a level blueprint
Isn't a level BP just a manager with Automagic references to level actors?
and for what it's worth I'll continue using them until they are deprecated
you're missing the point: it's a sketchpad for level specific behaviors. you see everything inside one blueprint. delegates bind per automata
That's probably why I've never messed with them, all my work has been on systems etc. Not much building out of actual levels.
I have layered systems, but that doesn't mean I don't have things happen that is endemic to a level
The player pawn (or whatever is doing the collecting) has to communicate with whatever is managing the particle effect, or vice versa if using an event dispatcher. If you have many Niagara systems that you need to update simultaneously, consider a Niagara Collection Parameter โ a sort-of global parameter.
On the Niagara end, you need to drive the spawn rate with a user-space parameter. The easiest-to-think-about approach is to make a float parameter (e.g. SpawnRate) in the system section, feed that in your Niagara emitter's spawn rate module, and on the BP end, do the conversion from no. of items collected to spawn rate and set the parameter User.SpawnRate on the system. (The workflow for Collection Parameters is only slightly different.)
Good time. Need consultation about procedural mesh. If anybody have experience write me back please. Thank you for attention.
if you think about games like hitman, there's plenty of systemic behaviors going on, especially with the AI. but despite this, designers have agency to create their own thematic touches per level. so both types of design paradigm have to work together. if wp really is this massive change in creating levels, then that spells a soft end for the creation of those types of games with the engine
at least without more bespoke systems to take over for them
So why can't you just make a regular actor blueprint and use tags to designate level actors? I mean it's a little bit more work but it's really not that much more
If you have two actors in the world, can you set a reference on one to the other? I pretty much don't do anything remotely fancy at design time so I've never mess with any of this
you can but why do that when a more ideal choice already exists?
why pick the worse out of two options?
a bespoke system akin to levelbp
actors are instanced
If you can do that then what's the difference? That's basically exactly the same as a level BP. You just can't right click and start typing get door3 but otherwise it's pretty much the same.
Hello smart folks. Does anyone know if there is a way to call UGameplayTagsManager::Get().RequestGameplayTag(FName(Tag)) in a blueprint-only project? It doesn't appear to be exposed as far as I can see. Is there a method of creating a very short code function like that in BP nodes?
they are indeed
again you're missing the point. if you have more than 1 person working on a level, and they each need write level specific logic and be aware of each others actions, a level manager is way inferior compared to a level blueprint
there's quite a bit of gameplay tag and gameplay tag container functionality exposed, just not that one in particular
RequestGameplayTag is not BP exposed unfortunately
the centralized visibility is a key part of levelbps
it's trivial to create a wrapper for it in C++ though
yeah, the code is easy to add, I'm just running completely native currently, a BP-only project. It looks like i've hit my first roadblock that may require a build
Yeah if you know C++ no reason to avoid it imo
it isn't bad, no. Just a time investment - and one that it's time to eat.
unless you're just wildly extending the source engine in the name of optimization
not mentioning any names ๐
the time investment is 30 minutes maybe lol
if I was solo ๐ i have a small team, so this'll require distributing the build. a bit of an inconvenience for the others
you could make a separate plugin for it if it's such a big problem
oh that's a nifty idea
worst case you'd have two separate levels if you're talking about getting around not having OFPA
besides that, there are technical issues with manager actors, such as them not having full knowledge of other actors without hard refs (or hacky GetAll solutions). load order isn't deterministic.
I'd happily switch to a manager object if there was some semblance of being able to sketch out logic in the same way as in the level bp. essentially a decoupled level bp
thanks a ton for that suggestion, that sounds like the right path for this situation
although i'm at least going to look into the plugin option and see how difficult it would be. just because that then solves it for anyone
can toss it online for free if anyone else needs it, if i can figure it out
very true
what do you mean by 'any of this architecture'? it really is just for this one bp library function, but that still requires one of these solutions right?
or is there an in-editor way to code small scripts like this that i don't know about
oh ok, got you
hello,
when the character sprints I want the camera turn speed to decrease, the reason is that if a character sprints and just turns the camera in a circle quickly the pawn will be sprinting on one position and just rotate. is there a way to limit the camera/mouse input speed?
UATHelper: Packaging (Android (ASTC)): > Task :app:compileDebugJavaWithJavac FAILED
UATHelper: Packaging (Android (ASTC)): Gradle may disable incremental compilation as the following annotation processors are not incremental: lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0).
UATHelper: Packaging (Android (ASTC)): Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
why issue
ok!
@trim matrix thanks
thats not work
i tried that method
@trim matrix you are beautiful, works like a charm
no problem!
you can actually make that a little nicer
if you use a Select node
yeah, ill do
if I have a macro that does this, would the input values always remain the same?
Alright. I have a question. I'm trying to put together a construction system where a "ghost" object spawns in front of the player, can be moved, and finally, placed. Currently, I am doing a line trace from the camera, ignoring my BP_BuildGhost Actor. I then use SetActorTransform to move the ghost object to the desired location. (I do both of these things every tick.) However, it is moving the ghost actor to the trace location regardless of collision, which means that, commonly, my build ghost is inside of other objects as I try to position it. How can I get it to stop moving before it intersects with another object? My static mesh inside of my BP_BuildGhost actor is set to BlockAllDynamic, as are the objects I want it to collide with. My SetActorTransform node has sweep enabled as well.
oops
this is a big no no. do not do this. it will not work and it will crash your editor
The editor doesn't seem to be crashing
it can
and will
in either case, it won't work
don't use a setup like that
there's a reason latent functionality isn't allowed in smaller scopes generally
(other than return values)
Sweeps only check the root component
I've set the static mesh to be the root component instead of DefaultSceneRoot inside of my Actor
I apologize if I forgot to include that in my earlier question.
Maybe a bit of an explanation would be better, just telling me to not do something doesn't seem like completely answers my question
Then it should work as long as what you are colliding with is set to block your actor (root component)
engine limitations is the explanation. if you explain what you want to do I can offer alternatives
as in, what you want to have happen
Perhaps it is because I am in UE5EA then. I'll throw together a test in 4.27 to see if I get differing results.
it doesn't tell you what "Save Game Instance" is?
UE5 is Chaos Physics, 4.27 is PhysX, but for this use case it shouldnโt make any difference
I'm not simulating physics on either the static meshes in the level, or the actor I am moving, should I be?
No, collisions work also for kinematic actors as long as you have sweep enabled
And their collision settings are set properly
What is that you are hitting with your ghost?
A static mesh in the level.
Easy test. Switch both to BlockAll and try in this way.
We can move this to #legacy-physics if we donโt want to flood this channel
well it's part of a marketplace plugin so I can only assume the intentions of the code, I think we are going to replace this plugin for our own code just to have what we actually want it to do
It's jut the Return Value promoted to a Variable
I would not use any code from someone who would willingly put latent nodes anywhere but the eventgraph personally
Hello all, foolish question. id like to make a program to run during a twitch stream. however, sometimes that would mean running my program at the same time as a video game, and god knows i'm terrible at optimization. would just setting up an empty level with a single "go back to your other scene that has all the stuff in it" button work for optimizing lol
That makes sense, still don't know what node to put down
Right click Return Value
Promote to Variable
oo, nice. ty
if I am reading this right... no, it wouldn't make a difference. you're still using a blocking thread to load all the assets while in editor
ah dang, okay. do you have any ideas on how to handle this by any chance lol
if you split your level up into smaller sublevels, you can load them each one by one in the levels tab
you're still doing a blocking load per level, but because each only carries a fragment of the assets you load less per level
you'd have to do this manually every time though
that's fine, i am used to doing lots of manual nonsense. thanks for the tip!
How complex are the shapes of your actors and what kind of resolution do you need for placement? Like is it closer to a bunch of boxes or is it very complex shapes and you want things to collide exactly?
@odd ember I got it working. I ended up making a interface plugin both projects share
weird that you had to go to such lengths, but glad it worked out
alright, uh, i've got an entirely empty level with a widget that has a single button, which is somehow taking up 50% gpu so i think my issue is that i'm launching from editor and it will hopefully be less greedy with my resources when i've packaged it
Marco helped me fix the issue in #legacy-physics, changing it to simple fixed the issue, as I believe you are already aware. The objects are simple enough that simplified collision will work just fine for when I'm trying to place them, I can always switch them to use complex collision once they're placed, or, if I can't do that for some reason or another, just use a second, simple collision mesh for the ghost, and replace it when I place an object.
entirely possible, but test it. also update your gfx drivers
Find
How do I filter for only the 0's?
If I had a datatable like this, how would I filter for the 0 in Timestamp?
^
Imagine this is connected to a slider.
It takes a long time to loop through all the values.
So it slows down the engine a lot
If you think about what filtering is - you are effectively looking at everything and then only allowing certain things through based on whether that specific thing matches a criteria. Looping through all contents is effectively required.
Best you can do from there is try to use subsets of data instead if it's too much.
I think.
in BP you'll have to cache the DT anyway, since I don't think there's any meaningful way of getting multiple rows out of a DT without storing them somewhere
Hello, How to tile (atm full map) to 4 tiles (top_l, top_r, bot_r, bot_l)?
Better question for #graphics
If I saved data with Save game to slot in a previous version of the game, and I want a new version of the game to reset that data to default values how would I go about it? We use a patcher tool so the saved data/slots persists across versions of the game
I don't know how much of save game to slot has actually been implemented to be useful. but create a new save file?
that will by default be empty
wouldn't that require a variable that indicates that the data was reset so it isn't reset again?
I mean you didn't mention that as part of your original problem.
I thought you wanted something fresh for when you press "New Game" in the main menu or the like
Oh yeah my bad
but like I said I haven't worked with save game to slot. I couldn't get it to save things properly
so I wrote my own save subsystem
Hey guys I could use some help. I purchase the Improve fights : Stylized VFX Pack from the asset store. I was trying to set up the dash effect using the blueprint tutorial but no matter what I try the trail wont work. I've been over the tutorial 3 times already but can't figure it out. The actual dash effect works fine though.
I would suggest getting help from the publisher in this case
okay thank you
Seems like gimbal lock issue to me ๐ค
Yeah that seems to be the culprit, when I move off axis it fixes itself. Any idea how to fix it? From my quick understanding of gimbal lock its confused on the tangent making it inverse but that was just from a 10 second google
Found a quick fix online but I appreciate you getting me on the right track. The addition of a set spline up direction node did the trick
Why does my flying pawn have no collision
have you added collision to your pawn?
what are your collisions set to?
In the blueprint itโs set to block all and in the mesh itโs set to complex collision as simple.
so your only collision is a mesh? or do you have a capsule as well?
Itโs a flying pawn. From the template, I replaced the mesh with my own and no collision all of a sudden. There never was a capsule
Should I add one?
if there wasn't one, then no
but if all you did was replace the mesh, that's probably where you should be looking
maybe your mesh has no collision on it
in which case the settings dont matter
you can get them by pressing 1 and clicking
just scalar values I guess
constant
im trying to make a blueprint where a cube change colors on contact with the player and im completely lost. all the nodes make my head spin (im new to unreal) any tips on what nodes i should use? ive tried finding videos of it but i cant seem to find any
Changing colors of something is a bit more difficult than you would initially expect
You have to setup a dynamic material instance, then set the color parameter
i already have a blueprint set up where it changes color if i press E but i spesifically need it to be when player comes in contact with it
Great!
no, i dont think so
Oh sorry, it's called "Box collision" in UE
just add a box collision, then on component begin overlap with the box -> change the colour
and then you can also use an on end overlap to change it back if you want
When selecting the box collider, you will see the events on the right side of the window
There are a bunch of green plus buttons
Yeah that one
It will add an orange box to your BP
That's the collision volume for your cube
Can i make a static mesh drivable? Or does it need to be rigged like a skeletal mesh?
The static mesh collides with the character, but you need the cube collider to generate the events. You can use the OnComponentBeginOverlap or OnComponentHit events
Cast "OtherActor" to your player BP, check if valid, then do your color change if true
im sorry, where do i find OnComponentBeginOverlap?
rightclick the component you want it for in the actor hierarchy, there is an option to add the event to the graph
ohh, thank you!
how do you turn on the things that are off ?
where is the player BP?
Oh it's whatever you called your player blueprint
Might be called character
You can go without the cast, but then the cube will change color when it hits anything (IE the ground)
oh found it, it was called thirdpersoncharacter
Ah, you are using the project default character
I wasn't sure if you had followed a tutorial
yeah its the default third person project thing
its for an assignment where we do blueprints and im really struggeling cause none of it makes sense to me
right now it looks like this, not sure what to do from here
Connect the top part of your Cast to your SetParameterValue
The Cast is basically saying "Is the thing that collided with me a player?"
When you select multiple nodes and hit "C" you can create comment regions
I HIGHLY recommend you comment groups of your nodes to identify what they are doing
Not only will this be good practice going forwards, it will help you reason through what you are doing
Effectively learning the material better
Is this your first time doing blueprints or any scripting?
how can I reproduce the waterfall ?
pretty much yeah, ive done some C+ scripting back in the days but very little. never done blueprints before tho
I have done this so far to put into a plane
It will get easier with practice. Just make sure you comment your stuff a lot. I use comments to make sure I actually understand the problem I'm trying to solve.
This is all about breaking big problems down to smaller problems. If you can't reason through the problem it probably needs to be broken down smaller.
You might need to enable overlap on the collision for your cube / character
Blueprints and C++ are both all about logical organization. It's programming, and learning it is a paradigm shift for just about everyone.
this is what it looks like now
do i remove the E key thing if im not gonna use that anymore?
also not sure what do to with the box collision
It's helpful if you can point to each node (starting with a red one), say what it does, then follow the white line and say what the next one does.
It's like you are writing a story
Each story starts with the red event nodes
ohh
Nodes that aren't in use and aren't connected should generally be deleted
didnt i need the box collision tho?
Try it out and see what happens
You have all the parts, but you'll need to reason through what's happening
nothing happens
i think it might have something to do with the box collision
Did you enable overlap on the cube component?
It'll be buried under a Collision section on the right side when you have selected the cube collision component
Anyone know is it hard to do parabolic shot for bow? or is there any example? thanks
does anybody know why setting the camera focal length doesnt seem to have any effect?
its transitioning the player view to the camera correctly but it keeps it at what appears to be the default zoom?
Is the default Jump function just an Add Impulse?
Hi guys, is there a way to add a Button to a BP 's parameter interface?
Pretty sure it just sets the velocity z
No need for impulse
Ah okay I can see that.
Whenever I Add Impulse to an actor, they get pushed about 10x as far if they are already in the air, so I'm just trynna see how to reduce that.
Pushed as in sideways?
When colliding with a surface you have to keep friction in mind
As well as the basic character behavior to slow down
In air you basically have no counter force
sideways yeah
And yeah that makes sense. I might just have to divide it based on movement mode
@proper umbraremember that AddImpulse works in world coordinates, make sure the impulse vector is directed accordingly
Also make sure you apply it to the CMC and not to the capsule
I've found that if your AI uses root motion, launch character node will only affect the vertical Z axis. You'll need to turn off root motion before the launch and turn it back on after the launch.
Like those buttons, how to add them to a BP?
enable "call in editor" for the function
however, that only works on functions which don't take parameters
and iirc only on non pure functions
What's a good way to make a UObject derived blueprint Tickable ?
I can edit the C++ baseclass for this object if necessary
CMIIW, but isn't ticking applied to AActor and below?
so derive from FTickableGameObject , add a Tick function and add a custom Blueprint event for tick
I think ALS done it by having a separate "last input vector" or something like that.
Thanks
but is the mesh really at 0,0,0?
yes
and the sockets of the arm rig, are childs of the hand bones?
yes, I checked multiple animations and the socket had always the same spot at the same bone
Here is the code btw
@honest path Your attachment rules look wrong.
Should definitely be snap, unless you're explicitly setting it afterwords or don't want it to be at the location of the socket.
isn't it spawned with 0,0,0 relative, and keeping that would kinda snap it?
Do you mean in the code
or will it update the relative offset to stay in place?
bro I dont know man I am so confused
ok
FAttachmentTransformRules::SnapToTargetNotIncludingScale
i'm curious how your socket even follows the hand bone
as it's not attached to it
but never worked with skeletal mesh sockets, to be fair ๐
Dunno. Assuming that the skeletal mesh and socket are setup correctly, I attach things all of time using this. Changed to your code.
Gun->AttachToComponent(GetMesh(), FAttachmentTransformRules(EAttachmentRule::SnapToTarget, true), FName("GunSocket"));
I'll try this
Bro I swear it is still like this
is my bp corrupted??
this engine is fooling me
does anyone know how to code a change in fov when chatacter is sprinting? Cheers :)
Might try a full editor restart with compile to be sure. You're compiling and testing pretty quick so not sure if you're livecoding or hotreloading. Definitely don't do the second one.
PlayerCameraManager->SetFOV(45);
I am coding it then press F5 you know
With the editor closed?
yes yes
is that c++? im using blueprints :/
You're fine then. I would definitely check the socket then. Scrolling up, it looks like your socket is in the wrong spot. Usually they're just attached directly to a hand bone.
oh, sry wait maybe I'll find somethin
@late islandSame thing. Get the local player controller, GetCameraManager, then Set FOV
huge thanks
Ok uhm
should I delete that socket tho?
and attach it to a bone
i think you can drag'n'drop it to the hand bone?
or right click and search for a new parent
So this isnt normal rigth
ill try
cant seem to find a way to connect it, sorry, im new to blueprints
Just solved my own problem, was missing a return false in my function, so even if hit was bad the function would still default to return true it seems
You can send a screenshot in here
that would help us solving your problem
I know what I am talking about bc I am here everyday trying to clear a strange bug like this ๐
im trying to make that the player changes FOV when speed is running, but it changes everytime and its really buggy :/
use the current FOV and finterp to the target
what is this warning telling me
there is no skeletal mesh assigned to CharacterMesh0
the third person template already has this behavior built in
if you press any movement input briefly, the camera will rotate towards that position first
the alternative would be that it would strafe, which doesn't happen
whether it moves based on camera rotation, for the question that you posed, doesn't matter
what does it do then
the default implementation will rotate it entirely towards the new direction
Are there known issues with spline mesh components? Cant seem to hit it..
in all honesty this looks more like an animation problem, than a blueprint one. you could argue that you want a slower acceleration from the side of the movement, but that's about it
yes
the reason it looks that good is because the animation blends between the rotations
Random problem that I can't seem to figure out. I was working on my project, I've got it set up to use the mouse and click on buttons (they don't do anything yet other than change colour when being clicked). I step away for about an hour.
I come back and create a new material make it look like glass, and put it on a box that sits behind the buttons. And when I go to test, nothing works any more. I can't click on the buttons, and they don't even change colour when I hover over them which they also did. I even deleted the box that was behind them. I tried moving the camera to a completely empty part of the world and just tossed a couple of buttons in front of it, and didn't get anything from them. Any thoughts on what is going on or a solution? I can't seem to find anything online either lol So confused...
not because there's some underlying BP issue
@gentle urchinas long as the mesh you are laying out along the spline has collisions and its channels are properly set it should work
breakpoint it and see if your inputs truly trigger
Is there any viewmode that can show this? Visibility Collision or something?
@gentle urchinis it for the Pawn? Yes there is a pawn collision view mode
Otherwise the low-level view is pxvis collision 1 at the console
Not really, its for my road spline. I want them to connect to existing road if within x range
so you want that to just instantly move to the other side? what happens when you press right or left inputs?
@gentle urchin Assuming you are using a PhysX version of the engine, the console command above shows which physics bodies the physics engine is seeing
@gentle urchinyes I don't see any
just add a multiplier to the axis input value
or increase the turn rate
tbh
if you try anything vector based, you end up screwing movement when you move around
@gentle urchinhas been a while since I have worked with SMC's. Check the collision options for the component itself. They may be turned off.
need to jump onto a meeting but I will keep reading here, or move it to #legacy-physics
Is there a comprehensive list of Blueprints that are good to know how to make somewhere? I'm looking to develop a library of custom built Blueprints I've personally made that I can draw from. But I don't know where to start.
Wow... Okay.? I figured out the problem by chance and am so confused as to how this happened.
Somehow! I removed the default game mode and it was set to 'none' I have zero clue as to how that happened!? Is there a shortcut to do that and I just did it by accident?? lol I wasted probably a good 2 hours trying to fix this
this makes no sense
Hey, I'm not sure if this is exactly what you are looking for, but here are some helpful nodes and basics that really come in handy:
https://www.youtube.com/playlist?list=PLQAo6pRlrb_VjCJT3VCS871N9hyM9ml3Q
Sir_Fanci seems to have a decent amount of good information. But I think you might be looking for more advanced things if I'm not mistaken (things like a health set up, or door blueprints, etc.)?
I would strongly recommend not to use those. those are all shortcut nodes that end up biting you in the behind
Do you mean the things from the youtube link or creating generic blueprints to copy between projects?
the youtube link
generic blueprints might make sense but in reality blueprints don't allow for the level of abstract templating where it becomes really useful
He wants blueprint version of AActor and co.
lol
Such things are project specific and already exist in any case.
Hmmm, interesting. The things in the link seem like handy nodes with decent practicality. What kind of problems do you think could come from using them? (I am sort of still a beginner, so I am really curious)
re: generic blueprints, yeah I could see that. I've even tried to avoid doing that for the time being, just to become more familiar with how to do it before coming up with a shortcut to skip it. For example, every project I start to mess around with, I'll create everything from scratch like a health system or whatever. That way I can see how much I remember of the process and practice
let's be clear: I don't think that there are problems with them. I know that there are problems with them. any shortcut node you use has a "proper" counterpart that requires some knowledge to use or execute
this may not be a singular node, but it will be some sort of communication pattern between blueprints
Any "handy" nodes can be created by you without needing any tutorials. Just make them as you need them or you'll bloat your project with useless code.
I remember writing a blueprint exposed quaternion library without checking if they are already exposed to BP. 50% of what I wrote was already exposed and the other 50, I didn't even use at all.
Epic made BPs very user friendly, at the cost of using proper practices that are necessary for code
the result is that we have a bunch of people now coming in, not understanding how to arrange code properly, and ending up in deep waters because of it
I keep saying this, but: technical debt is real. it's a real problem, and it is explosive on the part of most projects made in BP
True. It stems from the idea that using blueprints can allow you to make a game without "writing a single line of code"
Most of programming is developing concise and correct logic before code writing comes into play
For sure that makes total sense
I spent over three weeks working on the math and logic of a jigsaw inventory system (I was still very new to ue4) before I even started coding.
what's worse is that because the foundation was built on shaky ground, and people had been given a greencard to explore BPs without proper understanding, you now have countless tutorials on youtube using these hacky solutions as foundations for bigger systems
so the problem has gotten needlessly exacerbated
So what is your ratio of blueprints to coding that you both do in UE4?
Exactly!! Spaghetti code for no reason. I still use tutorials for some things but I will never copy code. I observe the design and logic then rewrite it as I see fit. If there are any problems, I wouldn't come here to complain that this is how I saw it done in a tutorial...
it reminds me of the question that Valve posed some 10 years ago, in the period where DOTA 2 and Portal 2 were released. there was an argument for "everyone should be able to do anything", which included allowing anyone to create and sell marketplace items for DOTA2, and allowing a standalone utility for level creation for Portal 2. this quickly deteriorated and Valve had to go back on both projects and remove these features. the DOTA 2 marketplace became a place where only vetted items would be able to be sold, and the Portal 2 level editor was discontinued and removed
Most of my code is cpp because I can't seem to stop breaking my blueprints. I write in cpp because it's more concrete. If your blueprint gets corrupt, without version control, it may be irretrievable.
So, it's about 70 cpp, 30 bp
Yeah, that was a big problem I have in one of my older projects that I still want to finish, but feel that I have to start over. It's like my first kind of 'big' project and I basically just did a patchwork job of like 30 or so different tutorials and it got to the point where I didn't know where anything was or how anything was connected
I got about 30% cpp / 70% BP. BP is useful, and you can use it well, but you need to understand code to work it if you're looking to create bigger systems
I've written an input buffer in BP, and integrated it seamlessly with other character based input systems. I've written behavior trees for camera control in BP
I do a lot of BP compositing because it is much simpler than to use than cpp compositing
so I might create a component base in cpp, but I'll expand on it in BP
and make it freeform enough to be added to any actor
then there's stuff like subsystems, which are cpp only. subsytems are amazing
They are. I haven't used them much but I plan to for my AI manager
So 70/30 and 30/70 lol.
I am doing like 100% blueprints because for some reason I haven't been able to get cpp working and visual studio was driving me crazy. But that was more when I first started with UE4. I should try again to make it work though. Also, I don't know cpp, like at all. As far as programming languages go, I know Javascript somewhat decently okay maybe and like baby level Python
I wrote an AI director subsystem that I hook into via an AI serf component
the serfs register themselves to the director
which allows for greater control
Ahh... nice. Similar to the AI perceptions system.
yeah, I wrote my own perception system
most of the AI features do seem to have half assed implementations
so I'd rather have a full overview of what I am doing
You'd need to know how to write basic cpp or you'll spend all day in #cpp looking for solutions
even behavior trees have bugs on the engine side
I don't think learning to write cpp is the big issue
javascript has no basis for architecture
so you'd need to teach yourself proper architectural patterns to use it correctly
but to be honest
that goes for BP too
Same. Although I just write my own perception classes. And register to the existing subsystem.
Do either of you have any recommendations for a good (free) source to learn some cpp? Preferably video, I do better with visuals and following along, as opposed to just flat text
like I said
I don't think the syntax is what the focus should be
in fact you'd be better off just doing BPs, but doing them well
I'd look for gaining an understanding of system architecture first
I mean, I know I can find stuff no problem with a simple search lol
Okay for sure
It's still good to learn it. IMO
time and place
But you need to understand flow patterns and proper code architecture before tackling the headache of cpp.
Not that it's much of a headache tho
BP is an excellent opportunity to practice architectural patterns
kinda but also not
there's plenty of space to try out MVC
compositing
singletons, observers (to a lesser degree)
many programmers do a bunch of mistakes in BP which comes from assuming that it works like code
imho c++ and bp complement each other, both have their strengths and weakness
Yeah, I had someone apply to join my team and said he knew cpp. Turned out he meant he was good at converting BP to cpp not that he actually knew cpp.
Using entire functions to cast int to float when a static cast would have sufficed.
The correlation isn't 1:1 in a lot of cases
I think getting caught on stuff like this is why I wouldn't recommend cpp outright. it takes time to understand and get to know. if you've never done OOP before it's going to be a difficult journey
is it sufficient on all platforms?
What is? static_cast?
yea
i don't know about all the architectures, so i'm really curious if there might be pitfalls
It is, I imagine. Unless you want to do C-style casts which can be ambiguous in many cases.
I've got to run. But thank you all for the information. See you around! ๐
ok, apparently it is
float UKismetMathLibrary::Conv_IntToFloat(int32 InInt)
{
return (float)InInt;
}
Silly question: Can PlayerState have components? ๐ค
and more importantly, Is there a reason to not do it?
Yeah they can but depending on what kind of component it is mostly useless
PS is an actor
Ability system component is recommended to be on the PS for player
ok, then nvm me
say I have a car game. My playerstate knows stuff about the player.
Now I need a lap system for tracks with laps and a "go from point A to B" system for tracks with beginning and end.
Instead of having two playerstates that only differ in that, I could have two components... right?
Or some switch using a bool or enum in one player state. Saves you having to create extra classes
If you don't want that, two components is better.
I prefer extra clases to having tons of variables and big blueprint with meatballs ๐
thanks โค๏ธ
aren't you limited to one playerstate per player either way?
@odd ember how doesn't it make sense?
My point I'm making is there seems to be this set of Blueprints that everyone knows how to make. I'd like to know how to make them so I can have my own library of Blueprints to draw from without having to constantly go to a forum or a youtube video for help.
they'll be different per project
see also ^
in most cases there's also the notion that you may find your previous code hasn't been up to par, and so it's better to start fresh
then add to the fact that each game has a different context
a camera in a third person game isn't the same as a camera in a first person game
there's probably generic "patterns" you'll follow in projects, depending on what type of game you're making... but they are usually just general guidelines/ideas and the implementation is not always the same, and the basic implementation is usually fairly straightforward anyway :)
It's really obnoxious when you watch 10 videos that show you how to use a node without telling you that you first have to turn off a parameter in the details panel. Things like that, things that people know so well that they don't think is something someone needs to know.
I'm not interested in abstract templates, I'm interested in building common Blueprints that I can adapt later on to be more specific (ie triggering an explosion).
There's nothing about Blueprints that function like code, it's fake programming for lazy people. I have to learn blueprinting for school, and so far it's been a headache. Programming is far easier line by line rather than this spaghetti mess of a system.
I'm not interested in abstract templates, I'm interested in building common Blueprints that I can adapt later on to be more specific (ie triggering an explosion).
Blueprints don't allow for generics, so this won't work
and yes, what you are after is some degree of abstract templating
you want something you can mold per project, but has an abstract base
Thanks for the reply. This was definitely my suspicion. Iโm going to see if I can include a โstunโ branch in my behavioral tree to allow it to be launched. Not sure what my other options are if that doesnโt work though lol
if you know cpp then yeah, absolutely. templating can be useful once you have access to this kind of support
There's nothing about Blueprints that function like code, it's fake programming for lazy people.
This is completely untrue. Blueprints is a programming language
but out of the box, there isn't really much value in migrating specific actors
it even has its own compiler and runs on a VM. short of generics, it could as well be visual java
sorry, how?
Iโd love more detail on how you did your custom AI stuff. That sounds super interesting as Iโve definitely been having some issues with the way the AI systems work โout of the boxโ
And I mean blueprints are required by now
To use unreal
I wrote everything from scratch following a compositing pattern. I have my AI perception in a component that also registers to an AI director. The AI director propagates information to each AI
For programmers
I got a good kick out of C++ channel a month or two ago. Can't remember. One of the people there that refuses to use Blueprint subclasses even to set default variables and sticks to using construction helpers came asking if there was a way to easily change reference assets everywhere.
the AI director is a subsytem which generally handles high level AI behavior. e.g. it will let AIs know which high level roles they play in levels and what standings their faction has with another faction for instance
How is it a programming language It's node based C++. It's not a language, it's shiny color coded box tops attached by noodles haha. I mean I like it, I'm not arguing it. It makes sense. I just don't like how messy it is even when organized.
it has a compiler and runs on a VM
it is absolutely a programming language
Just because it uses a visual paradigm doesn't make it not programming :)
the fact that it wraps cpp makes no difference
By that logic, you may as well say that any higher level scripting or programming language isn't a programming language.
let's count how many languages are built with a compiler written in C
it's a nonsense argument
there's also languages like LabVIEW which is a visual language being used in some niche applications
Like. Why bother calling languages programming languages at all? Why aren't we all writing in binary?
no that's too advanced
01110011 01101111 01110101 01101110 01100100 01110011 00100000 01101100 01101001 01101011 01100101 00100000 01100001 00100000 01110000 01101100 01100001 01101110
let's physically flip transistors by hand
The plan, is not to have a plan.
processor speed = muscle configuration
hi, I have a question - would it be possible to make a drop/pick-up system in Unreal Engine 4 with Blueprints? I was thinking maybe having an array and when an item is selected it can be dropped as in, it gets deleted from the inventory, and an item with the same ID as the one that was dropped is spawned on the floor - i'm not very good with this kind of stuff, so I'd appreciate some help (mostly tell me what to look into, solutions would be nice too though)
sounds about right
you could use data assets and store the class type along with any variables you need
can you elaborate?
well... data asset is a type of data object you can create in UE4
you can put in relevant data that you'd want stored about an item
i just know the base idea of - use an Array, when <drop_button> pressed, delete currently held object, spawn an instance of it outside of the player, when player looks at object and presses <pick_up_button>, object goes into next free slot
combined with knowing which class you need to use, this could be used as the spawn parameters for spawning the actor from the inventory
the alternative is to use structs, or somehow combine this approach with structs
Right I should clarify
I have 3 months experience with Unreal
Which is next to none
what's your general programming experience
is there any way to blend two different meshes smoothly inside a spline?
Year of Godot with GDScript, 1.5 year of Python, 2 months of C#
what's your general understanding of code architecture
Not great, I'm a student
I'm currently doing research for a project and I came here asking about this specifically because of it
I aim to add drop/pick up functionality to a game but I do not know:
a) what kind of things that would require
b) if there are any other systems that would be required by this system
c) how to do it in Unreal terms
I'd say there's probably a few good inventory guides out there, but they'll likely be buried underneath the terrible ones
just by sheer volume
I know how to make an inventory with switching, yeah
But I don't know how to make it so that you can drop an item
From your inventory
Or pick up a new one
well I mean you're talking about two systems communicating
the inventory system, and an interaction system
you can maybe create a function to drop it aka destroy it or remove it from the array and spawn it in front of the character
That's what I know already
in terms of unreal, or really in general terms, the inventory is just an array of structs, structs being lightweight data containers
What I don't know is how to go about it from this
figure out the actions that you need to perform
and translate those into functions
Inventory::ItemPickUp(AItem Item)
for instance
it's just an example
Yeah an example I do not understand at all
Because I never picked up and probably never will pick up C++
an item class
no how is it different from Item
that's just the name of the parameter
so the AItem is the class and Item is the param
this is how every language does parameters as far as I know
in other words
well no both are the parameter
okay so
What's the Input node thing looking like
What's the Output node thing looking like
the input would be the parameter in this case
the output would be a return value. in this case you don't need to return anything
You're talking to someone who sees functions as
func item_pick_up(Item)
not
Inventory::ItemPickUp(AItem Item)
A little C# and mostly Python/GDScript
I have a spawner blueprint that spawns a single actor in the spawner location, after player character overlaps with specified trigger box.
Currently When i place the actor spawner blueprint in the world it is really hard to spot, because it has no graphical representation. How can I make it so spawner has some visual clue only in editor, like for example the actor that it spawns would be on top of it, or some static mesh indicating that this is in fact a spawner right here.
Python I don't think is strongly typed. but C# is
Can you just give me the general gist of what a function like this would do
in the most basic pseudocode
no C++ esque stuff
it would probably just sanitize the item (ensure it's a clean ref, detach it from anything else in the world, reassign ownership) and then drop it into an array
a glorified array insert essentially
on the "viewport" of that blueprint add a billboard and scale it as much as you want, so you will be able to see it in editor
a more advanced way would be that AItem has an ItemData struct that it pulls out and saves to an array of structs, then destroys the AItem
so, push out of array, see what got pushed out, put it into the world, when you pick it up insert it into the array?
ItemData could have relevant data that is malleable, such as item durability, properties, item class, name etc.
again: student
give me this in Layman terms basically
no references to internal structure of UE4
just the most basic, universal idea
this would be inserting into the inventory. to get it out of the inventory, you could use the ItemData struct to find the class, and then spawn it with the ItemData as a parameter
i'm done
this isn't internal to UE4
a struct is just a data container
the alternative, simpler version is that you store the AItem actor, get its class, and spawn it
I want to fill a square with line traces and the distance between each line is 20 units. But the problem is that when i increase the amount it turns into a rectangle.
Pic 1: Amount 500 each side, 20 units between
Pic 2: Amount 1000 each side, 20 units between
Pic 3: Code
Cause you're multiplying Amount by distance. So if distance is 5.0. Then 20 of these will be 100 in length total. While 40 will be 200 in length total.
What you need is a total length for your square. Then for each trace you get the distance between each via (TotalDistance / TotalNumberOfTraces)
Doing that will keep your square intact and not lengthen it, but add extra traces.
Well i got it to work. By changing the maximum amount of loops from 1000000 to 5000000
It seems it was not the code. Pretty sure my code works as i want it however ue4 has a loop iteration limit that i changed and it worked
Ah. Noted. Yeah. Side note to that is that you can actually get a lot more loops in blueprint via putting the loop itself in a function and then looping that function from another loop.
Directly nested loops are weird like that. ๐คทโโ๏ธ
like recursive function? Wait haha maybe not it seems i was thinking of something else
hey guys! how to get transform of character during animation ?
Thanks for trying tho! I like your style better then mine cuz its more optimized in my case
Im curious to what the traces are for ๐ ๐ค
haha well you will probobly laugh at me if i tell you
AI? ๐
Its becuase i want random generated islands and i want to spawn grass on each island but i couldnt find a good way of doing so, so i ended up spawning a lot of traces and where it hits it spawns grass. Its prob not that optmized haha
Oh ๐
You can do that from a material aswell
Define textures where foliage shall randonly spawn
You can also use world direction of the mesh in the material to spawn it.
Think it works on any mesh as long as the material is right
i did this in landscape but i cant use landscape in my example
Check out auto landscape material
The idea is to spawn random islans and have foliage on them but i cant use landscape to do that
Think there's some free ones avaliable aswell these days
Its not limited to landscapes afaik
Afaik, yes
So i can cover a cube with grass
Yupp
What is this called?
Defining properties or rules for spawning etc
Can you link a video of some sort or somthing that could work im really new to this thing you introduced
Dont have one at my hands but ill see if i can find one later
This is pretty good for that sort of thing. https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/OpenWorldTools/ProceduralFoliage/QuickStart/
is there a written or video tutorial that can help me add crouching and ledge grabbing to a 2.5d sidescroller
I have tried using this tool BUT it only works on foliage that wont cover everything. It does not work on grass
probably a simple question but how would I get a sprite in my character blueprint to rotate towards the direction it's moving in?
sounds like something you can google
@austere aspenyou need a direction vector, usually from your movement component or self calculated. From that you derive a rotator (RotFromXAxis) and apply as rotation to your sprite or whatever.
ok, could you explain that in layman's terms please? I'm not a programmer guy ๐
I just have the Add Movement Input with the Input Axes from move forward and move right with 1 in their respective axes in the add movement input node
it literally says on the node... WorldDirection
yes, but making that a variable would need it to be set somewhere else, and using that for the rotation would just be 1 instead of 90 or whatever
tbh it looks like it's already setup to do what you want
it moves, but doesn't rotate
how do you imagine a 2d sprite would rotate?
either adding or setting its relative rotation off the input axis events
I think what you're looking for is an animation
a 2d sprite is just a flat plane aimed at the camera
rotating it doesn't make sense
I can set the rotation of it fine, it's just making it animate to those 8 directions instead of snapping that's the problem
8 directions?
in a sidescroller?
up, left, down, right, etc, top down movement
oh I thought it was a sidescroller
ah
get the forward vector of your sprite component
and use that instead of 1,0,0
same with right vector and 0,1,0
see if that makes a difference
I can move up and down but no longer left and right, and with no rotations still
do you have an event called turnrate or some such? maybe turn?
I don't
I think what you want is to have a forward input and a turn input perhaps
instead of forward input and strafe, as you do right now
how would the turn input differ from the MoveRight event?
Id say combine inputs to make a direction for your flipbook
Thats what you're after isnt it, in top down fashion
MoveRight is just the input of your right control
it's just a float value
well assuming it is flipbook based
just 1 flipbook
I'd look at the third person template and steal that logic for turning your character
Strict top down is just turning the mesh tho?
yeah I'm just trying to rotate the sprite component
I have no idea how though because a mesh has settings for rotation doesn't it?
how do I do that
yeah
control rotation only works if you're controlling a camera
the camera, I presume, does not rotate
because it is top down
it does not, no
I dont recall doing much else in my other project.. checking it out now
maybe i did. memory fails me often ๐
I started this from the top down template and that didn't seem to have any specific rotation nodes
its the same basic on any type really
thirdpeson prob is best startout
as CE suggested
third person has some nodes for turning
they use control rotation, true, but you can adapt that to just be a turn rate instead
I added wasd movement to the top down controller before the sprite thing and it rotated fine
Its just Add movement input really
I tried control rotation for the sprite and it didn't work
assuming input is "add movement input"
otherwise you lack velocity or whatever this thing is rotating on
using 1, 0, 0 in the vector things rotates it by a small amount, ill use control rotation and see
with control rotation is still only rotates a small amount
MoveForward would have vector 1,0,0
MoveRight would have vector 0,1,0
yeah I had that
make a new float variable called TurnRate and multiply that onto your axis value
I believe 22.5 or 45 is the third person default turn rate
there should be some mouse based setup
this is what I have
that's fine
Not needed if there's no mouse involved tho
can always be changed to add actor rotation offset
ok adding turnrate doesn't change anything
did you check the orient rotation to movement?
doesnt make much sense ๐
adding a sprite to it changes nothing
as in, it still works as expected
still has the same result
Hello all. I've made multiple switches that play my switch sound correctly except for this array switch. I don't understand why the sound won't trigger. Any ideas?
then make forward only use GetActorForwardVector
your loop happens almost instantly, and the sound engine probably won't play x amount of sounds overlapping each other
like this?
try it
still the same result
Did you mess alot with the cmc?
Could try a new base character and just see if you get the desired effect
not much no
you didn't add the turn rate instead of the control rotation
although I don't think it'll work
what do you mean instead?
you understand the word "instead" yes?
yeah, but did you mean do this?
left and right now move diagonally down, still no change in rotation
That makes sense but shouldn't the sound play only when the switch collision is triggered? I recognize that the array definitely has something to do with the issue. Is there a better place to put the play sound node in my BP?
I don't know what you're trying to do so I'm not sure how to answer your question
this is what I have in another top down controller with a character mesh and this works fine
then... use that?
still the same result of only rotating slightly ๐
The sprite?
