#blueprint

1 messages · Page 337 of 1

frosty heron
#

use timeline?

#

you are just fading a light

robust lance
#

this is working now while im prototyping. when im porting into c++ ill use my tween plugin

#

question, using the function (forget the exact name) to get the world delta seconds

#

is it any less accurate than using delta provided from the tick event?

frosty heron
#

The delta seconds from the tick function will be dependent on the actor not the world.

#

you can change the time dilation of each actor, so yeah it can be different.

#

but if you never touch it, shouldn't matter.

robust lance
#

ok cheers

#

https://youtu.be/wYx0DeuPlOY?t=247 << next oldschool game on my list of inspiration

Played on a PAL copy of the game.

00:00 - Start
00:29 - Classic
11:50 - Rankings

Wetrix is a 3D puzzle game, created by Zed Two (now Zee-3 Digital Publishing) and sold to Ocean Software in 1997 for publication on Nintendo 64 in 1998. The game was subsequently ported to personal computers running Microsoft Windows 95/98; to the Sega Dreamcast, ...

▶ Play video
#

i think i would turn this into a micro rts game. resources as the puzzle aspect and unit management on the ground

#

like age of empires, but the resources come down as the puzzle, water, food

#

trees

#

then manage your ground units to farms those resources

modern horizon
#

How can i extend a bone/joint (or group, wtv) to a specific location?

tough badge
#

Does anyone know what this warning means? "BeginDeferredActorSpawnFromClass: can not spawn an actor from a NULL class".

#

I try to spawn an NPC, and it spawns but this warning shows up in the log

frosty heron
#

Ctrl + shift + F and look for every node that spawn

tough badge
#

I know which node it is, but it's manually defined so I'm not sure how it's null is the thing

frosty heron
#

so if you delete the node, does the warning dissapear?

tough badge
#

yes

frosty heron
#

show screen shoots

tough badge
#

In the gamemode I call this event after a bit of time has passed

#

This is the gamemode, the timer is connected to begin play

frosty heron
#

and the value of ClassToSpawn?

tough badge
#

Manually defined as the NPC I wanna spawn

frosty heron
#

by manual do you mean you select using the picker tool or do you set it somewhere else?

tough badge
#

I set it in the variables details

#

I was just setting it manually in the spawn actor node but changed it to a variable to see if it was valid first and they still spawn but the error remained

frosty heron
#

I never seen the warning, are you sure it's not caused by some other dangling Spawn Actor node where the class is not specified?

#

for sanity check, ctrfl + shift + f and type spawn actor

tough badge
#

Positive, it shows up in tandem with spawning this npc's spawning

#

I spawn 5 of these the error shows up 5 times

#

I'll try that

#

Yea nothing pops up

granite nacelle
#

I need help with destroying a spawned bp projectile when it collides with anything in the world but I cant figure out why its not working

frosty heron
tough badge
frosty heron
granite nacelle
#

I didn't even realized it, but the issue is even when its not there the projectile dosent get destroyed, it's being spawned by an enemy

frosty heron
#

you have to go past the branch

#

set the right condition

#

e.g what actor / component the projectile meant to overlap with.

#

if that still doesn't work, you will need to check your collision settings.

granite nacelle
#

My thought exactly I'm not sure what Collison preset to use, also the print string says that the object gets destroyed as soon as the enemy throws it

frosty heron
frosty heron
#

The only time I get the warning is when the class is null.

granite nacelle
frosty heron
tough badge
frosty heron
tough badge
#

Spawning anything else the error goes away

frosty heron
tough badge
frosty heron
#

we spend most of our time debugging and it's a pita.

#

just chill and keep going forward.

granite nacelle
tough badge
frosty heron
#

you don't want it to be destroyed at the barrel of the owner's weapon.

#

OverlapEvent -> If OtherActor != Owner then do your destroy logic

tough badge
glossy crag
#

im having issues with my dialogue system

#

this is my dialogue component

#

i use it with a typewriter effect BP

#

how can I have it so that it doesnt loop dialogue after its finished

#

I want it to get rid of the widget if the player exhausts dialogue

#

tried making a ref to the UI widget and removing from parent but it didnt work

frosty heron
#
  1. Make sure the projectile have the right collision settings for the thigns it want to overlap with.
  2. On the projectile overlap event, make sure it doesn't do anything when the overlapped actor it the owner's of the projectile.
  3. Profit.
granite nacelle
frosty heron
#

normally the culprit is the owner's mesh. E.g the weapon barrel.

chilly crane
glossy crag
#

I figured out how to make it end overall but

#

the player cant re-interact

chilly crane
# glossy crag

You need to somehow break the loop. From what I can see here what is happening is that as soon as you incrememt the dialogue to the last stage, you reset it to zero, in which case when it checks next time it will just start from the beginning again

glossy crag
#

It wont let me without it just preventing interaction

lunar sleet
glossy crag
#

i might iust be out of luck with how i set up my typewriter effect

#

tried to figure out how to go to next dialogue if F is pressed again but couldnt get that either

lunar sleet
#

It doesn’t contain anything

#

You need to actually create the ref properly. The best place to do it is when you CreateWidget, from the return value and save that variable

#

Then it’ll actually contain your ref

glossy crag
#

oh

#

is my approach right otherwise tho?

#

im in bed now so ill test tmrw

lunar sleet
#

Yes remove from parent usually works

#

Hard to tell in your context tho, not all the code is shown

glossy crag
#

hoping it ends up working; this is my first ue5 project and it was extremely convoluted to find a working typewriter effect tutorial

#

here i have some more full SCs on my phone

#

excuse the typewriter BP, it is horribly organized cause the vid i got it from was just as bad and i havent organized it myself yet

#

ignore the E pressed in the TP char blueprint

#

that was for my first go around at dialogue

lunar sleet
# glossy crag excuse the typewriter BP, it is horribly organized cause the vid i got it from w...

Avoid spaghetti noodles all over your code. Write it in an organized fashion so it can be easily read at anytime by you or anyone. Use reroute nodes and don’t be afraid to promote return values to variables and then GET those variables at anytime so you don’t drag noodles back and forth across the screen. Same with execution pins. If you need to go back and run it again, make it a function or an event and call said function/event as needed.

#

Don’t be one of those “I’ll organize it later” folks because that method is very prone to bugs since you can’t see wtf is going on at all times so you can easily make mistakes. Organize the code as you write it, unless it’s a few nodes you’re testing here and there

#

Also watch the blueprint communications video in this channel’s pins so you can actually understand refs and bp comms properly, else you’ll only think you know how they work and you’re likely to misunderstand it all as we all did at one point

glossy crag
#

gotcha, ill take a peak

#

would the solution to advancing dialogue with F key / exiting dialogue at end and allowing player to re interact solely be in the dialogue component though?

#

my brain has me thinking its somewhere in the giant type writer widget blueprint but thats just for the widget and display

lunar sleet
#

Not sure but if you’re gonna remove from parent and destroy the widget make sure that whatever code you still need to execute is not in the widget

maiden wadi
frosty heron
#

@maiden wadi thanks for the help the other day. I am still working on the prototype.
Trying to workout how to make the exit more graceful when more than 1 boxes needs to dissapear.

maiden wadi
#

I'd probably just try an "if 0 items, don't bother updating the widget and just play some sort of fade out anim".

#

Looking nice though. 🥳

teal tendon
#

Is this a good way to create "time move only if you move" from SuperHot. By default, global dilation is set to 0.055 and if the player moves I set it to 1. If no what should I use .

#

If yes then how do I integrate the interaction system since global dilation would affect event ticks as well making the traces fires vary based on the dilation and there is no custom dilation in components.

#

How would I find work around this? I tried to create my own tick function that would be unaffected but failed.

maiden wadi
vagrant fog
#

Is there a better way for me to do this?

My intent is to cycle through hair options for Character Creation using a UI button.

