#blueprint

1 messages · Page 160 of 1

earnest oriole
#

and custom movement inputs etc

fiery swallow
#

Youre not using character movement component to move? Even if you're not using it I'd recommend clicking on the details of the component and making sure all the settings are default

#

And then I'd check that it's not being tampered with anywhere in code. Perhaps you used it in the past and forgot about it?

earnest oriole
#

No, i move with the code in the pickture, and use my own ia stuff. Nothing from the cmc or defualt template

fiery swallow
#

Is there any other character in your game that uses CMC?

#

Also maybe the crash logs can help here

earnest oriole
#

No. but it crashes with just the player and a blank map

fiery swallow
#

So we can see what happened just before the crash

#

Hmm, I bet if you made a new character, and transferred the code over the issue would resolve itself

earnest oriole
#

been through the logs as well. Deleted every little bit of code that could possibly be related, but it will crash with just the basic character on a blank map

#

Might just try to remake it in a new project as you suggest. Its not a lot of code, so should be fairly easy

fiery swallow
#

Making a new character from scratch and dropping it into a blank world also crashes the editor?

earnest oriole
#

Ive gotten quite good at simplifying bps due to this, so not all bad

fiery swallow
#

If that's the case then sounds like corruption

#

Unless you went and modified the CMC c++ code in some way

earnest oriole
#

Havent tried remaking it yet, but migrating just the character to a blank project didnt help. Was from 5.3 to 5.4, tho dont really think that matters

#

Hehe, havent been in the c++ code yet

#

Appriciate the time. Ill just try from a new blank project

sour lodge
#

I was in need of a help, i made that my enemy bp takes damage and dies and after that i used an spawn actor to spawn more enemies, but i'm having problem making the enemies that spawn move

toxic copper
#

im pretty new to UE so i might be misunderstanding, but if i had left target blank, it would have affected whatever blueprint these nodes were on. and if I had attached the player controller to target, it would have modified the player controller blueprint.. since the logic tied to inputs that i wanted to disable were on my character blueprint, i cast to my character and made that the target

ashen flame
#

Anyone know how to fix capsule half height that sticks under the floor? My third person animation is always stuck half way on the floor

spring osprey
#

any help on why this doesn't work?

fiery swallow
hoary junco
#

so I just got blueprint assist and eletronic nodes and I'm like a kid in a candy store doing around and making all my blueprints actually look neat....

fiery swallow
#

For characters the local height of the skeletal mesh should be -90

#

Anything lower and it's gonna clip through the floor

spring osprey
fiery swallow
spring osprey
#

its 2145x 867 💀

heavy hemlock
#

Do you know of the secrets of DeltaTime?

#

But for your specific problem, you can only enter the 'true' branch of the first test if the flash light is always on.

hoary junco
heavy hemlock
#

Ah, my bad!

#

But I am glad you're enjoying the electronic nodes. Great plugin that.

hoary junco
#

yeah, the autoformat of blueprint assist is great too.. I can actually read my own code now 😛

heavy hemlock
#

Generally speaking - using delays like this is not the best idea.

heavy hemlock
heavy hemlock
#

And that's the only place that 'Flash Light Active' is set to true.

#

So it will always be false.

hoary junco
heavy hemlock
#

I spend quite some time tidying my nodes.

hoary junco
#

I just usually said fuck it because I could never find a way to make the nodes look neat because of how curved the lines where, so a combo of these plugins has been a godsend

heavy hemlock
#

I agree. Definitely a game changer.

spring osprey
heavy hemlock
spring osprey
#

nope

heavy hemlock
#

Hey! Nice! You get to be one of the ten thousand today then.

#

All right. So! In a computer game, you have a bunch of objects that need to be updated. Enemies need to shoot, batteries drain, bullets fly, animations play. Every frame, all those objects in the game have to do something. That thing is called the 'Tick' - because, in a way, video games are just big expensive watches with pretentions of grandure.

#

If something happens over time in a video game, it happens because little bits of it happened every Tick.

#

Your character doesn't walk across a room, his position moves a little bit every tick to make it appear like that is happening.

ashen flame
heavy hemlock
#

In blueprints and components, you have access to the Tick function. If you right click, and type in 'Tick' it should show you an Event.

#

That Event will get called every frame, and you'll notice, when you put it in your graph, that it has an input called 'Delta Time'.

#

Delta Time is what makes Tick work, it's the time, in seconds, from the last tick.

It varies, based on the speed of your computer, and how many other objects are ticking in the scene (ticking isn't free), and a thousand other reasons. But, because every Tick function also has DeltaTime, processes that need to appear to proceed at a consistent rate (like a character walking across a room, or a battery draining) can simulate the appearance of progressing in a consistent manner.

#

How?

#

By multiplying by delta time.

#

If you want a character to move at 10 units per second, you multiply delta-time by 10, and add that to their position!

#

So, in your case, to drain a battery, you need a float value representing how much battery you have, and a float value representing the speed the battery drains per second, and then you can subtract the speed multiplied by Delta Time from the battery value per Tick, and that will make your battery drain consistently over time.

#

Makes sense?

spring osprey
# heavy hemlock Makes sense?

yes I kinda understand something but is the problem really something about delta time? I mean, I was following a tutorial and the dude literally only did this and nothing about delta time or ticks

heavy hemlock
#

OK, sure - but the tutorial is not teaching you a good way of doing a thing.

#

Like... you can follow it if you want, but you would never want to create something in a game that worked like this.

spring osprey
#

I see

heavy hemlock
#

But, if you want to use that code - put the drain battery event on the branch where you turn the light on.

tidal tendon
heavy hemlock
#

Right now, you have it on the branch where you turn the light off.

spring osprey
#

oh okay thanks

heavy hemlock
#

But I'm not kidding about the design here - this is not the way to do this at all.

#

Actually, looking at this a second time, I think if you switch the branch logic on the first branch back, and just set the flashlight on instead of off, it should maybe work?

#

But yeah, very odd design.

#

I wonder why the instructor chose to do it this way.

spring osprey
dry pecan
#

say, is there any way in widgets for text boxes for when I type it in I can go down a line like in a google doc?

spring osprey
heavy hemlock
#

It's less complicated to use tick.

#

One sec.

heavy hemlock
#

I ended up over thinking this.

#

But this is roughly how I'd do it.

#

Using a pure function does help:

dry pecan
#

so question, in my main menu level, the moment I click on a button from my main menu widget, the custom cursor I set disappears, any ideas?

spring osprey
heavy hemlock
#

👍

stoic ledge
toxic copper
#

Appreciate you taking the time to provide those screenshot examples

dry pecan
dawn gazelle
stoic ledge
#

Off of the create widget functions return node, promote to variable. then if that reference != 'none', destroy.

#

same as Datura said

dry pecan
dawn gazelle
stoic ledge
#

if i had multiple game modes, could i communicate across each of them? i guess theres only one at a time.

dawn gazelle
#

If you wanted similar functionality in game modes, then you can create a base game mode and have child game modes based off of it with their own settings and custom behaviors while still retaining the functionality and properties of the base class.

zealous moth
#

can the CMC detect collisions based on several colliders?

cosmic hill
#

hello guys!

as far as im testing, these two returns the velocity of the actor in the world space

is there a way to return the local velocity of the actor?

frosty heron
#

I heard it's only to be used with the capsule comp

dawn gazelle
stoic ledge
#

ive been reading a bit about game modes and states, tell me if this makes sense please. A player sends a message in a game, the game mode then can either do nothing, or update the gamestate or a set of playerstates with the message the player sent?

zealous moth
#

nah it looks locked to that main capsule

#

nothing else

frosty heron
#

Ppl use GMC when they need diff collision shape

zealous moth
#

yeah but that's a PitA

#

i know, I came from there 😄

frosty heron
#

Wat about movet 2.0. I haven't touch it tho

dry pecan
#

So now that my game is finished, how do I export it out as a playable game?

frosty heron
#

But I heard it support custom collider

frosty heron
cosmic hill
#

it might be somewhat different in ue5? but the option is there, packaging

dry pecan
#

yeah I'm searching for the package option

dawn gazelle
dry pecan
#

is it pack level actors?

zealous moth
#

no

stoic ledge
zealous moth
#

@stoic ledge because there is no such thing as local velocity

#

there is velocity in relation to world space

cosmic hill
zealous moth
#

or sum of vectors

cosmic hill
#

hmmm

cosmic hill
#

that might be the reason

frosty heron
#

Local to what

#

In relative to what

stoic ledge
#

how do you get relative velocity?

zealous moth
#

what are you trying to do (so I can write it down and make the game faster than you)

frosty heron
#

Don't make much sense to me

cosmic hill
#

ill reformulate then, gimme a minute

#

because you guys have showned me that not even i know what i want now

frosty heron
#

Velocity is just how fast (unit) an object moves

cosmic hill
#

🫠

stoic ledge
#

you mean if ur facing backwards its negative?

dawn gazelle
#

hey, it's good to know what you don't know. It's the first step to knowing about something 😄

dry pecan
#

huh, guess it takes a little while for the game to package

frosty heron
#

Depend on how big the game is

cosmic hill
zealous moth
cosmic hill
#

if i face to the left... you get the idea

zealous moth
#

for instance, in your settings, set the maps, the assets, etc

stoic ledge
#

its individualy placing all those little packinging foamies into the box.

cosmic hill
#

but i dont want this, i want to give me the same velocity if i go forward no matter which way im facing

frosty heron
#

It's just saying the object is moving 70 cm on the world x direction and -291 on the world y direction

dry pecan
#

maybe it was also sincve I changed the packaging location? probs not

zealous moth
#

nah

#

it takes about 2 mins for an 800 mb project to package

#

the first time it took 15 mins

#

subsequently it took 1-2

cosmic hill
#

honestly at this point i dont know if im making sense

frosty heron
#

I seen ppl grabbing the length/magnitude. Check what that gives you

cosmic hill
#

ill try it

zealous moth
#

the first gives a length of 299, the second of 302

dawn gazelle
#

I think what you may be wanting is the "vector length"

zealous moth
#

but you are moving diagonally it seems

#

a unit or 2 will not be worth working on imo

#

expecially on a value like 300

#

we're talking about 0.3% difference

cosmic hill
zealous moth
#

the length of the vector

dawn gazelle
zealous moth
#

there are 2 types of vectors: locations which are static points and directions which is what velocity is. It has a start and end and a length which is the magnitude.

trim matrix
#

math is fun 🥳

zealous moth
#

this isn't math, it's physics

#

is math even related to science?

#

who knows?!

trim matrix
#

pretty close in my opinion

#

without math, you wouldn't know how to do physics at first

stoic ledge
cosmic hill
#

(wait! it was all math?!)🌍🧑‍🚀 🔫🧑‍🚀(always has been)

stoic ledge
zealous moth
dawn gazelle
zealous moth
#

game state would

trim matrix
zealous moth
#

kid+ hole = gravity

#

and that's how i tuned into the matrix

stoic ledge
#

you touched the mirror

dawn gazelle
# stoic ledge i mean that in a multiplayer sense, and not across game modes, just generally.

If the intention is to say, send a chat message to everyone in the game, regardless of where they are in relation to your player, then you would probably want to use either the gamestate or playerstate to relay that message as these are objects that are always relevant and exist on every client.

If you wanted it only for nearby players, then it may be better to use their controlled Pawn as these usually aren't always relevant.

#

GameMode doesn't have to be involved here, it can be, but again not necessary.

trim matrix
#

get all actors of class?

#

it would work here

frosty heron
#

Wut

trim matrix
#

the actor is the player

frosty heron
#

Ik but he is talking about RPC

#

And relevancy

dawn gazelle
#

if you're communicating over the network to others there shouldnt be a need to get multiple actors

#

only 1 has to do the communication

stoic ledge
dawn gazelle
#

Example:
Player Inputs Message > Sends RPC to server on their PlayerState > server multicasts the message on that playerstate > all clients will receive that multicast

#

Usually easier to handle through gamestate only because you can get a single gamestate easier in UI and the like which makes it easy for the UI to bind to event dispatcher that exists on the gamestate.

dawn gazelle
#

Thinking on it, it's probably best to still multicast on the playerstate, then have the playerstate call to the gamestate to broadcast the message and then have the gamestate refer to the playerstate sending the message as the sender.

stoic ledge
#

if there where any conditions the game might impose on the message the player sent, that would be done in the gamestate?

dawn gazelle
#

You would probably do it on the server but it doesn't specifically matter what class you do it in. The trouble is if you have conditions like you only want certain players to hear the message, then it gets a bit more complicated as you can't just multicast that if you care about whether or not someone still receives the message even though it wouldn't necessarily be displayed by your own coding.

obtuse kraken
#

last bump for my problem then im gonna start crying

stoic ledge
stoic ledge
faint violet
#

How do I make it clamp in a circle? I want 400 max for both combined, not separate.

maiden wadi
maiden wadi
faint violet
ripe smelt
#

Hey, I'm pretty new to blueprints so I was wondering if someone point me in the right direction here? I need to move a mesh (snake) through a spline (ie: Blender's curve modifier) but I'm not entirely sure where to start? This doesnt need to be runtime but rendered at sequencer. Many thanks for any help!

