#blueprint

1 messages · Page 156 of 1

hoary junco
#

so, quick question, it may sound stupid but.. idk unreal be like that sometimes, if you do "get all components of class" on the game instance will it grab all active copies of that component regardless of what actor it's attached to?

spark steppe
#

it's on an per actor basis (unless there's a second implementation which i'm not aware of)

hoary junco
#

so it's best to just put an interface on all the actors that have that component, do get all actors with interface, then from that interface "get component of class"

spark steppe
#

no

#

it's on an actor instance basis

#

not for all actors of the same type

#

ah nvm

#

you want to filter all actors first by the interface class

#

that may work

hoary junco
#

yeah, then do a for each loop, to cycle through them and inside the for each loop, get component of class

spark steppe
#

yea that would do it, however that sounds like a weird use case...

hoary junco
#

it's for save files... saves are weird

#

I'm basically trying to grab inventories from chests and NPCs to store their contents

spark steppe
#

i would register them to some global actor which can fire an event that they can listen to

#

or if you do C++ use a subsystem and register them there

hoary junco
#

yeah no I'm not doing C++

spark steppe
#

or wait, didn't 5.4 or smth even introduce blueprint subsystems?! :>

#

might be worth looking into that 🤷

hoary junco
#

I'm not upgrading to 5.4 until it's FAR more stable

#

there's been so many complaints coming out of that version

#

but the thing is they already are kinda registered to a global actor, like all NPCs in the game are children of a parent blueprint, same with all containers in the world are children of a parent box, but I wanted to get a way of folding NPC inventories and box inventories together when saving

#

another question that, again probably sounds stupid but I need to know

Whenever as the gameinstance you do the "get all X of Y" command, if there's multiple levels in your game, say your character leaves city district A and goes to district B each of which are distinct maps, when you get all X of Y would that cross all levels in the game, all levels that were accessed during that game session, or just the level the player is currently in?

wise zodiac
#

Using ue5.3
Is there away to show with better quality video inside the game?
I show some video that was captured from a some programs like slack dc and more .. and it looks bad with the media player

maiden wadi
#

@hoary junco I do this via a data asset that holds the hierarchy of anything that needs saved. Requires some data entry, but saves a lot of time iterating through stuff to save.

spark steppe
#

there's also a paid (~$10) plugin on the marketplace which adds support to 5.x

lunar sleet
spark steppe
#

can't find anything regarding it in the release notes

lunar sleet
#

I didn’t realize they wrote a whole novel for this version lol

spark steppe
#

anyways, with $10 it's a fair price, better than the mosquito net that just went to trash an hour after i bought it xD

merry mirage
#

Got a name/link for the plugin?

spark steppe
#

don't ask me why we get such weird marketplace links now...

merry mirage
#

I am ready for all the trojans coming my way

spark steppe
#

it's a good oppotunity to learn C++, too 😄

spark steppe
#

subsystems are kinda easy

lunar sleet
#

Jeez there’s so much new stuff in 5.4. I want to see what this Material Designer is all about

dark drum
# hoary junco so, quick question, it may sound stupid but.. idk unreal be like that sometimes,...

I personally wouldn't use the game instance for managing things in the level.

Regarding saving, I would have the component register with a manager. The manager would then store a ref to the components.

The alternative is using the get all actors of class set to actor and then use the get component by class on all of them. This isn't an ideal solution though as it could result in a lot of iterations.

dark drum
hoary junco
#

I'm just wondering how you keep hold of the save data if someone does something on map A, moves to map B, does more stuff, then hits the save button,

young meteor
#

Hey folks
Is there anything wrong with nesting a Struct inside another Struct?

hoary junco
dark drum
dark drum
young meteor
hoary junco
dark drum
dark drum
hoary junco
dark drum
hoary junco
split rose
#

hello, is there a way to always have the mouse cursor on, even with gamepad connected? setting show mouse to true doesn't work

dark drum
# hoary junco is that how all unreal games operate when it comes to save file structure? like ...

Games can have as many files as it needs for saving it's data. It's what ever feels appropriate. Having everything in a single .sav isn't always ideal as it means data could be loaded that isn't actually needed at that moment.

Using folders can help structure your files so they're more organized.

Whilst Minecraft isn't made in UE, they have a separate save file for regions in the world. This can keep the overall size of the individual file manageable and not having to load the entire worlds data when a world is loaded.

You want to try and find a balance between the number of files created and the overall size of them.

Lots of small files can cause the overall size to become a little bloated due to the overhead for being a file. Files that are too big can take longer to load which could affect responsiveness in game.

dark drum
#

You can use the touch pad on a ps controller to move the cursor. Something I learnt a few months ago lol.

rotund barn
#

does anyone know if there exists a node that fires repeatedly when something happens? basically my health system is very crude, it changes a variable when player overlaps enemy box collision. but currently it will only change the variable once, so i lose 1 health each time enemy hits me, but i can stay touching the enemy and take 0 damge afterwards

dark drum
spark steppe
dark drum
iron furnace
#

Hey everyone, in 5.3 using the enhanced input local player subsystem, how would i get the keybinding of a specific action? Im trying to make a widget that shows my players keybinding when they pick something up, and i found out how to do it using the old system, but cannot figure out how to get a specific keybinding with the new one

versed sun
#

@iron furnace

maiden wadi
iron furnace
#

bless you and your future endeavors

leaden mica
#

This checks the speed of the player and if he;s moving right? and not just if the player is holding down shift? because when I let go of WASD but keep on holding shift, footstep run keeps on playing

dark drum
iron furnace
maiden wadi
iron furnace
#

The timer for the footstep loop clears when player speed isnt within range, the two branches check for walking, then sprinting, and if the value isnt within either speed it resets the do once nodes

dark drum
maiden wadi
dark drum
split rose
#

cursor is on but as soon as i plug my controller it turns off

#

cursor is not offscreen im setting the position myself, so im not sure why is that happening

frosty heron
#

F

maiden wadi
leaden mica
frosty heron
#

🍝

leaden mica
dark drum
frosty heron
#

You don't want to cross pins, it makes the code very hard to read.

#

if you are working in team environment especially, they will slap you for doing that.

leaden mica
frosty heron
#

but you probably know, so what root folder do you mean.

maiden wadi
#

@dark drum

dark drum
# maiden wadi <@430016173694779402>

So if I have folders in the save game folder called 'slot1', 'slot3' and 'slot8'. Is there a way to get these folder names? There could be other folders or sav files inside them.

The folders themselves could get created dynamically at runtime or even deleted.

versed sun
#

i think you have to enable a plugin , but i use this to find folders

dark drum
versed sun
#

yes

maiden wadi
#

Ah, yeah I forgot about the file utilities. 😄

dark drum
maiden wadi
#

Other basic idea is just to find all files in that directory, then put their first substring directory into a set of strings. And then you have a list of unique directory names in that folder. Lot more code than the above though.

dark drum
verbal plinth
#

hello, i made a blueprint class actor and made this simple print why there is no output?

versed sun
#

i get folders in my Saved/ folder

dark drum
versed sun
verbal plinth
#

other blueprint class?

dark drum
# verbal plinth how to fix

'enable input' node. Provide the actor you want to handle inputs and the controller it should receive inputs from.

Don't forget to call 'disable input' when it shouldn't handle them.

versed sun
cyan moon
#

How can I make an average of an array of numbers?

#

oh forget that

versed sun
cyan moon
#

yeah found it

dark drum
vivid notch
#

How do you break from a for each loop?

versed sun
vivid notch
#

There is a break node? I don't see it. It might be because I am doing this in a control rig blueprint.

versed sun
#

ohh , no clue

#

regular one looks like

vivid notch
#

Either that or it's under a new name

#

Hmm yeah I don't have it. Only have a regular for each

versed sun
inland crystal
#

There is no 'for loop' with break macro, but really if you double click the 'for loop' and 'for each loop with break' nodes they're both blue print macros, you can quite easily duplicate the 'for loop' and create a 'for loop with break' macro.

last elk
#

What would be the best solution to handle this situation? I have a 2D game, where I want to move a projectile from left to right or vice versa. After it reaches the end of it's life, on event destroyed, I spawn the same projectile in it's initial Location. Also, I have a boolean moveRight, and depending on it I change the rotation of the projectile to 180. It works well and all but because I have the default rotation set to right the first object always moves to the right, after it gets destroyed, the subsequent objects follow the instruction. My question is how best to handle this situation?

#

I apologize if it's not the place to ask this type of question

elfin lagoon
#

sorry to bother you
this widget surprising me again
i'm drawing a line from the click point to the mouse cursor now, using OnPaint function
but both start and ending points is offset at X and Y, more and more, depending how far start click from top-left corner
i try different anchors and getting mouse position scaled by DPI, but nothing changed
run out of ideas how to fix it