I have all of my hairs in a Data Table, with rows named HairStyle_0 -> HairStyle_37.

I have 2 nearly identical functions, NextHair and PreviousHair (only difference is "Gets Current Hair Style and Subtract 1 is Get Current Hair Style and Add 1 in my other function)

Is there anything I can do to make this better? Right now the only "issue" I'm seeing is that if I add any additional hair styles, then I'll need to go into both of these functions and increase the Clamp (Integer) Max value - but that seems rather minor if I'm being honest.

frosty heron
#

Typing them one by one is a straight no for me

maiden wadi
# vagrant fog Is there a better way for me to do this? My intent is to cycle through hair opt...

The primary thing you can do to make this better is not make it in Datatables. If you use DataAssets, specifically PrimaryDataAssets, you can make an entry in the asset manager and simply pull all hair style data assets for the UI and keep an array of pointers to them and just next/previous like you're doing now. And at that point adding new hair styles becomes simply adding a new data asset. This has an added benefit of also allowing modders later to add data assets as well and it magically just working.

frosty heron
#

you want to make a system that scales up without any tedious work.

vagrant fog
frosty heron
#

wish I know better back then crying , stuck with DT for my hair picker for now.

maiden wadi
# vagrant fog Oooh. I see. That does sound better.... Hmmm... Guess I'm off to the youtube to ...

One of the best ways I've always thought of them is that they are like StaticMeshes. A static mesh is only one class, it's defined to hold vertex and material data for a mesh that you import. But you use that same class with different instances, one instance being a wall a second instance being a bucket, etc. Your data asset class defines the kind of data your asset needs to hold. Instead of vertex and material data, it holds a static mesh or a Groom asset reference in this case and maybe display names or icons. You create a class first and make the empty text for display name, the pointer for groom or static mesh and then you make instances of that asset for each hair st yle.

maiden wadi
#

At the very least, it's great practice for data reworking.

vagrant fog
#

Gotcha - yeah, that sounds way more scalable, as I was hoping to use a similar system for my armor/weapons as my hairstyles

Seems like Data Assets are the way to go in that regard.

(If I'm understanding right, it would mean in my Data Asset I'd define everything similar to how a structure can be used to define a data table, then I would just create instances of that DataAsset and those assets would essentially be the "Rows" that I had previously created)

teal tendon
maiden wadi
maiden wadi
#

How not to make floating text with icons, if you have a rotating camera.

lofty rapids
lofty rapids
maiden wadi
#

Game I'm currently playing. They have a bunch of icons for things happening, which don't rotate with the camera. :/ Looks stupid unless you specifically play at one camera angle.

lofty rapids
#

lol

maiden wadi
#

Cause they did it probably on a card, instead of like UI drawn to screen projected over a location.

lofty rapids
#

it looks weird the numbers are doubled ?

#

atleast with games i think people tend to overlook a lot of things

#

"its just a game"

#

but personally i would be really annoyed if something i was working on looked like that

maiden wadi
#

In this case, I've actually seen people argue for this kind of design. It's graphically optimized. Elder Scrolls Online does a similar thing for their nameplates, and it gets blurry if you use anti aliasing.

But it's a stupid thing to do. Drawing UI is exceptionally cheap. You can literally draw dozens of thousands of icons and text for almost no time at all if you do it simply and are careful with your cache alignment.

#

Kind of an old style thing that remains because there wasn't a good option 15 years ago.

lofty rapids
maiden wadi
#

It'd be nice to know what class that tick function is in. Cause ticks not running every frame only usually happens if you have them set to run every n seconds.

teal tendon
maiden wadi
#

Does it have a non zero setting for tick interval?

teal tendon
#

Is there no option besides using 0?

lofty rapids
#

set timer usually is what i use if i need an interval

maiden wadi
maiden wadi
lofty rapids
#

honestly i do so much on tick

#

idgaf

#

i just use it and abuse it

#

and it never gives me problems

maiden wadi
#

It's infinitely easier to optimize a working prototype than it is to make a first draft with perfect performance.

teal tendon
#

Alright. Thanks for the help.

lofty rapids
#

it's good to just do whatever you can to improve the performance in the tick

#

and worry about it when you start getting issues

#

move some code to c++ usually solve this problem

wispy coral
#

Is there a way to spawn a new actor and bind event dispatchers to it before its actually spawned ?
My issue is that when I spawn my projectiles, if they are already inside the enemy's hitbox, they instantly trigger the On Component Begin Overlap event, before the event dispatcher assignment runs.

maiden wadi
#

Not in BP. Though it's an easy enough fix to check if it's overlapping on beginplay.

lofty rapids
wispy coral
lofty rapids
#

you can run a custom event in the actor, that runs when you overlap

lofty rapids
#

so the event in your actor that is spawning, will just run when the overlap fires, this is basically the same thing but it's just premade

maiden wadi
#

It would also be better if the projectile handled it's own overlap stuff. The weapon's job is to create projectiles. The projectile's job is to overlap and do damage. The weapon shouldn't have to care about the projectile's job.

wispy coral
# maiden wadi It would also be better if the projectile handled it's own overlap stuff. The we...

The reason I wanted the weapon to handle the "projectile's job" is because I wanted a weapon that can do multiple things

For example, I shoot a grenade, when it hits it splits into smaller grenades, when those explode spawn smoke cloud.
If I want to create chain reactions like that I can create each piece and put them together in however order I want and they can do different things when they trigger.

Similar to how UI elements have a onClick(), onHover() etc functions and you assign logic to those events instead of creating a different button for different functionalities

glossy crag
#

I'm still struggling to find a way to properly get this to kick the player out of dialogue when exhausted... I watched the vid in pinned and tried to remove from parent but it still just didnt allow them to ever interact agasin

maiden wadi
glossy crag
#

im losing my mind trying to figure this out

#

ive been trying to follow tutorials but theyre all completely different

#

and none of them are integrating the effect i want or explaining it

lofty rapids
#

what exactly is it doing that isn't working ?

glossy crag
#

it just still doesnt let the player interact

#

I had an error before with a reference issue

#

watched the vid in pinned, got that fixed up

#

but it still just doesnt allow the player to interact again

#

this is my workaround as of past 10 mins but

#

same as before, doesnt let player interact after

lofty rapids
glossy crag
#

yea

#

the player can talk fully to the NPC

#

once dialogue is exhausted, it kicks the player out as wanted

#

but then the player cant talk to them again

#

if they wanted to redo the dialogue

lofty rapids
#

is speaking still true ?

glossy crag
#

I think?

#

Speaking comes from an interface

lofty rapids
#

well it's better to check values then to think about it

#

or guess

glossy crag
#

this is my only interface / first time so Im not really sure how

lofty rapids
#

print string on the event see if it fires

glossy crag
#

kk

#

I put a print string out the exec pin of Talk

#

it does fire

#

it doesn't show the reset dialogue / widget but it prints the test string every time I press the interact button

lofty rapids
#

so now put a print string out the true of the speaking of check see if this fires this time

glossy crag
#

nothing fires

#

to clarify, the Check Speaking is for the NPC itself

#

to see if theyre still outputting a message

lofty rapids
#

does speaking switch on the ui ?

#

when you exit, does it error ?

#

perhaps that function is running, but there is no display of it

#

because it was removed from parent or something, and never added back to the viewport

glossy crag
#

the widget creation itself is in the default TP character BP

lofty rapids
#

and when do you add it to viewport ?

glossy crag
#

interact trace triggers Talk which is what is in that first dialogue component I sent

#

event speaking is in the same interface as check speaking

lofty rapids
#

i'm guessing this add to viewport is off begin play ?

glossy crag
#

yea

lofty rapids
#

do you have a remove from parent anywhere ?

glossy crag
#

i do not

lofty rapids
#

hmm

glossy crag
#

most of my logic is in the actual widget blueprint for doing the typewriter effect

#

I can send it but it is incredibly illegible

#

I tried organizing it this morning

#

the tutorial I got it from made it super weirdly made

lofty rapids
#

did you try what i sent ?

glossy crag
#

the remove from parent?

#

if so yeah

lofty rapids
#

no you don't want to remove from parent

#

@glossy crag

glossy crag
#

I used a different vid cause I couldnt get that one working at the time

#

let me look at this again cause i was stuck at a certain part

lofty rapids
#

i can't tell without looking more at whats going on, hard to tell from here

glossy crag
#

I couldnt figure out what the variables were + where to use this once done

#

cause the way I had my E press was in my third person character

lofty rapids
#

you can use anything, maybe some tutorial will help

#

some blueprint tuts

glossy crag
#

i tried a few diff typewriter ones

lofty rapids
#

because you don't have to use E

glossy crag
#

theyre all really badly made

lofty rapids
#

mine works like a charm lol

glossy crag
#

how do I link it to a dialogue system tho?

#

im not using this one right now but ill show what I do have

#

I switched to that dialogue component I sent since it was in the same tutorial for the typewriter I found

lofty rapids
#

there it is

glossy crag
#

this isnt used

#

this is my old dialogue BP

lofty rapids
#

oh ok

glossy crag
#

I'll send the other one but it is a complete mess

maiden wadi
#

Should avoid the typewriter effect to begin with. Make it work as a simple immediate display first. Then you can just add in the typewriter effect when the textblock is set.

glossy crag
#

cause that one I just sent works perfectly

#

I can re-interact, skip dialogue etc, does it all

maiden wadi
#

Why did you ditch it then?

glossy crag
#

cause I couldnt figure out how to get the typewriter effect to work with it

maiden wadi
#

From the looks of it all you needed was to replace the SetText call with a custom function that starts the typewriter thing.

wispy coral
# maiden wadi But on the other side, why would you do any of that in the weapon? If you shoot ...

Its not about the weapon needing to know about the projectile, its about using the projectile's explosion as an event.
For example what if I have a weapon that shoots a projectile that on hit
-deals dmg to the enemy
-an other that aoe heals allies around you
-one that gives you 10xp

as I said I wanted to treat things like that, projectile, grenades etc's as reusable objects, like a button, it has a functionality of a button, but what the button is doing when it pressed isnt defined in the button, its defined when you place a new button and you assign a functionality to its OnClicked event.

glossy crag
#

i might just be in over my head for this as my first project

#

i dont think i understand BPs well enough

maiden wadi
lofty rapids
maiden wadi
#

You need to think of your weapon like a Judge Dredd pistol. It should be able to "shoot" anything. Bullets, grenades, arrows, fireballs, etc. What these things do is their own perogative.

fiery anvil
maiden wadi
lofty rapids
#

the pivot is probably different spot

worldly notch
#

Anyone mind giving me a hand? Viewport is not populating with the data from my Data Table

#

I'm working on a digital version of my card game, and I need some help figuring out how to display the data into the screen. The viewport populates with the blank image of the card and text blocks, but it doesn't fill it with the data form the Data Table I created

#

The Data Table has information, so I checked that off the list of causes
Checked that the data are variables and they are visible, so my next only guess is that there is something wrong with my blueprint

frosty heron
worldly notch
#

Works for the most part
BUT, image is not loading, any ideas?

frosty heron
#

What is card art data type? Texture 2d?

#

Check if its set on the kibaru row in the data table.

worldly notch
frosty heron
#

Look into your widget and figure out the black thing. Maybe something is blocking your image, hard for me to see without having the project at hand.

lofty rapids
# worldly notch

did you try checking match size, was it black already ? or did it change black ?

worldly notch
fiery anvil
lofty rapids
#

he don't like hats man

#

whats the code look like to attach stuff ? @fiery anvil

faint pasture
#

hat is running into head or some other bone

fiery anvil
faint pasture
fiery anvil
fiery anvil
faint pasture
#

show how you're attaching it, and show what a hat IS, its component layout

lofty rapids
#

have not seen this in a while lol

zinc flicker
#

For some days i try to fix a bug, but doesn't matter what i try it does not work

I have Character that shoots a bullet outside his center towards the enemy.
The bullet itself has object type - projectile and blocks only enemy trace

The projectile has on Event Hit - Apply Damage

The Enemy has Event Any Damage

So it works if the enemy is little further away lets say 5 cm away but if the enemy is near my character the bullet just pushes the enemy half through the map until he hits a wall

I tried multiple things

  • making the bullet faster or slower
  • making the bullet collision sphere bigger or super tiny
  • spawning the bullet outside my character capsule
  • making the Hit Event trigger only targets with the Tag Enemy (enemy has Enemy Tag)
  • Changing the projectile to Sphere on Begin Overlap
  • Making the collision of the enemy smaller or bigger
  • Making the collision of player bigger or smaller
  • spawning the bullet on top of the character and flying downwards

Nothing works, it works if the enemy is like 5 cm away but if he stands near me he just gets pushed away.

The enemy doesn't overlap with my collision box his box and my box is still 1 cm away, and even if spawn the bullet directly in between us not touching anyone on spawn he still gets pushed away.

In slow motion the bullet goes into the center of the enemy capsule then pushes him away (if that helps)

I followed lot of other tutorials but they all use something similar so it didn't help either.

I even asked GPT and it just says that the **Engine **itself has collision problems to calculate when targets are near together. (But i don't really wanna accept that answer for now)

If someone can help me or lead me into the right direction would be nice thanks.

faint pasture
#

the capsule is the thing that movement is done on

#

you don't want movement to be blocked or overriden by a bullet

zinc flicker
# faint pasture have bullet hit the enemy characters mesh but not their capsule

so i should make the capsule component only block the floor / walls and make the MESH the enemy to hit?

because the MESH is currently set to "No Collision" i basically just wanted the capsule component to be hit

One thing i managed to make work is using very hacky way of making the bullet actor having a set timer by event then fire off a sphere trace by channel and do the logic on a 0.1 sec looping.

This worked but no idea how performant that is.

faint pasture
#

You can always just make your own projectile system that uses traces instead of moving and sweeping a physical collider

zinc flicker
#

I tryed now to remove the collison etc from the Capsule Component on the ENEMY and i put the same collision settings on the MESH but it does not respect this settings the bullet just flys through like its not even there. Even with Print String i get no interaction at all.

zinc flicker
zinc flicker
faint pasture
#

These "rockets" are using traces

#

Tick -> trace -> set position -> did we hit? -> do something

zinc flicker
#

so they dont relay on a colison sphere on the rocket ?

faint pasture
#

no

sick sky
#

i would sweep

#

because rocket is not super small

faint pasture
#

you can sphere trace

sick sky
#

sweep a sphere

faint pasture
#

the main point is that the projectile cannot stop a character from walking or otherwise mess with its movement in any way

#

although you can also solve that problem by just hitting vs the mesh and not the capsule

zinc flicker
faint pasture
#

It's a new frame, what do
lets try move
ok cook up the new spot
trace to it
hit anything?
Move mesh
done

zinc flicker
faint pasture
#

it just doesn't have the option to use traces afaik

#

it only sweeps the root collider of the actor it's on

zinc flicker
zinc flicker
faint pasture
faint pasture
#

pick one

zinc flicker
#

Thanks lot it works now i will check later how well it performce but if it survives 100+ i happy :D

stone spruce
#

Is it possible to switch between two player controllers on stand alone?

maiden wadi
#

The short answer is that:
Yes it's possible. You can do anything you want to do. The engine source is available and can be modified.

The more correct answer is that no. The player controller is a generic control delegating and networking hub for a player. You should never need two even for the most dynamic and complex of gameplay setups because you handle that dynamic setup elsewhere. Possessing different pawns, adding and removing context mappings. Putting networking in components that can be added and removed.

stone spruce
#

@maiden wadi I have a strange case where I need to for testing. I have a card game that is multiplayer. But I want to use two player controllers to test. I got most things to work, but the Mouse Events & clicks on actors in the world only work on player 1. If i could get the mouse/keyboard inputs to transfer to Player 2 that might work as well.

maiden wadi
stone spruce
#

yes coop (local) without split screen. (Note: I have the multiplayer working fine and test on Steam. I just want to play locally and control both player controller, like playing chess against yourself)

#

A ton of code is in the player controller and in hind sight I should of put in player character so I could just possess it.

maiden wadi
stone spruce
#

I normally do, but when playing as two clients, the mouse over breaks sometime and I have to restart the editor. I isn't something that needs to be done, I was just curious if I could get it to work.

#

When two players are coop, you can assign different controllers to each player so the inputs from different devices both affect the game. Is it possible to transfer which player controller gets to receive mouse inputs.

maiden wadi
#

Probably. But I'm not sure how deep you'd need to go for that. C++ stuff for sure if there are no editor/project settings for it.

#

I'd probably dig around in SlateApplication/SlateUser areas for starts if you're C++ oriented.

stone spruce
#

I know c++ ok, but no expert. Thanks, I keep messing with it and see what I can figure out.

dense hinge
#

Heya, what could cause the BP nodes to grey out Delete option and not let me delete them?

maiden wadi
#

Gets stuck sometimes, new bug in the last few versions.

dense hinge
#

Awesome, thank you. I restarted the editor and it did clear it up

fiery anvil
#

I added smooth sync to my project, i before that had my players be a mix of animation and physics, now that i disabled replicate movement and enabled smooth sync, the animations and physics dont show for the other players. Someone help

wicked surge
#

Hello, I'm preparing a tutorial based on the UE5.6 C++ FPS example, and the character is setup to have two character meshes, which I'm trying to remove so that the player doesn't see the character's arms. I have a couple of questions about this:

  1. Why are there two character meshes? Is this simply so the camera can be attached to the head of one character, which has head-bob removed from the animation? And presumably the other mesh is for remote players to see? This would seem quite convoluted when the camera could just be parented to the CapsuleComponent.
  2. Because the camera's parented to the head bone of one SkeletalMeshComponent in C++, clearing the SkeletalMeshAsset for that character leads to the camera sitting at ground level. Is there a quick way to fix this for the purposes of people following the tutorial I'm creating?
#

This is what I'm currently doing in Blueprints as a quick fix (I'd rather not start the tutorial off editing this in C++), but is there anything else that's recommended for this, or that I'm missing?

maiden wadi
#

I already reported it. They'll get to it.

#

If you right click and go to Apps, you can report messages directly to mods that way.

wicked surge
maiden wadi
jagged moss
#

i messed up a bit cause I didnt know about the widget switcher. I got 2 menues and i built both in one widget and my plan was to hide and show the ones i need. but i didnt have much knowledge on widget when i started. Now i got a lot of logic for both menus in one bp_widget and I want to seperate the 2 menues.
I tried to copy everything, make a switcher and add everything there but i stil want all logic in one widget blueprint as there is a lot of both menus that effect eachother.

What is the best way to fix my mess without starting over?

jagged moss
#

pls tag on reply

maiden wadi
jagged moss
#

then i can just hide the one i dont want?

wet sundial
#

I asked on the animation channel, but not sure if there is the right place, anyone has anyideas?

"hello everyone! Not sure if this is the right channel to ask this, but I'm playing around GASP to turn it into a FPS, I managed to put the camera on the right position, stop it from clipping in the wals by following an youtube tutorial on 5.6, and I also managed to remove the traversals that make tha character flip and managed to make the character follow the camera without you being able to see inside the character's neck. Thing is, when doing the traversals, if I look behind me, I can still see my character's neck, or rather the inside of it. That being said, how could I see, in BPs, when my character is performing a traversal, so I can limit camera movement after?"

jagged moss
#

thanks, i tried something earlier with the widgets but it failed but it worked this time ^^

wet sundial
#

It's driving me insane xD

narrow sentinel
#

anyone know how to get rid of these things

#

i get Epic thought they were a good idea but they defo were not cause it's a stupid thing which gets in the way

dark drum
# wicked surge Hello, I'm preparing a tutorial based on the UE5.6 C++ FPS example, and the char...

I'll be honest, it doesn't sound like you're knowledgeable enough to be making this sort of tutorial.

The reason there's two meshes is because how you might want the hands (and other attachments) to be positioned don't always look right when held correctly from the perspective of the camera.

One is for the controller of the character to see in which you could have the hands more to the edge of the screen while the other mesh is used for other players. (Multiplayer)

Not doing it this way could result in the player looking like they're trying to hug everything or have overly short/long arms.

charred granite
#

I've installed DLSS plugins for 5.6 and it seems to work, but in the UI overlay the frame rate for Framegen remains at 0 for some reason. When I first launched it, it actually did show a frame rate, but after reclosing my program ealier, it's not showing a frame rate now.. Any one ran into this issue?

wicked surge
# dark drum I'll be honest, it doesn't sound like you're knowledgeable enough to be making t...

I appreciate the response, but have you read the question fully? I clearly understand that this is mainly intended for multiplayer scenarios, hence why I'm talking about remote players. I'm mainly wondering if there are other reasons for having two meshes in the template. And my other question is whether there's a checkbox I've missed for the camera attachment, because I imagine a lot of developers will want to get rid of the arms in the new FPS template and it seems strange to me that this requires editing the C++ file or another workaround if I don't want to end up with the camera on the floor. Thanks though!

maiden wadi
#

We stopped using it. Haven't tried it on 5.6, but we had a ton of crashes related to it on 5.5

dark drum
# wicked surge I appreciate the response, but have you read the question fully? I clearly under...

As for there being a tick box, no. You'd have to modify the parent class to modify its default attachment. One work around is to detach on begin play and re-attach where you want it.

Another reason it's not just attached to the capsule component is because doing so you'd lose any movement that might be imparted through the animations. This could be things like recoil or the head tilting to the side when throwing a grenade, rolls etc...

It might be easier to just hide the arms if they aren't needed.

flat coral
#

I wish Unreal had some way to mark a node as "provisional". Like, if any of the inputs, anywhere up the chain aren't valid, don't pop an error, just don't bother with this node and move on.

#

I really hate it when languages require multiple layers of null checks just to avoid some noisy error when it's actually fine if something doesn't happen

mint glacier
#

Hey there, I've been having some errors refencing my HUD in my player controller. The way I have it now its saved as a variable in my character, then I refence the character to reference the HUD variable, but it reads as "none" when I run it.

I can screen share or send more screenshots if more info is needed.

marble tusk
faint pasture
#

nothing about HUD should be hitting the network, this is a mess

mint glacier
faint pasture
mint glacier
#

noted

faint pasture
#

Also playercontrollers don't exist on other ppls machines

#

read this

#

This is the most important takeaway

mint glacier
spark steppe
mint glacier
faint pasture
#

from the perspective of the other clients its all the same

mint glacier
#

dang ok i need to really change which things are sending what info. ill probably be back later when i dig myself a bigger hole

inland walrus
#

I have 15 ingredients. I have 3 slots.

I can mix 2 together. Example: Mint + Tea Leaf

Or I can mix 3 together to make something different, Example: Mint + Tea Leaf + Egg.

Order of the mixing doesnt matter.
Example: Mint, Tea Leaf, Egg = Health Potion
Tea Leaf, Egg, Mint STILL EQUALS Health potion.

Total: 560 possible potion combinations.

I want the recipes to randomize the required ingredients on game launch (whilst making sure that no 2 recipes are the same).

Question:
Easiest method to do it?

mental trellis
#

...560

#

I guess?

#

Or I guess not.

flat coral
#

15 choose 3 is 455 anyway

#

But also I dunno if they want every combination to be a valid potion. Like is someone actually gonna make 455 different potion effects?

mental trellis
#

You could make a complete list and just randomly pick them. With 560 it'd be simple and fast.

#

Depends if you want to ensure even distribution of ingredients.

tiny tundra
#

Basic-est of the basic-est questions, I am surprised I am having a difficult time figuirng out the answer to this one. I have a Blueprint Actor and I want to be able to spawn a Static Mesh into it, under certain circumstances. Apparently this isn't a cut and dried affair - what am I missing? Illustration shows an example of a simple static mesh that I'd like to spawn within the BP.

flat coral
flat coral
# inland walrus I have 15 ingredients. I have 3 slots. I can mix 2 together. Example: Mint + Te...

This problem has its hooks in me. What you want is to define a "combinationName" which is the same for any given SET of 3 ingredients. (see below)

Then what you do is create a map of combinationName to Recipe. Programmatically prepopulate the key set with every possible combination, all 455 of them, but with no recipes yet. O(n)

Then get the KeySet of that map and turn it into a randomly-ordered list. Go down the list and for each of your recipes, assign each to that combinationName and store that in the map O(m)

That way, it's very easy when a player combines 3 ingredients, you find the combination name, and look up the recipe in the map. O(1) for the lookup

#

How the heck do I trigger an action in an Actor Component when its owner is unpossessed? Am I missing something obvious? Why doesn't this work?

fiery anvil
frosty heron
#

You will need to find someone that use the plugin to begin with.

inland walrus
mental trellis
#

Create all permutations. Randomise it. Done.

flat coral
#

Yeah if all combinations do SOMETHING then that 's even easier

#

Though I still think there's 455?

mental trellis
#

He did say 2 and 3 ingredient combimnations.

flat coral
#

Shit.

#

missed that

inland walrus
mental trellis
#

Do you know what a permutation is?

inland walrus
#

Only from a quick google search

mental trellis
#

"Create all possible combinations. Randomise it. Done."

inland walrus
#

Ah I see

mental trellis
#

If you have an array of combinations (560 long) and a list of recipe names (560 long) and you randomise one list, you just link them via their index in the array.

#

And your job is done.

inland walrus
#

I see, so I have to manually create each possible recipe combination?

mental trellis
#

You could do it programatically.

#

But that may take longer than writing them all out if you're new.

inland walrus
#

I get you, man that's long xD

#

Thanks though

#

You've shed light on it, now I can begin the process

#

How would I create an array of every possible permutation though?

#

An array will only store a list, 1 item per slot

thin panther
#

Not if it's an array of a recipe struct or whatever

inland walrus
#

gpt is suggesting creating an array of arrays

mental trellis
#

Don't listen to chat gpt

inland walrus
#

that's a lot of variables xD

mental trellis
#

An array of arrays is 1 variable.

inland walrus
#

how so?

mental trellis
#

TArray<TArray<thing>> MyArrayOfArrays;

#

(that's one variable in c++)

inland walrus
#

is it only possible to do in c++ and not bp?

mental trellis
#

No

proper tulip
#

I have my construction script set up and skeletal meshes applied, but if I want to change out meshes for a character blueprint from widget button , how can I do so ?

#

For example each button is target to individual skeletal meshes, it loads one, deletes the old one

glossy crag
#

not sure where to put this bug

#

this doesnt seem BP related but I made my project in BPs so

#

I have a main world scene, and then a main menu scene for a 3d background menu

#

I have actors placed in a camera view and then the widget for the menu over it

#

after AFKing for like

#

maybe 4-5 mins

#

all of the actors just disappear

frosty heron
#

Actors dont just dissapear

#

Unless you destroy it or they fall off the map

frosty heron
#

You may want to print the z of your characters on tick see if it remain the same

glossy crag
#

now this after a few more mins

#

i have like half of the debuggers open

#

not a single thing triggered except those two SCs

#

let me test this on standalone game mode

#

be back in a few i suppose lololol gotta wait for it to mess up

#

yeah it does it on standalone too

dapper thunder
#

hey everyone, i'd appreciate some help here, i've been stuck on a problem for a couple months trying different solutions, but there's always one part that isn't working. I'm trying to "draw" a gesture with the mouse and have a projectile follow that path while still shooting forwards

things I've tried: splines, adding the mouse points to an array and setting the location to those points (and other variations of this)

glossy crag
frosty heron
glossy crag
#

it just stopped printing Z’s

#

the player controller spawned at the top of the camera and fell straight down tho

frosty heron
#

And does the z remain the same?

glossy crag
#

im thinking maybe the playercontroller spawns by mistake snd falls until the Z kill zone is hit

#

and it improperly unloads everything

frosty heron
#

Player controller dont really have physical location

glossy crag
#

the Z doesnt change

frosty heron
#

The z of what?

glossy crag
#

any of them

frosty heron
#

I can literary see one of your character falling

#

Lol

glossy crag
#

they all stay constant

#

yeah thats the player controller

#

i couldnt figure out how to disable it for the main menu

frosty heron
#

Player controller doesnt have a physical location

glossy crag
#

this is my first project and google was failing me

#

then player character

#

i probably have term weong

frosty heron
#

Well there you go then

glossy crag
#

player start is set in middle of nowhere

frosty heron
#

Try to stop the player character / pawn from falling

glossy crag
#

kk ill try it out rq

frosty heron
#

Im 99% sure something get destroyed from falling off the map

#

80% guess is your player character since the other one remain the same

#

You can also detach from your character by clicking the up arrow key next to the play button.

#

You will see if your character is falling.

#

Or just print the z of the player characters

inland walrus
#

This is my blueprint to randomise ingredients and create a recipe for a health potion.

I plan on having over 500 recipes. It doesn't seem effiecient to copy and paste this code 500 times just to change which variable it targets (instead of HPPotion).

Any alternative ideas?

thin panther
#

For each potion type in potions, set it's ingredients to either 2 or 3 randomly picked ingredients depending on the number of ingredients

glossy crag
#

ive let it sit for 30 mins while i did some chores

#

put the player start on top of a cube in the distance

#

no problems

nova grotto
#

im trying to make it so if im going towards a specific actor it sets my enum to moving forwards but my math is not mathing could someone help

surreal peak
#

Where you are calculating the direction it needs to be Target - Origin

arctic anchor
#

Sorry to interrupt, Trying to slow time during an anim montage. What should I drag off the mesh comp into? Any advice?

#

chatgpt told me Get World but I dont see it

frosty heron
#

GetWorld is not exposed to blueprint

#

What you can do there is get the outer of the comp

#

Mesh Comp-> get owner and plug that to the world context object.

arctic anchor
#

Didnt think it would be that easy, thank you coldsummer 👍

compact fable
#

Hey everyone,
Quick question. What's the best way to have blueprint trees in thew world, only foliage types work with the foliage tool. So is there a way around this? how is it typically done.
The use would be to cut down tree's and collect wood from them, hence the BP

maiden wadi
compact fable
dusky hemlock
dark drum
compact fable
gentle urchin
#

Its not impossible to just make such a system yourself either

severe terrace
#

Hello,
Has anyone experienced a crash in development or any build when you get a generic actor and cast it?

Setup :

i am using an subsystem to store all the references using TMap<FString, AActor*> MyActors
And Get and Set helper functions to add and get actors from the map.

Scenario

I get an actor from subsystem to cast it to required class.
if cast is successful no problem.
if cast fails for any reason (e.g. gets null ref from the map) it crashes the build ( NOTE : project does not crash in editor only in build).
Also recently noticed this same issue when checking for valid object. (is valid macro in blueprints to be exact).

frosty heron
#

@severe terrace post your code? Its normally safe to access null in blueprint, you will just get error logs.

If this is a cpp project then just run on debugGame and see where the exception take place.

#

Well subsystem cant be created in bp alone so im pretty sure its not the bp side that crash your project.

#

Attach debugger on your build and you wouldnt need to guess

severe terrace
#

subsystem get function is like this :

AActor* UMySubsystem::MyGetActor(const FString& Key) const
{
    FString LowerKey = Key.ToLower();
    return Actors.Find(LowerKey) ? *Actors.Find(LowerKey) : nullptr;
}```
i call this function from blueprints validate and cast it.
frosty heron
#

I would attach debugger and see where the exception is.

#

Also just use FName? You wouldnt need to convert to lower or upper

severe terrace
#

Aye!
i'll try it, Thanks

frosty heron
frosty heron
#

There is like a gotcha with namespace in unreal but I dont really use it so 🤔

severe terrace
#

pretty sure, cuz i checked in PIE.

The actor i am trying to get isn't spawned , so the subsystem would return nullptr.
when i remove the logic from is valid and onwards , doesn't crash.
And the crash frequency is low like 1:10.

lofty rapids
#

if you just have the isvalid, and remove everything after that, does it crash ? then without the node does it not crash ?

lofty rapids
dark drum
severe terrace
#

In build i just get Fatal error! popup. and in crash log there isnt anything useful.

maiden wadi
frosty heron
#

@maiden wadi is using name space like that okay in unreal?

#

Subsytem::GetActor

maiden wadi
#

GetActor should be fine if nothing else in it's hierarchy uses it.

#

Subsystem isn't the name of their subsystem though. It wouldn't work without a U prefix so that's something else.

fiery anvil
frosty heron
#

They dont replicate

#

What you replicate is the underlying property from the owner.

fiery anvil
#

i meant it as in a i need to find a way to replicate those animations not literally replicate anim bp

frosty heron
#

Your anim bp just reads the state of the owner, w.e it is.

#

Anyway smooth sync is a plugin, and i doubt there are many users that you can share the issue with.

#

For me smooth sync isnt solution to character movement component.

#

It will always be doomed one way or another but hey maybe I just dont know

fiery anvil
#

without smooth sync my movement is very laggy and literally starts tearing my characters apart

frosty heron
#

Anything that meant to go to the prediction struct needs to go there.

Any form of attempt of doing otherwise will cause de sync simple and plain.

maiden wadi
#

It's on the same idea as a weather system. You have a weather actor that has the state of weather. Wind speeds, types, etc. And those pod types get replicated and each machine sets up and interpolates weather locally.

Animations are the same in that your character has state on it, and the animations just read from that to locally update.

frosty heron
#

One issue at a time

fiery anvil
#

i want the movement to work well in multiplayer, issue is, in normal replication the movement is laggy and unplayable, in smooth sync its great but the animations dont play except for the idle ones.

frosty heron
#

I cant help you with smooth sync and i dont think it fix any problem if you are using character movement component.

#

The solution is to learn cmc framework and yes its not doable in blueprint alone

#

You need to pack the state in a struct (bit field) there are video that cover this.

#

Essentially if i have to guess smooth sync throw away the actual networked code done for cmc and just lerp values, this is fighting the system and you won't win.

#

Just a guess btw since i dont use smooth sync

#

https://www.youtube.com/watch?v=urkLwpnAjO0&list=PLXJlkahwiwPmeABEhjwIALvxRSZkzoQpk&index=1&ab_channel=delgoodie

Here is the overview of networked movement. He even nicely demonstarte how to do sprinting, wall climbing, dash, sliding, etc.

https://discord.gg/uQjhcJSsRG
In this video I am introducing a series I will be making which explores the character movement component and how you can extend it in depth.

0:00 Intro
1:00 What is the CMC?
2:00 Do you need a custom CMC?
5:35 What does the CMC provide?
7:10 Outro

▶ Play video
severe terrace
frosty heron
#

If you dont know cpp then now is the time to pick it up. Otherwise bp multiplayer is yeah nah, impossible in many parts.

maiden wadi
frosty heron
#

We dont know whats inside your abp, look at how default tps get the ground speed.

#

That value should already replicate by default

narrow sentinel
#

I have a floating Pawn movement comp on it with a Add movement input being called

#

like this for instance

#

reason there is an actor pin there is cause I do this in the state tree on a state

fiery anvil
#

its just simple code, velocity and is falling used in state machines to play idle jump animation or the walk run blend space

severe terrace
# maiden wadi Any chance you can give the callstack and ensure?

Unfortunately, i cant share it , but i probably know why is it happening.

  • My subsystem is derived from game instance subsystem. so image a scenario where in a level i set an actor in subsystem.
  • Now i change the level where that actor isn't spawned, so when again try to get the actor again.
  • It is a valid pointer , but when i cast where is no instance of that actor in current level, so it crashes.
  • Technically if cast fails engine should handle it gracefully, but it isnt in my case (i am using UE 5.4).

Anyways, Thanks for quick responses

frosty heron
frosty heron
#

E.g if your velocity isnt changing well then that's ur issue.

maiden wadi
#

Accessing an invalid pointer would crash. But if this is used in BP, the cast node has an internal IsValid check, so.. 🤷‍♂️

#

Actually even technically that isn't true. You can call all of the stateless functions you want on an invalid pointer too as long as you never access properties.

severe terrace
#

i am accessing a property in the casted actor, so maybe...

maiden wadi
#

It'd be checked in the cast node though. If it's null or pending garbage it won't pass the cast node.

fiery anvil
frosty heron
#

You can debug the values on the other instance too (the players that dont have the anim moving)

#

Can't add anything else other than you need to figure out why you dont enter the state of the anim in the machine that have issues.

fiery anvil
frosty heron
#

Yea you need to debug and theres no way for me to help without looking at the entire bp and im not planning too.

If you copy the logic from default tps, the anim bp checks if velocity is not near 0 and if theres input.

Proxies dont have input, so I bypass that check but cant remember exactly what I have on my end.

This is just guessing though as i have no way of knowing what actually goes in your anim bp.

#

The only thing you can do here is check the values on the client that has issue entering the state.

fiery anvil
#

whats a tps or proxy

frosty heron
#

Tps is third person shooter, i made mine based on their anim bp. I am refering to epic default third person template.

#

Proxies are character that you dont control.

maiden wadi
fiery anvil
#

im not using tps

frosty heron
#

You need to get familiar with those term if you are working on multiplayer.

#

Look up network role

maiden wadi
#

If you're using the template stuff, they're bugged. Some derp put in an input check.

frosty heron
fiery anvil
#

im not using any of the templates

frosty heron
#

I think we r going on circle though

#

If i am in your shoes theres only one thing i need to do first

#

Check the values on the problematic machine and figure out why i dont get the value i want.

fiery anvil
#

but the problem is i am getting the values i want just not for other players

frosty heron
#

When you play in editor, open up your anim bp, you can select the preview to machine of your choice.

frosty heron
fiery anvil
maiden wadi
#

Can you show your animBP's update event that is polling the velocity and such?

fiery anvil
#

ignore the print strings

#

it works for whoever the moving player is, but if any other player is watching, it shows them moving without animations

maiden wadi
#

Can you swap the Velocity from the CMC to the character's GetVelocity?

narrow sentinel
#

so is there a way to do an unreal insights on an actor at all ??

#

cause I have an issue where something is making performance chugg but only on the ship actor and wondering if theres a more isolated way of finding out rather then unreal insights giving me info on literally everything, just to begin with obvs

maiden wadi
#

You can't really assume it's specifically one class though. What if the actor has no time at all and it's causing issues in UI from too many updates, or physics or nav updates from other things? Those things aren't related to that actor specifically but can still be caused by it.

#

Just look at the bad frames and see what is running in them.

narrow sentinel
#

fairs, only reason I say specific to the ship actor is it seems thats the only thing being affected or at least showing affects of something going on cause everything else runs pretty fine

inland walrus
#

I basically have 15 ingredients. I am trying to generate all possible recipes and store them in "All combinations" array but it's not working

#

I need it to get all possible 3 combinations and all possible 2 combinations. It should give me 650 recipes

inland walrus
#

printing length of all combination variable

#

If I remove this check, it infinitely generates

storm solar
#

Check what the array index is outputting. It should increment by 1.

maiden wadi
storm solar
#

Id start simple with two ingredients and go from there.

inland walrus
inland walrus
storm solar
#

Does this account for recipes being out of order. For example Sap, Moss?

storm solar
inland walrus
narrow sentinel
#

so i'm confused here cause looking at the rendering Thread it shows the fps is really bad there but render thread has nothing on it same for game thread

#

nevermind

storm solar
narrow sentinel
#

i was looking in the region where PIEStartup was still happening

narrow sentinel
#

so game thread thats what I'm seeing

#

but still doesn't seem to narrow down what happens in that frame which could cause the frame time to be stupid high

#

all i can see is it might be widget issue but can't defo say

storm solar
# inland walrus yeah

ah, ok.
So it's not checking each combination of each ingredient.
I think you would need multiple for loops.
Id start small, with 2 combinations and go from there.
I'm sure there are better ways to start this, but what I would try is...
Assuming no combination uses the same ingredient multiple times.

Loop A: index 0
Loop B: the index of loop A +1
Loop B to all possibilities.
Increment loop A by 1.
Repeat

Nested loop breakdown.
https://www.w3schools.com/cpp/cpp_for_loop_nested.asp

lofty rapids
narrow sentinel
#

just at moment trying to figure out why performance tanks

lofty rapids
inland walrus
narrow sentinel
lofty rapids
#

i have not used it yet so idk

narrow sentinel
#

okay so I've managed to find that disablling the widget tick I get better frames then before so thats one thing which is causing the issue, next is to see what this does

#

as that is something which seems to push the frames slightly into the red

maiden wadi
storm solar
#

i have a Character BP that has multiple actor components attached to it.
When I spawn that Character BP I want set some exposes on spawn variable in the actor components but only have access to the Character BP expose on spawn variables. How do I get access to actor components on spawn?

inland walrus
maiden wadi
maiden wadi
faint pasture
#

it's waiting for a task

#

find the task

narrow sentinel
#

there isn't one

faint pasture
#

check that you're not filtering anything out

narrow sentinel
#

not one that last for the same timing as the oversubscription

#

So checked I've enabled all filters like to make sure i'm not filtering anything and this is what I see

faint pasture
#

that oversubscription still might not be the actual work

#

What triggers this?

narrow sentinel
#

the oversubscription ?

faint pasture
#

the 2 second frame time

narrow sentinel
#

wheres the 2 second frame time ?

#

i don't see it unless I'm blind

faint pasture
#

does it happen when you open some UI, when you enter some thing, when you press some button, what

narrow sentinel
#

the 3 screenshot together is the ones I did after disabling tick on the 3D widgets to see if they were impacting things which they were but still some oddness going on

#

this subscription is a mystery at the moment literally

#

this oversubscription is really giving me migranes haha

inland walrus
#

Is that the right thing to do? An array variable for each potion?

maiden wadi
#

Need more info on your goal.

lofty rapids
inland walrus
#

So the goal is:
Every player's game will have different combinations, no 2 game saves will contain the same recipes (basically doing this so that people cant google and cheat the recipes, each players game is randomised on start)

There will be 560 potions, we have 560 recipes.
I need to give each potion, it's own recipe.

lofty rapids
#

no

#

it will run just fine

inland walrus
lofty rapids
#

atlast i don't think so

inland walrus
#

This would be my method, however, 560 potion variables seems inefficient

lofty rapids
#

a map of structs ?

maiden wadi
#

I mean you can't even play a second game using the knowledge of your first which is kind of a large part of gaming. 🤷‍♂️

lofty rapids
#

a map of string to struct, where the struct holds all the data for the potions, including all possible combinations, would make it easy to code, you just get the potion name, map -> get, and have an array in the struct

inland walrus
lofty rapids
#

you need the struct because you can't just map to an array as value

#

makes it so you don't need a million branches

#

and 100 arrays

inland walrus
maiden wadi
lofty rapids
#

potion info like name,id,somevalues

#

and the arrays you need

#

so you still have seperate arrays

#

but it's consolidated into one map

inland walrus
lofty rapids
#

it makes coding this much easier imo

inland walrus
lofty rapids
#

wdym "using a free asset" ?

#

probably contact the maker

#

thats usually your best bet with something from a marketplace

#

it could literally be too many things to guess

#

does your normal ue work fine ?

lofty rapids
#

make a map variable, key: STRING, value: YOURCUSTOMSTRUCTWITHARRAY

#

you still need to make an array, it's just more organized and easier to manage

inland walrus
#

I'm fairly confident using it like this

lofty rapids
#

you can code any way you like

#

this is just going to be a bunch of branches and no easy way to edit things

#

for instance if you add a potion
you'll have to go in and add a branch

narrow sentinel
#

so apparently this function thing takes this long to do

#

which seems odd to me cause not a lot happens

inland walrus
fiery anvil
lofty rapids
#

so all you have to do to add a potion is add an element to the map, set it's name, and populate the array

#

but it's really do whatever makes you feel comfortable and works

#

it should work the way your doing it, it's just really a bit more work to create and manage

lofty rapids
#

might be a bit easier to maintain that way

#

would get rid of all those branches and just consolidate it

inland walrus
lofty rapids
#

so you would have instead of recipe, possible randoms

inland walrus
#

So the map should contain all of the potions?

lofty rapids
lofty rapids
#

then when you getting a possible recipe

#

use this find

#

and you have an array of all possible recipes for that PotionName

#

this way you can just pass in PotionName

#

and get the array associated with that name

narrow sentinel
#

so i have a question why is it when I do the Name to Text convert function on the actor be worse for performance then doing the same function but on the BP Function Libary ??

inland walrus
# lofty rapids

I get you, but how do I add 1 combination? as I cant figure out how to link it up

inland walrus
#

the "All combination" variable contains every possible combination

#

I just need it to get 1 for the health potion

lofty rapids
#

random

#

i think the node is random

inland walrus
#

Yeah I know to get random but I dont know how to set it as the recipe array in the map

lofty rapids
inland walrus
lofty rapids
lofty rapids
#

i try to name my variables descriptively

inland walrus
#

"Possible for This Potion" I thought you were referring to the All Combinations variable

lofty rapids
inland walrus
#

Oh, I thought this method was to reduce the fact I'd need 560 arrays?

lofty rapids
lofty rapids
#

it's more maintainable

#

you still need the data stored somewhere, but this is all stored in one unit

#

and you can add/remove things easily

#

is all possible for all potions ? or do different potions have different possibilities and thats why you need all the arrays ?

inland walrus
#

The thing I am most confused about is how do I add a string to the the map array?

lofty rapids
inland walrus
lofty rapids
#

for now don't worry about the possible array

#

just change the recipe to a string

inland walrus
#

Yeah it is, but I am not sure how to add said string into the recipe map

lofty rapids
#

and set a random to it

inland walrus
#

okay

lofty rapids
#

and add one

inland walrus
#

I'm following now

lofty rapids
#

it's just a better way to code it imo

#

and maps are O(1)

inland walrus
#

Yeah it's a lot cleaner

lofty rapids
#

little tricks you learn along the way lol

#

and whats cool is now you have basically a dataset of all your potions

#

but be careful with structs in bp, i've heard they can crash your editor

#

but i think the problem stems from where theres a connection to a value, and they delete it

inland walrus
#

Got you lol

lofty rapids
#

i've personally had no issues tbh

#

but it's a common thing i see on here it's an issue

narrow sentinel
#

anyone know what this would mean at all just wondering

#

I have a frame dip when that begins to happen and I'm wondering if theres something possibly I can do to fix the frame drop

lofty rapids
narrow sentinel
#

actually no that doesn't make sense cause the frame drop doesn't happen the following time this bit happens

lofty rapids
# inland walrus Got you lol

in this case you probably could of just used a map string->string, but having a struct will let you keep info on the potions anyway lol

inland walrus
lofty rapids
#

usually if you repeat code like that you can make a function out of it

#

you could make an event, that you just pass the Name

#

and it creates the new one with that name

#

then you could have an array of strings, and this is your generate randoms list

inland walrus
#

So have an array of potion names and a function that goes down the list of names?

lofty rapids
inland walrus
lofty rapids
#

then when you need to add to the map a recipe, you just call the function

#

but when you populate at the beginning all of the base ones

#

you can just loop through a baseList and generate everything

#

basically just have the inputs of the function name of the potion to find, and all the data to store in the struct

inland walrus
lofty rapids
#

your returning from the first loop

#

you want to finish the whole loop, you might want to also validate there is a random in the array

inland walrus
#

Ahh I see

lofty rapids
#

and if not pass a fail boolean out the return

narrow sentinel
#

this debugging is difficult I'll say that cause trying to see why a frame drop happens is well a maze to go down like here, frame spikes but can't see what of my stuff might be causing it

lofty rapids
inland walrus
lofty rapids
#

for loop

#

1 to 650

#

generate a random string or use the index

#

and see how well blueprints handles it

#

loops in blueprint can be bad, you may need to move it to c++ if your struct gets large idk

inland walrus
#

The only thing I'm stuck with now, is making it get Slot01, Slot02 and Slot03 ingredients, and checking which recipe it is == to

lofty rapids
#

01,02,03 ?

inland walrus
#

So the slot is the ingredient the player has added and the interger is the amount of that item they have added (incase they want to make multiple potions at once)

lofty rapids
#

this is a bit more interesting lol sounds like you may want to compare these slot keys and see if you have the ingredients ?

lofty rapids
inland walrus
livid axle
#

Hi, is there a way to make buttons that are dynamically created with custom events that are unique to them depending on the text in the button, or its tooltip? My custom event on clicked just gets overwritten by the last button for all of them

maiden wadi
lofty rapids
livid axle
#

Did you figure it out?

lofty rapids
lofty rapids
maiden wadi
# livid axle Did you figure it out?

The most robust way is make your own button widget that passes Self back through it's clicked delegate so that you can look back up the data using the button as a key.

lofty rapids
#

but you shouldn't cross lines like that

glossy crag
#

Hey, so I know how to apply Niagara FX to animations and what not, but what node would I use to apply it to a collectible pickup in a blueprint? Would it just be adding the Niagara System Component?

full badge
inland walrus
narrow sentinel
#

it's small enought it can go here

#

bare in mind its the trace with the latest stuff

full badge
livid axle
full badge
#

you're not able to change propertys of the button itself

lofty rapids
#

because thats how maps work

#

are you just using it for one thing ?

inland walrus
#

The slot will only hold the name of the ingredient and the amount the player has added

lofty rapids
#

this will give you the first item in the map, which is likely the correct one

#

hopefully lol

#

do that for each one of the slots

inland walrus
#

So like this?

lofty rapids
#

yes

inland walrus
#

What would I plug the get into?

#

A new array?

maiden wadi
# narrow sentinel

I'm not seeing a lot of data in this? I'm not seeing Frame or CPU, and StatNamedEvents would also help.

lofty rapids
inland walrus
lofty rapids
lofty rapids
#

but i would probably put it in the struct

#

so you know how many for that recipe

inland walrus
#

xD you like your structs

lofty rapids
#

but i was trying to avoid splitting it again

#

because from here you can just see if recipe contains all three, or two

inland walrus
#

Would I be creating a new struct?

lofty rapids
#

same struct, just in the function when you generate them, add the totalingredients value

#

it's better to pre compute them in the function

#

then to split it into an array and get the length

#

you could probably also count the amount of +

#

but hard setting the value makes this np

inland walrus
#

Wouldn't it be easier to do it like this?

inland walrus
#

So when they hit create potion, it gets the last 3 slot ingredients used

lofty rapids
lofty rapids
inland walrus
#

Alright

lofty rapids
livid axle
inland walrus
#

So this is what we have so far

lofty rapids
#

thats why you need that value 2 or 3

lofty rapids
#

create a new variable that will be the totalMatches

inland walrus
#

How do we compare the recipes to see which ones to use?

lofty rapids
#

drag out from the recipe variable and look for contains

#

this will check if the string is included in the other string

#

so you want to check does the recipe your looking to create, have this word in it, thats what the gets are for

inland walrus
#

Like this?

#

The recipes are strings not arrays though so contains wont work

lofty rapids
#

don't use the array and contains

#

drag out from the recipe

#

and use contains of the string

#

string has a contains as well

#

"one + two + three"

#

contains("one") == true

#

contains("meh") == false

#

it works similar but it's just on a string instead of array

lofty rapids
#

so in your race the search in is your recipe

#

and the substring is the first get 0

#

but you want a sequence as well

inland walrus
lofty rapids
#

thats not what i was trying to show you

#

did you read what i wrote ?

inland walrus
#

Yeah I'm reading and following, I thought I was doing it right

lofty rapids
#

you don't need to make literal strings

inland walrus
#

I thought so lol

lofty rapids
#

read what i wrote, repeating in text is uselss

inland walrus
#

So substring will be the get's?

lofty rapids
#

yes

#

one at a time, in seperate nodes

#

so you need three contains

lofty rapids
#

how long you been using unreal ?

inland walrus
lofty rapids
#

ok, geez

inland walrus
#

For the sequence, do you want me to do it so that each key/get has it's own?

lofty rapids
#

so

#

when you do the three contains

#

your sequence will have four outputs

#

the three branches off the contains

#

one for each section

#

and then the last one by itself just empty for now

glossy crag
#

this doesnt trigger the niagara when I pick up the item

lofty rapids
glossy crag
#

execution pins

#

OH

#

I didnt see i missed that one

#

LOL

#

sorry

lofty rapids
#

and on each true increase totalmatches, do a get and drag off and do ++

#

basically if you get a match add one to this totalMatches

lofty rapids
# inland walrus

yes now at the end check if your totalMatches is equal to however many ingredients you have

#

thats the 2 or 3

#

that you need to know

lofty rapids
#

so do whatever you need to do if the matches is equal, but honestly i would start with a print string

narrow sentinel
#

@maiden wadi this point is where I have questions on why it frame spikes

inland walrus
lofty rapids
inland walrus
#

or* not and

lofty rapids
#

think about this for a minute

#

think about what it's doing for a second

#

at the end of the sequence you have the amount of matches in your recipe, to slot keys

#

for now, at the last sequence pin

#

just print string totalMatches

#

and run it, see if you get the matches

#

you should see the total matches that your slots match with your recipe

livid axle
#

Would anyone know why my custom event does not have the input section ?

lofty rapids
#

are you binding ?

livid axle
#

Its bound on an on clicked

olive yarrow
#

There'n easy way to count how many actors are gotted when i Get All Actors of Class

lofty rapids
#

ya it has the on clicked signature

#

you can't change that

livid axle
#

: /

lofty rapids
#

atleast afaik

livid axle
#

I really can't figure out how to add custom events to dynamically created objects then

lofty rapids
livid axle
lofty rapids
#

when you get all actors of class

#

it returns an array

#

get it's "length"

inland walrus
lofty rapids
#

this is the total amount of items inside the array, therefore all the actors "got" from the node

lofty rapids
#

see if those are triggering

#

then if so

#

put print strings on the gets and recipe

#

check that the strings are matching up correctly

#

or you can use watch values, and break points

livid axle
#

But they all get the same event instead of custom events with their name or somethign

lofty rapids
inland walrus
#

It's printing on all 3 falses

Maybe its something to do with when I clear them

lofty rapids
#

actually literally look at them

#

put them up for a few seconds more then usual

inland walrus
#

I do this 3 times

lofty rapids
#

and try to see what your getting

inland walrus
#

Alright

lofty rapids
#

if you do this before the other function then your fkd