#blueprint

1 messages · Page 147 of 1

spark steppe
#

wat?

lunar sleet
#

delay on tick?

spark steppe
#

you don't understand your own code

#

or i don't

trim matrix
lunar sleet
trim matrix
#

is ok now?

spark steppe
lunar sleet
#

is default value of test number 0 ?

#

and also you can rename that to w/e you want

spark steppe
#

because he swapped the directions

#

he increments on left and decrements on right

trim matrix
#

sould i test it?

lunar sleet
lofty rapids
#

it won't explode, hopefully

spark steppe
#

you should stop your fortnite match and use your brain

lunar sleet
#

@spark steppe I hope you're keeping track of our current time

spark steppe
#

yea, 3h

lunar sleet
#

this one's for the record books lol

trim matrix
#

NO WAY

#

NO WAYYYYYY

lunar sleet
#

lmg it worked

trim matrix
#

ITS WORKING!

lunar sleet
#

yeah

#

now delete that and reimplement with Datura's solution 🙃

spark steppe
#

does it work in both directions?

#

i feel like it's still bugged

trim matrix
lunar sleet
spark steppe
#

he probably is a video editor and just reverses the video in the middle

lunar sleet
#

advanced trolling 101

trim matrix
lunar sleet
#

good, now I can delete this from my bp for the nth time

spark steppe
#

ok it looks really like it's working

trim matrix
#

but

#

the hard question is

#

for resolution :)? how we gona do

spark steppe
#

how you are going to make a whole game?

lunar sleet
#

for resolution, pay someone $499 for a masterclass, learn nothing, give up

trim matrix
#

basically for resolution is the same think but i have to change it to resolution or :)

lunar sleet
spark steppe
#

he did understand as much as me

lunar sleet
#

if you don't understand, don't feel bad cause Ben was just as confused lol

spark steppe
#

i turned my brain off when Datura and Baffled posted solutions

lunar sleet
#

it helps climb the steps

spark steppe
lunar sleet
trim matrix
#

i dedicated 24h to find the solution of this

#

i cant imagine at resolution

#