vivid notch
versed sun
#

my example would only do first index

#

but only set it to true when you find what you want to trigger a break

vivid notch
#

I see, in my case that would be ok because I'm just running it once in a constructor script

#

I was thinking it may be possible to use a for loop and then set the index to end earlier

versed sun
elfin lagoon
cyan moon
#

How can I get the average of a float array?

inland crystal
maiden wadi
cyan moon
#

yeah okay

inland crystal
#

Pretty funny that 'average of int array' is a standard BP engine function but that 'average of float array' isn't, you'd think averaging real numbers is actually more common than averaging ints, and the output of the 'average of int array' node is a float anyway. funny, maybe.

elfin lagoon
waxen mason
#

Hey guys, I want to do a Notes system, like Resident Evil, where they do not occupy the main inventory system, which I already got set up.
My question is, besides doing another inventory system with a Struct just for the notes, is there a more efficient way, like a set of Text or someother shenanigan?

dark drum
waxen mason
#

I´m thinking a button withtin the inventory with "Notes" that takes me to a widget with the various notes and their respective text.
Nothing fancy.
The current inventory is simple, 6 slots, you can collect and inspect items, but I don´t want the notes to share the same inventory space

#

I could replicate a similar system just for the notes, but I would like to avoid working with Structs in the engine for now, as everytime you change a value, you have to compile everything in a specific order, else it crashes alot, in the future I´ll move the struts to C++

dark drum
waxen mason
dark drum
waxen mason
toxic copper
#

is there any way for a timeline to run while game is paused?

waxen mason
#

You could try checking this in the BP where the timeline is see if it works

dusky cobalt
#

Does this give -1 or 1 value when scrolling up or down?

toxic copper
dark drum
toxic copper
#

it seems a lot of tick-related stuff works. I think I read that timelines work on a different timer and thus dont work on paused. I've created a variable thats adds Tick Delta every tick (i.e a timer), and branches based on when the timer enters specific ranges, but the blueprint layout starts getting pretty bloated if theres a lot of activity

#

would be great to have something akin to a timeline to make it cleaner

untold fossil
#

Hello. Is there some way I can force a teleport? The teleport node occasionally fails (when the destination is slightly inside of something). However, I want a teleport to always go through even if it means glitching through a wall or whatever. Is there a way to do this?

dusky cobalt
dark drum
dusky cobalt
toxic copper
dusky cobalt
#

Do i need something else here?

#

and then I call Input Action, not Input Mapping Action yes? but I have to activate somewhere in the blueprint IMC ?

#

not sure how to call it?

frozen cairn
#

To use Motion Matching feature in UE 5.4 it requires to have a many animations. Is there any info on when Epic will release animations pack for Motion Matching if they ever will?

dusky cobalt
#

so now this will be counted as 2 different Input Actions? For example IA_MoveForward and IA_MoveRight? or I can put it in one as IA_Move

compact fable
#

Hey guys, having some issues with my box collision, when the player throws it, and its the target, it works, but if its thrown again at the target, it doesnt trigger and actually pushes the enemy player

dusky cobalt
#

they already have it inside their character

queen heron
#

search "get enhan" when dragging the output from the player controller and you should see the option
and you can only do that in unreal

dusky cobalt
#

found it.. fk me

#

If I use Get Player Controller I don't have to cast to PlayerController, right?

queen heron
#

is there an easy way to know when a variable is being set?
like I have a simple increment node on one integer that fires only once every few seconds

#

then suddenly the same variable has its value incremented twice then it increments normally further on

atomic prairie
#

Hi! I'm using an old version of UE4 (4.22.3).I use 'Set Anim Instance Class' to switch the BP animation of my AI, but it causes a desktop crash. Is there another solution for set a new Anim Class or reset the Anim Class? Thanks!

queen heron
tough osprey
#

If I have a variable which is soft object reference with no type information, is there any way to convert it to a soft object reference of a given type, without loading the asset? For example, I have a primary data asset type, and I can get a list of all the ids and convert them to soft object references. But then if I have a function that takes an input of type Soft Object Reference to my specific primary data asset, I can't send the soft object reference into that because it's not of the right type, even though it has to be by necessity of the pictured nodes. Any equivalent to "Cast"?

queen heron
#

execution order mistake

dark drum
gray hare
#

what am I missing? I check for IsValid but it's still invalid?

spark steppe
#

e.g. in C++ you have TSoftObjectPtr<AActor> for an actor soft ref

#

he probably gets TSoftObjectPtr<UObject> tho, not sure if there's a BP way to cast them

#

maybe you can get the object path from the soft ref, and then create the softref of the other type from the path

gray hare
#

huh

spark steppe
#

that's not related to your issue

gray hare
#

never had to cast a soft pointer, but it seems strange that you couldn't

dusky cobalt
#

Any easy way I can clamp so I can set maxzoom and min zoom?

spark steppe
#

i think the BP isValid check can be funky by times

#

there's a method to check for pending kill iirc

spark steppe
gray hare
#

didn't see an IsPendingKill in BP

#

I've never run into isvalid not working like this.

spark steppe
#

ah

#

is being destroyed or smth like that

dusky cobalt
#

so it's 100 or -100 always

gray hare
#

so clamp before?

dusky cobalt
#

before multiply? so it's -1 or 1?

versed sun
#

can you Set World Offset, and (Get Current Offset +(Action Value*NewSpeed))>Clamp

dusky cobalt
#

nvm Ill do it other way

spark steppe
#

easiest would be to have a relative offset tho

#

idk if the world offset is even tracked?

gray hare
#

well that's not apparently the uobject that's null, which is also quite confusing

spark steppe
#

if you destroy the actor in the same tick, it may be pending kill and still be valid

#

at least i had this with components

gray hare
#

it is being destroyed, but I don't know what's referencing it

spark steppe
#

the isvalid check passes?

gray hare
#

this is still bad

spark steppe
#

spawn the effect before you destroy it, or cache the location

#

do you now get the transform from a "dead" actor?

gray hare
#

oh, transform

spark steppe
#

cache the transform, destroy actor, spawn hit effect

#

or just spawn the effect before you destroy the actor

gray hare
#

transform was it

#

thank you

#

I'm good now

#

just had no idea what exactly it was referencing that was pending kill

waxen mason
#

Do any of you know if it is possible to block a Widget from being created if another one of the same class is called?
I have fixed the problem of creating infinite copies of the widget everytime it is called.
My problem lies when 2 different actors call the widget, then they overlap.
Like so

The subtitles are being called everytime you interact via an Interface widget that then creates a widget interface that displays the text.

gray hare
#

infinite copies?

spark steppe
#

GetWidgetOfClass()

gray hare
#

oh, that's fixed

spark steppe
#

or make a HUD with a slot for that text, which is exclusive

gray hare
#

two things want to display text
what do you want to have happen?

spark steppe
#

probably only the later one to appear

dark drum
#

or use common ui widget stacks. It'll reuse widgets where it can.

waxen mason
# spark steppe GetWidgetOfClass()

I have used it, the problem is that it checks in the specific BP, and since another actor is calling it, it assumes there is no widget yet

waxen mason
gray hare
#

or solve the issue of trying to do two incompatible things at the same time, rather than just fixing the UI problem

spark steppe
#

is that a widget component or what?

#

it checks for all widgets of that type on the viewport

#

no matter which actor created them

#

unless this is a widget component, then it may behave different (and may not list them at all)

gray hare
#

I wouldn't solve this by preventing widgets from overlapping.

#

I would solve this by preventing two things from trying to display at the same time.

#

something should manage that

waxen mason
#

It´s a Widget Blueprint (User interface)

chrome pumice
#

Anyone knows whats going on?

waxen mason
gray hare
#

Things I would do:

  • create an interact widget that always exists
  • interacting with something tells that widget what to display
#

creating and destroying a widget every time you interact is not ideal

tough osprey
tough osprey
spark steppe
#

search for make (when dragging from the soft object input of your method)

#

i think there was a make method which uses a path as input

waxen mason
gray hare
#

oh, no

#

not at all

#

creating and destroying is waaaay worse than leaving it up

#

leaving it up costs nothing but ram

waxen mason
#

The more you know 🙂

gray hare
#

no reason to not reserve that memory all the time since you might need it

#

the MOST expensive stuff you can do in programming (generally) is to create and destroy things

remote rapids
#

hey i have a problem
everytime when i reopen my project
CHASE dont work for spwan wave
and only for bp_enemy

tough osprey
remote rapids
dusky cobalt
#

