#blueprint
402296 messages · Page 639 of 403
well, can I set the hierarchy beforehand?
You'd like to make a spawner, and you want to do something in the spawner but before you spawn the to-be-spawned actor?
Or you want to spawn something and before it begins play, you want to customize it?
Ok, let me explain what I'm actually doing, I'm generating a map, and in that map I need to generate "nodes" which mark the locations of things like enemy spawns
these nodes can move
and even spawn other nodes
have a centralized actor spawn all these nodes, then store refrences to them in an array so that centralized actor can keep track of them
TheLevelBlueprint can do this, the GameMode can do this, a custom actor placed in the world can do this, etc etc
they don't need any parent child hierarchical inheriting nonsense relationship at all
I can get the nodes to spawn easily, but each node needs to basically run a ticking "loop" to run enemy spawns in their own location, and it needs some information of the map, which theoretically I could get in more convoluted ways, but that information is part of the actor that creates the map
which is also the actor that would spawn the nodes
Basically I'd need to reverse engineer a function, and run it when I don't need to
even though I had already set all of it to save to an array
so I don't have to calculate it all the time, but well, since the array isn't global
I'm slightly out of luck
in that case, each of the spawned nodes can just be spawned with a reference to their creator so they can read his information
Just make a variable, lets call it CREATOR, on the nodes, expose it to spawn and instance editable, make it the same type as the creating blueprint
When the creator creates, he will use SELF to inform the CREATOR variable on the SpawnActorFromClass node
It's possible to assign something as the "owner" of another thing, and I think the spawn actor node has an input pin for owner (usually plug Get Self into it), so that's a built in way to establish a relationship, if that helps. Get Owner is a node, though you'll likely have to cast to a class afterward.
Or even better, don't have the nodes tick at all, just have the Creator tick, and on a loop he sends an update to every node he created (because he saved them to an array when creating them)
Assuming you're new to OOP, you just need to get familiar with how objects reference each other, and once you do you'll be comfortably reading values and sending commands between them left and right
if I get the creator to tick that might be a really bad idea, I'm simplifying it but each node should take into account how many enemies it already spawned along with other factors, for example if it has way too many enemies the chance to spawn a new enemy is smaller
along with the chance for a node to "spread"
also there can be multiple nodes of different enemies at the same location
which interact
so let's say that function is called "NodeGameUpdate", it's on the nodes
the creator would just do a forloop
ForEach (NodeWeCreated), run NodeGameUpdate
Also I'd need to tie each enemy spawned to the node they were spawned from, so that if like, the player kills it it reduces the "population" of that node
I don't want to run a bloody refresh thing
that keeps checking
that sounds like a nightmare
Yes, it's ambitious and convoluted as hell and I should definitely be creating hello world instead, and my head is exploding
thats fine, same principle, the spawned enemy should have a reference back to the node that created him
just send me pics of your BP if you think it should work but it doesn't
the BP currently only creates the map, I haven't even started on the nodes, I've been just planning it on my head sort of
Well, I don't quite understand what aspect of your initial questions you wanted clarification on. You can sometimes get default values from a class reference...
I guess another thing is keeping an eye out for Expose on Spawn for variables. So you can get at the properties before spawning and also set values before BeginPlay @Damien#1876
@mystic storm
post a picture
that's a material graph not a blueprint graph
i see
so how exactly would I go about making a character leap to a range of different locations of their choice when using an action input?
like I want to make my character leap and from their choosing can leap to a location within a specific radius from the original position.
where exactly would I put a node that wants to move my player to a specific location?
there's alot of math involved in forcing a character to move like that
😂
If you don't want to force a character move in kind of more hope it does, use launch character. If you're okay with it flying through the air
so what exactly would i need to do?
assuming hte movement isn't animation driven, you need to turn off the character movement component for a second and like....
Set a variable for what location you want to end up and one for where you start....(STARTINGPOINT, ENDPOINT)
Then start a 1 second timeline, setactorlocation
The value to plugin...use the timeline's time output to LERP between STARTINGPOINT and ENDPOINT
When the timeline finishes, turn on Character Movement component
the movement is animation driven
its like a leaping animation. so basically I want the character to use his leap and then from there he can choose to land anywhere within a certain radius that I would set the number for that myself
lookup a tutorial, it's no a simple question, it's like an entire approach
basically he can choose to land anywhere within the radius I set up for it
well that's the thing. I've tried looking up things and no lukc
You can send me pics of your nodes if you want help debugging it, but there are dozens of approaches
But an ability where the player chooses a spot on the ground within a radius to land in......tons of systems woudl be involved int hat
oh.... so that's a bit advanced stuff?
I'm a beginner
so like from here I think I would try and branch off the play anim montage node and try and "get character location" and then branch off that to set location of where I want to go, but in order to set the location I would create a range of integers right? Those integers being the x,y,z coordinates for where I am allowed to leap from?
honestly, at this early stage, my advice is to make one thing at a time
learn your testing and debugging fundamentals
break it down into steps
and test it
I really want to learn how to do blueprints and animations. like every aspect of it. where can I either pay for an online course OR like learn from professionals on basic things?
there's some decent stuff on Youtube
I've watched tons of those
don't pay for an online course, Udemy is ok, but you really can't do gamedev unless you can self teach
go to the UnrealEngine official youtube page, their playlists for beginners are plenty good enough to get you started
also, idk, if things still aren't clicking then I might try non unreal sources, like for example, learn a bit about how to program in general and annimate in general
but a lot of the videos are people just showing you how to do certain things but I want to understand WHY they are using those certain nodes or using those certain options. That way I can use my knowledge and implement it anywhere
like for me the knowledge of why came because I had existing programming experience
blueprints is just a visual scripting language after all
@tawny helm @limber fox have also a look at learn.unrealengine.com. There is a library of free online courses spanning almost all topics and all levels of knowledge of the engine.
Keep in mind that there is a big difference between doing a tutorial (specific topic, specific solution, usually no explanations of the why) and teaching Unreal Engine (starts from the why and then move to what/how to do it).
Does anyone know how i could match the FOV of a square render target to that of a 16:9 (in most cases) camera?
you can reinit the rendertarget with another resolution!?
What is the best way to learn blue print
youtube and google
How do I start
So you mean render everything outside of the square and then essentially crop it? sounds wasteful
literally the same answer haha, youtube and google for tutorials
Oooo lol
i mean, reinit the rendertarget with a resolution which fits your aspect ratio, e.g. 1920x1080px
Yes but i need a square render target
why?
because i do
its kinda the whole point of the game, they need to be square
there'd be no point of me cropping in material etc, because its a waste of space and file size
and what do you need the 16:9 version for?
i dont need a 16:9 render target, but the player camera is of course mostly 16:9
and i need a seamless view
so you want to capture the players view, which might be 16:9 on a 1:1 ratio render target?
yes
so this area is the only part that is captured essentially
sadly i dont think i can just straight up render the centre portion of the players camera to a render targer (unless im mistaken)
i'm pretty sure that will happen automatically
what does your result look like? 16:9 squashed down to 1:1?
well i got what your problem is, i'm just not sure how to solve it, sorry
nvm
no, i have to use a seperate Scene capture
i dont think its possible to render the players camera straight to render target unless?
it's scene capture, yea, not sure about the camera
Hello
I have a question
If the player looked at something, how can i make the game do something as soon as the player look at that thing?
Something like player view trigger
ray cast from centre of player screen on tick?
Yeah but i don't want the ray to be in the middle all the time
Can i make the camera shot multiple rays from the center?
yes but that might get unnecessary expensive
depending on what you do theres probably cheaper solutions
like getting the entities in range and raytrace in their direction to check if they are in line of sight
big box collider attached to camera 😋
or a cone, to mimic the FOV^^
I wonder if you could attach an AI perception into the player pawn and use that lol
What would be the main reason of "Blueprint time" increasing constantly while the game is running?
what do you mean by blueprint time?
in the "stat game"
I am simply afk in the game and it keeps increasing and increasing and increasing constantly
was wondering what would cause such a thing
if you mean the CallCount it might just be an indication of how often the stat is being reported but not 100% sure
Aye, I mean the callcount.
from UDK documentation but seems it'd make sense it still functions this way
so it makes sense the more time you spend with "stat game" on the slower it will run?
I don't think CallCount is a metric that automatically is "worse if higher", it just means the task has been executed N times
yeah you can probably read the ms
although running my game now im keeping a steady average of 21 count
doesnt seem to be gradually increasing
When my actors execute something, the calls skyrocket then go back down to 1-3 when nothing is running so its obviously something regarding my blueprints but I'm just wondering what specific part of blueprints would increase blueprint time.
how do i close the stat stuff again? i forgot 😂
Oh it might actually be how many times that task is executed per frame 🤔
stat game
I tested it in my game just now and it remains static if I'm in an empty'ish level
cheers
but if I spawn in a bunch of NPC's, then it starts going up because they all start executing more blueprints
but it stays about the same as long as I don't keep spawning more
i guess you have something thats generating more and more executions?
or something that never stops
It would seem additional actors would cause it to go up
if they tick or otherwise trigger a BP execution
Hello guys I have little problem with the function for decreasing the hungry and thirsty, I want wgen the game starts on every 5 seconds to decrease the hungry with 10 for example and on every 7 seconds to decrease the thirsty with 5 and when they reach 0 to start decreasing the health, but I am not ssure how to do it
wen I put breakpoint for the hungry I see that the value is 90 but on the screen is not updating 😦
SetTimerByEvent
oh
this node i hatre so much
I can't work with it
I will need help 😄
like this?
it still doesn't work 😦
@twilit heath
ops
if you want different intervals, you'll need different timers
well dude
you are substracting from the max value on your first screenshots
that will always give the same result
@trim matrix You can set it up like this instead of looping using a delay
well, i would add some clamping to the hunger, or it will go into negative values
a simple max node with the substraction result and 0 in front of the set value should do the trick
nvm, you are invalidating the timer event
still theres some logic flaws, like it will never go back to the hunger decrease once you restored hunger
but overall, better than the delay on tick xD
aha
Yeah lol, it can defo use some clamping and logic control. Just helping him with the looping 😄
well I made this system I have this system and it works
Hello. I tried to rotate the camera when the RMB was pressed. Most of the time, the mouse cursor should be visible, but when the RMB is held down, it shouldn't be visible. But after many attempts, I did not get the desired result: when the camera was rotated, the mouse rested against the edge of the screen. So I could not find the right way out. The screenshot shows my BP.
Running a delay on tick is very expensive on the system. It would seriously affect game performance as it is called every frame. The best way to do timed events is by using timers.
It might have something to do with 'Set input mode game and UI'. Try using that node to disable the mouse visibility on pressing RMB.
Thanks man. It's working !
I I tried this option, but my character stopped rotating
Hi guys,
I am casting to cast to ColdArea_BP in order to use the boolean in the ThirdPersonAnim_BP.
ColdArea_BP is an actor BP containing a collision box and a static mesh.
I am trying to make it so when my character overlaps the box the ThirdPersonAnim_BP knows the state of the boolean so it can effect the animation in my state machine...
please help XD
Read the error on the cast node. It is telling you there is no input to it.
BTW I am actually asking what I need to plug into the object on the cast, because I think that will make it work ?
but unsure what would go there
@long smelt
I am currently trying to learn how to Identify what kind of objects I would be based on what I am casting to
Your variable IsEnteringCold clearly relates to the player, so why are you storing it on the ColdArea?
If you put it on your player, then you have no need to find a random ColdArea in the AnimBP
are you saing I should be able to pull the Variable from the player and I do not actually have to cast to the ColdArea ?
@long smelt ColdArea is an actor that I will place around the map, when the player passes through the collision box which lives in the ColdArea actor BP
it will inform the ThirdPersonAnim_BP and hopefully cause my character the use the shiver animation...
so the variable is in the ColdArea because I created it while using the overlap event
Sorry for any confusion, I am trying to learn how these things work
Think about this as a logic problem. Does it make sense to ask your ColdArea if the player is cold?
Or does it make sense to ask your Player if the player is cold
Could I get some advice on how I should handle this then please,
I need my character to shiver when overlapping the collision box which lives in the ColdArea actor BP
OK just figuring out what that should look like
I'm trying to compare the use cases of Inclusive and Exclusive Blueprint Nativization. I can't see a reason why you would ever use Inclusive over Exclusive. Can anyone explain to me? 😄
@jagged cape Like this ?
tyvm for the tips btw
Someone gave me help on the forum but I'm stuck on a Variable with 2 types (String Array + Actor Class Array). How do you make a Variable with 2 types ?
You could turn it into a struct
On overlap, your cold area should cast the overlapping actor to character, and if it is a character, set cold to true. On end overlap, set it to false. the setup will crap its pants if you have overlapping cold areas but it'll work
That's what a struct is. A type that is made of multiple types
I can't find a way to make one directly into the Details pannel. Is it not possible ?
Is it somehow possible to do this... somehow ?
I have a shiver start, This will be my shiver loop for when the player remains in a cold area.
You going to make it like it's a blueprint or enum.
You want to use a state machine for transitions.
Walk before you run though, do you have is cold being set correctly?
Hey @faint pasture That screen grab is from a state machine
Then just plug is cold into can enter transition
If he's cold he can enter the transition. That's all
I think I do because when I walk into the area the shiver start plays, and when I leav the shiver end plays.
I need it to play the shiver loop in between
And for transitioning out, if not cold, can enter transition.
Shiver loop would be the state that you are in
You have two states, shivering and not shivering. You have two transitions, begin shiver, end shiver
I would never make a transition for begin shiver though, just blend into it
ok @faint pasture thank you so much for all the advice!
you too @jagged cape.
It is going from normal, beginning to shiver > looping > ending shiver...
but when it returns to idle walk/run it remains in the final shiver pose XD
That's a result of however you set up your animation BP. Anyway, shivering should probably be additive.
Unless you want to hand make shiver walk, shiver run, shiver idle, shiver eat, whatever
I tried to blend for the first time today @faint pasture I though I could mix shiver with walk because the legs were not moving when the character shivers...
It didnt work out though because the faster the character walks pushes the blend towards walk and stops the shiver animation...
I thought as much @faint pasture I guess I will have to make the animations for shiver walk etc in blender ?
I would do additively. But it depends on what you're trying to do. If shivering is just a light shake, just make an animation that has a light shake to the bones and then use it as an additive
If you're just getting into animation, you are going way into the deep end.
@faint pasture I am comfortable making animations in blender.
I dont think I am going too mad though, after all.
All I am doing is trying to learn to apply the animations for the starter pack and general animations pack to the default third person character
Well now you have to figure out how to have the same skeleton in blender. I've never done it, I've always used a custom skeleton. But I know it's doable
I can't make struct with Arrays... :/
Ive recently been studying an official unreal addon for blender which manages the skeleton, so I am hoping it should be ok
Sure you can.
@trim matrix you need to make the structure in the content browser just like a blueprint class or an enum
Blueprint struct variables allow you to store different data types that contain related information together.
Oh...
Well it's strange to create this outside my Character Blueprint.
Okay, so I created a Structure with String and Actor Class Arrays.
I try to use it as Variable in my Character BP but it's not showing up as it should.
There's only 1 "Blue" type.
I can't "Break" anything in the Struct itself.
And I can't Break either in my Character BP.
because that looks like a class reference
you want an object reference if it's supposed to hold data
It's Weaponry, not Available Weapons Class Array
oh well, weaponry is an array, so use foreach if you want to iterate over the items
🤦♂️
This is clearly not how it's been explained to me.
I'm struggling about a very simple feature every old school FPS has which is switching between Weapons that have been picked up by the Player (or given at the start of a game).
I have these Variables in my Switching system :
• Weapon Index (Integer), which simply is the current Weapon Index number.
• Available Weapon
well thats a fricking mess xD
my game runs pretty choppy and It seems to be the blueprints.. is there a finer way to see what's taking the most time than stat game?
Profile it to figure out exactly what's eating all your time up
@faint pasture that's what I'm looking for.. How do you profile it?
Google it.
Does anyone know why this prints when ONLY the left bumper is pressed ?
Hmm but I thought it would only print if both were pressed, hence the AND.
Have I got something wrong ?
Hello! How do i make a pawn move to a location on its own? I'm making a cinematic and dont know how i can make a character move to a location during for example 30seconds into the cinematic. Any blueprint nodes i should be using? Thanks in advance!!
Like this @jagged cape ? the key down you spoke of.
Also I still cant seem to make it only print when both are pressed at the same time.
@dapper cradle do you understand how execution flow works?
Still learning, even trying to learn C++ in an attempt to get a grasp on it.
Early in the process though. The white exectition line is essentially the path, executing as it reaches nodes right ?
@faint pasture so that I get to https://docs.unrealengine.com/en-US/TestingAndOptimization/PerformanceAndProfiling/CPU/index.html where it says "stat game", which I did? :>
How to optimize the CPU demands of your game.
@dapper cradle for either input, you need to then check if both buttons are held down, then do whatever you're wanting to do.
So both the left and right button need to initiate it, then you check if both buttons are down, then you proceed
Hey @faint pasture once I used set noed on the released state of the buttons it worked as intended
is it possible to mark input params in blueprint function library as world context object?
like meta=(WorldContext="WorldContextObject", CallableWithoutWorldContext) in C++?
the WCO param keeps confusing out scripters since it seems like it can take an asset while it cant 😄
hi guys im trying to connect the outhits from multilinetraceforobjects to break hit result but it won't let me. Please help
Altight ile try that thank you
i have a widget that shows up when i walk up to a gun and its supposed to go away when you walk away from it. but its not working. isnt this how you would destroy the widget.
the widget might be spawned by the comp, so you might have to also destroy the widget
but better solution would be to always have the widget and only collapse the visibility
since create and destroy component is quite expensive
how would you set visibility
Hi, help me out with some advice.
I change one character for another, but they each have a different life scale, how can I make the life scale stay the same when I change the character? Where do I write the intermediate option?
noob question, whats the object ref thats suposed to go here? the flag base is just a static mesh actor not a player and get owner doesnt work
"Noob Question" but really freaking hard to answer to a Beginner.
Casting checks the Type of an Object. It only succeeds if you cast to either the exact class of the Object or a parent class of it.
Get pawn?
An "Object" is an Instance of a Class. So e.g. a Spawned Actor.
isnt pawn = player actor?
Yeah
You need a reference to the Actor in your Scene
"How do I get that?"
Good question!
😆
Since i don't have any up-to-date resources
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
Watch this
There are a couple of ways to get references to Actors, not all are pre-placed, not all have accessors like the Pawns or Controllers.
You can keep references of spawned actors where you spawned them and access them through that, you can line trace, you can do overlaps, etc.
And you can 100% avoid using "GetAllActorsOfClass", cause that's the worst practice (+-)
hmm i think i have a reference in my player character bp but i might be worng
A Variable of type "FlagBase" is not a reference. In case you have that.
You can save a reference into it. It's more or less a labeled, filtered, container
i have these variable in my player bp that are set as flag base and i used to check which team owns its base
Like having a box in real life, labeled "Weapons" and you can throw Guns, Swords, etc. into it (but only one at a time)
i didnt even had time to finish lul
If you spawn the Flag runtime, you can save it into that variable
Or if you trace it or overlap it
But if it's in your level, then you first need to "find" it, so check the video pls
aye ill do that ty
right now i just spawned it in the level by hand to test it but i want to set it up to randomly spawn(guess ill be doing that from gamemode/ map blueprint?
err, if you have a blueprint with a variable of a given type, and a different blueprint with another variable of the same name and type, are they functionally the same variable?
I didn't think they were but somehow induced an issue in my project yesterday and all I can think of is that I might have sped past some References that it was checking when I changed a variable type or something..
I have a problem with aircraft controls going crazy sometimes.
see video here:
#legacy-physics message
My guess is that the system lags and applies the force from wrong location. See illustration.
- as it is supposed to. 2. the location is lagging and using past location causing a rotating torque.
Setup is quite simple:
The pitch and roll setup could be the cause too. It is here:
Here an illustration of how pitch and roll are applied (the blueprint above does this)
so to fake thrust variation of 4 motors this is used. The location of the force (F) is offset based on X and Y input. Also the amount of F is based on the length of X + Y vectors.
TLDR:
Does it seem likely that the way the BP reads the "get world location" could be running behind for some reason?
@raw dew did you find a solution?
i looked at that video but i havent found or understood what i had to do to get that in my widget
so imma do a sneaky and in stead of displaying the name of the carrier ill just have it set to "red team has your flag" 😆
ill add some sort of flag visual on the character when he picks up the flag in stead or change its color
should i call that in the widget to get the ref for it?
isnt get all actors of class quite demanding tho?
please help, why this timer doesn't work? rate of fire variable > 0 and Shoot custom event works properly
lol, nvm, after collapsing/expanding ue it started to work =\
hmm so i did that but for some reason only the server sees the name, the client from the same team doesnt
Because you will try to have a variable from your character found in capsule overlap))))
from player character player name i promoted that to a variable and set it there
so what im trying to achieve there is getting the name of the guy that overlaped(took the flag)
1 pictures is FlagBase code?
yes
How many flag base you have in level?
yeah so as it is now, if i steal 1 by 1 seems to be replicating ok but if i steal both in the same time both teams sees the name of the one that steals last
would using set physics max angular velocity be an option? it might help to at least pin point whats going on
I want to make shooting mechanic with random firerate between min/max firerate per min. How can I activate timer once but input different time variables from random float in range after each timer loop?
I could of course limit the glitch like that but it does happen to lesser extents sometimes too. being a VR game it is very easy to feel when it starts to do unwanted manouvers - which can be at totally otherwise acceptable rate of rotation.
but it is a good tip for when I design wanted collision behaviors.
i have a problem with the collider of an character class whose instances are placed in the level,
why does the overlap event start before the playercontroller's hud exists and therefore fails to add the object to an array of targets
the blueprint also has an begin play event that also calls the player controller, but doesnt result in an error
how do i stop the collider from activating too early?
@atomic salmon had to scroll way up to find this message haha. Thanks so much! I've been really wanting to understand what it is I'm doing and why I am using these specific nodes/blueprints etc to do what I'm trying to accomplish. I appreciate your help 🙂
I am trying to build a boolean check to see if the exposed variable has been updated by an external source and if it has then execute a function. But it seems that the Set local variable isn't working. Has anyone else encountered this?
general
for us, level blueprint (the c++ version, the LevelScriptActor) has its uses
and its not to run any logic, its to run PreSave override
find everything that needs to be linked on the level, and set ther eferences
so we don't have to search for stuff at runtime
got a good tip on the physics channel
#legacy-physics message
Hi, could someone help me get a real-time read of this value? Everything I tried so far only gives me "5" instead of a countdown from 5 to 0. I'm printing on the tick node
if blueprints can do it
then you'd need to promote the output to variable
and pull time remaining from the timer handle
(not sure if they can or not)
Yes, that's exactly it
thanks! I tried promoting the "time remaining" float value to a variable but then realised it would always give me the "5" that is set when the function is called
I have an actor that is being moved around the scene. I want to be able to switch my current camera view to that actor and still move the camera off the actor. Should I attach the firstPersonCharacter to my actor of interest or add a pawn and camera component to the actor of interest?
What is the use of the return value/ what does it return?
A reference to the actor you've spawned.
ah ok. so in this case Vortex particle
More specific - the exact copy of the Vortex particle you've spawned.
ok, thanks
A reference lets you get data or manipulate that spawned actor from another BP
The blanket term for that is "BP communication"
Hi peeps, I've been working on this flipbook animation and was wondering if I can get any direction on how to call using switch on enums atm I am struggling to get a functioning animation state machine working for my Idle, walking and sprinting flipbooks. A the moment only walking with velocity is currently working its an FPS type of game! thank you here are some of the blueprint I'm working on
How can I make an action occur if you spam a key a certain number of times?
@trim matrix You can increment a counter every time the key is pressed, then trigger your action when the counter reaches a certain value
How to cast to another blueprint actor from blueprint actor?
Here's how I think I'd do it (untested)
@dawn gazelle That seems like a pretty elegant solution to the time-bounding thing. I was thinking it would require much more code
Thanks @keen goblet and @dawn gazelle
much appreciated
How to cast from another blueprint actor from another blueprint actor? get all actors of class dont work.
@trim matrix I'm not sure what you mean
MY charBP wants to change ProjectileBPs variable.
What do i put in to the object pin?
From BP I want to cast to another BP
Does your character BP have a reference to the projectile in question?
It has the variable, but does it ever set that variable to a valid ProjectileBP ref?
That's a horrible way to handle getting a projectile. If your player is spawning the projectile, you get a reference to said projectile when you're spawning it.
GameplayTagContainers cannot be looped over in blueprint? 🤔
Derp
I can break it
Then I get an array 😄
Ok thanks for help, didnt really answer my question though.
That did not work @dawn gazelle
You're trying to change something on your projectile from your character, yes?
yes
can someone help me about this?
So you're spawning the projectile on your character, right?
Yes and also from somewhere else too
Ok, then whenever you're spawning the projectile, you get a "Return Value" on the spawn node. This is the reference to your projectile. With it, you can change variables on the projectile, and it will be the appropriate object reference type of the thing being spawned, so no casting is required.
yes but howabout without that
how can i cast to another bp?
from a bp that doesnt shoot it
nvm it did work
You need to get a reference to the object somehow. Whether that be on overlap, or a line trace, or something.
Using "get all actors of class" is really bad, as what it is really doing is getting all actors in the world, then it iterates every single one of them to check if it is the appropriate class.
Look, Im trying to set the projectiles damage from firstly from a character
the more u hold button
the more damage
so i cant use that spawn actor cus its too late already
I need to have a projectiles reference on begin play preferably
So then create an exposed variable on the projectile, then you can feed in the value.
howd u do that?
ahhhh
that is so good
Thanks a lot
Very helpful indeed
👍
But i get my damage from a timeline...
can i just create a variable from that
and set it
Yep
Casting is when you're attempting to convert a reference to a more specific object class. For example, here I have ActorBeginOverlap, and it returns a generic "Actor" reference. The "Actor" object type does have a lot of useful information, but doesn't include any details you may have created in your own blueprints.
wow that expose thing made so many other stuff easier!
But if I successfully cast, I can get specifics from the class, like the damage.
Yeah but its weird I cant cast from another bp to another bp
even if i make references, or get all actors of class
always would just fail
I dont understand that part.
Were you possibly trying to connect an array to the cast?
And again, Getting All Actors of Class returns the specific object type, so no casting is required.
Well, you're not very clear on what did not work for you. You're saying "Casting" didn't work, but casting doesn't make sense in this context as you wouldn't need to cast.
the get all actors
i got the actor out and then the event i tried to reach would not fire
from the get all actors class gotten event
usually it works like a charm
most likely due to something else
when you hover over the output pin like in daturas screenshot, does it show the correct class?
Yes.
hmm
can it be that the fault lies in that it starts from my char event tick
I do put do once to it
before get all actors
i made again a simple get all actors of class and then just random event with print and it wont print
Don't do Get All Actors of Class on tick.
well, without seeing your blueprint that could go endless here
k
im pretty sure its event ticks fault
even if i put delay and do once
maybe a safeguard or something
well, if it errors with accessed none, then it doesn't find any actor of that class
are you sure that you picked the correct class and that the actor exists in the world?
spawn an actor of that class 😄
ok
what are you even trying to do?
i got the feeling that you are doing something that you shouldnt do
@south jay why?
i have 120fps on shitty computer
yes i need to get a characters speed
etc.
@spark steppe so I cant change bps variables while they are in the content browser?
from another bp
no
not in any way?
you can only change them on actors that are in the world
ok
you can expose variable as expose on spawn to setup some variables when you spawn the actor
indeed, now get rid of your 12 slot sequence 😄
because you got told by 3 people now?!
is it good if its only 7?
How do i get my speed?
Ideally you want to avoid tick if you can. UE4 is event driven, and most things can be read at the time you require it. There are times where tick makes sense to use like if you need to have something rapidly update.
why the tick hate my project goes 120 on fps
yes i need my characters speed updated on the screen all the time
yea most projects do in an empty map, with one or two actors
then why is it even in the character logic, and not in the UMG logic?
it feeds it to umg ofc
also for reading speed, you don't need 7 step sequence, so theres probably more going on
yeah there is a movable sensor around my char also
and stuff
my character moves about from 0 to 40.000 units/s in levels so im pretty sure i need tick a bit more
completed finished levels run on 120 fps so i dont understand the hate. yeah i could maybe take one or just enough setting up two away.
Yeah not viable in my case from anim bps
welp thanks for the expose thing
very helpful indeed
the problem is that you are adopting bad practice, which will sum up depending on your project size
cause my char is doing also something that is not an animation
for example turning into a ball
so its just too much
Don't go from UI widget to animation blueprint, just go from UI widget, and get the velocity of the owner's posessed pawn
yep thats how i do
gta has bad optimization for their game loading which was lately proofed, but what are 5mins of load time? well with 125M gta copies, it's 2TW of energy wasted if everyone started the game only once, which is ~2 hours of a nuclear plant running
shit sums up
My game loads fine and im always aiming for 120fps dont know what bad practice
Hell I think until you have dozens and dozens of binds, just bind the widget data to speed or whatever. It'll be performant enough and not shit up the actor tick
Also i hear not to even use binds if u can
It's about the same as using tick 😛
yep
yea as said, the UMG widget should pull the speed, and as said it's probably the less worst part of his onTick stuff
It's really not a big deal. And the fact is, if something needs to update every frame, something is ticking somewhere. All the circle jerking about not using tick is not helpful at all.
ADRIEL THANK YOU
it is
--> im going to develop go have fun about tick
It's about what is being done on tick that matters.
but whatever, let him do everything onTick without questioning it
have fun debugging your mess 😄
But yes, your actor tick should be clean and only doing things of the actor needs to update every frame. For example, so you had a AI controlled instance of that pawn, then you need to have all sorts of logic to not be updating the UI in that case. That is why your UI update should not be in the pawn.
i mean it just stores a variable?
does the umg care where it gets the variable?
my is just my own character not using AI
@trim matrix you're just going speed = getspeed():
?
That's totally unnecessary unless you were going to be using speed a million times later in the tick. I do stuff like that for one of my projects because I am running a tire model sim but that's a totally different level.
I would just do all that in the umg widget and not even have the pawn do anything. But it's really all the same, this argument's over like 2 microseconds. I would begin clean and keep it clean though, a year from now you're going to have a spaghetti mess if things just keep getting slapped together all haphazard
the "get speed" thing wasnt about execution time but about codeflow logic
oh its that part only. 😄 event tick is really the place where i add and take away stuff
i try to use a lot of timelines
good that you add timelines to the tick load 😄
which are ticks too i guess but not all the time
Is it better to make a BP to procedurally place trees across a landscape at different heights, or just place it via foilage tool?
It all depends. Does it need to happen it at run time?
@trim matrix foliage placing uses instanced meshes if im not wrong, so foliage should be preferred
yes @faint pasture
Static Meshes placed with Foliage Edit Mode are automatically grouped together into batches that are rendered using hardware instancing where many instances can be rendered with only a single draw call
and that means?
Also I see your Bendy profile picture, you know a new game is coming right?
well, the story was better than the actual game 😄
lets move to lounge
So i want to make a system so when you stand in a box trigger a widget appears and on that widget there are two images (which i want to be random) is it possible for them to be randomly generated each time you enter the level? And add events if you click on the image?
For example when i enter the level a sword is there the other time a bow is there
Do you want the widgets to appear in your UI or the world?
UI
wouldn't it be sufficient to randomize when the UI opens?
or should it be the same image if you run into the trigger twice
It should be the same image if i run into the trigger twice in the same run yes
You'll want to make a widget that spawns the item selection window, and maybe another widget for each item selection card. have this all be data driven so when you enter the box, it calls a function on your player controller telling it what the options are and the player controller can forward it to the widget
So something like Event Show Selection (ItemArray)
then a pseudo-rng would be your best bet i guess
Seems really complex but i'll try anyways
something like (systemtime - gamerunningtime) % numberOfOptions
I mean it depends on what your end goal is and how flexible you need the system to be
If you're trying to make a generic take item from box system, they'll take a bit more designing than a one-off widget that just gives you two random selections.
I am making a game where there are 4 players that spawn on each side and 5 chests the inventory of the chest should be random for everytime i enter the level
So what you should do is make a chest actor that is given its items at spawn, make the UI system to show what is in the chest and handle spawning the item when you select one, and then just at begin play, have the game mode tell the chests what items they have
Just make sure to keep things modular and simple. UI shows what it is told, chest contains what it is told, game mode tells chest what it has
I don't know if i will be good enough to make this kinda system cause i am kinda new
or let the chest decide on spawn what it contains
You could also just add begin play, have the chest give itself items but you got to make sure that it only happens on the server
If your new, start with a chest with one item that spits it out when you walk up to it, no UI at all. Make sure you got that working 100% perfect and understand how something like this would work in a multiplayer setting
Anyone have thoughts on setting up Paragon style Distance Matching, and Speed Warping to prevent foot slip? (the animation channel here is a ghost town) 😂 The livesteams leave out these features in their HowTo.
Should this be random? Or should i just make it so it drops 1 item?
Both. 1 random item.
Basically what's supposed to happen is that when a player goes in the box trigger, the animation blueprint of his character should change
Dont worry bout that yet, 1 thing at a time.
But the animation blueprint is the item
I got that working now but it isn't random yet
I got this working now it's random too https://gyazo.com/cb8821e2e513b8456e6e97ed9f71201b
Hello all. Having a problem with a character blueprint that involves rInterp'ing the camera based on a root scene component that the First Person Mesh gets parented to.
I did not encounter this issue at high framerates but , after importing to a level with scenery that tanks my FPS, i am noticing the issues in my approach.
The issue is that I get this really choppy/jittery effect at low framerates. Obviously, one expects this to some degree but pay close attention to the arm in the following video. You can see it jerking left/right very quickly as I rotate. I did not get this effect at high framerates.
Been banging my head on the wall for this for the past couple days, any insight would be super helpful!!! (A video and pics are incoming in my next message)
Notice the jittery movement on the arms. It is hard to see in the video, unfortunately, but it's clear as day while playing. It feels like little micro jitters.
This is where I set up the scene component that's the root for my FP mesh:
This is the actual code where I am doing the rotation interpolation. I feel like something is wrong here even though it looks fine to me and operates exactly as expected at high framerates... :
Does anyone know how to make it when a specific item is destroyed, the player gets a point? I want to make it so that whenever one of the boxes that are part of the default shooting game is deleted (most likely due to the box being deleted by the destroy-plane outside of the room) but not the enemies attacking the player, the player gets a point, and the goal of the game is to shoot the boxes out of the arena before the enemies kill you.
It'll be a lot easier to have the point logic be a triggered thing then trying to figure out when the box gets destroyed. That would be actually pretty hard unless there's some sort of event for pending destroy that I don't know about
Alright, then is there something that detects when the item is destroyed, or would that have to be a custom event?
Surely the item itself can just make that call right? What's the condition for being destroyed, just knocked off a platform? Or health?
the trigger that destroys the blocks is the "killbox" that is found by default in the Shooter Game start-up. you can create one right now and shoot a box out of the ring to see what I mean
Actually, do you know if the killnbox has a script attached to it? if yes, how can you access it?
I have a BP that spawns niagara systems into an array. I call the Niagara Systems Rings in this example, the BP that makes an array of Rings is called a Stack.
I then have BP called ROOT that Spawns Actor of Class BP_Stack instances to an Array. I want to then access the individual "Ring" niagara systems held in any of the Stack instances I wish. I am not certain how to write that. This is what I am asking for help with thank you !
always use a loop
Is there any way to, from inside an object that is being destroyed, have a blueprint command that does something when it is destroyed?
(ex. when the item is destroyed by going out-of-bounds, the player gets a point)
Event Destroyed
Hello guys, a beginner here, tried to do a camera that center itself on a character while I do right click on the said character, I don't want it to "teleport" instantely on the character. So basically what I've done is a Lerp, but the camera goes "berserk" and go...far far away. Could someone tell me where I did errors in my BP ?
No where in ur bp is there call to the camera.
The position of the camera is taken with the sphere (we're inside the pawn here, that is done with a camera attached to a spring arm attached to a sphere. There is the reference to the sphere in the bottom of the BP). Maybe do you have a better option than what I've done ?
Ohhh sphere...ok
@dawn gazelle i bet your project has many for loops going on
@sly sonnet looks good to me.. ur sphere should be moving there
I have a simple question , couldn’t find an answer
How can i make a touch gesture based photo viewer (zoom in/out /pan) swipe to change
Should i use widgets or 3d mesh
It does If I don't do the lerp thing, but If I do it, it goes crazy.
Ok so that's working for the sphere, but now, only the sphere is going there, not the spring arm and the camera...Hmmmm 😄
Ok it was not properly attached.
Now it does like before, camera goes berserk etc
I think, maybe it's a thing with collision ?
Move the entire charactermaster ?
Why only moving just the sphere?
Turn off Physic and Collisin. See if it wigs out
Check out Interpolate instead of Lerp also.
Ur hit returned none
thing that is weird is that it does go on the right place, and if I move slightly the camera while it's in "berserk mode" it appears magically at the right place.
lemme try it
hey guys, quick question ... is the Water System in 4.26 allow to make falling water ?
what are good values for FinterpTo for a smooth transition between F 50 to F 100?
it either snaps or it never goes through
So I have ALS, and I'm trying to create a system that disables mantling on certain objects.
I have a static mesh object reference array containing the objects I don't want people climbing on, how would I go about "rejecting" the player to climb on said object if he tried?
This returns the object that the trace hit, but I can't use the data type (hit result structure) with my static mesh object reference array to find said object within the array to then disallow the character from mantling.
I know I'm bad at explaining, sorry
Hey, I have a pretty simple question I hope lol... Well I was wondering about transitional levels and how the built in transitioning works? it has a place for transitional levels within the project settings... what does that mean?
That means when you do seamless travel between two levels, it loads into the transition map first, then unloads the old map, then loads in the new map
With persistent travel, the current level is unloaded, then the new map is loaded, skipping the transition level
Interesting
So it will take the currently level, load transitional level, unload currently level, then load new level, unload transitional level
?
Yep
An overview of how travelling works in multiplayer.
Everything you need to know is there
OpenLevel is persistent travel
Thank you, I appreciate it 😄
Think of interp speed as units per second, so if you wanted it to go from 50 to 100 in 1 second, use 50. Delta time is your tick delta time or whatever interval you’re using
Check if Hit Component is in Disallowed Meshes, assuming Disallowed Meshes is a collection of static mesh components
Not components, actual objects
Unfortunately
So it's a bit more complicated. Which is really annoying
Can you clarify owner appears?
what i did for now is destroying the childs in the main actor in the onDestroyed event
the weird part is that sometimes the childs get destroyed by the owner, sometimes they don't
Generally this is something handled by the engine automatically. If you want to have one actor be destroyed when another does then you could do that in the “owner” actors EndPlay
Hey Guys, Is there an obvious reason this does not work ?
1 Lives on the Actor BP and 2 Lives in the ThirdPersonCharacter BP
1 works.
But 2 does not make the Object visible as I was hoping it would.
Try actor hidden instead? Not entirely sure but maybe this will work for you.
If it's a function/event native to the parent BP (or any of its parents) then override the function/event in the child and have it do nothing, or, if you want to have event tick set up differently for the child, override it and include only what you want in it.
does anyone know any good guides for procedural island generation?
Hello ! Sort of small question today. Is it possible to set the "normals" (like UP vector) of a UUserWidget?
Right now the UP (blue, in editor) is pointing along the surface of the widget, instead of sticking out. This is causing difficulties for handling certain things.
Is it possible to adjust the tilt of the Widget in relation to its normals, instead of just rotating the entire package?
I have the widget placed/rotated where I want it, but the normal is all wrong.
guys do you have any idea why this is giving me problems?
I changed the mesh from the uk-mannequin to a character that i imported from the marketplace
I need to input new values in there or what? if anyone has any idea what the problem might be, please help me out
The error is indicating that those input axis are not defined in your input settings. Go to Edit > Project Settings > under Engine click on Input and look at your Axis Mappings and verify if MoveUp and LookRight are defined.
thanks a lot, I fixed it
any ways to steam components from another bp?
tried this but it's not working because it's reparenting the root of the child bp
even simply detaching them from that actor would be enough
Are those all child actor components?
yeah
Yeah, child actor components are trash. They are not the actors, they are just a component that spawns the actor. What exactly are you trying to do here?
I'm making a debrist system in stages but instead of reading from variables I wanted to read from other premade blueprints because everything is easier to setup that way. The previous system is working but it's a mess to place every new debris piece
so basically that gets spawned instead and then I want to delete it and keep the children @faint pasture
There might be a setting in child actor component to not destroy the spawned actor when the component is destroyed. so you have an actor that spawns all the child actor components, they each spawn their child actor, and then you destroy the first actor, destroying the child actor components, and hopefully there's a setting to where they don't destroy their spawned actors.
Sounds really f****** to me, I don't know why your debris isn't just a part of the original non-broken actor.
I'm guessing this is for something like you have a barrel, and then the barrel gets destroyed and you have barrel pieces? I would just have a barrel mesh, and then the barrel piece meshes, in the same blueprint. By default, the barrel mesh is visible in the piece meshes are hidden. When you destroy it, hide the barrel mesh, unhide the piece meshes, let them simulate physics.
that would be easy to do for one asset but time consuming to make lots of them...
or destroy the childs, which got destroyed...
I guess it's the easy way out though
?
@fallen glade aren't you having to hand make all these debris assets anyway?or have you already made tons of these blueprints that have piles of child actor components? And why are they child actor components, why are they not just mesh components
well, you can despawn parts of a blueprint
each piece contains it's logic to play physics sound and to add itself to instanced static meshes when it goes to sleep, also performance options
In that case just check if there's a setting on child actor component to not destroy the respond actor when the component is removed. But why are you even worried about getting rid of these spawning actors anyway? Your actor count is going to be ridiculous no matter what so just leave them hanging around for a while.
that's why each piece it's his own actor, because it cleans itself up
ah nevermind
you can also call DetachFromActor if you want them to be autonomous
Hi friends, I'm having some difficulty setting up a camera function to move the camera in the opposite direction the mouse is travelling when a key is held down, a drag or pan. This is what I have so far, but the function isn't updating the velocity based on the mouse movement after the first press
Why isn't this working? It is registering that i am in the box trigger but the E-Input doesn't work https://gyazo.com/1c7f464984315c60ba51b0b52bf5bcb5
What blueprint class is this in?
Level bp sorry for answering so late
I also tried the main blueprint of the trigger itself
Hey all,
Anyone know why button presses with print string only work for me when they are in the third person character and do NOT work when I place them in an actor bp ?
I just followed a tutorial to mae an interact button but it doesnt work because of this reason what ever it is, I believe.
Why are you using the level blueprint for that? That doesn't make any sense. Are you the one who was trying to work on chests with random items in them?
Yes
Well you definitely should not need the lower blueprint for that at all. What's your desired effect when the chest is activated, does it just spit something out on the ground?
In a third person template, is it possible to have a button press executed in an actors BP ?
The template doesn't matter. You need to enable input on whatever actor you want to handle the button press
I'm not sure if the player needs to own the actor or not.
Sorry to be a pain but how would I do that ?
Just dig around in the after settings and look for enable input or receive input or something mentioning input.
If it's a button press that is also used in your player controller or pawn, you need to disable consume input on those. Input is basically sent down a chain, and if it is consumed somewhere then it is not forwarded to the next actor in The chain
@faint pasture thank you! you are a hero, I had to enable input in the actor setting.
I have a Chest Open animation which I can play to open the chest, but is there a way I can play it backwards to close?
I'm writing in BP here at the moment...
Should I maybe create a montage? or an anim BP?
I'm a noob at this if anyone can point me in the right direction I'd be grateful 🙏
There is a figure with the chain in https://docs.unrealengine.com/en-US/InteractiveExperiences/Input/index.html which tells the order in which the various components get a chance to consume the event.
The Input object is responsible for converting input from the player into data in a form Actors can understand and make use of.
Thank you @tired saddle !
How Can I make 3 loop back to 1 ?
The goal being that when the player closes the NoteWidget, The ExamineWidget opens back up.
@dapper cradle how many different states is your ui? This might be a good use case for a simple State machine using an enum.
anyone got an idea how to get a bones rotation in actor space within normal bp logic?
Basically a transition is setting the enum to a value, and then based on the value, you hide all widgets and show one
Can't you just Delta the bone rotation and actor rotation?
yea but the bone rotation is relative to its parent
or uhm, what i need is the yaw/pitch with z axis up, while the bone has another upvector
which is my main problem, which my small head cant work around now 😄
I don't know what's available to get from a bone, are you sure the only rotation is relative to its parent? If it is, you might need to traverse the chain of parents until you get to the root
well the relative to parent was a wrong claim
Wait a second, you might be able to use a socket function on a bone. I know you can use a bone as a target for attached to socket so maybe if there's a get socket rotation function, you can give it a bone
my problem is the upvector
you can get socket rotation in world space, but thats all i figured out
No when i start the game i should be able to go up to it with a widget saying f to open and when you press f there should be a button with a image attached to it, and that image should be random and when i press the button there should be a different event for every image. Each one of them should give the current player a different animation bp
You should be able to pretty easily calculate the bone direction then there should be some function to generate a rotation assuming Z up
I think rotation from x-axis is the node you're looking for
oh wait, get socket transform gives the option to define the space
@faint pasture I do not currently have a UI as such, just a widget which pops up with an overlap event asking the player to press X to interact.
That opens up another widget where the player can read a note.
I just wanted the previous widget to be added to the view port again when the player closes the Notewidget (in case they didn't mean to close it, as an example).
so they don't have to actually run back out of the collision box and back in.
Though I am happy to learn about enums and state machines if I need to.
If i should not do an overlap event in the level bp / box trigger bp where should i do it then?
Essentially I would like to do this but I do not know how I would create this loop
I need it to check that the character is still overlapping and display the ExamineWWidget prompt as many times as the player goes back and fourth, until the player is no longer overlapping the collision box
if that makes sense @swift pewter ?
yes
I can try your idea though to see if it works
Thank you @swift pewter for the 'get' tip.
It looks much tidier now.
Can anyone know apex destruction? Because I have a problem setting up object destruction with gun fire
nothing happens when shooting at an object
where i can find it, it comes about the BP of the bullet
Are blueprints capable of creating a child blueprint class in the same way that you would when you right-click on a blueprint and say 'create child blueprint class' ? Or is the only way using an 'asset factory' ?
duplicate asset here will make a copy of the blueprint rather than a child, meaning if i update my parent (template bp) then i'll need to re-generate every copy that was made from it to maintain equivalence...
example use-case, Im making a utility widget that I want to be able to grab all the actors in my scene and wrap them in a blueprint template I have made previously to consolidate control over them. For sake of discussion, its pretty much just a blueprint with a skeletal mesh slot, so my goal is to make a child of the template bp, assign an actor from the scene, kill the actor and replace with the bp (that now has the actor assigned). Ideally I'd have this actually created as an asset in the content browser and not just a spawnable instance in the world
@lapis leaf kinda like a dynamic wrapper? like the replaced actor is effectively a managed child, similar to Child actor component?
aye effectively, but I don't want them all to get added to a single blueprint, I wanted to wrap them each independently and *hope to be able to save them to the content browser as well, but if I've hit a limitation of blueprints then 🤷♂️ so be it
I started going down the road of just using SpawnActor from Class which works but those are instances of the original bp existing in the editor/game world and not saved-children bps based on the original bp
Hi there, I have an issue with texture in the content folder. I'm using those texture as dynamic parameter for material, and it seems that they aren't packaged when I use standalone game ... Only fix I found was to create a dumb texture parameter in my material a reference the textures ...
Does anyone know how to transfer a second player to a different map? I have the listen server host/join all working fine but I would like to carry the host and joined client to another level. Basically create a lobby and transfer all joined players.
Im using Steam advanced sessions
Fun problem to solve...
1 is in the ThirdPersonCharacter.
2 is in an actor I have named NpcActor.
I want to use the NpcActor with a box collision to pass a animation (or anim instance) onto the player character.
Making it so that with a button press (and while remaining still) the player can imitate the NpcActor animation "Blending in" as a kind of stealth gameplay mechanic...
I am slowly working on it. Am I far off ?
Why you getting the player character and not the overlapping actor? that logic and the second screenshot is going to run anytime anything overlaps the overlap box
You want to cast the overlapping actor to the character to check if it is the character, and then proceed
But I wouldn't do it that way at all. I would handle it all in the player character, the NPC doesn't even need to know the player character exists
If you need to be notified prior to pressing the button and whether or not you can mimic someone, then you would do it with overlaps. Otherwise, when you press the button, just do a sphere trace, and select which actor, if any, you want to mimic
Hmm very interesting. I will see what I can do with that information
Thats a cool idea! If a sphere trace was used instead it would would be a one shot, work with all the different npc types situation right ?
and I would have to make a BP for this action with every npc I make..
@lapis leaf there is a prefab plugin, closest thing to what you seem to want
this is a missuse of cast
@sand shore Still learning, not intentionally making a mess XD
The reason why is that the input is already that type.
You see the assignment node just to the right?
You can put the literal class in that node - the set variable node will not allow you to put in a class that doesn't derive from the type
So if that's a YourSpecificActorType Class Reference, you don't need the cast whatsoever
Doubly so, the use of a literal class shouldn't be casted, it won't change at runtime whether it's a derived type
I think you confused which screenshot gets what number as well
Hmm, thank you for the knowledge @sand shore Im going to take a moment to try and suss out what your saying as I do not totally understand some of it
What you'll want to do here, likely, is not swap out the entire animation BP
You could just swap out the base idle sequence/montage/blendspace
If the player starts moving around too quickly, they shouldn't sprint like an NPC
they might be able to stand around, or perhaps walk like NPCs, but sprinting should "break cover"
in this case the actor is just a skeletal mesh with an anim instance, the goal is to have my ThirdPersonCharacter copy its anim instance with a button press.
You aren't exactly far off though - the overlap volume should "push state" onto the character so it can blend in
And the agency to choose to mimic (your input action) is good too - instead of automatic mimicing
I think it might make for a fun mechanic 😋
I'd make a new collision channel for stuff like this - an interactables layer. Either have an overlap component on the pawn dedicated to interactables, or just do a sphere overlap check every N frames along that channel.
But you can put any potentials into an array (even with your current setup), then find the closest actor by distance from that array (pretty sure there's a function shipped with the engine to do so)
If the array is empty, you know you can't interact (mimic, in this case)
and that's fair, it's a lot I'm dumping here
I am very grateful for your time though @sand shore I am going to go over what you said carefully and try to creat something with it.
Hi, I hope everyone is doing well 🙂 I was just wondering if someone could help/point me in the direction of how to make a headbobble like in this dev log. https://www.youtube.com/watch?v=iv_JXPEj8hk&t=308s Thanks :)))
Hey everyone! Welcome to the Game A Month Indie Devlog #3. The game is released, I'm very excited to hit the game a month deadline and have a finished game for you all to play.
In this video I go over some of the challenges of creating a game a month, changes I've made to the game and what I'm going to do differently next month. I hope you all...
@sand shore I actually haven't heard of that channel 😅
Gotta love windows, being unable to keep up with it's own internal logic and lagging to such an extent that it put those green pixels all the way down there
Cheers msft!
haha thank you, Looks like there is some gold in there, ill check it out!
How can I manually rotate character? GetWorldRotation returns nice values when I rotate character by mouse input but if I need to set it rotation in a function looks like it doesn't work, GetWorldRotation returns new value but in really connected first persion camera stay at previous angle
I'm trying to predict the path of a physics pawn that has it's movement influenced by several objects along it's path (a spaceship moving around planets) can anyone point me to any resources or pointers in general?
I'm of course continuing my research but perhaps it's something other devs have tackled.
Are you trying to predict the result of the physics engine handling the movement or are you doing your own physics?
predicting the result of the physics engine
I have a player pawn which I can move around the level, it's movement is influenced by the gravity of nearby planets (gravity being simulated by applying force over time towards the planet).
I have a value that may be negative or positive, after some math with it I need to clamp it to 0 as MIN value IF it is > 0 or to 0 as MAX value IF it is < 0, how can I do that?
I think
that just gives you 0 every time right?
if it's greater than zero ... pick the smallest value (0, X)
it'd the right set of nodes, just inverted
Maybe I interpreted the problem differently? I came up with this for FunApple's question:
I interpreted it as clamping the sign of the value, such that it cannot cross 0 as a result of the calculation - with no other clamping besides
Min and Max are the correct functions, but their names are easy to confuse
If you are enforcing a minimum boundary, you need Max (you pass the lower bound, and the value. You get back the larger number)
Can i deform , bend a static mesh in unreal?
I think this might be animation question
Hello, I exported this conveyor I made from blender into UE4 and I would like to animate it so that the pins all can roll as if its "pushing" the object on top. However the problem is, is when I rotate each one relatively, they rotate from the center of the model, how do I set it so it rotates among itself?
Ohh
Do u think material is better for performance than morphing
I am scratching head about how will i do it through material
Maybe using this texture as offset?
I right clicked one of the pins and selected set origin to geometry and imported but same result.
When you export the pin, move it to the origin. Ue4 uses the world origin as an object’s pivot
You mean.. an ad which runs on ue4?
because I've been struggling for a week and I can't make them work
an ad which runs on a mobile game (android)
ah :D sorry no idea on that, was just wondering
Could you explain what you need a little more? If a number is > 0 then there’s never a need to clamp it above zero because it’s already > 0
simple ad, I'm not talking about the ones with rewards, I don't think they are supported by the default blueprints in the engine
@sand shore i'll check out that plugin, thanks 🙂 otherwise probably dipping into python for this bit, no time like the present eh? thanks for the response 👍
displaying an ad using admob
that, is a joke, it doesn't work 😦
i've searched a lot, through documentation and on forum
does anyone know how to make sliders in widgets save their position when changed
right so how does this work
?
I haven't done much with saving either but I believe you need a Utility widget that just contains empty variables for the data you want to save, and then you write values to it using a create save game object node and save game to slot node, then i think there's a load game from slot you can use to fish the values back out of it
the widget you can make by doing a new blueprint and searching 'save game', and using that as the parent
that's the one that would just have variables for the most part, sorta like this -
then your game mode or level bp can manipulate / store / read those values using the nodes mentioned above,
so i would make a new widget with these variables on like format setup?
you'd make it in the editor
right click in the content browser, Blueprint Class, select 'SaveGame' from the list
your widget needs the nodes down in the third image, but with whatever values you're trying to save
i put them in the nodes in the event construct right
and you'll then need a separate set of logic using the load game from slot to pull the saved value back out
you'll want the Load logic in the construct
ok
and will probably want to have it branch, like, if game slot is valid / if variable has data, then use it, otherwise use some default value, sorta thing
probably where i'd start, but again, haven't done this much myself so hopefully it works for your purposes
Im having a odd issue where When playing as a listen server when walking backwards my characters legs go from left to right but when playing standalone there perfectly fine any ideas?
Does anyone know if either teleport or move to location actually teleports de actor?
I'm using them to teleport across the map
But my actor is setting off overlap events throughout his teleport
which means it's not teleporting, it's moving it across the map really quickly
Show your teleport node
And are you 100% sure neither the start or end location are inside any of the overlap colliders youre talking about?
I'm using the Steam Workshop Accessor plugin and one of the nodes here is asking me to "set it in query params". Not sure what that means? Does anyone know?
Ping me if anyone knows. I need to know the definition ❤️ 😂
Hey I'm very new to unreal, is there a cleaner way to do something like this?
I'm trying to call a function on my gamemode with different parameters based on which button you click.
On the button presses you could set a variable for the particular "move" (rock paper or scissors) then have them all connect into the cast and have only one call to the input move instead of 3 as you can then use the variable to feed into the "move" pin.
That is true.
However, I would have a variable in my blueprint that isn't used by anything outside of this.
I can't see how to make a variable that's locally contained anyway.
Well, then you could create a function that takes the move as an input.
And that function contains the cast & the call to input move.
Make it even more fancy by including the boolean on the input as well.
I see, that seems like a decent idea, would keep it a lot cleaner. Thanks
I think even better would be to make a BPI function for the game mode. Then all that's needed is the message to it and the function being implemented in the game mode, no casting required.
Well I would usually use a variable that is local to the function in this kind of case, but I think the event graph linking multiple events is throwing my brain for a loop since I'm used to scripting.
Hey guys, Is it possible to create something like in blueprints using struct, or i have to create an object to do this
Should be possible in Struct.
Yeah that's what I'll do for now (function).
I also got some other takeaways so thanks for the help.
Can maybe try wrap it inside another struct in BP. Not sure if that gets past this
ugly too, C++ way to go
@fervent temple if that didn't do it, i think you're close, i think you just want to make sure the 'save game class' in your create save game object node is the same saveGame widget class you are casting to to get that value back after your load game from slot . So if 'Slider_Save' is the name of your saveGame widget class, then you should cast to Slider_Save to get your saved "Music" variable
so I'm having a problem with Event component when it comes to physics object colliding with a certain collision mesh.
I called an On Event Hit so that when the ball collides with a certain part of the slingshot, it will give me the index number of that collision. What I keep getting no matter where the ball collides with the slingshot is a "-1"
like this^ ?
In order to verify if the collision meshes are existent in the slingshot I used a MultiBoxTracerForObjects node to draw a box around the slingshot to detect meshes of object type "WorldDynamic". It found 2 (also @atomic salmon this is an update to the prev 2 pics I've shown to you in dm).
I also debug the BoxTracer and hover over Hit and found elements with index 0 and 1
Are you casting to a Widget?
yes to my audio widget
Won't work
any reason why my open level would be opening my starting level when clicking a button in widget? its spelt correctly and works fine in the editor but packaging just messes it all up.
You need to cast to a SaveGame Object
^ aye, you dont need to change the name of the save slots
the class you cast to needs to match the class of your saveGame widget
Furthermore, I've enabled "Multi Body Overlap" but I still get "-1"
alright did that
now pull off that 'as slider save' to get your music variable
doesnt work
open your sliderSave widget
have you made the variable in there?
Imagine it as a permanent container for a value
Oh
to the the as slider save
Of coruse it doesn't
That one requires the Widget ref
Delete and use the SaveGame one
im working inside the widgets event graph
Recreate basically
If i use the disable input node, is there a way to disable everything apart from one key?
you want to use
You're basically trying to access the Widget Music with SaveGame Reference
'music' from the saveGame to set CurrentMusicVolume in your contorl widget
Not really sure what's going on tbh
you should have a 'CurrentMusicVolume' in your main widget, and a 'savedVolume' in your saveGame widget
no i dont think so
That does nothing tho
you got it backwards
You need to access the Variable to set from the SaveGame if you want it set in the Widget
browse to your sliderSave widget and open it up and screenshot your variables from there
ive been working in the slider save widget the whole time. is that the problem?
yeah
If you want to set a Widget Variable from a SaveGame process is
Load it, Cast to your custom class, Get the value you need from it and Set the corresponding value in the Widget
the save widget should literally just have variables and nothing else
main widget? I only have a widget with the audio
your UI bp
i dont have one?
