#blueprint

1 messages · Page 325 of 1

lofty rapids
#

you could do a parent of all things you want to make invisible, and the child of that, is the parent of NPC, etc...

#

as a hierarchy

#

then like you say it will be one cast, but one or two i don't see a difference, but maybe you get a lot different stuff it could get quite messy chaining these things

ivory vapor
#

Ok, so here's my version for now. For some reason it have issues, I haven't seen an NPC get out while the black box was visible yet. But when NPC get in, sometimes the black box get invisible for a short instant as if the player got in.

ivory vapor
lofty rapids
#

you can create a parent and re parent i think, i've never done that but i think you can

lofty rapids
void crescent
lofty rapids
#

and your not using the other actor

ivory vapor
ivory vapor
#

isn't how you cast to it?

lofty rapids
#

goto your box that you want to collide

#

click on the box collision in the components top left

#

in the details

#

at the bottom are the events you want

#

on component overlap

#

so that when things overlap the box collision

ivory vapor
ivory vapor
void crescent
#

You are doing the set invis and set visible logic from the box BP? Or do you do some Capsule OnOverlap from character?

ivory vapor
#

I plug other actor directly into cast to bp player then?

lofty rapids
lofty rapids
#

so your casting or checking to see if it's the player

#

then if that fails, check if other actor is the npc

ivory vapor
#

So this?

lofty rapids
#

you want other actor

ivory vapor
#

ok

lofty rapids
#

and you want to out of the cast failed at the bottom, check if its an npc so you can set it's visibility back

#

you check for the player and set the visibility on success

#

but on fail you don't have the check for npcs so they will just be invisible and never go back

ivory vapor
#

And I need to cast npc in begin overlap to set npc getting in the black box invisible too I think

lofty rapids
#

show what you have now

#

you can add the if the box is visible check after

#

for now just make them go invisible, and back

#

thats what your goal is here, you can add a boolean for if the box is visible after

ivory vapor
lofty rapids
#

are they changing visibility going in and out now ?

void crescent
#

There's still a Delay.

ivory vapor
#

Oh yeah good catch

#

I forgot it

#

but it works, they are not setting the black box visibility anymore as well.

I think next thing I can try is move what's in tick into a custom event something like "setoverlappedactorvisibility" and call it after the set visibility of the cube in the cast to bp player.

lofty rapids
#

you don't need the tick anymore, your still running that ?

#

you don't need any of the old code for this @ivory vapor

#

this should work with just whats in the picture

#

a good benefit of doing it this way is these things only trigger when the character start and end overlap

#

instead of what you had which was constantly checking

#

big performance difference

ivory vapor
#

the tick is what makes the npc react on box visibility, without it they just react on begin and end overlap. Which is why I want to put its code in a custom event that I call after the box visibility is changed.

lofty rapids
#

oh ok, can show that code ?

#

because i think you can offload this thing to the component overlap

#

theres really no need for loops on tick here, especially plugged into pure nodes

ivory vapor
#

Imagine this but in custom event called after a change of the box visibility

snow halo
#

Hi, I have some questions.

Im really not that good at design or widget design etc.

This is a chest container im trying to create next to my own widget.

The problem is I don't fully understand how this inventory grid works.

It seems that everything is inside of another thing

lofty rapids
#

same with the bottom one comming out of false, set it on the component overlap end, on successfull cast of player when you set it's visibility

#

instead of this tick stuff

#

tick isn't bad, it's just in thhis case it's better not to use it

snow halo
#

This is the widget im trying to fix, its player menu, it seems like everything comes from here and its filling up on begin play with slots etc. I need to make another instance of this into my chest container 🧰 but I still dont understand how this thing is beign created

ivory vapor
#

So I need two custom events, one for true, and one for false? Or I can call the same for both and let the branch do the work?

lofty rapids
#

because your setting it

snow halo
lofty rapids
ivory vapor
#

So like this?

lofty rapids
#

and add the other code to the component overlap end

ivory vapor
lofty rapids
#

and it "should" do the same thing lol

ivory vapor
#

I'll test it

lofty rapids
#

search for create widget

snow halo
#

for example on my character I have this component

#

and here you control the slots that are going to be created on begin play

lofty rapids
#

this is how a widget is normally created

#

and then add to viewport

snow halo
#

here's the create

#

I dont see an add to viewport node though

lofty rapids
#

this is a sub of the main if they are all inside

#

there should be anothter place

#

create widget

snow halo
lofty rapids
# snow halo

here is creating the items from the inventory, not the creation of the main wiwdget

ivory vapor
# lofty rapids and it "should" do the same thing lol

It does, I set one to be static and a few others to roam around, they get out and in of the house on their own. Everything in the black box isn't visible if I try to see through and if I get in the black box I see them and if I go out the black box come back and hide them again :D

Thanks for all the help I wouldn't have achieve it without you

snow halo
lofty rapids
#

theres probably more create widget

snow halo
#

This is probably the one expanding etc.

lofty rapids
#

widget have to be created at some point

#

in order to use them

#

at some point you create widget W_Player_Menu

#

i think this is your main outer widget

lofty rapids
# snow halo

you'll see a node like this create widget, but the class will be set to a different widget

lofty rapids
#

idk what you mean by that ?

snow halo
#

btw how is it possible that this widget is not added to viewport after being created

#

and yet its on my viewport?

lofty rapids
#

because it's already in the viewport nested into one that is added to viewport

#

search for add to viewport

lofty rapids
#

so for a couple npc np maybe no problem, but a lot of items and your looking at a big issue

snow halo
ivory vapor
lofty rapids
#

this doesn't run every tick, it would just do the loops if the boolean changes

ivory vapor
lofty rapids
agile moss
lofty rapids
snow halo
#

or no, this is actually a widget im not using at all

lofty rapids
#

that looks like something seperate

lofty rapids
# agile moss why??

play round remaining anim target is an actor, and you have a specific type of actor as a reference

#

the types don't match and there is no valid conversion

agile moss
#

sooo, how do I do this

lofty rapids
#

you trying to run a function ?

agile moss
#

an event

lofty rapids
#

ok so is the event inside the widget actor ?

#

the widget manager

#

is the event in there ?

agile moss
lofty rapids
#

ok so try to just when you drag out from the ref, type the event name

#

itt should show up in the menu

#

it looks like you copied the node from somewhere ?

#

it's usually best to get it from dragging out

snow halo
#

unless if I implement it into the chest_bp actor
although thats probably a good idea

agile moss
#

u mean this?

#

it just instantly disconects it :/

lofty rapids
#

thats what your events called

#

also check context sensitive for now it should be fine

agile moss
#

I hate this engine, with a ref it doesn't wanna work for some reason

lofty rapids
#

did you right click and do promote to variable ?

agile moss
#

yes

#

lemme redoit

#

well would you look at that

#

thanks dud

burnt citrus
#

I have a general question about timers (when you create them looping set timer by event for example): when you end a level and load another level, do you still need to kill them or the engine do it in automatic?

lofty rapids
#

"All timers tied to destroyed actors are automatically invalidated"

#

this is what the web says about it

burnt citrus
#

ok good, thanks

wheat knot
#

Hey Unreal devs! 👋

I've been working on a plugin called BP2AI Parser that converts Blueprint visual logic into structured text that AI tools can actually understand and analyze.

The Problem: While C++ devs can copy-paste code into AI tools for instant bug analysis, we Blueprint developers are stuck with screenshots and inefficient image analysis that can't match the precision of direct text input.

My Solution: BP2AI Parser generates two outputs from any Blueprint:

**Structured markdown **→ Copy-paste directly into any AI for debugging/analysis

Interactive Flow Inspector → Human readable with Syntax Highlighting, Navigate complex nested functions, collapse& copy sections

Questions for you:

Does this solve a real pain point for you?
What Blueprint debugging challenges frustrate you most?
Any specific features you'd want to see?
What would you pay for a plugin like this?

What do you think?

Curious to try it when ready? I'm looking for beta testers with interesting Blueprint challenges - You can sign up if you want updates: https://docs.google.com/forms/d/e/1FAIpQLSfn1lyFt86mBNPvOvtJD9Bz9zZlzA3383JmAejDD3H8IMIjHA/viewform?usp=header

