#blueprint

402296 messages · Page 768 of 403

onyx token
#

basically the screenshotted code is this function

#

"pick item"

#

but when i do this

#

i get this

#

because my inventory is trying to access an actor that is destroyed

hardy fable
#

So then copy the data you want from the apple before deleting it

bright harbor
#

^^

onyx token
hardy fable
#

Give the apple a struct called itemdata or an uobject with the data but no you cannot expect the apple to be both be deleted and exist

onyx token
#

is it a stupid idea to turn the visibility of my apple off, and set it as a child of my player character when i pick it up?

hardy fable
#

I mean. Yes that can work. It's not elegant but for a simple system you might get away with it

onyx token
#

is that gonna eat alot of performance?

hardy fable
#

Do you expect to have hundreds of these items. Then maybe? Only one way to find out.

#

A couple dozen? Nah you fine

onyx token
#

hm.
I'll try the struct way, you're right, that's probably more elegant before i start fucking around with hundreds of child objects kek

hardy fable
#

Yes keep data in a struct or a data asset or a data table. Each has its pros and cons

#

But generally an actor is not the best place for canonical item data

onyx token
#

hm i see

#

thanks! rooVV1

hardy fable
#

Actors are for visualization of the item when dropped, sure. But for saving and loading the game or multi-player, a unified inventory data system is a lot cleaner than a hundred actors each controlling a fragment of your data

#

I personally like using data assets. They can be subclassed for specialized types of items, unlike structs and don't come with the management horror of huge data tables.

onyx token
#

can't use c++ tho cuu_cry

hardy fable
#

You can make BP data assets...

onyx token
#

oh i can? I thought i needed c++ for it pog

#

so can i add a data asset to an actor?

hardy fable
#

Nope. Create a new blueprint and search for data asset

#

Actors can reference a data asset yes. They do not create them

#

Data assets are unique entities like meshes or textures that other things can reference.

#

You normally don't create them at runtime

onyx token
#

ooh i can use it as a data asset variable...

hardy fable
#

Yes

onyx token
#

I don't like structs very much because they're often buggy in blueprint rescBlank

#

to the point where they bricked an entire project once

hardy fable
#

Yeah lol I feel you there

#

I only use c++ structs now for that very reason

#

*but also source control. Use it

onyx token
#

i know, am lazy, i should set it up BONKcat

#

damn so that means i wouldn't have to make a child of my item for every item i use-
But i could just have 1 Item actor, and a bunch of data assets OhIPanda

gusty cypress
#

Is there anyway to force a teleport, my character won't teleport since target is slightly in ground but I want player to teleport flat and not fall down to ground

#

I think I did this before but it was so long ago

hybrid ether
#

How to make that happen? I have set of current planes that I have purchased. The I have current plane int.

trim matrix
#

how can I has something have Collision but not affect the NacMesh ??

#

I need to allow AI to roam where needed but not collide or have patch obstructed by object

#

if anyone has an idea

#

please

hybrid ether
#

My question is how to set "set" value for example key 2

safe narwhal
#

hello i need help with a bluperint

#

basically i have this blueprint that toggles between Run and Dodge/roll

#

the idea is that if you hold shift you run, but if yyou tap it once it makes a roll

#

i can print a message and the functionality works perfectly

#

but im having trouble with adding what to do when each input is done

#

i followed a tutorial on how to implement the dodging animation but when i put it in the bluieprint it wont work

manic flint
#

okay, I manage to work it out. But it may me think that, instead of using a pawn class for a ship, that I should really look at something like a default pawn or even character as the ship. Does anyone have a recommendation on how to approach this?

dawn gazelle
#

If so, just add it to your map again. The keys of a map are unique and if you add the same key again, it'll overwrite the existing value.

sonic crow
#

is using enums efficient for tracking character level, weapon and weapon variation?

#

Weapon being pistol, machin gun etc...weapon varation being a sub menu within pistol

odd ember
#

enums aren't generally super useful when dealing with infinite sets

#

at least not without some degree of reflection... which again leads us to FName

sonic crow
odd ember
#

there isn't a great way to do this

#

maybe gameplay tags

maiden wadi
#

Level should probably just be an integer. Who knows how many addons you'll end up with. Level 10 in four years can end up being level 600. For weapons, I personally say GameplayTags

sonic crow
#

ty i will research gameplay tags

odd ember
#

gameplay tags being glorified FNames anyway

maiden wadi
#

GameplayTags are the most amazing data management tool.

odd ember
#

well they're FNames at 50% of their potential

drowsy peak
#

So I have this question... I want to get an array from my Plate blueprint, the array is called "Boxes in plates" and it's just made from the boxes are overlapping the plates. I would wish to use it my doors as I want to check if the boxes that are on plates have a certain color (and then the door will open), but I don't know how to share this information (having in mind that I will need to reuse this and it is not a one time and that the number of boxes and plates may change).

#

I can share images if needed

odd ember
#

this sounds extremely confusing

#

can you, in a non technical way, describe what you want to do

drowsy peak
#

Yeah

#

I want a door to open only when the player puts a box of a certain color in a plate

odd ember
#

ok cool

drowsy peak
#

The door may require multiple boxes

odd ember
#

can any of the colored boxes go on any of the plates?

drowsy peak
#

Go as in they overlap or what do you mean?

odd ember
#

so if you have two plates requiring two boxes, red and yellow, does it work for red and yellow to be on any of those plates?

drowsy peak
#

Yeah

#

Any plate

odd ember
#

ok

#

how many colors do you have in total?

drowsy peak
#

4

odd ember
#

do you have an enumerator for your colors?

drowsy peak
#

Yeah

#

ColorEnum that is it

odd ember
#

ok so one way of doing it would be to expose a map of ColorEnum, PlateActor

#

but that locks color to your PlateActor

drowsy peak
#

To expose it?

odd ember
#

expose as in make Instance Editable

drowsy peak
#

Alright

supple bane
#

is there a way I can rotate the parent so the child moves, but stop the child from rotating?

drowsy peak
#

But I don't want to lock color to my Plates

supple bane
odd ember
brazen merlin
drowsy peak
supple bane
brazen merlin
sonic crow
#

Appreciate the tip on gameplay tags I will use it for my weapon system and character level. Would I use Gameplay tags or an Enum for a item powerups, I have about 25 powerups and the enum is setup but is it better to stick with gameplay tags for everything?

supple bane
#

alright

odd ember
# drowsy peak I thought about that, but then what do I do?

so every time you place a box on a plate, loop over the array of plate actors. for each unique color, add that color to the ColorEnum array (check if it is in the array first). then at the end, test to see if the ColorEnum array has the required colors

drowsy peak
#

And if it does?

#

How do I share this as to open the door?

odd ember
supple bane
#

wait nvm

#

I found a new wierd problem

odd ember
#

well you could have it as a component on the door, you could have it in a class that the door actor inherits from. you could have it in the level blueprint. depends on how unique or systemic whatever you're making is

drowsy peak
#

I will try that now

#

Thanks for your help

sonic crow
odd ember
fair magnet
#

Hey everyone :o
I wanna make a world-level-selection...
so you're in a 3D world and the levels kind of lie on the floor.
I also want to connect them with lines that sort of charge up like they do in super mario :o
not too hard but my problem is I also wanna merge and split these lines so there are several paths the player can take...

#

this is what I have for now...

odd ember
#

so like... assemble your own level?

fair magnet
#

nah it's like super mario you enter this world and you can click on any level :o
and I want to connect them with lines but I don't know how I make them "find" a path

odd ember
#

like visual lines

fair magnet
odd ember
#

that have no effect?

fair magnet
#

yea

#

only visual

odd ember
#

that's a #graphics question then. but for the level question, you can just have a collision box with the Open Level node

fair magnet
odd ember
#

but like if you want to insert boxes like that you'll have to customize it a bit