Any good ideas how to make camera move more smoothly? I tried Flerp but I think I would have to put it on event tick or something like that?

gray hare
remote rapids
#

you see the enemy that i create is chasing me but spwan wave isnt

gray hare
dusky cobalt
spark steppe
#

the one i meant only works for object soft refs, which is what you don't want to begin with

#

if you load the object anyways, i would probably go for a wrapper, which takes an object soft ref, loads the object and casts it to your type, then call the other method with the softref from that

#

the object should still be in memory, so you wont load it twice

#

after all it kinda makes sense to not allow upcasts, since it's just a object path information

#

even in cpp you only really want to cast that if you are sure that it's the right type, as it's never a safe cast

atomic prairie
#

How can I make my StaticMeshComponent no longer the main root of my BP and replace it with a SceneRoot?

remote rapids
#

@dusky cobalt ?

dark drum
rancid hull
#

Yo i was wondering for my anim blueprint how can i implement a branch node or boolean logic so that lets say only play animation if is first person is true

rancid hull
#

ty

#

um would i have to make my bool an int and change based on 1 and 2

spark steppe
#

blend by bool

#

or use a statemachine and check in the enter condition

tough osprey
# spark steppe if you load the object anyways, i would probably go for a wrapper, which takes a...

Yeah but in this instance I'm not wanting to necessarily load the object. For example let's say my quest objects are PDAs. I might want to write an editor utility widget to let me toggle quest info. So I might want to like, get all primary data assets of type Quest, then create a widget for each one with it's filename and a button to Start Quest, and then when you click that button it calls Start Quest which takes in a soft object ptr to quest. So I need to go from the soft object ptr I get from the primary asset id, which is necessarily of type Quest but is in fact a soft object ptr to object, to a soft object ptr of type quest

dusky cobalt
#

use is valid with ? not function

rancid hull
#

i tried that but it bugged all the rest of my anims

rancid hull
dusky cobalt
#

show code, we are not magicians

rancid hull
#

it wanted an obj class

#

ok

#

idk what to show you i havent added anything

#

that your suggested

#

it didnt work

rancid hull
#

ty all got it working i had to get a cache and use that with a blend bool and the put the cache onto the end of the false so that false and true would have both anims

barren tangle
#

If you want an actor to move by itself. you put everythine into the Event Tick? or there is another way?

maiden wadi
#

Depends on how you want it to move.

#

And what it is.

#

And why it's moving.

dusky cobalt
#

but generally event tick is not place for this

barren tangle
#

so my game the character move automatically on the Horizontal axis, so what i did is a

#

so now i will rework on that "working" part and check if there is a better solution or a proper solution

#

so when the game start: my character move by itself on the X axis with a amount of Speed

#

and the speed change during the travel

#

So i did everything into that Even Tick. is it the good solution or is there a better one

maiden wadi
#

Endless runner?

barren tangle
#

like an endless runner i guess

#

automatic movement and you can controll up and down movement

maiden wadi
#

Should maybe be fine but I would possibly ditch the forward part and just put a world direction for your level. Just incase you ever accidentally set the rotation or anything for any reason.

rotund barn
#

is there a way for a thing to execute just once when on "event tick"? or do i need to learn custom events

barren tangle
#

there is a Do Once node

rotund barn
#

thank you, does it need to be plugged into something from the back? (left side)

#

oh wait

#

nvm

maiden wadi
rotund barn
maiden wadi
#

What controls score?

rotund barn
maiden wadi
#

Because that sounds more like your score should have a setter with an event dispatcher in it. And whatever needs to spawn that should be bound to that dispatcher. When score >= 20, unbind the event and spawn the actor.

rotund barn
chrome pumice
#

guys my struct is showing this error what can i do?, easiest fix would be delete and duplicate but is there a simpler solution?

#

i can open it in visual studio but i have no idea about it

maiden wadi
maiden wadi
chrome pumice
#

But the weapons struct is compiled

#

is there a compile button somewhere here?

maiden wadi
#

Is it a Blueprint Struct?

chrome pumice
#

yes wait im restarting then i send picture

rotund barn
maiden wadi
chrome pumice
#

there is the weapons one and its normal

chrome pumice
maiden wadi
#

Weapons I think.

chrome pumice
#

Oh okok thanks !

#

it actually worked on the errord one

#

thanks allot ❤️

chrome pumice
#

I have another quick question, my array list got completly deleted and it had allot of stuff inside. now it would take me a sht ton of time remaking all of this but i still have a save file with the variables. Is there a way to get the variables from the safe file into my base variable?

#

Sounds weird but could it work?

inland crystal
#

yes it's possible, make some 'call in editor' function that loads the data from the save game file into the relevant object, this should update your 'editor world' instance with the data.

#

like, think about how you'd initialize the data from the save game regularly, just put that sequence of actions inside a 'call in editor' function. BTW if it's not possible to make a call-in-editor function on the actor/object itself (say it was a gamemode object, or something like that) you can load the data into any actor in the level really, and then just right click copy the array and paste it somewhere else, data in blueprints is always textual and can be copy pasted into other matching arrays and objects.

flat coral
#

I've got a missile that's supposed to explode when it hits something, provided it hits hard enough. Problem, despite ramming hard into a wall, the returned impulse is always 0

young meteor
#

Hey folks

Is there not supposed to be a node to clear (remove) a Niagara system at will instead of letting it play out?
Am I searching for the wrong thing?

young meteor
flat coral
young meteor
flat coral
#

That's because it's not on the same execution thread, so that blue line is basically fake.

young meteor
#

Right

#

Hmm, so I would have to find another way around it.

maiden wadi
#

Promote the output to a new pointer variable and call Destroy on that

trim matrix
#

where would everyone say I would be best creating my Question widget and saving it's reference ?

#

would Game Mode be a good place ?

#

trying to think of a place that mostly everywhere can get eaisly without going through multiple actors and objects to get to it

young meteor
trim matrix
maiden wadi
dusky cobalt
#

Does anyone has some camera rotation examples in their own code? I want to rotate my camera around with 45 or 90 angle per click.

trim matrix
maiden wadi
#

Depends. What is this widget for. Why is it being put on screen?

trim matrix
barren tangle
#

technicaly you put the widget on the GameMode

#

but there is a dedicated place for that

dry pecan
#

so I'm trying to get the helth from boss to my UI, only problem is that I don't know what to put for the kind of object to look for, my boss is a character, any suggestions?

barren tangle
#

the HUD

trim matrix
maiden wadi
#

AHUD is usually a decent manager for widgets. Realistically it would be better maintained by some sort of ability where the aI interacts with the player.

barren tangle
#

it's an extention of the gameMode that manage all widget

trim matrix
barren tangle
#

and normally it's

maiden wadi
# barren tangle technicaly you put the widget on the GameMode

You "can" put widgets in the GameMode. But you should never, ever, for any reason. It's bad practice, misleading, and just not a good idea for any use case outside of "I don't care I'm making a singleplayer game that I'll probably want to be multiplayer later and hate myself for putting a widget in a server only class."

barren tangle
#

Game Instance > Game Mode > HUD

maiden wadi
#

HUD is not an extension of GameMode. It's maintained by the player's PlayerController.

barren tangle
#

into the Game Mode if i remember you have to specify which HUD to use

#

so you know that the HUD will be always call

#

try to play with some print screen into the HUD

#

and see how it s connected with the GM

trim matrix
#

so I want to create the widget on the HUD BP and save it's ref there

#

and if I then need to grab it for any reason down the line I can get the game mode and it's HUD and simply cast it i'm guessing ?

maiden wadi
trim matrix
#

sorry if you've said already

maiden wadi
#

Realistically this widget shouldn't have a ref saved. If you were using CommonGame/CommonUI you'd just have the interaction push a widget to screen, and that widget could gather whatever it needs from global gameplay API. User, or gameplay state updates dismiss it when done.

But this is a whole different set of ideologies for UI engineering. Unless you're willing to put in the time to get used to it, just go with the ref in the HUD. 😄

odd kiln
#

NormalImpulse will be filled in for physics-simulating bodies, but will be zero for swept-component blocking collisions.

remote rapids
#

i have proble, can someone help me?

flat coral
trim matrix
#

what would be better I have a function on HUD to create the Question widget when needed and the actors calling it go through GameMode -> HudClass -> Cast -> Call the function.

Or

The Game Mode has a function which calls to the Hud Class which has a function which calls the function to create the widgert

#

I feel both are valid but on create a dependency through stuff that could cause stuff to break.

Whilst the other method isolates each bit you could say

remote rapids
#

i have proble, can someone help me??

odd kiln
#

Maybe you can multiply the velocity by the mass to get the "impact force" ?

odd kiln
heavy shell
#