dark drum
#

Showing a c++ equivalent would probably be more helpful.

dawn gazelle
# wheat knot Hey Unreal devs! 👋 I've been working on a plugin called BP2AI Parser that conv...

This is just an honest answer - I am all for AI revolutionizing how we do things, but at current technology levels there's still a lot to be desired. I do salute your efforts at trying to further AI development like this.

Does this solve a real pain point for you?

No. Once you're properly proficient at reading through code (both C++ and Blueprint), you normally can spot bugs and problems on your own, and have an idea of where such bugs may be popping up and why. I still consider myself an intermediate user of Unreal despite having about 6 years of working with it. Even if I'm looking over someone else's code, I'm fairly quick to spot issues even if they're using systems I'm not familiar with.

What Blueprint debugging challenges frustrate you most?

Things that wouldn't be solved by issues in code - namely the tools available to inspect values at run time.

Any specific features you'd want to see?

Automated conversion of blueprint code to C++, but I think your tool may only be able to do pieces of the code at a time unless you're somehow able to read an entire blueprint and know how to appropriately call out to other objects.

What would you pay for a plugin like this?

At the current state of AI, I wouldn't pay anything for this type of plugin due to unreliability of the underlying technologies. AI is getting pretty good, but it's still not quite there.

#

My main concern with a plugin like this is that you'd effectively be targeting people who don't know how to step through their code, which is already a big problem we face quite frequently in this Discord. The current state of AI with C++ requires you to know how to read the C++ to know that it's actually good code and that it is usable in the way you want, and that it will actually appropriately compile. A blueprint version doing something similar would mean the person using this tool would need to ensure that your parser has appropriately read their code (learning your markdown) and spot where the AI may have faltered in whatever response back.

lofty rapids
#

"What would you pay for a plugin like this?", i don't need it personally but it might be helpful for others

#

how would you train the ai to understand it ?

wheat knot
#

Interesting, thank you all for your feedback!
To clarify how this works: The tool translates node executions to text, tracing through all selected nodes including custom events, collapsed graphs, functions, macros, and interfaces within your Blueprint boundary. It recursively resolves pin inputs, capturing complex math operations, nested calculations, flow control logic (branches, loops, switches), data structures (arrays, maps, structs), and multi-level function hierarchies. This ensures the generated text maintains the exact logical flow and relationships of your visual Blueprint for accurate AI analysis.

For analyzing the complete Blueprint, just press CTRL+A in the Event Graph to select everything, and it translates into token-efficient text. With multiple event graphs, you select each manually.
Any text-based AI can read this markdown output natively since it's structured text. Complex logic flows like branches, sequences, switches, and arrays are all formatted to be understood by AI text analysis capabilities. With this text-based output you can then ask AI to fulfill your individual needs like:

  • Find bugs and edge cases, especially in complex math formulas | you interpret and validate findings, not magic detection
  • Generate technical documentation for team knowledge sharing | you guide the format and content
  • Assist with Blueprint-to-C++ conversion | you orchestrate what gets converted, not magic automation

This isn't targeting developers who can't debug - it's for developers who want AI efficiency. Just like senior C++ devs paste complex code into AI tools for second opinions or documentation help, this Plugin would give Blueprint devs that same capability.

This is a translator, not a magic code generator. The quality of bug detection, documentation, and C++ conversion heavily depends on your prompting skills and the context you provide alongside this text.

lofty rapids
frosty olive
#

Does anyone know how the set wheel friction multiplier works in ue5? I have a chaos vehicle and I'm trying to change the wheel friction in blueprint so I can change it while playing but I can't figure out how it works. I have it set at 99 to see if anything happens but nothing changes. I think that's the only thing it let's me select as target but not sure

lofty rapids
#

whats the base friction ? web says that can effect this since it's just a multiplier

#

just for test purposes i would use a single variable

#

so you can just set it once and it sets all four

#

and adjust the variable up and down real easy to test

frosty olive
frosty olive
#

Actually when I set it at 0 the wheels just spin and it doesn't go anywhere

lofty rapids
#

but #chaos-physics might know more about what these values should be at for whatever you aree wanting

frosty olive
#

It seems to be working but it's a bit weird

frosty olive
#

Thanks

static forum
#

what are some high level blueprint concepts that you use all the time after you took the time to learn them?

sick sky
dark drum
static forum
static forum
dense badger
#

Heya all, I have an esoteric BP issue that I'm not sure has a solution. But curious if anyone has run into this:
1: I have a BP with a custom component on it
2: The component has some params on it with user supplied per instance data
3: During the BP's construction script the actorBP is iterating it's components and calling update
4: When that update is called all the instance data is ignored and instead the base class data is used

Is there any way I can get it to use the instance data?

static forum
#

I am trying to figure out if there is an easier way to make my inventory. I have bpi and a working inventory all that good jazz. I want a equipment slots that update my players stats, but with my current setup following this tutorial he has only inventory. What I was going to do was have a per player instance entity that is a container that holds the players inventory XD

static forum
dense badger
static forum
#

well to my knowledge expose on spawn lets it take in info, I think?

#

and are you dragging off the component and saying set?

#

like this

#

cause otherwise you are just setting that varible in the actor

#

sorry if I am giving dumb answers, might as well double check the easy stuff

dense badger
#

I'm inside the component when this is happening. I'm just doing a get on the properties. But this is on Construct in the editor.

dark drum
dense badger
#

In game, it reads the correct instance data

dense badger
static forum
#

how would you add a filter to a slot to make it so I can not drop a helmet onto a chest piece equipment slot?

wet swan
#

Reply is a bit late but yes, im attaching actors to a pawn, and when that pawn moves all its child actors does not have collision since only the parents gets swept

faint pasture
#

you'll have to handle that on your own

celest oar
#

im trying to implement a custom anim notify so that my particle effects only play when the mesh is visible, does any one know how to do this? i extended a class in BP but it only has 2 methods that you can override and one of them is for the name and the other doesnt seem to do anything

surreal peak
celest oar
#

i am also still on 4.26

#

google is telling me i need to override this

surreal peak
#

Hm okay. Where do we start...

#

You don't need to extend inside C++, you can potentially extend from the Niagara one in Blueprints, or just extend from the base class and create your own.
And for the "only if the mesh is visible", you don't need to do either of that, in theory. You'd just set your SkeletalMeshComponent to only Tick Pose if Rendered.

#

Since the Pose will drive the Animation, if it doesn't tick the pose when not rendered it won't play the animation and won't trigger the AnimNotifies.

celest oar
surreal peak
#

Well okay, not gonna question that. Try to extend in Blueprints then.

#

UAnimNotify is Blueprintable

#

Should be the same for the Niagara one

celest oar
#

i did without sucess, let me show you what options .26 gives you, you might be able to do it in later versions but i think .26 is limited, i might be wrong tho

surreal peak
#

Yeah that's correct though

celest oar
#

so how do i go about doing that in BP?

surreal peak
#

What are you missing?

celest oar
#

i was assuming that the return on the receive notify function would make it play or not

#

but that doesnt seem to be the case

surreal peak
#

What's the parent of that BP?

celest oar
#

if it returned true it would play and if it returned false it wouldnt

#

should be animNotify

surreal peak
#

Right, the boolean isn't use in C++ at all iirc.

livid dune
#

Hello, I had a question, has anyone done any time dilation with blueprints before?
For example, if I wanted the user to press a button and slow time.

celest oar
#

so am i right in assuming i need to use c++?

surreal peak
#

No, the boolean doesn't really matter here.

#

If this is a normal AnimNotify, so not the Niagara one, then you need to spawn your Niagara effect if your branch is true.

celest oar
surreal peak
#

Overriding the Niagara one won't help, as that will only call the notify after the Effect is already spawned.

#

It's coded in a way that it allows you to use the notify function to set niagara user variables

#

But if you want to fully prevent the spawning you just use the base UAnimNotify

#

And call the code to spawn an effect by hand.

celest oar
#

ok i will try that

