#blueprint

1 messages ยท Page 223 of 1

frosty heron
#

It's probably consumed by some other bp

#

Have you check with print string if your E works or not?

desert juniper
#

i like to recommend C# because it's a much easier language to understand than C++. Unreal uses C++ but it's like learning to drive a manual transmission for your first car. may be a bit easier if you start off with something a bit more approachable.
Conceptually almost everything up to 27 is applicable.
Implementations are not. but that's not something you don't have to be concerned with until you actually need it.

I do get a lot of hate for recommending C# as a foundation to programming in this specific discord server so that's just my take. I used to teach, and my method was to make learning more approachable, instead of telling everyone to dive to the deep end right away. take a look at both sources. and see what you like. either way you'll definitely have a better foundation going forward

what i strongly believe (and im sure most would agree with me here) however is that you shouldn't follow blueprint tutorials to learn programming. I have yet to see a good course that actually teaches you how to good programming concepts / principles.

faint creek
#

No it doesnt work

faint creek
#

๐Ÿฅฒ

minor creek
#

is this wrong? it doesnt destroy some of the spawned actors

frosty heron
#

Then check for every bp that uses it. Click on the event input and see if consume input is ticked

frosty heron
#

On top of that your widget may also consume inputs

#

So that's another thing to check

faint creek
#

Yes is consumed in two flibook actors

#

But only when the player is begin overlap the box

frosty heron
#

Well if your key is consumed somewhere, the same input most likely not gonna work in other places

#

Because it's consumed

faint creek
#

Is there a way to consume it in multiple actors?

desert juniper
faint creek
#

I tried but it doesnt work

frosty heron
faint creek
#

It doesnt work only in this specific BP character

frosty heron
#

That's all I can think of tbh.

Either keys are consumed by other bp or UI

faint creek
#

I'm putting all E key to not consume

frosty heron
#

Might be a needle in a hay stack if you have inputs everywhere

#

Check your input mode?

#

Might be set to UI

#

For it to work ,input mode must be at least game. Or game and UI

faint creek
#

Nothing

#

All happens when I created two actors, and then I change it making the "Reparent blueprint"

frosty heron
#

What you can do is set a life time in the actor being spawned it self, no need to tell it to commit the unthinkable from the "spawner"

minor creek
#

i want that actor destroyed after some time

marble tusk
faint creek
#

Anyone know a solution?

desert juniper
#

look in your character BP, level BP, etc

faint creek
#

Ok but I uncheck everything and it happened also at the start

faint creek
#

I didnt see in the level blueprint

mossy hemlock
#

can someone help me with ads?

faint creek
#

Thanks a lot guys ๐Ÿ™ˆ

frosty heron
#

It can be a needle in haystack

faint creek
frosty heron
#

To do what

#

Normally inputs are binded in player controllers

#

Or characters

#

Depend on your game

#

If you just want to do some test, use either of those two and don't place it else where

#

If E is to interact I would have that in the player controller

#

Characters if you have different character you can posses , e.g. a car or a plane

faint creek
#

wow okok

#

Yes maaybe its better๐Ÿค“

#

thx ๐Ÿฅน

frosty heron
#

You want to avoid level bp, they are ok to test around tho. You can always use custom event for that as well.

desert juniper
#

1 step above literal key inputs is action mapping. and another above that is the enhanced input system

frosty heron
#

Enhanced input just inheritly soo much better

desert juniper
#

Just realized unreal's deprecating action maps

maiden wadi
frosty heron
maiden wadi
#

The old input actions are.

frosty heron
#

oh yeah

#

I'm 100% sure it's not going to be completly removed tho

maiden wadi
#

Eh, 7.2 maybe.

frosty heron
#

wouldn't mind using them in empty project without the extra steps to setup IA

maiden wadi
#

You can still use the direct keybinds for quick stuff. They're just debug marked so won't work in shipping.

#

UE5 is killing me with these context fuckups.

mossy hemlock
#

anyone know how to get rid of the error?

maiden wadi
mossy hemlock
#

idk why but before it gave me more errors now no9ne thx,

#

would you happen to know why its not adsing? i have the event and input for it

maiden wadi
#

You plugged the set node in?

mossy hemlock
#

yes i have it on the one i showed the anim one too along with it turning on and off in a BP

frosty heron
#

the fixed one

mossy hemlock
frosty heron
#

what's the actual issue here apart from that?

mossy hemlock
#

what do i got to set it to?

#

nothing erlsew the error are gone it just wont work

frosty heron
#

Brother don't do multiplayer when you are at this level

#

it's making learning many times harder

#

oh wait

mossy hemlock
#

yeah that dident work

frosty heron
#

you want to set the ADS in your ABP to the character ADS

#

drag and drop the isAds from the variable window to an empty space, select set

#

it seems like you are following tutorial or some sort and blindly as well on top of that.
you need to actually understand what the code does and the purpose, informing the ABP of the ADS variable change is a start but not a sure fix, you do need to check where in your anim graph the boolean are actually used

mossy hemlock
#

ok. thx

weary nimbus
#

How do I get my character to not try to walk downwards when I point the third person camera is pointed down? I know that somewhere the player controller is basing pitch off my camera view, but all the Use Controller Rotation ____ options are turned off on my BP.

#

All the solutions online are for first person cameras which isnt working for me

maiden wadi
weary nimbus
#

I also still need it to go in the direction the camera is facing when I hit W

maiden wadi
#

Then you have some form of auto turning on which is inconsistent with the term strafing.

weary nimbus
#

I just put in strafe for my own organisation

#

That's just for me to remember

maiden wadi
#

You could put your old nodes back. Create a Rotator from XVector from the Forward and Right vectors, and break that rotator. Make a new rotator with the same Yaw, but Pitch and Roll at zero.

#

Also consider using GetController instead of GetPlayerController.

weary nimbus
maiden wadi
#

GetPlayerController gets the first playercontroller on the machine. If you have splitscreen or are a listenserver, this can cause issues. Less of an issue for singleplayer or clients in a multiplayer game. But it's still good practice to understand that you want to use THAT pawn's controller instead of some random one.

weary nimbus
#

Oh yeah that makes sense

#

Don't plan to make it mp but I'll keep that in mind

weary nimbus
civic oar
#

Hello all,

I am trying to make a racing game with a vehicle control scheme akin to Haloโ€™s vehicle control. I did this successfully in Unity Engine around a year ago with some online help, so just translating this to blueprint and Unrealโ€™s animator is my main issue.

For those who have not played Halo, the right thumbstick controls the camera orientation and the left thumbstick Y-Axis controls the throttle and brake. The steering of the vehicle always orients the vehicle to the direction that the camera is facing. Would anyone mind pointing me in the right direction for achieving this in Unreal?