fair magnet
odd ember
#

if you create points before and after corner curves you should be fine

brazen merlin
faint pasture
#

@fair magnet as long as you're not doing anything too exotic like seamless transitions or whatever, just your classic overworld system like super mario, you're basically going to be making a separate level with its own mechanics and entering a level is basically a hard load. In terms of layout, you can either do it by hand or have some sort of data representing your game levels in the connections between them and parsing that. I would start with just laying out your overworld by hand and figure out how you want it to look and behave. Splines and spline meshes are going to be your key.

#

You could start with just pathfinding to portals to levels, we don't know anything about your game mechanics so we don't know exactly what type of movement you would want.

fair magnet
#

it's literally just a level selection :o player can float around and click on the "level 1" or "level 2" to enter them if unlocked

#

since spline meshes are using relative locations I can't really figure out how to do it

faint pasture
#

So what's your question? How to load the level when they click on the widget or what exactly?

fair magnet
#

how to do the math so these widgets are connected with lines

odd ember
faint pasture
#

Yeah for that you're going to want splines.

fair magnet
#

like that but with corners if level 2 is more to the right for example

odd ember
#

replace widget with mesh as necessary

brazen merlin
#

dont use widgets?

fair magnet
odd ember
#

let them use what they want tbh

#

doesn't make a difference

fair magnet
#

whats wrong with my widgets q-q

fair magnet
#

so should I just make like an "line actor" with a spline ?

odd ember
#

yeah

fair magnet
#

and the logic?

#

k will try

odd ember
#

on begin play you can have the logic spawn widgets

#

or actors or components or whatever you need

trim matrix
#

whats best way of checking if there is an actor at a specific location obvs for loop but without having multiple collision boxes everywhere for each individual area how could i do it more effectively

#

for example if I already know location where each actor is at game start is there something in the engine that can use location to see if actor is at that locaion ?

fair magnet
#

@trim matrix am I just stupid rn or... is the equal node what you're looking for ?

odd ember
#

what's your use case?

trim matrix
#

equal ??

fair magnet
#

yea

odd ember
#

I'm not even sure what you're asking lol

trim matrix
#

so i'm bassicaly trying to make Pak man like

fair magnet
trim matrix
#

in the game you collect the fruit and all the powerpellets respawn for next round

fair magnet
#

however this just takes an exact value if it's even one 0.1 off it will give false

trim matrix
#

what I need is a way to check does a powerpellets already exit at location X if no then spawn one

#

becuase there is alot of power pellets to run collision checks would be heavyto do

odd ember
#

how do you determine the spawn for normal pellets?

trim matrix
#

as in ??

odd ember
#

I assume you spawn them in... or are they manually placed?

trim matrix
#

manually placed on map

odd ember
#

I see

trim matrix
#

then when they need to respawn at the min I have the engine remove all of them

#

like get all actors etc and destroy

static charm
#

save the default starting locations, then add the ones that are used/collected/missing, and respawn as needed.

trim matrix
#

so far i have been using an array which there all saved in at start of the game

odd ember
#

well basically you're making a powerup spawner. so I'd make an actor with a trigger box and in each location, that spawns a power pellet. you can query the trigger box actor to see if there still is a power pellet or if it's been taken

#

it can also handle a cooldown so that it automatically respawns

static charm
#

i'd just save the pellet info when the pellets are used/taken by the player

fair magnet
#

or just make one actor add an vector array with 3d widget and iterate over it

#

then make another array that just saves the pellet state

odd ember
#

there is such thing as over engineering

fair magnet
#

future proof

static charm
#

a trigger box for each pellet sounds like overkill though, especially if this is mobile game

odd ember
#

future proof is what I suggested

trim matrix
#

so I would have a spawning actor

odd ember
#

since it's in an actor that's contained

dreamy ice
#

Best practice for storing code that externally effects a players health/speed/ect... would be as an event on the player or in a seperate object that manipulates the character itself?

odd ember
#

can be put on other actors too

dreamy ice
#

its triggered by a component.

#

so maybe in an object triggered by the component?

odd ember
dreamy ice
#

spawned during use then destroyed when out of use.

odd ember
trim matrix
#

how would i link each pellet to it's location as at the moment I kinda know the spawning process

#

it's making sure if there pellet is valid but location it is on it dosen't just skip over the location when there is actually no pellet there

fair magnet
#

very basic

odd ember
fair magnet
#

if false then add

#

if true do nothing

#

or whatever you like

trim matrix
#

arr so didn't mention this the Game Mode atm is handling this haha

#

so lets change that

odd ember
#

well to be honest, the spawner actor is something you might need any how

#

you can always let some system spawn a pellet spawner

#

which gets a bit meta

trim matrix
#

as would we be actor component or just actor ?

odd ember
#

actor

#

you have to place it in world

trim matrix
#

i've done that

odd ember
#

right but you need to add logic to it

trim matrix
#

so guessing on begin play we need to get the ones in the level so far which is fine

#

I can use get all actors

odd ember
#

I don't know which method you're using

fair magnet
#

I think... that's what you want isn't it ?

#

that you can put into an actor place it at like... 0,0,0 and then create the vector locations using the 3D widget

odd ember
#

that setup can lead to double spawn bugs tho

fair magnet
#

like how

trim matrix
#

well thats what i'm thinking

odd ember
trim matrix
#

so far I have already had that kinda of workflow break the game as it rtys spawning based on location and if it dosen't know an actor is there it will spawn mulple time

#

it bricks the game like haha

odd ember
#

that's why I am suggesting the spawner actor

#

since it spawns the actual powerpellet, it has knowledge of whether the powerpellet is in world or not. you can query it for whether the power pellet is currently spawned or not

trim matrix
#

if you kinda work me through this spawner thing I kinda get it it's linking between the various pellets and there locations

#

ohhhhh

odd ember
#

it's very similar to something like a weapon spawner in unreal tournament or what have you

#

in this case just being a power pellet instead

trim matrix
#

cause I can spawn actor at each Pellet location and as it does this remove the location from the array so it dosen't double spawn

odd ember
#

well you dont even have to check location

#

you can just ask the spawner to respawn a pellet and let the spawner itself work out if a pellet already exists or not

trim matrix
#

thats the bit I kinda get stuck on

#

who would the spawner check is there a pellet at the location ?

static charm
#

why are the pellets missing in the first place?

#

just save which ones are missing

odd ember
trim matrix
#

so the spawner will just have an array of pellet locations and array of SpawnedActors from start of the game. When it respawns I don't know what code is needed to have it check at Loc 0,0,0 is there a pellet

odd ember
#

no the spawner spawns just one pellet

#

so you'd put down a spawner where you want it in the level

trim matrix
#

ohhh right

odd ember
#

and then you can do, as you suggested, get all actors of class for the spawner

trim matrix
#

and then iterate through the spawners in the level to say

odd ember
#

go over them and call Respawn

trim matrix
#

if there is not a Pellet then spawn one

odd ember
#

and the spawner then decides if it needs to respawn, or if the pellet already existed

trim matrix
#

so I would need a collision box for the main spawner

odd ember
#

well you might not need one

#

if the pellet has a collision then you can just create a binding

trim matrix
#

hmmm not done that before

#

please elaborate

#

also the pellet does have collision

odd ember
#

it's basically an event dispatcher

trim matrix
#

the player uses it to collide with pellet to destroy it

odd ember
#

that you bind after you spawn the pellet. then when the pellet gets eaten, the dispatcher gets called, and the spawner then knows that the pellet has been eaten

trim matrix
#

would it now it's specific pellet was eaten. and not one across other side of the map ??

odd ember
#

it only controls one pellet

#

only one pellet per spawner

trim matrix
#

so the spawner would have a child actor technically the pellet

odd ember
#

if you then want to create a spawner manager that manages these actors across the level, feel free