Boys, im desperate, i dun get it, it makes sense, but dun work, im going to bed, if anyone who is good at this has any idea, plz give ideas XD Brains cooked.

#

top code first then second

untold fossil
#

Does anyone know how I could derive a unique number from a world location?

#

I want to bind a seed number to the world location of a grid section but can't figure out how

#

Cuz when using x and y, you can get the same numbers twice

maiden wadi
#

I did it by just adding the coords together and randomizing.

untold fossil
#

Hmm but I want the result to always be the same

maiden wadi
#

You can make a random stream from that.

odd kiln
waxen mason
plucky ice
#

Very basic question - how should I implement a situation where the actor is only destroyed if the two objects are overlapping for more than 1 second (basically making the user confirm their choice by holding the beam over the star for 1 second)?

dry pecan
maiden wadi
#

@untold fossil

flat coral
heavy shell
atomic prairie
#

With the default TopDown setup we can 'press left mouse' to move directly at the target or 'hold left mouse' to move the character where we direct our cursor. I would like only the 'hold left mouse' and delete the 'press left mouse'. How to do this?

untold fossil
#

Thats the problem im facing

plucky ice
odd kiln
flat coral
#

Timer by event would work fine too

maiden wadi
untold fossil
#

My grid system is placed on coordinates like 10000, -10000

#

I basically want a player to be able to sapwn anywhere in the world, after which a grid section of size 10000 is created snapped to the world grid and then I want thay to give me unique number that I can use as seed for stuff spawned within this grid section.

#

Srry for typos on phone xD

maiden wadi
# untold fossil Srry for typos on phone xD

All good. 😄 I mean.. If you can give a guess as to max sizes. You could always do an add to offset the randomizer by checking which corner of the grid it's in. If it's plus X and Y, then add nothing. If it's Plux X negative Y, Add SomeAmount. If NegativeX, negativeY, add SomeAmount twice, if both negative, add SomeAmount three times. That would get you a good seed randomized offset by grid.

untold fossil
#

Indeed! I was just thinking the same thing!!!

#

Thanks I think I know what to do 😄

vale pine
#

Is there a simple way to have an actor NOT call its construction script when spawned?

plucky ice
odd kiln
plucky ice
# odd kiln It seems good

It seems to take way longer than that 0.5 for it to destroy and changing that number doesn't seem to affect the amount of time before it is destroyed though which makes me think it isn't working the way I think it is

dusky cobalt
#

Please could anyone assist me.
I want to rotate camera with QE, per 1 click I want to rotate 60 angle.
This works perfectly, but the transition is very fast (almost instant).
How can I make it slower? I tried to use Timeline and Lerp, but when I connect it, it goes around like crazy 😄

odd kiln
dusky cobalt
maiden wadi
#

You mostly just need a tick function. Inputs set a desired yaw . Tick interpolates the camera's yaw there.

odd kiln
# dusky cobalt

You have to set a variable to "save" the "start" value of your float

dusky cobalt
#

I want to avoid tick

maiden wadi
#

Lol, okay. No timelines either then.

#

You need something to happen every frame, smoothly moving something from one place to another. That's what tick is. Don't avoid it, just don't abuse it.

odd kiln
#

Before the "timeline" set a float variable which contains your "delta rotation Z" value

#

Call it "Current Delta Rotation Z" for example. Then use it in your "Lerp"

#

Actually it's going crazy because your "Delta Rotation Z" is updating every time..

dusky cobalt
#

This still doesn't work, but not sure if it's how I should do it?

maiden wadi
#

Timeline is too rigid for this. You're going to have a weirdly acing system with inconsistent movement speeds due to lerping instead of FInterpToConstnating. If you want a consistent rotation speed, it needs to just be done in a tick function.

odd kiln
maiden wadi
faint pasture
#

