#blueprint
1 messages · Page 64 of 1
how in the world do you get the enhanced input system to rotate the players capsule?
the code works great for all other components, but for some reason the capsule is being stubborn
any ideas?
You don’t rotate the capsule, it’s immovable
You rotate the character itself or the controller
new problem, how does one increase movement speed of a pawn?
I’m sure there’s settings on the floating pawn movement component
theres max speed but thats just max.
my inputs are from -1 to -1
increasing them with a multiplier does not change them
Is there an acceleration or velocity ?
theres acceleration, but i was under the impression that was just for how quickly the player reaches top speed
Yeah that’s prly right
Are you trying to make a vehicle of sorts?
Vehicle movement comp has gradual acceleration and deceleration iirc
its as if my inputs at a value of 1 is corresponding to a hard coded speed of moving the character.
character moves at input value of 1, ok..... what in the world is that speed?
also its just a camera for a strategy game
Ok so for a puzzle in my game, I want it open a door after 4 houes have passed.. but I want it to be 4 hour ACCORDING to your system clock. So I've been using the "Now" nodes and comparing them. The reason I want to use the system clock like that, is the solution to the puzzle is to have them change their clock 4 hours into the future. But the problem is, if its 10:000, its adding +4 to that , which is 2:00 but since 2 is less than 10, the door instantly unlocks. should i be using UTC or something? https://gyazo.com/1ed85e831282b33858fbb8d4543fac85 https://gyazo.com/8d9d897651bbd20c8779a4c0a9ef5386
Is there a way to make a (not correct phrasing so dont take it as face value) "copy" of bp class object (lets say its a base class object you made) and then when doing spawn actor from class, modify that "copy" in-line before you spawn acto
Ah, just add movement input
Then multiply it by whatever you need to get that speed
that doesnt work unfortunetely
any value past 1 doesnt seem to do anything
You can expose certain variables
Show code
I know how to do it after. But is there a way to make a ref to a class, modify values for that instance, then spawn actor by that modified class
I didn’t say after
If you expose those variables, then on the spawn actor node you will get those pins
could I have some assistance answering my question please?
For #multiplayer ask there it’s your best bet
Thanks bro
Max speed is 10x default, movement scale on inputs is 500x
yet no difference in speed
And also no, get player controller 0 should almost never be used in multiplayer context.
this is because the inputs deal with floats between -1 and 1
so anything above 1 doesnt do anythnig apparently
it still triggers with a listen server tho which confuses me XD
There’s a compendium pinned in that channel that might help
in #multiplayer right?
I can’t check my project rn, but also debug to see what values are coming through
when w is pressed its 1
this is how enhanced inputs work
I meant your end values
the value of 1 in the enhanced input system has a speed associated with a value of 1 and I cant figure out where that variable is hidding
end values are 500
you would expect that a value of 1 at 5000 max speed out be different than a value of 1 at 750000 max speed
but its not.
the movement input is adding like a constant value throughout the function regardless of any increase past 1
the movement input is like "ok we have a value of 1, thats a full input right there, so were moving now"
ok great...... moving at what speed?
if someone in this discord can get a pawn with a movement component to move faster than default
I'll give you 5 bicks
beause its not possible.
welcome to unreal engine, where you can change how fast a player can move a pawn...............
Does anyone know how I could set my static mesh components static mesh object from here?
or do I need to expose something else
cant you just drag off the pin and set the static mesh?
blue pin is an object reference
on the left
this is pre-generation
unattached on left is model ref
Item Mesh is the classes Item Mesh component
Static Mesh Component*
you want to set a static mesh components static mesh before it exists?
thats essentially what that would mean.
you would need to store a component in memory with a reference but not have it actaully create fully, that would probably require 500IQ C++ brain knowledge.
you cant set a components data unless it exists.
(is this being asked becasue of a fear that components will look wrong for a split second before they actaully change to their real desired static mesh?)
You're right. I was changing it as we were talking
To expose a var to use instead, and set it on beginplay or whatever
where should I put logic that should be there throughout the entire game, even when changing levels?
I know game instance is one
but can I do a player controller?
does that persist between levels?
(im doing a single player game)
hey so, for some reason, an attack I am working on doesn't work when spawned by an enemy, but works perfectly fine when I place it in the world.
it's a ball that drops to the floor and explodes. But for some reason, it doesn't move anymore when the enemy spawns it. I tried disabling all colliders, destroying the creator as soon as the projectile spawns (in case it was some how getting caught on the ball), spawned the ball outside the enemy's collider. Nothing's working
I don't really know what to show with coding, since by all accounts, nothing should be affecting the movement anymore outside of this event
Considering I have an RTS project where I make the camera move faster when shift is pressed, it’s certainly possible
Try using Enable Input on Begin Play, I doubt that should affect that node but worth a shot. And if not, show spawn code
4000 accel with 120k max means you'll hit max speed in 30 seconds
Probably not what you want
Could someone please help me with this?
Hello.
I am wondering if there are two ways I can come up with to implement the gimmick of dying when hit by thorns.
1,cast it on the player and judge.
2,get player pawn to get the player and judge
In this case, would the second method be lighter?
Also, are there any disadvantages?
How are you getting the reference in the first method and what the hell does Google translate mean by “judge”
Lighter is irrelevant here tho you probably want to use interface or inheritance depending on the complexity of the game
Tldr. If u have multiple types of things that can get damaged and they dont necessary share the same base class, then use intercace.
Eg a barrel may be damageable but dont neccessrily inherit from the base enemy class.
Not many people will be compelled to fix an entire system.
I took a glance and the code is not something i can have in my project. You r pretty much hard coding the click on button to specific task.
A better approach would be to make the purchase button ambigious. It should work with what ever data is passed, eg wether buying a bed or a wall
You're right, that's why I've continued to do a little debugging, and when I print the price, it says the price is 0, so it doesnt get the price correctly, I think thats the problem
Thats not even the problem i mentioned but if your price say 0 well then thats another one on the list to fix
Big problem that i see is you are making the click button tied to a specific task(buying the bed)
This isnt scaleable
If u want to make building system you should learn how to use array, data table/data assets
And struct
Quick question: If I have a function in a parent blueprint, can I then easily call that function in its child blueprint?
Yes the child is already the parent class as well.
Just r-click and in the box type out the function you want to use, it should show up
Hello. How can I get a bounding box (square) that rotates with the mesh? (Not axis aligned bounding box ABB) I want to cast a box trace in the shape of the bounding box with a slight leeway (inner push) to check for construction collision in my building system. Can't seem to figure it out. 😦
Ok nvm found it. Had to store the box extent instead of reusing it every frame.
My common UI variables are disappearing every time I restart the editor. Any idea why? I was able to consistently reproduce this and have no idea why its happening. I am saving/compiling my blueprints. Is it some sort of loading order issue with the plugin?
If that's your guess, have you check the loading phase of the plugin?
What is a good way to have some arcade-y hover physics?
I tried using hover components, which work, but it's gliding too much.
I watched a video about someone creating a game about hover racer (which I don't do, my game has hover vehicles but the game is not a racing game) and they said about using barycentric coordinates to get the normal, so the vehicle would be able to hover on any surface and rotate the correct way.
I tried doing that but it's not stable enough.
Does someone have an idea how to have it somewhat stable? Using a collision below the vehicle might be viable, but I don't like the feeling of it. It also looks pretty bad.
a Spring Arm with lag ?
hmm Ill attempt it. I dont think I had the right verbage in my search queries Thanks
Any friction settings available?
dude theres no way, I have those same values and there is no diference
I calculate the compression, the dampening and the stiffness, if that helps.
It's usually the values such as friction that would affect stability
So I'm still having the same issue from last night - where I have an enemy attack by dropping a ball that collides with the ground, but for some reason the ball doesn't want to move when it's spawned, but DOES move when I manually place the ball into the game world - from what I understand, the issue is with the FloatingPawnMovement as when I made a test object, which only had the floating pawn movement and an object with no collisions as a visual representation, it had the same behavior as the ball attack - it will drop just fine when manually placed into the world, but not move when spawned in by my enemy (who also was not affecting the test object in any way other than spawning it).
Is there some king of bug with FloatingPawnMovement? And is there some other way I can get my attack to move and collide with the ground, without using gravity (as I want complete control over how fast it moves).
*Oh and I did try ProjectileMovement, which mostly had the same results - gravity affected the ball, but when I disabled that, the attack wouldn't move anymore
**Alternatively, I could make the attack a child actor, but I don't have any idea on how to access a child actor's variables (so the attack knows it belongs to the enemy, and the enemy can respawn the attack and adjust its speed), as the attack works fine when it's a child actor of the enemy, but I need the enemy to access its variables
@fervent breach If your Ball is a Pawn, then it probably has the Setting for creating an AIController set to only when placed
It's a dropdown in the Pawn itself
And the FloatingPawnMovement might check if the Pawn is properly possessed before moving
Just an idea though
yep, that was the issue, thanks a lot this whole problem was driving me insane
Iam trying to make a puzzle: the player need to control the character when the player in pause screen. I got everything works except mouse movement (player look ). I wanted to use mouse for player look (2Dxy) and Ui control at the same time.
when i using “input mode game and ui” - I can’t control the player look
when i using “input game only”- I can’t use the ui buttons.
is there a way to do this?
I want to click and drag this cube to rotate it relative to the camera. So if I drag my mouse to the right of the screen I want the object to rotate.
Adding local rotation or adding world rotation does not yield good result as the object rotates in weird directions that is not the users intention.
How can I convert the mouse delta input into a rotation relative to the player camera?
Hey peeps,
What is the best way to continuously get actors that are overlapping a collision box in a BP actor? As in if an object overlaps, constantly get its location? Also which would be better for this, component hit or begin overlap?
Hey! UE5 retargeting animation question
:
I want to retarget this magic throw animation to my third person character:
- I'm getting the "no smoothing group information" error when importing the X-bot skeletal mesh.
- Though I got the error it still added the skeletal mesh to the project.
Some solutions I've seen or tried:
- The tutorial I'm following added their Mixamo downloaded fbx files to Blender, then export them with the smoothing group information enabled to solve this.
- I've been able to retarget animations from Mixamo before but the animation wasn't applying to the character's feet.
- I'm wondering if that's related to this error and if exporting from Blender with smoothing group information enabled will solve that too.
Is there a way to enable the smoothing group information in Mixamo settings or do I need to use Blender to apply the animations properly?
afaik smoothing groups have nothing to do with animations
or at least it shouldnt stop feet from moving
are you sure you named all the bones correctly
This worked
I wanted to ask smth and then tealize the mistake and made it myself😄
The problem was that i placed this big chunk of code before creating the widget and adding it to viewport
now im thinking how to add the blur transition between 2 levels
here i load the level that was above so where do i need the blur transition to be,in both or in this one
What's the most efficient way to disable all controller input in a character BP aside from 1 input?
You can't do it with bp with hard travel
Keeping the widget alive between level that is
so it needs to be the same widget for 2 levels or how?
You can't use bp, it's one of the limitation.
2 options to keep widget alive, both using cpp.
Use slate or keep the widget alive somehow (I used smart pointer to prevent garbage collection)
naaaah,it sounds easy and i thought i can do it in bp😞
probably swapping out the input mapping context
there must to be something ,i cant believe there is no way
the worst but working one
your only way would be to have everything as a streaming level, but that is awful, and you lose the ability to open level by name
this is a c++ thing
if you want it to actually work
hell no i still suck at blueprint c++ its definately not for me
I considered this but still unsure if this is less resource-intensive than adding bools to about the half-dozen inputs I want turned off.
I promise you, C++ is easy when you get into it 😛
WHEN YOU GET INTO IT
yeah, I don't actually know the resource cost of that system; I went through all the trouble of switching to using it in my own project, and I can't tell you if it actually improved anything lol
oh i think i found an alternative,what if i just load that level from 0 opacity to 1,but there will be visible another level from background
U r worried about the cost of removing input context? Da faq
not quite that simple
your references don't stay alive
Don't know what you mean. As long you are entering new world , youe widget is gone
there will be the brief pause of recreating the widget
i mean the win level,i load it with 0 opacity and then turn smooth to 1
First reason why ppl should use cpp.
1.Bp struct
2.loading screen
i repeat, your only option is some level streaming hack, but then every single level in your game needs to be a sub level, which is awful.
if you want to do this, it's c++, find someone to write the c++, find someone that already wrote the c++, or give up
here
You r recreating the widget
not my concern, no
Not sure what u mean by opacity
you will still have the brief pause where the widget doesn't exist
Hey. So I have this code where if player presses mouse button and has a weapon equipped, it starts firing the weapon and since it is automatic weapon, I set set timer by event. But the "Clear and Invalidate timer by handle" needs to go to "Released" pin. Any ideas on how to fix this?
im sorry for misunderstanding)
so the alternative would be to load level and when widget loads it has o opacity ,then smoothly i make a transition to 1
is it good?
I only know the 2 options I stated above
There is no way to preserve widget when hard travelling with bp
Blueprint only project is limited, this is where you need to accept the wall
Your only option for loading screen is plugin if u don't want to dive Ur self
no, that's not an alternative.
alright, so im trying to make a keycard system in vr, currently im trying to make it so when the keycard overlaps with a box it deletes both the box and the keycard, but nothings working.
I have no code for the box or the keycard right now, I deleted it to try and think of a new way to handle it
I repeat again, in bp only land, your only real option is to ave each level a sublevel, that way you have a persistent level to maintain references in.
The actual solution requires C++
Figure out what don't work, what's not detected
Print string to debug
Now whether you make the C++, find someone to make the C++, or find someone that already made the C++ is up to you
nothings even going in console, straight up its just not doing anything
its a simple begin overlap function
Well then work from there. Check your collision settings and channel
Get overlap event to work first, worry about the logic later
for better words, how can I reference the keycard in question, then delete that and the box itself when begin overlap
Print string overlapped comp
It's my question and yes I am because I have very limited experience and therefore knowledge concerning what is and is not costly to do.
And print every single comps. Once your card is detected, you can cast to your card
I think I found something, pretty sure the collision preset is block all dynamic
0 cost
Set to overlap
set it to overlap all but I still got nothing
Check your collision box or if your card has collision
Then check the collision setting
Keep working on the checklist
K so your key card don't have collision then
Shouldn't need to add an extra collision box
Just create collision for your card
Always print first
it works
U can cast after u confirm that the card can be ovrrlapped
I know but u kinda ignore the troubleshoot. Oh well
I need to get a event dispatcher in and make a door
Hello, I have question regard Timers and Delta time.
So, in Timer by Function you can loop animation for example every 1seconds.
Is it possible to do this with delta time somehow? Or the time I insert into Timer is already reliable?
Delta time is the time elapsed between last frame and current frame
Guys any idea how I can fake "shoot" prediction when I am using trace lines? when plane is flying fast ? I wanna make effect I need aim before enemy but line traces are fast and they always hit you.
Do you mean like drawing a path where the plane/ object would be going?
like I wanna draw circle "Shoot here" to hit target, target is moving lets say 300 km/h but i Dont need aim before it because I am using line traces for shooting and they always hit target without pre-aiming
So you want to fake the travel time then?
yea something like that like you should shoot few metres before target to hit it but with line traces you shooot right on target
because its path is fast and not bend
so currently you can point at the target directly, and no matter how fast it's moving you'll hit it because you're doing the hitscan; and you want to have the player instead shoot at the lead pip?
yes
i need fake it somehow so I will need aim before targeet
ofc based on his speed
you need math
you could either project the target to have collision where the lead pip is, or you could offset your hitscan projection in the opposite direction of the target pip
that won't work
unless the distance/traveltime and speed of the object is always the same
are you doing this approach for optimization reasons or to simplify player input?
yea
hey ,i want to make the effect of trace when the arrow shoots,and i cant formulate it to search in youtube
What I would do is upon hitting the target, make a call with delta time * (time needed to reach target) * Current velocity to see if you would have hit the target at the speed at which it is moving
make it little bit "real" lets say
in real life u cant shoot at target directly to hit it
when its moving
in worst case I will use not line traces
but objects collisions
but I Wanted save performance
with line traces
I was assuming that would be accounted for by the target position
collisions are your only solution
or doing a trace every tick, and calculating the travel distance at the time
yea but it will eat performance a lot
i will think what i will do
i cant bend somehow linetraces? make them physical yea?
no
specially if you want real projectile behavior which doesn't shoot in a straight line
that's why projectiles exist in the first place
if something like this exists in the engine it's very very unlikely that you come up with a better solution
Speaking of projectiles how can i make a trace effect for an arrow in 2d,cuz the one that i have it weird,has bugs
like a preview of how the arrow will fly?
no,the actual fly
can't you just stick a niagara system or smth to your arrow projectile?
i haven't used projectiles, so idk
yes i did like a component,but it draws the line strange
I have been making and re-making Character Controllers for the last week, following more than half a dozen tutorials, and each one results in different, but still broken, functionality. These are extremely simple, involving the third person controller and 3 inputs (move, camera, jump).
In my most recent attempt I ended up with this error on my character controller BP that claims that the BP is not a controller. Is this a common experience for others? Repeating the same steps and getting different results each time?
it becomes thinner and thinner and when you shot backwords it becomes really weird
so i thought about making another trace but seems like i cant find the right searching request
can yall help me to formulate the request?😂
you can't bend the line trace unless you do multiple line traces, which will make it more expensive. However, you can adjust your target offset based on distance and velocity to account for things like bullet drop, and then do your single line trace there. Note that it won't be physically accurate, so there may be cases where something should block your shot but doesn't because you aren't actually tracing the true trajectory of the projectile, so it's up to you if this results in something accurate enough for your purpose
it looks your BP_OddPlayer is your character blueprint, not the controller. Here I'm using the ThirdPersonCharacter blueprint for all my logic, but the player controller is PlayerController
I don't know why I made the screenshot so wide 😅
Hey, I'm using Ascent Combat Framework and I'm unable to get my UE4 skeleton to work with retargeting. I've used both the assign skeleton option and also created a child of the ACF skeleton to replace with my UE4 mesh and rig. Does anyone know how to fix this?
for reference, the bones are set up correctly when connecting my custom child BP
I'm allergic to skeletons, but this might be a better question for the animation channel
will send one there
there's a predict projectile path node or smth which takes bullet drop etc. into account afaik
which could be used to determine the target location, still the target could have moved at the time the bullet arrives
I haven't tried using that before, it sounds saucy
Trace every frame over time
I wonder how many positions it returns
it's great
is there a way to add a blueprint node via hotkey? I don't like having to go back to my mouse every time lol
Thanks for your reply! I had just named it "OddPlayer", but it is a BP from the Character Controller class. I just remade it from scratch again, and it worked fine, as it did the more than 10 times I had previously. It is truly confusing me as it's so simple there isn't much to screw up. Bug? 😩
Thank you again for taking a look though!
Hello, I'm new to Unreal and I'm reading other people's work. One of them uses this node, and I'm not sure where he got it.
Seems to be a function that the person wrote inside that BP Sky Sys Pick Sun actor, not a default UE node
tick wrap axis on the horizontal axis in the blendspace settings
You've placed the node inside a character which isn't a controller. You would need to get the controller of the pawn/character and connect to the target.
If you placed the same node inside a controller, it can use self as a target.
Im using a playerController in order to have logic that persists across multiple levels, but beginPlay gets called whenever a new level is loaded, I only want it to be called once for the entirety of the game. How do I do that?
I know gameInstance persists across the whole game, but I dont know how to run something on the game starting using a gameInstance?
Anyone able to help here. I'm trying to have this actor move along the spline
I'm using an interp for now but it doesn't seem to be working and I believe I've got it setup right
that is just to access the light component on the directional light actor
oooh
what's the equivalent of SanitizeFloat in blueprint?
Why does enable/disable input have a delay?
it's kinda unusable like this
so manage to find the issue I have is due to the spline length being super long over 1.0 is nothing in comparison and actually end of the spline is line over 5000
what delay does it have?
if you need to access the spline by percentage, you can use duration - by default the duration is set to 1, and then you get location at Time Along Spline
actually nvm. it's not really a delay but i wish the transition was smoother if i hold down the key the whole time
otherwise you can get the distance of the spline use that to scale your distance-getting
so duration would be 0 - 1 ?
unless you've changed it, yes
don't believe I have
is there a way I can limit the interp speed so that the actor kind of tops out at a speed ?
yes
at the moment the interp obvs is shooting actor around the spline which look unrealistc
I know there is a const version of it but that also won't help in this case
const can be what you want, do you want it to move at a constant speed or reach the point in constant time?
let me show you example
As you'll see because player is closer to the other side of the spline it'll shoot round spline to get there which is right. I just don't like the shooting it's doing if that makes sense
Use FInterpToConstant and dial in your speed
I would prefer to have it still do what it's doing but not kind of going that fast
arr okay
anyway I can like merge them together
so get the build up to speed and the slow down to speed but still clamp as it was the movement so it's like the constant one ?
like an FInterp Ease in Out?
Yeah you'll have to do your own interpolation, can't use one of the finterptos
FInterpTo is more for "chasing" a value
I would FInterpToConstant the 0-1 range then run that through an FInterpEaseInOut
to turn a straight line into an S shape
yeah
I know it can defo be done in C++ but I've come to realise do it in BP and if it's heavy on performance move it to C++
so I did look at the Ease in and out but it didn't look right to me like how I include it
Cause theres these two
never used them before though so
yeah, use the one you like better. The A is your start position, B is your target position, and Alpha is the percent between them (0=A, 1=B, 0.5=halfway between the two)
you can select ease in out from the Ease function list, which I am pretty sure does the exact same thing anyway
sorry, not position, these are floats
Hi, I have 2 variables I'm using of the same struct to store my (local) player stats. The functions I wrote previously that increased their exp, level, etc don't seem to be working. Is it not possible to pass references of the struct?
Assuming everything you're dealing with is in the 0-1 range, then A is 0, B is 1, Alpha is the output of your FInterpToConstant
Ignoreing the fact that player stats should probably be on PlayerState and not gamemode.
You're passing in a copy in that function call, so nothing will permanently update. I'm pretty sure anyway
I don't think it matters where they go so much in a local only game. The copy thing makes sense I guess, I guess I'll just make 2 different structs, 1 for each player.
well the spline length obvs isn't 0 - 1 but i'm using mapped range float for that so 1.0 equals length of spline
Do you want it to always take the same amount of TIME to move from place to place, or move at a consistent speed?
most likely yeah
Like if the spline is twice as big, move twice as fast or take twice as long to do it?
same speed
so take twice as long?
regardless of length of spline
oh wait sorry hang on
so affectivly i want it to take 30 seconds
ok
whether spline is length 10 or 1000
So you'd do it like this:
Timeline taking 30s to go from 0-1 -> FInterpEaseInOut to make it S shaped -> map range from 0-1 to 0-SplineLength -> set position
You can also just bake the s shape into the timeline, however you wanna do it
then you could lose the FInterpEaseInOut
I can't get out of using Timeline can i ?
like you said I'd have to make my own kind of interp rather then using just simply one of their functions
hey, is there a way to get vertex positions of a skinned mesh in blueprint? (it can be the skin pose)
You can but you'd basically be reinventing timeline
You want a thing to go from A to B over X seconds
that's exactly a timeline
yeah at this early stage I'd rather not be reinventing haha
Is it not possible to alter the loop time of an Event by Timer while it runs?
It just uses the initial "Running Shoot Delay" value, reguardless of how it changes
Not sure if anyone could give me some advice
I bought the Ultimate Multiplayer FPS Framework
Was thinking to merge this with ACF Framework, at least to to replace the shooting system,
I hit a road block with the anim BPs.
The FPS Framework has an animBP that has a custom anim instance class as parent,
ACF has a similar setup, it uses a custom Anim instance class as parent,
Was thinking to try and convert it to a layer and use the link anim graph but I would need to rework alot of the logic as the layer would trigger differently, this would throw some of the IK mecanics and upper body and lower body to not react the same way,
My knowledge on anim bp stops at state machines unfortunately lol
Not seeing any wayt to merge these via blueprints either so,
Tried my hand at C++ and try to inherent from ACF's Anim Instance class,
Got it to compile but just crashes once I try to re-parent in unreal, trying to debug this but not going well lol
Might be looking for a plan C, would anyone have any tips or any ideas on how to approach this differently?
Actually would it be possible to dynamically swap Anim BP's during run time?
For example if I equip a ranged weapon, only then do I need to swap anim bps,
Is that something standard to do?
Merging 2 plugins sounds like an absolute nightmare
do it by the timer handle
blue thingy
It is, but found the Set Anim Instance Class that I can trigger at run time.
Basically I force a different anim bp with I equip my gun,
Dont know if this might cause some performance issue in the long run but I can easily swtich between these 2 animBP without having force merge these 2 plugins.
Your door actor BP does not consume keyboard inputs. Keyboard inputs would generaly go on the player character.
how so? What node should I pull from the handle to set a new time?
Just drag off it and poke around
Thank you
look for anything timelike
Thank you
You don't necessarily want to enable input on the door tho
Instead, use E in the character, and have it figure out what to talk to, and what to tell them
For your first draft of this, you can get overlapping actors, foreach on them, cast to Door, and if it's a door, call OpenDoor on it (add that event to the Door)
Later you'll want an interface or component for general interaction but do this first
okay
hello
when i add this settings to the horror engine player head shake this happen i want a solution
I'm reading through all the results and nothing seems relevant, but idk if I just dont know what to look for
Ive checked with "set" and "change" as the first word in the search too, but nothing like "set time" or "set delay" shows up
Wait, it seems "set timer" just makes a new one with the new time variable
I'll check if that works
oof, nevermind. Set Timer isnt available in blueprint
Thanks for replying!
When I import a character from Mixamo it doesn't have a root bone so it doesn't have the same bone structure as the UE5 character I'm targeting.
Would I need to use Blender to add a root bone? That's one of the solutions I've been seeing but wasn't sure if there was another way.
@quartz ferry I love your username 😂
what if in for each loop i'm deleting the element of array?
can i decrease the index to be sure that all elements are iterated?
lol thanks
when i add this to another player it works but in the horror engine no
Does anyone have any idea on how to spawn certain amount of actors when there are more spawn points than actors themselves?
reverse for loop
Anyone able to help with the one I tagged above at all ?
It's when I'm trying to have a bone on my skeletal mesh look at the player it seems off
I don't know why though it's off slightly write wierd
Draw a debug coordinate system at the bones location and rotation to make sure it's not a vertex weighting issue
or otherwise make the bone itself visible
So I have debug showing and I can see where the bone is and where it looking at
Bone itself tbf looks off slightly
I'd start by ruling out any clamping etc
So tried that still was the same
All I can think is animation is the cause but I didn't think that affected stuff tbf
Try reset the axis stuff to default
The fact that you have local space turned off for the look axis seems a bit sus
but idk enough to know for sure
Should I create a blueprint instance for a weapon each time I equip a weapon?
Or is there a more efficient way
There is
Just have them around and swap them out
or don't, depends on your setup
what IS a weapon, is every weapon a BP actor class?
Yeah I was thinking each weapon would inherit from a base BP_Weapon that is a BP actor class. Altering their static meshes and colliders
What happens to an equipped/owned weapon that you are not currently holding?
I switch from my rifle to shotgun, what happens to my rifle? Do I put it on my back, does it just disappear, what
Becomes an item holding reference to the weapon blueprint
Disappears
to an instance or a class?
Does it hold a reference to the weapon class or an instance?
The class at the beginning, maybe it could hold ref to the instance as long as it's picked up and owned by a player?
I'd probably start by spawning/despawning them for now and later think about just hiding them but not despawning
Is this an ok approach anyway or is there a better approach for handling weapons?
I mean how different are the classes?
Oh, right now they have different static meshes and colliders
If they're data only then a "weapon" can just be a structure.
SM_Spear
Damage = 20
DamageType = Thrust
Swapping a weapon could just be telling your weapon actor "here's your new mesh and data and animations etc"
depends tho
How would I set up colliders? Variable too?
However you wanted, even just bake it into the mesh idk
Don't worry about that until you need it tho
Just hiding a weapon actor can work just fine
This for a dark souls like thing where you have 2 weapon sets?
I don't have a robust design yet, just practicing. Was thinking to have any amount of weapon sets like daggers, spears, swords etc.
I have a UI that's supposed to default to a value of 100 for player and opponent, and increment by 6 every five seconds. It also updates whenever you spend money. This update pulls the player's cash value from their player state. The problems:
- When you spend, it doesn't update your cash value on the opponent's screen until the 5 second update
- Player 1 (Server)'s Opponent value lags behind one tick. It starts at 100, goes to 0, then up to 106 and increases as expected.
- On Client, own cash sometimes visually misses an increment tick, although the cash is spendable.
replicated variables with RepNotify my dude
Delete every multicast from your project
re-add them when you know which ones you need and which you don't
Damn.
You can send a command that sets everyone's cash?
Can you say hacking is great?
You can't?
How do you think I got so rich
😄
Well, sets the cash fro that one person for everyone. 😦
This node is bad.
Do not use it.
MyWellsFargo.SetCash(INT_MAX)
Remake your system with nothing but replicated variables, onreps, and run on server events. You'll get it.
.
Why? It's everywhere in my blueprints.
Then your blueprints are bad.
It's a convenient hack that will break down on edge cases and there are very easy alternatives.
Becuase it literally means "Get the first PlayerController" when you usually want "Get this pawn's playercontroller"
You usually have a more explicit way to get the pawn/playercontroller/playerstate you actually want to get.
Okay, will do. What would you recommend to prevent cheating the players money?
It works if the game is not multiplayer right?
A player's money should be a replicated variable in their playerstate or pawn.
That doesn't mean it's good practice.
Even if it's cached somewhere on BeginPlay?
Give an actual example of where you use it.
I'm not sure why you'd cache that value.
Okay, I was having it in both player and playerstate but I guess that's overkill. While I have you guys, does this look like how you would update the UI widgets?
use repnotify
read what i linked
This is the better version of that player controller index 0 thing. (except this one is for the pawn, but you get the idea)
Yeah thats cause of an issue i was having with something else I think
I'm thinking animation might have something to do with it
Here's how I'd do it.
PlayerState:
OnRep_Cash -> trigger dispatcher OnCashUpdated
Widget:
Construct -> get chain to get to the PlayerState it cares about -> Bind some event to OnCashupdated
Now Widget knows whenever Cash changes
You can also do it the other way around where a widget is just told what playerstate it cares about when it's spawned. Either way
And the widget can just have a value binding (it'll check every frame) instead of waiting on an event, you'd do that for something that changes all the damn time like your cookie count in cookie clicker or your HP for a health bar
Reason I say is cause I'm running a idea animation so I'm thinking maybe offset in animation is causing issue
Before or after the look at?
Okay, I'll try that design. Thank you for the feedback.
So animation is running in machine so before
Look at is happening after
But I'm not like reseting bone or anything so I'm thinking it's taking bone and adding onto it the look at rather then look at overriding the bone
I'd lose all clamping and make sure you're rotating the right bone
not the one before it or after it
test with a mesh with just 1 bone
and also test with base pose
So I think my issue is I don't have a base pose
every skeleton has a base pose
Like it's taking the state machine in
my money is on some settings for the look at or maybe it's doing some blending or you have a post process or something
or you just got the wrong bone
I'm banking on blending issue
Defo not wrong bone I defo checked that earlier
Also look at is annoying causing you can't control fully how it does the look at
Might have to look at control rig but will see
isn't it supposed to display 0.2? currently it's displaying the class default value, any idea?
Is it actually creating the save game file on your computer?
Show how you're calling these in sequence
I have a weird issue with a BP with a FieldSystemComponent - If I Place the BP actor in the level before play it works fine, however if I spawn the actor at runtime I get a lot of errors saying 'Accessed None trying to read FieldSystemComponent' - with the exact same BP setup - the images are the first node in the construction script where the error shows on a spawned (not found) / Begin play (found) versions of the same BP - Not sure how to resolve this?
Try move code to begin play
I'm in the game instance here. Just to make a test, I plugged the create save on begin play once. Then I plugged the load game after
Show property settings for Volume Master
Thanks, I just tried that - copied the construction code to Begin Play - still the same result (unknown) - almost as though the field system component is not initiated fast enough to be found?
before it was private with a getter/setter, but same result
any reason why EnchancedInputAction don't trigger when paused even when Trigger when Paused checkbox is set to true?
@hushed ferry Nvm I got it working, last time I tried was months ago so I can't remember where I mixed things up but the feet are working too 
hello! does anyone know why my actor instantly snaps to the trace hit location instead of lerping to it smoothly like I expected it to?
the alpha isn't being changed over time. I was confused by it at first too, don't worry
if the alpha = 0, the output = A; if the alpha = 1, the output = B
You are literally telling it to go 99.9% of the way there.
You need to save that location then kick off a timeline or some other thing that ticks that can set the location over time
aaah that was it! thank you.
The variable was corrupted in a way, I had to remove it and create a new one
Here is my character, Just a floating camera.
How can I rotate the camera?
Adding rotation to the spring arm works perfect. But it doesnt move the whole cahracter, so it gets offest from the cahracters true front/back/left/right.
for example: (rotating the spring arm 90 degrees to the right makes the W key move the camera to the left (because rotation is offset from direction)
any way to counter-act this?
Is it possible to just rotate the capsule its self?
Have character ALSO use the control rotation
Have spring arm, camera, and character movement component use control rotation
then just change control rotation with your inputs
of course character only wants yaw typically
just look at the template 1st person project
You don't need spring arm for 1st person only but might as well keep it for a 3rd person option if that's a thing
or if you want the lag mechanics
what gets the control roation, the spring arm?
because my BP at the highest level (above root) is set to yaw already
Anything that wants it
That's the poitn of it
it's a rotation that represents your view rotation
and other things can use it for stuff
enabling control rotation forces my components to have a locked roation that doesnt move (cant angle the camera slightly down)
are they using control rotation too?
just load up the 1st person template and look at it
by control rotation do you mean this? because my spring arm has one of these bools
when I enable this, my spring arm cant rotate
What are your mouse inputs changing
its the E and Q key for roataing
(this is for an rts game)
original rotation node in comment didnt work so i tried the node below and that works but has the roation offest problem
Input -> modifies control rotation
...elsewhere....
Whatever wants to, uses control rotation
Add Controller Yaw Input
thanks man
been a head ache going back and fourth between deciding wether or not the player camera BP should be a pawn or character.
literally have transitioned back and fourth like 8 times.
seems like I might be sticking with character from now on 🙂
you a fan of halo? and / or RTS?
Sry, I said add movement input, I forgot it was one of those since you’re rotating the controller
Pawn if it's an RTS
It's an eye in the sky right?
Like normal RTS?
You could do that without a pawn at all, but the simplest version would be just a pawn that moves around on tick
I disagree, too hard to implement functional camera movement for maps with large elvation differences
Just trace down or sample or otherwise cook up a z value for the land height
How would a character help? Do you just have a gigantic capsule sliding around?
WHat's similar to RandomPointInBoundingBox but arbitrary points? I want to specific amount and space them out in area.
What's the area shape?
That's not trivial
Let's say I use a line trace then spawn a Sphere Trace on the impact point or i use a sphere trace. And use that area.
A sphere trace won't get you a surface
what is the actual shape you want to generate random positions inside of?
Anyone know why this would work for equip but not dequip?
is there a way to edit a data asset via blueprint, or does it need to be done in C++?
nevermind, worked it out 🙂
Well now u r leaving ppl hanging/questioning by just saying worked it out
The answer is you can do it via bp for those wondering
Now I have an air of mystery
At runtime? I thought they were read only
Same. Thought that was point of them lol
Need a little more context, and view into the what the rest of your BP is doing. If I had to wager a guess is your equip has a "client" in it, but remove does not suggesting remove is server only?
At run time in editor time
Is possible i think
I can also change data table in editor play time
Not that we should 😂
I was just doing someones request
I changed da asset with editor utility widget, judt by getting a ref to the da so im certain its possible in editor runtime.
Im not sure about packaged tho
How do I create one of these types of events? I've looked everywhere I could think of.
Read rpc in #multiplayer
hello all. I'm new to soft references in UE and wondering how to best optimize memory consumption. So if an asset is loaded into memory in a level, and then the a new level is loaded that doesn't need any of the assets from the first level, do the assets need to be manually removed from memory? i.e. Will the assets be unloaded if the object that initiated the loading is itself unloaded or will they stay in memory even after the original level is unloaded?
I couldn't find the answer to this online so thanks in advance if somebody can explain how this works
It will be automatically removed from memory if you do hard travel in packaged game.
That's not the case in editor time. What's loaded remain loaded
How do I know this? You can check your self by opening console and type
Obj list class=(the class you r checking)
It's in the video by epic titled demystifying soft object ref
What's a good way to share information between different classes? Like if I wanted to store what team an actor belongs to, this property could belong to characters, pawns, actors. I tried reparenting to a base class but I didn't realize this would change the child class to the reparented class.
Actor components. Make a team component, put one on any actor that can be on a team.
Depending on the data. Something like team should go to game state
Thanks
I have an array of Tags.
EG:
Ind 0 - "BuilderTools"
Ind 1 - "DrawnWall"
Ind 3 - "FPID_857"
The number following behind "FPID_" can be any numbers between 1-1000 (unknown).
How do I search through the array to retrieve the full "FPID" Tag?
If they’re gameplay tags, there’s get tag name
I'm using normal Tags
If you weld the bodies, they shouldn't collide with each other?
Thanks for the pointer!
Hey guys. I have an issue. I want to create multiple different dataTables using the same structure and use them in a actor component. My issue is, that if i make the dataTable a variable and plug it into 'Get Data Table Row' node (1), all my outputs disappear (2). Is there a way arround it?
What I'm trying to do in general, is to make dataTable with actor stats per level, each row is a new lvl so at lvl 1 it has 100HP at lvl2 200hp and so on. I want to have same dataTable but with different values for different actor, so Unit1 is using DataTable_01 and Unit2 is using DataTable_02, both have the same structure, but different values per level. I take loading that into main actor wouldn't be that hard, but i want to have actorComponent that loads those DataTables and assing health and level values from it. I don't know how to change those DataTables on the fly in a actorComponent without breaking all the links ..
About localization, is there a built in way to convert English to en? (for set culture)
Pretty sure it would be the other way round
You can ask UE for all the localizations and it should have a way to get "English" from that
Or all the cultures to be more precise
Shouldn't you get a Wildcard pin when you use a Variable?
When making an rts do you still use pawns and possess?
Since you control more units at once doesnt it make sense to use just actors?
You can have pawn without possessing it
Though cmc would be too heavy for an rts game or any game with lots of actor
yeah
so instead just use something simple to move the actors
but the cmc is automatically replicated
i never worked with multiplayer, but i assume the cmc is set up for that
RTS is one of the hardest genre and UE is not really made for RTS, it's made for competitive shooting game.
That's not to say u can't use UE for RTS but you will need to make your own
RTS with multiplayer 👀 if you are not a programming vet , consider doing something else
well this one is 2d and its more like tactical
though maybe real time
so if i make them actors, and move them with lerp
how do i replicate that
If u have to ask that then I recommend doing a simple mp first
Instead of rts
Cmc is thousands lines long
Some ppl tries to make their own movement component
Took years
Might as well just buy one from market place. General movement component. It cost 350 usd or more but cheap considering the ammount of work that's put in
i think it can be simplified
for example aoe2 replicates only the command to move
so when you select a unit and move it somewhere
it sends a packet
and then the other players replicated that just one time
I still think it's bat shit crazy for a solo dev to make a rts game like aoe2 with unreal engine but up to you
Have no comment since I never attempted anything like RTS. Cmc for mp alone already gave me headache
cmc wont work because as you said performance
Yeah u will have to write your own move logic in cpp which prob take very very long time even if you have the skillset for it, that's my opinion
Multiplayer is not really bp territory either, unless u making simple card game then thats achievable in bp
im just making a small practice test nothing very serious
so like some cubes going against each other
that wont be hard i think
That's not simple, especially in mp but u do u
ok. thanks for warning. ive done some games, but mp is completely new to me
quick question: what is a difference between them ?
One is a pure function the other is not.
The one on the right also takes a string by reference
If u hook a string variable the changes will reflect on the string that you pass
oh, now i see that second one will return also Index where changes was made, thanks
The index is prob useless the important part is u are passing by ref
So if u feed that with a variable that variable will get updated
I don't know what that is. I'll google it 🙂
It's the white/grayish pin that doesn't have an actual type assigned yet
You can usually drag that out and simply break "Break" followed by the Struct Class
I mean, I've seen it at some point, but don't know how to work with it 🙂
ow now i know what You mean. The out pin has no option to break it since the datatable is unspecified (i think that's what You call it)
Please read more carefully (:
I wrote you should drag from the pin out
As if you'd call a function on it or similar
Oh, You're right, sorry. I got some results. Thank You 🙂
Is there a reason why in the screenshot with the save fonction, the value printed is none but in the other one, it prints what it should? seens like something is wrong...
it prints at the same time or after adding the value to the arraw
this error is so dumb, someone help pls<
I'm trying to add footstep sounds to a walk animation for the third person character. I have notify tracks set up and I can hear the footsteps in the preview but not in the game.
Well, no clue what your Save Actor function is doing or what's outside the cropped image in the first one, but in the second image you're ensuring the array you're getting from is not empty.
If you're getting "none" in the first one, are you sure there's any elements in the array to begin with?
there's at least one
that's the save actor fonction
it basically set a value into the arraw and this arraw should save and then I should be able to reuse it when I play again but it seems that I DONT KNOW WHY but the arraw is empty every time when I rejoin..
@weary bay
Please don't mention money rewards for solving issues. If you want to pay people to work for you look at #instructions .
In a similar vain please don't just @ someone. It is not polite.
See rules 2 and 7
???
I want someone to help me, sorry man
I will wait
actor instances don't save, you have to reinstance/spawn them yourself
and save what is necessary for that
when it spawn this arrawy is empty..
yes, because they don't serialize in the default unreal save game system
Seems Ben is helpful enough. 👋
what does that mean?
@faint pasture so manage to sort it
that you should read the docs
because for all the other values, it was working fine
made a static animation and blended it with the animation running and re-turned on local space and it all is working now, it's looking correctly at target
because they are primitive data types
primitive?
yes
So if I have something on a spline. There isn't any way of getting it's speed is there ?
how do I make it primitive too then?
i am spawning that at the begining of the game
everytime the player join
i don't see how speed is related to spline?! you can get an objects velocity to calculate it's speed like usual
but you can't get their velocity when your setting their location on tick
so I need to manually caluclate it
i think I can get there location and then delay compare
Current frame position - Previous frame position/ DeltaTime = velocity
and - one from other
then you already have speed somewhere?! since you need to know where to place them on tick
bassically this haha
nope cause it's not moving with physics or anything
still, you have to do some math to decide where to place it on the spline?!
which contains the speed
does it ?
I've never seen this so be good to know where this is
well, how do you decide where to place it on tick?
Oh yeah Ben is right :P
with a set actor location
and an interp constant going into the location
thats how you set it, not how you decide where to set it
Before placing you already have to have some speed parameter to use to determine what position of the spline to use
the interp const interpolates over the spline length i guess
so thats the interp constant speed
Someting like: GetGameTime * MySpeedVariable = CurrentDistanceAlongSpline
Which you then use to sample the spline.
what is a spline duh?
How do you set CurrentSplinePos?
I'm doing my interp here
Ah fair enough
Yeah then you can just do
Current frame position - Previous frame position/ DeltaTime = velocity
Like, you could calculate your velocity from that interp, but fuck it.
It's easier to just calc it afterwards.
well I was thinking that in terms of surly some how it can be done with spline
but like you've put in past I've done the location frame thing
Normally I'd hard calc the position on the spline from a Velocity variable, so you already know it. But here you are offloading some interping to that interp function. So it's annoying to get an expectation of the velocity.
since this is constant interpolation, it might be just the interpolation speed / distance?! idk i'm one of the persons who would have to sit down 5 minutes to write a correct formula 😄
i'm just sure that this is a simple math problem :>
reinstance definition?
or just the interp speed 🤷
did you just make up a new word?
... bruh reinstance
since you spawn those actors when a player joins, you would need to associate your saved data with the already spawned ones
that is loading it
since i'm never going to see the $10... invest them in a save system which allows for object serialization
when I am doing the ''is valid'', its never valid cuz the arraw is none
What I done wrong here I'm pretty sure I done it right
Current frame position - Previous frame position/ DeltaTime = velocity
because objects DONT serialize to save games
its not an object its a reference to an object
an object which doesn't exist anymore when you load the save game
Anybody know of a good way to smooth out spring arm length changes when the arm collides with stuff? I can enable lag and lower the speed and it works, but obviously it impacts all camera movement and not just the spring arm length change
so this is something strange my get actor location for some reason seems to thinking the actor never moves and is stationary
do it like you do with your building, where you store the class and all the data that's necessary
where do you store last location?
wdym?
in a variable before it delays until next tick
oh wait
you have to store it before you set it's new location ofc
or after setting the new location, but before calculating the speed
I think this is where I use a then function I think
cause at moment it obvs is setting it then checking it against current which will be same cause it's all done on same tick
nope it still thinks it's not moving
mh
no
this is bad
set last location after you calculated the speed
and remove the delay
like that?
hello, making a random place name generation thing, when using random array item and taking the int from the index, it provides 2 different results when printed
you still have objects (references) in your save data... you can NOT do that, last time i'm telling you this
does the random node regenerate the index each time?
i just dont understand man
because every time you use the output of the random item it gets called again, as it's a pure node, this node bugs me too, you can either use it's index output or the other result... (one way would be to store the index and use a get node on the array to get the actual element)
ah shit
If you are uncertain you could always store it in a (local) variable. This ensures you know it never changes.
did
didnt work
But are you using that int variable everywhere? Where do those other lines go?
Well if anybody knows anything regarding smoothed out spring arm collision length changes in BP, just @ me. Thanks.
prints
for bug testing
2 lines = 2 get random element calls with different results
Could also print the variable everywhere to ensure you're printing the correct thing
does the inclusion of print destroy it then?
you should use the "Random Int" variable as index of your get node (and the print of the index), then it should be fine
how come
you can use the index from an "random array element" node, but just connect the index output to store it in a variable, then use the variable
i did
I'm genuinely asking as it works both ways so I would just take it it's working fine
here
i need both numbers to be the same
the delay is unnecessary and i'm 99,9% sure that it adds unnecessary cost
fair enough
also it feels unpredictable to determine when it will actually run, it's likely luck that it runs in the correct moment
directions are held like so
you are still connecting multiple things to a pure node
now that i think about it, i can just make it into an enum
your problem is that EACH connection on that pure node rolls another random element
so store the random result once as variable and use the variable if you need it multiple times...
ty @spark steppe anyways
he helped me understanding the not understandable even if i dont understand yet
i didnt know that works that way
wat
aall actors are loading so all the references should be good, do you think that the arraw is none cuz there's not enough time to load the actors? @spark steppe
no
is there a way to find the new actors with their old reference?
hi there is it possible to reuse unreal capabilities for example foliage and stuff to create something like the editor but in a standalone application ?
I'm explaining better, i'm creating a storyboard software and i need to create landscapes and foliage but i want people to be able to do it inside my software. how would that work ? thanks a lot
@spark steppe it seems like the array is already empty before putting it into the save game object
Something isn't right now
This is all i've changed
it seems however some how the speed has shot up
and when it's not moving it's still printing that it is
When i open the inventory by esc or p the sound plays but when i close it i want to remove that sound ,how can i do this?
Use Prints along the way to see at which point did they go missing
Hi everyone, I'm new to Unreal, I'm currently trying to figure out a character controller for an isometric prototype and have run into a bit of a problem. I rotate the character every frame using the "Set control rotation" node, when I move diagonally on the keyboard and release the keys with minimal delay, the character rotates towards the last released key. You can see it on the video, I added an arrow for clarity. Probably a stupid question, but how can I avoid this and make the character less responsive? I've tried turning it only while moving, but then the character doesn't turn around a full 180/90 degrees when keys are pressed, and that's a bit of a different behavior than I want.
try this
arr thats unfuar
*unfair
I can't put it in a function else it messes up the speed it throws out
niiice,thanks
I'm a bit stuck here, i am trying to carry lives over to the next level, i have it set up in the game instance and know it is working because I do a print string, but it's not updating on the hud and i have no idea why, because the logic is in the game instance
i have also a ui button on click event and i added this code,it works ok but i think there is a better way to do this ,also when i finish and exit game an error appears
Save the result of your Get when you Construct
Use a Validated Get
this?
like this
We have all been novice before.
We won't know what we don't know.
True.
Where is your code for activating the next level?
nice,thanks.Thats it for today😁
sorry there was more, the logic is ok its just not carrying over
Save the Ref to you W_PlayerHUD once on Construct, and use that Ref for everything
So "Lives" is a variable in Game Instance; where is your code in the new level that tries to get the Lives?
btw it is completly random
wdym
when i use it here, it will save properly but the array will be empty
when i use it here, the array has something but it doesnt save
there is no code in the new level, i thought that because its stored in the game instance it will carry over, but im assuming now i will need to call the lives variable from within the level blueprint of the next level?
Yes, you would need to
i did try that, to no avail
On the next level on BeginPlay or Contruct, just call the Lives variable from the GameInstance again.
I am presuming you have a different variable in your HUD instead of referring to GameInstance all the time
I was pretty sure you didnt have to call lives like that using game instance, but i am a bit of a noob, the lives are stored so it does make sense to update the widget on the new level
Remember that your widget is separate from the GameInstance
O yeah i have a separte variable
So if your widget is not being updated with the info from the GameInstance then it naturally wouldn't display what's in GameInstance.
GameInstance does keep the data intact on level change, but if you don't access it then it carries no meaning.
thanks man , that all makes sense, i will try an update the level bp just now
show more
the rest is irrelevant, I need to clarify which object connect to the cast to
i used actor object reference
but cast failed
Is it possible to have an image and detect mouse click only if user clicks on white part of image? (and e.g. rest is transparent)
im sorry for being such a noob, i feel like im on the right track but missing somthing
It is relevant, esp how you obtained Actor.
okay
i'm in the blueprint of an asteroid entity
3 asteroid entities are spawned in an asteroid field(box collision)
And what did you set to the Actor? If you did not set anything then it's going to be Null and thus cast would fail.
what do you mean
Your Actor is merely an Object Reference; you need to point it to refer to something. What is it referring to now?
if for example I use actor reference directly to asteroid 1, then it shows info of redundant
i need to get the lives from the hud or the game instance?
You are trying to cast it to Asteroid_Field right?
in this blueprint, i use cast to aasteroid field
trying to obtain lifespan
in order to set 1 lifespan for all the different types of asteroids as variable
Is the Asteroid_Field going to be something fixed, or it is going to change?
asteroid field is a box that have infos about spawn timing etc
and spawn asteroid in random rotation and positions
Is it an Actor in the scene? Is there more than one Asteroid_Field actors in the scene?
only one asteroid field on the scene that spawn many asteroid_Spiky and other types
hi, can I save a actor reference in a save game object?
Dosent seem to carry over?
begin play = only setting up vars
Then you can use a Get Actor of Class (Asteroid_Field), then set the Actor variable to the output of the Get Actor
You won't even need to cast after that.
Right you are about the client
Drag out from Get (array) > Set Lives Number, plug Lives in as the value
I don't think you can
It will return null
yea that's whats happening
You will need to respawn them
respawn?
Hey, can someone help me with this? I want my playercharacter's capsule collider + camera to scale/adjust themselves automatically at the start of each level, effectively making the player taller each level (because each level takes place during a different stage of the character's life), but the way I viz-coded it, it's not working, and Im not sure why.
i can only get and set lives from the target?
Respawn when you reload
Save the other information of the actor separately
What you were previously doing is basically setting the same value to the same variable, meaning doing nothing
You need to get Lives (from GameInstance) and set as the value to "Lives Number" (from widget).
so here I am spawning each actor back in the game but the child array will bev empty, how do I use it correctly and set it correctly?
You can't, it wouldn't work.
Instead of the childactor array you'll need to separately create like a Struct, then save an array of that Struct based on the childactors information as part of the SaveBuildables
IE. Struct within a struct
stop ben lol
s_childActor (array), then add it as a "childActor" variable of type (s_childActor) array to your s_SaveBuildable struct.
so i should create a struct in the struct
Yes, if you want to save the data
Mags #blueprint message
bruh
it neads a target but i if put that it a get it returns none?
jump off a bench, bro, actuall trying to get help here, you dam clown
you dont know how much I would love to solve thwe problem man
but im not in a rush, so Im just watching the conversation between Alex and Ray
No
wait what
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item". Node: Set Lives Graph: EventGraph Function: Execute Ubergraph Testing 2 Blueprint: Testing2
More like this:
the last lign
Wait - where did you create the new HUD widget in your new level?
If you load a new level the previous HUD would be destroyed.
the hud remains on the next level
Everything including HUD is destroyed on new level load
And what does your ChildArrayStruct looks like?
If you are seeing the same HUD, it was actually respawned.
You cannot save Actor References, I told you that.
im going to create a new level now to test
here we go again...
then what am i supposed to put there
One possibility is that the HUD is not created yet
You can try setting a Delay before the Get All Widgets of Class
tried a one second delay before
What are the information you want to keep about the ChildActor?
You need to put all of them in a Struct.
do i need to put there the mesh, location and these kind of stuff?
Yes. Whatever info you want to keep about the childactor.
You cannot expect to just have an Actor reference and that it would save everything about that actor.
It would not happen.
Try using a longer delay and see if it works
Start with 5 seconds
If that didn't work then it has nothing to do with load time
ty, you are really helpful
ffs i told you the exact same thing 3 times, 2 hours ago
not in a way that I could understand, i was so confused before
just say: you cant save an entire actor but you can save his propreties
Hi, the Max Walk Speed is the max speed all axis?
If my Max Walk Speed = 1000m/s and i only have an Horizontal movement (X) i will move on the X axis at 1000m/s.
If i add a vertical movement Y. That's mean my movement will try to reach the Max Walk Speed (1000) but on the 2 axis. that's mean my speed on the X axis will slow down.
Is there a way, to have max 1000 on both axis, X and Y but without sharing the max Walk Speed?
Just apologize and turn the page; we were all noob once. You were telling someone "watch tutorials" earlier on too, that's not too helpful either.
lmao, you are right, ty for both of you
how long have you been using unreal? cuz you are good
I'm still quite novice actually, only better at specific aspects. Been on it for like 1 yr + only.
this is a nighmare, i think the hud is persistant
nice, I have been using it for a month
It just happens that what you encountered is what I encountered and hence I could advice
Am quite sure it isn't
How did the delay work?
it didnt im afraid, got rid of the error mind you
If it got rid of the error that means it is indeed a load time issue
So the Lives number still doesn't show up?
Show your code
i wouldn't replicate the lives to the widget if you already store them in the gameinstance
you could just get the amount of lives from the game instance in your widget!?
I'm assuming he is going to display them in the widget
Right - what exactly is the Lives Number component to begin with?
yes, but having the "same" data in 10 different places is like a subscription to chaos
@lime crow can you show your widget blueprint?
may be you could set this function inside the widget on begin play like, get game instance and set value to variable . it will set the value when you creating the widget. eg:- you are loading new level, On begin play of the level, create widget and add to view port.
replace this by a foreach loop, just to check if you maybe have 2 instances of your HUD around
just to nail down why it behaves weird in the first place, still i wouldn't suggest to use the gameinstance just to carry data over from one level to another
yeah thats no a bad idea, my head is pickled from this right now
Change this to :
Get GameInstance_Cast > Get Lives, plug it to ToText (integer)
Insert a Sequence node here:
1 continues to cast to GameMode as it is
2 call Get Lives Number Text
And return the values to this
This should initialize things based on your GameInstance data.
Bit lost on that sequence step
You already have the variable "GameInstance_Cast" on your BeginPlay so you don't have to cast again
Drag that in, then from it drag out "Lives"
Go to your Design and show me what is the LivesNumber componenet
You don't have to cast again here, you can simply use the "GameInstance_Cast" variable which you have defined under BeginPlay.
i cant i get loads of errors if i dont cast?
Are you running the Get Lives Number Text on Tick?
it looks that way but no
Right click on the GameInstance_Cast and set it to a Validated Get
Move the game instance cast before the delay
that may fix this
Oh right, there was a delay
o that worked
So now you can remove the delay
Hello guys, I was saving according to the tutorial, and I got this error after saving, it refers to Add that the input variable Actor cannot be written, the author of the video said that you need to turn off physics and remove unnecessary elements from the structure, I removed it, but that's don't work. I will be grateful for your help
And use Validated Get for the GameInstance_cast variable in the GetLivesNumber instead