#

but game mode can do this for you tooo

trim matrix
#

well i was planning to use that tbd

#

tbf

odd ember
fair magnet
#

what about that? :o any better?
gotta admit using 2 arrays theres can lead to problems if one index doesn't fit the other

odd ember
#

still seems very error prone

static charm
#

wait if all he's trying to do is respawn destroyred pellets

fair magnet
#

like how? xd

static charm
#

....

odd ember
#

same way as before

trim matrix
#

So i would have my spawners like so each on is it's own actor

#

then at start of level it spawns the pellet at it's location

odd ember
#

because you're not controlling how an actor is spawned, it doesn't matter how many arrays of locations you are keeping

fair magnet
fair magnet
#

this controls how they are spawned ? o.o

#

obviously he can't use like another spawner or smth then? but if he just uses that it's fine

static charm
#

On Pellet destroyed, save location/pellet index to an array, then respawn from that.

#

simple and done.

fair magnet
#

oh btw @odd ember I tried what you told me with the spline and spline mesh :o it... sort off works but sort of doesn't

#

it kinda drifts off for some reason

odd ember
#

you need more polygons

#

in your spline mesh

icy dragon
fair magnet
#

how do I increase them? :o

icy dragon
odd ember
# fair magnet but that's exactly what I'm doing lol

I think the point is they're coming from a point of having tried setups like these where double spawns are an issue. I'm just trying to solve that problem and keeping everything manageable. having a manager looping over locations or whatever isn't great in situations like these. it's better to have the actor itself be aware of its location and passing this on.

odd ember
#

use blender or what have you

fair magnet
icy dragon
#

In Blender, make a plane, go to edit mode, make 32 or more edge loops, export as FBX, then profit

faint pasture
#

@trim matrix If you have a grid like setup, use a map

static charm
#

🦇 🐴 ☠️

faint pasture
#

A map of int vector 2d to enum or actor reference would make anything you're doing on a grid way easier.

keen prairie
#

super newb question - how can i get my player character's movement speed so that i can check if they are moving?

odd ember
#

otherwise if you're looking for if the player has movement input, check the axis values

keen prairie
odd ember
#

and you'll have a float

keen prairie
#

oh. i'll try that, thank you

haughty axle
#

have a question, is there anyway to delay player spawning, cuz now i have rng map and i get the location but can't figure out way to delay the spawn time

dim robin
#

use delay

odd ember
haughty axle
#

nope, i set my own spawn location, but due it takes 1-2sec to generate map, he puts player to soon and in goes under map 😄

odd ember
haughty axle
#

ummm... yes/no 😄 i just set it's location. and then it spawns 😄 being honest idk how to control spawning

odd ember
#

if you're not spawning it manually

#

you'll have to do a little extra

haughty axle
#

i'll have to do little extra

odd ember
keen prairie
#

i have a sprint toggle system. when the player stops moving, i want the player to walk the next time they move. BUT using the 'movement released' means that if they are strafing with WA/WD keys, and choose to drop the direction/sprint forward only, they return to walking again, since a movement key has been released.
i thought that replacing the input with a check to see if the character is moving would fix the problem but it does not. what other ways could i try? sorry for the long message

faint pasture
#

@haughty axle look into the spectator pawn class and the game/match state functions in GameMode. I don't remember the specifics but you can wait until your map is ready then call Start Game or Begin Game or whatever it's called, them it'll give the players the default pawns.

wooden tiger
#

Hey hey! I’m trying to make something like this…
I need a drop down that allows me to change its value on each instance of an object. Anyone have a video or screen shot of how to do that?
In this example it’s of an npc where you can change the weapon it’s using. I didn’t create the BP so I haven’t a clue how to do it.

odd ember
dim robin
#

sorry not sure if this is the right channel, but is there a way to model a loft nurb with splines in blueprints?

keen prairie
odd ember
#

but tbh just use if (MoveForward == 0 && MoveRight == 0) { IsSprinting = false; }

faint pasture
#

Keep track of speed (velocity length) and do logic on that.

keen prairie
keen prairie
odd ember
keen prairie
odd ember
#

they're also on the Input events

wooden tiger
#

Any idea about my post?

#

Is it too vague?

odd ember
#

it's just an exposed enum

#

create an enum

#

expose it

#

done

wooden tiger
#

Okay, that’s a good start

#

Thanks

keen prairie
#

? 😅

fair magnet
#

:o

odd ember
#

yeah use boolean and

keen prairie
#

like this?

#

where do i put this in my graph?

odd ember
#

where your input events are

#

or in a function so you can call it in multiple places

#

idk

keen prairie
#

omg it works :O

#

thank you so much 😭

haughty axle
#

@odd ember so i did this, removed default pawn class, and did in game mode BP to get location and spawn actor from class, it works. and it doesn't matter how long it takes to generate map it spawns after. BUT.. if I put delay it messes up (overall I don't care about it tho 😄 ). so idk what the hell is happening but now works 😄

#

also i can't go huge numbers in for loop's and i get inf loop 😄

odd ember
haughty axle
#

@odd ember it's fine cranked up loop iterations in project so he generates larger map just for testing

light token
#

Anybody got an idea why my material is showing up translucent?

light token
#

Alright will go there, I'm always very confused as to where to ask questions. Thanks!

dreamy ice
#

So in my abilities I have an actor component that holds the data on which abilities to cast, and I was going to store the ability logic itself within objects, but I can't spawn actors from an object, which poses a problem. Any suggestions?

static charm
#

you can make a spawner actor/manager

#

or just make your object an actor

icy dragon
dreamy ice
#

is there any major performance difference between an actor or object?

static charm
#

making it an actor doesn't add much overhead

dreamy ice
#

alr thanks!

pine idol
#

How would you create a road system that generates itself, including intersections. During editor, or runtime. This is the closest I've found to what I want, but I've never been able to figure it out, or find a released product: https://www.youtube.com/watch?v=9uQwSx7m3CE

Procedural generation of editable intersection.

More at Unreal forums: https://forums.unrealengine.com/community/community-content-tools-and-tutorials/1433781-tool-procedural-street-and-intersection-building-tool

Demo of the alpha version for the street and intersection building tool (plugin) for Unreal Engine 4

▶ Play video
#

BP or CPP

latent ginkgo
#

hi, I have videos that plays as an outro and intro for my game and several videos that are in game aswell.

my problem is, when they play, it shows the previos video for a split second before playing the actual video

#

any idea how to prevent this?

silk cosmos
silk cosmos
wooden rapids
#

does anyone know why DemoNetDriver Console Comand demoplay test give me a Black screen no lights .... i set everything to replicated

cerulean raft
#

Hi, weird issue.
So when I press left mouse button and this condition is true then this should call the print node. But it doesn't, it only calls when I double click.
Why??

#

The logic seems pretty straightforward

dawn gazelle
pine idol
pine idol
#

<@&213101288538374145>

#

welp, beat me to it

#

lol

#

my bad. haha

trim matrix
#

Guys, is there a way to disable collision on a specific area of a mesh at runtime? I want to be able to put doors at runtime, so hiding the part of the mesh and disable the collision there seems like a good idea

zinc blade
#

what's the difference of Spawn Sound 2D and Play Sound 2D?

brazen merlin
atomic salmon
trim matrix
atomic salmon
#

@trim matrixProcedural meshes can be used, among other applications, to create sliceable elements or mesh modifiable at runtime. Sounds close to your use case. I would also have a look at modular elements though. You can take a wall (or portion of it) and, at runtime, swap into place a different element with a door and appropriate collisions.

trim matrix
# atomic salmon <@456226577798135808>Procedural meshes can be used, among other applications, to...

I don't think modular parts will work, as the gameplay element consists of dragging walls out and placing a door at non specific position, kind of like how it happens in the Sims games. Currently, I made it so dragging the walls out is done by scaling a cube in x,y,z + using world aligned textures so UV's won't mess them up. Now I have to figure out a way to make holes in them at non specific position.