surreal peak
#

You'd want to maybe rephrase that to an actual problem you need help with :D

#

Time Dilation + Blueprint is otherwise something you might as well have entered into a search engine.

surreal peak
celest oar
surreal peak
#

That google AI is nothing else than another ChatGPT

lofty rapids
#

ai is a lot of the times incorrect

#

and especially for blueprint it says shit that doesn't exist

celest oar
#

i think my logic is correct but the effect doesnt play in game for some reason

#

plays fine in the animation editor tho

surreal peak
#

Could be that the IsVisible returns false for editor?

#

Oh it does play in the editro

#

AttachmentComponent is missing btw

#

On the top node

celest oar
#

ok now it works

#

but it still plays 2 animations

#

all this and the problem is still there

surreal peak
#

IsVisible is not what you want.

#

You probably want Recently Rendered

celest oar
#

will try

#

ye that was it

#

but why doesnt "IsVisible" work?

lofty rapids
# celest oar

what is supposed to happen is is visible is false ?

surreal peak
#

Because IsVisible is just returning the boolean that controls if you want the thing to be visible overall.

surreal peak
#

The one you can click in the defaults

celest oar
#

ummm, so i should be using ownerSee or somethingl ike that then

#

well, recently rendered should work better

#

Thanks again eXi, you have helped me a few times now, i apreciate it a lot.

surreal peak
celest oar
#

its networked so i feel like it would be a bit messy to use those vars, im gonna stick with the rendering node

#

also, i wish listed ever shire, if it ever goes to like 50% discount i will buy it, you have helped me quite a few times.

#

thinking better, i just bought it, its only fair.

surreal peak
#