(For reference, I made the C# code provided by the user in this link work for my purpose in Unity: https://discussions.unity.com/t/has-anyone-ever-made-a-vehicle-control-scheme-similar-to-halo/464094/2)

zealous moth
#

what's a good method to make an AI not move and later move on demand?
I tried using a BB condition, but somehow it didn't work.
Unpossessing and repossessing doesn't make the AI BT work either.
My dumbest workaround is to set the movement speed to 0...

lunar sleet
zealous moth
#

because at the head selector, it is only called once

lunar sleet
#

What service

zealous moth
#

this

lunar sleet
# zealous moth this

Well yeah, the tree doesnโ€™t get reevaluated above the first selector since you have no decorator or additional branch on it (and the active branch would have to abort entirely to go all the way up)

jolly oracle
#

Curious Question: Does the Timeline, "Finish", Execution Pin fire when it's being reversed? Does it finish when it reaches the Beginning?

lunar sleet
lunar sleet
primal hare
#

Yikes! I didn't know that nodes which are not even connected with execution pin get loaded in memory! https://youtu.be/EQfml2D9hwE?si=3N4r95O6V9dUz9FI&t=650

Interfaces & Event Dispatchers are both methods of enabling decoupled communication between different parts of your game.

Understanding them is essential for writing clean and well structured code.

This video explains both interfaces and event dispatchers, when to use them, and most importantly, why use them at all.

Sign up for the free chat ...

โ–ถ Play video
#

I thought anything which has no execution was ignored. Or is it just for Cast nodes?

jolly oracle
gentle urchin
#

Accompanied by the output direction enum

worldly skiff
#

Is there any efficient way to pass parameters to an event that is called by a timer? A global won't work, because it might be overwritten before previous timer is finished.
Some sort of hashing would work, like saving an int on a timer key, but then again there is no way to get an elapsed timer from an event.
The only idea that comes to my head is to spawn an Object that holds all the logic (the timer and the data), but that seems like an overkill.

gentle urchin
#

This looks a bit flawed?

#

Wouldnt the cooldown reside in the skill or skillmanager?

#

And you can get elapsed time, by the timer handle

#

Then ability or ability manager would have a dispatcher for the UI to signal its cd is done (and update cd tick)

maiden wadi
#

Or just using GAS where these systems are already made for you. ๐Ÿ˜„

barren tangle
#

hey i try to use the trace sphere by channel

#

sometime it trigger lot of time when it touch the target

#

i don't understand why

#

so the basic movement is like that

#

blue vector, and with the impact point of the radius of the sphere trace

#

it generate the normal to change the direction of the sphere

#

most of the time it works well

sudden monolith
#

how do I do a infinit loop?

barren tangle
#

but sometime it act like that

maiden wadi
sudden monolith
sudden monolith
barren tangle
#

sometime it act like that

maiden wadi
#

I guess so? Why would you want an infinite loop?

barren tangle
#

like if there was multiple collision point at the same time ๐Ÿ™‚

sudden monolith
barren tangle
#

๐Ÿ˜„

sudden monolith
#

basicly I have a flashlight and I want it to flicker like every 1-10 secounds

barren tangle
#

show us the blueprint ๐Ÿ™‚

gentle urchin
barren tangle
#

maybe you call a function during a function and call back the same function again. it's also a way to generate an infinity loop

maiden wadi
sudden monolith
sudden nimbus
#

better to use timers for this

gentle urchin
#

But yeah it quickly piles up even with custom systems

barren tangle
gentle urchin
#

Sounds simple on the surface, but once you start thinking about it in detail... ๐Ÿ˜…

barren tangle
#

this will always the same value

sudden monolith
barren tangle
#

so you will always go to false

sudden monolith
#

but this is not the loop I meant

barren tangle
#

but if you always go to false you are into an infity loop

sudden monolith
#

but I meant

#

this here

#

like if that is possible with a node

barren tangle
#

put a print after the random int float

sudden monolith
#

instead of connnection the last pin to the first?

barren tangle
#

to see if the value change on each loop

sudden nimbus
#

yes it's called Set Timer

sudden monolith
sudden monolith
sudden nimbus
#

you can set a timer once with a random delay instead of a loop so that you get some random timings instead of the same interval every time

maiden wadi
# gentle urchin Sounds simple on the surface, but once you start thinking about it in detail... ...

All the more reason I say GAS. The foundation is already done for you and all you have to do are those extra things. GAS isn't any more complicated than any other system would be if you needed the same things and you don't even have to use a vast majority of it. Rolling your own ability system is a daunting task that always seems easy at first. And then there's that next little thing. Before you know it, you're months of work out creating and debugging code that is literally handed to you already in the engine.

That said. I do still hope they're planning on helping their scripter implementations. Would go a long way to be able to have attributes not from a third party plugin. Doesn't bother me, but it would help the perception about it a lot.

sudden monolith
sudden nimbus
#

by event ensures you can still use async nodes like delay and makes it easier to see all at once

#

by function will require you to make a function which cannot be async

gentle urchin
#

Along with enums, structs, and heck, attributesets

barren tangle
#

what is that node

barren tangle
gentle urchin
#

Intensity?

sudden monolith
barren tangle
#

ok

sudden nimbus
#

it do the flicker ๐Ÿ™‚

sudden monolith
barren tangle
#

you plung the beging play to the set timer by event

#

and you create a new custom event that you link to the event of the node

sudden monolith
barren tangle
barren tangle
maiden wadi
barren tangle
sudden nimbus
# barren tangle

kind of hard to follow but this picture makes me think you are receiving multiple sphere trace hits when you only expect one. a sphere trace gives you all overlap hits and up to one colliding hit. the collision presets define what is a colliding hit and an overlapping hit.

barren tangle
maiden wadi
#

What does an object's movement have to do with a sphere trace?

barren tangle
#

sphere trace will tell me when i have an impact

maiden wadi
#

Why doesn't the object tell you that?

barren tangle
#

if my object move fast he is not able to tell me that. someone suggest me to use trace for that

#

but it's the same in fact

sudden nimbus
#

are these projectiles?

barren tangle
#

it's a pawn with a component : FloatingPawnMovement

#

and i increase the pawn velocity over time

#

but with faster velocity, the collision are not detected properly anymore

#

so the object go though the wall or things like that

sudden nimbus
#

if they are projectiles (meaning anything that is "shot") and they are moving very fast, then you can miss an impact event when they have collision response, indeed a sphere trace would avoid that because you are effectively doing a trace projectile instead of a physical projectile. You can also enable continuous collision on the projectile which sometimes helps if you don't want to do a trace projectile

barren tangle
sudden nimbus
#

sounds like you might want to try continuous collision

barren tangle
#

and when i touch i change the direction by the normal of the impact

maiden wadi
#

You're using last frame's velocity?

sudden nimbus
#

also, setting velocity directly will exacerbate this issue, if you can instead apply force you may get a better result

barren tangle
maiden wadi
#

Why not just use a PMC with no gravity or slowdown?

barren tangle
#

don't know the last frame's velocity

maiden wadi
#

You set it above after your trace.

barren tangle
barren tangle
maiden wadi
#

ProjectileMovementComponent

barren tangle
#

is it better?

#

i will test

sudden nimbus
#

it is purpose built for fast collidables, but are you making a billiards game or something? if so, I wonder if PMC is going to work for that

gentle urchin
#

Ccd only works so far. Traced projectile cant really miss with a decent implementation

untold fossil
#

Unreal Engine bug? ๐Ÿ˜ฆ

sudden nimbus
untold fossil
#

the field is an int

sudden nimbus
#

so it's not that it's not working

#

it's that it's sorting it's string representation

untold fossil
#

well shouldn't ints be sorting from small to big and vice versa?

sudden nimbus
#

think of these like strings not numbers

untold fossil
#

hmmm ok but why is there a sort button then? ๐Ÿค”

sudden nimbus
#

if they are strings, it's sorting correctly. I'm not saying thats desirable for you but that's what's happening

untold fossil
#

Is there a way to change it so it sorts properly?

#

As in from small to big and vice versa?

sudden nimbus
#

good question

untold fossil
#

I could probably export the datatable to excel and sort it properly there, but bit tedious

gentle urchin
#

Less than the alternative

#

In-editor sucks ๐Ÿ˜…

untold fossil
#

yeah that works, I'll just make the entire DB using excel

#

in-editor indeed sucks, full agree lol

lost sky
#

Why can't I give a static mesh to my blueprint actor?

floral quarry
floral quarry
#

One is you need to make a way bigger collision box on your object

#

second is you change the FPS of the object to natively higher than the FPS of your game

#

so it'll check between ticks

#

Other is, depending on the size and length of the object-- say you got an arrow. You want the collision box to be at least a 1/4 longer than the object

#

There are other things like continous collission

#

OR set up your detection through a function instead of through the tick, because a function event is more reliable because you can set up the time between checks

barren tangle
#

But is it the collision the issue or the lack of collision because of the speed

#

I extend my collision box

floral quarry
#

its the speed

barren tangle
#

And notice the collision is inside the box

floral quarry
#

If you're going too fast and using event tick, it'll only check on that tick

#

So

#

If the object is going too fast, and moves too much bewteen ticks, you need to set up a function that checks twice as much as your FPS
like

#

If you make a function event and set it to loop and set the timer to .0167(120FPS) and set your games play rate to 60, it'll stop having issues with detection. Unless you're going excessively fast

#

but I was able to set up my vehicles to collisde properly going at 50,000 UE units without issues.

#

BUt

#

you have to set up your worlds collision to continuous. Not only your character or object in question

barren tangle
#

So there is an impact on the performance? How do you set up the world collision to continuous?

floral quarry
#

A small impact, depending on how you perform the checks

#

Event ticks take more performance than event functions

#

and

#

a event function can be set to check only when needed. Event tick checks all the time until the object is destroyed

crimson prawn
#

hello, I would like to invert the turn rotation of my character to see his face. Can someone help me please?

floral quarry
barren tangle
floral quarry
barren tangle
#

i think i will manually set the limite of my world position

crimson prawn
floral quarry
#

Yes

#

SOrry im terrible with names

crimson prawn
#

by cheking it changes nothing :/

lost sky
#

Why does this event not work for me?

floral quarry
#

Does your character have a movement componenet?

crimson prawn
#

sure

floral quarry
#

ok

#

Does it have a boom and a camera?

crimson prawn
#

yes

floral quarry
#

I think you can check in the boom to do it directly

maiden wadi
reef tinsel
#

can anyone confirm without a doubt if blueprints suffer a performance impact from having many calls to the same variable or not?

#

sometimes having just one call makes too much spaghetti

maiden wadi
reef tinsel
#

right, they're pointers, thanks

maiden wadi
reef tinsel
#

a reference to the variable, the nodes aren't holding a value

maiden wadi
reef tinsel
#

ahh, good to know. got it

#

so in this case, the + operators are like pure functions and it takes the original value on the second call

lost sky
maiden wadi
lost sky
maiden wadi
# reef tinsel so in this case, the + operators are like pure functions and it takes the origin...

Correct. At least per executed node (node connected with white lines). Basically execution runs the executed node. Before it runs it's logic it will go through each of it's parameters and call connected pins, which will call their input pins. But if the node has already ran for that specific executed node it will just retrieve a cached value since it'll be the same value anyhow. It's neat to learn how BP works like that because it'll save you a ton of performance costs. Specially when it comes to things like a pure node returning an array and using it in a ForEach loop, only to realize that the thing getting the array is being ran every loop iteration.

maiden wadi
tiny monolith
#

**[HELP]**I'm trying to scroll down by holding down the button in the combobox, I wrote the necessary code, but it doesn't work on the phone, it doesn't see the press button of the button, I opened the setting from the project settings, I opened the touch click setting, but it doesn't work, I can't get interaction on the buttons I tried touch input, it doesn't work in the combobox, it doesn't work in other places, it works in other places, I tried to write into the button, it didn't work again, what to do to make it work on the phone

lost sky
# maiden wadi You didn't pass the PlayerController you want to enable the input for.

https://youtu.be/KE_8OwmHY-A Can you please look at minute 8:17 ?
This guy doesn't seem to need to enable inputs yet it works

๐Ÿ‘‰Get Access To All My Unreal Engine Courses At : https://www.unreal-university.com/courses
๐Ÿ‘‰Get My Free Unreal Engine Beginner Course : https://bit.ly/46mUWMr
Intro 0:00
Event Being Play 0:36
Event Actor Begin Overlap 1:20
Event Tick 2:09
Boolean Nodes 2:38
Interger Nodes 6:01
Vector Nodes 8:17
Delay 10:29
Retriggable Delay 11:02
Flipflop 12:23...

โ–ถ Play video
maiden wadi
#

That is in his possessed pawn.

lost sky
maiden wadi
#

It has input enabled from possession.

lost sky
#

I'm confused

#

Why do I not have possession?

maiden wadi
#

Because what you created isn't a pawn.

floral quarry
#

You need to set it up in the begin play of your character

#

Otherwise

#

you can use the Debug key

#

Those work without input

lost sky
#

The video is also an Actor
but I even tried on pawn, it didnt work still

lost sky
maiden wadi
lost sky
floral quarry
#

the "debug key [instert key name here] node

#

it's for testing

maiden wadi
#

Debug keys still require input enabled.

floral quarry
#

Does it?

maiden wadi
#

They do not require an applied context mapping. But they do require the actor to have input enabled.

floral quarry
#

Maybe set up enhanced inputs

lost sky
#

Okay but pawns don't require enabling right?
why does it not work on my pawn then?

maiden wadi
floral quarry
#

^

maiden wadi
#

Pawns require possession to have input enabled. Consider something as simple as a character and a car. You don't want inputs in the character when you possess a car. Likewise when you exit the car and repossess the character, you don't want the car to drive off when you hold W expecting to run. Thus possession enables and disables input based on which pawn your playercontroller is currently possessing.

#

Well, require is a bad phrasing. They don't "require" it. But they do it automatically.

lost sky
#

I need to watch some videos explaining this stuff
there's alot i dont know

maiden wadi
#

#GameDevLife

lost sky
#

the unreal learning library is so overwhelming though
where do you recommend I start?

#

Is this the place to start?

warm fern
#

Is Blueprint composition the wrong path to be taking in Unreal? I am a new Unity convert and have been approaching Unreal designs using my Unity understanding, but have hit some walls I don't understand. I have built out two Blueprints; one for a "Collection Zone" that holds references to anything that overlaps it with a specific configurable component and one for a "Hand" that the "Collection Zone" would be attached to. I then created two "Player" Blueprints and added the "Hand" Blueprint to both as a child then added the "Collection Zone" Blueprint to each underneath the "Hand" Blueprint instance. In the "Player" Blueprints with the "Hand" and "Collection Zone" Blueprint instance children I cannot change any variables like the "Handedness" value on the "Hand" or the "Collection Zone" class to check for. Any pointers on how something like this would be done the "Unreal Way" (and not have to manually setup everything in each player)? Side Note: Both the "Collection Zone" and "Hand" Blueprints have Actor Components on them for their functionality.

lost sky
#

Or this?

maiden wadi
# lost sky the unreal learning library is so overwhelming though where do you recommend I s...

Honestly that is a loaded question no one can really answer. Many many factors. Personally I recommend just finding some shitty tutorial to follow for a couple days. Something with a bunch of short 30min sessions that has 10-30 in them. Some "Build a survival game" or "Build a city builder" thing. Follow them. Do exactly as they do. Immerse yourself in the engine. When you're done. Go back through it step by step and do it again but stop and pause to learn why things are being done. You have a lot of concepts to learn still and no single guide will cover them all.

maiden wadi
barren tangle
#

does the projectil movement component affect the collision of the actor??

maiden wadi
barren tangle
#

ok so i had a root scene that was not good with a sphere. i guess there was an issue like that. i remve the scene and only keep the static mesh and it's ok

slender mural
#

there should be a node for this

maiden wadi
slender mural
#

checking against table rowstruct

maiden wadi
#

Not really sure there's a big point for it? You're already checking it with the GetDataTableRow.

slender mural
#

unnecessarily checking against the hashmap to do so.

#

Data table row handles are a very neat feature, and would be worth fleshing out

maiden wadi
#

You can check if the Datatable is not null and that the FName is not "None". There's a helper for that in C++. But it won't specifically tell you if that row actually exists in that datatable without checking it same as GetDataTableRow does.

slender mural
#

I can make a custom thunk in c++ in an hour that will do exactly what I want. I'm mearly voicing an oppinion.

compact fable
#

Does anyone know much about collisions? I am attaching an actor to my actor and setting that actors collision to query only but it's affecting the character movement as if it still have collision on

bold torrent
#

In blueprints, how would you move a primitive component around (with Set World Location etc) while keeping world collisions enabled?
The Sweep boolean works, but once a collision is detected it doesn't update until the collision is lifted

gentle urchin
#

Lifted as in backtrack a bit?

bold torrent
#

I'm setting an objects location with the crosshair, and if I drag it into the ground it registers the collision when Sweep is true, but if I drag to the left or right from there nothing happens, until I lift the crosshair up from the ground

#

With Sweep off, the object just clips halfway through objects around it

gentle urchin
#

Couldnt you offset it with the sweep result ?

#

If thats the behaviour you're looking for..

bold torrent
#

You are probably correct, I was just about to test it out ๐Ÿ˜„
When a collision is detected = Offset the primitive by a unit or something to keep it moving

gentle urchin
#

I think you can figure out penetration debt from the sweep aswell ?

bold torrent
#

Probably, but I don't think I need it for what I'm doing. As long as the object keeps moving alongside the surface when the target vector is penetrating another object I will have achieved the intended behavior I'm looking for

graceful kite
#

Sigh. New to Unreal 5, the whole enhanced input is driving me crazy. I've used the old methods before but something as simple as moving a camera doesn't want to click for me. Yet to find a tutorial that just starts from scratch with oet yet either, even trying to reverse engineer the premade projects hasn't gotten me far

slender mural
#

Input-Action Object == Actions as you would define them in the project settings.
Input-Mapping-Context Object replaces that entire menu

#

So you need to Add->Input->InputAction for every single key-press/Event/input action you need.
MoveForward, MoveRight, Jump, ect...
Bind all of them up in an Input-Mapping-Context

#

*Enhanced Input Local Player Subsystem needs to be called from a player controller

thin panther
#

Often, a crash

#

It means something went wrong, bad

fallow osprey
#

Nothing, if it's a shipping package

burnt badger
#

anyone know any tutorials to add button panning to increments of say 90 to rotate camera around person or could help me with code to do what i want it to do?

fossil wharf
#

Hey.

#

I made an animation. My goal is to play animation on button press

#

The problem is with the first one

#

I dont know how to freeze it

#

At the last frame

slender mural
#

I think if you want to freeze it like IA->press hold IA->release you would need to create a state machine.

fossil wharf
#

What for?

#

I found something about notify event

slender mural
#

Animation montages play single fire animations. If you want to hold a state you probably want to blend a pose in your animation blueprint

#

Notify events are events that fire in your animation BP. They are triggered from animation montages

fossil wharf
#

Ah

slender mural
#

might try this actually

#

these are in Anim bp

#

there is also this event in the character

copper chasm
#

If I were doing something like D&D stats, and I wanted to make each stat its own struct so I could modify it and track those modifications - could I slap all those structs into an object and put them on the character as a component?

#

I'm pretty sure I could and I could test quickly, but I like asking first so I don't feel disappointed when I dumb it up ๐Ÿ˜„

slender mural
#

Arn't D&D stats as simple as an integer value?

copper chasm
#

Well, the stats themselves sure - but what if your item gives a bonus, a buff gives a bonus, whatever - you could probably stick those in as they go but I'd like to streamline that calculation

sudden monolith
#

how do I change a widget size in the blueprints?

copper chasm
slender mural
#

buffs have a lifetime, and items are equipable.

copper chasm
#

ok

slender mural
#

In my mind your stat struct would look like {BaseValue=10,ItemValue=0,BuffValue=1}

sudden monolith
copper chasm
slender mural
#

and then getStat(ID){return BaseValue+ItemValue+BuffValue}

sudden monolith
copper chasm
# slender mural and then getStat(ID){return BaseValue+ItemValue+BuffValue}

I guess my question was more about the component aspect, as I haven't used them very often - I know how I'm setting up the stats and whatnot, but instead of putting them in as variables directly on the character base bp, I could make an object that has them, and add that object to the character base so I can call on those structs as needed instead of having them sit in the variables list

slender mural
#

Components are good and useful lol. the lend towards a modular design.

#

It doesn't really matter where you put the logic

copper chasm
#

but like, that is how that works, right? info in object, add object as component to character

#

i guess I was looking for a very specific very dumb answer lol

#

My blueprints were messy as sin so I'm recreating them all in a new project and trying to make it more clean, now that i know it works

fossil wharf
#

@slender mural

#

this might work

#

since fuckyoustop is like reversed animation

slender mural
#

yea that's workable

fossil wharf
copper chasm
slender mural
#

probably not very scalable

fossil wharf
#

i mean, there's not gonna be many ia -> play montages anyway

slender mural
#

sounds like a situation of if it works it works

fossil wharf
#

But there's a problem.

#

Animation doesn't play till the end, really. It's just playing to the half of all frames

#

In such flow

slender mural
#

bro learn how the Notifies work

fossil wharf
#

Like here xD

#

Even though it's full MM_Idle2

#

It doesnt play till the end ;-(

#

Ah maybe it's because of the blending out or something

slender mural
#

you can create an animation sequence from a single pose.

#

and then add it into your state machine

#

or you can do the montage thing the way you have it setup, add a notify, and see if it spits out the right name

fossil wharf
#

This works really good

#

I just turned off blend out from first montage

slender mural
#

If you do it that way I would add an interface for the AnimBP add a three functions called Pose begin, PoseHold, and PoseEnd

#

select by enum, and utalize that pause montage function I showed earlier

#

that way you can hold the pose at any arbitrary location

languid cliff
#

So there is string to color
and it have a flag for returning false if it was unable to identify the color
there should then be a list of named colors that unreal use to check that against,

do anyone know where I can find that list of named colors?

slender mural
#

scratch that I forgot you can add sections

balmy viper
#

When my character hits a trigger it starts simulating ragdoll physics, which works, but it also seems to get a large impulse applied. Any ideas?

languid cliff
#

oh i think i understood it wrong, saw it and assumed that "red" "black" "green" type sting would be used

slender mural
#

yea, that doesn't seem to be the case

languid cliff
#

this looks to take in the actual rgb as text and parse it

azure walrus
#

Hello, the pedestrian is supposed to run away when a gunshot is fired, but currently he runs away at every sound. I wanted to control this via a report noise event with the tag Gushot but unfortunately the sound is not filtered - any ideas?

lunar sleet
fossil wharf
#

Problem here is that I can fire this in the air

#

And the character freezes in air as long as I hold the button xD

#

The idea is to check first if the character is basically idle or something

#

or like in the state of being on floor

#

if that makes sense

lunar sleet
fossil wharf
#

Thanks

#

Works great

#

Now the replication part

blissful moat
#

Hello, is there a way to create blueprints in my level that is separate from the Level Blueprint? I want to create a manager to assist my AI in the level. The idea is that the AI checks if a manager is present in the level and then spawns one if there isn't one. I know I can do it by spawning an actor in the level but that feels a bit hacky. Is there a better and cleaner way to do this?

iron idol
#

I have a variable on my characters for spells to keep track of what spells they have. When I remove a spell from the array variable on the character and wipe save, the character has spells I didnt assign to it. Does anyone know if this could be because the array is a class reference as opposed to an object reference?

hollow yacht
#

Does anybody know how I can reference this actor to set up a texture/material update?

#

The issue I'm running into is that this object isn't treated as a traditional mesh object and so the Dynamic Material Instance method (which seems to be the most common thing I find online) doesn't work for this particular object.

brazen stirrup
#

hey guys for a ledge detection system i was thinking of doing a sphere trace, if it hits something then do it again, and if it still hits something hit again until there is nothing that the sphere tracec

#

would this be performance heavy if its done every 3-5 seconds based on the ability cooldown?

#

I should rephrase my question

#

I meant edge detection, so if the player is aiming for a edge of a object, they are teleported to the objects surface instead

#

kinda like a aim assist

#

used in games like aragami 2 and spiderman ps4 as well as sekiro

balmy viper
#

@outer echo "This also leads me to believe that the event on tick is also working correctly." - Don't be led to believe ... put in a PrintString in the OnTick. If you see 50ish messages a second, you know that code's being called

balmy viper
#

Eliminate 1 unknown at a time

outer echo
#

Thanks for the input

balmy viper
#

np

outer echo
#

I'm testing rn where or not manually changing the angle on the make rotator node is actually reflecting in game

outer echo
# balmy viper np

also, I really do appreciate the swiftness and cordiality of your response. I wasn't expecting that and was expecting people to be much more difficult to work with

balmy viper
#

some people are, but there are also more ... understanding people ... we are all on the same road, at different points along it

#

Did you add the tracewrite? What happened?

outer echo
#

I'm testing the printstring now. I'm kinda split attention wise between multiple things (kids) and this so it takes a minute

brazen stirrup
#

ok so here is what I came up with:

#

I think the sphere is only picking up the object once, even if its set to overlap

balmy viper
#

What happened to all the other nodes in the Tick?

outer echo
#

oh, I disconnected them for simplicities sake

balmy viper
#

up to you ... didn't have to do that ... just insert a print string between the Tick and your first node

#

So this Event Tick is in the event graph, right?

outer echo
#

yes, it is

brazen stirrup
balmy viper
#

have you dragged an instance of this blueprint into your scene?

fossil wharf
#

@lunar sleet alright, replication works

brazen stirrup
#

or am I just reinvinting the function here

fossil wharf
#

also made the animation so i know the workflow now etc

#

great :-D

outer echo
outer echo
#

Oh, well, it didn't this time, I just see a black screen and hear music. I'm using a world that someone else made for the mod that I'm now expanding upon

brazen stirrup
#

nvm figured it out

#

with one sphere trace

balmy viper
#

What's the game and what's the mod?

outer echo
#

Mechwarrior 5 mercinaries, mechwarriorvr

balmy viper
# outer echo Mechwarrior 5 mercinaries, mechwarriorvr

Well I don't know ... you may be reaching a little outside the sphere of your current capabilities trying to mod a game like that. Debugging a situation like you've described, with black screens / freezing etc ... is probably a little beyond the scope of this forum. If it were a game you'd made, it would be a lot easier

#

with someone else's project it could be anything going wrong

outer echo
#

I gotcha, I'll keep chipping away and see what's up. I've moddified another blueprint in the same mod and deployed it and it works flawlessly, so I'm optimistic

past hull
#

hello, how to check if a reference is empty or not ? I tried with is valid but it doesnt seem to work, my function here always goes to the print string function.
The function should simply check wich weapon slot is available and return 1 for primary, 2 for secondary, or 0 if both are referancing a weapon.
the final goal is to have a 2 weapon system for my fps game

iron idol
#

make a print string with the name before it fires

#

if it gets the name then it understands the reference

past hull
#

thank you ahah

iron idol
#

no problem. happens to the best of us. Glad you figured it out.

#

I have an array variable on my characters that tells the game what spells they have. I'm trying to add a spell in game, though a new spell is added, it doesnt seem to recognize the spell and its blank. Could someone tell me what I'm doing wrong here

orchid loom
#

sorry, I follow a tutorial in youtube, is from lisowi the inventory tutorial, and i want to ask for a method to only allow certain type of item to enter the hotbar, can someone help me pls?

balmy viper
#

can save a bit of space / less nodes

chilly hazel
#

Est qu'il y a des gens qui parlent franรงais ici

unborn orchid
#

I must be missing something really basic: Can anyone tell me why my line trace + niagara beam is not ending when it hits something given the logic that I've set up here?

lunar sleet
# unborn orchid

For starters make sure your param name is exactly precise no extra spaces or whatnot. Then print the actual impact and see if you actually get what you want

chilly hazel
unborn orchid
lunar sleet
#

Now you know what to debug

#

Also your line trace has an actual draw

#

Set it to duration or permanent to visually debug

unborn orchid
#

yep that doesnt look right

#

I guess I am missunderstanding how to set the vector paramater node because if I break the execution line before that, it works exactly as intended, the debug draw and the actual beam are right on top of each other.

reef totem
#

any better way to do this to allow the bucket to properly collide with physical cubes?

unborn orchid
# lunar sleet Now you know what to debug

So apparently if I split the pins of impact point and take only the x value of that vector, the beam points into the intended direction agian but it still goes right through any object even though the impact point x is now the new beam end. I am not sure where I am going wrong right now.

tulip anvil
# reef totem

are you locking the cube in place somehow so it doesn't bounce out? in my testing a physics actor normally just stays on top of a moving platform.
alternatively you could put in a box collision and move all actors in the collision along with the basket.

reef totem
#

im going to try a different aproach and attach the basket with a socket/constraint

#

currently its just a staticmesh child to the main body

dawn gazelle
# reef totem

I'm not sure if this is the answer, but try changing the tick group on the timeline to during physics or post physics.

reef totem
#

ill give it a try thanks

crimson prawn
#

Hello Is there an event when a controller is just plugged in?

unborn orchid
#

Okay after some further experimentation, I simply do not understand why impact point X is always the same even though the line trace is moving. Anyone has an idea why that might be?

tulip anvil
# reef totem sadly did not work :/

if you just drive around without moving the basket up/down it stays in without glitching through and freely moves around within the basket?

tulip anvil
#

that is very odd

#

yeh i got nothing, because if it was the case that it simply doesn't detect the collisions of ur child mesh properly it would fall out when moving too, and moving it up should detect the collisions phasing into eachother and then pushing back out.
if changing it to a socketed mesh works idk if i'd be more or less confused.

reef totem
#

here is the hierarchy if that helps

reef totem
mental trellis
#

Oh. You did!

unborn orchid
#

Okay so I figured out that the impact point was being detected INSIIDE the mesh of my enemy. I fixed that with the Actors to ignore input on the line trace by channel node.

#

However, this logic still does not seem do be shortening my niagara beam.

#

I can see that the impact point is being correctly detected now but me setting the vector parameter x value of the niagara system does not set the beams end point correctly. If anyone has a pointer I'd really appreciate it!

tulip anvil
unborn orchid
#

that just seems to offset the entire beam in a really weird way instead of shortening it.

#

I think I may be missunderstanding how the paramater node works.

mental trellis
#

Have you tried taking the hit location away from the start location and getting the length of that vector?

#

And then using that as your X.

#

I'm assuming X is "forward" for the laser.

unborn orchid
#

it is.

unborn orchid
#

Okay so that is definitely working somewhat

#

But it is also creating some really wonky behavior

#

this is the logic I am using now.

mental trellis
#

Don't just use X.

#

Use the entire vector...

#

What you want to do is, on the output of that - node, use a vector length node.

#

And plug the result of that into your X parameter.

#

And use the entire vector, not just the length of X.

median kiln
unborn orchid
#

That worked perfectly, thanks a bunch, I've been sitting on this for a while now!

#

I assumed that if I just plug the impact point from the break hit into the x param of my set vector param node it would work.

bitter folio
#

I have a health system and I'm wanting to increase max health without messing with the current HP How may I do that? (This is under a Pickup) Im pretty new and im trying to learn, any help is apricated!!

rugged wigeon
#

You are currently calling Set Health

#

You want to call Set Max Health

bitter folio
#

Right but how do I make the Varible Max Health actually effect the max HP?

rugged wigeon
#

max health should be the max hp. you might be meaning to ask how do you make the max health get reflected in the game ui?

bitter folio
#

Id assume its bc I need to do something more with the variable?

#

Here is what it looks like currently

#

Do I need to set Max Health as the Health variable's max Healh?

tulip anvil
bitter folio
tulip anvil
#

when healing compare health+heal amount to max health, if (health+heal amount) > max health set health to max health.

#

@bitter folio

bitter folio
#

Thank you

#

Thank you both for your help, its all working!

dawn gazelle
#

Could just use a clamp node to always clamp the value of health to max health

bitter folio
#

had no idea that was a thing

#

How may make it so when this gives me health it updates my health bar?

frosty heron
#

You can have widget listen to the change using event dispatcher

#

Btw make your nodes less of a spaghetti, a few more nodes and it will be unreadable

bitter folio
granite dome
#

a item i want my character to place only show up in a certain hieght and i dont know how to fix

obtuse kiln
#

I can understand my own spaghetti fine even when it's true chaos, but I should probably still get better about commenting just so I can understand what the hell is going on when I'm plugging in something that someone else came up with, from a tutorial or forum post in 2015 or whatever...

also should probably start setting variables and using them instead of dragging whatever object or float off an event like ten times...

frosty heron
#

Just don't make spaghetti

#

Use reroute node, make it pretty

maiden wadi
rugged wigeon
undone bluff
#

yea use lots of functions

#

you don't even need to make local variables for inputs

#

you can place them as get nodes as is

#

optimally you avoid wires long enough to even need a reroute

bitter folio
faint pasture
bitter folio
faint pasture
bitter folio
#

at the moment on damage

faint pasture
#

Keep that same energy

#

negative damage is healing

#

bam, done

bitter folio
#

I had that thought tbh was hesitent to do it bc I had no idea if that was a no no xD

faint pasture
#

I always prefer to keep things consistent

#

The only thing that makes it feel weird is that the node is called Damage

#

if it was called ModifyHP then it'd be a no brainer

#

but I'd do it that way

#

why have 2 ways to change HP and trigger a UI update when you could have 1

bitter folio
#

well wait, maybe im just brain fried atm but im not using damage I dont think

#

just subtracting health

#

Im seriously overthinking this ๐Ÿ˜…

faint pasture
#

That looks fine, but you would instead want to use a clamp instead of that branch

#

Damage -> HP = Clamp(HP - Damage, 0, MaxHP) -> update bar -> if HP nearly equal 0 or whatever your test is -> kill self

bitter folio
# faint pasture What happens when you subtract a negative number?

yeah it still don't update it, I have the blueprints for "healing" in the blueprint for my healing box, I think I need to just cast what happens there to my health bar widget, But im soo lost on how to do it exactly, ive gotten a few responses but im not sure how to do it as I haven't used some of the things they are telling me to use before

faint pasture
bitter folio
#

I think it is

little orchid
#

Forgive me I'm somewhat of a noob, but I need to know how do you call the play or reverse from a timeline, that need to be connected to a branch so for example from the true branch you're going to call Reverse, and from false you're going to call play? Nvm, figured it out..

faint pasture
#

don't modify hp

bitter folio
#

ah

faint pasture
#

then it'll go through your current damage handling code, just with a healing number

bitter folio
#

Though now if it ticks 2x it kills my character

flat warren
#

Beginner here, anyone know how to make this rotation happen more gradually? I tried a timeline but couldn't get it working. Any tips would be appreciated

frosty heron
#

Timeline for fixed length,
Interpolate with tick if no fixed length

#

that's your only option

flat warren
#

how do I get the return value of Z to affect the timeline. Its currently rotating an npc

frosty heron
#

You use timeline when you need to get from point A to point B at SPECIFIC lenght(time)

#

is that the goal here?

#

meaning, the start and the end rotation is already pre-determined before the timeline start

#

changing them on the fly will give different result

#

use Interpolation on tick if you are not trying to get to A to B in X seconds

bitter folio
flat warren
#

Sorry I am a bit confused, Ive got the rotation it needs to get to (which is the find look rotation), and I just want to rotate the npc to that direction

frosty heron
#

if you just need to look from A to B at constant speed, use interpolation

#

if fixed time (e.g. you want it to go from A to B in X seconds) then use timeline

#

I can't suggest to use timeline or to interpolate on tick unless you tell me what you want

flat warren
#

It doesnt need to be done in a specific length of time, but also could be. Whichever is easiest. I just dont understand how I use the values when using a timeline, the only input is "new time"

frosty heron
#

It's not about easiest but using the right tool

#

I'm just repeating my self over and over now

#

Timeline only works if the length are specified. Length being the time in seconds

#

Any other use case interpolate on tick

flat warren
#

How would I use the timeline, because the changing value is predetermined right? I need to be able to input my end point

#

Thank you for your help

frosty heron
#

Set the start rotation and the end rotation b4 you execute the timeline

#

Start rotation being the current rotation of the actor

#

End rotation would be the end rotation ( so the look at rotation ) in your case

#

Have a go at that then post your code @flat warren

flat warren
#

@frosty heron I still don't understand how to connect them

frosty heron
#

Have a start and end rotation variable

#

Since you just care about the z you can use float here

#

Call it start z rotation and make another variable called end z rotation

gentle urchin
#

Tick is more appropriate here imo

#

With an optional gate if its conditional

bitter folio
#

So this is a pickup that increases the max hp of the player, how may I make it so it also updates the health progress bar to show?

dawn gazelle
#

Your UI should be trying to read its values from the relevant actor that has the health, or listen to event dispatchers that you would call when the value changes so that the UI can just update itself.

bitter folio
#

Not sure how to do that exactly

#

At the moment it only updates off damage I think

orchid loom
#

sorry, I follow a tutorial in youtube, is from lisowi the inventory tutorial, and i want to ask for a method to only allow certain type of item to enter the hotbar, can someone help me pls?

frosty heron
bitter folio
#

Thank you

frosty heron
#

You want the widget to listen to event being broadcaster when the hp is changed

gentle urchin
#

And ypu want to create a method for changing hp, so you always call the correct stuff when it changes ๐Ÿ™‚

bitter folio
frosty heron
bitter folio
#

The one by Matthew is clearing up some things

frosty heron
#

for what you are doing, event dispatcher will do wonder here, but you will struggle to use it if you don't know how to communicate between different blueprint classes

bitter folio
#

I hear ya, I know this is beyond basic lol It'll probs take me a little for understand this

#

thank you for helping me

bitter folio
orchid loom
#

how i can get a local variable in other blueprint?

marble tusk
#

so does this Download Image node not support webp? Or am I missing something because this always fails

#

I did try directly pasting a working url into the pin too

#

I'm assuming it doesn't support webp, but I don't need it to since I replaced webp with png and it works

#

It's still odd how Discord uses webp for avatars, emoji and all kinds of stuff, yet you can't send webp images in chat sweeney_activate

#

Luckily they do have png versions crumpHappy

raw kite
#

How do I get a blueprint to update in the editor when an object it's referencing is tweaked?

In my case, I want to move an object in my blueprint using the transforms of a camera, which I'm referencing using a Cine Camera Actor object varaible. But the blueprint doesn't trigger when the reference camera is moved around, only when I directly edit variables using the details panel. I'm using a construction script, but it looks like none of the default triggers in the event graph would be helpful either, updating only during play (which doesn't help me in the editor).

prime stump
#

Hi, how bad is using get all actors with interface? I've got an ability on my character that when active I want to send a message out to other actors so they can do their own stuff if the ability is active or not.. is it best to use an interface for this or event dispatchers? i'm trying to remove some dependencies because right now im making all the changes to these other actors from my character class when really the actors should be doing them themselves

mental trellis
#

Get all actors is just bad in general.

#

I'm not sure if interfaces are hash bucketed like regular classes, though.

prime stump
# mental trellis Get all actors is just bad in general.

What's the alternative to using get all actors, if you need to get all the actors? and how's best to do this kinda thing, i wanna send the message out that the ability is active so these other actors can react to it without having everything referenced making them all dependent on eachother which i dont think they should be

mental trellis
#

You may actually have a good use case for get all actors of class. It's rare people actually need all the actors of a certain class and just abuse it.

#

"get all actors of class for my main character" ๐Ÿ‘

thin panther
#

This honestly sounds like a thing for a dispatcher.

If you want to broadcast an event. If you're willing to go third party, there's also the gameplay message router, which allows communication between unrelated actors

prime stump
thin panther
#

Sure, however a direct ref to the character is a lot better than the character directly reffing everything else.

#

Your character will always pretty much be loaded, the other thinfs won't be

#

Though I really don't know why gameplay message router isn't a core thing in the engine ๐Ÿ˜”

#

Your method will work, btw, I'm just giving alternatives

fiery swallow
#

btw it's totally fine to have direct references to base classes, you could put the event dispatcher there and still call it on the actual actor that activated the ability

#

that only matters if youplan to go with his alternate method

prime stump
jaunty badge
#

hi there
how can I change things then, the sphere don't rotate around the cube even if the cube moves fast?
the relationship between them is a simple physic constraint without any change.
sphere mass is too high but it seems that gravity could not handle it.
I want to sphere to be under my cube all the time. think that a helicopter is flying(cube) and moving some object(sphere).
would you help me?

tawdry walrus
#

in the details panel

jaunty badge
past hull
#

hello,
How can I get the object reference from the "Weapon to spawn" Class reference please ? On the second image it is used in the spawn actor node and it returns the object. But what If I want to object before spawning it ?

tawdry walrus
iron idol
#

I seem to not have the new ue5 mannequin in my 5.4.2 project. I cant seem to do the in engine animation. Anyone have an idea as to how I might fix this?

mental trellis
#

You may need to expand on what a "basic horror character" is.

jaunty badge
bitter folio
#

Right so im trying to learn event dispatchers, I have an asset called HealthPickup and im trying to just play a sound for now when ever the character goes over it. This is what I have atm but it wont do anything, if anyone knows why that would be amazing

vernal lotus
#

how does this work?

#

I'm just stunned rn

gentle urchin
vernal lotus
#

I need someone to tell I'm not the only one seeing this

gentle urchin
#

the binding is setup on beginplay, so.-. are you sure the delegate is called after beginplay ?

bitter folio
#

oh, how might I go about fixing that?

gentle urchin
#

well.. what is triggering your on overlap ?

#

if you had to walk somehwere for it to trigger, then you'd know it'd be after beginplay

#

you can add print strings at both places, and see which order they show up in

#

the lower one came first (so add context to the string being printed, so you know who's who)

bitter folio
#

Ohhhh that clears alot up, let me try to see if I can implement that

bitter folio
gentle urchin
#

you want to bind to the delegate as soon as possible usually

#

Well, you have the pickup right?

bitter folio
#

correct

gentle urchin
#

which triggers some overlap and interaction with the character?

#

Hopefully through a public function ?

bitter folio
#

When player overlaps with it, the max health is increased

gentle urchin
#

so

#

this is not a public method

bitter folio
#

ah

gentle urchin
#

you should encapsulate the logic that belongs to the character inside the character bp

#

while externals may call exposed functions (public ones) on your character, you shouldn't let them manipulate internal variables!

#

Reason being exactly this, in your example;
You want several things to happen when MaxHP Increases on the character

#

if you were to manipulate this externally, you'd need to make sure you update every single thing you expect to be updated, when this variable changes

#

While if you wrap it up in a function inside the character, it's done, forever!

bitter folio
#

Ohhh

gentle urchin
#

and if you have a bug, or wanna expand it (call extra delegates, start auto regen or whatever), you only have to fix in one place.

bitter folio
#

I see my bad, i've been using tutorials online to figure out somthings then applying what I think I need to make things work, had no clue it should be like that

gentle urchin
#

While they show you some ropes, they usually bring along bad practices

#

you may still follow them to get a grasp, but I'd at the very least suggest trying to always consider how the logic could be encapsulated into it's owning class

#

after all, thats why we have all these classes

bitter folio
#

So, should I make a event dispatcher to call the max hp being updated?

gentle urchin
#

separation of concerns

bitter folio
#

At the moment my Hp Updates inside the Character off of damage

gentle urchin
#

In this case you want to :

  • Create a function for manipulating MaxHP in the BP_ThirsPersonCharacter
  • Inside the function , you manipulate the MaxHP variable, and call the MaxHPChanged delegate
bitter folio
#

Inside the function , you manipulate the MaxHP variable, and call the MaxHPChanged delegate This being in the thirdperson character still?

gentle urchin
#

Is that who owns the MaxHP variable?

bitter folio
#

yes

gentle urchin
#

there's your answer ^^

#

encapsulating logic is a general principle, and I'd advice you to strive to follow it as best you can

bitter folio
#

then I can just bind the event to the HealthUp pickup right?

gentle urchin
#

your binding can just stay as it is

#

not really sure which BP is binding to it, but it should normally work from beginplay (unless you start already overlapping the MaxHP booster thing)

bitter folio
#

It would of been this I think (this is in the thirdperson character)

#

Anyways thank you for your help, you have taught me alot just now ๐Ÿ˜…

gentle urchin
#

which bp is this tho ?

bitter folio
#

?

gentle urchin
#

oh nvm i read below not over pic

#

xD

bitter folio
#

xD

gentle urchin
#

so

#

~~ encapsulating the pickup logic~~

#

The character shouldnt react to an overlap like this

#

since the character dont really know what iti's overlapping

#

so pushing MaxHPBarUp isn't something you wanna do

#

you only wanna broadcast it when MaxHP changes

#

and with your new encapsulation, that happens automatically by now

#

due to this;

#

which should call the AddMaxHP function

#

and not touch internal variables from externally*

bitter folio
#

You kinda just lost me ngl, I had not exactly set any of it to work yet, I was just trying to make them communicate first

#

So the MaxHp being changed from the pickup should be defined in the Player BP?

gentle urchin
#

The underlying logic for changing MaxHP should reside in PlayerBP

#

so inside a function

#

then the pickup thing should call this function

#

gimme a sec ill open a dumpster project

bitter folio
#

thank you

gentle urchin
#

In the PlayerBP;

bitter folio
#

Oh I see

gentle urchin
#

and then inside the pickup thing;

#

Now if you were to... only have like 3 different pickups for max HP, I would take it one step further

#

Lets call them Small, Medium and Large

#

I would possibly create 3 more methods (or add some enum or gameplaytag to identify which one )

#

doing this would once again achieve that any update to these settings would only need to be changed 1 place

bitter folio
gentle urchin
#

this example would still be inside the PlayerBP ,

#

then the pickup would simply call the correct one

bitter folio
#

Ohh

#

I think I get it now

gentle urchin
#

third option with tag would use something like a switch internally

bitter folio
#

Alright

#

Thank you so much for the help, this was eye opening xD

gentle urchin
#

100 ways to skin a cat, ofcourse

bitter folio
#

yeah lol

#

also a cool way of doing it

mental trellis
past hull
#

dumb question , how do I create a variable proper to a function in blueprints ?

dawn gazelle
barren tangle
#

hey, with a pawn, is there a way to find the number of the player controller that control that pawn?

dawn gazelle
# past hull yes

With the function selected, you'll have an option for creating a local variable.

barren tangle
#

if i spawn pawn, for multiplayer (local) and i need to find the number of the controller that is used by the pawn.

dawn gazelle
past hull
gentle urchin
#

Why you cry Datura ? You dont like the tag to health switcheroo? ๐Ÿ˜…

lunar sleet
gentle urchin
#

Woops. No cats where harmed during the experiment !

dawn gazelle
gentle urchin
#

Ah yeah that'd be something !

reef totem
eager thicket
#

does the delay node in blueprints continue to time out if the game itself is paused?

steady night
#

hey guys need help

#

im trying to launch character away from a location (this not launches away from player)

rugged wigeon
steady night
#

?

#

@rugged wigeon

#

cool seems to work

bitter folio
#

is there a way to decrease the size of the red health when my max hp goes up without the bar getting bigger?

gentle urchin
#

Its height?

bitter folio
#

no like say I have 100 hp then I gain 20 max hp, I'd like red being the current Health "lessen" and then there be room to get 20 more hp without bar size increasing

patent mango
bitter folio
patent mango
dawn gazelle
#

So yea, as sherlock said, every time you modify either of your health values, you'd want to recalculate the percentage bar's displayed value by current divided by max.

bitter folio
#

I know theres def somthing wrong here, It seems like it updates the health to the max hp atm but the progress bar is not going above 100

patent mango
#

wait

bitter folio
#

yes I have a pick up that sets it to 120

#

Id asume its bc the health bar widget is set up wrong?

patent mango
bitter folio
#

good question

patent mango
#

๐Ÿ˜ญ

bitter folio
#

๐Ÿ˜…

patent mango
#

if you have updated max health no need to set it

#

instead health / max health and send that pin to the input of set percent

#

that should probably work

bitter folio
#

like so?

patent mango
#

just send that pin to in percent

bitter folio
patent mango
#

if you are setting it will be reducing the current health and that is something you shouldnt want

#

ok

#

good

#

now try

#

remove

bitter folio
#

no dice

patent mango
#

the set pin

bitter folio
#

oh my b

#

nah still nothing

#

Im like 90% sure I have my widget set up weird

patent mango
#

are you sure you have increased max hp ?

#

by 20 or whatever amount you wanna increase

bitter folio
#

yes I have a debug key to read current hp then when I go heal it heals to 120

patent mango
bitter folio
#

here is how my health widget is set up

patent mango
bitter folio
#

tutorials I watched said it would mess up without that

patent mango
#

ok got it

bitter folio
#

would I not need to do somthing simular as I did for health in the widget?

mental trellis
#

Because percent of often represented as 0->1 instead of 0->100.

#

...for some mad reason.

patent mango
# bitter folio

i think this is wrong because you have used 0.01 to convert health into percentage but on increasing hp by 120 it will work still the same

#

so instead of using 0.01 go with the basic approc of dividing it by max health

#

for example if health is 90 percent will be 90*0.01 that is 0.9 but even if you increase your max hp that function works the same

bitter folio
#

like this?

patent mango
#

yes

bitter folio
#

how might I be able to use the health Variable? do I just create one in this called health?

bitter folio
#

true

#

hm doing the same thing

patent mango
#

can you show the increase max hp function once again?

bitter folio
#

like if I have full 100 hp before picking it up It does not look like anything happens but if im damaged and then I pick it up it sets my health in the bar to max but actual health is not changed

#

this is in the Third person character BP

patent mango
# bitter folio

where do you increase you max hp if not in this function ?

bitter folio
#

from the Player Bp I think

patent mango
bitter folio
#

First is in player bp second is in the pick up

#

ah that set percent should not be there still

patent mango
# bitter folio

why are you setting percent here ? and if you do why create a new function

#

also dont set percent as max health

#

thats wrong

bitter folio
#

Yeah I was playing with it before asking its removed now

patent mango
bitter folio
#

like so?

patent mango
bitter folio
#

Ok it worked but, when healing once it remaxed out the bar

#

also seems like after taking damage the max health displayed it reset to 100

#

๐Ÿ˜…

faint pasture
#

You're making this way more complicated than it has to be

bitter folio
#

I dont know ๐Ÿ˜ญ

#

I just followed a few tutorials over the week on how to set up basic things then did bunch on my own

faint pasture
#

Ok first off, when does the healthbar update?

bitter folio
#

for the current hp?

#

Should be on damage

patent mango
bitter folio
#

here is this, probs hard to read but at the bottem im doing the x.01 thing id imagine thats an issue

faint pasture
faint pasture
#

First off, forget telling the hp bar to update, just have it poll for now

#

get it working before worrying about perf problems you don't have

past hull
#

hey, I have an issue here because I want to keep track the Current Weapon OBJECT, so I created a new variable to clone the value but its only cloning the reference. So when calling Destroy node, it also destroys the Old Current Weapon reference wich make sense.
How can I get a clone of the Current Weapon object ? In oriented object programming I would just create a clone method inside the object and make something like this : OldCurrentWeapon = CurrentWeapon.clone();
But what about blueprints ? Thank you !

bitter folio
#

? the health system works its just the bar thats the issue

faint pasture
bitter folio
#

like so?

faint pasture
#

Sure that should do it assuming 1.0 is considered to be 100%

#

might need to multiply the whole thing by 100, not sure what range Set Percent expects, if its a 0-1.0 range or 0-100

gentle urchin
#

You ditched my encapsulation comment already ๐Ÿ˜ฆ

bitter folio
#

I did?

faint pasture
# bitter folio

Once this is correct, you need to call the same code whenever you change health for any reason (changing the max for example)

#

make sure ALL changes in Health or MaxHealth make it to the Set Percent code

gentle urchin
# bitter folio I did?

Well, i guess not since its in the correct bp. But add a function for chabging hp aswell.

bitter folio
gentle urchin
#

Surely it'll be called from elsewhere aswell, so making sure the dispatcher always goes along with it is a good start

bitter folio
faint pasture
#

In the future, dependenies like this are typically pretty brittle. A better design is to have the health system NOT CARE about a health bar at all. Either the bar queries for the values it needs, or the health system has a dispatcher it fires to let whatever cares know that its numbers have changed.

#

the bar depends on a health value, the health value does not depend on a bar

bitter folio
#

I just could not get it to display correct

faint pasture
woven pond
#

Would some one please help with what I am missing if I am trying to build an array of data assets prferebly by class of a specific PrimaryDataAsset.... im in unreal 5 and trying GetAssetRegistry > get asset(s) by class but it seems to be returning nothing (This could be me failing to build the path as its completely different to any info i found previously if trying to use by path instead of class....)

bitter folio
#

My bad

#

thank you everyone for your patience

faint pasture
#

If you're jsut starting out honestly just polling is fine

bitter folio
#

I started 5 ish days ago

faint pasture
#

hp bar just has to figure out what actor or component it cares about and it can just read the values on tick

bitter folio
#

ah

faint pasture
#

I wouldn't use polling if I was making WoW but if there's only a few dozen healthbars around it literally doesn't matter.

patent mango
# past hull help

why do you wanna keep track of the object you destroyed ( sorry if thats a rubbish question im not so experienced )

past hull
faint pasture
#

or if you do destroy, spawn it again later when you want it back

patent mango
faint pasture
#

I don't think there's an actor clone node but you can store its class then respawn it later

#

the blue pins are just pointers.

past hull
#

Ok so I used the "Detach From Actor" node and it seem to be working

faint pasture
#

Many people having my address doesn't stop my house from being destroyed when it gets bombed

faint pasture
patent mango
#

so about it cant you just keep track of the class.....?

faint pasture
#

Yeah if you had to represent a stored item the class could work

#

assuming the class as default is how you want it spawned

#

or you can just hide it

#

It'd still exist, just be hidden

past hull
faint pasture
past hull
#

I dont know ahah

faint pasture
#

find out

#

does it just float in the air

patent mango
past hull
faint pasture
#

You can leave it attached but hide it, or attach to a back slot, or whatever

#

You should find out where they are going on detach tho

past hull
faint pasture
#

My guess is either they float where they last were or snap to 0,0,0 world coords

gentle urchin
# bitter folio ah

Get owner pawn -> cast to firstpersonchar -> bind to healthUpdated etc

bitter folio
#

whats that for

patent mango
faint pasture
past hull
# past hull

animation is broken but I believe I should fix this in the Anim BP

faint pasture
#

look around

bitter folio
#

oh

faint pasture
#

print location on tick in weapon

past hull
past hull
gentle urchin
past hull
gentle urchin
past hull
#

@faint pasture @patent mango thanks a lot btw

gentle urchin
#

Requires owning controller to be plugged in when you create it tho (Create Widget, that is)

faint pasture
#

I haven't sorted out how to do that