gentle urchin
#

Procedural mesh

#

hit location, door size, wall bottom and calculate the verts

#

So you can use the current wall, and when door is placed you replace it by procedural mesh

#

Or you can fake it with smaller wall segments and some material wizzardy

#

when a door is placed, you segment the wall into 3 (or more) pieces

#

the door can even contain the top part(2) in case you have some curved door top

#

I think this approach is easier, and prooobably more performant

trim matrix
#

That's cool! So, do I just use the bp slicing on the procedural mesh to segment it?

gentle urchin
#

Think so,

#

havn't really used it... I ment segmenting it by replacing singular wall segment with several smaller ones, but slicing proc mesh surely would work aswell

obtuse herald
#

If that doesn't work you can also try a more hackier approach via collision channels and overlap boxes

trim matrix
obtuse herald
#

And I would use render targets for the masking

gentle urchin
#

wouldnt that be relatively expensive?

#

Render targets.. maybe they are cheap and im just doing it wrong lol

obtuse herald
#

I don't think render targets are expensive

#

The thing that renders the scene into one are

gentle urchin
#

Ah alright

obtuse herald
#

But using a 256x256 render targets for masking should be no problem

#

You just need to get the stretching right

gentle urchin
#

align it with simple snapping, and nobody will ever know 😛

#

I'd still imagine some ISM method would be the cheapest method to go about this

#

but could get complicated with materials

raw orbit
#

question, if im casting to an actor is it a little cheaper to cast to the highest parent possible? lets say i want to retrieve the player, would it be cheaper to cast to pawn(assuming pawn is sufficient for my purposes) or would it be a little cheaper to cast to the lower member, the last child, like myplayercharacter instead of pawn or character

gentle urchin
#

depends on how much you've extended on the subclass i think ?

#

Im a bit curious about this aswell

#

In a scenario where you'd use a parent class that holds all the possible events and callbacks that a child has, but 0 implementation. Would this be relatively cheap to keep a reference to, or will it be equal to the child with the implementations somehow?

heavy ravine
gentle urchin
#

its tricky if the font is non-uniform

#

In such case i think you're best off just assuming worst case (max width char)

#

If its unisized, then .. well unisize 😛

#

for size;

#

think this is more #umg tho

heavy ravine
#

@gentle urchin Thanks! I use mono-sized font

gentle urchin
#

that's the name of it.. mono-sized! 😄

heavy ravine
#

🙂

blissful widget
#

Has anyone done unit tests for BP, especially function libraries? Surely it should be a thing 🤷

small cloak
#

Hello. Is it possible to use a line trace on a dynamically deforming object (like with world position offset in shader) I want to implement something like digging into sand. Thanks

azure bolt
#

Hi I've got a spline mesh which i am adding a new spline point to which works, but the mesh doesn't update... only if I do it from the editor. (turning the finalize railway boolean on or off) Does anyone know how i can get this to work in blueprint?

#

spline mesh variable is this

naive grail
#

This is a variable of a structure. Can i get widgets from engine and give to this variable or must i create slate?

TSharedPtr<class SWidget> WidgetLoadingScreen;
gentle urchin
azure bolt
gentle urchin
#

yeah

azure bolt
#

Alright I'll try that out, thanks

azure bolt
visual vigil
#

Does monatge on interupted works. Currently it seems to not working for me. If my player interrupts enemy attack by hitting him 1st my enemy doesnt sets its state to idle??

gentle urchin
#

Probably if you call Montage Stop ?

celest steppe
#

Very important question about LevelScriptActor and Level blueprints in general.

I have sometimes heard that the level blueprints should not really be used. Is that correct and what are the reasons for it?

I noticed that the level blueprint is also just an Actor (LevelScriptActor), which would be one more reason to use them for scripting (because they are easy to use etc).

atomic salmon
#

@celest steppethere aren't many reasons for using Level Blueprints except maybe some quick hacks/test code and to handle/tweak level streaming

celest steppe
#

ok, thank you for clarification

azure sparrow
#

Hey, how to set material for each face of a cube through code? (Blueprint)

celest steppe
#

DopDie: you don't set the material for a face, but for the material slot

#

if your faces all belong to the same material slot you can set the material for the slot and it's applied to all faces

#

(exception: the procedural meshes you can generate through blueprints)

#

(I guess there you can set the material ID per face or something like that)

bronze hinge
#

It's a long shot, but I don't suppose any has done a LineTraceByChannel that has an Actors to Trace instead of Actors to Ignore before? Got a workaround doing a 'valid' loop on the hit objects, but feel this isn't efficient

finite flax
#

I need to add snap rotation to The “Add Controller Yaw Input”

Like 45 degree angle snap, please just tell me what to add to get it working with the “Yaw Input” because as for now, the rotation it has is smooth rotation with no jumps, i need the jumps like 30,45 degrees thing add to it specifically.
thanks for the help everyone

dim robin
#

can you redirect me to any sort of guide/tutorial/resource to be able to create a sort of "battle pass" system for my project?

odd ember
#

what is a battle pass system?

dim robin
odd ember
#

I don't think there's tutorials for that because it's very high level

finite flax
#

@odd ember pardon my ignorance

odd ember
#

look at the name of the float you get

finite flax
#

what should I search for?
and from which node it's coming out exactly

dim robin
odd ember
random plaza
#

the best way to have NPC positions saved is having a master array of saved npcs and loading them based on what map you're in and if their variable says they're dead or not, right? its been working for me and its a lot easier then having different arrays for different levels.

tawdry surge
#

Hey, I'm trying to set up a 3d widget for the player to click on. Everything works fine in stand alone, but I can't get the click events to fire in listen server or client modes

gentle urchin
tawdry surge
#

Searching a massive array of all the enemies in the game sounds inefficient

bright harbor
#

hey so i have a player who plays an attack animation and has a combo system, it all works fine, but i want it to be able to affect physics objects in the level, so i turned on collision during the animation, but when you hit the phyisics objects, it hits them WAY too hard, is there any way to fix that?

#

like the objects go flying across the map

gentle urchin
spare pike
#

Is this the best way for sending an interface message to all available actors? Or is there a more efficient way?

gentle urchin
#

If its something you wanna do alot, subscribing to dispatchers should be considered imo

maiden wadi
#

Alternatively, at least parse the larger array into a much smaller one for runtime use.

tawdry surge
#

Does anyone have a clue about my 3d widget issue?
I've been searching and can't find anything about it specifically.
And since it's not owned by any particular player the usual method of deceminating 2d widget interaction to the players doesn't apply

odd ember
obtuse herald
#

GetAllActorsOfClass is not that inefficient like everyone says

#

GetAllActorsWith [...] however is

supple dome
#

Oops, i thought you meant With... was faster, ignore me

odd ember
odd ember
#

and I doubt the speed is much faster if I am being honest. maybe there's an interface lookup table somewhere that is smaller than the list of actors in level, though I'd still not think it necessarily faster

obtuse herald
#

GetAllActorsOfClass uses a hashmap

odd ember
fiery glen
#

does the animbp have the default montage slot in it?

vast finch
#

hi, im intressted in the limitations to make bluprints in to full C++ code. Anyone that culd elaborate on this wuld be mutch appriciated

tawdry surge
#

If you mean nativization, it's pretty limited.
If you mean what can you manually transfer from blueprint into C++ code, pretty much anything

silk cosmos
# safe narwhal

You need to plug a skeletal mesh into target, or else you're not telling the anim montage what to play on. You also need to set up your slots in your abim bp

vast finch
#

@tawdry surge okey thx for reply, pls explain abit about nativisation 🙂

gentle urchin
#

Isnt nativization deprecated?

tawdry surge
#

Yeah, cuz it's terrible

