#blueprint

1 messages Β· Page 167 of 1

steel star
#

no, you have a foreach loop over bullet tags -> a foreach loop over target tags

verbal girder
#

Oh I see what you're saying

#

Yes!

lofty rapids
#

usually you don't need too much info just the problem, what specifically breaks ?

steel star
#

by the way, it would be pretty normal to need a fair amount of 'per team' data or even functions maybe events too, not just a "tag". you might preemptively consider making a UObject class for a team, thats what i have done though it was a bit of a bother

verbal girder
#

Oh, man. Y'all.
It's totally working, I just completely forgot the whole reason I even started this logic which is that it shoots itself.
It IS getting the gameplay tags it's just the breakpoint debugger is bungling displaying it correctly, but it IS actually getting the array of tags. Good ol printing it out did work to check πŸ€¦β€β™‚οΈ

steel star
#

yea. printf debugging still king. unfortunately

rotund barn
verbal girder
maiden wadi
rotund barn
steel star
#

well, your going to need to for this sort of thing imo

#

something like. 'make local variable candidate powerups' -> 'get all objects of class powerup' -> the result of this is an array -> foreach powerup in array -> if powerup not granted yet -> add element to local -> get random element in local var array

#

there could be a helper 'predicate node' or something

waxen quarry
#

That function, isnt that just the 'Contains' node basically

frosty heron
zinc spear
#

is there any way to set the values of variables in a physical material from within a pawn?

frosty heron
#

If you don't see it then it's private / not exposes to bp.

soft lion
#

Idk if you can make one from a physical material or not tho

cold lion
#

I need some help with my inventory system I have watched the tutorial over and over again and tried some fixes However the Image Icon and quantity do now show up. Howvever the inventory still functions. I have some screenshots here of what is going on but now I am getting this error which is completely new to me and I am thinking might have something to do with me messing around.
This is the video with a timestamp. https://youtu.be/iqi-kg7n-io?t=627

We are revisiting one of my first series on the channel; the inventory system series, this time with different implementations, improvements, and now in Unreal Engine 5.

In Part 6 we create the widgets needed for our inventory display screen.

SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
D...

β–Ά Play video
zinc spear
trim matrix
#

I'm working on a school assignment where we have to implement checkpoints. To complete this assignment I have to check if the current checkpoint is the level start, and if it is, set all other checkpoints to not be the level start, but I have having trouble getting it to work and I'm kind of lost

magic parcel
#

I am using draw debug line and draw debug text to display these lines and names. However, they only last for the duration. Is there any way I can get them to update live and stay forever?

soft lion
magic parcel
#

yes, I am on 5.4.1

soft lion
#

Yeah me too

magic parcel
#

sad days 😦

soft lion
#

Idk I debug in C++

#

I just tried in blueprints real quick and yeah I noticed it's gone

#

You gotta put them on tick

#

If they last for 1 frame you need to print on tick

magic parcel
#

😦

soft lion
#

Try draw on tick see what happens?

#

On wait nvm

magic parcel
#

draw on tick works, not for the editor though

soft lion
#

You want to see the lines when the game isn't running?

magic parcel
#

only construct works in editor

#

yep

soft lion
#

Oh yeah

magic parcel
#

im making complex ass puzzles here πŸ˜›

soft lion
#

Damn bro they screwed us good

magic parcel
#

there is something that does on construct update.. but dont know

#

yep

soft lion
#

You know how to make custom C++ classes? I can write up a few blueprint library calls for line traces with the engine calls

#

I'm gonna have to do it for my stuff now seeing this

#

Oh wait that still wouldn't work

#

Damn bro do you have a light beam particle system?

#

You could trace those lines with a beam particle you can activate those on construct

#

Set the beam lifespan to infinite

magic parcel
#

that is a good idea

waxen quarry
trim matrix
magic parcel
trim matrix
waxen quarry
#

== will set all other checkpoints to false

trim matrix
soft lion
soft lion
#

Yes

#

Try

trim matrix
#

I am still unable to set a checkpoint as the level start, so I spawn underground unable to move so

#

I'm doing something wrong

soft lion
#

Well the variable itself, the default value is false and then you can make it a public variable and in your editor you can manually select which one you set the boolean to true

#

Click the little eye icon next to the variable and then you can edit it on each individual actor you place in the world

trim matrix
#

yeah I already have it instance editable, the issue is that the function is setting every checkpoint to false on level start because I have it being called in the construction script

#

but for the assignment I need it to be called in the construction script

soft lion
#

Why call it in construction? That runs the function every time you compile the blueprint

trim matrix
#

yeah I have no idea

#

I don't really like this instructor so far he didn't explain anything really

soft lion
#

Is that a literal part of the assignment

trim matrix
#

yes

soft lion
#

Oof

trim matrix
#

here is the rest of it

soft lion
#

Damn bro I just used player starts

#

They have a playerstartname variable made for checkpoints

#

BP_Checkpoint is what parent? Can you parent it to a PlayerStart?

waxen quarry
#

Can you even call GetAllActors in the construction script huh

soft lion
#

As long as they're placed why not

trim matrix
#

even if I could I doubt it would work, he has this blueprint that runs on begin play that checks if it's setup how he wants it to be

soft lion
#

Ok

waxen quarry
#

If the checkpoint is placed in a level it wont run on game start.

#

So idk how well its going to work out.

#

Unless this is supposed to be an in-editor thing

soft lion
#

Oh wait hold please

#

You need to drag off the actor pin off the for loop and from that call Set Start False

#

You're targeting only your own variable change the variable on the found actor in the array

trim matrix
#

there is no actor pin on the for loop

soft lion
#

Guy

trim matrix
#

am I stupid

soft lion
#

You're checking the actor vs yourself !=

#

Wait

#

You would need an interface call

#

Don't cast but you can make a set boolean interface event

#

Call the interface event off the actor

#

No casting

trim matrix
#

my brain is working overtime to try and understand what you are saying to me

soft lion
#

Hang on

#

I gotta put my kid down I'll show you

waxen quarry
#

The prompt is incomplete and the code sample is too small. Post the entire prompt and sample please.

steel star
#

how do i copy ALL properties of all components and the actor itself, and paste to another?

waxen quarry
waxen quarry
steel star
#

yea.

trim matrix
#

this should be literally everything

waxen quarry
trim matrix
turbid bison
#

What can cause this warning ?

#

Warning LogNetPackageMap FNetGUIDCache::SupportsObject: SplineMeshComponent /Game/Handball/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.BP_Ball_C_UAID_F02F74520411A4F601_1849238799.NODE_AddSplineMeshComponent-0_119 NOT Supported.

waxen quarry
#

is that component replicated?

turbid bison
#

it is

#

ah it must try to replicate the spline and fail ?

waxen quarry
#

Disable replication and see if it still causes the problem

lunar sleet
#

Is this function running in the level bp ?

turbid bison
#

no longer an issue, thanks @waxen quarry

soft lion
#

Just like I'm about to show you

turbid bison
#

Well, now i need to see if all still works ? the object in question is a physic object that is replicated. It seems to still works

trim matrix
#

my bad gamer

turbid bison
#

and since the object does not really have an inner state, all may be good

soft lion
trim matrix
soft lion
#

Wait I missed one

#

This is what it looks like inside the interface

trim matrix
#

so I need to create a bpi, and implement in the checkpoint bp, and then what?

soft lion
#

Then in your for loop

#

You just type the function name and look for it with (Message) next to it

#

call that function and the target is the actor in your for loop

#

As long as it's not self

waxen quarry
#

What? Look at his pictures he already implemented everything as the promp asks

trim matrix
#

do I wanna make a function in the bpi?

soft lion
lunar sleet
#

So much for the challenge

soft lion
#

I'm new to this stuff too

#

I just like trying to figure it out if it doesn't work

trim matrix
# lunar sleet So much for the *challenge*

this "challenge" sucks, imagine if you had no idea how to repair a car, and your instuctor told you "well now that you know what a car is, your next challenge is to repair it" and that's it

soft lion
#

Well

#

if those pictures are what your lesson includes

#

then it does include the answer

#

which is an interface call

waxen quarry
#

He has the interface function already and the prompt doesnt say to add an input. Its supposed to be a basic event.

lunar sleet
#

Reading comp is a good skill

soft lion
#

That's the whole point

waxen quarry
#

Gotcha

trim matrix
soft lion
#

Or

#

hmm

waxen quarry
waxen quarry
#

Ok had to check lol

obtuse kraken
#

Anyone know how to set a physics constraint angular twist to angle of like 30 degrees relative to where the constrained object has been rotated?

#

Like when its released

soft lion
#

You are looping on an array of actors, each of which is an element you can pull off of in that for loop. Drag that element pin off get you a spaghetti noodle and when you let it go it opens the drop down menu of things to type in. Start typing in the function name of the interface function you want to call, and find the one that has the name then (Message) after it. Call that function