maiden wadi
# faint violet this one? or wait, I could add distance to a rotation maybe

Stepped away for a sec. But basically you have a point, a direction, and a distance you want the thing to be. You get the distance from the thing's intended location to 0,0,0. So you just need to clamp that distance at 400. Then multiply that distance with the direction from 0,0,0 you want it placed at.

#

What you end up with is either the original location you wanted, or a location clamped at 400.0 distance from 0,0,0

faint violet
maiden wadi
#

@faint violet Something like this if I'm not mistaken?

maiden wadi
obtuse kraken
#

Because turning it off completely wouldn't work for me

faint violet
maiden wadi
#

What does weight and drag mean in this case? Not move with the camera perfectly, or slow down the camera?

obtuse kraken
#

Well slow down I guess, I haven't started implementing logic for that though

#

I assume thats how the illusion of weight is given in games like Amnesia

maiden wadi
#

Both can be done with kinematic movements fairly easily.

For heavy feeling on camera, your inputs just get multiplied by a value related to the held object's weight. EG no object is a multiplier of 1.0. Object with light weight is like 0.95 ot 0.9. Medium would be like 0.7. Heavy would be 0.5 or 0.3. Up to you to define the weights and the weight projected to 0.3-1 or so. I'd recommend a lower clamp to avoid cases where something is too heavy to turn the camera ever, unless that's intended.

The other thing is just using an interpolation on the object's movement, so that it's not always perfectly matched with the player movement but has a little bit of lag. Some time and sine effects here can give slight sway like breathing effects, etc. Just depends on the effects you're after.

obtuse kraken
long breach
#

add a particle effect and it looks perfect for some type of avodiance

manic vessel
#

I have a scene component for each hand that the animation hand follows. and Im trying to align them with a spline component that runs the length of the bar, when grabbed. currently I have them doing this in the first picture, I have added debug arrows for each scene component to help visualize the issue, But Im trying to make them go like the second picture and finding it tricky to do so. any advice would be apreciated thanks

#

also this

grim sand
#

No not in your current setup. You can only do this by making one data table for helmets, one for chest armour, one for melee weapons, etc. As far as I know this is also how most games do this.

#

Well actually, maybe you can achieve this using Bluetility, but I doubt it would be a straightforward solution that is worth the time spent trying to achieve this

#

Yea, but I suppose you could make an entry into the struct called "Type" or something like that. Then on construct you can retrieve all rows, and save them into separate arrays so that in the editor you have an easier time.

#

Then again though, if you are working on this project solo, I am not sure what the added benefit is besides some cleanliness

#

Yea. I mean it sounds to me like the easiest thing to do in your specific scenario would be to just keep it as it is for in the editor. Ultimately players aren't going to see any of it

#

I am guessing you are overcomplicating this. LIke I said, if you are doing this project solo, you will always know where stuff is stored anyway.

The best way to do it is to have a specific data table for each equipment type. Ultimately we want data tables to be specific and to only contain data that is as closely relevant to each other as possible. We don't want a data table with helmets, chest armours, and weapons all together. Especially not if we intend to use this data separately in different places.

This would in my eyes be best practice for maintaining different data sets of items in your game, without overcomplicating the entire setup 🙂

#

Well, I mean the only hierarchical thing in your setup, as far as I know based on the provided info, is that all data is based on your Item Data struct. Beyond that there is no hierarchy between these different item types

#

You could try this. It is entirely up to you. I don't think this would be super neat when trying to retrieve the data at runtime, or at least not as neat as just having a few different data tables.

main flume
#

Hey. I have a value between 0 and 1, to lerp between my drift forces.
I want it to not go back to 0 instantly when the slip angle is lower than 20, because of drift transitions. I would prefer it to go down more slowly but it should still go up normally. I cant get it to work, any ideas?

graceful sage
frosty heron
#

OnPostEditProperty

#

PostEditChangeProperty*

main flume
frosty heron
small gyro
#

I need some fresh brains/eyes on something

I've been reworking my inventory system and when I try to save certain arrays just refuse to update no matter what I try.

I've tried rebuilding the array and just adding the struct in at the right index, i've tried setarrayelem as seen here and I've tried insert but no matter what I try the data doesn't update

frosty heron
small gyro
#

I've never actually thought about how the break struct works
maybe a split would be the better option

#

or not, same issue

lunar sleet
#

What are those pure functions plugged into?

lunar sleet
small gyro
#

yeah
it's part of a save function, taking a data struct with some basic values (2 ints, a name and a bool) and updating their place in the array and updating the array inside my main save data struct

#

all the relevant variables are set to editable

sand bloom
small gyro
#