with that, the missile mass (a thing you'd set), and the impact normal, you can compute the hit impulse

#

If you just want the impact speed just do a dot product between your velocity and impact normal

thin panther
#

There's also nothing stopping you from a curve on tick either, you can sample a curve asset, or if you just want simple easing, theres the interpto nodes

faint pasture
dusky cobalt
#

So there is no way to make rotation without using any kind of tick? but i think timeline is better because it will only start ticking when i actually click button, and not 24/7?

faint pasture
#

Sure you can rotate without tick, just snap to the new rotation. Not very smooth but at least you're not using tick

thin panther
faint pasture
odd kiln
faint pasture
#

when you press the button, you just change the interpolation target

thin panther
#

Hell, if you really like you can disable the tick, and enable it on button press

#

overkill tho

maiden wadi
faint pasture
#

because it's bad, someone said so

odd kiln
#

Or you can set a boolean to call or not your event on tick

maiden wadi
#

I always love pointing out that the engine is constantly checking if you have multiple local players to decide if it should splitscreen your viewport. Even in a singleplayer game. Every frame. 😂

faint pasture
#

hell its probably faster to just go:
Tick -> interpolate
instead of
Tick -> branch -> interpolate

odd kiln
#

Like Authaer said do not avoid tick but do not abuse

thin panther
#

Don't forget the minor speedups you can get from turning the tick event into a function :D

dusky cobalt
#

I don't know, i'm just trying to learn how to avoid these situations and if it's even possible, so it's more like I give myself challenge how to do it without tick. It's just camera change so it's similiar to pressing W to move forward (which doesn't check every 1sec if im pressing W, it reacts only when I press, right?)

faint pasture
#

If the code should change something smoothly over time (every frame), its driven by tick somewhere

thin panther
#

In fact, I think it was you that posted that one wasn't it Adriel?

thin panther
faint pasture
#

BP probably changes things but in C++ it would certainly be faster to just interpolate every frame, even when not needed, than to check if you should and then interpolate only when rotating

thin panther
#

They just report a scale of 0 if the button isn't held, so you don't move

dusky cobalt
#

I want click Q and interpolate by angle of 60 right or left. Do I need ticking?

thin panther
#

Yes

#

key word was interpolation

faint pasture
thin panther
#

if it happens over time, no matter your solution, it will be a tick behind the scenes in some form

dusky cobalt
#

yes I want to go from 0 to 60 angle smoothly

faint pasture
#

ok then something somewhere it ticking to drive that

thin panther
#

You cannot do things over time if something isn't checking each frame if the certain time has passed

dusky cobalt
#

if i press again i go from 60 to 120 and then 180 etc

faint pasture
#

ok so do this, it's literally this simple

#

Button -> update TargetYaw (add/remove 60)
Tick -> interpolate ActualYaw towards TargetYaw -> set camera rotation

maiden wadi
#

Gets more fun if you don't want to avoid the camera going the opposite direction if you press quick enough to pass 180. 😄 Have to keep a winding axis.

dusky cobalt
#

Nevermind I will leave it as this

lethal ocean
#

I'm having optimization issues with a blueprint based endless runner project. Been following a couple tutorials to base the project off of, and they all work by spawning a specific number of platform actors, deleting each platform as the player pawn runs past it, and adding a new one at the end of the chain. This all runs around 70fps at the beginning of the game, but as the player pawn runs the fps steadily drops till its unbearable. I'm not sure where to even start looking to fix this problem, as the game is constantly deleting actors and should thereby be recovering recourses. Any thoughts?

surreal peak
lethal ocean
inland crystal
#

Also in this case I'd suggest double checking that everything that should be deleted does indeed get deleted, and that you only spawn what you need to spawn

dusky cobalt
#

I tried one more time. What is this setup missing to make it ''smooth'' ?

dawn gazelle
#

Action Value * Rotation Speed * World Delta Seconds should probably be sufficient. No need for the RinterpTo

lofty rapids
#

and it should be on tick

#

not on the EI action

#

set a variable like CurrentRotation when you rotate, and on tick interp from current rotation to CurrentRotation variable

plucky ice
#

Sorry all, what am I missing here? I would like the timeline to advance when this actor is overlapping the Beam actor and to reset to 0 when it stops overlapping; if the timeline gets to 0.5 seconds of overlap I would like to destroy the actor. I feel like I am not quite getting how to use the timeline properly, or rather, how to output a value from it as I am trying to do.

dusky cobalt
dawn gazelle
dawn gazelle
dusky cobalt
plucky ice
# dawn gazelle Do you want the beam to continually fire once the overlap has begun?

The beam is already firing on mouse click so that's fine. I basically want to set a timer or count up as soon as the beam overlaps with this object, and it it overlaps for more than 0,5 seconds consecutively destroy this object. That's all! Basically make the person hold the beam on the object for 0,5 seconds to get it to actually break otherwise the timer resets if you move the beam off.

lofty rapids
#

if you do this, whenever you set the target variable, it will blend to the destination

dark drum
dawn gazelle
# dusky cobalt Its set as 30

So if you're fully rotating your mouse, you'd get an action value of 1. Delta Seconds is going to be something like 0.016. The output would then be 1 * 30 * 0.016 = 0.48

#

If you want more rotation, increase the rotation.

dusky cobalt
dawn gazelle
#

If you want to rotate less, then decrease your rotation speed.

dusky cobalt
#

Yeah I get it, but I don't want to hold the click and move per second.
I want to click Q, and rotate by 30 in a smooth time.

#

and if I click E i rotate by 30 in the other direction

dawn gazelle
#

Ok so then you'd do what engage is saying

#

Set a value on the click. In tick, you'd do your interp.

dusky cobalt
#

Ok

dawn gazelle
#

From Current > Target

dry pecan
dawn gazelle
#

How/what are you setting into "Target" in your PlayerBullet?
I'd suggest maybe plugging in "Other Actor" into the "Boss_Enemy" cast and removing the branch before it. That way you don't need to worry about telling the bullet what to damage.

dusky cobalt
#

Any upgrades? It kind of works, but it's way faster than InterpSpeed that I set to 5.

#

ohh, i have to put lower than 1 to make it slower

dawn gazelle
dry pecan
dawn gazelle
dry pecan
dry pecan
dawn gazelle
#

How about checking if your bullet actually hits something? Put a print string immediately on the OnComponent hit and check what its hitting

plucky ice
plucky ice
dusky cobalt
#

Ok I made it the way i wanted.

#

turns out I dont like it, its limiting, but I might include it as a settings xD

dry pecan
#

can anyone help me debug why my health progress bar always starts at 0 at the beggeining? I have it here to show what my HP currently is for my boss at all times but for some reason it goes straight to 0 percent, works fine for my player but not my boss. I used string to check my current HP so I know what it currently is at all times

dawn gazelle
dry pecan
dawn gazelle
# dry pecan

How are you setting the "Boss" value in the widget?

dry pecan
dawn gazelle
#

Ok, so that's setting what type the variable can hold, but how do you tell it which instance of "Boss" goes into it?

dry pecan
#

its the one thats already in the stage I think

dawn gazelle
#

No, it contains nothing if you haven't set anything into it.

#

Effectively, after spawning the boss, you need some way to communicate to your widget to use that particular boss.

#

An example (but not the best) would be something like.
Boss Begin Play > Get Widget of Class (Whatever contains your Boss HP Bar) > Set Boss to Self

dry pecan
#

this is in my boss

dry pecan
dawn gazelle
#

Well that at least gets you the right "set" that you need, but the cast isn't helping here.

#

Use a "Get Widget of Class" node

#

You should be able to select Player_UI in there.

#

The return value you should then be able to hook up to the "Target" pin of the set.

dawn gazelle
#

Ah sorry guess it only gives you an array - drag off from the array, do a "get" then connect the output from that to the "Target" pin

dusky cobalt
#

The best way to do it with health is to:

  1. Add widget to your Boss
  2. Set Widget on begin play.
  3. Have interface Get Health
  4. Bind your progress bar with health to the % of your Get Health / Max Healt.
dry pecan
dawn gazelle
#

It's not necessarily a bad idea, but depending on the complexity of things it can start to get difficult to manage.

dusky cobalt
#

No, it's ok, just put that widget both on player and on boss. You have to add it into components and also put create widget node inside both blue prints.

#

How can I check in what places i'm calling that event if I'm calling it from other blue print?

dusky cobalt
barren tangle
#

is it possible to manage priority of overlapping?
If you overlapp 2 component at the same time. one that give you a buff and one giving you a debuff.
if you are into the buff you dont want that the debuff activate.

#

is there i kind of overlapping priority ?

rancid hull
#

Hey was wondering i have animations for aiming and im not sure how i should implement them should i use a montage or do smth in my anim graph

dawn gazelle
dusky cobalt
dusky cobalt
barren tangle
#

but if i stop overlaping the buff, i would not received the debuff because

dry pecan
dusky cobalt
dusky cobalt
#

and you can add unique items ''effects''

dry pecan
dusky cobalt
#

what is the most unversal component to add as root that will hold other things ?

dry pecan
dusky cobalt
#

I mean yeah because i set it, but i want something that is more kind of empty?

#

like placeholder

#

right now it's box collision, will it work as place holder if i dont put anything there?

dawn gazelle
#

SceneComponent

dusky cobalt
#

thanks ❤️

eternal spruce
#

Hi there! I'm currently using the Collab Viewer template to do a test on some VR and Desktop working together. Everything is working as it should but when I press the VR button it takes me to the player start but like way above where it is on the level (high in the air). I've tried teleporting the player pawn back down to the start location but cannot get it to work. Any solution you may have?

still sundial
#

Hello, is using a weight table the best way to have weighted randomness?
I have an integer in range between 0 and 5 and a value is chosen at random but I need different percentages for each number.

granite elk
#

Quick question, I am attempting to cast to an object in my game that spawns in some time after the game has launched. Does the cast to need to occur after the actor has spawned in the game?

plucky ice
#

Does anyone have any thoughts on how I could modify my blueprint here to specify a minimum distance in X,Y space between the spawn locations? Would I access the StarsandLocations array for each loop of the While statement and enforce that each component of my Make Vector is greater than some amount different from them? My goal is just to avoid stars spawning on top of eachother / near eachother.

thin panther
faint pasture
atomic prairie
#

Hey! When the AI ​​chases my character they sometimes block each other, I would like to add a force that pushes them back if they cross each other to avoid this. How to do? Do u have an example?

faint pasture
#

You can enforce a min distance but that can get very expensive depending on your star density

#

You can also break the area into some grid and put a star in a random position in random grid elements

plucky ice
# faint pasture Any particular reason you're doing this in polar coordinates?

Currently for simplicity they are spawning in a circle around a central point. In the future they will be spawning in 3 dimensions, with height as well. I was thinking about moving toward a grid based implementation to make this easier when I have a bunch of stars but I'm not sure how to get started with doing that.

faint pasture
#

That should get you a nice random distribution

dark drum
faint pasture
#

you can do some math on the "put a star somewhere randomly in that square" to enforce the minimum distance

#

Yeah might not be a bad idea to distribute them evenly them move them all randomly within x distance

plucky ice
#

Thank you both! I just started with Unreal last week so still pretty new to this. When you are talking about coordinate pairs, I would use the actual position coordinates that correspond to where in my game world those squares would exist, right?

faint pasture
#

I'd do it in integers and then convert to world coords by some GridSize value

#

like, 2,2 might mean 200.0, 200.0 or 60.0, 60.0

#

When working with grids its often a good idea to have the underlying grid representation in integer coordinates and convert to vectors or floats when going to/from the world

plucky ice
faint pasture
#

Even distribution + random offsets will be the most performant. How many stars we talking here?

plucky ice
faint pasture
#

yeah try them both, the grid coords -> shuffle -> random position within grid will distribute them more clumpily

pearl flame
#

Hi! So I've made a bow and it's system and all, and it went well, until the last phase. Somewhy the apply damage node isn't working. It always returns 0, and the target actor isn't getting "Any Damage" event.
The first image is in the bow. The linetrace gets the enemy actor, and it sets the actor as the damaged actor. And then in the second image, is the apply damage. The actor is 100% the same, cause I tested it with a destroy actor node, and it worked. The damage is not zero, but even if it was, it should fire the "Any Damage" event. I've searched for solutions, but I didn't find any, which has worked. Please, help me!

dawn gazelle
pearl flame
glass nacelle
#

Guys, any idea why When I use "OpenSource" Node from a Media Player (for a video), it sometimes takes a lot of time to load? is there any way to pre-load the video, then when it's ready I got notifies (by binding to an event) and I can finally play it?

#

😞

dawn gazelle
dark drum
pearl flame
visual crest
#

where and how would I start seaching for this array that is broke?

sleek pilot
dusky cobalt
#

I have 2 game modes and both are identical, and one is using CameraPawn, and the other one is not possesing one it's in like spectate mode that I can go freely, both levels have overriden settings

#

oh it was because of event Handle New Starting Player, nvm

dawn gazelle
visual crest
#

thats just it the largest array I know of is 100. And then it says something about control rig. And my control rig as far as I remember dose not have any thing to do with arrays.

visual crest
foggy otter
#

i have a transform and i want to modify it by a specific rotation (say 90 degrees yaw), but i want this rotation to be applied in the local coordinate system of this transform, not world (so 90deg in whatever is the local z of the transform, not around world z). how to achieve this in blueprints? i have tried the compose transforms node, which absolutely does not do that, i have tried transform rotator and then compose rotators, which also does not work. what am i missing here?

cunning vapor
#

Can someone help with getting my menu to open (again)

What I want:
------ (Interact zone) On Interact (E) ---> create widget ONCE(menu blueprint)
------ when widget is deleted (menu blueprint) - You can repeat in the interact zone

I've got the "Do once" which works to stop widget duplication; but cant find the best way of allowing it to be made again,

EDIT: im trying to reference the menu for the 'reset' but cant seem to get it to work

Thanks in advance

visual crest
#

then you just have a ref to it and have a toggle menu. Some thing like this

cunning vapor
#

I think I see what you mean!
So in my game; im in a "Base" where i run around and theres a lot of menu's --- your saying to make all the menus on the viewport and then just simply show/hide visibility on them >??

visual crest
#

yea

#

another example a bit more thought out then the others

#

here you see I make my main Hud and make a ref to it so I can adjust it later

cunning vapor
#

This helps a lot; thanks a bundle! (:

#

Do you reckon it would be better to create the menu 'on start' on the object im creating or the "Base" map event graph ?

visual crest
#

a more readable pick

visual crest
# cunning vapor Do you reckon it would be better to create the menu 'on start' on the object im ...

That can depend on what you are doing. If the UI is like a map you could make it in your level BP. But if you are wanting to keep it more persistent then the player controller is what some do. The thing is is that there is no right and wrong with a lot of this stuff you can make anything almost any where and as long as you know where its at and it works its good. The problem comes when you have some one ells join you and they can't find anything lol.

cunning vapor
ancient moth
#

Is it possible, to check for overlapping actors, without them having Generate Overlap Events enabled?

odd kiln
ancient moth
#

Yes, but it doesn't really matter, the issue is, that I'm resizing the character, and it might get stuck in a wall/ceiling/... and I want to prevent this.

But to check that with a collision component, I would have to manually activate Genater Overlap events for each object in the level.

#

Do you think I should go down that route, and will this have performance issues?

cunning vapor
dawn gazelle
visual crest
#

yea you must not be calling the add to viewport function

odd kiln
visual crest
#

you have to call Creat all menus and hide first

odd kiln
ancient moth
ancient moth
odd kiln
odd kiln
visual crest
# cunning vapor Feel like im doing something silly

Also you should really be adding your locker to some type of main UI canvases not just adding it to view port. Show when game starts creat a Main UI canvas open it up and add your locker UI to it then you can access it like so.

odd kiln
cunning vapor
ancient moth
# odd kiln But I guess that you are scaling up your character at runtime right ?

yes exactly, and currently I want to create another capsule component that i scale up beforehand and then check if there are any collisions, and if so deny the upscale, but to get the overlapping objects, as it appears, they need to have Generate Overlap Events enabled, which I then have to set for everything. I'm not sure about performance and maybe missing it for some but maybe it gives better control over that anyway.

visual crest
#

Its not perfect because I am still learning but you will see how I have the basics of a UI set up.

visual crest
# cunning vapor thanks!

If you have any questions feel free to ask If its complicated I may even make a video showing what you are asking about.

ancient moth
#

But do you think, enabling Generate Overlap Events for all the Actors/Meshes in the scene will impact performance poorly?

ancient moth
#

Because I need to check if there are any overlapping objects

cunning vapor
visual crest
ancient moth
visual crest
#

You can attach a Box or sphere collision and do this

ancient moth
visual crest
#

there is also. If you are trying to get a static mesh though you should use a Trace on channle visability

ancient moth
visual crest
visual crest
odd kiln
#

I think with Trace the Actor does not need generate overlap ticked

visual crest
#

nop it don't

ancient moth
#

And I could use MultiCapuseTrace and match the capsule to the chracter collision capsule, then I could be certain that it wont be struck

#

Ok than using the trace might be way better, I guess, this way I also want generate hunderts of events for something else

visual crest
#

yes but don't hook the trace to the event tic 😛

#

just fire it as needed

odd kiln
#

I guess for your case you just need to fire the Trace Event once

ancient moth
visual crest
#

yea it sounded like a extreme that why I said something

ancient moth
#

Thank you guys very much, works like a charm!

odd kiln
#

Glad that you found a solution !

rotund venture
#

Anyone able to help solve this problem? Players should spawn facing each other, the client pawn turns 180 after possessing when in spawn point 2 (Right img 1)

oak fable
#

hey there
is there is a way to lets say when i begin playing and i have a sphere collision on my player to know what is colliding with it or what is already inside it without using begin overlap and end overlap

sorry for my English 😅
here is a video to better show what i mean

sterile spindle
oak fable
#

In event begin play you mean?

sterile spindle
#

It'd be better in event Tick, so it continuously checks

#

Unless you just want it to check once, then yeah, event BeginPlay will work fine

oak fable
#

wouldn't that be so expensive? as my game is openworld multiplayer

stoic ledge
#

would creating the collision spher after spawing work?

sterile spindle
#

If you only want it to check for stuff when spawning, it should be fine

oak fable
#

yeah i mean in event tick

sterile spindle
#

Again, not expensive enough to cause issues, I think

#

If it does end up causing issues, it might be worth using Begin Overlap just to trigger Multi Sphere Trace

#

That'll reduce the overall cost

obtuse kraken
#

For some reason none of my events and nodes are visualizing their outputs when I run my game

#

Can anyone help me?

lunar sleet
#

What do you mean

graceful sage
# oak fable i will try

You could try using a timer when beginoverlap and checking for overlapping actors and do trace and then invalidate timer on endoverlap

sleek plover
#

Does anybody have an idea to create a material like black-body (which absorbs all lights, i.e., black and unlit) ?

spark steppe
#

what's wrong with an black unlit material to ask this question in the first place?

vivid notch
#

Do you guys name local blueprint vars differently from global one similar to what you would do in code?

#

Like writing lower case for local vars while uppercase for global ones

gentle urchin
#

Yes

frosty heron
#

@vivid notch what global variable are you talking about tho

#

Do you mean just the variable in the class?
I suppose you don't mean global variable where any instance can read.

Afaik normally the prefix is g_ but i haven't really seen any because global variables are inheritetly evil

vivid notch
#

Yes a class variable

frosty heron
#

Those are just access specifier, nothing to do with either global or local var

#

Public anyone can read

#

Private only that class can read and write. Not even derived can

#

There is also protected, but I don't know if it's a thing in bp. It should tho

vivid notch
#

Like these:

#

I was asking whether there is a naming convention to help distinguish between private and public variables.

frosty heron
#

Private and public are access specifier, don't get it mixed with local variable vs non local variable

#

For me, I use l_ for local variable

vivid notch
#

Local variables are those you define in a function body correct?

frosty heron
#

In blueprint, yes

#

Their life time tied to the function

vivid notch
#

Ok got it

spark steppe
#

isn't BP messing with the displayed name anyways?

vivid notch
#

Hmm don't know about that. I just know that it seems normal for people to for example to name a private variable in lower case while having the first letter of a public variable uppercase.

#

In code that is

spark steppe
#

yea, makes kind of sense

#

somehow bites with epic naming of bools for example which are like bool bSomething;

#

i wish there was a nicer way to see in the context menu if something is local or global tho

#

too often i had the issue where i had to take guess of which is the local and which is the global var -_-

vivid notch
#

You meant local vs global not public or private access specifiers right?

#

Maybe I'm just overthinking it. Online tutorials in blueprint seem to do just whatever. But I guess many of them are designers not programmers

gentle urchin
#

If even ^

frosty heron
#

Isn't there a complete article and guide lines for epic coding standard

#

In my case rider always remind me

#

They don't use _ afaik

#

Capitalise the letter instead

#

MyNumber

#

L_TempNumber

maiden wadi
frosty heron
#

EnemyCharacter instead of Enemy_Character

inland crystal
#

in CPP there's an unreal writing convention and it is checked by both VS and rider, it's basically large cap at the start of every word, no underscores, small b in the start if it's a Boolean, not crazy.

frosty heron
maiden wadi
#

😄 Yeah

sick tendon
#

I am following some videos to learn new parts of the engine and my editor started something different from what I see in the videos. when I implement an existing event it is always adding the parent call, but iirc it never did that before in this same situations. am I missing a config somewhere that I might have changed?

frosty heron
#

Hard to tell without knowing what you watch

#

But what you need to understand here is what parent call is

#

Dw about the video you watched

sick tendon
#

ah I know what it does, I am just confused because my editor is adding the parent node but in the video it doesn't do the same, even following the exact same steps to add the event 🤔

#

this is all I am doing in a fresh blueprint file inherited from BTTask_BlueprintBase

#

here is another example in a blueprint inherited from User Widget, I click to add the Pre Construct event and it always adds the parent call

sleek plover
#

@spark steppe I made kinds of a traffic light, and this figure is part of the cyan light.
However, in this figure, some of the cyan is reflected on the black material even though the black material is set to unlit.
So, I do not want to have any reflected color there.

spark steppe
#

that should avoid any reflections

edgy forum
#

how to use this blueprint node (seems like a bp interface node)? I want to create a project where I can selectively remove animation tracks from metahuman joints, for example, removing only eyebrow raise joints, or from chin up/down joint. if this is not the node to do it, is there any way? please help

#

my metahuman animation is inside sequencer, i play that sequencer via blueprints, i have buttons which i want to use to turn off metahuman bone track animations for selected joints.

untold fossil
#

Hello I'm back. (with my unique number from coordinate pairs problem) So I tried a whoooooole bunch of things. From Cantor functions to using split up seeds, to using distance from center combined with pairing functions. Nothing gets me a non-duplicate number results. 😦 I'm going out of ideas here but this is paramount to my game. I need to get this working somehow, because without it my entire game idea falls apart. peepocry I desperately need help.

maiden wadi
untold fossil
#

Theoretically endless. But in reality nobody will ever truly (probably) go beyond a certain point. My world is built from the origin. As players travel away from the origin, the game gets harder and harder.

maiden wadi
#

Okay, but what are your grid sizes. You said a cell was like 10k?

untold fossil
#

yup, that's correct

#

The way it works is grid sections (like tiles on a chessboard) are spawned around players. Then inside those grid sections either a random island is spawned or nothing (open ocean). So what I want is being able to drop a player anywhere in the world after which the grid starts generating around said players and giving the exact same islands as when the player would have started from 0,0,0 and traveled to that location

#

Therefor afaik the only reliable thing to use is the x and y coordinates

#

of the spawned grid section

#

The Cantor function was the closest I came to a solution. It actually worked nicely except for one issue: negative numbers. It sadly can't handle that.

maiden wadi
#

So. Math says you could make a grid side of 22,000 for each corner and still stay within the positive side of int32.

untold fossil
#

Do you mean 22000 grid sections to one corner of the map?

maiden wadi
#

That would be 22,000 x 10,000 for size. Which is roughly 1,367 miles for one side of the map.

untold fossil
#

Yeah that sounds big enough

maiden wadi
#

So you'd end up with a max of 2,734 miles of map if you ran from one side to the other. 😄

untold fossil
#

It takes around 10 mins to sail across a single grid section's length

#

7.333 hours to sail across the entire world lol

#

Pretty confident no players will ever go this length

#

😅

maiden wadi
#

Either way, the point is that you have 2,147,483,647 values in an integer. Not including negatives. So you need a value that fits within 25% of that.

22,000 x 22,000 is 484,000,000

untold fossil
#

Ok 🤔

#

The idea btw is to somewhere far far away at a certain point stop generating islands, at that point players would enter an endless bare ocean. There should be more than enough islands to sail back to anyway. So there's no actual need for the world to be truly endless. Just very very big is enough.

maiden wadi
#

+X, +Y
You add X and Y together. Add nothing else. This is a range of 0 to 484,000,000

+X, -Y
You add X and Y together, and then add 484,000,000 to this value. Now you have a range between 484,000,000 and 968,000,000

-X, +Y
You add X and Y together, and then add 968,000,000 to this value. Now you have a range between 968,000,000 and 1,452,000,000

-X, -Y
You add X and Y together, and then add 1,452,000,000 to this value. Now you have a range between 1,452,000,000 and 1,936,000,000

#

You can't end up with a same value for the same 10k by 10k grid cell.

untold fossil
#

Aha! Very interesting yeah. I'll try that

#

Will report back in a bit! Thanks already for the tremendous help though. REALLY appreciate it ❤️

iron furnace
#

hopefully easy question, how do i save variables between game sessions? im trying to save player sensitivity and audio settings between play sessions, and i found game instance but i do not think that helps me out. any pointers?

iron furnace
#

nope, just blueprints unfortunately

maiden wadi
# iron furnace nope, just blueprints unfortunately

Then pretty much everything should go in a SaveGame.

Normally there are two different ways to do things. Device related settings like graphic settings and sound settings are normally done in the GameUserSettings. This largely writes to an ini file. But it requires C++

Then user specific settings like color blind or personal preferences are saved in a SaveGame because the binary savegame is easier to transfer around with the player when they switch machines and such.

But you can kinda do both of these in a savegame if you're BP only. Chances are if you get far enough to care about the split, you're on consoles, and if you're on consoles, you're gonna need C++ anyhow. 😄

edgy forum
maiden wadi
#

Apologies, I don't know much about metahuman stuff. But the tracks, are you turning them off for the editor only?

#

There are some editor utility things that allow you to edit sequencer stuff, but I've only vaguely messed with them.

edgy forum
#

during play, i want to simulate loss of muscle use while metahuman animation is playing. so that has to be done by turning off certain bone track animations.
currently i'm turning off sections of the animation tracks (entire animations) switching between them.
but i want far more granular control by switching on/off bone track animations for example head_joint

#

no worries

#

if you can even guide me on using this "remove all bone tracks" (message) node i can figure it out.

maiden wadi
#

There was a thread. Wonder if it's still around.. sec.

edgy forum
#

there are quite a bit of (message) nodes in blueprints , if I can learn to use them it will be a good way to solve this issue, thanks!

vivid notch
maiden wadi
#

Hmm. I can't find like an enable or disable in here. But these were about where I left off. You can edit the sequencer tracks with these and other functions.

obtuse kraken
# lunar sleet These are…words

Idk what you call it but when you run the game the blueprint graph is supposed to visualize the firing of nodes and stuff right?

dawn gazelle
lunar sleet
edgy forum
urban tinsel
#

is there a more efficient way to do this ?

#

when i'm moving my character i'm locking the camera rotation, and when i'm not moving them i'm letting the camera orbit around them

#

but when i print string after setting the orientation and rotation, it prints a shit ton everytime i move, so it's also probably settings those values a bunch as well? is that bad practice? is there a more efficient way ?

dusky cobalt
#

Should I implement enhanced input system if I want to use Left Mouse button instead of using this event?

dark drum
# urban tinsel is there a more efficient way to do this ?

Why are you enabling and disabling orientate to movement and use controller desired rotation? It sounds like you would just have them disabled.

Blocking camera movement could be as simple as adding a branch at the start of the look input action that check the is moving bool.

frosty heron
dark drum
dusky cobalt
#

Does it mean I can exchange ''Event Tick'' to the Hold trigger ?

#

Also If I want to just get button click, value type will be Digital (bool) ?

dark drum
dusky cobalt
#

Hmm so equivalent of Pressed is Triggered and Released is Completed?

#

or should I make 3 Input actions if I want to have: Pressed, Held, Released ?

dark drum
#

On going and cancelled are more applicable if you're using modifiers.

dusky cobalt
#

Ok, so I don't have to put Triggers inside the Input Action actually?

dark drum
dusky cobalt
#

Thanks for help, it works 😄

iron furnace
#

anyone have any idea why my game is crashing? i keep getting this error

Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\MallocBinned2.cpp] [Line: 1438]
FMallocBinned2 Attempt to realloc an unrecognized block 00000205423D0000 canary == 0x0 != 0xe3

maiden wadi
#

If it's random, RIP.

dark drum
# maiden wadi If it's random, RIP.

The worst of all bugs.

The feeling when you just happen to have the right thing open at the right time to actually catch the cause of random bugs is glorious haha.

iron furnace
#

It has been completely random unfortunately

#

I havent been able to identify when or what is causing the issue, ive been standing still and had it pop before

#

it only pops up in a build like shipping or dev, not in editor as far as i can tell

#

I can post the debug build if someone wants to take a look, I dont know whether thats allowed or not

#

or i can also post the crash log

edgy axle
edgy axle
iron furnace
#

Im not sure what that means, ive just downloaded it from the launcher lol

edgy axle
#

nvm then

#

you tried verifying your installation?

iron furnace
#

will try that now, thanks

magic gorge
#

I have a UObject Class for a quest phase and I need to call a function from function library but it gives me error for missing world context, know a solution?

rotund barn
#

any idea why the delay breaks this? it destroys the actor immidiately when no delay, but with the delay the actor never gets destroyed.

magic gorge
rotund barn
magic gorge
iron furnace
dark drum
magic gorge
#

Ok gotcha thanks

young meteor
#

Hey folks

I somehow get an infinite loop error. I have tried manually looking through my BP's, but I can't seem to figure out what is triggering it.
I get the BP in question from the error log.
Is there an easy way to find the actual issue from that?

#

It seem to reference this "Is Valid" node as far as I can tell:

#

I'm checking if self is valid because I spawn the BP as child actor from another BP (and if the parent has been destroyed I guess "self" in the above screenshot could be invalid):

iron furnace
barren tangle
#

a need to manage different actor into my actor list

#

is there a good way to do that?

#

or i have to do with lot of If condition

#

is there a Case node?

#

or i need to create a macro? with inside all different type of casting?

dark drum
dark drum
young meteor
barren tangle
#

actors are different actor overlapping my collisions box

#

if for example it's a road : i need to say you are on a road, your speed is 100
if it's on a mudd: i need to say you are on a road but on a mud so your speed is 75

dark drum
barren tangle
#

so i have different type of actor and i don't know which they are, but i need to know what type of actor i have into my list

#

and exept by casting all of them to find what i have. i don't know if i can know what i have into that list

young meteor
barren tangle
#

like that i can redirect to the good code base on what i know i have

dark drum
barren tangle
dark drum
dark drum
barren tangle
solid needle
#

anyone know whats causing this blur effect on cameras?

barren tangle
#

if the same surface could have 2 different role

rotund barn
#

quick question about casting, i know it increases ram consumption, as it keeps whatever you cast to loaded there, but if i cast to the same actor multiple times, both in the same blueprint, as well as in other blueprints, does each one of those castings cause an extra copy to be stored in ram, or will it only be stored once and used by all the blueprints its casting to? ill learn interfaces later, but for my first project this will determine how crazy i can go with casting.

solid needle
#

where character turns into dust when moving lol

marble tusk
#

TAA

barren tangle
#

if you are into a fast road the mudd will slow down from 100 to 75
if you are into a slow road the same mudd will low down from 50 to 40

solid needle
barren tangle
#

so the same mudd will be the same surface but they need to play 2 roles according on what is under the mudd

#

and if the actor overlap at the same time the fast road and the slow road... we need to determine wich one will have the priority

#

and i need to do those check on onverlapping and end overlapping

#

otherwise i don't see how i will manage all those rules

dark drum
dark drum
ocean gate
#

So I want to make all lamps in my game to flicker randomly, should I use timers for this or is there a better way? (There will be hundreds of lights in a single scene, so that would be hundreds of timers running. Is that bad? Even if they only execute every minute or so?)

rotund barn
dark drum
thin panther
dark drum
thin panther
#

Yeah, it's the default object that gets loaded, of which the engine loads of every C++ default object.
It only loads bp ones when needed, but if it's the one that has assets in, you can have a very very bad time.

It's one of those where you don't notice it until ("Why does my RPG need 12GB RAM?")

dark drum
#

Sometimes I'll add a blank function to a base class even though it's only implemented by one child just so I don't have to cast to the child.

heavy shell
#

Need some help, crazy desperate to why this little code aint working, its been damn days and i cant not for the life of me work it out. It just wont add it to the scroll box.

#

I have tried so many iterations of it, but yeah not a damn clue

heavy shell
#

Yeah

#

Says scroll box 0 each time

maiden wadi
#

And in the widget you're creating here. Does it's Construct event run?

#

It should run during the AddChild function.

heavy shell
#

Did this, and no its not printing it

#

So the create widget is not creating the widget

maiden wadi
#

Odd. You're sure the scrollbox is valid and added to the main menu hierarchy, and you're sure that you have the main menu widget that is displayed on screen?

heavy shell
#

Yeah quite sure, otherwise it would print an error cos it cant find the list in the MainMenu.

#

Thats the scroll box in question, mind you i have almost the exact same thing next to it that works and displays everything.

#

Thats why im here to ask questions for the first time, cos this one is over my head

maiden wadi
#

Nothing about your code is wrong. Create, Set initial state, Add. You should 100% get a print in that widget's construct assuming that code line is running and the main menu and scrollbox are valid.

stark pendant
#

I remember the list view widget also having an issue with add child. I plugged in a vertical box and that worked fine in its place, but it's not the best replacement. Some things are just weird.

maiden wadi
#

You don't add children to a listview widget.

#

That's also not a listview widget.

stark pendant
#

so how do you add content to a list view widget?

heavy shell
#

here is the working side, its mean to be simple XD When click button make new widget. Guess i was wrong lmao

maiden wadi
heavy shell
#

and this is the code for that working side,

#

Little different

ocean gate
dark drum
stark pendant
maiden wadi
#

I mean it has to be or you'd get errors for the FName set. :/

#

I could see display issues or something, but the Construct event not running is really confusing.

heavy shell
#

Yeah thats what is getting me too, i made it soooo simple so the core concept just works then once it works expand, but even then, simply creating the widget isnt working, Bruh moment

maiden wadi
#

Makes me really happy I don't do a lot of manual widget creation anymore. 😄 List/Tile views for the win.

heavy shell
#

XD

#

Thats what i was trying to avoid, its all populated from a struct/datatable

#

But its poopy

#

Stinky

shadow bay
#

guys I made a Enemy AI,but I dont know how can I change his Chase Run Speed?

maiden wadi
#

Eh, could still and should still use Listviews if all entries are the same. You get virtualization. Which means much less created widgets, so much less slate prepass.

#

You can just make a simple Object class with your RowName and create those from the list of names you have. Pass that array of objects to the listview and done.

heavy shell
#

yeah possible a rework might be in order

heavy shell
stark pendant
heavy shell
#

@maiden wadi Thanks for the help btw, Ill try a list view. See how that goes

shadow bay
maiden wadi
stark pendant
stark pendant
# shadow bay how

programming. State machining with blueprint and editing the value through the character movement component on your character actor.

heavy shell
shadow bay
odd kiln
#

I think to change speed of a Character you need to change "Max Walk Speed" variable

shadow bay
heavy shell
#

When i work out this damn UI stuff, ill be looking at making AIs so i should be able to help ya then xD

shadow bay
#

ooohh

odd kiln
#

That's normal you have to set "Max Walk Speed" to 1000 for example when you run and then when you wanna walk you set the same variable to 200 (for exemple)

maiden wadi
#

I really cannot wait until GAS attributes are usable in BP. Gonna make helping people with issues like this a lot easier. :/

shadow bay
#

ok I made ity

odd kiln
#

Yes in the beginning of learning UE it's not very easy to understand which variable makes what exactly. You have to test it and see how it works 😅

shadow bay
#

ye lol

barren tangle
#

why in the first case i can search for a specific object but on the second case i can't?

stark pendant
barren tangle
#

isee

sinful thorn
#

why could this be happening?

#

in the bp its fine but in an actual level its flipped 180

heavy shell
#

try making a little script like..On BeginPlay have flip 180? Just rotate it by 180 and see if that works lol

sinful thorn
#

i think my sails material is causing it to be curved backwards instead of front

oak gust
#

You can't override on reo player state in blueprint ?

sinful thorn
#

i can

#

i think its my sail material

maiden wadi
barren tangle
#

object reference

maiden wadi
# barren tangle object reference

This would be why. Assets are also objects. But assets can be globally referenced. ActorComponents are instanced at runtime. So you cannot pick a specific instance of an actor component.

steady night
#

hey how can i make it so this box dont follow the caracter

#

like make it detatch ?

barren tangle
#

put it outside the character bp

#

or manually update its transform in a world position i guess

steady night
#

hmm

#

can i add it as a component ?

barren tangle
#

maybe click on static

steady night
#

aye awesume

#

but then it cant be moved at all :/ ?

barren tangle
#

i guess

steady night
#

i need to be able to move it via bp

barren tangle
#

then put it outside the character?

steady night
#

hm isuppose

barren tangle
#

maybe you can change the Mobility when you need it to move. but i don't see the purpose to attach it to the actor if you don't want to follow the actor

stark pendant
# steady night hmm

Use blueprint of the character to do what you need to do. If it's attached, use the detach function to detach it. And of course, you can add the component via blueprint instead of adding it in the editor. The mobility doesn't need to change value, because if you detach it, it will stop moving with the character, and from there the character's blueprint will still be able to manipulate it because it still owns the component.

barren tangle
#

and what will happend if you attach it again? will jump to its normal position?

stark pendant
#

depends on the mode. You can keep it relative to actor or relative to world.

rancid monolith
#

Is there a way to view a uasset blueprint from my project without needing to open it?

rancid monolith
maiden wadi
#

Unreal Engine: Browser Edition!

#

Jokes aside, probably not.

steady night
#

@stark pendantyeah that detatch did it dident know u could!

#

why is it like impossible to use the begin overlap on collissions...

#

first image is on the box that i wanna overlapp

#

the 2nd is the player thats overlapping

#

impossible to get overlapping to work

#

zzzzz