what i have to do Ș(

#

:(

spark steppe
#

make it xbox/playstation exclusive

#

so you only have one resolution

#

problem solved

lunar sleet
#

sometimes

#

I feel better about my own capabilities

#

or the lack thereof

trim matrix
#

I found a tutorial on internet

visual crest
#

For actor is there a way to get the center of mass? Get actor location targets the pivot point of a static Item which is often the ground...

trim matrix
#

now the great question i have to transform it into the Neo solution

lunar sleet
#

but why not add a component to it and pinpoint that?

spark steppe
#

but there's also a physics center of mass, which is by default afaik that ^^ but can be adjusted

visual crest
lunar sleet
#

where the center is on the floor

#

cause half of it is underground

lunar sleet
#

but that could be something else idk

trim matrix
#

Is it guys simple to transform that to Neo Idea?

visual crest
lunar sleet
#

I've learned not to argue what Ben says, so even tho it doesn't seem to do that on my end, I say go for the bounds thing

spark steppe
#

i'm often enough wrong, too

#

but wrap int is broken

lunar sleet
visual crest
#

what is warp int?

spark steppe
visual crest
#

0o

lunar sleet
#

wrap(int) not warp, Scotty.

surreal bridge
#

So, I am having some trouble with getting skills to work in my project.

What I am wanting to do, is have different child classes of a base class and be able to call methods on the class, without spawning anything in.

I don't want to put them in a function library because that will be messy and they only need to be called once, so I don't need the available globally.

Is there anyway to do this with blueprints or would I need to make something in c++

maiden wadi
surreal bridge
#

It's simply going to be an object of some sort that you can call a function on.

That function will take the player as an input so that you can make the skill take effect.

For example, healing the player, launching them in the air, changing their gravity, maybe spawning in projectiles, that sort of thing

lunar sleet
#

sounds like you have a skill issue 🙃

visual crest
surreal bridge
#

The reason I am wanting to have different obejcts to hold the functions is to keep from having to handle it all in a single location and making the code a mess

maiden wadi
#

IMO. Just use GAS

#

It sounds like exactly what you want.

surreal bridge
#

What's GAS

#

XD

lunar sleet
#

there's a plugin for implementing GAS using bp if you're afraid of cpp, though you prly shouldn't be

surreal bridge
#

Ah, alright. I will take a look at it

visual crest
surreal bridge
#

I'm fine with c++, so it shouldn't be a problem

lunar sleet
#

enjoy. It seems once someone goes GAS, they never go back

maiden wadi
# surreal bridge I'm fine with c++, so it shouldn't be a problem

Gameplay Ability system. You don't need C++ exact to use the attribute side. But if you know C++ then that's all the better.

The TLDR is that it's just a component that sits on whatever you need to have abilities. Then you make GameplayAbility classes and GiveAbility to the components. And then try to activate them through the component via the class or tags.

trim matrix
#

Rate my Settings menu guys :(

maiden wadi
#

It's very blue.

toxic copper
#

sorry if this is the wrong spot, but im having a couple of difficulties i think due to capsule component on character blueprint. For one, it's able to use the curvature of the capsule to step onto surfaces it shouldn't be able to, despite step height set to 0. and second, when jumping and hitting the corner of an object, the character is launched to the side despite no physics set on the character

trim matrix
#

i gona make it special

trim matrix
toxic copper
#

do i need to create my own class replacing the capsule component for a box collision or whatever to solve these two things? Ive been reading to change the collision, i'd have to recreate the movement component

trim matrix
#

i started it 1 week ago

trim matrix
#

soon i starting with keybinds section

#

hope it turns out really cool

#

now i gtg. i cant imagine tommorow

maiden wadi
#

Keep at it. 😄

trim matrix
#

how it gona turn out

trim matrix
#

to rate it 1/10

#

:D

#

10/10
:3

#

awwww

#

:3

#

See ya guys

maiden wadi
toxic copper
#

Thanks for the input! it's a tile, so im not sure if im able to access those properties on it

#

will take a look at the air control options and see what i see, thank you!

maiden wadi
# toxic copper do i need to create my own class replacing the capsule component for a box colli...

To answer the other question though. Yes you would have to redo a new movement system to replace the capsule. The Character Movement Component is very assumptive that it has a capsule and a lot of it's code functions as such. Which leads to either a maybe subclass of it in C++ to overrride those functions if they're all virtual. Or a completely new Pawn subclass with it's own hierarchy and movement component code.

toxic copper
#

yeah i have zero clue about c++ and im new to unreal in general.. im guessing recreating movement component (and somewhat understanding what im doing) may be a bit too much atm

#

bummer.. hopefully not the only solution, im sure this would be a common concern on 2d games

#

thanks for confirming btw

dawn gazelle
#

So I'm experimenting a bit with UObjects, and I've implemented a "Begin Play" in C++ that currently triggers in PostInitProperties() after checking that GetWorld() returns a value which I have set up to pull from its outer.

void UTestObject::PostInitProperties()
{
    Super::PostInitProperties();

    //Called in game, when World exist. BeginPlay will not be called in editor.
    if (GetWorld())
        BeginPlay();
}    

I'm creating a blueprint subclass of this object with a single property that I've marked as expose on spawn so I can feed a value into the blueprint. The Begin Play fires correctly, even calls the Begin Play logic defined in blueprints, but the value fed in during construction isn't set into the variable by the time PostInitProperties() fires. I'm expecting to see a random value between 0 and 100 being printed, but it always prints 0. The value definitely does get fed in later, but not by the time PostInitProperties() is called and triggering BeginPlay().

Is there some other function I should be using to call my "Begin Play" from rather than PostInitProperties() to ensure the values fed in blueprints are captured? Or does anyone have any reference to the order in which functions are called within UObjects on their creation?

scarlet hedge
#

heyo

#

I am trying to give random shake to a static mesh, this is the BP that I have so far.

#

my problem is that it starts at 0,0,0 and then slowly moves into world position

inland walrus
#

Any idea why my notification isn't changable with a text variable?

inland walrus
spark steppe
#

there are two SetText nodes, you are using the wrong one

dawn gazelle
spark steppe
#

or wait, is that variable bound to the Text field?

dawn gazelle
#

Doesn't look like it based on the screenshot.

inland walrus
#

Sorry what do you mean?

spark steppe
#

is the variable Notification bound to your text field?

#

with the bind functionality that some widgets have for attributes...

spark steppe
#

no

#

it's not

#

where you update the text, get a reference to the text widget

dawn gazelle
#

Drag and drop this on to your graph. This is a reference to the widget that contains the text.
Drag off from it, and type SetText. That should give you a node that lets you update the text being displayed.

spark steppe
#

since this is outside of the widget (where you update) you have to drag from the create widget node and search for NotificationName

inland walrus
#

Like so?

dawn gazelle
#

Close, but not quite.

#

Simplify it.... Drag the "in Text" to the event, making the event take an input.

#

Then referesh the "Get Notification Name" node here. It should then have a text input.

#

Feed in the text that you want displayed, and it should work.

#

This then would not be required at all.

inland walrus
#

Ayye

#

Nice

#

Thats working, thanks a lot guys

#

Not all heroes wear capes

toxic copper
#

I've added a box collision to my character and set it to block all, yet somehow it doesnt seem to block anything.. any idea why a collision like this wouldnt stop movement?

halcyon heath
#

Anyone have any info on per-object clip planes as mentioned in this video (timestamped):
https://youtu.be/w-Z1Fx0LvDc?si=OPMMs39yatugaENk&t=1126

I'm very close to finishing my portals system and this is the last thing I need to figure out.
I've been experimenting with a material that does a similar thing but I've only gotten it to work on a certain axis so far (in the attached video) but materials aren't my thing so I'm pretty stuck in that regard.

When Double Fine began Psychonauts 2, they set out to create an exciting sequel and chose to create portals to separate the mental worlds and provide fun moments for players. Join Double Fine to learn how they built portals in Unreal, the hurdles they faced, and the solutions that led them to success.

#Microsoft #MicrosoftGameDev

▶ Play video
#

Here's the material blueprint I ended up with purely from experimenting, in case it's useful

sweet grotto
#

-sigh- ... is there ANY way to have a common blueprint utility class so I don't have to keep rewriting code? I keep hitting walls on google saying "you can only create a class that's a child of one of the existing classes" and then only that freaking class can use it. I need to have utility functions I can call from my gamemode class and widget classes like getting steam player names. Why does the engine try to fight this in blueprint? In c++ I include my utility code all over the place.

spark steppe
#

rightclick content browser => blueprint => blueprint function library

sweet grotto
#

I thought that was editor only?

spark steppe
#

no

sweet grotto
#

and I can call that from anywhere?

spark steppe
#

yesn't

#

i think you can't call it from "pure" Object classes

#

but anything that derives from actor (or any of it's child classes) can call it

sweet grotto
#

it won't let me click it

#

it's a base class?

spark steppe
#

also i think for widget's there's a specific type of function library

#

it wont let you click what?

sweet grotto
#

it wants to force me to select one of the children

spark steppe
#

did you create a blueprint?

sweet grotto
#

im dumb, nevermind, got it

#

wrong place

spark steppe
#

so it works now?

sweet grotto
#

yes, this is nifty

#

no variables kinda sucks but it makes sense, it's static

#

stateless i could say

#

and that makes sense, in other code i rarely if ever make utility functions that have variables

sweet grotto
maiden wadi
# dawn gazelle So I'm experimenting a bit with UObjects, and I've implemented a "Begin Play" in...

IMO I think you'll have a lot easier time if you wrap this in a system. Even Actors are done in a way that they are created and then an initialize is called on them to start stuff. Unfortunately to make that easily extensible in BP you'd need a custom creation node for the expose on spawns same as spawn actor has.

But like in SpawnActor code, you have the NewObject creation and then after a bit it calls this PostSpawnInitialize that actually sets everything up.

#

Like if you check out UK2Node_SpawnActor::ExpandNode. The node basically hooks up two major nodes. A BeginSpawn and FinishSpawn. And inbetween it adds a setter for every expose on spawn property. FinishSpawn is what triggers the post spawning code so properties are set at this point.

sturdy verge
#

Hi, is there a way to get the Actors of a Level Streaming Dynamic Instance, the one you get after using „Load Level Instance“.

vivid quarry
#

Why might my angular velocity be super random on a gamepad? I am trying to use angular velocity to feed into another function that slows the player while turning, and it's fine on mouse and keyboard (facing ahead = 0), but even just walking straight using gamepad spits out a crazy bunch of random numbers for angular velocity

maiden wadi
sturdy verge
vivid quarry
#

I'm not finished tying it to anything, the value going off screen is just hooked to my printout node

sturdy verge
#

Why Physics Velocity?

maiden wadi
#

And this gives wildly different things when just pressing up on a thumbstick vs pressing W?

vivid quarry
vivid quarry
#

But on the controller it goes like 1-50, sometimes into 100

#

I know because of how analog is read it's going to vary a small bit of course, decimals or under 10 or so

vivid quarry
sturdy verge
#

If you Capsule Component collides with the floor, it might rotate/interact with physic. Due keyboard being 1 and 0, you might not have noticed, .

vivid quarry
#

It's very new to me

maiden wadi
#

Shouldn't be angular velocity though unless you're using the turning thumbstick.

vivid quarry
#

That's the readout from just walking forward, not touching right stick

maiden wadi
#

Deadzones won't affect that kind of change. That or your controller is fucked. One of those is 50 degrees.

sturdy verge
#

I would try a small example just with the controller and no physic. Just a simple GetActorLocation++ in Joystick direction

#

Personally my money is on you messed up something with the Physic

maiden wadi
#

Random curiosity. Do you get the same returns on the Mesh instead of the capsule?

gentle urchin
#

Thats what I said to myself aswell

#

Modulo upward and == 0 check downward.. thats it

vivid quarry
vivid quarry
maiden wadi
#

Even if you actually turn?

#

Just asking because I know that the capsule is thrown around like a ragdoll when moving, specially on clients. Had this issue with UI where I had to make the mesh the ui's component anchor instead of the capsule due to the capsule spazzing around.

lunar sleet
vivid quarry
#

Within the movement component the rotation rate and orient to movement were changed

maiden wadi
#

💣

vivid quarry
#

So after any turns the player continued to slowly rotate and reorient

#

But not the camera

#

Gah

#

Anyway thanks @maiden wadi and @sturdy verge for the suggestions!

sturdy verge
#

Your welcome

gentle urchin
lunar sleet
gentle urchin
#

Guess i didnt do much explaining of UE modulo™️ tho

verbal kayak
#

how to change material rotator speed in runtime?

maiden wadi
#

You need a parameter.

#

Either a global one from an MPC or a dynamic one on a dynamic material instance.

lunar sleet
maiden wadi
#

Or CPD if you're going that route.

verbal kayak
#

there is no parameter to plug in?

#

the node doesnt have a plug

#

where is speed?

maiden wadi
#

Time

verbal kayak
#

oh so time is now same thing as speed?

maiden wadi
#

Kind of.

#

The node by default takes in Time if you don't plug anything in. Speed is the multiplier of that. If you do plug something in, it's the active time you want to use.

#

You can make your own speed by getting time, multiplying it by a scalar and passing that.

verbal kayak
#

I really wonder why there could not just be a speed plug there

maiden wadi
#

Because it's more confusing. Time is the correct input. But due to convenience of needing to set different speeds, they made the node able to set that as a parameter directly. More complex things should multiply their own time as they need before passing it in.

#

Annoying to learn, nice to have. 🤷‍♂️

verbal kayak
#

?

#

why panner has speed then?

maiden wadi
#

Oh. Rotator does have speed.

#

That's odd. What version of UE are you on?

verbal kayak
#

4.26

maiden wadi
#

Guess someone agreed that it needed to be there. 😄 5.3

verbal kayak
#

yeah i have speed also

#

but no plug

#

that doesnt also have

maiden wadi
#

Ah, fair

verbal kayak
#

Panner has a plug for speed.

maiden wadi
#

I dunno. 🤷‍♂️

spark smelt
#

Hey, so I changed the Scene root component (in CPP) of one of the actors I've placed in a map. But if a map that had that actor was loaded in the background the editor would crash.

After loading as different map I could compile the blueprint but the actors that were already placed in the world don't have the correct scene root component.

Image 1 - If I drag and drop the blueprint now, this is what it shows
Image 2 - the actor I placed before making the change to the scene component

Does anyone know how to fix this?

worldly tartan
#

hello everyone, is there any way to toggle the lights on/off from blueprints ? "lights are imported as a datasmith file and is as datasmitharelight blueprint" actually i want to on and off the lights but these are in datasmith lights and i dont know how to do so?
so if anyone knows please help!!!!

maiden wadi
granite frost
#

Can I make changes to the blueprint if I have its class reference? Like removing an attached component before spawning etc?

spark smelt
surreal peak
maiden wadi
# granite frost Can I make changes to the blueprint if I have its class reference? Like removing...

Yes, but no. Can you? With C++ sure. Should you? Not really.

The issue is that Unreal uses what is a CDO. While it's not exactly the same thing, for most cases you can kind of think of the bluerint's Class like it's CDO. CDO stands for Class Default Object. This is an instance of the blueprint that Unreal uses to instantiate copies quickly and pull defaults from to some degree. If you edit this, you edit it for every future version and anything using the default data from it. It's usually a seriously bad idea to edit CDO data at runtime.

granite frost
#

How can I alter an instance before its spawned?

maiden wadi
granite frost
#

I have item that shows text to pickup and some underlying logic. If I spawn it, it becomes a part of the logic, If the item is already picked I don't want it to become a part of the logic that is used to pick it up. But how can I alter anything about it before spawning it? So it don't automatically becomes a part of it. Or else I'll have to remove it everytime its spawned.

maiden wadi
spark smelt
maiden wadi
dawn gazelle
#

When you go to spawn it, you should then have the option to choose whether or not Pickable is set.

granite frost
#

Will this happen before it enters the world?

dawn gazelle
#

Yep

#

If you place it, you can set the variable on the details panel as well.

granite frost
#

Ok

#

Thnx

lethal pollen
#

Hi!

#

I've read the description of the node Is Over Hit Test Visible Widget:

#

Returns true if a widget under the hit result is has a visibility that makes it hit test. What is the hit result? And also, what does makes it hit test mean?

#

Thank you.

dawn gazelle
# lethal pollen *Returns true if a widget under the hit result is has a visibility that makes it...

it's checking if the Widget Interaction Component is currently over a hit-testable widget. Your widgets have a visibilty setting that can be any of these options, but the only one that is actually hit testable is "Visible", but if "Not Hit-Testable (Self Only)" is selected, it can check widgets that are behind it in the layout if they are set to "Visible" but happened to be covered by a Not Hit-Testable (Self Only) widget.

undone sequoia
#

guys how I can "meassure" game how fast it is on one pc and another and compare if my updates were right and now even 20 30or 15 fps everything is same?

lethal pollen
gentle urchin
#

I usually just do t.MinFPS 144

dawn gazelle
lunar sleet
spark smelt
maiden wadi
#

Initially I want to say no. But I'm not sure if there's a helper for that in editor stuff. In C++ you'd just iterate the property fields of the original and the new and copy the values. If there isn't a generic version of that, it's a bit odd.

gentle urchin
spark smelt
undone sequoia
toxic copper
#

Any idea why this box collision does not block anything? collision preset seems to be the same as the parent. BlockAll did not yield any results either

gentle urchin
#

Rotation ?

#

As long as you multiply by deltatime, speed is equal across framerates

#

300 per tick wouls go faster the higher fps you got

#

But if you do 300* deltatime itll linearly decrease at fps increase,

#

Keeping the speed/s the same

maiden wadi
toxic copper
#

sadness. so any collisions on a character actor aside from the capsule component cannot block movement?

#

Thanks again Authaer, good to know

#

was hoping a thin box on top of the character could prevent being launched by corners due to curvature of capsule. I also tried adding a plane but it didnt seem to block the character's movement either

gentle urchin
#

Launching by corners?

toxic copper
#

yeah if i hit a corner of a square while jumping it gives the character sideways movement

#

rather than just stopping the jump and falling straight

granite frost
#

What do I need to do to make sure that I can fill these variables from default instead of like this on blueprint begin play?

#

I need camera object reference to get the camera that specific player instance is using and collision shape to bind overlap events

#

I made those object references.

#

I need camera's transforms and collision box's overlap events

compact fable
#

Hey guys! I am trying to not use Event Tick, and instead using a Set Timer by Event, though it is not firing
This is part of my widget, and the game is paused at this time. Is the game being paused cause the SetTimer by Event not to fire?

#

@granite frost Hold Windows + Shift + S to take a screenshot

undone sequoia
gentle urchin
#

If you want it to be the same speed unaffected by framerate, yes

undone sequoia
#

k

granite frost
#

Instead of filling these like this

#

I want to fill these

#

I want to use transforms of camera and overlap events of the collision box

#

Is it possible?

#

Class reference may allow it but I can't directly access transform from class

#

Is this possible?

compact fable
#

@granite frost I think setting it the way you are doing is filling the default values when played. Best way to check is to use a print string

granite frost
#

Yes this is working perfectly fine. But I want to do it the second way

#

There is no problem with logic

#

I just want to fill defaults instead of filling it with blueprint like the first ss

#

but I am unable to

#

My problem is simple. I just want to do it the other way. There is not problem with logic at all.

compact fable
#

clicking on none and it showing nothing meaning there is nothing to assign it

#

no blueprints or classes to do so

granite frost
#

So how do I do it?

compact fable
granite frost
#

No, collision shape and camera are just components attached to the player

#

I want its reference

compact fable
#

you dont need to add it there to get their reference

#

are you trying to get their reference to?

earnest oriole
#

Hi there people. Wondered if someone might have a second to help me out with this.
Im trying to make Snake, but im having problems. Im saving all my previous positions in an array, same for each segment added to the snake.
What i want is to go through the x last positions the snake have been, where x is the nr of segments, and put the segments in those positions.
Atm i manage to move all segments to the correct position for the last segment of the snake, but every position between the head and the "tail" is empty.
I feel like im close to a solution, but having spent way too long im turning to you for help

granite frost
#

Its simple

granite frost
granite frost
#

How do I make variable not visible on default but able to be set using reference?

compact fable
#

if its simple then why are you asking?

#

is the eye icon checked?

granite frost
#

I mean you don't need to think my problem is complex. I just lack knowledge. So it might look like I am asking something hard but its probably simple

#

As simple as changing a property in settings or something

#

Like

#

This is picked should not be visible here

#

But I could do this

gentle urchin
#

You cant set instance references in a class template

#

So runtime is your best option

granite frost
#

So how do I make them also not visible in default?

gentle urchin
#

C++ 😄

granite frost
#

If I can't set them, I don't want them to be visible either

granite frost
gentle urchin
#

Yeah its painfull

#

But you can stuff it under advanced

granite frost
gentle urchin
#

Which atleast hides them in a dropdown / advanced section

granite frost
#

So I can't even hide the variables I don't want visible in default 🥲

gentle urchin
#

Life in bp 😄

#

Unless this has changed lately

dark drum
granite frost
#

How do you hide a category?

dark drum
granite frost
#

Ohhhh thank you very much

hybrid frost
#

Hi, can someone explain to me how the "On Component Hit" event works? I created an axe BP and attached it to my character's hand socket. I have created a BP of the object I want to trigger this event for and added the component "Cube" to it. When I run into it with my character the event actually triggers for my character's "Capsule Component", but it won't trigger for my BP Axe, which is held in the character's hand. Why is this happening?

gentle urchin
lunar sleet
dark drum
random pulsar
#

whats the difference between game mode and game mode base?i follow a tutorial and there he creates a game mode ,i checked what i have and i have game mode base

lunar sleet
#

But also if you’re manually attaching the bp axe to your actor and it’s a regular actor and not an actor component, that might never fire @hybrid frost

random pulsar
#

i already have functionality in game mode base so it will be hard to remove it

lunar sleet
#

OnComponentHit is for components. Not actors

random pulsar
#

the author make a checkpoint mechanic in that video

dark drum
# gentle urchin Say what

So if you have a var in a cat and you hide the cat, the var won't show up in the right click menu. It gets excluded from the search. You can still use it it places though but you'd have to setup your logic using the var first or copy/paste an existing var in the event graph.

gentle urchin
#

Oh well glad i dont have to contend with it

dark drum
granite frost
#

I attached a widget to an item. Its visible in editor but when I play its not visible.

gentle urchin
lunar sleet
#

Hidden in game is another checkbox, but idk if widgets have it

dark drum
lunar sleet
#

He means class defaults

granite frost
granite frost
dark drum
dark drum
#

I sometimes use it to hide stuff like, 'Component Tick', 'Activation', 'Cooking' etc... so I can't see the cats for things I know won't ever need to be changed on a BP.

earnest oriole
#

Is there anyone thats good with arrays that have a min to help me out with a problem?

gentle urchin
#

Ask the question and we'll see

earnest oriole
#

Im making Snake, and i have 2 arrays. One for each added segment, and one for all previous 2d vector positions the snake has been at. Every move i want to go through the segment array and put the segments in the corresponding positions

#

I manage to get the segemnts into the correct last position, but they all end up there

gentle urchin
#

Isnt eaten counter and previous location array.length equal?

earnest oriole
#

The last segment follows the snake correctly, but how do i get the reminding psaces filled

gentle urchin
#

So basically youd want to add 1 to array when apple is eaten

#

Otherwise shift entire array and replace the first index with new location (so remove last index, insert first index)

#

Id probably use a circular array but can be a bit troublesome when using add

earnest oriole
#

atm it just puts eveything in the last location. So i probably need some shifting, but i cant change the loc array, as i need it for the next movement tick

lunar sleet
#

Could always use a 3rd array

earnest oriole
#

Thats probably not a bad idea

gentle urchin
#

Move tick is the one that shifts the array

#

Then the visuals are updated

earnest oriole
#

hmmm, im not sure i get this. What you said makes sense. Im just having somee trouble visualing it

gentle urchin
#
MoveTick()
{
LocArray.Insert(NewLocation,0);
LocArray.RemoveLast();
UpdateVisuals();
}
#

If you wanted to make it circular, youd track the HeadIndex

earnest oriole
#

Thats starting to make sense for me

gentle urchin
#

So it would look more like;

MoveTick()
{
 If (ApplesEaten > 0)
 {
  ApplesEaten--;
  LocArray.Insert(NewLoc, HeadIndex);
 }
 else
 {
  If (HeadIndex==0)
  {
   // Set to last idnex if we're at 0
   HeadIndex = LocArray.Num()-1;
  }
  else
  {
   HeadIndex = HeadIndex-1;
  }
  LocArray[HeadIndex] = newLoc;
  UpdateVisuals();
 }
}
earnest oriole
#

Thank you so much. im gonna play around with that

hasty heron
#

Does anyone know if there is a way to stop the editor from automatically inserting a new node into the execution when pulling out from the Array Element?

gentle urchin
#

Not sure if its 100% but.. it might be

maiden wadi
earnest oriole
gentle urchin
#

Luckily im atleast a few (hundred) km away, not much for kisses 😂

earnest oriole
#

Hehe. Very grateful at least. Thank you so much'

trim matrix
#

how are you guys?

gentle urchin
craggy lake
#

Is there an easy enough way to do a simple 'driven key'

Eg

If object 1 is at location x then object 2 is roared to Y

If object 1 moves to location U then object 2 rotates to rotation V

This wouldn't be used by the most blueprint savvy people so looking for just a way to basically change transforms an object based on another object (NOT parenting)

gentle urchin
#

Hehe yepp

gentle urchin
#

You can get 3d widgets for instance editable vectors

craggy lake
gentle urchin
#

Then the vector might be something you can use

#

Onconstruct just set rotation towards that vector by using FindLookAtRotation

#

If you wanna null out axis you can ofc do that

craggy lake
#

'the vector'?

gentle urchin
#

A vector variable

craggy lake
#

I know what a vector is but what would the vector be in that instance?

gentle urchin
#

Mark it instance editable and "show 3d widget"

#

What i interperted as the drive key

#

Perhaps i got it wrong 🙂‍↕️

craggy lake
#

I don't really understand what you're saying. I want to move object 1 and have object 2 do transform based on that first objects transformation. Ideally rotating but its a specific transform eg go from 15 degrees to 30

gentle urchin
#

You can manipulate the final rot if you want less precision

#

I asked if you wanted an object specifically, ansnas I first read it, it doesnt mattee what you move

#

Hence my vector suggestion 🤷‍♂️

craggy lake
#

Right but it needs to be something someone can translate. A vector is just a value, right? You don't move it.

gentle urchin
#

Thats the show 3d widget part

#

It gives you a diamond you can move

#

In editor

#

Try it out

#

And see if it works for you

#

Also works for vector arrays, or multiple vectors in general. With their name displayed

#

Very handy

craggy lake
#

Yep, I don't understand at all where any of this is happening, construction, event or what or where the diamond is coming from. I will do more research. Thank you for you time.

gentle urchin
#

Create a variable - vector

#

In its detail settings mark it instance editable

#

And then show 3d widger

#

Now drag actor outnin scene

#

Select it, and see the diamond appear

sterile spindle
#

Is it possible to use a specific game mode when loading a level during runtime?

craggy lake
gentle urchin
#

In editor thats a tad troublesome

#

Youd need to use a third object for this, which can make sense ofc

#

You can then setup a bunch of properties for the transform relation

craggy lake
#

Yep I would, but I don't know what

gentle urchin
#

Editor utility bp

#

Two actor reference variables

#

ActorA and ActorB

#

Hmm im not sure it would be as smooth as one would hope

#

Unless we can bind to their OnConstruct or something

craggy lake
#

OK don't worry

maiden wadi
sterile spindle
verbal jungle
#

Quick sidetrack: it says this node is server only, but if I'm making a singleplayer game, any reason I should avoid using this due to it's being a server-only event?

maiden wadi
# sterile spindle In Options? What argument is it?

In the options, yeah. The parameter is "game". But you either need to create an ini alias for the game mode. Or specify it by path.

EG ?Game=/Game/SomeFolder/SomeOtherFolder/B_DeathMatchGameMode.B_DeathMatchGameMode_C

maiden wadi
#

So no, no reason to avoid it.

verbal jungle
#

Just wanna make sure XD ty

trim matrix
#

guys

#

i need help

sterile spindle
trim matrix
#

but is not in the category of blueprint

#

so

#

do you know guys an app

#

an online app

#

for edit photos?

#

with no background?

#

i try my logos for the widget

maiden wadi
sterile spindle
#

Oh, class aliases? I saw that in Project settings, do I use that in place of the path? e.g. ?Game=DeathMatchGameMode?

maiden wadi
#

I haven't personally done it. But I assume you can just do ?game=DeathMatchGameMode as an argument after that.

maiden wadi
#

Good to know. 😄 Tucking that away in the random knowledge vault.

#

Doubt I'll ever use it. I do composition based stuff. So I just end up with different components on the same game mode based on game type.

sterile spindle
maiden wadi
#

? separators
?Thing=Something?SomeOtherThing=SomeOtherThing?SomeThirdThing=Blahblah?

sterile spindle
#

Much appreciated red_crystal_heart

hearty saffron
#

Hey everyone, I am a beginner and I think I have a beginner issue. 🥲 In my main menu, I have a widget blueprint that tries to cast to a blueprint that is a game instance. However the cast always fails. Any direction to fix the issue?

sterile spindle
hearty saffron
#

parentclass is GameInstance

sterile spindle
#

What's the blueprint look like?

hearty saffron
sterile spindle
#

Ahh, you're doing the same thing I did lol

#

Classes like Game Instance can't be casted down to classes that use it as a parent

gentle urchin
#

Huh?

sterile spindle
#

They're a child of Game Instance so it can be casted up, but Game Instance has no connection itself to your custom class

gentle urchin
#

They can, if its the actual class

sterile spindle
#

por que?

gentle urchin
#

If you've set the GameInstance to MyGameInstance in project settings

#

You can surely cast to MyGameInstance

sterile spindle
#

Ah, yeah

gentle urchin
#

They're no different from the rest of the classes

hearty saffron
#

That's how it shows

gentle urchin
#

Check project settings

#

Maps & Modes

sterile spindle
#

Yeah, it's at the bottom of that category

#

You can change the "default" Game Instance class for your project

#

The Get Game Instance node will always return a GameInstance (I think), but that can include child classes, so it'll return your custom one and allow it to be casted

gentle urchin
#

It returns the correct one, but doesnt cast for you

#

People tend to make bpfl for this

hearty saffron
#

I see. yeah it wasnt set as my custom one

#

lets try again

gentle urchin
#

With a simple name like "GetMyGameInstance"

#

Where they just getGameInstance -> CastToMyGameInstance

#

In a pure function

sterile spindle
#

I feel like an idiot now lol

gentle urchin
#

A commom debuff when I'm aroundn

#

/jk

maiden wadi
#

On that note though. Don't abuse GameInstance. Don't store a ton of things on it.

hearty saffron
#

Thank you guys.

#

It works

sterile spindle
grand surge
#

hey

hearty saffron
maiden wadi
#

Settings like what?

hearty saffron
#

like graphics and sounds

sterile spindle
#

Game User Settings does that already

maiden wadi
#

There's already settings for that. And you should never use the GameInstance for that.

sterile spindle
#

GameInstance isn't persistent, is it?

gentle urchin
#

It is

sterile spindle
#

o

maiden wadi
#

GameUserSettings should house anything specific to the machine. And you should create a Savegame for any user based settings that need to travel with the user to different machines.

Machine based settings are like graphics, resolution, sound values.

User based settings are things like accessibility settings like color blind options, keybinding controls, personal game preferences to avoid annoying popup hints, etc.

gentle urchin
#

Weird name

#

Game User settings

#

Yet its per machine not user ?

maiden wadi
#

It used to be used for user settings too. 😄 Everything used to be written to an ini file. But it's much easier to port USaveGame serialized files through cloud and whatnot that it kind of got ditched for anything but machine only settings.

hearty saffron
#

Hmm interesting

gentle urchin
#

So do you subclass it ?

#

Usersettings?

#

And add your own stuff?

hearty saffron
#

I had my Game Instance as a bridge inbetween the widget and "BP_SavedSettings" which is under 'Save Game' -parent class

maiden wadi
dark drum
#

talking about saving, is there any built in stuff for helping serialize and unserialize data to and from a string? It's mainly for child class where addition vars might be added but need to be saved.

#

I know there's the 'Parse Into Array' for strings which is useful but wondering if there's anything else.

gentle urchin
#

never been a big fan of stringdata 😅

dark drum
# gentle urchin never been a big fan of stringdata 😅

I try to avoid it lol. Not always possible when you're setting up a save system to handle additional data that might vary. Open to alternatives though lol.

As an example, I have a quest listener that handles listening for various actions and keeps track of whether the quest has actually completed. Not all listeners need data to be saved, whilst others might.

maiden wadi
#

Oh, I should probably read further.

gentle urchin
dark drum
#

Further example, I currently have two functions that you override in the child class to define the additional data that needs to be saved.

gentle urchin
#

Sounds like the data saved is not what should be saved tbh

dark drum
gentle urchin
#

Figured as much

maiden wadi
#

I'm happy I can just store whatever data on an actor or UObject and save that object directly. It makes my life so much easier.

gentle urchin
#

What additional data can this be tho

#

Anything quest related boils down to 1's and 0's?

#

Did or did not do X

dark drum
maiden wadi
#

Active quests are UObject with a data asset pointer in it with progress tracking. Finished quests are a list of data assets in an array.

On save, save all the ubjects, and the quest manager with the array of completed ones. On load just reinstantiate the ubjects and write the data back to them, then get the quest manager and write the data back to it.

#

Then it doesn't matter what you put on either of them to track anything you want.

gentle urchin
#

Anything is a tag and value

#

Escort. Track, use ability, interact with, gather item, has item, equip this

#

Havnt been able to come up with anything that requires anything else

#

I do expect a tag for identification tho, so its definetly easier if related systems use tags

maiden wadi
#

Just remember that you can save pointers. 🙂 And it's fucking awesome.

gentle urchin
#

😆 life is good heh

#

Guess thats one of the 'cons' of my setup

#

As it makes no assumptions about whay its implemented for, it currently doesnt provide any tools for it either

#

Nor any examples

#

So the escort mission needs to be implemented by whoever uses it, and pass tags to my system when appropriate

#

Partial or full goals etc

dark drum
# maiden wadi Active quests are UObject with a data asset pointer in it with progress tracking...

That's not far off how I have it at the moment. I have a quest object and a task object, the task then has a task listener object that actually holds the logic for keeping track of the task.

I currently save the class type for the quest, all the current tasks (might be optional ones) along with any specific data that might need to be saved in the task listener.

On loading, I just recreate the uobjects from the classes and pass any of the relevant data back to them. (if there is any)

dark drum
maiden wadi
# dark drum I know you can save pointers but how does it work? normally they just break for ...

It's not possible in BP only unfortunately. But it's an awesome trick. So.. Pointers actually save as a name path. EG if you have a UObject in an actor component in an actor. You get something similar to like...

SomeActor23/InventoryComponent0/InventoryItem17

The trick is that you save all outers before you save their subobjects. So save the Actor, then the Component, then the Item.

When you load. You simply check if SomeActor23 exists in the world. If it does. Set it's transform to where you saved it, create any missing subobjects that the save data has. Then move on to each subobject the component had and newobject them with the component outer etc. Same as it was when you saved all with the same names.

Once you have done this for every single object in the savegame. Then you make another pass over each one of them in the same order, and write all of the data back to them. And because everything is instantiated with the same names, subobjects, etc, all of the pointers align back up.

young meteor
#

Hey folks

Any easy way to increment an Enum value? Meaning I just want to select the next or previous option in the dropdown (screenshot 2) and set the Enum to that?

maiden wadi
#

ToByte, +1, to Enum

dark drum
young meteor
maiden wadi
#

Yep

young meteor
#

My thanks

maiden wadi
#

Make sure to clamp size. 😄

gentle urchin
#

Pretty horrible

#

That we cant just ++ 😅

north lynx
#

Hi there!
I'm trying to make drag to open doors, smth like in Phasmophobia. I found only one tutorial how to do that, but the tutorial has it's downsides. From one side the doors opens according to players camera rotation and from another side in opposite direction. I have no idea how to fix that, any ideas?
Here's tutrial I'm using and some screens from the code
https://www.youtube.com/watch?v=bMEE7RKSddc

Hey guys, in today's video, I'm going to be showing you how to open and close doors by using your mouse and holding left click and dragging the door.

#Ue4 #UnrealEngine4 #Ue4Tutorial


00:00 - Intro
00:15 - Overview
00:40 - Tutorial
14:51 - Final Overview
15:18 - Outro
__...

▶ Play video
versed sun
gentle urchin
#

Prettier almost

stable birch
#

Does anyone know how in like EldenRing/DarkSouls lots of third person games they have a light attached to the player that allows the player to be seen in dark spaces?

Anyone know the setup of this?

gentle urchin
#

Isnt that just a light component ?

#

Placed in the player actor

stable birch
#

For the most part its just a point light

#

but what makes it tricky is that is effects the mesh

#

I'm pretty sure the light is attached to the player's chest

frosty heron
#

why wouldn't it affect the mesh?

stable birch
#

and that's def what is effecting the walls/enviroment. Though how it illuminates the mesh without having bright access somehwere I'm not sure

#

Its more that it effects the mesh in unsightly ways in UE by default

gentle urchin
#

You can set it to ignore the mesh

frosty heron
#

there are light channels too

stable birch
#

yesss but in UE the mesh is effected

frosty heron
#

read >_>

gentle urchin
#

Or the mesh not to recieve light from that channel or someeething like that

stable birch
#

in EldenRing the mesh is effected

frosty heron
#

ok so what's the issue

stable birch
#

sticking a point light in the mesh doesn't accurately reproduce the effect

#

I'm wondering if anyone has any idea on what other things would be added to it

frosty heron
#

do you want the light to affect the character or not?

stable birch
#

I want it to effect the character

frosty heron
#

well that's the default behavior already

stable birch
#

but you can tell in ER for the most part the mesh is illuminated entirely and not just a bit extra bright in the center/where the light is parented

dark drum
# stable birch For the most part its just a point light

expose settings on the cam, you can use it to brighten up dark areas. I would imagine they have a soft light on the player character just to make sure there is some light and then use exposure to get it to the brightness they want.

frigid summit
#

hi guys why is this overlap event dont fire i set the sphere on playerstart

gentle urchin
#

Theres a bunch of them

stable birch
#

This is what happens when you just stick a point light in the character^^

#

you get a bunch of ugly light-bleeds

gentle urchin
#

With inner radius stuff that gets full exposure

stable birch
#

and it doesn't illuminate the character

gentle urchin
#

Make the radius exceed the char

#

Iirc...

dark drum
shut cape
#

Hey guys, Sorry for jumping in. I have an easy question, Just me being dumb.
I've been on the deep end trying to understand Casting, Interface and Event Dispatchers. I've somehow understood how Event Dispatcher work and implemented some by telling myself they're "Installed Phone Lines" but I really struggle to get my head around Casting (If that's even relevant to my problem lol).
All I want to do is get the reference of a static mesh within a blueprint("BP_Scene") so that I can from my "BP_Pawn" change the materials of that specific mesh.
I got a Macro that works as intended with key inputs and I got it to work with some modifications with an Event Dispatcher but yeah. I want to understand Casting and get the impression that it's overkill to use an event dispatcher for this.

stable birch
gentle urchin
#

Casting is checking if some abstract pointer is some less abstract pointer

#

You cast downwards to more specific classes

shut cape
#

Oh, So basically a child of the blueprint?

#

So not between one Pawn to another Pawn.

gentle urchin
#

Correct

frigid summit
frosty heron
shut cape
#

Or is it a hierarchy of Actor, Character, pawn etc

gentle urchin
#

And if the pointer is null, the cast fails

shut cape
#

Ah, That's why it keeps failing

gentle urchin
#

You cast down the hieriarchy, yes

stable birch
gentle urchin
#

But it doesnt magically create a valid one

maiden wadi
#

"Try to treat this reference as a", usually helps the casting frame of mind better.

shut cape
#

I see, So in my case, Even if I have a variable with a direct reference it would be better to build a scene in a blueprint that is of a lesser class than a pawn?

gentle urchin
#

Not sure i got that right

maiden wadi
#

I have "???" going on too. 😄

gentle urchin
#

But if you end up with hard refs anyways, its not gonna matter

dark drum
shut cape
#

Okay mb, English isn't my first language haha

#

Oh this will help a lot.

gentle urchin
#

Now we have 3 ways explaining casts 😂

#

You can see the entire hieriarchy whiøe making a new classs

shut cape
#

Yeah I have so much information online that have given all sorts of explanations haha

dark drum
maiden wadi
#

Ignore the part that says casting is bad and interfaces are good.

gentle urchin
#

Think we all stand behind that part by now lol

#

Atleast for 'staticly loaded' classes

crude pecan
#

On the subject, Is casting to pure virtual classes more or less expensive than to normal classes?

shut cape
#

Yeah I got the impression from online that Casting is bad only because it keeps other Blueprints loaded

gentle urchin
#

Players char, players controller, state etc etc

frosty heron
#

What is pure virtual

gentle urchin
#

Stuff that is always loaded is fine casting to

frosty heron
#

casting to native class is free

maiden wadi
#

Casting has no real cost.

frosty heron
#

yea it's the hard ref

maiden wadi
#

Like, the act of casting literally has no cost.

trim matrix
#

Casting can be horrific

dark drum
maiden wadi
trim matrix
crude pecan
#

yeah I think casting to something like player charcter is always if i'm not mistaken since there is already a pointer to it in the game thread anyways

frosty heron
#

I mean player will always be there anyway

#

so cast away

#

stuff that is inevitably gonna be loaded, just cast away

dark drum
crude pecan
#

it's like tick() all over again 🤣

frosty heron
gentle urchin
stable birch
gentle urchin
#

Sticking to casting as high up in the hieriarchy as you get away with is a good strategy

dark drum
gentle urchin
#

Exactly

maiden wadi
#

I always hate this conversation, because it's horribly simple and yet complex. 😂 Like Casting has no CPU cost. It's basically free. BP casts however also include a validity check which is the same as an IsValid cost, this costs a minor amount but much less than accessing a null reference.

Everything else people are afraid of about "casting" has nothing to do with casting and is a whole different discussion entirely on the topic of linkers.

gentle urchin
#

Aaaand the way they use interfaces makes it hard ref anyways

#

😂

frosty heron
#

my old game is beyond rescued

young meteor
stable birch
#

Does accessing a null-ref in BP actually cost more then adding an IsValid check before?

maiden wadi
#

Which is the linker discussion. You get the same issue if you have a never used pointer in the properties. Or a function returning a value of the type. It's not casting that is the issue though.

stable birch
#

The actual runtime always checks for a valid pointer anyway~~

maiden wadi
#

At least in editor. I've never tested it in a cooked game.

#

I assume part of the editor cost is warning logging.

shut cape
#

So much to digest. I see I opened a huge floodgate lmao and my brain is burning even more haha
But now I kinda get why my widget blueprint didn't complain with a cast towards a pawn.
In the end maybe I should just do an event dispatcher between the two Pawns to save myself the trouble lol.

dark drum
stable birch
#

I mean under the hood it has to check for a valid pointer otherwise it would crash

remote meteor
#

i will personally cook you if you have a wall of red text in the output log

dark drum
maiden wadi
#

Pattym is confident. I was expecting it to pop back up again in six hours. 😂

shut cape
#

Hahaha

gentle urchin
#

Its a very recycled topic

#

Never have to scroll far up to find it

dark drum
#

I think I'm just about to use my first interface on my current project. 🤔 Still mulling it over though haha

gentle urchin
#

Doont

#

Do it

#

Component is the way

shut cape
#

Okay I gotta ask, Is interfaces that bad?
All videos I've watched have praised it.

maiden wadi
#

@shut cape
Casting is trying to access different levels of a reference's hierarchy.

Interfaces are like adding a specialized second class to something that is meant to do something specific. It's mostly used to patch holes in places where you can't easily use composition or inheritance based solutions. The main issue with these is that they require boilerplate code. Two different classes using the same function means two sets of code to upkeep.

Event Dispatchers are a subscriber list. Something has that list and when something happens it can broadcast that it happened to everything that has subscribed to it. It's worth noting that this has nothing to do with the previous two things because you need a reference to the thing with the event dispatcher already to bind it which requires a correctly casted valid reference to the instance.

gentle urchin
#

They're implementation traps

maiden wadi
#

And no. Interfaces aren't bad. They're great. So is composition and inheritance. 😄 But people abuse the hell out of them in really bad ways. Specially the videos that usually praise them.

dark drum
# gentle urchin Component is the way

That's why i'm still mulling it over. Its for a saving generic states for all the actors in the level. So open/closed, on/off, that type of thing.

shut cape
#

Oooh I see, So basically don't over engineer Interfaces or develop a dependency for all your blueprints on interfaces right?

dark drum
mental trellis
#

Or when you want to ensure asset decoupling.

gentle urchin
#

Cpp one and it can pick up all the Savegame marked props of the owner

#

Or just make some global system that does this, ofc

daring merlin
#

subsystem is also an option

dark drum
crude pecan
#

Are there any good reasons to use game state for single player games beyond abstraction practice?

dark drum
crude pecan
#

I use a lot of empty actors as different managers in levels and was thinking if game state is better approach or not

maiden wadi
#

GameState is what runs Beginplay, technically. So you know that if something has begunplay, the gamestate and it's default components at least exist. This is useful even for singleplayer cases sometimes.

dark drum
daring merlin
marsh aspen
#

Hi everyone, I was wondering if anyone could help. I need to call an existing widget blueprint after the last line of one of my data tables runs. It should hide the existing widget HUD that i've got and bring up a new one in it's place. Does anyone have an idea on how I could do this?

gentle urchin
#

Dot product

#

Gives you the direction the player is facing relative to the door

#

Or the direvtional "equalness"

raven flare
#

Hello guys how to fix that?

wise ravine
#

Is 'For Each Loop with Break" expensive?

#

or just "For Each Loop" (I'm not entirely sure what 'with break' does )

maiden wadi
#

They're the same. One just allows earlier stopping than the full array.

wise ravine
#

So are they expensive?

crude pecan
#

depends on the array and how often you wanna call it

maiden wadi
#

It depends™️

wise ravine
crude pecan
#

like if you have hundreds of actors that you want to update them with tick or 0.01 timer it could be expensive

maiden wadi
#

^^ Also never use a 0.01 timer. Ever. For any reason.

wise ravine
wise ravine
maiden wadi
#

Yes and no.

#

0.01 is 100 times a second. If you have a game running at 50fps. You tick 50 times per second. That timer runs twice every frame.

wise ravine
#

oh wow

#

Then why does* unreal allow you to go that low?

frosty heron
#

Why would they stop you?

maiden wadi
#

Why not?

#

It's not up to them to stop you from putting a nail in your foot. You should just learn that nails in your foot fucking hurt. 🙂

wise ravine
#

true 😅

crude pecan
#

I think the ideal would be to advise min range of some nodes in tooltip like how they recommand to not use "get all actors " nodes by tick

maiden wadi
#

That node is fine on tick. I use it. As long as you use the class filter you're perfectly fine.

frosty heron
maiden wadi
#

Technically not that node, I do it in C++ with the same iterator that node uses, so less array allocation.

#

But either way. GetAllActorsOfClass is just fine in most cases you need it.

crude pecan
#

I hardly use that node anyway since it's always better to fill the array by self ref logic of each actor you want

maiden wadi
#

You mean in some global manager?

crude pecan
#

Let's say I have some animals that I want to keep an array of them. in animal class I tell the actor to add itself to the array in a class I need them after beginplay or some function

maiden wadi
#

You're just repeating logic that the engine has already done for you.

crude pecan
#

Not always, since getting all actors goes through every actor in the level. no?

maiden wadi
#

It does not.

frosty heron
#

I think registering instance to global manager is okay incase you want to expand on it. Eg exclude some actor that has specific tag

#

Sometime you want to get enemies in one area and not caring about the rest.

You prob want to use get all actor of class when you intend to iterate all target actor in the level

maiden wadi
#

When an actor is spawned. Lets say a Character class. A character is a Character, a Pawn and an Actor. This is three separate classes. Lets say no other actor is spawned. So the World creates three separate maps. One for Actor. One for Pawn, one for Character and places your one actor in all three.

Then you spawn a Pawn. This instance is placed in the Actor and Pawn map.

So now you have three maps. Actor with two entries. Pawn with two entries, and Character with one entry.

When you GetAllActorsOfClass for Character. You will get a list of one character. It will not iterate over the Pawn instance because it was not in the list of Characters.

crude pecan
#

Hmm you are right. so why epic is recommending to use it with caution?

maiden wadi
#

The same reason they also say the avoid casting on their livestreams. The people making those recommendations target designers as well and they are not going to understand most of it. They'll abuse it, and then someone has to clean up the mess.

#

Note, the above point about that only applies to those with class arguments. Versions like the GetAllActorsWithTag or whatever are actually going to iterate over every single actor in the level.

gentle urchin
#

But do the same as with interfaces 😄 abuse it

remote meteor
#

you can always do it in the opposite way of "submitting yourself to a manager" that exists in gamestate/mode/subsystem

dark drum
maiden wadi
maiden wadi
maiden wadi
dark drum
gentle urchin
#

Almost any array iteration in bp have relatively significant impact

remote meteor
maiden wadi
#

Lol, fun random note on that. GameMode collects spawn points via get all actors of class.

gentle urchin
#

Which is fine 😆

#

That or all spawn points must register to GM

maiden wadi
#

To make a list that the UWorld already has. 😂

gentle urchin
#

Right

maiden wadi
#

Managers are great for some reasons. But sometimes if you just need a list of a class of actor. It's already right there a single node away.

remote meteor
#

that requires to loop though all actor

maiden wadi
#

All actors of that single class type.

#

Not all actors.

gentle urchin
#

it's prefiltered

lofty rapids
gentle urchin
#

correct

lofty rapids
#

thats interesting

gentle urchin
#

Still more often than not I'd argue it's not a node you'd need to use

#

or want to use,, in blueprints

trim matrix
#

Guys why is not working the keybind? Like i made that for jump and when i select other keybind its still the same

#

like the same Space Button

#

did i do something wrong?

maiden wadi
#

If you read C++. Check out FActorIteratorState. Bit more clear there. It's a state within the iterator itself in TActorIteratorBase

daring merlin
tepid raft
#

Trying to make a Re7 kind of door but when i try to open it the door does not work

dark drum
#

In regards to save game objects. In most cases they're just a copy of data that already exists would I be right in assuming that if an SGO holds a lot of data it might be worth clearing all references to the SGO after it's been saved to disc so GC can clear the data and reload the data when you need to save again?

#

😱 fml lol

gentle urchin
#

lololol XD

#

i've seen that recently

remote meteor
#

FActorIteratorState is create on construction of TActorIterator

during FActorIteratorState constructor, it populates the array from FUObjectHashTables::ClassToObjectListMap, which is populated from AddObject which is called during the constructor of UObject

however TActorIterator, which GetActorOfClass is using, is not created until it's used. (and yes, a new one is created each time GetActorOfClass is called)
hence it still needs to do checks for multiple maps and copies the object address to the array that GetActorOfClass returns.

so yes, it doesnt loop through all actors (unless you literally ask for TActorIterator<AActor>), but minimum still loop through 3 things,

  1. All the subclass type you ask for
  2. Obtaining all the objects from the ClassToObjectListMap
  3. Populating all the objects to the output of GetActorOfClass
#

so yeah, ill prefer people with lesser knowledge to practice proper reference gathering without relying on this function

placid cove
#

guys just one quick thing, i have a float that is either 1, 0 or -1 based on the direction i am going, is there a switch i can use?

gentle urchin
#

compare float

placid cove
gentle urchin
#

"Why does X happen on all my Y Actors?!"

remote meteor
#

that being said, i only knew now that it doesnt loop though all actors 🫠

lofty rapids
#

same, i assumed it had to loop through all to find what your looking for

remote meteor
#

unless i missed it, you sort of want to cache the TActorIterator so that the delegate to record new actor is alive, then it doesnt have be recreated everytime you call the getallactor function

#

dint see the FActorIteratorState is being preserved through multiple calls

tepid raft
wise ravine
#

I'm not understanding how this helps. So we still have the memory from the audio and particle components, but not the logic? But wasn't the particle and audio components taking up the most memory? Maybe I'm wrong, not sure.

remote meteor
dark drum
remote meteor
#

personally i look at it in the way where there is 3 types of resources, cpu, memory, disk i/o
in modern system, i believe memory has the most headroom of all.

junior quest
#

I have this head bob function that I want to call after my movement, but they are on a different class and i dont know enough to know how to do that

lofty rapids
junior quest
#

yeah

lofty rapids
#

are you just going to be having one character ?

lofty rapids
#

but you can get player character, cast to your bp, call the function

junior quest
#

Yes one character

#

lemme try that

remote meteor
trim matrix
#

guys how i can make keybinds settings? with an apply button to apply them and change like for example the movement
like if normally is W to go forward if you change it to P and press apply to work go with P but if is not applyed it sould not work and sould pop up and widget [message] to save or to unsave

remote meteor
crude pecan
junior quest
wise ravine
remote meteor
lofty rapids
#

"GetPossessedPawn" thats a good one, in my controller i just did get player character

lofty rapids
#

looks like you trace and your looking to hit the door

barren tangle
#

hello

remote meteor
barren tangle
#

The Find (from an array) doesn't work if i only put one value?

#

i need to provide all those value?

tepid raft
remote meteor
barren tangle
#

😢

#

ok thanks

remote meteor
#

you have to loop the array manually in bp

barren tangle
#

it was to be sure 😄

tepid raft
#

it be working

#

i sum how fd smth else up

remote meteor
#

thats some german window right there 😆

maiden wadi
# wise ravine hey if anyone has a minute, could they please explain this to me. Thanks in adva...

The shorter answer is that you can't use them without them taking up more memory. You're using them so they have to be in memory.

What Datura is trying to explain to you is that you have a core programming class with the stuff used, but that is empty. You can cast to this and use it etc.

EG you have VehicleBase that has the components for audio etc in it.

Then you have VehicleA and VehicleB that inherit from VehicleBase. You don't use these at the same time in the game, but you're going to use VehicleA at the moment so there's no point in having VehicleB in memory with it's specific sounds, particles, etc.

If you have a datatable where you pick vehicles, you can specify the class by a soft reference. That way when you want to use A, you just get that soft ref and load the class, then spawn an instance. B remains unloaded and does not take up memory until something in the game loads it's class.

If you do not use soft references and you hard reference the class to spawn A and B, then both and their specified assets like sounds and particles will remain loaded at all times while that datatable is referenced by anything you have current loaded as well.

In the cases above, all of your game code would cast to and interact with both VehicleA and VehicleB as a VehicleBase. Nothing would reference or cast to either of these classes directly.

If you want to learn more about this. Consider taking a tour through the Sizemap, it shows everything that is required for a class to remain loaded. Everything displayed in a sizemap is considered a linker. That class references those things and thus they are linked to it and they need to be loaded before this class can be and will therefor me loaded into memory when that class is.

tepid raft
#

im just so good that i try code smth but i make smth else

wise ravine
#

But if I were to only have one vehicle in the game, would I need a create classes that inherit from a VehicleBase?

maiden wadi
#

Not really.

pastel skiff
#

i got a problen with the "get actor bouns" so i want to get X and Y size but for some reason t doesnt work. the thing plugged the get actor of class is a solid mesh, anyone have any idea what shuld i fix?

scarlet hedge
#

Anyone know why the object still starts at 0,0,0 and then does the random motion inside the bounding box?

Its all in one BP

maiden wadi
wise ravine
maiden wadi
maiden wadi
maiden wadi
maiden wadi
#

I'm doing that in our new project. 😄 Also {Insert obligatory insane hatred towards Landscape class here}.

scarlet hedge
maiden wadi
scarlet hedge
#

Yeah I might do just that right now, see how it goes

wise ravine
#

Could I do this in my actual BP_Checkpoint instead of in my BP_Vehicle (where it is now). Basically, can I reference multiple instances of an actor inside of that actor's script?

final sparrow
#

hey guys! i have a giant merged static mesh component that has a lot of objects in it. for pipeline reasons, i cant manually separate everything into smaller mesh files (we have many levels that use a giant mesh from an import that is out of my hands).

is there a way i can select a portion of a static mesh component within blueprint? preferably using a specific material element as a selection?

(for context, the giant mesh has some lamps in it and i want to place some fake sprites of "lights" near all of these lamps, so i wanted to preferably get all parts of the static mesh component that have the lamp's material to approximate where the lamps are in the merged mesh)

maiden wadi
#

Is it the same mesh used in multiple levels, or?

final sparrow
#

nope, just the one per level

#

just need to get the portions of the mesh inside an editor utility blueprint. the idea is i wanna place these new light cards all over the mesh based on my selection instead of painstakingly putting them down at over 100 per level with over 50 levels to do

maiden wadi
#

Yeah. 😄 Hmm. Never done anything like that without sockets. :/

shadow flame
#

So I'm working on an onscreen keyboard asset and I can't figure out how to get these keys to stretch to fill in the space. Everything is added programmatically, through blueprints.

trim matrix
#

guys how i can make keybinds settings? with an apply button to apply them and change like for example the movement
like if normally is W to go forward if you change it to P and press apply to work go with P but if is not applyed it sould not work and sould pop up and widget [message] to save or to unsave

#

maybe a video or something on google similar to my message?

waxen mason
#

Hey guys, hope you all doing well.
I´ve been working on a Top Down Project and since the beginning I´ve been faced with some problems, which were minor but now it is adding up and have to be solved.
When facing North (as in the image) everything works well, the WASD inputs and movement works as intended, as soon as I rotate to face any other direction, it inverts all directions.
This would not be a big deal, as I can simply start the character facing North, problem solved right? Well yes, but actually no!

It solves the movement problem, but as I developed new stuff, I´ve come to realise that everything in the world gets affected by the different rotation.
I got an Actor that spawns some pieces at BeginPlay, if they´re not in a specific rotation, it will get messed up and before you tell me to change the attachment options the ones in the image are the ones that make it work as is, the rotation is the problem.

The final straw was when I got an AI character to follow my movements with its head, if he faces North, all good, if not, he turns in the opposite direction of where I am.
Can anyone can offer advice, it seems related to World / Relative location, i´m just not sure where and what to change

thin cloud
#

can I have a working example of detecting chaos particles in a field? I must be doing something wrong, but can't find what

young meteor
# maiden wadi ToByte, +1, to Enum

Something is working oddly.

I have the code seen in screenshot.
The Enum have 6 options.
I can change the Enum all the way to the last option, but when I try to go back I can only go to the 2 first option. I can never make it go to the very first/original option again.

(I used Branches because I could not find a clamp option for these "byte" outputs)

maiden wadi
regal iron
#

when i use a breakpoint and try to play the game the screen is black, what does that mean?

flat coral
#

Is the ordering of BP Tick calls stable? Like if A went before B this tick, is it guaranteed that A will go before B next tick?

waxen mason
dark drum
#

Is there a way to have an actor component do something when its first added to an actor? Similiar to the construction script.

flat coral
flat coral
#

I'm saying, I dont think they do have anything like what you're looking for, because I ran into the same limitation and was forced to use child actor components to sidestep it

regal iron
#

anybody familiar with breakpoints that can help? would appreciate it

dark drum
lunar sleet
#

most of us are familiar with breakpoints, it's a pretty essential part of programming 😄

flat coral
waxen mason
lunar sleet
#

I've had that with breakpoints in my Common UI, #umg had no idea why

regal iron
#

lol i did i cant get this stamina bar to actually fill up. its been about 3 days. sometimes when i put the breakpoint it will play and then stop and take me straight to the breakpoint event. others it wont play and will be a black screen

flat coral
lunar sleet
flat coral
lunar sleet
regal iron
flat coral
trim matrix
lunar sleet
regal iron
#

i feel like it is something to do with refresh stamina but idk where

trim matrix
flat coral
#

Is it possible that the macro there is calling some UI code? I wouldn't be surprised if breakpoints on macros aren't where they look like they are.

#

I might be talking out my ass here but I think the node that calls a macro is "transparent" somehow, like it doesn't really exist at runtime it's just calling the code inside?

regal iron
#

when i put the breakpoint here it allowed me to play in editor until stamina was depleted and then stopped me and took me to the breakpoint

regal iron
regal iron
maiden wadi
#

And then continue playing and you have a black screen?

lunar sleet
regal iron
regal iron
waxen mason
faint pasture
placid cove
#

guys im trying to make some procedural movement or something like that so im trying to make the character mesh rotate 5 degrees to the right when im going right and 5 degrees left while going to the left
i am trying with a timeline but it's now working well, any other ideas?

faint pasture
# waxen mason

That looks fine, you're saying that if the character is not spawned at 0 yaw that player-driven movement doesn't work?

waxen mason
wise ravine
#

Can someone please explain what this error means?

young meteor
# maiden wadi Can you try this?

I think I managed to fix it by checking against an actual Enum instead of just a number. I did not quite understand how the Enum to byte stuff worked, so that might be the reason why I had trouble.

Now I do this and it works.
Thank you.

cyan spire
wise ravine
cyan spire
final sparrow
dark drum
#

Would I be right in saying if this timer gets called again when it's been started it'll still only happen once?

fickle frigate
#

how do i move exposed properties higher up in the details tab? for some reason whenever i add a function, they drop to nearly the bottom of the tab. without the function, theyre up at the top

#

Id like to keep them at the top, if possible

granite frost
#

When I am transitioning from level to level. How can I take stuff from one level to another? Like player and other stuff? Do I have to spawn them in the new level or can I take them as it is?

faint pasture
silent drift
dawn gazelle
# wise ravine I'm not understanding how this helps. So we still have the memory from the audio...

If you have a hard reference to an asset in a blueprint, then that asset must be loaded too when you load that blueprint. That's what makes it heavy on memory.
When you reference a blueprint in another blueprint, then the second blueprint must load the first, and if the first is bloated because it has lots of assets defined, then it also bloats any other blueprints that reference it.

If you have a base class that contains all the logic and is only using "Audio Cue" or "Niagara" variables without defining their values, then no assets are going to be loaded when referencing that class, making it lighter weight to edit and use around the engine as now you are only going to be referencing "Audio Cue" vs. "Sfx1", "Sfx2", "Sfx3" etc.. Any other blueprints that use this class reference are no longer going to require the assets being loaded just because they're using a reference to this particular class.

The child class would then have the definitions for what those variables contain and that class is what you would actually spawn to use, but not logically pass around. As this class is not referenced anywhere else in the engine, it would only load the assets If it gets spawned, at which time you may need to actually use those assets. If you wanted to further reduce memory footprints, you could use soft references to "Audio Cue" or "Visual FX" to prevent these assets from loading before they're actually needed and manually load them when you want to use them, though the size map doesn't really show this, but it could alleviate additional data from being loaded that doesn't necessarily need to be loaded just because you're spawning the class.

maiden wadi
lunar sleet
#

How about travel?

#

Does the character stay intact or do you still have to save it and rebuild ?

maiden wadi
#

Ded

waxen mason
#

When facing South it gives me Y = -180

#

By North and South, I mean the PlayerStart

waxen mason
faint pasture
dense obsidian
#

Hell all, anyone know how I can get around this problem.

This works:

#

This doesn't. The variable contains the same table.

waxen mason
wise ravine
#

And a child class will carry out the functions of the base class without having to burden other scripts with its components

#

right?

lofty rapids
pale estuary
#

i imagine this is an issue so simple to fix, however whatever i do it just isnt working. PROBLEM: Character sprints at full speed(600) while crouched, im trying to make it so that if if character sprints while crouched movement speed will only be 250. Default walk speed is 300, crouch speed is 200, sprint speed is 600, and im trying to get crouch/sprint speed to 250, however when i implement solution it seems to be overridden by the max speed 600 loop (loop is for stamina drain). here is my blueprints for sprint input, crouch input, and then also a template to my solution however i just cant implement it correctly. any help id appreciate so much, its my first time here and dont mind constructive criticism

waxen mason
agile moss
#

Why does it limit itself to only float between -1 to 1 , If I go above 1 the speed does not increase

lofty rapids
lofty rapids
#

max speed

agile moss
#

yes, I think

faint pasture
#

you're saying the raw input values change based on control rotation?

lofty rapids
agile moss
#

how