tawdry surge
#

Idk what specifically it breaks but I know its too many things for anyone to use it really.
Best way to find out would be make a copy of your project and try it

faint pasture
#

If your code is too heavy for blueprint, manually bring it to c++. If it's not a problem, who cares, ship it. It's not like anyone's going to give you extra points for moving a mechanic to c++, just do what needs doing to make your game hit performance targets

tawdry surge
#

Or try to refactor so your code is lighter.
Either way it's easier to optimize the flow in BP

odd ember
#

it's good to establish code practices for this early on

#

e.g. make your own components in bp, inheriting from its cpp counterpart

#

then one can gradually move code over

#

function by function even

vast finch
#

👍🏻

tawdry surge
#

Ideally your BP will just call cpp functions and pass variables around

odd ember
#

bp functions are just wrapped cpp code anyway

tawdry surge
#

I meant functions declared and defined in the cpp parents as opposed to one created in BP

odd ember
#

does it make a difference if those functions are from the parent or from any other part of the engine? ... not really

tawdry surge
#

Correct, as long as it isn't another BP graph wrapped in a function node, and it's actually calling the function from a cpp file, it doesn't matter where its stored really

odd ember
#

I mean you're still only paying a fractional cost. BP cost is high when considering all BP calls are about 10x more expensive. but in reality, there real takeaway is that you don't really see those 10x except under extraneous circumstances. BP wrapped graph may double the cost, but in the graph scope of things that's still fairly minimal

sonic oak
#

I read from DataTables pretty often and wanted to consolidate the 'read all rows and return them as an array' to a single function so I created a macro for it but it seems that I can't make an array within the macro, add to the array, then return it all within the macro. Any ideas how I can achieve this?

odd ember
#

just make a class that is commonly available read from the data table and store it there

dim robin
#

first time i see a "make array" attached to the "add"

twilit heath
#

this is a point in your life where you should consider using c++ 😄

sonic oak
#

yeahh I figured this is the limitation of BP only Sadge

#

time to fire up the monster that is VS pepeW

twilit heath
#

datatable already has GetAllRows function, its templated, so blueprints can't stomach it

sonic oak
twilit heath
#

VS without intellisense upgrade is something you will regret

faint pasture
#

I love it. But then again I don't really have any muscle memory with either one, the ide I used the most before any of this Game Dev stuff was eclipse LMAO

sonic oak
#

Oh wow that's convenient, I used Rider for years with Unity

fiery glen
#

it's not going to be free forever just fyi

faint pasture
#

I can't speak for the greybeards, but in my experience, it's f****** awesome.

odd ember
#

vs22 is pretty good

dim robin
frosty berry
#

Can anyone tell me what the Node type is for the circled node?

faint pasture
#

@frosty berry that's the one minus. It says right there.

dim robin
# odd ember https://tenor.com/view/why-huh-but-why-gif-13199396

i just honestly don't know the difference between a "make array" or creating a variable of whatever type i need, set it to array, and populate it. i find it easier, faster, and also "easier to read" but disclaimer: i'm a noob, i just do what i can the way i can 😄

frosty berry
odd ember
frosty berry
frosty berry
sonic oak
# dim robin

What do you mean by 'attach'? I ended up going with this, which looks like what you showed but specifically I had to use the local array of * node to 'attach' the array.

odd ember
dim robin
zealous moth
#

can i make a rotator from a forward vector?

odd ember
#

yes

#

rotation from x vector

zealous moth
#

got it

#

hey it works

#

ty

past spoke
#

hey guys

#

does anyone know how to replace the default character BP jump animation with one from mixamo

#

trying to replace this

fiery glen
#

change the animbp

zealous moth
fiery glen
#

to use your new jump animations when entering the jump state

past spoke
#

yeah its already there

odd ember
past spoke
odd ember
#

the jump mechanic doesn't change in BP

#

it's all animation based

past spoke
odd ember
maiden wadi
brazen merlin
# dim robin i just honestly don't know the difference between a "make array" or creating a v...

sometimes make array has to be used. One example is if you have a bunch of widgets that you've placed for ui, but want to reference them via array, these are existing objects. I'm sure there would be the argument that they should be generated procedurally, but some cases dont merit this. By using Make Array, these specific objects can then be set to an array for future referencing.
Another example is on a line trace where a the collision filter type is an array. Using make array lets you plug in the one or two collision channels without needing to make a variable (unless it is suppose to by dynamic).
Another example is referencing pre-placed objects, such as waypoints in a level that an AI will access to follow. These are not made at runtime, yet a reference to them is needed, therefore Make Array can work to plug in each of those waypoints.
As you point out, it's not always needed and in some cases not using it is better than using it.

sonic oak
dim robin
odd ember
maiden wadi
#

No experience with unity. But Datatable lookup is extremely fast.

sonic oak
#

I am completely new to UE though, it's a pretty different game from the many years I have in Unity

odd ember
maiden wadi
#

Why not just have the actors themselves look up the data they need? Datatables are static data, so anything in blueprint can get access to it.

#

If it's for spawning, definitely game mode. Safety concerns, etc. If it's for runtime stuff, the actor itself can look it up.

sonic oak
#

I do have it attached to the actors themselves at runtime for some, but I have some datatable data used in a widget also which is what my question was originally intended for

odd ember
#

sounds like it is within gamemode scope regardless

#

and it saves you having to query it all the time

#

which is just weird

sonic oak
#

I don't query it all the time though

odd ember
#

do you query it more than once?

maiden wadi
#

Not really necessary to keep it in GameMode. A pointer to it in the widget or actor is perfectly fine.

sonic oak
#

I don't query it more than once. However, I do load data for each 'player type'. I suppose in a multiplayer context, the client may end up trying to query for more than just the client's player, so I will look into that.

odd ember
maiden wadi
#

Game mode is actually a really terrible place to be keeping static data unless it is only ever required for guarded things like spawning gameplay actors with specific stats. Widget implies UI. That's definitely not guarded data. It's perfectly fine to just have a static pointer to the datatable in the widget to use for setup by pulling the struct it needs from the table on construct or an init function.

faint pasture
#

For a camera not attached to the possessed pawn, would you guys recommend a separate actor or can we just use the player controller for this purpose. We don't want camera implicitly tied to the pawn because reasons.

odd ember
maiden wadi
#

I don't personally see the point of tying static data to a game class.

dim robin
odd ember
maiden wadi
#

How is that easier to GetGameState, CastToMyGameState, GetDataTable easier than just making a pointer of datatable type and setting it?

odd ember
maiden wadi
#

I'm assuming that it's going to be loaded whether it's on the GameState, or a Widget. And the GetDataTableRow/FindRow<>() is the same regardless of whether it's a static pointer in the Widget or on GameState. So going through GameState is just unnecessary indirection.

odd ember
maiden wadi
#

Pointers are extremely cheap. Having thousands of widgets with a pointer to the same datatable really isn't going to be an issue.

odd ember
#

I would always centralize data for use between different actors multiple times

#

more performant, less repeat code

maiden wadi
#

Personally. I have a single DataAsset pointer on GameInstance and a lot of getters that access that asset, sub assets and any tables on them. Which I do prefer because most of thema re designed not to even copy the full struct when returning data. But in regards to being newer to Unreal, having pointers to static data is a very easy way to work.

odd ember
#

it's still not advise I would give out as it adds more tech debt than it is worth

wanton sun
#

I integrated another project into my own and theres a drag inventory widget however when i drag the widget the title bar text offsets to the right a bit, any idea on how to fix that problem

odd ember
#

there's a faster way and there is a better way. and as you know most often those two are mutually exclusive

errant terrace
#

Hey guys, I have a working clock/Calendar in my build, and I have a day/night cycle, does anyone know how I would go about syncing them together?... I know it's a bit of an ask without seeing the BPs, but there are probably too many BPs to show..