#

use the spaghetti noodle off the element pin as the target

soft lion
#

magic

#

try

#

don't forget to hook up the exec wires

#

please

trim matrix
#

it's not setting it to false when a new level start gets set

soft lion
#

That's because you're only calling it in the construction script

#

How about calling it again after the new level gets set

#

Where you gonna put that same function so you get the same results but after the new level start gets set

#

it's the challenge

trim matrix
#

I'm confused

#

it's already here too

waxen quarry
#

Where does this event even get called from?

soft lion
#

Wait you already have it

#

then you can call that one instead of the BPI we just made

#

you already have an interface

waxen quarry
#

lol I tried telling you he had it in there already

soft lion
#

I thought that was his assignment like poster

lunar sleet
#

It’s ok, interfaces can be confusing

waxen quarry
#

What code executes the SetIsLevelStart event?

trim matrix
#

soooo call "event set is level start" inside the "level start validation" function?

soft lion
#

Look what Gold just asked

#

You already have an interface call set up somewhere

#

Wait that's set is level start true tho

trim matrix
soft lion
#

What functions are called when you set a new level start

lunar sleet
trim matrix
soft lion
# trim matrix

That's the actual interface. We're asking you where do you call the functions in your code for all this

lunar sleet
#

Bp_checkpoint

trim matrix
#

I didn't write this code

#

it's the code that checks if I have the checkpoints set up correctly

soft lion
#

Right after you set the new one as the checkpoint

#

Call that function again that you call in construction

#

to loop over all the other checkpoints and set them false

trim matrix
#

through an interface or like, should I get a reference to the checkpoint blueprint

#

cause it doesn't have that function

soft lion
#

No

#

that's the glory of interfaces

#

you can call functions and get values and do fun stuff without casting

waxen quarry
#

More like the downfall 🀣

soft lion
#

No

#

glory

trim matrix
#

which function? it still won't let me call "Level Start Validation"

soft lion
#

Did you put that loop call again after you set the new checkpoint

#

one thing at a time

#

Did that fix that part

trim matrix
#

huh?

#

this is the code currently

soft lion
#

Ok

#

Call LevelStartValidation after you set the new checkpoint

trim matrix
#

where

#

cause it's already here

soft lion
#

Guy

#

Call the function

#

Wait

#

I see what you're saying

#

I don't understand your stuff sorry

trim matrix
#

I tried here too

#

doesn't do anything different

#

it's able to set new level starts, but not set the old ones to false

ancient siren
trim matrix
idle vigil
#

as a beginner to unreal i heard casting was bad because it has the object you are casting to loaded into the memory of the blueprint you are casting in i think? However, for my multiplayer game is it ok for me to cast to playerstate in my gamestate class and vice versa since those two classes will be communicating a lot passing various information etc? My multiplayer game is a strategy card game type so it will mostly be passing simple integer and boolean values in between anyways

waxen quarry
# idle vigil as a beginner to unreal i heard casting was bad because it has the object you ar...

Casting isnt the devil. Overusing interfaces and using them the wrong way is the real devil πŸ˜† Ideally cast to base classes with as few hard references as possible. Dont cast OnTick. What I suggest you do for important variables like the GameInstance, gamemode etc is to cast once and store the references in a data asset. Then create a blueprint function library that retrieves those references. Eliminating the need to cast everytime.

#

Then I can use this anywhere I want

idle vigil
waxen quarry
#

lol good lord

#

The purpose of interfaces is to contractually oblige 2 unlike actors into having the same functionality. For example, a Tree and a Dog. Both eat but in very different ways. Where you would otherwise have to cast multiple times to many types to figure out which has the Eat function. We also have actor components, use those.

idle vigil
#

Yeah i knew i would use it like that too. Especially when a player uses a card in the game, i would just call the 'Use' interface for that card and that card executed whatever special effect it had.

waxen quarry
#

Similar behavior on unlike actors belongs in Components tho.

#

You can make a single component that attaches to any actor with all the rich features of components that interfaces lack.

idle vigil
#

ah makes sense, and then i can communicate with that component of a blueprint from another blueprint if i need to right?

waxen quarry
#

yeah

waxen quarry
ancient siren
#