Ah, appreciated. (: But please don't spend money on me if I help you in my spare time.

#

its networked so i feel like it would be a bit messy to use those vars
Those variables are meant for Networking after all. They are usually used to show/hide FirstPerson vs ThirdPerson meshes.

rapid smelt
#

How do you set up a blend time between animation transitions in the animbp? like a blend time between crouch and regular stance for example

dreamy kindle
#

i got fixed thanks

hazy fulcrum
#

Hello all, there doesn't seem to be a lot of people asking this, but is there a way to set a minimum movement speed? Ideally I'd like to have a character that can either walk or run with no movement speeds between those two states. 🤔

summer sail
summer sail
#

Ignore that blue box in the middle it does some other stuff that doesnt matter for this example

hazy fulcrum
#

Of course, but what I'm trying to do is prevent a slight thumbstick input from giving me a speed other than the specific walk/run speeds.

summer sail
#

Oh! Use clamp!

#

You can clamp or you can do a select

#

@hazy fulcrumSomething like this maybe?

#

not sure if my logic is correct but:
if the stick is at 0, spits 0,
if its over zero or below 0.5 it walks
if over 0.5 runs

cunning cloak
#

I feel like I'm not understanding something fundamental about rotation. I have here a PaperZD project I'm working on (yes, still using the online course's assets, lol), and wanting to add a "walk on walls" mechanic. I have set up collision boxes to only trigger this effect when you are near it; Red for the right wall detector, green for left. However, you'll see in the video that once I go 180 degrees around (on the ceiling), my actor flips around, and now red is on the right, and green is on the left. Can anyone see what I've done wrong? Again, I feel like it's an issue with my understanding of how rotation works...

Note: My variable "Level Rotation Direction" is either -1 or 1, depending on the wall that has been detected.

hazy fulcrum
#

If anybody is looking to implement something similar to what I want, the 'Clamp Input Scale' function they set up as part of that tutorial is basically exactly what I needed.

#

Thank you for the suggestions though, @summer sail! 🙂

dreamy kindle
cunning cloak
surreal peak
cunning cloak
#

Thank you, though!

narrow sentinel
#

So i have an odd issue where for some reason when a box collision goes into a sphere collision I don't seem to get any overlap occuring from the sphere collision at all

#

I've break point on it as well but just doesn't seem overlap it being fired

#

okay so its working now but thats cause I've configured the collision settings on the ship box collision to overlap when it hits a world dynamic object thing

ivory vapor
# ivory vapor So like this?

Hello!

It's me, about my hide actor in room box again. I've noticed an issue and I'm trying to find its reason and fix but I'm struggling. I paste the whole blueprint again in this message so new people can read it. It's basically a box with a black cube in it that hides every actor inside as long as its visible and become invisible when the player character overlap with it.

I thought it would work out of the box for floors by making one of each of those box on each floors as the box from the floor the player is currently in would be invisible but the upper one's would be visible and thus hide any NPC that are in the upper floor or any npc leaving the player's floor for the upper floor. Thing is, it works to hide the upper floor character when you are in the bottom floor, but when actors move in the bottom of the stairs that are well in the bottom floor they disappear and often never reappear unless they leave the box/player leave and reenter the box. Here is a video showcasing the issue (I've set the black boxes to translucent so you can see what is happening. I don't really know what could be making this issue in that area as it's not the spot where the boxes are close and actors could technically overlap both at the same time (also the boxes don't touch.)

ivory vapor
#

They don't, theres a gap between the two

void crescent
#

I don't think that's the problem.

lofty rapids
#

i was thinking when they leave the top, enter the bottom they are going invisible

void crescent
#

If a new character enters the box while your player is already in the box it just does the invis part. So you would not see it even if you are inside right?

lofty rapids
#

i think you want to check the box visibility before you change the npc

ivory vapor
#

Well you see the visibility change in the video

#

the disappearing isn't made in material

#

but in blueprint

lofty rapids
#

what i'm thinking is the logic says make invisible when overlap

ivory vapor
#

with player yes

lofty rapids
#

so when they leave the top, they hit the bottom and go invisible

#

because this is what the logic says

#

i believe you want to check if the box is visible before making them invisible

ivory vapor
#

oh

lofty rapids
ivory vapor
#

Like this?

lofty rapids
#

right

#

thats what i'm thinking

ivory vapor
#

With this addition they are visible even through the black box from the outside and when inside they are visible on every floor no matter the one that is set visible or not... Maybe it's time to set debug strings?

narrow sentinel
#

Anyone know if I can in my level sequence take the transform of the actor i've assigned rather then the sequencer using a set transform for the initial key frames

#

so idea is this start bit of the sequence I want the actor assigned to move to the key frames set, in a sense kind like it moving into place for the landing sequence but I want it to be in a way where it doesn't need to have gone to a specific location etc it can be anywhere in the world and it moves in that intial bit

#

so it's blending I need but not sure where to turn it on

void crescent
ivory vapor
#

Single those are NPCs

#

I've tried adding two simple debug screens and waited for NPC to move between floors and only this one printed every single time no matter which way they were going

void crescent
# ivory vapor Single those are NPCs

Then I would suggest you just register the player if it enteres the box and unregister it if it leaves the box. Instead of the is box visible thing make some is OverlappingPlayer->IsValid? True-> make visible -> false- make invisible

void crescent
ivory vapor
#

Something like this?

void crescent
#

This would do as well

void crescent
ivory vapor
#

just added the same logic but with set to false for overlappingwithplayer in cast to player for onoverlapend and tested.
I still get the same issues: The actor disappearing at the bottom of the stairs (I checked the whole stair is in the black block) and since I added the new branch after the cast to npc all actors are visible no matter which floor their in and when they move from floors the game only print "overlap invisible"

#

I can try that

void crescent
#

Also you have to make sure to reset the variable if the player leaves the box.

ivory vapor
#

I moved it between the set visibility of the box and the start of the loop

void crescent
#

OnOverlapEnd make bool false.

ivory vapor
#

Yes I did

#

unless I'm missing something

#

I'm still getting those issue for some reason

#

Oh it said overlap visible this time

void crescent
#

this is wrong

ivory vapor
#

I swapped the true and false to see if I had my logic wrong and it just moved the spot where they disapear (red square)

void crescent
#

Shouldn't they get invisible if they leave the box?

ivory vapor
#

If they leave the box it depends on the overlapwithplayer branch

#

in overlapend

void crescent
#

This must be flipped as well.

ivory vapor
#

The true and false? I just flipped it

void crescent
robust belfry
#

hello i have one question , do you know how to put cooldown after jump but my problem here is when i click 2 times spacebar after cooldown it's rejump ??

void crescent
#

At end overlap if the NPC leaves the box and the player is overlapping with the box then you would make the npc invisible. I'm not sure what you would do if the player is not inside of the box and a NPC leaves. Would you make them invisible as well or would you make all NPCs visible that are outside any box?

ivory vapor
#

I think I fixed it by changing those, I'm still testing, but the actor is not visible through the black block anymore, they don't disappear in the bottom stairs anymore and they seem to disapear when going to the upper floor

#

those box were previously set exactly the same, now they are inverted based on if it's end or begin overlap

grand gullBOT
robust belfry
#

sry i hv bad english

heavy thorn
#

I mean it's super simple

robust belfry
#

oh im starting programmation so

heavy thorn
#

You just need to record the time when jump is pressed

#

Then before jumping, determine whether the current time exceeds a certain value

robust belfry
#

how i record lol ?

heavy thorn
robust belfry
heavy thorn
heavy thorn
robust belfry
#

where i put the get time seconds with delay ?

heavy thorn
robust belfry
#

im so dumb sry

heavy thorn
#

wait I'll write a short blueprint for you

robust belfry
heavy thorn
lofty rapids
#

theres a few ways you could also user a timer by event

ivory vapor
# ivory vapor I think I fixed it by changing those, I'm still testing, but the actor is not vi...

It works almost perfectly, the only issue is that the disappearing points of both cases (npc going down from upper floor and npc going up from bottom floor) are not close or in the same place and the bottom one is at a pretty weird spot, I think it's level design related with the placement and size of the box but the weird thing is that in my level the bottom floor black box goes way upper than that point. I'll try making it go right below the ground of the upper floor but I'm not sure if it can cause issue if the box overlap so I'll try to avoid that

heavy thorn
#

That is it

#

Copy it all and paste it inside the blueprint

robust belfry
#

how do i paste your code

heavy thorn
#

Just copy it

robust belfry
#

oh yea thx

heavy thorn
lofty rapids
#

without a delay, but same concept

robust belfry
#

do i have to create a var float

#

? @heavy thorn

void crescent
#

Yes... if you wanna go with time then you need that float.

heavy thorn
ivory vapor
heavy thorn
#

Whether boolean or floating point

robust belfry
#

like that

#

?

heavy thorn
#

You always need a variable to determine whether it is cooling

heavy thorn
void crescent
#

Yes

ivory vapor
#

Thanks for the help btw Neut!

heavy thorn
robust belfry
#

but first time i have to wait like 5 seconds to jump

heavy thorn
robust belfry
#

i have modify the 5 by 1

void crescent
#

If you deal with the time you have to set it... and you have to make sure you really use the subtract as posted. If you don't use substract you might get an issue if your game runs for many days because the positive swaps into negative and you would compare some - with a previous set + value. I guess UE is bending the value as well like C++ (I hope). In my opinion this is some simple task that can be done with either. Timer, delay or that timer value.

robust belfry
heavy thorn
#

emmmmmm I don't know how to solve it but I think I should change the floating point value to 999 or -999 or something like that

#

🤔

robust belfry
#

look the video you will understand bug and why i want a cooldown

lofty rapids
heavy thorn
robust belfry
#

but how i use your solution beacause i have enchanced trigger

#

@lofty rapids

lofty rapids
#

i just used a custom event, you just go out of started instead

void crescent
robust belfry
#

ok im making the script

heavy thorn
#

🤣

void crescent
robust belfry
#

@lofty rapids what's in the event ?

void crescent
#

Anyway if I look at your example I'm not sure if you really would use a delay ... or if it is a better idea to respond to some notify. 🤔

robust belfry
#

setcanjumptrue

lofty rapids
#

and inside that event you can see in the picture i set the variable back to true

robust belfry
#

but what's inside the event

lofty rapids
#

the custome event is right there

#

inside the event is the changing of the variable to true

robust belfry
#

oh im sry i didn't understand

lofty rapids
#

then hook it up to the timer

#

and when that timer goes off

#

that event fires

robust belfry
#

@lofty rapids

void crescent
# robust belfry oh im sry i didn't understand

I think you have to fix it in your anim-bp. You should not play the landing anim if you are moving or jumping again already but take a transition to jump start or something. Also your air-control seems a bit too optimistic.

robust belfry
#

i can't jump anymore now lol

lofty rapids
robust belfry
#

ok

#

thxxx

lofty rapids
#

i believe a timer is frame independent was well

#

so thats a plus

robust belfry
void crescent
#

I never had an issue with delay so far btw. You just have to know what it does and what it doesn't. But using that timer event should do as well.

#

Also the timing float is fine. Did so back in 2000 a lot like this. 😄

lofty rapids
#

i think things like "delays are bad" is similar to "casting is bad"

void crescent
#

But I think a neither should be necessary. If I hit jump 10 times while in air already ... nothing happens. I don't have to take care of this. But you have to respond in your anim BP different if you are moving or if you are just idle as you might not want your landing anim played that long in each case.

lofty rapids
#

it's really in how you use them

#

but theres a few advantages to using timer over delay

void crescent
#

I use both and I even use the float checks in my weapon BP. It just depends.

lofty rapids
#

ya theres so many ways to do the same thing usually when it comes to a program

#

it's really preference most often

void crescent
#

Also I think you can use the gameplay ability system for this just fine but it's probably a bit of overkill if you just start with UE.

frosty heron
#

promising that jump can be pressed again after 0.75 second

#

what happend if your character fell down for more than 0.75 second? It can jump in the air?

#

The default third person already implement jumps, if you want to take a look at it.

lofty rapids
#

i mean ig you could make the timer start on landed thats another way if you wanted to do that ig

frosty heron
#

is there a specific reason to do that?

lofty rapids
#

idk i don't need to do that, they wanted a delay on jump or specifically a "cooldown"

void crescent
#

I don't think this should be necessary.

frosty heron
#

pretty sure he is addressing the wrong problem.

#

looks like anim blueprint setup problem to me

#

JumpStart -> Jump Loop -> JumpEnd

#

check TPS template for implementation.

void crescent
#

I think the animations that are posted in the video just take a long time to finish (longer than the ones from TP template). In that case I would not wait until the JumpEnd finishes (in third person template this is already done fine).

lofty rapids
#

The XY problem is a communication problem encountered in help desk, technical support, software engineering, or customer service situations where the question is about an end user's attempted solution (X) rather than the root problem itself (Y or Why?).
The XY problem obscures the real issues and may even introduce secondary problems that lead t...

ivory vapor
# void crescent At end overlap if the NPC leaves the box and the player is overlapping with the ...

I take it back, I have one last issue with this branch... I already have a fix in mind but that's not the most elegant imo so I would have liked to know your opinion and if you would have an idea since you were great at seeing issues in my BP earlier.

This branch make it so that if a NPC leaves the box the player is currently in, then the npc becomes invisible. Which works great for floor to floor movement. But it would also set those NPCs invisible if they leave the ground level for the outside of the house, leaving them indifinitely invisible unless they get in the house again.

My fix idea would just require another actor box collision that I would manually put at every exit point of a building to set actors visibility back to visible. But maybe there's something more economical I can't think of.

little moat
#

Could someone help me understand how this code I made works?

#

I took a big ass break and I forgot a lot

lofty rapids
#

looks like some sort of predicted collision detection ?

little moat
#

I'm getting a future point by using velocity x time + actor location and adding it to an array of future locations. Then I use that array to compare that do the other actors collide with the current NPC's future location

#

But I'm not sure what's wrong with it

lofty rapids
#

well i would start with does the event run ?

#

then check if the cast is failing

lofty rapids
lofty rapids
#

and if in the array there is the right number, it will say collision

#

so once it finds through math a collision, it will most likely always get that

#

unless you clear the array at some point

lofty rapids
#

basically just taking the branch off the overlap end

#

but keeping it on begin

#

this way when they walk in and theres a player inside the thing they go visible, but on exit no matter what they always show

snow halo
#

hi, i hava a question, i have 2 scenes, and I wanna find which is closer to the player, should i be adding x+y of right scene and x+y of right scene?

blissful grail
#

Even better - there is a node "Get Distance To Actor"

inland walrus
#

What method should I use to make this concept art 3D UI?

eg.. when the player hovers over a 3D letter, it will move upward and it's clickable etc

#

not many 3D UI video guides out there using actual 3D objects

snow halo
ivory vapor
void crescent
# ivory vapor I take it back, I have one last issue with this branch... I already have a fix i...

That's what I meant previously as I was not sure how you would deal with npcs outside any box.

If you would just turn them visible as soon as they are outside a box then you can just make them visible if they leave a box in any case (which would turn them visible on stairs).
If you would turn them visible as soon they are out of a building you can do it with your further box collision.
If you would turn them visible only if they are on the same zone (like in the same box or together outside of any box) then I think I would gather them in some kind of array and uninvis them when the player leaves a box. Or lazy but most likely slower if the player leaves a box do some getallactorofclass and some if not overlapping with box make visible.

ivory vapor
#

Well, best case scenario if I could, I would ultimately like to make all the outside of a house masked or black so you don't see it when you go inside the house and you see only the house interior even if the camera is physically outside. (I am not asking for help for that here) But I am still trying to find a way to do that. But even if they're not distinguishable I think, as sanity check, the actors leaving for the outside should reappear.

#

Turning them visible when they leave whould make them appear between every two box no matter if they are on the same floor than the player tho

#

so appear in the air if they are upper

void crescent
blissful grail
# snow halo but Im dealing with components

Components are just going to be actor position + component position. Or you can use the world location of the component. But still, there is a distance node for general locations as well. It'd look something like this. If it is a hot path, use distance squared.

#

So you'd just get the distance from your players actor location to the component's world location. Then do it again with the other component you are comparing. Then just compare the results.

void crescent
snow halo
#

(tried this with event tick)

#

its always gonna be loaded on scene right

lofty rapids
snow halo
#

oh I know why

#

I just realized that the vector data remain unchanged, they dont update

#

wait, I have this function on tick, so they should update

lofty rapids
#

did you update the function to return two values ?

#

because your not returning two values above in the picture

#

looks like a different function

snow halo
lofty rapids
#

and are you getting good numbers for the distance ?

#

does the math make sense ?

snow halo
full badge
#

are you sure the character variable is set

lofty rapids
snow halo
#

nope, not at all

#

so this is what im doing

#

scene_left + scene_right

#

i begin play

#

I go close to bed, circle around it, move around

lofty rapids
#

you can figure out if your on the left or right with maths as well

#

but i wonder why this isn't working

snow halo
#

everything remains unchanged

snow halo
full badge
#

then you probably didn't set the character variable

lofty rapids
#

accessed none ?

opaque geyser
#

Sorry, not really sure where the right place to put this is, but does anyone have any experience with the Mover plugin. (Eventual replacement for the CMC system). I'm trying to make a first person character, and there are only 3rd person examples built in, so I'm quite lost and confused! 😅

snow halo
blissful grail
ivory vapor
#

I'm pretty new to game dev and Unreal

snow halo
#

always

lofty rapids
#

but your getting the right numbers now ?

snow halo
#

print string changes value now at least

opaque geyser
blissful grail
#

Capsule is still upright though.

opaque geyser
blissful grail
#

But overall - still pretty rough.

#

So if you do need it, then you'll just have to dig into the source yourself unfortunately.

visual ember
# snow halo

"find closer location" yet you return one that is larger, don't you? if left > right then return left. shouldn't be return right? just quick looking at the nodes, wasn't following other messages

opaque geyser
void crescent
# ivory vapor I don't know about them

CullDistanceVolumes can provide you invisibilty ... for static meshes. If you set a CullDistanceVolume with some small values every static is hidden as long as you enter the CullDistanceVolumeBox. Usually culling is used to avoid that something thats hidden by a wall is rendered but the CullingDistanceVolume would even work with manual settings. Anyway skeletal meshes are not hidden so you can't use it for your NPCs (probably you can use it to hide the world if you enter a house.

Anyway about your scenario. I think I would keep most of the blueprint that you already use. If any NPC is leaving a box they should turn invisible. Then I would use a further box actor that covers the hole building. If any NPC is leaving that "OutsideBoxActor" then add them into an Array of actors. If they enter the OutsideBoxActor again remove them from the array. If the player leaves that OutsideBoxActor turn all actors that are currently in the array visible.

ivory vapor
void crescent
ivory vapor
#

Well the overlap events of my existing colision box for the floors don't include that already?

#

in the way that it sets visibility depending if the floor is overlapping with the player

void crescent
#

As long as you don't get some race conditions (like simulatan overlap start of one box and overlap end of the other box) you should be fine.

ivory vapor
#

I think it does, I just waited in the bottom floor for an npc to leave and disappear and a bit later an npc just popped into existence by passing through the entrance

#

I think it's the same npc

blissful grail
void crescent
ivory vapor
# void crescent So it's working?

Yes I implimented it and it's working, I had to find the correct spot for the new box so it doesn't get overwritten by the floor box if it's too close but it works

snow halo
#

still nothing

#

same socket is enabled

#

you know what? I'll just create 2 collision boxes

lofty rapids
# snow halo

and how did you get these left and right variables are they straight from the component on the left ?

#

because i don't see why the logic would just not work

#

logic is pretty sound

#

maybe a restart of the editor

#

might be some kind of bug or something

thick gyro
#

Hello - I have a silly question - I'm just learning UE5.6, and I've been going through the default "combat variant" of the third person template. The one thing I can't really track is what sets the life bar onto the so called BP_CombatCharacter? it is exposed as a variable with a default value of none, and I can't see anything set it? I'm sure its just something obvious but I like to understand stuff

astral summit
#

If I have a widget made a long time ago, I just want to put it in the foreground so the player can see it. How do I do this?

lofty rapids
#

i would probably make a user widget, add a canvas

#

then plop your widget in if you can

#

then you can create widget, add to viewport

astral summit
lofty rapids
#

you can do this anywhere i prefer the HUD class

#

but you can put it on the controller, the player, different bp's

#

depends on when you want to interact with it

#

add to viewport is what makes it actually show up

astral summit
# lofty rapids

Maybe I didn't explain the question well.
I just want a node or method that will put the user widget on the front of the screen.
Something like "SetZOrder"
And I don't want to recreate the user widget, because the user widget I have has important variables.

lofty rapids
#

oh ok so the widget is already on the screen ?

#

it's just not in front ?

astral summit
lofty rapids
#

so is the problem other widgets are over it ?

astral summit
lofty rapids
#

so maybe just make sure it's added last

hollow pond
#

@astral summit does adding the widget to the viewport again (not reinstantiating it) move it to the top?

astral summit
lofty rapids
#

you can most likely remove it then add it again, but i would just add it in the right order to begin with

lofty rapids
#

the order they are added i think matters

hollow pond
#

yeah. you can create the widget and save a reference to it, then add it later. or you could try re-adding it to the viewport, my hunch is that'll effectively bump it to the top

astral summit
#

When I first created a widget, it displayed in top correctly without any problems.

However, after adding more widgets, at some point I needed to push one of them to the top.

astral summit
#

@hollow pond @lofty rapids I think the solution is to either delete the widgets above it or recreate it and moving the old variables to the new one. Right?

lofty rapids
#

idk if that might reset your variables or not

astral summit
lofty rapids
#

pass the reference of the widget you want to bring to the top

dark drum
#

Removing from parent and readding is the way to go. I've done something similar to reverse the order widgets are displayed in a vertical/horizontal box.

(Get children, store in local var, remove all children, reverse local var, readd to parent was my use case)

lofty rapids
maiden wadi
#

It will not affect variables. It's the same object. So unless you set something on Event Destruct, they'll be the same. In fact you can edit them even while the widget is not added to a parent as well just like any other UObject since that's all it is.

#

This is actually one reason why delegates can be bad for widgets if you don't unbind them properly. Make a bunch of widgets, bind a bunch of stuff to them, then remove them away and the bindings will still run.

dark drum
astral summit
lofty rapids
#

i like reusable functions, in this case since you may want to move a different one to top at some point

lofty rapids
maiden wadi
autumn pulsar
#

man, making a health system is more complicated than I thought lmao

dark drum
autumn pulsar
#

I think part of my ire is me merging it with a whole stats system with modifiers

ivory vapor
#

Thanks to everyone that helped me making my room occlusion system work here, it probably need more polish but I wanted to send the result :)

uneven crest
#

Whats the best way to have teams. Im creating a baseball game that has 6 different teams. I want to store the team name, image, players and ratings all on one variable that I can access. Should I do a structure?

snow halo
#

Hi I have a problem with this function 🔧

#

Im trying to get the player to sit and sleep laying down on bed in the right rotation 🛌 💤

#

but the rotation always gets rotated to whatever my camera position was the last time I clicked. 🎦

last peak
snow halo
#

in fact even if I put it to 0,0,90. It still changes based on the direction in hitting it from

#

▄︻デ══━一💥

#

with my camera line trace 🎦

last peak
#

I dont get it

#

How is it supposed to change direction if you set rotation to 0 0 0

snow halo
last peak
#

your linetrace is not even connected?

#

Also why are you rotating the capsule instead of the actor?

snow halo
#

So the player attaches himself to the bed based on line trace origin

#

and at the same time line trace origin + whatever set rotation I add to it (I think)

snow halo
#

I wanna do this

last peak
#

Sry man .... your pictures dont add any clarity whatsoever ...

#

so you want to do 4 linetraces?

#

Why?

snow halo
#

no

#

no matter the direction im hitting it from

#

my game is 3d, i have a camera 🎦

#

no matter the angle im hitting this bed

#

I don't want this to be a factor that changes how my body sleeps

#

I can't sleep like this while half my body is floating

#

I want to be able to go on the bed, CLICK it, and then immidiately take the right position. ✅🖱️

#

Line trace angle shouldn't affect the body sleep rotation ❌

last peak
#

Just set the players rotation to the beds rotation

snow halo
#

but Im probably missing something 🪲 ⚙️

snow halo
#

🤔

#

still the same problem 😢

last peak
#

Your still rotating the capsule .....

snow halo
#

😂

#

but again, maybe Im **still **missing something again lurkin

last peak
#

I mean what do you expect to happen now ?

#

Now you have a fixed rotation right?

#

0 0 90

snow halo
#

yes

#

I guess

#

This needs to happen

last peak
#

what happens if you set it to 0 0 130?

snow halo
#

same thing

#

it still changes rotation based on the angle which im hitting it from

#

angle shouldn't affect anything

#

player should always sleep with his head on the pillow 🛏️ and his legs on the bottom wooden end

dark drum
last peak
snow halo
last peak
#

When did you set it to flying`?

#

instead of your none ?

dark drum
snow halo
fiery dragon
#

I have an issue with calling an blackboard in my child controller to acces the behaviour tree

#

can someone help me with that?

snow halo
#

literally nothing changes

dark drum
snow halo
dark drum
snow halo
odd compass
#

does anyone know why the two bone IK is just straightening my arm completely while playing a pickup animation? I still need it to play the animation normally just have the hand go towards the item and get as close as it can without stretching the character. I've attached the animation blurpint and what its doing

#

this is the normal animation playing without two bone IK

lunar sleet
odd compass
#

oh yeah myb

uneven crest
#

Is there a way to end a line trace at a certain x position once it reaches it?

#

Can i just split it?

lunar sleet
uneven crest
#

How

true marsh
#

Anyone happen to know how Asset Registry will sort assets? If I search for a DataTable, if it is index 15 now, will it always be index 15 in the future?

From my print strings incrementing the index from 0 it seems a bit random as it starts with older DataTables, with some others mixed in, not sorted by name, ect.

trim matrix
#

ive made this minigame manager bp that randomly selects a minigame from a data table, and shows an explanation screen, then sends the player to the level to start the minigame, its slightly working rn but when i play the level that has the manager bp in it, the widget dosnt always show, i have to exit out and hit play again for it to show. the ui for the explanation screen is basic

#

img 1 is what it looks like at first then when i hit escape and hit play again it works

trim matrix
halcyon heath
#

I have a light system that uses structs at runtime to make changes to values. If I wanted to make a change to one variable at runtime and keep the other variables to what they've been set to on construction, is there a better way than to connect all the unchanged pins for everything I don't want to change?

All this does is turn the light on and off when I jump, but notice I have to connect all the other pins lest they revert to their default values

austere ingot
#

does anyone know how to make a character react to getting hit by a vehicle similar to pubg? hitting a player is a brick wall right now 😦

#

in multiplayer

halcyon heath
sacred canyon
#

if I got an actor that has a bunch of scripts to do on begin play, then I got hundreds of them in a map, is there a way to make them "take it in turns" so that they dont all do it on the same frame? currently I use a delay with a random range but Id imagine theres a better way. once the scripts are done the game runs fine but theres a big stutter at the start from them all doing it

frosty heron
#

might be easier to just implement loading screens and unload the loading screen once the actors are ready

#

that or you can have an actor manager

#

basically just one actor that loop through all the actor you like and call the init

#

so it goes without saying that you can divide the work into multiple frames

soft idol
#

Dose anyone here know how to make a functional VHS tape system? I'm a beginner.

sacred canyon
#

and yeah I’ll have a loading screen but I’m sure splitting it up would make it load faster

spark steppe
#

you want a queue or a custom loop implementation which supports delays

faint pasture
soft idol
#

When you pick up at tape and insert it into a player it would play a video on a tv with audio

faint pasture
#

Start with getting a video to play in the engine at all

soft idol
#

Ok I already have that

#

Also if it helps I’m trying to make a system simular to the ones from poppy playtime and Amanda the adventure

faint pasture
#

Do you have generic interaction in your game? Where you can walk up to a thing and press a button and the thing will do whatever.

soft idol
#

I think I might

#

I have basic interaction where you can walk up to something snd press E and you will be able to pick it up but that’s it

faint pasture
#

Do you have doors, buttons, various things that do different stuff when you press E?

#

You need 3 things here.

  1. The ability to play a video
  2. The ability to have items
  3. The ability to interact with things

Then, a vhs playing tv is just an actor that, when interacted with, removes a tape item from the interacting players inventory, and plays that tapes video

soft idol
#

In my game I barley have any and mostly just have pressure plates that when I shoot open up a door but I could learn the interaction system with tutorials unless this needs a special interaction system

#

And I think I get the second part you mentioned

faint pasture
#

You need to get a generic interaction system in your game pronto

#

Show what your current code is for interaction, starting at the input event.

soft idol
finite hearth
#

I am out of free GPT credits.

Unreal Discord, GPT: How do I calculate the length of green?

spark steppe
faint pasture
soft idol
#

Yes I do

faint pasture
# soft idol Yes I do

So just change the interaction interface function to include the interacting pawn ref then the VHS player knows who to check for a tape on

#

Instead of saying "Thing, you got interacted with" you say "thing, you got interacted with by this guy"

soft idol
#

Ok sound good

lofty rapids
lofty rapids
#

i think it might be picking the random one that is out of range sometimes

#

so fixing the index should fix the problem

#

an arrays length is the actual amount of items in an array
because arrays are typically zero indexed, the last index is length - 1

snow halo
#

Hi I have a question

#

@lofty rapids btw I fixed the bed thing ✅

#

my question today is this... I can't get my camera to target and focus on the player

#

this again seems like a simple enough problem

#

but the camera is going under the landscape but is on the right location horizontally but wrong vertically

#

then what I tried to do is split this get world location and set world location

#

and then after I split I try to connect x+y but not z

#

but still fails

#

So if I do it like this

#

camera will go faaaaar faaaar waaaay wayyy out of the map

#

and I can put something on the Z. like 100-200, still wont work

lofty rapids
#

then you should be able to adjust the height based on the camera z location

snow halo
#

oh it works

#

wtf

agile moss
#

trying to figure out how to add a slot on the right hand for the weapon, how do I do it?

#

When I get near a weapon I want it to attach to that

#

k, I think I did it, how do I attach the weapon to the player arm socket?

eternal sandal
#

Hello, could somebody please explain custom events and how i can call them on each player that interacts with an item (grenade for example) to lets say pick it up from the ground, what custom events i need to add and where (and which to be multicast / run on server etc )

agile moss
#

lol I did it, chat gpt is awesome

sturdy hollow
#

Hi i need help with a keybinding issue.
Im using the old input system (Project Settings > Input) and modifying keybindings at runtime using Remove Action Mapping, Add Action Mapping, and Save Key Mappings.

It works perfectly in PIE, but in a standalone or packaged build the changes don't save. Any idea what I might be missing?

valid anchor
#

Hello everyone I has one question

I've created a BP from a static mesh component with a OnComponentHit event inside [and an event dispatcher]

how can I call that even from other Blueprints?
Since I want to do some additional thing from the BP of the level [such as printing text, referencing variables defined on the level, etc]

surreal peak
sturdy hollow
#

im on 5.4 and i dont know how to use the enhanced input and the old input dose what i need

surreal peak
#

There is no magic way to get that reference.

#

And I would suggest not falling back to the LevelBlueprint if you can avoid it.

surreal peak
valid anchor
#

so I should probably move the bunch of my logic from the Level BP to the BP_Ammo or BP_Target? 🤔

sturdy hollow
#

i think that it saves temorarly since i call this then it sets the correct bind but if i exit then everything resets

#

should it make a ini file for the keybinds?

surreal peak
surreal peak
#

Where are you actively applying the changes?

sturdy hollow
#

like i said it saves correctly in pie but not in a packaged game or standalone

surreal peak
#

SaveKeyMappings should already save to the config.

#

On the other hand, InputSettings are project-wide. It doesn't seem correct to me that you'd be modifying those directly.

#

If you do that and you test in the Editor, you'd start actively modifying the default settings of your project for the keymappings.

#

Might make more sense to have your own SaveGame or GameUserSettings object for this.

#

And saving them there, then applying them back when loading them.

valid anchor
surreal peak
#

Okay, and?

lofty rapids
surreal peak
#

For that stuff you'd usually have some DamageInterface you implement on a Target Blueprint Actor to deal damage. That way you can turn everything into a target, not only some StaticMeshComponentActor.

And if you want to reward the player with something (here a bullet), you'd want to pass the Instigator (the Pawn/Character) and the DamageCauser (the Gun) along.

Then you can have some managing code in your GameMode or GameState that you can notify about the Target being destroyed, and then forward that notification to both the Instigator and DamageCause.

#

The DamageCauser can the decide what it wants to do. E.g. +1 the ammo count.

#

I don't see the need for the LevelBP here at all.

lofty rapids
#

"not everything is guaranteed to be fully loaded when the Level Blueprint's Event BeginPlay executes"

#

is this true ?

#

it's what google says

surreal peak
#

Depends on what you call "fully loaded"

#

BeginPlay calls because the GameState sets its MatchState into "InProgress".

#

And it calls on Actors that are valid at that time, and on later Actors after they spawned if the world has already begun play.

#

There is no connection between those Actors. So not a single BeginPlay call in an Actor is necessarily guaranteed to call before another.

#

Unless you literally spawn one Actor within teh BeginPlay of another fwiw.

stone field
surreal peak
#

There are useful cases for it fwiw.

#

But I agree that almost all cases can be replaced.

maiden wadi
storm solar
#

I have an actor that is used to create spells. When the spell is activated it creates a sphere overlap actor that checks who gets hit. The issue is that the actor itself is a 3d object and other actors will collide with hit. That can cause them to get stuck or stand on top of it (like the second picture).
How do I make my actor spell mesh collide with objects but not impede or alter other actors movement?

dark drum
grave venture
#

I'm implementing Dash into my character

Everything works fine, except for one thing I can't think of how to do.
The character has Maximum number of dashes available (3) and after using 3 dashes it resets to Max dash Count

I want to make it so that it has auto refresh, let's say in a second, if player uses 1 dash only (Out of max - 3 Dashes) it will reset to Max dash count again

#

There's other code present obviously, but I think this is the important bit, if something I can screenshot more of it

lofty rapids
grave venture
#

Yeah, whenever the player uses 3 dashes, it goes on a cooldown.

But the cooldown begins only after 3 dashes are used.
I want to reset if, for example, dash was used once, but hasn't been used after that (for 1 second or two second, for example)

Right now, it remembers the number of dashes used indefinitely

lofty rapids
#

how so you want like a refill ?

#

on a timer maybe ?

grave venture
#

Timer yes, I'm thinking if the dash hasn't been used for 1 second or 2 seconds, Max dash count will reset to 3 again

lofty rapids
#

you can also just logically make it fire on the first one

surreal peak
#

Are the DashCooldown and that 1 sec "delay" the same variables, or will they be differently long?

surreal peak
#

Then you can just call that DashCooldownBegin every time you execute your dash (or end your dash w/e)

#

Save the TimerHandle at the end and reset it before starting it again.

#

DashCooldownBegin -> GetDashCooldownTimerHandle -> Reset -> SetTimerByEvent -> SetDashCooldownTimerHandle

lofty rapids
#

then it would fill if you used 2 as well, but would be less altering

surreal peak
#

Well as far as I understood, they want to allow spamming the dash and whenever the player hasn't use a dash for 1 second, they want it to reset.

Since the cooldown for any of these is the same (that's why I asked) they can just keep calling that method.

#

Once the player reaches 0 Dashes, they can't dash anymore anyway, and the timer will fully run through.

#

If the player dashes twice, it will reset the timer twice, but if they don't use the last dash, the timer will also get the chance to fully run through and reset.

#

same with just 1 dash

humble wigeon
#

Ok, I'm confused, I hope someone can help me on this.. I feel like I'm close but I don't really know.
I'm trying to create a button-mashing game where two players need to button-mash to win a race. I'm calculating the button mash rate (over a 1s window) every tick, clamp it between 0-1, and I use that on a lerp node where A is the Base speed and ***B ***is the max, and I ***FInterpTo ***from currentSpeed, and finally I use the **output **to set the Character MaxWalkSpeed property. I figured that setting the MaxWalkSpeed for the Character every tick is not the only thing I need; I need to keep calling "AddMovementInput" until the **MaxWalkSpeed **is below a small value, that way I can see the character slowing down.. For some reason, though, it doesn't work..

grave venture
grave venture
#

Or I'm implementing it incorrectly so will be back later

grave venture
lofty rapids
grave venture
lofty rapids
lofty rapids
#

then before the timer runs, add an invalidate timer by handle node and plug in the handle

#

so every time you press it the actual time will reset

#

idk if that will fix it as you may not be running it at the proper time, but definately what was mentioned

humble wigeon
lofty rapids
#

you may need to adjust your speed for either way you choose

#

idk if will help, but it's worth a shot

#

personally i would go with a manually movement

#

you can just build up a bar, and it goes down, and that would slow you down as well

#

but thats if you handle it manually

humble wigeon
#

Setting the MaxWalkSpeed variable in the Character Movement Component also communicates with the animation blueprint so you get the smooth run-to-jog-to-walk sequence as you decelerate (or rather, as you bring the MaxWalkSpeed down), simply changing that will also slow down the character movement

#

I tested this, by setting the MaxWalkSpeed in the blueprint to a low value and the character simply goes slower and you get the animation to match

humble wigeon
#

I just need to slowly bring that value down over time once the mash rate is 0..

lofty rapids
#

or even with debug ig (altho i hear it can be inaccurate)

uneven crest
#

I have a parent actor and made multiple childs off of it. How can I get the code from the parent to continue onto the child actor

lofty rapids
uneven crest
lofty rapids
#

in the child

uneven crest
#

I dont see any of the events or functionns in the child

lofty rapids
lofty rapids
#

theres probably a few bugs with the code, but the point is the drain anyway

#

you probably wouldn't do like i have where you can hold down the key and it doesn't drain lol

#

but thats the point of the boolean, so you can change the logic with ease just set the boolean at the right time

surreal peak
#

That's 3 nodes and the creation of a new variable involved in that. I'm sure you can figure that out.

humble wigeon
lofty rapids
#

theres a few flaws just mentioning it i didn't test or take much time, just threw it together to show you how i'd do it as an example

grave venture
surreal peak
#

Hm, that is not really what I meant, no.

#

idk what you need the second timer for

#

All I suggested was this

#

ClearAndInvalidate is the function to reset the timer.

#

Called on the saved TimerHandle (Var)

#

Just give it a better name than what I did (Var).

trim matrix
#

is there a way to make it so the random selection dosnt repeat the same one it selected(aside from just adding more minigames bc im just testing with a few rn), rn it will select a minigame, then the flow loops back after the player plays the minigame, and the next one selected is the same (not everytime)

surreal peak
#

Once it's empty you can oveerride it again with the fully Array retrieved via the DataTable node.

#

That copy must, of course, live somewhere where it doesn't get destroyed when changing levels.

#

In Blueprints that is most likely going to be the GameInstance.

trim matrix
surreal peak
#

Do you have a custom GameInstance Blueprint?

trim matrix
#

no but i can make one

surreal peak
#

Yeah, then that's the first step. Don't forget to assign it inside the ProjectSettings.

#

Inside that Blueprint, you can make an Array property of type "Name".
You can call it something like "AvailableMiniGames" or so.

trim matrix
surreal peak
#

Ya, then add an event called "ResetAvailableMiniGames".

#

And in there, use the "GetDataTableRowNames" and set the property you just made with that.

trim matrix
surreal peak
#

Then create a function (not an event, cause you need a return value), called "GetNextRandomMiniGame" and give it a "Name" Output.

#

In there you want to use the "Random" node (or the "RandomIntegerInRange" from your setup) to retrieve a random element of that property.

#

Best would be to store that in a local variable (local to the Function).

Then call Remove on the "AvailableMiniGames" property passing in that local variable to remove it, so it doesn't get picked again.

lofty rapids
surreal peak
#

After that you can check if the Array is empty, and if it is, call "ResetAvailableMiniGames" to refill it.

lofty rapids
#

don't repeat is what your looking for

surreal peak
#

Then return that local variable.

surreal peak
#

And the last thing you'd wanna do is to add the "Init" event to your EventGraph (that's one coming from the GameInstance class, similar to BeginPlay of Actors and Components) and call "ResetAvailableMiniGames" there too.
Otherwise, the array would be empty at the start.

#

You can then, where you currently do your random picking, get the GameInstance, cast to your custom one and call "GetNextRandomMiniGame"

lofty rapids
surreal peak
#

It's just confusing if you throw in another one now

#

Once that is working for them you can suggest changes

trim matrix
surreal peak
#

Show me the Get function when it's done.

#

Then we can talk about the usage of it

lofty rapids
#

you can also keep track of last, and if last == current then try again

#

but a shuffled array i think is what you want

trim matrix
#

this? or adding to where i have the first random

surreal peak
lofty rapids
#

oh i see, your going to remove from available minigames ?

surreal peak
surreal peak
lofty rapids
#

makes sense

trim matrix
#

now to check if the first random is empty?

lofty rapids
#

it shouldn't be empty

surreal peak
#

Hope that makes sense. I colored parts that you should pay attention to.

#

There is another approach where you wouldn't empty and refill the array but simply keep track of the last Index you accessed, incrementing it every time you want the next entry and going back to 0 if you go beyond LastIndex.
And every time you go back to 0 you'd shuffle the Array to make the next "loop" different than the previous one.

#

They both result in the same fwiw.

trim matrix
#

which should i do?

surreal peak
#

Whatever you feel comfortable with

lofty rapids
#

"Each delete triggers array resizing"

surreal peak
#

Yeah, but this is called once every blue moon.

#

It's not called on tick or similar. Before this part causes performance issues, everything else will.

#

For a beginner this doesn't matter.

lofty rapids
#

it's probably negligable on small things

surreal peak
#

Here is the alternative version:

#

Init just doing this:

#

The Reset event is thus not needed anymore.

#

fwiw, the IsValidIndex check should also be part of the other solution, in case you left the DataTable empty.

vagrant slate
#

Anyone able to get javascript running in the web browser widget? (such as putting an html file in with a script tag that runs js). Or get an include with javascript to go with a packaged build? I am struggling to figure this out for some reason.

lofty rapids
#

what are you trying to do ?

vagrant slate
#

I have a minigame I built with html/cs/js that I'd like to embed via a browser widget

#

I can get it to work in play editor window with a direct link to it

surreal peak
#

Buh, I wonder if the BrowserWidget got any updates the past years.

trim matrix
surreal peak
trim matrix
#

ah

surreal peak
#

You can keep that version, or use the other.

#

It makes no difference for you.

trim matrix
#

sry misunderstood

vagrant slate
# lofty rapids wdym by this ?

If I link the browser widget directly to the html file it will run fine when I run a test in a new window but breaks on build. I've seen that you're supposed to be able to put it in the content folder and reference that way but it doesn't seem to want to be included in the build despite messing around with package options

surreal peak
#

I don't know what RemoveItem does in Blueprints, but in C++ I would probably call RemoveSwap or whaver it is called, so the resizing stuff wouldn't even apply there.

vagrant slate
#

I've also tried just including it in the BP via load string. I can get it to run the html this way but it won't run any js

surreal peak
#

So the versions are most likely the same in performance. If Blueprints use something else for the Remove and it resizes the Array then the alternative is slightly better in performance. But it's really not that big of a deal since you call this only once in a whil.e

trim matrix
#

ive added the cast to where i have the first random

surreal peak
#

Replace the red marked nodes with a call to "GetRandomNextElement" on the GameInstance variable you made.

trim matrix
surreal peak
#

Try it out and let me know if it works

#

And make sure you actually assigned the custom Gameinstance BP in your ProjectSettings

#

It's easily forgotten

lofty rapids
#

but i think what you want is to include the file after you build in the folder

vagrant slate
vagrant slate
trim matrix
lofty rapids
lofty rapids
trim matrix
#

i just thought of something, alot of the inputs for the minigames unless already part of the third person charcater bp use this setup or some form of it not always on tick. is that bad? ive only been able to figure it out like this w chat gpt helping bc setting like actual input events wasnt working how i wanted/i couldnt get it to 💀

surreal peak
trim matrix
#

figured 💀

surreal peak
#

Please learn how EnhancedInput works

trim matrix
#

i have a little

surreal peak
#

All you need is usually one InputMappingContext Asset for whatever Context you care about. And then an InputAction Asset per Action you want to perform.

#

Then you add the InputActions into their InputMappingContexts and assign one or more key to them.

trim matrix
# trim matrix i have a little

just not with like having the same buttons be multiple inputs before, all ive rly done is just adding new inputs to a mapping

surreal peak
#

And set the InputActions themselves to the correct type and add triggers and modifiers to either them or the InputMappingContext.

#

Then you can add the InputMappingContext(s) to the LocalPlayerInputSubsystem or whatever it is called.

#

And that's kinda it.

lofty rapids
#

i need this to work myself, because i wasn't planning on shipping with a server

surreal peak
trim matrix
#

so something like this would be better?

surreal peak
#

Yeah, the Triggered pin though, but yes.

#

What do you need the BeginPlay boolean for?

trim matrix
#

bc i have a countdown i dont want the player to be able to score while its counting down

surreal peak
#

Right, okay.

trim matrix
#

doing it like this dosnt increase the score, nothing happens

vagrant slate
surreal peak
uneven crest
#

I have this code in a parent actor. How can I have it in the child actor?

trim matrix
lofty rapids
vagrant slate
lofty rapids
#

ok

lofty rapids
lofty rapids
#

ya i used launch dir, to format the url and it works great

#

need to switch it when developing but other then that it's fine

vagrant slate
surreal peak
#

By default only the PlayerController and the Possessed Pawn will have that.

#

Try calling EnableInput (via the PlayerController) inside of it.