maiden wadi
#

DayNight should have access to the clock. DayNight should eitherr poll clock when it's set to update, and check for time of day to update itself. Clock should work as intended and not care about DayNight

faint pasture
#

When at all possible, dependencies should flow in one direction

#

Character knows about gun, gun doesn't need to know about character. Sun knows about time, time doesn't need to know about sun, etc.

errant terrace
#

My Day/Night is currently using Event Tick and Delta Seconds, so what should I be using?

dim robin
#

and what is the clock output? a string?

faint pasture
#

Didn't you just say you already have a working clock? Just get the time from that

dim robin
# errant terrace My Day/Night is currently using Event Tick and Delta Seconds, so what should I b...

i don't have time to watch this, but... https://www.youtube.com/watch?v=x3xBtPIVWEs

This video explains how to create a day/night cycle in Unreal Engine 4, including a moon and working clock, as requested by isaiah games on discord. Topics covered: Material functions, post-processing, blueprint scripting, level blueprints, HUD elements, animation timelines.

LINKS:
Moon Tutorial - https://youtu.be/thF80XvnqMo
Colored Fog Tutori...

▶ Play video
halcyon grove
#

I'm looking for a resource for how to approach item stat rolls, does anyone have any suggestion I can look at?

#

instead of having predetermined stats from a csv file for example

odd ember
#

random?

halcyon grove
#

semi

#

for example

#

say some armoured boots would have a "primary stat" which it would always roll such as armour + X

#

but sometimes it could roll + X Dexterity

#

or if they were very heavy even - X dexterity

odd ember
#

sounds like random

halcyon grove
#

so ive worked out all my stat modifiers

#

and am happy to work it out on my own but maybe instead of reinventing the wheel there would be a common way to approach this?

#

yes even if there is a random example

#

I can fix it to suit my needs

unreal quail
#

I'm having an issue with my projectiles, I have a crossbow that shoots projectiles that initially don't have simulated physics but when they hit something I want them to simulate physics, however this seems to be making characters able to step on them (which leads to them being able to move characters when they shouldn't)

#

does anyone have an idea on how I could fix that?

#

CanCharacterStepUpOn is set to No on all every component

dawn gazelle
sonic crow
#

I have successfully imported Data Tables into ue4, my question is how do I create branch logic based on integer data on specific rows (one column has the level of the character the other has the level of the weapon experience) I would like to use if else logic to determine a specific result based 2 columns of a row

halcyon grove
#

tahnk you @dawn gazelle I'll do some digging into that

#

the closest thing I could find was weighted loot tables

#

which definitely can be used for some of what I'm trying to do

sonic crow
# halcyon grove the closest thing I could find was weighted loot tables

a weighted loot table is not what I am looking for, I want to modify my bomb explosions based on the level of the character and the level of the experience with the weapon. I do not need the loot to drop. (I will use a weighted loot table somewhere else thanks for making me aware of this but not the solution I am looking for)

halcyon grove
#

@sonic crow we were having separate conversations I wasn't replying to your question

faint pasture
halcyon grove
#

no worries 🙂

faint pasture
#

@halcyon grove here's how we roll our items.

We start with the level. It is plus minus one level of the current map level.

Given the item level, we have a weighted roll table to choose the item base.

We roll for rarity. In our case, rarity is just the number of mods.

We roll for mods. In our case mods are multiplicative only so the item level doesn't come into play. If it did, you would have some sort of function per mod to determine the mod stat values given item level.

At the end we have our super flaming minigun of piercing or whatever

trim matrix
#

Is this the correct channel to ask about materials?

brazen merlin
trim matrix
#

Cool thanks

eternal drum
#

does anyone know why my ocean is completely frozen'

halcyon grove
#

this is exactly what I was looking for

#

last thing is for "item abilities" presumably these are stored as functions?

eternal drum
halcyon grove
#

or macros if they happen over time

faint pasture
halcyon grove
#

yea for sure

#

thanks for that

faint pasture
#

GAS is probably the "best" way to go but it can be a handful

sonic crow
#

I am trying to use a data table row number which is set to an integer already to determine which switch int to use, the problem is I am not sure how to get my datatable to feed that information from my Row column

halcyon grove
#

GAS?

#

ability system using C++ ?

#

thge integrated one?

faint pasture
#

Ya. It's great but a pretty big undertaking. If you're nooby idk if I'd bother with it.

halcyon grove
#

yea im not getting into that

odd ember
sonic crow
gentle urchin
#

Select? How about multiply? 😅

#

100 + (100*row)

faint pasture
#

We branchless now

gentle urchin
#

I prefer to avoid them if i can really, but not for any cost obv

#

Ending in some obscure formula is just weird

odd ember
#

I'm not sure of intention I just don't like seeing random switches

high ocean
#

Is this possible in blueprint function library? I'd like to make a function that defaults to self (of specified class)

gentle urchin
#

Dont think so. Whats the intent?

#

Target here is the owner of the function.. in a library, the library is the owner of it...

maiden wadi
#

@high oceanYou can hide the world context pin, if that's what you're after?

surreal peak
#

oh frik

#

I didn't scroll hehe

sonic crow
faint pasture
odd ember
surreal peak
#

;_; why is the GetDataTableRow node not connected

odd ember
maiden wadi
odd ember
#

seems like there's an increase in titles ending in -eers

high ocean
#

@gentle urchinUnified hover mechanics for UI buttons/text/whatnot with some exposed parameters. But since ALL buttons will use it, I wanted to skip connecting the "self" for various button presets I have.

#

@maiden wadiI don't think so, I'm not even sure what "worldcontext" does really 😅

odd ember
high ocean
#

Yes... Still nothing 😅

surreal peak
#

For stuff like this you usually make a Button Widget

odd ember
#

no it means that you're ensuring that you're calling this inside a world

surreal peak
#

And then reuse it

sonic crow
# surreal peak ;_; why is the GetDataTableRow node not connected

Apologies I did connect it, just disconnected it while playing with blueprints to figure out how to pull row data into the switch so that the correct information is pulled from the data Table, however it seems datatables are a bad way to go and it is easier to define the varaibles or use enums, however I was told the right way would be with data tables, it is just trickier to setup.

surreal peak
#

So you wrap the native one into your own

high ocean
#

Made several @surreal peak And I'm reusing them.

surreal peak
#

You will only not need to connect "self" if you are calling it inside the instance

#

If you call teh function on a different instance, you need to connect that one to the target pin

high ocean
surreal peak
#

Not much to get around that

sonic crow
surreal peak
#

WorldContext is a UObject* you can provide that the function uses to get the UWorld, so the current World from.

odd ember
surreal peak
#

Static functions have no access to World function otherwise

odd ember
#

there are cases sadly where you can't get world context

high ocean
#

yep, never used one, can't see a scenario where I would (ofc I'm no programmer/any good with anything tho)

odd ember
#

for instance in utility blueprints or widgets

odd ember
surreal peak
#

It's more of a C++ thing tbf

#

In BPs you usally don't get in contact with it

#

Your Blueprint Function Libraries utilize it

high ocean
#

figures, read up on them and they seem useless in bps since you basically use functions to reuse functionality which beats the purpose of them being constant - unless they're just refs, which I usually handle through interfaces+flibrary anyway

surreal peak
surreal peak
#

The SetRenderOpacity node is defined in the UWidget class

high ocean
#

Ok, so all in all, I can't simulate the "self" by default behavior I see in native functions

surreal peak
#

Which ultimately all your Widgets inherit from Iirc

#

You need to connect the Target pin by hand

high ocean
#

@surreal peakGreat, thanks for the help 🙂

surreal peak
#

The only automated way is "self" itself. Which is a blueprint thing to make it easier.
All that does is pass the current isntance this function is called on into the Target.
It's the same as you manually connecting the "self" node to it