well the p[layer bp

waxen quarry
ancient siren
waxen quarry
# ancient siren yep

u sure GetPlayerController(0) is returning the host controller and not another player?

waxen quarry
ancient siren
waxen quarry
#

SetViewTargetWithBlend is not a replicated function.

ancient siren
ancient siren
indigo pond
#

hello i was wondering how to replace old input system with enchanced

#

i already got the new input actions from the third person template

waxen quarry
waxen quarry
viscid arrow
#

if anyone has hints or tips/advice on RTS AI (for combat/soldiers) it would be appreciated, especially on deciding which target to attac

waxen quarry
#

Tip - Only allow so many enemies or soldiers to attack a single target at a given time. Otherwise the entire horde could pounce on a single target πŸ˜†

#

Happy to not be useful! 🍻

viscid arrow
#

its a bit hard to do that

#

ai perception on blueprints suck

waxen quarry
#

Have the AI increment the attacker count on the target. If the count reaches a threshold (like 20) then the ai needs to find someone else.

ancient siren
magic parcel
#

This solved the issue for me! ❀️

lunar sleet
rotund barn
#

any idea how the logic gets through a branch like a drew the arrows, even after i set the variable to true (and the "not" makes it false, so it shouldnt be able to go through the true pin there)

dawn gazelle
rotund barn
#

yes thats how its supposed to be

dawn gazelle
#

If both are false, then it returns true.

rotund barn
#

yes i know, i want it to be false if either is true

#

it somehow goes through the true pin the branch even tho i set the variable true

#

i set it here, and it goes through the correct pins here (i made sure)

#

as these trigger powerups, and it the powerup triggers right after i set the variable, connected right after it, and the correct powerups are used, meaning it does go through the set

#

but doesnt the OR with the NOT do the same thing?

dawn gazelle
#

Use a NOR gate.

rotund barn
#

well i also disconnected the gate completely as it was more for future proofing, as ill need the other variable later, but currently one of them does nothing, so i tried by connecting it directly to the NOT and it had the same problem

dawn gazelle
#

False if either is true.

#

Unless you mean, you want it to proceed only if both are true?

rotund barn
#

no no, i want it to proceed only when both are false

dawn gazelle
#

I keep screwing myself up...

rotund barn
#

looking at that NOR graph it seems to be the right one

dawn gazelle
#

So what you have should be correct. The only other reason could be that your values are not what you think they are when that code is running.

rotund barn
#

i may have actually just got it to work

#

ive been trying to fix this for 20 hours

normal badge
#

Hello, i'm very new to blueprints, and i'm trying to update the health of my healthcomponent from my cardinfo(widget). what should i be putting into the object which is giving an error.

also am i doing this correctly? i created an custom event called update health etc.

#

its updating these texts, but the healthcomponent i'm using isnt getting updated yet. and i am guessing i could do it with the update card event

drowsy steppe
#

Hey guys, any idea why my characters won't move? I placed a nav mesh volume and it was working before, a friend of mine changed textures and now they're all stuck

surreal peak
#

Aka where do you create and store it

#

Also why are you trying to update the component from the widget

normal badge
surreal peak
#

Can the player change the health via inputs or so?

normal badge
#

nah i wanna make a cardgame, so all the health attack, name etc is in a data sheet

surreal peak
#

If there is no user interaction in that widget, it almost always should only display data, not mutate it

#

So the Card should get the Component and the health value from it

#

Unless it should only show the default value from the DataTable

#

Then the Component shouldn't be in there to begin with

normal badge
#

thats true

surreal peak
#

If you want to initialize the component to the DataTable value, do it where the component lives

#

Or in the component to begin with

normal badge
#

okay

surreal peak
#

Given you work with more than one person you 100% should.

drowsy steppe
surreal peak
#

Then you could simply check the commit and see what your friend changed

#

Or go one commit back behind their commit and check if it works again

drowsy steppe
#

he changed the map, he worked on it for a day so i would like to avoid revert the commit if i can, that's why i was asking for suggestions

#

as for the source control, is there a way to access the changed file? i'm using github desktop and gitkraken

#

OK, i somewhat fixed it

#

i have another issue, i had this before, my nps get stuck when meeting each other, and they remain stuck. how can i avoid this? i also enabled the navmeshboundsvolume to be dynamic (does this lowers the performance much?) because i need it for my spawned objects, but now the npcs move in a very strange way, i think because they are trying to avoid the very same blocking volume themself are creating on the navmesh bounds volume in real time. how can i fix this?

limber parcel
frank sparrow
#

newbie question.

I have a board game i am making and I am trying to understand what can and cant be replicable from the client to the server.

my goal right now is to be able for the server to see the client click and dragging pieces around the board.
currently, only the client can see when the server does it. no surprise

most of my events are replicable or server ran. but the actual dragging of pieces is a left mouse button press and release event.
here is a snapshot of the blueprint currently.
can I restructure this somehow where the client's actions will update live on the server's side?

hopefully this is informative. if I were to attach a video, the server would move a piece and both screens would show live movement, but switching ot the client, only the client's movement would show, not on the server's window.

lunar sleet
gray lantern
#

Is the only way to refresh a data table by reopening it? that seems jank

maiden wadi
gray lantern
#

All good I'll try that

normal solstice
#

any idea why I cant call this event?

real notch
remote rapids
#

all work good for me but
i want to set that in 3 case so it will do case 0 code

#

i want that to reapet unlimited time
case 0
case 1
case 2
case 0
case 1
case 2
and go on

#

how to do that?

frosty heron
#

This is an exercise you can do. Create a variable, call it counter.
On Button Click -> Counter ++. If Counter > 3 set Counter to 0

remote rapids
#

i create and i call it counter

#

waht to do now?? @frosty heron

#

i didnt understand

rose crest
# remote rapids

you need to put it inside code so every time it runs it will increment counter, and if its >3 then reset it

#

something like this:

remote meteor
#

and enable loop

storm vigil
#

is the character possibly the largest size map for disk and memory, compared to other blueprints? my character is tied to most logic, unfortuable some like the inventory is not a component. So its always refernced. It is currently 1gb, I tried to lower it from 1.3 gb, do you think this range is acceptable for a modern horror FPS games with high end graphics in ue 5 targeted for PC? Thanks

rose crest
#

check asset size map

#

did you try soft object referencing?

remote rapids
#

@remote meteor

storm vigil
# rose crest did you try soft object referencing?

The only soft stuff i am doing is for some icons in the inventory. There was a logic i needed to change which would have used soft reference to my weapons as skeletal mesh, but i needed them to be actors to add attachments so now that gone.

Now I use interfaces, dispatchers and some components, also a plugin called eventdispatcher which is a sort of global dispatcher.
This is actually a base template that i have expanded almost 3 years in the making, unfortunately when i started modifying it i didn't know about optimization, etc. Now I am trying to clean it up, it gets difficult as the refences from each other cant be so complicated trying to locate them deep in the bps and within the bp. Though the package game works ok in medium and high end pcs, i am just worried that adding more environment assets might show the problem, though i am more conscious of the texture stuff now.

remote rapids
random pulsar
#

hey,i want to play walk sound when the player is walking but this is very expensive ,how can i do it cheaper?

frosty heron
random pulsar
#

i found it,but is not just a sound on a frame in animation,its a 2 second sound.Play sound is the only one notify sound?

remote rapids
#

Someone know how to create wheel of Fortune in unreal engine?

rose crest
#

hm, i'd try with cylinder actor with rotator component with 0 rotation rate and apply random rate on activation > timeline to 0 to stop

atomic salmon
#

Or with physics. Constrained cylinder + initial angular impulse to make it spin until it stops due to a bit of angular damping.

rose crest
#

ok, I can't find solution. Any idea how to spawn (drop) multiple items in the world in 1 spot but not make it look like damn explosion? I don't want to set them to ignore itself as I want them to stack on each other in bound boxes etc. Just initial spawn don't make it bursto from physic ovelap

atomic salmon
#

@rose crestsomething like this? https://www.youtube.com/watch?v=bn3aDOA1JXA

Learn how to use the FREE Physical Layout Plugin in Unreal Engine 5 in order to get realistic results for creating rubble, organic rock formations, pebbles, trash, whatever you like, in just a few clicks.

Get EasyMapper HERE: https://www.unrealengine.com/marketplace/en-US/profile/William+Faucher

EasyMapper TUTORIAL: https://www.youtube.com/wat...

β–Ά Play video
rose crest
#

no, I have this one for dropping items during creation. its during play, when Player drops items it spaws multiple actors at in the same place. But It causes explosion because of physic

atomic salmon
#

@rose crestGot it. You could try using some adaptive spawning to ensure there is no intersection and hence push out. Or trace to find a suitable spot where to spawn.

rose crest
#

that's what I was afraid of. I manage to mitigate it with spawn "grow" of item, when it's spawned it grows from 0 to desired size and it mitigates 80% of that burst, it's good for now. In the future I will try to cast box to check if spot is free

atomic salmon
#

@rose crestsay that your volume is W L H, you could divide into a number of smaller virtual volumes each one of which can fit one item

#

Then you randomly pick one of the volumes for each item and spawn it centered in it

#

The physics simulation will do the rest

#

You can also do it by layer, starting with the bottom layer and moving up as it becomes full

rose crest
#

hm, I think I have rough idea, create map of offset/bool and use it as free space marker for items

atomic salmon
#

Exactly. That should avoid the explosion effect

dreamy mountain
#

Hey, so I've got this object reference for my HUD widget, but it always returns none, and I can't set a default value; how would I set this? I have an event I need to call in the widget bp

#

Same for the weapon component from the first person template, I have the ammo count for the weapon stored there

waxen quarry
dark drum
soft lion
#

Then you can use it

hoary junco
#

so, I have a save blueprint that keeps deleting one of its own structs whenever I restart the engine, how do I fix this?

#

or rather I should say is, it's missing until I hit compile on it then it just reappears

#

and I have to go back in and fix all the associated blueprints that write to that struct

waxen quarry
maiden wadi
#

Savegame in BP is hard. Honestly. :/ The amount of extra work you have to do to make a container to hold the data and restore it and do that for every single minor little thing in the game vs simply saving an object as a byte array.

trim matrix
#

hi there, I would like to know if there is a way to not reflect the "game graphic configuration of my widget" in the engine?

#

for example, if I try the function to lower the texture quality, when I exit the emulation, the engine follows this configuration

#

the only way to revert everything to default is to reopen the project

lunar sleet
clear ether
#

ok

pastel garnet
#

Hello Im having an issue with streaming in levels in and out. In this approach I'm using a persistent level loads the menu, swamp etc as show in the 2nd Image.

when I play (I start at the menu level) 5th Image, I have a load game menu that when a slot is clicked sends a request to the game instance to load a level (by name), this in return call an event dispatcher the level blueprint is bound to. this seems to work as expected when loading the initial level however when trying to load back the main menu it doesn't seem to work, leaving the player in the loading screen.

Please find a recording demonstrating this issue.
Note: Recording is of low quality because of discord allowed file size.

teal vapor
#

Hi I'm new to saving. What's your advice on the best way to store all the states of the loot chests in one level so when I return to the level after another level and not have the chests reset to their random construction. Should I save to my Game Instance or to a temporary Save Game slot? Also would saving the chests when they change be best done asynchronously or all at one time when I leave the level? Thanks for whatever insight you can offer. I'm really trying to learn BP as well as I can, so I'm not even gonna go to C++ lol

waxen quarry
#

-If the chests are meant to only persist for the duration of the game, then the gameinstance is fine.
-Save the chests state whenever a player exits the chest or makes a change to the inventory in the chest. Incremental saving.
-Async is fine, if you save the chests incrementally, I doubt you would notice any hitch's if it werent async.
-As for how to save the state im assuming these chests are placed in a level already. Give the chests a guid variable called "ChestID". Generate a random guid for each instances of that chest. Those instances will retain their IDs if you set it in the default settings. Then you can save chest data with the given ID and use that to repopulate all the chests. There are some more advanced techniques with data assets you can do but this is just a starter.

#

ActorTags can also store an ID reference if you want to use that without needing the specific chest type.

teal vapor
silk bay
#

Hello, I have two plug-ins with conflicting components- one requires a game mode (Nice interaction system) and the other needs a widget to work (Narrative 3.) The game state overrides the narrative widget so I can't click anything. Any ideas how I can get the mouse to work when the widget opens? thx!

steel star
#

so the sample/test level i started with had a "sky sphere" which appears to not be a special actor type, its just a static mesh -- and the effect only works if its bigger than the entire space your camera can move within -- but uh is there not a way of doing a regular skybox cubemap sort of thing that doesn't depend on the camera position at all?

#

im fine with how SkyAtmosphere looks, i mostly just want a ground color, which i dont see a way of specifying within it

trim matrix
#

any ideas on what I should be doing to make a spline mesh move along an object I push? The pushaable object works fine, and the spline BP works only in editor, but when trying to attach the spline to the object via adding the BP_Spline as a child actor of the BP_Pushable, the object does get made but the spline functionality seems to not happen.

maiden wadi
# teal vapor Hi I'm new to saving. What's your advice on the best way to store all the states...

On a side note to this. Learning BP is great and something I wish more people who know C++ would aspire to.

But in this specific case, BP is a disaster. C++ allows you to simply save things via their path name, and save things marked savegame in the object which writes the entire object's save data to a byte array which you can then simply restore on the object after reloading the map by finding the object via it's path name and just serializing the array's data back into it.

On top of this you can do this with any object. Chest, Character, ActorComponents, UObjects, GameState, GameMode, etc. So If you know C++, I strongly advise using it here to expose some functionality that you can use in BP instead of staying strictly in BP.

teal vapor
maiden wadi
#

Ah. Fair. πŸ˜„ I mistook what you wrote at the end there as trying to learn more of BP instead of C++. If you ever do start getting into C++ just remember the Serialize function. There are quite a few guides on how to use it. Creating your own simple archive and whatnot. About 60-90 or so lines of C++ can make your life insanely easier.

spark steppe
#

yea but saving/loading isn't what i would advice someone to do first when starting their UE C++ journey πŸ˜„

#

maybe stick to an premade asset like EasyMultiSave or Savior...

teal vapor
trim matrix
fringe junco
#

Im having issues with the general logical flow of my inventory system. Basically it runs like this:

  1. in the inventory component, BeginPlay calls InitData which setups the replicated uobject data containers and compartments (container > compartment(s)). This setups data for any equipped item.
  2. picking up an equipment item sets an item variable that is set to repNotify, which for instance On Rep Tac Rig Item calls Refresh Tac Rig, and that checks the validity of the item var and checks if its data containers exist before rebuilding them if they dont.
  3. picking up an inventory item will call Try Add Item (which runs on the server afaik thru the Interact interface)
  4. hitting tab will open the inventory, which calls Setup UI which builds the UI based upon the relevant data and omits anything that isn't included.
    the problem: when u pick up an inventory item larger then 1x1, as long as U have a backpack it should go in the pack right? but itll go somewhere else and the server will say it was added T_T
#

I think its an issue with calls to Add Item at Index

distant hawk
#

Man this why don't be in here half of time asking questions.

hollow needle
#

Weird bug with Blueprints, not sure is anyone encounter something similar? Basically have detached part of the code which corrupts functionality without giving any error. Deleting some nodes or all of them fixes the issue. But makes overall debugging process totally unpredictable . Basically trying things may actually work, but breaks something elsewhere https://forums.unrealengine.com/t/weird-bug-or-something-different-not-enabled-nodes-affecting-how-the-bp-works/1860848

spark steppe
#

did you delete the print string node to ensure that the print comes from THIS bp?

#

also the output log shows which BP does the print

maiden wadi
# teal vapor <@143471961723371520> I've noticed in my BP for my chests that under the variabl...

Unfortunately it's not. And I really don't know why Epic won't expose a decent system for saving games to BP. It requires very little C++ effort. I guess they're fine with people charging ridiculous amounts for savegame plugins. πŸ€·β€β™‚οΈ Then again they won't fix the Landscape either.

To use that Checkbox you mentioned. You have to be able to call this Serialize function on your object. Like your chest. And pass in an Archive that is set up to pull SaveGame data. Not sure how well you follow it. But like the second image is an archive child that has IsSaveGame = true. Which means it will write all properties with that savegame marker and not every property in the object. Saves a lot of space. The first image then creates one of those archives by taking in a memory writer, which in turn took in the byte array by reference. So when the Serialize function is called, the byte array is passed back out of this function.

What I do after that is I save that byte array in a struct along with some other data like the object's full path name, it's class type, and some other helper properties. Which I can then either find the object if it came with the level or spawn it from the class. Then I just write that byte array back into the object. Which lets me generically save literally any object simply by passing it to this function. I don't need to care if it's a component, actor, etc.

hollow needle
lyric quiver
#

If I have a widget already in the viewport and I then add another, how can I make sure the new one goes behind the older one?

rose crest
#

Is there a way to set nav mesh to auto scale to level or I need to scale it for whatever big it can be in the future? also as I generate dungeons in runtime I'd need to have dispatcher from navmesh when it finish its job, is it possible?

waxen quarry
lyric quiver
waxen quarry
lyric quiver
#

ah thank you so much

teal vapor
steel star
#

willing to bet theres 10+ of those

twin shale
#

Does anyone know why one of these functions would be complaining about being read-only and the other one does not? They both just SetNiagaraParameters

#

I've even tried disconnecting everything from the ApplyDamageType function

lunar sleet
#

Who wrote these functions ?

twin shale
#

Me

lunar sleet
#

The targets don’t seem to be the same. Also have you tried selecting a damage type tag other than none?

twin shale
#

They're both inside of the same FunctionLibrary, which is the weird part. At one point I copied everything from ApplyGlobalNiagaraParameters into ApplyDamageType and I still got the same error. I just tried with all fields populated just to make sure and it still has that error

lunar sleet
#

But why is the first one called NiagaraComp and the other System?

#

Are you certain you selected the same type?

twin shale
#

Just for cleanup. They're of the same type

lunar sleet
#

You made these functions in cpp?

twin shale
#

They're just BP functions

lunar sleet
#

Weird

twin shale
#

I feel like this is some kind of bug

#

There's nothing in this function and it's still displaying this error

lunar sleet
#

Delete and remake?

twin shale
#

I made a new function in the library with the same name and no parameters

#

Wonder if its the name somehow

lunar sleet
#

It’s very possible

#

Apply Damage is an engine function so maybe it’s conflicting

twin shale
#

Weeeeeeeiiiirrrrdddddd

#

New function with nothing to do with ApplyDamage works

#

I tried a few different versions of ApplyDamageXYZ

#

All of them caused an error

obtuse kraken
#

Anyone know how to set a physics constraint angular limit to the current angle of the constrained object? I am trying to make a door stop when no longer being moved and want it to be constrained to the last angle it was moved too. Currently when I constrain the angle, it constrains up to where it’s been moved, but only because I’m widening the constrained angle, not setting a new angle to be constrained to based off the current rotation.

steel star
#

Yea i hit a conflict with the name of one of my function library functions too.

#

With the very same, after-the-fact sort of errors.

obtuse kraken
#

I’ll post a picture illustrating what I want to happen

twin shale
steel star
#

idk but find in files "ApplyDamage" match case, in vs

#

or just try to do 'call function -type applydamage'

#

see if there are duplicates

#

or any at all from outside your library

twin shale
#

None appear for me. Boy this is a weird one lol. It has to be somewhere and I just cannot see it properly

steel star
#

preemptively add My in front of everything :DDD

twin shale
#

Lol I could do that

obtuse kraken
#

Basically I just don’t know how to set a specific angle that’s relative to where the door has been swung too.

#

I currently am able to set a max angle based off the current last rotation before letting go, which stops it from swinging more, but when swinging the door inwards it doesn’t do anything as I am only setting a max angle, not a min.

faint pasture
#

So lemme get this straight, you want to have a door swing, then when it stops, update its constraint to limit rotation between x and y?

#

Might be as simple as calling set constrained components. That'll update the reference frames to be relative to where the things are now

obtuse kraken
faint pasture
#

Why are you doing this though? It makes no sense

obtuse kraken
# faint pasture Why are you doing this though? It makes no sense

I have the player able to move the door with mouse movement in first person like Amnesia. I’m using add force to move the door, and the doorknob is constrained to the hinge. I’m trying to stop the door from continuously swinging when there’s no force being added and I want to have the effect of the door being dampened and slowed down when not being moved.

#

There an easier way to do this maybe?

faint pasture
#

Just give it a velocity motor and it'll dampen it

#

It'll be like the hinge has friction

obtuse kraken
#

Ok, I’ll need to do some learning how to use that setting, haven’t touched it yet

#

Ty

tired tartan
#

how do I append multiple arrays into one

rose crest
tired tartan
lofty rapids
#

looks like you just have to append a bunch of times

dark drum
paper smelt
#

How do i replicate random int in range

dark drum
paper smelt
#

So make 2 cusom events and just put the varuable in the custom event ?

dark drum
paper smelt
#

Really?

dark drum
paper smelt
#

Ok ill try it

dark drum
# paper smelt Ok ill try it

Rep Notify will make it call an event if you need something to happen whenever its updated. Replicated just replicates the value without doing anything else.

paper smelt
#

Yeah Im making a gen erator that turns off in a random time

dark drum
# paper smelt Its not working

At a quick glance, I would say that the Interact event isn't being called on the server. Also, after you've set the delay duration variable, you then need call a multicast event to trigger the delay/material change on the clients.

Having said that, you only need the server to handle the delay and then just multicast the material change. No need to replicate the value at all.

I would also recommend you read through epics documentation on how to replicate using blueprint.

paper smelt
#

It is

#

In my player blueprint

dark drum
# paper smelt

So it looks like your calling the interact function on every client. This only need to be called on the server. The server should then multicast anything that the other clients should need to know about.

paper smelt
#

Alr

obtuse kraken
wraith loom
#

Is there a way to get inherited variables to show up in a subclass's variable list?

faint pasture
#

show inherited variables or something like that

faint pasture
wraith loom
#

I checked class settings and class defaults and I didn't see anything @faint pasture

lunar sleet
empty light
#

Hello mates, I asked this also in the audio part, but not sure where its best, I need set the vector length to my metasound distance but i'm not sure how to do that, any idea ? I've tried to look around for set sound parameter/ set float parameter etc. but can't find anything

steel star
#

so.. the vector length is the distance between your actor and some overlapping actor? well, the origin/positions of them anyway -- and you want to what .. assign a volume to something on your heatbeat component?

dawn gazelle
#

There's another one specifically for audio components too... One of the two will work.

jolly oriole
#

is there a smart design pattern to allow one actor component to delete a sibling actor component (same owner)?

#

If I recall correctly, the owner has to be the one removing its own actor components

#

My best guess is a generic public function on the owner actor that anything can call, but is there a smarter way?

faint pasture
sweet imp
#

Hey guys, I'm trying to add a vector input to my ai for a sort of dash ability, and I have it working correctly with this. I just want to be able to scale how fast it goes, as currently it moves really slowly. I have tried increasing the max walk speed and also multiplied the vector, but this didn't work. Any ideas would be greatly appreciated!

faint pasture
#

what is alpha?

#

alpha should be a 0-1 range feeding a lerp

sweet imp
#

it is just a vector that points in the direction I want the dash to be

#

Oh yeah ignore the name of that lol

faint pasture
#

still why are you adding

sweet imp
#

the vector is correct, I just want to be able to scale it

faint pasture
#

multiply

sweet imp
#

that is so it works relative to the player

jolly oriole
faint pasture
#

ok back up, what is the timeline outputting?

sweet imp
#

I tried multiplying it by a float but it still is the same amount of movement

#

here I'll get a vid 1 sec

faint pasture
#

dont need a vid

#

show what the timeline is outputting

#

show the vector track

jolly oriole
#

screenshot of the timeline graph would be good

#

yeah

faint pasture
#

I'm guessing it's 1,0,0? if it's a forward dash

sweet imp
#

I'm using a vector curve and inputting that into the timeline

#

that all works and isn't the problem though

#

I think it is the add input vector which is the problem

#

I'm not sure what node would be better though and allow me to scale the speed basically

jolly oriole
#

if ur speed is 300 and you add 1 it will be 301

#

etc

faint pasture
#

I'm doubting it does

#

so you'll never move faster than walking with this approach

sweet imp
#

yeah

faint pasture
#

but you won't go faster than walking with this

#

that's the same tapping W, won't do much

sweet imp
#

Wanted it to work as in the speed being able to be changed?

#

because that's the one part that isn't working, the movement does

faint pasture
sweet imp
#

lemme get a video for you, 1 sec

faint pasture
#

The first thing to figure out is if inputs with length greater than 1 do anything

#

I doubt they do

#

you can change max speed -> timeline -> return max speed to normal walking

#

but that's pretty bad, I'd use forces IMO

sweet imp
sweet imp
#

oh and in the video I'm just having it go right at begin play

sinful hinge
#

Hey! Is it normal that I can't access any parameters of AI Perception in my blueprint? I wanted to change the sight radius dynamically but I can't find the node

sweet imp
#

must have done it wrong when I tried it before lol

faint pasture
#

why is homie just walking

sweet imp
#

haven't added effects yet, just trying to get the movement down

faint pasture
#

If it's meant to be a dash I'd not do it through walking but that's just me

sweet imp
#

I mean what I am trying to do isn't exactly a dash, I basically want the enemies to be able to move forward slightly during attacks, like a sword swing would move them forward a slight bit

faint pasture
#

ah yeah as long as it's fine to be walking speed or slower that'll work

#

I'd output a float tho

#

and interp between 0,0,0 and ForwardVector based on that float 0-1 range

sweet imp
#

I used a vector because I might in the future want it to be able to move side to side during an attack

#

So I could do that in a vector curve even if the ui isn't ideal lol

faint pasture
#

ah ok yeah so then you can multiply like this

MovementInput = VectorTrack * (Capsule.Forward + Capsule.Right)

#

assuming capsule is facing direction

#

er wait a second

#

you'l have to do it in local space

#

then rotate it

sweet imp
#

What I have right now is basically I get the vector from the enemy to the player and then just add it and it seems to work fine somehow πŸ˜…

faint pasture
#

I'd instead do it like:
MovementInput = RotateVector(VectorTrack, AimRotation)

#

assuming AimRotation is updated to face enemy or whatever

faint pasture
sweet imp
rugged merlin
#

What's the most convenient way to get the location of one actor relative to the location of another actor in a vector? I see plenty of stuff about transforms, but I don't think that's what I'm looking for (unless I'm misunderstanding it)

rugged merlin
faint pasture
#

DisplacementFromAtoB = B.Location - A.Location

rugged merlin
#

Basically I want the position you would get if the actor I'm comparing it to is at 0,0,0 and the other was somewhere else

#

Would that subtraction do that?

faint pasture
#

do you want the rotation of any actor to matter for this?

#

If you want B's location in A's local space it'd instead be:
InverseTransformLocation(B.WorldLocation, A.Transform)

rugged merlin
rugged merlin
#

Like this?

#

Bottom one is the actor I want to treat as the origin

faint pasture
#

You said you don't care about rotations, so just subtract their world locations

topaz condor
#

what is the equivalent of sequence node in Material blueprints?

#

i need 1 thing to happen or the other

faint pasture
topaz condor
faint pasture
#

It's not a real branch, more like a select

#

but that's what you're after most likely

rugged merlin
#

Thanks

topaz condor
faint pasture
topaz condor
#

i need the material to glow and flicker at the same time

#

its a light

faint pasture
#

first off that should be emissive color

spark steppe
#

lerp between your base color and the multiplied color and plug the result into emissive

topaz condor
#

well ya im trying to connect both of them to emissive

faint pasture
#

and you probably don't want an if, just multiply

#

multiply or add

spark steppe
#

and use your time stuff as lerp alpha (assuming it's "normalized"/saturated)

faint pasture
#

probably multiply. The light glows, and the flickering is the glowness going up and down

spark steppe
#

even better ^^

#

since when does the material editor have vector input fields on the attributes?

#

is that 5.4?

topaz condor
#

yea that did it thank you

#

lol i just noticed that even if it glows and flickers it doesnt look realistic, how can i make both the light and flicker go black and go back to normal

topaz condor
dawn gazelle
topaz condor
dawn gazelle
#

That 1 in the middle there is for emissive strength

#

if you push that above though, it might not go black.

#

It kinda does at 2 anyway πŸ˜›

topaz condor
#

why cant i get the lerp node?

#

is it called something else?

dawn gazelle
#

Linearinterpolate

#

It should show with lerp

topaz condor
#

works like a charm thank you

trim matrix
#

TLDR: Trying to get a Block my character pushes to produce a spline trail behind it. I am getting some odd progress where splines are finally coming out from the box as i push it, but its not the spline component i have attached( Child actor component, BP_CableSpline) some detailed blueprints and functions can be seen here: https://blueprintue.com/profile/saltybadgercubes56/

Every tutorial and forum I find all roll back to splines in editor for making walls/ or moving an actor along a spline, but nothing about moving an object and producing a spline trail behind it as the actor moves.

Any suggestions?

topaz condor
#

beside adding lighting, is there a way to easily see while im creating my map. for example i have a house but when im inside trying to decorate its completely dark

frosty heron
topaz condor
trim matrix
#

I have this assignment from school, I'm meant to update my inventory system to be able to add multiples of an item, and remove mutliples of an item, but as is customary with this instructor he gave zero hints as to how I would do that, no hints as to nodes to use, or what logic needs to be put in place, it's extrememly annoying to be honest, could anyone point me in the right direction?

#

first picture is my add item function, second is remove item

dawn gazelle
trim matrix
dawn gazelle
#

So right now these functions fire a single time when you call them. You might want to create a function that does it multiple times for you automatically, thus giving you a means to add or remove multiples at once.

trim matrix
#

I don't think that's how he wants us to do it. If I understand you correctly that would lead to it still showing up as separate array elements. In his example video it's meant to be one array element (i.e. picking up an apple would add 5 apples to your inventory in one yk firing of the execution)

#

I'm not sure if it helps but we are using a data structure for this, he gave somewhat of a hint in a lecture where he said we would wanna add a third variable to that for "Quantity" or "Amount"

dawn gazelle
#

Ah ok, so then you're basically creating a "stack".
So then each item in your array can be thought of as a "stack" of items with the quantity or amount representing how many are contained in that stack if you've set up your structure to have such a variable.
So when adding items or removing items you're already finding if they're in the array or not, using your "Found Index" value. So then it's just a matter of incrementing or decrementing the "Quantity" or "Amount" variable that resides within the structure at that index and putting it back into the array at the same index. The one node that may help with that is "Set Array Elem" which takes a Target Array that you want to manipulate, the index you want to manipulate, and the "item" as the thing you want to insert at that index.

trim matrix
#

that sounds like it could be what I want to use, any idea where I would put it/how I would hook it up?

dawn gazelle
#

You'd put it anywhere that you need to manipulate an existing value in the array.
If the item doesn't exist in the array yet, you can add it to the array with your desired quantity in the structure already.
If it is already in the array however, you'd need to retrieve the current "Quantity" from the structure, and increase the amount by the incoming amount of items you want to add to it, and then once you've manipulated the structure you can use the "Set Array Elem" node to modify the array, at the index you found, with the newly modified structure containing the new quantity.

trim matrix
#

I appreciate you taking the time to help me with this and explain it to me, but I am having a lot of trouble understanding. I am still very very new to blueprints so it's even more confusing as to why they are giving me this assignment but what are you gonna do

#

basically I have no idea what you mean by "anywhere that you need to manipulate an existing value in the array"

#

I have no idea where I would be doing that

#

everything I have set up right now it just me following along with the lectures

trim matrix
real notch
#

Is there a nicer way to add rotators together?

timber crystal
#

hello guys quick question
This is an ezy enemy spawner
but how can i say that "Hey when that spawned enemy is dead spawn the next" i now that i can go with an reference to that enemy and put an "on destroyed" inside the enemy bp to call again an function that spawns him again but is there no way to to that in that Spawning bp?

dawn gazelle
# trim matrix I appreciate you taking the time to help me with this and explain it to me, but ...

I'm also trying to be vague on purpose as I don't know your knowledge level and I don't want to just give you the answer if it's part of your lessons (heck, you may as well be paying your tuition to me :P)
Your task is to change your structure so it can accommodate a "stack" of items, which is in effect just another value that exists within the structure of your array.
You've created some functions that can already read data about the items in it, add items to it, and remove items from it and you should be able to use these as examples.
So, you know how to check if a particular item already exists in your array and how to get the index of it, so then you just need to manipulate that particular item in your array and increase or decrease the quantity in the structure, and that's where a Set Array Elem node can help.

As for where to use it, the answer is literally anywhere that you need to manipulate an item within your array. You'll have to follow the blueprint logic to know exactly where and when you need to put it in, but it's almost always whenever the item already exists in the array.

real notch
trim matrix
trim matrix
#

the other "get" node is a copy, he said the difference being you can use a reference to alter things in the array, while a copy would just show you information in the array without being able to alter it

dawn gazelle
#

Yep, that's another way of doing it. If you use a "Get By Reference" on an array, you're getting a reference to the values within the array, but this then requires you to plug the output of a "GET (by Ref)" into a "Set members in..." node to manipulate their values.

#

The "Add" when manipulating arrays simply adds another entry to the end of the array, which isn't what you want if you're trying to manipulate an existing entry.

trim matrix
#

thank you a ton, how would I get a set members in... node for this? dragging off any of the 3 pins gives me zero options for that, simply right clicking in open space gives me a million options that don't seem relevant

dawn gazelle
#

You can't split the pin from the get

#

Need to still be the singular dark blue pin.

trim matrix
#

does this look right?

dawn gazelle
#

Alright, getting there πŸ˜„

trim matrix
#

am I goin in the right direction

dawn gazelle
#

You need to click on the Set Members In... node, and you'll see there's some options for the pins you want to show around where the details panel usually is

dawn gazelle
#

Yep

#

You should only need the "Amount" one checked - this then makes it clear that you're only trying to manipulate the "Amount" variable, the others will remain otherwise unchanged.

tough kiln
lunar sleet
trim matrix
dawn gazelle
#

That'll give you the means to access the current values.

real notch
lunar sleet
dawn gazelle
real notch
glossy cloak
# trim matrix

You'll want to modify the value before sending it back in.

trim matrix
tough kiln
real notch
#

Ikr

dawn gazelle
#

All computers know how to do is add.

real notch
#

Another one

lunar sleet
trim matrix
#

that makes sense to me but I'm not sure where I would get the existing value

dawn gazelle
#

You're "GET" ing it already through the Break πŸ™‚

lunar sleet
#

Is this a new challenge Frosty or the same one? πŸ˜€

real notch
#

I did find ComposeRotators

trim matrix
lunar sleet
trim matrix
#

so it's the new value I don't have yet?

lunar sleet
#

One is in cpp what the other one is in bp I imagine @real notch

#

Maybe at this point just try it tho

real notch
#

Obviously will do that πŸ˜„

#

I am looking in the kismet math library, isn't that the blueprint code?

trim matrix
real notch
dawn gazelle
lunar sleet
real notch
lunar sleet
trim matrix
real notch
#

Yeah that was it

dawn gazelle
trim matrix
#

I'm probably not understanding what you are saying but I've been working on this for about 6-7 hours at this point

dawn gazelle
#

OR

#

You could use the "Amount" in your structure.

trim matrix
#

how would I go about doing that

dawn gazelle
#

Doing what?

trim matrix
#

using the amount in my structure, again logicially speaking I know what has to be done, add together the existing value, and the value of the pickup and make that the new value for that array element

#

but I don't know how to do that or where to get those values

dawn gazelle
#

So you're reading the "Item to Add" within your function, so that "Item to Add" would contain the "Amount" that you want to add.

trim matrix
lunar sleet
lunar sleet
trim matrix
eternal geyser
#

hey every one

dawn gazelle
#

You're passing in the "Amount" from the "Item" into your Function, which you can then read.

glossy cloak
# trim matrix Full Sail University

Yeahhh... I have a degree in game art from there. They really don't teach you. I learned more from assigned YouTube videos than my instructors.

trim matrix
eternal geyser
#

i have some struggle trying to make cube rotate forward like on the illustration. i want to precise that the axis presently is at 1(center).

trim matrix
eternal geyser
trim matrix
real notch
#

Frosty gettin frisky

eternal geyser
real notch
trim matrix
# dawn gazelle

so would it be basically the same deal but like, reversed for removing multiples?

eternal geyser
real notch
#

So when it says "another object" you're probably looking for either a scene component, a socket, or origin + forward * radius

eternal geyser
trim matrix
# dawn gazelle Pretty much, yep.

this is my code for removing an item, I would assume instead of false going to remove index it would do the math to remove an amount from the array element, then lead to a branch that checks if it's zero or less, and then removes it from the index if it is?

trim matrix
#

my method might be a bit jank

glossy cloak
#

You'd be surprised how much code in functioning, successful games is straight up jank. lol

trim matrix
#

but I set the subtract pickups as negative numbers, so instead of subtracting them, I'm just adding a negative number, to the existing positive number

glossy cloak
#

I mean... if it works, it works.

trim matrix
#

however upon testing just now, it doesn't remove the array element when it reaches zero like it should

trim matrix
#

fixed one problem, made another problem

lunar sleet
#

That is gamedev

glossy cloak
#

Probably the most accurate depiction out there, really.

trim matrix
#

anyone know why this isn't working? It's supposed to be able to remove items, including multiples, but if removing an item would leave you with zero or less it's not supposed to allow you to pick it up

#

I should clarify, currently I can remove items, but it currently removes the entire array element regardless of how many I have

real notch
#

I need to find a vector, which is the direction between a static mesh's origin and one of its socket. This is easy (socket - origin), but I need to find the vector after applying a rotation, without actually applying the rotation to the mesh. So I need to pretend it happened, and get the socket's transform in this new rotated space.

atomic salmon
#

And apply to it the same rotation the origin will get

real notch
#

I can subtract quats though πŸ€”

atomic salmon
#

Delta Rotator

real notch
#

I had no idea that existed, that's useful thanks

#

Oh excellent! That does exactly what I want

#

I have a bunch of meshes I prepared, and each mesh needs to become a blueprint (BP_Part) with the mesh set in a specific component (something that extends static mesh actor). Is there a way to bulk create assets through code?

gray lantern
#

how would you go from object reference to asset data? its for a editor widget, just not clear how to change

trim matrix
#

I'm making a door that only opens if you have x amount of a key, how it works is you go to the door, if you have enough keys it'll open, if you don't it'll show a message telling you that you don't have enough keys. Currently the door opens with any amount of keys, you could have one and it would work, I'm trying to set it to 3 or higher

#

could anyone help me out rq

frosty heron
#

From there it's just check if ammount >= 3

trim matrix
glossy cloak
#

You're checking if the item quantity is 0. Where are you inputting a number that you want it to check?

frosty heron
glossy cloak
#

If putting a 3 into the "Has Item" function isn't working, then your Has Item function isn't working correctly, and that's your problem.

trim matrix
dark drum
glossy cloak
frosty heron
#

You should use class instead of string too

glossy cloak
#

Your "HasItem" function is only checking to see if the item exists. So it doesn't care how many there are. The Find Item could return an amount, then you could check it there.

graceful sage
#

does the bp debugger freeze the editor when searching for anyone else or just me?

dark drum
# trim matrix

What I would do in this function is if the item is found, get the quantity for the item and return it. That way the function has two uses. In most cases when checking if there is an item, you normally need to know how many there are so you might as well do both in the same function.

trim matrix
glossy cloak
graceful sage
#

im not doing any breakpoint. just when I have the bp debugger open viewing my character and try to type anything in the search it freezes the editor and memory leaks

glossy cloak
graceful sage
#

yeah its quite annoying

trim matrix
#

this is what I came up with myself

glossy cloak
#

Not qute.

#

On the "FindItem" function you need to output "Amount" or just have it output the actual item it finds.

#

Then you can compare that against the amount in the ItemToCheck input.

steel talon
#

Hi guys, I hope there is someone who can help with my problem. I'm creating an online game with Steam multiplayer (I've already added the multiplayer itself and everything works correctly), it just so happens that my project is actually an online concert, so I have a lot of lights on the level, and they all work through the sequence, so who can help me with how to make sure that when I created a server, started the sequence, after that the player joined, and that HE STARTED the SAME sequence in the HIS game automatically ,
but from the place where he is already playing in my game. Here is how I have it implemented now, but now it works only when I start the sequence when the second player is already on the level, help pls

dark drum
# trim matrix

I use uobjects for my items but the general processs should be the same.

Find if the items is in the inventory, if it is, return true that the item has been found and return the quantity found in the item object.

dark drum
# trim matrix

as an FYI, you're just returning the same amount value you pass in. You should be getting the quantity from the invetory and returning that.

glossy cloak
trim matrix
#

I could try copying it but I imagine it would not work for me

dark drum
trim matrix
#

I just followed my instructor on this one, he didn't explain how it worked or why we were doing certain things

#

hopefully next month I'll have a better instructor

glossy cloak
#

Yeah. In that function, if it finds the correct item Name, then you can either store the entire item struct as a local variable, or just the amount, then output that in the return node.

#

THat way if the item is found, you can also get how many there are and compare that in your other function.

dark drum
frosty heron
#

Who's your instructor wtf

#

Clearly not qualified

worthy jasper
#

At least the wires look nice πŸ˜‚

dark drum
# trim matrix

If it helps, the screenshot I show you is the equvilent to this.

glossy cloak
#

I mean... there's nothing wrong with the way that function is set up.

trim matrix
trim matrix
glossy cloak
#

Your instructor did fine there. But if you're required to use that function, unmodified, then there's no way to check an amount.

frosty heron
#

Using string is deffinitly not okay

#

But oh well

worthy jasper
trim matrix
frosty heron
#

Anyway you will learn most by your self

glossy cloak
#

Then yeah. I'd just modify the function to also output the amount of the item when found.

#

Also instead of doing a for each loop with break, whenever a return node is reached in a function, it terminates the function. So you can just return if it finds the item.

#

But a break works the same. Just extra steps for no reason.

trim matrix
#

so by modify

#

is there any chance

#

it's as simple as dragging the "Item to find amount" to the return node?

dark drum
trim matrix
glossy cloak
#

This is how I would do it

#

Oh. Lol well...

dark drum
trim matrix
glossy cloak
#

That's a good sign. XD

#

I'm using an existing inventory struct I already have in my project.

#

And not returning the index. Though you might want the index to modify the inventory outside of this function.

#

So you could use the index to say "remove this item" or to modify an array element.

dark drum
trim matrix
glossy cloak
#

Especially when looping through potentially hundreds of items in an inventory. - A name variable would be better than string

dark drum
glossy cloak
#

If your instructor used a string, then just keep using a string for this project.

#

But for future reference, name is ideal for ItemID's and such when you don't need to localize the values.

#

Localize meaning translate to other languages.

dark drum
glossy cloak
#

Right right.

trim matrix
glossy cloak
#

You should be able to.

#

Granted, I'm in UE4. But I'm pretty sure you can still use == in UE5

trim matrix
#

I can only do equal exactly

#

would that be an issue

dark drum
trim matrix
dark drum
# trim matrix just to make sure

Yea that looks fine. As an FYI, returning on the loop body of a loop stops the rest of the loop from finishing meaning there's no need to break. πŸ™‚ If it gets to the completed, we know it never found one and does the other return.

trim matrix
#

I got an error that Return Value no longer exists in 3 areas

glossy cloak
#

Make sure you compile the BP that function is in.

trim matrix
#

should I be feeding in a return value in the code somewhere

glossy cloak
#

Well remember to check wherever that function is called to utilize the new amount value you made.

dark drum
trim matrix
glossy cloak
#

You can simply connect the correct wires there to your newly named return value. Or right click and refresh those nodes.

#

It's just because you changed the name of the output, so those BP's aren't recognizing them.

trim matrix
#

Index I'm guessing

dark drum
trim matrix
#

the fixed it

#

so I shouldn't need has item to output an amount anymore right?

#

or do I still need it to

glossy cloak
#

Has Item should probably do the amount check itself, then output whether or not it has enough of the item.

trim matrix
#

like this?

glossy cloak
#

Perfect

trim matrix
#

omg the door workd

#

I can sleep

glossy cloak
#

Lol

#

Your door works. Now I can sleep.

trim matrix
#

Kindred, pattym, you guys are real brothers

#

I would kiss you if I could

dark drum
glossy cloak
#

Mwahaha

trim matrix
#

nah I fr love you guys

#

without you I'd be up for another few hours or so

dark drum
#

I think inventory systems aren't to difficult once you understand it's just data with functions to manipulate said data. The hard part is the UI and having it update the way you want.

frosty heron
dark drum
frosty heron
#

cuz you will have to construct them at some point.
Atm I just use Struct, which saves to SaveGameObject

#

Yea for Inventory Items.

dark drum
# frosty heron cuz you will have to construct them at some point. Atm I just use Struct, which ...

I have a world item BP that you specify the item class (uobject) that it pulls data from to specify how it should look. The world item constructs the uobject if it doesn't have one. (I might move this logic somewhere else though)

When the item is picked up, it adds the uobject to the players inventory (an array of the item uobject) and destroys the world item BP.

When it comes to saving, you just have to loop through the uobjects and extract the data that needs to be saved. Generally, this is just the data that would change. Unless you have really dynamic items, this is normally just the item uobject class and the quantity.

#

This is the bulk of my world item bp. Still a wip but I can't see it changing to much. (There is some testing logic on begin play though lol)

dark drum
# frosty heron Thanks

You just have to make sure the item uobject is referenced somewhere or it might get GC'd lol.

frosty heron
dark drum
#

I like being able to have functions on the item uobject that allows me to manipulate it's data as it means you don't need access to an inventory system that would normally have the functions.

timber crystal
#

hey hello friends why my actor is not moven anymore after "spawn actor by class" his movement is working with the event tick and usally it works perfect but did i miss something? to give him an ai controller or smoething back after repsawn?

#

he doing his attacks when im in his area but do not move

#

handle movement is calling by event tick

#

SOLUTION:

frosty heron
# timber crystal SOLUTION:

if you are spawning an AI, you should use Spawn AI node, this should create and assign the AI controller declared in the bp

#

SpawnAIFromClass

timber crystal
dark drum
#

Does anyone have any idea why the mass of a physics actor doesn't seem to make a difference in terms of how it reacts when the player walks into it?

blissful moat
#

Hey everyone, is there something like a blueprint macro library that also holds variables?

maiden wadi
#

Though you can also just make a BP library function that passes back a hard coded value. πŸ€·β€β™‚οΈ

real notch
#

I think I might be stupid. How do I apply the offset of a socket to its static mesh? I need to move a mesh somewhere, but it needs to be rotated/moved so it moves by its socket instead of its pivot. Basically plug/socket but it has to be a transform.

waxen quarry
drowsy steppe
#

Hey guys, i have a problem i can't seem to fix. In my managerial game i have npcs and:
1 - they do not avoid each other, even with rvo avoidance activated
2 - i need my navmeshboundsvolume runtime generation set on "dynamic" (is this more expensive than static? by how much?) but i toggle it to dynamic then the npcs move in a very strange way, creating a hole in the navmesh and triggering themselves (i guess)

Any idea how can i fix this?

real notch
#

Also you can't attach 2 sockets as far as I know?

maiden wadi
drowsy steppe
maiden wadi
#

You can place one in a level where there's a navmesh and then edit it's instance components until it's not blocking the mesh.

#

It should not delete an area of the mesh but recolor it.

drowsy steppe
#

Could the problem be the same reason why they bump into each other and they do not try to avoid each other?

maiden wadi
#

The recolor happens at runtime though with some of the avoidance stuff you won't see that until playing.

drowsy steppe
maiden wadi
#

Also on the note of dynamic vs static, there isn't a specific comparison. Of course static is cheaper as it doesn't ever regenerate at runtime. You can still nav area it I believe, but the mesh itself will not regen. So new blocking volumes will not regenerate the mesh. Regeneration cost is relative to how big the area is and how big of cells you have. More granular means more cost and time to regenerate. Just depends on the game and necessity.

remote rapids
#

someone know who to create a while of fortune in unreal engine?

drowsy steppe
#

Do you have a suggestion on which components should i take a look at in the attempt to fix my issues of npc bumping into each other and making a hole through the navmesh?

dusky cobalt
#

Hey guys, I'm doing research past 2 days what is the best approach currently to do fog of war type of thing in ue5? Niagara? Texture Render? Setting everything not visible and making it visible on overlap? Any good ideas?

maiden wadi
drowsy steppe
#

thanks, i really appreciate it. i tried setting them the same as the other character i'm using but still not working. i'll keep trying. unfortunately i'm not expert in those things

#

OK i fixed the nav mesh problem. a child component had navigation generation activated. i don't know how i missed it

#

Now I just need to fix why the npcs keep bumping into each other

maiden wadi
# dusky cobalt Hey guys, I'm doing research past 2 days what is the best approach currently to ...

This is a more complex question than it originally seems. FOW is a very distinct two parts. Visual and functional.

Visual is of course your PostProcess. This is how you visualize the darker areas. People generally do this by writing the areas to a render target. One great way to do this is via niagara as it can do HLSL on the renderthread to draw to the RT faster. You can do this however but the general idea is the same. Make an RT that you can read in a post process material.

Functional is the gameplay aspect. Where you actually show and hide an actor based on much simpler checks, usually in most RTS style games this entails a distance check, sometimes a height check, and sometimes a cone check. Simpler games can do this on the gamethread, but it's common to make a new thread that spins to update this data as you can end up with thousands of elements in some games. The idea here is fairly simple. Iterate over every actor. If it's owned by the viewer or in the same team then it's visible. Else check if any owned or allied actor can see it. If yes, it's visible, if no, it's not visible.

There are ways in a singleplayer game to do this well using only the RT and reading from it but it's not a good idea. The reason is that this gets a lot more complex for networking because you are required to separate these. You can't rely on the renderthread stuff because if you're making an online game that can be ran through dedicated servers. Dedicated servers have no render thread started. Which means no niagara, no RTs, which is where the heavy checks on the third thread come in.

If you do not mind a singleplayer only limitation, or you want an entry point for the visual at least. I would recommend checking out Ghislain Girardot's BP only implementation. https://www.youtube.com/watch?v=exJqcDWgz00

Worth noting that even he says it's very sketchy here. But for a singleplayer game it'll suffice. πŸ˜„

dusky cobalt
drowsy steppe
maiden wadi
halcyon flower
#

Is there a way I can get all children classes of a parent class without spawning actors. I want to make a shop system that sells all children of my helicopter class and I just want to get all the children classes to get the class defaults. Does anyone know how to do this?

full zinc
#

hey,
can you help me debug this. I have an enemy actor, that I want to move from left to right, but right now it looks like they're rotating around a point when they reach the target location (moving the aimoveto node).

granite elk
#

does getting the length of an array also return unfilled indexes?

waxen quarry
#

Unfilled indexes dont exist. Maybe you're thinking of an object reference array with invalid references. Yes those count.

granite elk
#

thank you thank you

#

Love your discord image by the way

waxen quarry
#

Thanks, conker is awesome!

faint creek
#

Hello guys, I'm making a simple AI system with the PawnSensing. The issue is that, when the player go out from the Perphal vision angle, the AI instantly stops to chase the player, freezing completely on its local position. So how can I fix that? How can I avoid this? Could somebody help me please?πŸ™ˆ

maiden wadi
# halcyon flower Is there a way I can get all children classes of a parent class without spawning...

Not really. This isn't something you should do in most projects for a couple of reasons. Can you get a list of all children of something? In C++ the answer is yes. Of course.

But your first issue is it also requires that the class has been loaded. If it's a BP class this isn't always the case and so it can be missed.

The second issue is that sometimes you might make classes for testing but not actually want them in game. And adding more properties and more switches in your gameplay logic for this is absolutely dreadful and tiresome.

Realistically you should consider making yourself a data asset that houses an array of your classes you want. Even better would be a list of data assets soft referencing the class, with the data asset housing all of the data you need. Then you don't even have to load the class until it's necessary for gameplay.

steel talon
#

hi plz help i need a sequence that starts when f1 is pressed on the server while it is running in parallel with the client game i am using steam multiplayer and i want everyone who has already joined the server to get the sequence at the same time but also those who joined already after starting the sequence, they could join and see the sequence from the same place where the server sees it when the client joins (ie if I started the sequence at 20 00 and the client joined at 20 15, then for the client to see please wait 15 minutes at this point) see what I did please tell me what's wrong and why the sequence doesn't start at all if you join from the main menu but if you start from the level it should work sequence, then it starts itself, and only on the server(first two photos from game mode third from character)

wary axle
#

so i made a door opening/closing blueprint but realized that when you spam e, it skips the slow opening/closing animation, how can i fix this

lofty rapids
#

maybe put a boolean at the beginning that you switch off, then back on on finished ? @wary axle

#

it would make it so the you couldn't spam it while it's opening/closing

faint pasture
#

I'm doing a line trace approach. So the visible areas are enclosed by polygons.

dusky cobalt
# faint pasture

Oh that does look amazing. Is there any documentation how its made?

faint pasture
# dusky cobalt Oh that does look amazing. Is there any documentation how its made?

Here's the documentation.

  1. Come up with a set of triangles in world space that corrosponds to your FOV. In this video I just shot rays at corners, my current approach just shoots a lot of rays in a circle.
  2. Draw those triangles to a render target.
    3a. Use that render target in the post process (the light and dark area)
    3b. Use that render target in the enemy material (masking)
#

The example was all BP btw. I have a C++ plugin I'm working on.

wary leaf
#

How do I make an actor follow along a raycast line rotation wise using the start and end vector points ? Should I use the Normal instead ? (Isn't Normals only surface related ?)

maiden wadi
#

Player Controller doesn't really have a velocity. It's possessed pawn might.

steel talon
#

hi plz help i need a sequence that starts when f1 is pressed on the server while it is running in parallel with the client game i am using steam multiplayer and i want everyone who has already joined the server to get the sequence at the same time but also those who joined already after starting the sequence, they could join and see the sequence from the same place where the server sees it when the client joins (ie if I started the sequence at 20 00 and the client joined at 20 15, then for the client to see please wait 15 minutes at this point) see what I did please tell me what's wrong and why the sequence doesn't start at all if you join from the main menu but if you start from the level it should work sequence, then it starts itself, and only on the server(first two photos from game mode third from character)

steel talon
lofty rapids
#

just watch out cross posting i think it's against the rules

#

so pick one or the other

#

also spamming

#

when looking for help patience is needed, there may not be anyone around or even anyone who knows the answer to your problem or even can help in any way

dusky cobalt
brazen pulsar
#

for some reason, when opening the level, it'll pick a random spawn point instead of the one specified.

brazen pulsar
#

Options/ player start tag

#

Is that not how to do it?

maiden wadi
#

If that doesn't work. An attempt at something like this might also work ?TestVar=TestValue#PlayerStartTag

brazen pulsar
#

I don't really know how to do non-visual scripting

maiden wadi
#

I meant for you to do that in the options part of OpenLevel

brazen pulsar
#

What's that?

#

oh, on the node

#

like that or like this?

#

tested the latter and it works

sullen swift
#

Can you please help me, after a restart ue5, if the widget is not attached to the null one (which was added first to this widget) lost links

somber elbow
#

Hey Guys! I'm working on a scoring system for my doodle jump game here and its almost done. The problem is that every time the player cross "add score point" line the score point is added each time. But should be added only once the player crosses the certain line. Right now the player can just stay on the certain platform and keeps jumping which looks like a bug. What is the better solution here?

lunar sleet
somber elbow
#

yep

lunar sleet
#

Then just add a Do Once node to your function call

#

It’ll only run once per runtime per instance

somber elbow
#

doesnt work, i tried

lunar sleet
#

With the event that actually calls that

lunar sleet
#

Ah had a feeling you would do that

#

You want the DoOnce node outside the function

#

Not in it

#

Put it right after the overlap event

somber elbow
#

oh

#

on it

somber elbow
#

Thanks man!

gray lantern
#

Does this function go through and check every row of the data table? or is the data structure different?