from what I can see with testing the issue seems to be the setarrayelem because changing the name entries works (I'm printing the output to a json file)

scarlet urchin
#

Everytime i start up my project i have to refresh these nodes that are used for adding the current players to the lobby list. Does anyone know if there is a way to fix this??

small gyro
#

weird I guess I fixed it....for now
knowing my luck I'll break it next week somehow

lunar sleet
#

You can lose all the data

small gyro
#

tell me about it....
I'm transitioning my project away from relying on blueprints and more into c++ and json

lunar sleet
#

Not sure if you can. If the widgets sit on top of the viewport, then it prly can’t get a world pos

lunar sleet
sand bloom
#

Np

#

Using some must have plugins made my life so much better

#

Tweens is one of them

#

But also electric nodes/darker nodes for nicer ui or that one auto organizing plugin for blueprints

dreamy yacht
#

Hi. Got some problem with widget animation. I've bought a "Huge Main Menu" from marketplace and everything is right except - the widgets in main menu which fly in from the bottom and stay there correctly, but only for the fist time. If I switch to another widget or start another level and then go back ( open main menu level ) then the wigdets won't fly in again and the screen is blank with only background visible. It looks like that widgets restore to their unloaded state once they are loaded for the first time.... I've found out, that widget animation is stored as "Show Base Buttons" inside W_Menu_Main ( the main menu widget ), but I cannot cast to it ( cast from another widget ) if I want to make editor load the animation again...

#

😦

obtuse kraken
#

omg i fixed my issue and it was stupidly simple

lunar sleet
#

Before you buy stuff on marketplace you should prly try to understand basics like bp communication

obtuse kraken
#

just had move the constraint instead of the object being held, it was lowering because the spring distance between the held object and constraint was widening causing it to behave weird

lunar sleet
#

Where is Main Menu widget being created

dreamy yacht
#

On it's own level, named LVL_MainMenu

#

I've found the logic now

#

I guess I should create "the valid check logic" in every other widget, that makes the main menu buttons to reload ?

dreamy yacht
#

I don't know if it's a correct approach, but I've removed "is valid" check and it works fine now

dark drum
maiden wadi
#

But then handling widget in the game instance sucks too.

dark drum
maiden wadi
#

IMO these are things you shouldn't really have to consider. I don't anymore. I just request widgets to display in their respective slots via push content to layer for player. Everything is removed at level transitions, even the slots. The slot widgets from CommonUI will cache a widget for a while and reuse it if possible but it's all refreshed at level loads.

#

CommonUI/CommonGame plugins really are amazing for widget handling.

dark drum
#

I made a child of the Activatable Widget that allows me to specify the input mode and if the cursor should be visible when the widget is activated lol.

maiden wadi
#

CommonUI is in the engine by default. CommonGame requires pulling it from the Lyra project.

young meteor
#

Hey
Can I increment/decrement something inside a Map like this?

Or do I need to find value, add 1 to it, and then set it/override it for the Key in the Map?

#

(I would input the Key ofcourse)

maiden wadi
#

I don't think map has a find by ref in BP.

young meteor
maiden wadi
#

Looks about righjt.

young meteor
#

Okay. Thank you.

dusky cobalt
#

Maybe someone could help because I tried every posibility and I'm lost what I'm doing wrong.

  1. I have Main UI Widget that I create in Player State.
  2. In Player State i put info about resources of player
  3. In Player State I have event that increases number of resources.
  4. Worker is calling to Increment Resource Amount event in Player State when doing task.
  5. The event is called, I can see that Added 1 resource is printed, but it doesn't get added.
    I tried to GetTeam of Worker, plug it into PlayerState etc, but it doesn't work.
    The last one is MainUI bind, it shows ''starting'' amount on the screen, but then doesn't get updated.

I tried with every possibility and I guess in the most robust way if I set everyhere index to 0 it should at least work for the first player? Anyone sees something?

#

The funny thing is, I have the same setup in different project but everything is in the PlayerController and it was working.

maiden wadi
#

GetPlayerState index should be 0 for starts.

#

That call is the same as doing GetPlayerController->PlayerState. It's just a helper that makes it one node.

#

What about your increment interface thing?

dusky cobalt
#

Worker is calling interface event of PlayerState

#

and then it adds resource based on type

#

the event is ''firing'' but it doesn't update properly amount?

#

like I can see Produced 1 Food, but if I print food amount it's still 0

maiden wadi
#

Why are you telling the client to set this replicated property?

dusky cobalt
#

Oh I was just trying things, it was Server before

#

doesn't change anything though ;/

maiden wadi
#

This implies that your cotton stack is zero?

#

If you added to 10 and it's still 10 I mean.

#

Not sure where that first 10 is from.

dusky cobalt
#

It's default amount

#

and it's showing properly on the widget

maiden wadi
#

No I mean the stack size integer

#

What is it's value at?

dusky cobalt
#

oh, yeah the stack is 1

#

I thought about this too...

#

it seems like I'm not ''aiming'' properly with Where exactly it is incremented?

#

like it hits Player State, but is this the Player State of the client that is currently seeing the widget?

maiden wadi
#

In this image. According to your prints, you incremented it and it was set to 10.

#

Which if the CottonStack was 1, would imply the value before was 9?

dusky cobalt
#

It should be 10 as starting and then add 1 which should be 11?

maiden wadi
#

Add a few more prints maybe. Print value before. Print the stack size and leave the other two prints.

dusky cobalt
#

Wait omg

#

the devil is in the details

maiden wadi
#

Lol Fair enough. I missed that.

plucky ice
#

Hi all, I apologize if this question isn’t allowed so just delete it if it isn’t or let me know and I will. Would anyone be willing to get on a 15-20 minute discord call (or is there a resource in this server) for me to ask some questions about the best way to lay things out?

dusky cobalt
# maiden wadi Lol Fair enough. I missed that.

thank you for help, sometimes talking to someone helps to get better view of things 😄 and i was modifying code so hard to make it work, while everything was good just this one thing ugh xd

dusky cobalt
untold ivy
#

Probably a stupid question, how do I get the location of the player's head? I managed to get the NPC's head since I'm currently in the NPC's event graph, but I don't know how to access the player's head.

tiny sigil
plucky ice
# dusky cobalt You can just ask here, lots of helpfull people here

I've asked a couple of times and people have been extremely helpful so far, absolutely. This has been an excellent resource and I'm extremely appreciative. This more so goes beyond a specific question about a particular blueprint schematic and is more related to the overall structure of how the "game" overall should work which sometimes is easier to say than type but I'll give it a shot; it will be long.

I'm using Unreal to make a neuroscience / psychology study for people to participate in, and I'm super new to the system hence all the questions. Main questions for now will be in bold. The "game" basically works like this:

A participant will spawn in VR with a laser pointer in their hand.

  1. They will need to fixate (look straight ahead at) a point in the sky for 500ms, which I was planning on implementing using the eye tracker in the Vive Pro.
    a. I don't know how to use the eye tracker or "head movement" of the VR headset as a movement input yet and I am building the functionality of the game itself not in the VR template at first because the VR template input structure confuses me.

  2. Once they have done this, that point will disappear and a set of stars will randomly spawn in the sky around that point.
    a. I've already gotten the stars to randomly spawn using the Gamemode blueprint that populates a number of Star_Object blueprints on begin play.

  3. One of the stars in the sky will do one of 3 things:
    a. Change brightness
    b. Play a sound
    c. Both play a sound and change brightness
    I have gotten one of the stars randomly to do each of those things using the Star_Controller blueprint by doing get all actors of class and a random array selector on event begin play. This is not how I will want to do things for two reasons - one, I need to know which star object was selected and what its location in the world was (which I guess I can do by somehow referencing the array index and world position of the random star that was selected; and two - how can I create this random selection without replacement logic from a pool of available trial types that depletes as each trial type occurs?
    I need to be able to know which of these stars was randomly selected, because we are asking the participant to select a star using the laser pointer. I have already set it up so that the laser pointer spawns a beam that will interact with the Star Object and destroy it if the beam interacts with it for more than 1 second, but this functionality is implemented at the level of each StarObject. Is this the best way to do it? How can I best cross-reference which star "changed" with which star is selected by the participant to keep track of whether their selection is correct or not? Should I do it by "levels" so each time the participant makes a selection it loads a new level and populates new stars and does it all over again, or si there an easier way?

Finally and more generally, what is the best way to "keep score" for each of the types of trial (brightness, sound, or both) in terms of correctness? If you would be so kind as to help me figure out kind of how to structure things into "trials" now that I more or less have all of the basic components I need to start creating the overall structure of the experiment itself, I would be immensely grateful. Sorry if any questions seem stupid or obvious but as I said, total newb.

tiny sigil
# tiny sigil

here in editor there were not any type of error msg and now i don't know what to do

maiden wadi
maiden wadi
untold ivy
maiden wadi
#

You should be able to access that component off of that cast?

plucky ice
maiden wadi
# untold ivy

No, from the Cast node. Drag off of it and type Get SK_M

maiden wadi
#

A pure node is ran once for each connected executed node. So you're pulling one random thing for the pointer, and a second random thing for the index.

untold ivy
plucky ice
fiery swallow
spice thunder
#

hey when I play a level it works perfectly but when player dies and a widget pops up there's a retry button which opens level again but when it load again the retry button doesn't work

could anyone help me about that?

maiden wadi
spice thunder
untold ivy
dim loom
# dusky cobalt

why dont you use a struct its mutch better at stuff like this instead int

maiden wadi
# plucky ice Ah man okay thank you. Is there a better node to use for what I'm trying to do?

Not specifically. What you have is mostly fine. It just requires knowing how pure nodes work. You should only random the index first. Then pull that instance from the array from a Get node using that index. That way the index and instance will match up.

The same with the random int after that. You'll want to plug the TrialType into the switch. Becaue right now Trial Type could be 0, and the switch could pull 2

fiery swallow
maiden wadi
# untold ivy Downest I can go :p

That's really odd. :/ You don't happen to have two same named classes in the project do you? Cause you 100% should be able to pull that.

#

@plucky iceThe general rule with pure nodes(those without a white wire connection) is that they have to be evaluated once per execution node they're used on. If you use the same pure node four times on the same execution node, it will run once and give the same value four times. But if you run the same pure node on four different executed functions, you'll get up to four different value outputs.

untold ivy
plucky ice
maiden wadi
# untold ivy Alright. This worked, but it isn't the workaround I wanted. Counterpoint, maybe ...

Maybe. 😄 Generally you can make some library functions out of it if you have a sane project structure. EG a function that takes in a character, iterates over it's skeletal and static meshes and finds the first one with a visible mesh that has the head socket. Then you don't have to care about really anything but passing the actor(doesn't even need to be character, can literally be Actor class), and the bone you're after.

untold ivy
#

baby steps :p

maiden wadi
plucky ice
spice thunder
fiery swallow
plucky ice
#

Final question for the moment; how can I pass variables around between different blueprints? Like how could I let my star_controller blueprint know which of the star_objects has been chosen?

maiden wadi
spice thunder
fiery swallow
snow crag
#

Hey guys. Im generating meshes along a spline. I was wondering if its possible to modify the vertex color of each spawned mesh through the blueprint?

spice thunder
#

restart player

fiery swallow
#

Type in restart, should be something like that

spice thunder
#

correct?

fiery swallow
#

There's definitely a restart game in the gamemode, unless you're using GameModeBase instead of gamemode

#

Try dragging off get gamemode and cast to gamemode, and then do restart game

plucky ice
# maiden wadi Isn't the star controller already doing the picking?

Yes, but the star_object BP on a per-instance is what causes the star to interact with a participant’s laser pointer to “explode.” So we’re basically looking for a match or mismatch between the star the star_controller picked and the one the participant selected with the laser pointer, if that makes sense. Should I move that star - laser pointer interaction somewhere other than at the individual star level to make it easier?

fiery swallow
spice thunder
#

correct

#

done lemme try it out

fiery swallow
#

Get gamemode pure function is probably getting GameModeBaae

spice thunder
#

yes that's why it wasn't calling restart game

spice thunder
fiery swallow
#

The gamemode you casted to

maiden wadi
fiery swallow
#

That will restart the level

plucky ice
maiden wadi
#

Once you've added this. You can go to the controller and add these selected nodes. When you call the thing in the first BP, the custom event at the top will run.

spice thunder
dusky cobalt
fiery swallow
spice thunder
plucky ice
plucky ice
wicked cairn
#

Anyone know how to make a randomly generated spline loop shape in the construction script, for example for an island?

maiden wadi
maiden wadi
tiny sigil
plucky ice
maiden wadi
# tiny sigil can anyone help me with this problem

As Moxie stated, you really need to frame your issue. Like. Your camera probe is messing up, your collisions are wrong, you seem to be trying to interact with the wall and get jumpy anim stuff. It is not clear what your own perceived problem is though. What are you trying to accomplish? What is going wrong?

maiden wadi
plucky ice
tiny sigil
maiden wadi
plucky ice
#

Makes sense, thank you so much again. Final question for today if that's okay. I have it reloading the level every time a "trial" is completed (just by opening current level at the end of branches). Is there some place I could store a variable that doesn't get deleted by doing that, like for instance, to export trial performance to R or another statistical software program after the fact? How should I handle keeping track of the score; within the game mode? Like at the end of both branch I can increment "total trial count" and increment conditionally based on which trial type it was, and then increment a correct or incorrect responses variable. But where should all of those variables go / at what level should I do that?

tiny sigil
#

this was the blueprinty of it

dusky cobalt
primal peak
#

Hey y’all I have a question so I’m making a game kinda like a obby sort of but I don’t know how to make the z cord kill the player instead of destroying them I already have a check point system I just don’t know how to make them die and respawn at said checkpoint

thin cradle
#

anyone knows if it's possible to set the min and max render distance of a scenecapture2D set to device depth? trying to bake a heightmap with a downward pointing scenecapture2D, using the min/max as bottom/top heights

maiden wadi
# plucky ice Makes sense, thank you so much again. Final question for today if that's okay. I...

Realistically this is a two part issue. You should make your stuff work via SaveGames for the internal game stuff. When you finish a level it should write to a savegame that this trial got whatever rating and save locally.

For exporting it to some other software, this highly depends. It can be as simple as a string export via converting your data sets to JSon strings. It just depends on the software and requirements.

oak fable
#

hey there does anyone know how save and load the Nvidia Dlss settings
i got the plugin and installed it and also edit and moved the UI stuff to my graphic settings UI but i can't figure out how to save load that settings as they are not available in the game user settings

any idea how can i do that ?

maiden wadi
oak fable
#

Seems like it

calm flint
#

Hello everyone!

I'm having an issue and have been trying to troubleshoot it all day, but to no avail.

I've made my project using c++. I've been trying to integrate common UI with my project.
Now when I try to create a widget from the controller class I get an error because apparently the player controller initialises before commonUI does, so it breaks.
Have been looking at the Cropout Sample project and they've put their menu/game widget creating inside the Game Mode class.
I've tried doing that too, but it seems like BeginPlay doesn't even fire after I press play.

I've tried most common solutions for this:

  • created a GameMode class inside .cpp
  • created GameMode BP based on the .cpp class
  • set the GameMode BP as my overriden GameMode

weirdly enough when I put printing of a random string inside my construction string, it does print it out, but when I do the same in the BeginPlay it doesn't do anything.

Keep in mind, I'm somewhat new to this haha

dark drum
calm flint
#

I've tried moving it to the game mode, but it seems to hate me today lmao.
I'm not sure what you mean by "just use the HUD class"?

dark drum
calm flint
#

I was mostly confused why BeginPlay won't properly override either. So weird

maiden wadi
calm flint
maiden wadi
#

Tried using what though?

calm flint
#

I just tried using create widget node.

#

It would work if I let the plugin to load fully, but if I initially connected to the player controller and restarted it, it'd break the player controller bp

maiden wadi
#

Oh, that issue.

#

I thought you were having a runtime error. 😄 Yeah some people have to change their CommonUI loading order.

calm flint
#

yeeeah.... I've opted to game mode, but for some reason my beginplay just doesn't do anything

maiden wadi
#

It's not a beginplay issue.

#

It's not even a code call issue. Your plugins are loading out of order.

calm flint
#

I don't know if I'm stupid or no, but even when I unload everything and just put that it displays a string, it doesn't do that.

#

Now, I might be missing something

maiden wadi
#

This happens when opening the editor or starting the game for the first time. All modules are loaded. CommonUI is just loaded late. So when the controlelr BP loads, it has no access to the CommonUI plugin.

calm flint
#

^ figured that one out, thats why I completely moved the logic somewhere else. I've seen the GameMode being utilised for the spawning of the widgets inside the cropout sample, but whatever I try to do with BeginPlay, it doesn't do anything.

thin panther
#

If this is multiplayer, it's because Game Mode is server only, and widgets are client only

maiden wadi
#

It isn't about the code call though. It doesn't matter where you move it. You could put the CreateWidget in every blueprint in the project and it won't matter. You have to fix the plugin loading order or make your core module require CommonUI.

maiden wadi
#

The fact you sometimes have it and sometimes don't is a luck factor.

#

You should edit your UPROJECT and set CommonUI as a dependency on the primary module. Doesn't hurt to include it in the module's build.cs either.

calm flint
#

the only thing is that I'm using UE 5.1, I'm not sure if thats also an issue.

maiden wadi
#

What did you set the loading phase on?

calm flint
#

PreDefault.

#

But I tried all the options I could find.

maiden wadi
#

On the CommonUI plugin?

calm flint
#

yes, in both build.cs and uproject settings

pulsar hazel
#

Is there a way to use a scene capture 2d and save the result in a texture2d?

#

I am tring to convert the reder target in runtime

#

but it just doesnt work

#

even in cpp I couldn't find a solution

#

and in bpp there is only editor restrictewd nodes

maiden wadi
#

Are you trying to write it to a rendertarget or texture2D?

pulsar hazel
#

to a texture2d

calm flint
#

thank you for your help, I'll reiterate over different solutions and come back to you if I run into any more issues.

maiden wadi
maiden wadi
pulsar hazel
maiden wadi
#

You access the mip0 pixel data and copy it. The last parameter on that function takes a uin8 array.

calm flint
pulsar hazel
maiden wadi
calm flint
#

I'll try that, thank you.

maiden wadi
#

@pulsar hazelI would be curious to know if this works? Where RT is your UTextureRenderTarget2D*

UTexture2D* MyNewTexture = UTexture2D::CreateTransient(RT->SizeX, RT->SizeY, RT->GetFormat());
RT->UpdateTexture(MyNewTexture);```
steady night
trim matrix
#

Anyone have any idea on this ?

#

I have my widget with a list item thing

#

I have this widget as my defualt entry thing and on construct I set the text

#

However it doesn't seem to be working

lusty sphinx
#

I've been experiencing this bug where some of my component's detail pane disappears, especially every time a generate my project files and build. I saw that most people suggested to reparent the class and reparent it back, but this could lead to some data loss. This issue seems to have been going on for a few years, so I'm wondering if there was another workaround that isn't too destructive?

lunar sleet
#

Is it a character class? When you say disappears, does that mean it’s blank inside it ?

lusty sphinx
#

I see. Specifically, I noticed this with my Ability System Component. It still shows up in the list of components on the left, but the details panel on the right is completely empty when selecting it.

trim matrix
#

Anyone able to advise whats happening here or point me to the correct channel if this is the wrong one please

lunar sleet
remote rapids
#

can i get help why i got those error and how to solve them

lunar sleet
lunar sleet
remote rapids
#

i am new in all of that can you help me?

lunar sleet
#

New in what? It’s saying to go to that node and either refresh it or remove it

trim matrix
#

I've checked as well and I'm setting it to something valid but don't seem to be appearing

lunar sleet
remote rapids
lunar sleet
#

It’s ThirdPersonCharacter

#

Not GameMode

remote rapids
#

how to fix that?

#

or should i remove all of that?

modern hound
#

Hello, I added a custom Interface to my player. But its not showing up on the left.

trim matrix
#

doesn't seem very active that UI UMG channel

#

anyone in here have any idea ?

#

it's setting the text but seems it ends up being blank

maiden wadi
#

If you set text and it's blank, then you either are using global invalidation or an invalidation box and it failed to invalidate. Or you set the wrong textblock, or something set it back to blank after you set it.

trim matrix
#

I've even tried to simply bind the Text to the variable being set when the widget is created and adding

young cedar
#

Hi everyone!

I want to leave you with my to quicksave and please, feel free to criticise and give me some advice.

When the game starts I create the save game object in the game instance. I populate it with the values from the load game just after loading. If this is a new game then it is populated with safe defaults.

When any variable is modified and event is triggered that saves it into the game instance. Those variables in the game instance have RepNotify and this makes to write them to the save object in memory. If the player chooses to quicksave this memory object is saved into disk.

The process runs very smoothly, you barely notice any frame skip when saving into disk.

Now I leave you a question:

The game quicksaves with the F5 key. What should be the procedure to avoid having it trigger the shader complexity while in PIE?

trim matrix
trim matrix
#

Thats what I was origanlly trying to do

maiden wadi
#

How do you create the widget?

trim matrix
modern hound
#

I need to get something like this

maiden wadi
# trim matrix

This will be your issue. You don't pass widgets to a Listview. You create data Objects, and pass those to the listview. The listview manages it's children itself, and you have to use the interface to update the child widgets from the data object.

young cedar
#

is not there? what about those interface methods?

modern hound
#

yeah, ik. But the methods are not showing up.

maiden wadi
#

Is this in a child class?

young cedar
maiden wadi
#

Try enabling this.

modern hound
trim matrix
#

Might have to look up list see what bit I'm missing

maiden wadi
haughty snow
#

I'm looking for a better way to set up the same event graph across multiple BPs - is there something I can look into that explains this / ways to do this? I'm trying to think of what to google but I can't articulate it correctly

maiden wadi
#

@trim matrix Listviews are designed to virtualize data. And meant to work from any UObject type. So like a list of actors, or a list of data assets, or a list of textures, or a list of basic objects with data on them. In your case you need the last one with a custom class inheriting from Object.

haughty snow
dusky cobalt
#
  1. I have BP_Unit with a DamageComponent where I store all stats (Health etc)
  2. I have Interface with GetHealth, GetCurrentHealth etc.
  3. I have Health Bar widget over unit health.

What would be the best way to get info from DamageComponent to the widget?

Currently, I have UnitReference inside Widget so I can GetAllStats by interface, but this is directed to the Actor and not the DamageComponent of the actor.
So, my only way to make it work, is to inside Actor, in interface functions just link these stats by taking reference from damage component? (picture).

Or anyone sees better idea?

#

and this is my widget currently

maiden wadi
#

IMO the interface is pointless given you're already using a component.

dusky cobalt
#

Hmm, do I just reference the whole component then?

maiden wadi
#

You have a reference to the actor within the widget. GetComponentByClass on it, and call functions on the component directly.

maiden wadi
dry sleet
#

friendship ended with Interface, now Component is my best friend

dusky cobalt
#

instead of DamagableActor, I could link the whole Component?

maiden wadi
#

There is no whole component. There is a pointer to the component.

dusky cobalt
#

and now inside widget

#

does it make sense?

maiden wadi
#

Not really, you're still using the interface.

dusky cobalt
maiden wadi
#

You have the component of a type, with the functions on it. The interface is pointless here. It actually is slower to get those floats from the interface than to just call the function on the component.

dusky cobalt
#

ohh you mean like this?

maiden wadi
#

You can do this way too, but you already passed the component pointer.

#

Either way works. Either this on the actor pointer, or the same function call on the component pointer.

dusky cobalt
#

This is magic 😄 Thank you a lot for help !

lusty sphinx
dusky cobalt
#

can you guys confirm if I did it properly now or there is other way?

lusty sphinx
#

or is it better to do hit actor -> get component -> isvalid -> takedamage

maiden wadi
# lusty sphinx wouldn't you want the interface for passing damage on collision hit? hit actor -...

Depends on what you need. For the actual application of damage it still has to go to the component. The component can do everything an actor can. Put a delegate on it, find the component on the hit actor and damage it. And it'll tell it's owner it's been damaged through the delegate.

This is also a really rudimentary system. More complex stuff like GAS doesn't really need to do this because you apply damage through simply applying a GE straight to the component. The GE application does both the applying of health changes, and spawning of visual cues which should be set up to be actor independent.

stoic ledge
#

good day. could anyone explain to me instance mode and state relationships. Im trying to design a chatmanager, where a player can send a message and the server sends the message to relevant players. but im not sure where i could implement the manager

lusty sphinx
maiden wadi
# stoic ledge good day. could anyone explain to me instance mode and state relationships. Im t...

IMO I do this with two components. One on GameState, one on PlayerState. The UI uses the one in the PlayerState to broadcast messages through a ServerRPC which gets the gamestate component to pass that intention along. The one on GameState grabs all players and routes the available chat participents of that channel through a client RPC.

The one on GameState also serves as a buffer to save a duration of messages for new joiners to channels and whatnot.

lusty sphinx
maiden wadi
stoic ledge
faint pasture
maiden wadi
#

For player chat? None really. Unless you want to broadcast gameplay messages to all players.

stoic ledge
maiden wadi
#

Yes, but you don't really use multicasts for this.

stoic ledge
#

oh, i see, i read that wrong

maiden wadi
#

I mean you could for a general chat, but it's just another channel so should maintain the same system as the rest. But in general everything should be Server/Client RPCs

faint pasture
stoic ledge
#

like if player a opens his inventory how do u pass the player or his inventory into the widget?

#

i think if i understand the idea. i would make a reference variable and expose on spawn.

hallow pasture
#

Hey,
I have a Pawn with a Sphere component (to detect enemies and create the range of the Unit)

I have an issue for Navigation, MoveTo etc.
This issue here is that the Sphere Size is added to the radius of the Actor/Pawn so when I do a move to there is a lot of issues. (Overlap is not well calculated because the sphere is already overlapping)

My sphere is having a custom channel for Collision

Will repost in AI its probably better in the #gameplay-ai channel

stoic ledge
#

It makes sense to use gamestates and playerstates to communicate, im a bit confused on an appropriate method to pass the message into the gamestate from the player.

dawn gazelle
#

You don't. You have to feed the reference of the actor into the widget. So like on begin play, get the widget component > get user widget > interface/cast that passes in actor reference > widget does its thing with the reference.

dawn gazelle
stoic ledge
#

@dawn gazelle i had to go to sleep yesterday. trying to get a good grasp of this concept. seems useful ;p

stoic ledge
#

lets see if i can get it to work ;p

spring osprey
#

you guys know a way to make this cronometre look like 02:08 instead of 2 :8?

lofty rapids
light garnet
#

Does anyone know how to fix this

#

I am using Boolean for fire

#

When i fire blend space change

lofty rapids
#

do min num digits 2

#

in the to text nodes

maiden wadi
#

Also only need one textrender instead of three.

spring osprey
dawn gazelle
spring osprey
#

aaa okay thanks

maiden wadi
#

Can also just timespan it.

lofty rapids
#

you can also use decrement the -- node

#

instead of subtracting and setting since your using 1

lunar sleet
#

That may be too advanced here

spring osprey
haughty snow
#

If i create a 'child blueprint' then edit the event graph of the parent, that changes it for every child?

lofty rapids
#

i believe you have to make the call to the parent

#

but variables n stuff should be all set

#

for instance in your child you might see begin play, then call parent begin play

haughty snow
#

oooooo yep

#

i see that now ok

lofty rapids
#

if thats not there, it won't call it

haughty snow
#

ty ty

#

fuuuuuuck ok that's what i was lookin for

#

ty!

lusty sphinx
#

Not sure if this is the right place to ask this, but I was asking about getting an empty details pane for some of my components. It was suggested to just reparent the class, but it doesn't seem to work for me. I reparented this class to Actor and back to GDPlayer_State, but no matter how many times I tried, I always get this empty details pane for my Ability System Component.

maiden wadi
#

Is that a C++ added component?

lusty sphinx
#

I believe so, I'm trying to follow along the GASDocumentation from tranek.

maiden wadi
#

Haven't done that. But did you add the component in a C++ .h file?

#

Cause either you forgot visibility specifiers or you have a corrupted BP with a bad pointer.

lusty sphinx
#

I'm still rather new to C++ with Unreal. Is this where it is added to the class?

maiden wadi
#

UPROPERTY(BlueprintReadOnly, VisibleAnywhere)

lusty sphinx
#

Would the reason why it wasn't set that way to start with be because the class is setting all the values for the component inside the .cpp and the author wanted to avoid the user accidentally messing up the initial settings?

maiden wadi
#

Unsure. My personal rule is that component pointers are always marked like above. There are better ways to force defaults than making your blueprint look corrupted.

lusty sphinx
#

marked with "UPROPERTY(BlueprintReadOnly, VisibleAnywhere)"?

maiden wadi
#

Yeah.

#

The missing details panel is also a sign that your BP got corrupted. Basically it loads fine, the component actually exists and is there. But the pointer fails to load for whatever reason. Usual cause is moving the C++ files to another module or plugin and not using a redirector. So not marking them visible looks bad.

lusty sphinx
#

I see, thanks for the clarification

maiden wadi
#

Did that fix it though?

wise ravine
#

I am officially switching back to timelines. This interp stuff has caused my too many problems for my brain to handle 😂

lusty sphinx
faint pasture
#

You want a train to do................. what?

spark steppe
#

do what trains do

#

choo choo

wise ravine
#

yes 😂

wise ravine
lunar sleet
wise ravine
#

at different times.. Idk if I'm explaining this well....

faint pasture
wise ravine
#

Game Starts > Train Move to Station > Player gets off > Train leaves (After player gets off).
Player Can call train back > Train Moves to Station > Player Gets On > Train leaves to Next Station (Repeat)

#

It think thats the jist of it

spark steppe
#

is it travelling in a straight line?

faint pasture
#

the problem with timeline would be if you wanted it to have varying durations

wise ravine
spark steppe
#

there's also a component for that

wise ravine
#

So the animation would stop at different distances

#

I think the issue may have been part because of the actual node I was using to Set the Offset or Location

faint pasture
#

no no no

#

set

#

adding on tick is 100% a recipe for disaster, you'll never get the same result twice

#

just timeline -> float -> interpolate something between A and B

#

that something can be a location vector, a float distance along spline (now your train can curve), anything

vital shard
#

Add? More like "Bad" amirite 👉 👉

wise ravine
#

Yes I tried Set, but that node would just teleport the train to the endpoint without showing the animation

#

but I can* try that again

spark steppe
#

you need to save the start and end location before you run the timeline

#

if you use SetLocation, they are fixed values which you interpolate/lerp on

steel star
#

what am i doing wrong here .. i need "Input Mode" to appear as a variable and it is not

vital shard
#

Yeah you'd lerp from StartLocation to EndLocation and feed that into the SetActorLocation.

merry stump
#

oh hey i need some help

i'm trying to make a 3d button on vr that when its triggered, it will change the texture of the text (it's a quiz/trivia but in 3d)

#

how can i make this work?

spark steppe
#

the text is what? a mesh? a widget? a 3D Text Renderer?

merry stump
#

a mesh

spark steppe
#

easiest way would be to just change the material to another

steel star
#

so setup a material, make a few material instances with different textures

#

assign the appropriate material instance to the static mesh comp

vital shard
merry stump
#

i'll screenshot to visualize 1 sec

steel star
#

if blueprint read/write like didnt work for some reason it be heartbroken

vital shard
#

You're welcome. Please like and subscribe ;D

steel star
#

holy CRAP player controller has 23 inherited variables i never knew existed

vital shard
#

Most things have a lot of variables. Probably why the default for Show Inherited Variables is off. To not overwhelm people.

vital shard
wise ravine
#

Train just teleports to the world origin

vital shard
#

Makes sense. You're setting the location to 0,0,0
What you're doing when setting actor location is setting its actual world space location. So 'Train Speed' is not the thing you should be lerping to. You should lerp from 'TrainStartLocation' to 'TrainEndLocation'

robust mural
#

Hey guys, I have 2 widgets, and I try to get the canvas size using the node get size, from one widget its working fine, and returns the size correctly, but the other widget, its not returning any value

vital shard
merry stump
#

the blueprint for the button

wise ravine
#

i think I got it working

robust mural
kindred galleon
#

What is the alternative to branch spamming? Is there a switch for boolean or do I have to go extra steps on making an enum?

maiden wadi
kindred galleon
#

like solution for this

merry stump
#

the bp for the button

steel star
#

theres switch too

#

also you can make multiple branches a single library function call

#

and just write it out, in a 100% more readable way

#

i mean, in C++

kindred galleon
#

💀

maiden wadi
#

There isn't really a fix for that though. They're booleans. Switches are for data types with more than two states.

kindred galleon
#

I see

steel star
#

well, there are 3 bools, make them int 0, 1, 2?

#

or, 1 << 0, 1 << 1, 1 << 2

maiden wadi
#

You're changing logic at that point.

kindred galleon
#

yeah exactly lol

maiden wadi
#

The point is to check one, if false, check another. If you convert the value at the start, you get a different result.

kindred galleon
#

Just wanted to figure out if there was something like a switch for bool

#

How many branches are too many

steel star
#

i mean it only executes 1 of 3 paths

#

you can switch an int, which you make imediately prior

#

its two nodes total still

kindred galleon
#

yes

steel star
#

just offering an alternative it doesnt have to change the logic

robust mural
#

guys Im trying to get the size of a widget but it returns no value

maiden wadi
#

Where are you calling it and what function?

robust mural
#

its a widget variable object reference

#

from my second widget it works fine

steel star
#

what are those small blue nodes? is that cosmetic?

#

is that what redirect nodes are for?

maiden wadi
#

The reroutes you mean?

vital shard
# wise ravine So how would I do that?

In case you are still having issues, here's an example. I am Lerping one vector to another. The StartLocation to EndLocation.

Since you seem not super familiar with blueprint yet it may be easier for you to use a LevelSequence to set up the movement of your train and then just play a level sequence from blueprint. As an alternative (more visual workflow) option.

steel star
#

ok yea those, didnt know the purpose thanks

vital shard
#

Woops typo in my comment box. 500 units further in X rather than 100.

lusty sphinx
# kindred galleon

Not too sure what you are trying to do with that event, but you can also use enums or gameplay tags, and use a switch on enums/gameplay tags.

kindred galleon
steel star
#

Ok so i think i still am missing one fundamental part of UE here. I have a C++ UObject derived type that i intend to use like a material/materialinstance: it defines the properties that exist, next i define blueprint classes that derive from it, setting specific (and permanent) values for those properties.

But first, is instance the right terminology here as it seems to be used in some cases but not others. Like there doesnt appear to BE blueprint class instances.

Then, I have some type that has a property i want to assign live (well, via blueprints) to one of those specific blueprint instances but here is the conundrum: if i make the property a TSoftClassPtr it lets me assign its value to any of the defined sub/inst types, great .. but what am i suppose to then DO with it when i want the actual values from that inst with none of them really -allocated-?

I THINK this is were i use classptr.Get()-ClassDefaultObj?

vital shard
wise ravine
#

This should help, thank you

vital shard
#

You're welcome, good luck :D

lusty sphinx
steel star
#

it was, its a classic if/elseif/elseif

steel star
#

I wish there was a way of toggling 'disabled' on a selection of assets, to dereference them everywhere and hide them from the ui (other than the content browser) without me having to literally delete files then not lose them if later wanted.

wise ravine
vital shard
#

@kindred galleon Probably not too applicable to what you're doing but might be useful to do something like this sometimes. Though normally I always go for enums.

#

Don't check booleans, just plug into different execution flows? ¯_(ツ)_/¯ Idk, I don't care too much about how many branches I have.

trim matrix
steel star
#

i assume he means the actual C++ call to do it runtime

#

which i do not know

vital shard
trim matrix
#

and you could use TSubclassOf<>

vital shard
steel star
#

yea i found that tsubclassof is what i actually wanted, as far as allowing me to assign known asset types to it within the editor

#

and how to then actually make use of it .. ie load it, access default object, or somesuch -- indeed i suppose a C++ channel q.

spark steppe
#

you should be able to get the CDO from the class

#

the reason it "didn't" work with the softclassptr is because you have to load the class first

#

so smth like SoftClassPtr.LoadSynchronous()->GetCDO() not sure about the last method name tho, barely using the cdo at all :>

#

may be GetDefault<SoftClassPtr.LoadSynchronous()>() 🤷

maiden wadi
wise ravine
steel star
#

Its unclear to me if material and materialinstance have a different relationship than blueprint class and .. child blueprint class though.

#

and why the term instance is used in some of the descriptions of UObject/UProperty/UClass flags

wise ravine
spark steppe
#

because you never started it

#

you most likely want reverse from end

#

reverse reverses it from the current position, which by default is 0

#

unless you played the timeline forward before

drowsy kestrel
#

Hi im trying to make a fps game and for some reason when i walk the gun isnt straight how do i fix this it makes shooting look werid.

wise ravine
#

why can't I modify any data?

spark steppe
#

because it's good practice and modifying data in there can lead to undesired results

wise ravine
#

Would this be the correct way?

wise ravine
spark steppe
#

because when you plug the result from it into two nodes it's executed twice and may lead to different results depending on the math, etc.

wise ravine
#

Oh I think I get it

spark steppe
#

just don't do it, no one with a sane mind does it 😄

#

it also gives away that the node doesn't modify any variables if you follow that rule, which helps reading your own "code"/spaghetti

wise ravine
obtuse kraken
quasi dagger
#

Yo, I'm working on setting up a Multiplayer game rn and I currently have it so that each player chooses a character, their choice being saved within their game instance, and then they choose to either create or join a session (dont quite have dedicated servers working just yet) As apart of this character selection it chooses their character model and what not. It works perfectly fine solo and sets everything accordingly, issue is that when another player tries to join their session, the second player is forced into being the same character as the local player and also has absolutely no control of their character. The output log says its a replication issue but tbh I have no idea how replication really works to understand where its going wrong, help?

faint pasture
#

You are presumably blending into a walk animation where the gun is not held straight

faint pasture
#

it's probably not

quasi dagger
#

Only through the game instance, It's not necessarily being manually sent

faint pasture
#

It's not getting sent at all then

#

the server has no clue about the clients choices

#

You need to send it to the server at some point through a Run on Server Event

#

And on the server, there won't be just one character setup in GameInstance

#

there'll be one per player

quasi dagger
#

So am I wrong in thinking that everyone has their own instance? or is it just a problem of the instance not sending its information to the server?

faint pasture
#

GameInstance can work but presumably you'll eventually want to be able to save this right?

#

just use PlayerState and SaveGames

#

or PlayerController

#

Everyone has their own instance

#

But if the rule is "OK now load the character setup from GameInstance"

#

you only have the one character setup serverside

#

the server goes "sure thing" and gives you the character setup (which is the hosts)

#

how can the server store 2 character specs (one per player) when you only have 1 place to store it?

quasi dagger
#

Just for reference, this is the error I get when the client joins the server: "[2024.05.08-06.34.29:518][187]LogNet: Actor channel failed: [UActorChannel] Actor: BP_ThirdPersonCharacterDefault_C /Game/Maps/ThirdPersonMap.ThirdPersonMap:PersistentLevel.ChildActor_GEN_VARIABLE_BP_ThirdPersonCharacterDefault_C_CAT_0, Role: 3, RemoteRole: 1 [UChannel] ChIndex: 12, Closing: 0 [UNetConnection] RemoteAddr: EOS:000232bc0f7b4988890f565620be3e4d:GameNetDriver:26, Name: IpConnection_0, Driver: GameNetDriver NetDriverEIK_0, IsServer: YES, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: EIK:e38dc7f315264da2bf0f71ebba00557d|000232bc0f7b4988890f565620be3e4d"

faint pasture
#

that doesn't matter right now, your design is fundamentally not set up for multiplayer

#

Start with what you for sure need, which is a way to pass the character info to the server

#

You can still use gameinstance, it'd just be that the playercontroller or playerstate will shuttle the data to the serverside version of itself

quasi dagger
#

Alright, so after a player chooses their character, it should do a "Run on server" function and send the player's choice to their player state?

faint pasture
#

do they choose character before or after joining?

quasi dagger
#

before

faint pasture
#

Then doing it when you choose isn't correct, there's no server when you're doing the choosing

#

it'd be more like this:
PlayerController.BeginPlay -> is local playercontroller? -> yes -> get GameInstance -> cast to YourGameInstance -> send info in RunOnServerEvent
Recieve Info -> spawn character -> possess

#

assuming beginplay of the playercontroller isn't too early, that'll work for both server and client

quasi dagger
#

how do I check if its local?

faint pasture
#

right click and type local, you'll find it

quasi dagger
#

is locally controlled?

faint pasture
#

you in the pawn or playercontroller?

quasi dagger
#

ah right whoops

faint pasture
#

The pawn doesn't exist yet, or at least shouldn't

quasi dagger
#

got it

faint pasture
#

There's other ways to do this of course, especially if you're wanting to play nice with the typical GameMode flow where it chooses your pawn and spawns it for you

#

but the general form is the same, you need to tell the server about any data you want it to know, and the only way to do that is through run on server events

#

Multiplayer is really complex, you need to constantly think about which version of the pawn, playercontroller, playerstate, actor, etc your code is running in

#

the main gates are HasAuthority and IsLocal or IsLocallyControlled etc

quasi dagger
#

How do I make/find a runonserver event?

faint pasture
#

for a listen server / host, it both has authority AND is local or is locally controlled

#

a connecting client is local but does not have authority

#

another clients pawn or playerstate on your machine (as a client) is neither.

#

make an event, mark it as run on server

quasi dagger
#

Where?

faint pasture
#

Replicates

#

You'd want this to be Run On Server and Reliable

#

spamming your aim direction or throttle value at the server would be Run On Server and Unreliable

#

The only reason anything at all is happening on the server when you do it on the client in your character is because Character and CMC already has bits of this covered in C++

quasi dagger
#

Because effectively the difference between a reliable and unreliable event is just whether or not it decides to not run it to save bandwith right? and if you want it to run it no matter what is has to be reliable, right?

faint pasture
#

TCP vs UDP

steel star
#

is there a way to include arguments to the 'triggered' event on an input action type object

faint pasture
#

not really but that's the idea

steel star
#

ideally a UObject*

wise ravine
lunar sleet
#

Still having problems with your trains, Choo-Choo?

wise ravine
faint pasture
lunar sleet
faint pasture
#

Where is train shouldn't come into it

#

Where did train start
Where should it end up

End of story

lunar sleet
#

Don’t you mean end of the line? 🙃

wise ravine
thin panther
#

bear in mind a pure node gets called whenever it's referenced, so your start and end location is always changing

faint pasture
#

or swap the 2 end points and then run the timeline again

#

it's still WhereItStarted to WhereIt'sGoing

wise ravine
lunar sleet
#

Yeah, changing the start and end locations during a timeline is a bad idea, speaking from xp

faint pasture
quasi dagger
#

I'm still having the same issue, Just did another test and got the same result

wise ravine
faint pasture
thin panther
# wise ravine that is what I intended yes

You shouldn't be changing the points during the lerp though?
It should be "I need to move now, calculate the points and move to them." Then recalculate on the next move

Not every, time I take a step, move further away

quasi dagger
#

I implemented the code like you said

faint pasture
#

store the location at the start

lunar sleet
wise ravine
#

I'm using 2 diff timelines, executed by different events

thin panther
#

Otherwise your train will never stop.
You're each frame moving between current location + value.
Rather than start and end

You can't reach the end if each frame it's where it currently is, plus some amount

#

^ essentially the train

quasi dagger
#

Is this not what you said to do?

faint pasture
# wise ravine

Here's what your code is literally doing.

go 0% between where you are and 500 units in front of you
go 1% between where you are and 500 units in front of you
go 2% between where you are and 500 units in front of you
go 3% between where you are and 500 units in front of you
go 4% between where you are and 500 units in front of you
go 5% between where you are and 500 units in front of you

#

60+ times per seconds

#

you're literally just zooming it off into the void

wise ravine
#

the train does stop...

faint pasture
#

Instead, it should be like this:
go 0% between where you started and where you're going
go 1% between where you started and where you're going
go 2% between where you started and where you're going
go 3% between where you started and where you're going
go 4% between where you started and where you're going
go 5% between where you started and where you're going
go 6% between where you started and where you're going

wise ravine
#

sorry I'm not understanding why this is happening with the pure functoin

thin panther
faint pasture
faint pasture
#

At the end of your timeline, you're telling it to move 500 units PER FRAME

wise ravine
faint pasture
#

yes because you finally quit making it zoom

faint pasture
#

but your setup is completely wrong. Just change the 2 points you're interpolating between from
Where you are to 500 units in front
to
Where you STARTED to WHERE YOU WANT TO END UP

#

Once you're moving, you aren't where you started

wise ravine
#

Okay I'm starting to see your point, my question Is how can I set a new value for the start and end position when I'm executing the 2nd departure

faint pasture
#

Enter -> save current position -> calculate ending position -> enter timeline

thin panther
# wise ravine sorry I'm not understanding why this is happening with the pure functoin

because every time that yellow pin is referenced the pure function is called again.
so one frame you're saying. Move me between my current location, and some amount in front.
and then next frame, you're saying Move me between my current location and some amount in front.

it's never got an end to reach, because while the timeline is running, the end moves further away. Hence the carrot and the stick

wise ravine
#

I see

#

Would this work instead?

thin panther
trim matrix
thin panther
#

it's my new favourite link tbh

#

shamelessly stolen from someone else here, no idea who though

wise ravine
#

it does work

#

🙏 thank you all

wise ravine
#

they've posted it 4 times

thin panther
#

That name rings a bell with that link

#

Yeah, must have been engage

trim matrix
spark steppe
#

is there a node like the gate, but which requires 2 exec inputs to fire before the exit node activates?

thin panther
spark steppe
#

as i have some action which relies on two events to be completed, then it should do smth, but the order in which the events fire isn't predetermined

trim matrix
thin panther
#

Not big enough to break the rules, or try and summon multiple helpers at your beck and call

spark steppe
#

nah

wise ravine
#

why not?

spark steppe
#

because that's 3 nodes

#

and 2 variables

thin panther
#

Or something that's kinda asynchronous, that waits for both to complete

spark steppe
#

no

#

i'll show you in a minute

thin panther
#

ah gotcha

#

yeah, I'm not aware of anything like that built in.

spark steppe
#

well now it's too late anyways 😄

sinful hinge
#

Hey everyone! Any ideas why my reference is considered invalid? I don't have any error on compilation, the door blueprint is good, and when I check through the Is Visible node, it's valid, but when it's the reference, it doesn't work... Am I missing something here?

runic coyote
#

Is there a recommended section to ask a control rig related question? I'm struggling to get two separate characters (which are children from the same c++ class) with two different skeletal meshes to have the same behavior.

Long story short one of my rigs and meshes is able to follow a point in space with their hand, but the other simply... Doesn't point the right direction.. Despite virtually all elements being the same besides the specific mesh and skeleton used

Dragging my control point around in the control rig editor works just fine but in game it's toast

#

Sorry for the long comment

dawn gazelle
#

The blue references like this can be thought of as a container. You can set the type of thing that can go in them, but they'll be empty until you set their value.

sinful hinge
#

I see, haven't dealt with spawned objects yet, so it should be fun to figure it out haha Thank you !

lunar sleet
runic coyote
#

Thanks!

indigo dome
#

/Sttream

trim matrix
indigo dome
#

i miss clicked lol my bad

faint violet
valid solstice
#

quick question what node is this?

junior quest
#

could someone point me to why the arrows arent showing up ? Im not really sure what to check

cursive vessel
#

I'm able to connect normally to my MySQL database from other avenues but unable to do it from UE5

marble tusk
deep lagoon
#

Need some help with AI Pawn/ AI controller movement

How can i hard stop a pawns movement to play an animation

I have a character going from a dead sprint to an animation of hitting a wall

#

i have the detection and triggering all set
but the character stopping is too inconsistent

lunar sleet
dawn gazelle
dim halo
#

If I split getforwardvector and then multiple the individual float values by a certain number, will the length differ depending on where the actor is looking:

surreal peak
dim halo
#

the individual numbers would be the same

surreal peak
#

Why even multiplying them one by one then

dim halo
surreal peak
#

You can normalize the forward vector to 2d

#

And then you ignore the Z

dim halo
#

i see

#

is there a specific reason that this would be preferable or is it just simply that its less work and less complex

surreal peak
#

If your forward vector is 100% in the X Y plane, then you can also just ignore Z and multiply the whole Vector. But if it can point up or down, even slightly, then multiplying only X and Y is incorrect cause those aren't normalized to length 1

dim halo
#

i see

#

well you can point up and downw so thats definitely the problem

surreal peak
#

It's probably good to imagine the Vector like a 1 meter long stick on the floor. If it's flat on the floor and you multiply it by 2 it will be 2 meter long.

If you however lift the stick on one end and only multiply the part that makes up the floor plane, so x and y, the result will be less than 2 meters.

dim halo
#

so in my example would, if iget the actor location and then i would have to break it and ignore the z when adding to vector that is normalized 2d, so that the z is always 0

surreal peak
#

If you normalize the vector to 2d you can just multiply it

#

Don't need to break it

#

Cause z will be 0

dim halo
#

sorry, bc im also getting the actor location i think it would have to add the actor location to the normalized forward vector

#

I could be wrong and confused but wouldnt it have to look something like this

surreal peak
#

You can change the multiply node to just be a vector x float

#

Right click menu on the second pin lets you select that

dim halo
#

thank you

surreal peak
#

Rest seems fine if your intention is to spawn the actor at Z = 0

dim halo
#

i wasnt familiar with the normalize 2d node, so i think thats where the confusion came in

dim halo
#

the normalize to 2d vector is a great help

#

thank you very much for all the help

graceful rampart
#

I am applying PointDamage to my actor using ApplyPointDamage node but its returning 0 (Zero) damage does anyone has idea why it is happening like this?

Please ping me when reply.

somber dust
#

A relatively large BP is referencing Utils Library BP_HelperFunctions. Is there any trick to find where it's referencing the helper functions? Like the node themselves?

maiden wadi
maiden wadi
somber dust
graceful rampart
maiden wadi
somber dust
lament nacelle
#

Hi, has anyone encounter issues in Packed Level Actor BP in ue5.4 which worked fine in ue5.2?

lament nacelle
#

i have set up some remove ISM instance in the PLA BP construction script, now in a particular PLA BP, it does not work

#

but in some other PLA BP, it works

#

while the return bool value of the Remove Instance shows success, the instance is actually not removed

lunar sleet
graceful rampart
lunar sleet
#

Also have you tried ApplyDamage or do you strictly need this point one

steady night
#

hey im trying to change the parent socket location

#

this thing is the attach actor to component wont work since the target & paren are already together... so it wont fire

#

ideas?

bitter otter
#

Hello, i am trying to add multiplayer to my game, however the client player seems to be stuffing up when compared to the server player, for example. Instead of scaling to be 10 times bigger, its much more. Another being, when i press the sprint input, it doesn't sprint.

Any help? 👍

graceful rampart
#

Hello, Does anyone know how to stop third person character pushing the choas vehicle? I want that character should not able to push the car.

graceful rampart
dusty monolith
maiden wadi
dusty monolith
maiden wadi
#

You can already navigate with arrow keys. Turn on...

#

Uh. I think In project settings it's called Render Focus Rule? Set that to Always.

#

You can see what is currently focused. If you open a menu and a button is focused, your arrow keys should already shift focus to other elements.

young meteor
#

Just spent a bunch of time finding out why my "Target" variable is not valid when I need it, because it is valid just a moment before.
Turns out I have a duplicate somehow. No wonder things are weird.
Any specific way I would have done this so I can avoid it in the future?

plucky ice
#

Quick question this morning; I am trying to use the GameInstance to store my variables persistently between level reloads and have some logic implemented to update these gameinstance variables at the end of certain events within my blueprints. I don't think I'm using this correctly though, since when I try to print the gameinstance variable "total trial count" at the start of each level it reads as zero no matter how many levels have been played. I think this has to do with the timing of how the gameinstance gets updated (once per "clicking play button") but I am not sure.

Image 1: logic within starcontroller blueprint that checks whether a star is destroyed and if it is, determines if it was the correct star or not then reloads the level. identically updates gameinstance variable at the end of each branch with trial count.
Image 2: Beginning of level logic where the GI variable should be printed and level specific variables should be updated using the values from the game instance
Image 3: Logic incrementing the game instance variables based on which trial type has been selected.

The goal is to be able to make sure I get 3 (or whatever number) of each trial type I specify by checking these level-specific variables which should update from the gameinstance and that I can stop the progression of new levels if the totaltrialcount equals some target number of trials - I'd put this logic in the spot where it opens a new level.

Thank you!

lofty rapids
plucky ice
lofty rapids
#

i would think it doesn't even get to the set if you load a new level

dark drum
# dusty monolith how would i make a UI that you can switch through like that with arrow keys?

You would need to learn about widget focus. Whilst Authaer mentioned OnFocusRecieced/Lost, I personally get better results with 'On Added to Focus Path' and 'On Removed from Focus Path' but it can be a bit confusing if you don't understand how the widget focus system works.

Either way should work though. This is an example of a button widget. Also, if you want to navigation to wrap so if you're on the bottom button and press down and want it to go back to the top, you'll need to setup the 'Navigation' rules on the thing that contains the buttons widgets (such as a vertical box).

There's is a #umg section if you need specifics.