high ocean
#

@surreal peakThat's what I'll do really, just wanted to get it EVEN faster 😅

surreal peak
#

Only "faster" thing is to put your Widgets into an array

#

and connect the array to the target pin

#

UE actually allows you to do that without a for loop

#

IsValid checks are missing then though :P

sonic crow
# surreal peak Not sure what your goal is, but it might be easier to first define what you want...

I created a datatable with 116 rows and 5 columns, The infomration on the Row states the character level, weapon level, row number and some description string. The purpose is to use it to determine which weapon you can use based on the character level and what impact the weaon has based on the weapon experience. The example is a blast radius. I want to use my datatable to identify the character level and weapon level so that it impacts the blast radius. I only need to use the row number for this but it needs to pick up the column row and the ro it is in to get the row number to know how large the explosion needs to be

high ocean
surreal peak
#

Does of course require you to have all the widget instances in the same BP :P

#

Yeah, could break stuff

#

I guess

high ocean
#

@surreal peakNah, it's fine, just wanted that bit of info, thanks for the help 😄

odd ember
#

goes back to the idea that programming is solving wicked problems https://en.wikipedia.org/wiki/Wicked_problem

In planning and policy, a wicked problem is a problem that is difficult or impossible to solve because of incomplete, contradictory, and changing requirements that are often difficult to recognize. It refers to an idea or problem that cannot be fixed, where there is no single solution to the problem; and "wicked" denotes resistance to resolution...

surreal peak
#

The CharacterLevel?

#

Cause a DT is meant to be a key value pair

#

You have to give it a Key to get the correct Value

#

Value here being the Struct

high ocean
#

@odd emberRead that and watched a game design wicked problem session (he called it cursed) - pretty funny and scary+accurate 😄

surreal peak
#

Key being the Name

#

Your Screenshot shows it's a simple number, but what does the number mean?

sonic crow
surreal peak
#

Ahh................

#

I think one single DT won't work here

#

At least not pretty

#

You could try to cut this up a bit

sonic crow
surreal peak
#

Yeah I mean

#

I'm not sure what the RowNumber is for tbh

#

You have WeaponLevel and CharacterLevel of that row

#

Why is that not enough info?

sonic crow
odd ember
#

when generating data bases the same notion goes

surreal peak
#

Rows are referenced via the Name you provide

faint pasture
#

Wtf is your function here, you want to get some weapon stuff given a character and weapon level?

sonic crow
surreal peak
#

Well you can reference a cell

odd ember
#

well you can

surreal peak
#

The Key/RowName is your Row

#

And the Varaible of your struct is your cell of that row

odd ember
#

as long as it is within a table, you have a one to many relationship

#

one key, many values

sonic crow
# surreal peak

yes that would be the row column cell number bot it does not work when trying to use it even when connected

faint pasture
#

@sonic crow In plain English, describe what the inputs and outputs of this mechanic should be. For example "Given weapon and character levels, return a weapon effect mod"

surreal peak
#

Okay so to put a bit simpler first: DataTable are meant to hold static information one can look up but not alter during runtime.

You usually have a DataTable that holds specific information about one thing.

E.g. You can have a DT_BasicBomb that holds all Levels of that specific Weapon

#

So each row could be a level of BasicBomb

#

And the row then holds all the data about that

#

You can reference that row in other DTs

#

Anything that is a result of like two variables, like char level and bomb level, would probably better fit a math equation if possible

#

Not sure that big DT there is doing you any favors

#

Also still not sure what you are doing with that row int

#

The whole thing is meant for you to give it a RowName (e.g. 1) and that gives you all the data of that row

#

And that's all

#

I think your problem is that you are trying to do this the wrong way round with DTs

#

You want to somehow figure out the row via Char level and Weapon level or?

#

at least from the looks of your spreadsheet

sonic crow
# odd ember one key, many values

We on the same page I should make multiple data-tables, similar to what would have to be done with Enum. That being said just so that I know how to reference a cell (being the row number) how do I connect it

odd ember
sonic crow
sonic crow
odd ember
#

a select node is a switch node without the execution pin

surreal peak
#

Your setup

#

makes the whole DT kinda redundant I think >.>

#

You get Row Number 1

#

Then get the Data in that Row

#

Grab the Row int, which is 1

#

and then you swtich on that int to get data

#

Like, you already know you are providing row number 1

odd ember
#

all to make some extra spaghetti

surreal peak
#

the whole DT is pointless then

#

The more I think about it

faint pasture
#

@sonic crow please explain what you're trying to get and what you already have coming into this. Do you know the character and weapon levels and need to get the effect or what?

surreal peak
#

All you need is math the levels together

#

and map that to a blast radius

odd ember
#

but that would be too easy

surreal peak
#

Can be done pretty with some curve

#

If you want it even prettier, you could have a look at I think CurveTables. That's what GAS uses for mapping like these

#

Can only be created via importing spreadsheets

#

Can use ScalableFloat variable type

#

Which allows a scale and a CurveTable to put into I think

#

And then you can ask it for the float value based on the input

#

E.g. CharLevel+WeaponLevel

sonic crow
sonic crow
odd ember
#

wait till you realize enums are just numbers behind the scenes

sonic crow
#

i just need to know how to reference this row correctly

vestal plank
#

hi is there a way to make the event overlap to read more than one other actor?

sonic crow
#

I know enums have a bad rap in this community but it is honestly super simple and it works first time compared to datatables

faint pasture
trim matrix
#

need help guys. So i've sorted the spawning thing of pellets I know how I will do it now

#

However I need to give GameMode the ability to fire the function for respawn that lives on the PelletSpawnManager

#

If i cast to I am unsure what I would use as my wildcard for the cast as I'm using game mode I am not able to select the PelletSpawnManager actor that lives within the level

static charm
#

there ya go

trim matrix
#

That what i get when i try casting to the PelletSpawnManager

#

just the the cast won't work when it runs

static charm
#

where are you setting the variable itself

vestal plank
# static charm

let said i have box 1 2 and 3, that cant connect to the same target tho?

trim matrix
#

if so on game mode

static charm
#

yes

#

how are you setting the Pellet manager reference variable

trim matrix
#

referencing the Pellet Spawner Manager for the variable

#

i can see where i have gone wrong and i can never get the casting right if i'm honest

sonic crow
# faint pasture If you're going to do that use a select float on enum

i cant find any documentation within blueprints to convert an enum into a float, i know the set values is from 0, 1,2,3,4,5. But there is no infomration online that i can find to "select float on enum" There are some resources in c++ and within unity but nothing that I can find for blueprints. I assume you suggesting turning it into a float so that I can do math and have less mess and cleaner code, I really like the idea but I am not sure how to do it.

trim matrix
#

unless i'm casting to player then it's fine haha

#

it's an actor in the world but obvs thats gonna be epensive keep calling get all actors. I could do it once on game start

faint pasture
trim matrix
#

then save the variable

#

but was wondering what would be correct way of casting to something that need wildcard etc like

static charm
#

the variable is empty until it's set

#

so you can either call Gamemode and set the variable from Pellet manager

trim matrix
#

tbf I got that but I can't set that in game mode and thats where the respawn on pellet spawner manager is called from

static charm
#

or in gamemode get actor of class pellet manager and then set the variable

trim matrix
static charm
#

you do it once, after the level is loaded

trim matrix
#

So that bassicalt

#

then I can call it repeatly throughout the game once set

static charm
#

yes but you might have to put a delay because game mode is spawned before other stuff sometimes

trim matrix
#

would i delay on the add pellets function

#

or on the get all actors of class bit

static charm
#

just a delay before get actors of class

trim matrix
#

okay

#

let's see what happens

#

so that works pretty well

#

a question if i didn't use get all actors

#

how would i set a variable for something that when I cast to it i can pull the variable

#

as to have loads of things all cast to something else to set a variable so the that thing then has a wildcard to use sounds like it would be lengthy process and pull alot of uneeded resources like

distant scroll
#

sooo... i just drink a good beer enought to solve a "character" switch issue which i had for months and didn't even do that in unreal (instead looked for other stuffs like particles 😄 )

static charm
distant scroll
#

huh xD nice,

static charm
#

So in Pellet Manager - On Begin Play - Get game mode - get variable - set variable to self(pellet manager)

#

there's not really any other way around setting the variables

trim matrix
#

lets say the gamemode was a workshop table

#

the workshop table would need a wildcard as i would be able to go from pallet manager to the workshop table to the set it's variable

#

or would this be were people would use line traces etc to pull the actor ref from the world

#

to them use as wildcard

sonic crow
static charm
#

yes you need to already have a list of variables in gamemode in order to set them.

#

dont know what you really want to accomplish, this is just how programming is

#

i mean im not saying its impossible to do it another way, but the above method is just the most common and straight forward to do.

trim matrix
#

i've done method you've suggested, I'm dyslexic so I explain things so wierd to me it makes sense but won't to some hahah

#

if I come across it i'll let you know haha

static charm
#

haha nice

odd ember
#

I don't know why you insist on the switch

odd ember
#

although I don't know your current implementation so I'm not sure if you have configured the instance

trim matrix
#

PelletSpawnerManager is in game from start

#

so it PelletSpawners

#

the pellets are however on game start spawned in by the spawners

odd ember
#

yep that sounds correct

#

so you did get it all working?

trim matrix
#

i'm using a box trace when respawn is called to check if there is a pellet as spawner location if not it spawns one

#

if there is it will do nothing

#

the PelletSpawnerManager will go through array of spawners calling the function

#

so at the moment i ask manager it goes through loops calling functions of the other actors

odd ember
#

but each spawner is aware of its own state?

trim matrix
#

technically yeah

odd ember
#

cool, that's the most important part

trim matrix
#

one of them runs on Tick to monitor if pellet is eatan or not

odd ember
#

yeah I see PelletEaten, nice work

trim matrix
#

and the other runs only when respawn is called

odd ember
#

you can bind an event dispatcher instead of going per tick

trim matrix
#

spawn pellet if find no actor in trace box

odd ember
#

which might save you a bit of performance

trim matrix
#

how would i do that

#

i did think this earlier

odd ember
#

inside your pellet, create an event dispatcher

trim matrix
#

what i want to do now is check when all pellets in level are eaten

odd ember
#

called something like OnEaten

trim matrix
#

okay one momen

odd ember
#

when the pellet gets eaten, call the dispatcher

trim matrix
#

Yep got that

odd ember
#

so I guess you're using interface for this yeah?

trim matrix
#

i'm not this is child of the main collectable item

odd ember
#

ah I see

trim matrix
#

This is collectable base

odd ember
#

I would override the implementation for OnCollect locally then, so that you can add the dispatch call before you call super

trim matrix
#

would i remove the event on here then ?

odd ember
#

no no

trim matrix
#

or leave it and just overide like you said

odd ember
#

everything stays the same

#

we're doing the same as before, we're just ensuring that we can call our dispatcher first

trim matrix
#

i can't seem to overide the on collect ??

#

i can implement but not overide

odd ember
#

hmm I'm not sure how it works with interfaces tbh

trim matrix
#

it is interface as well

odd ember
#

ah try implement

#

lol

#

I'm mincing words here

trim matrix
#

i'll try implement see what happens

odd ember
#

if you right click on the function node after implement, see if you can Add Call to Parent function

trim matrix
odd ember
#

yep

trim matrix
#

now how would i link this to the specific pellet spawned that spawned the pellet

odd ember
#

so when you spawn the pellet from the spawner

#

you also get a reference to it

#

so go back inside your spawner actor

#

to the spawn node itself

trim matrix
#

so that essentailly

odd ember
trim matrix
odd ember
#

yep

#

you should now have a node with a red socket

trim matrix
odd ember
#

from that socket you can pull out a CreateEvent node

#

yes, but we can make it a little nicer with the CreateEvent node

#

so it's not pulling wires across entire thing

trim matrix
#

i did create event

#

no i didn't haha

#

i have now though

odd ember
#

select the event from the drop down

#

and voila

trim matrix
#

soo now what would be best way to track when all pellets are eaten

#

would on tick on manager work

odd ember
#

you don't need to

trim matrix
#

would i noy ?

odd ember
#

well now that you have seen how delegates work, you can add the same delegates for your spawner

trim matrix
#

cause after alll pellets eaten PacMan speeds up you see

odd ember
#

and then in your SpawnerManager, you can run a loop through every single spawner any time the eaten delegate has been called

#

so instead of doing this every frame, you're just doing it every time a pellet gets eaten

trim matrix
#

So i have that

odd ember
#

where does it connect from?

trim matrix
#

oh so use dispacther to call on manager the something has been ate and use that to trigger to loop event so it's not running on tick

#

to tick at the moment

trim matrix
#

okay barewith lets see if I get it first go

odd ember
#

I'm confident you will 😎

trim matrix
#

hmmm

#

i have a catch

#

the manager dosen't spawn the spawners only has an array of them all in level

#

would i be able to grab a copy of one to get ref to one

odd ember
trim matrix
#

barewith please

#

So were getting there

#

what's best way to do the if all pellets eaten check could I increment until amount shown as eaten matches amount of spawners in level ??

odd ember
trim matrix
#

which ??

odd ember
#

like for instance you might pick up a pellet from a respawn that alters the counter

trim matrix
#

thats what i'm thinking at moment

odd ember
#

yeah I mean go for it

#

I would actually use Modulo here if you're not resetting the count

trim matrix
#

modulo whats that ??

odd ember
#

so basically if you're replaying the level, and respawning it, but want to keep the counter going (for whatever reason, for instance if it's tied to scoring). the modulo node would allow you keep incrementing.

#

so let's say you have 50 pellets

#

at 50 pellets you could check that the modulo between the count and the amount of spawners

#

and if it is 1, that means you've gotten all the pellets. for the next try, the score would be 100, so the modulo value would be 2

#

etc.

trim matrix
#

hmm, I think for this reseting to 0 on restart would be prob normal to occur

odd ember
#

sure

trim matrix
#

as unless the game you respawn with possible less then start of game I would think once PacMan dead he would need reviving haha

odd ember
#

I mean as long as you do either, you're good

#

the integer way is good as a base, but there are other ways to make it more stateful in case you get bugs

trim matrix
#

i'm gonna try it now

#

so once all have been ate hopefully it should make PacMan go super fast

thick dirge
#

is there a way to SetActorLocation to 200 units before the BoxTrace hit location?

odd ember
trim matrix
#

when i'm collecting pellets the number increase seems to be off

odd ember
#

by how much?

trim matrix
#

3

#

so i collect 1 pellet thats fine

odd ember
#

ah that's right, you're looping over this right

trim matrix
#

i collect another it adds 2 so i end up with 3

#

then again i end up with 6 on 3rd pellet collec

odd ember
#

so we can do a little improvement here

trim matrix
#

i need pre value

odd ember
#

inside your spawner

trim matrix
#

yes

odd ember
#

on the dispatcher, you can add a parameter

trim matrix
#

i have

odd ember
#

it's a bit obnoxious. it's on the top instead of the bottom

trim matrix
#

Spawner Child Ate then 0

#

so that on right

odd ember
trim matrix
#

okay and with this what would i be doing with that

#

obvs taking Int i'm guessing ??

odd ember
#

make the variable of the type of your pellet spawner

#

and compile

trim matrix
#

yeah

odd ember
#

you should get an error

trim matrix
#

i did

#

i have input pin for pellet spawner on the call for dispatcher now

odd ember
#

right click on the spawner child ate