#blueprint

402296 messages Β· Page 836 of 403

vague dome
#

i want the ship icon to be stationary in the middle, while the white arrow at the top rotates according to where the wind is hitting the boat from

#

for the wind i have a global Z float, so i imagine it would be just to get the world Z rotation of the ship and compare it with the Wind Z

#

but i cant think of how that actually looks like as a formula

tight schooner
#

Maybe negate rotation and then combine rotation = your delta rotation

spark steppe
#

aren't they separate textures? or are you may be overthinking? or is the ship always facing top?

#

probably just something like windYaw - shipYaw should do it

maiden wadi
#

@high sapphire Okay. So you need three main things.

First Image - First is your Userwidget that holds the Listview itself. This populates the listview with Items. Here in this widget's construct I made a simple loop that constructs items and adds them to the listview.

Second Image - This is an empty UObject child class with nothing but a couple of InstanceEditable, ExposeOnSpawn variables.

Third Image - The EventList widget itself. Imeplements the UserObjectListEntry interface, and uses that interfaces EventOnListItemObjectSet to set a casted version of the data we passed from the first image. Then it calls a visual update function at the bottom that uses that object if it's valid to set the view.

odd ember
#

dot(WindUnitVector, CompassNorthToWorld)

vague dome
#

@spark steppe yea the ship is overlayed on top of the disk

weak zealot
#

What's a good way to store player variables (Health, Shoot speed, Movement Speed, ect) would a interface suffice?

maiden wadi
#

Interfaces don't store things.

keen wedge
#

Hi all, noddy little platformer where the character can place blocks... I'm calculating the spawn location by taking the location of the actor (player), dividing it by 100, then using ceil to effectively round it to next whole number, then multiplying it by 100 - the intention is that the block that is going to be place will always be "clear" of the player...however, if the player close to the mid point of a grid position, or more, the block is place in the next position but the player will often now be in that spot, or partially...

Any thoughts on how I can avoid this? It kinda needs to jump to the next position across when the player is going to be in their own way... I can't use the SpawnActor collision handling stuff though as its too limited, so I need to guarantee a "safe" position first before spawning...

Second problem - I need to device a way of telling whether the spot that could be spawned in already has a block (or potentially something else) in it... again the SpawnActor is a bit limited for that, as if I set it to DontSpawn, I get nothing regardless (maybe detecting collisions with the floor, not sure)... little screeny to demonstrate...

In the case of that top block, it should have really been spawned one further grid position across.

The reason for the divide by 100 / multiple by 100 incidentally is because i have the sprites set to equal 1 unreal unit... so each box is effectively 100cm wide, was a nice way to line things up...

Open to suggestions (and awesome maths skills that I lack) πŸ˜„

trim matrix
#

I need to loop my custom event but whenever I use it I get an error message

odd ember
keen wedge
trim matrix
high sapphire
trim matrix
#

then it just brings me to the loop like inside

spark steppe
#

put a delay of 0 before you call your event again, that will delay it to the next tick

#

however, ticking stuff should most likely happen onTick

trim matrix
#

I don't have it on tick

high sapphire
trim matrix
#

I have it on hit

odd ember
spark steppe
#

and why should it loop?

keen wedge
maiden wadi
keen wedge
#

The code in place at the moment is as follows (bit messy as testing, sorry)

trim matrix
#

well, I wanted it to call back to my custom event where it multiplies the current velocity by 1.05

maiden wadi
#

Menu_ItemObject type I mean.

odd ember
high sapphire
obtuse herald
keen wedge
#

I added a MOD node to get the "odd bits" and then tested if that was greater than a specific value and then added 1 to it before using ceiling... it kinda worked, but was't great

spark steppe
#

vito, you are doing something that you most likely shouldn't do

odd ember
trim matrix
odd ember
#

that you can query for the grid positions

trim matrix
#

lol

odd ember
#

have it update the player's grid position per tick

trim matrix
#

that's the multiplier

keen wedge
spark steppe
#

that part is fine, now show what calls Speed

odd ember
trim matrix
keen wedge
trim matrix
#

minus the loop

#

it works

maiden wadi
odd ember
obtuse herald
#

yeah

spark steppe
obtuse herald
#

why loop it

trim matrix
#

uhm

#

idk

spark steppe
#

sure this will happen infinite times

trim matrix
#

well I need to keep multiplying it

spark steppe
#

for how long?

trim matrix
#

just until it hits a certain speed

keen wedge
# odd ember you'd have two arrays; X and Y

Still not 100% sure on how to tell if the character is going to be in the way of the next block placement though (although the array would resolve the can they place a block at all issue - if another block had already been placed etc)

obtuse herald
#

probably a tick thing

trim matrix
#

really?

obtuse herald
trim matrix
#

oh

#

wait

spark steppe
#

gotta go fast i guess πŸ˜„

trim matrix
#

lmao

odd ember
trim matrix
#

I love you

#

buyt

#

I want to loop that speed function

torn tendon
#

Guys what are the best paid/free tutorials to start learning about blueprints and then slowly transition to scripting too with them?

trim matrix
#

go fast after every bounce/hit

keen wedge
obtuse herald
trim matrix
#

but

#

it doesn't work

torn tendon
#

okay thanks.

trim matrix
#

like when I just let it be

spark steppe
#

@trim matrix there's several ways... do you want to reach a certain speed or do you want to increase speed for a period of time?

trim matrix
#

it'll just multiply it once and done

odd ember
high sapphire
trim matrix
#

I want to reach a certain speed but only gain it after every bounce

keen wedge
odd ember
spark steppe
#

you can add a float targetSpeed variable to your blueprint

obtuse herald
spark steppe
#

set it to the desired speed in your onHit event, (but don't call speed)

#

and call speed onTick

odd ember
trim matrix
#

ok

keen wedge
spark steppe
#

to me it sounds like the velocity should increase "slowly"

odd ember
trim matrix
#

but once after every hit

#

so hit multiply

#

hit

#

multiply

high sapphire
#

Hm, the empty widget is still appearing when the player's inventory is empty.
Forgot to connect update to construct and on list item object set

obtuse herald
trim matrix
#

but it doesn't

#

I apologize for being a problem

#

lo

spark steppe
#

maybe 1.05 is not enough to notice no idea where i got 1.05 from...

trim matrix
#

I have it print stringed

#

and it stays

#

that's right

#

lkmao

#

you are right

spark steppe
#

maybe you are reading the velocity wrong?

keen wedge
spark steppe
#

you get it from the actor but set it to the ball

trim matrix
#

i am multiplying it by 1.05

#

the actor is the ball

obtuse herald
trim matrix
#

lmao

#

he was

obtuse herald
high sapphire
#

Empty inventory:

trim matrix
#

yes

#

ball is scene root

high sapphire
odd ember
high sapphire
#

So now the text is updating properly, but the icon isn't
I am confuse.

maiden wadi
#

Show the icon set in the list widget?

trim matrix
#

oh lol

#

the funny thing is

maiden wadi
#

And where you're creating the object and passing it to the list.

trim matrix
#

the other thing gets called every hit

#

so, you are right

#

it should call it every hit

#

but it doesn't

#

why doesn't it

keen wedge
spark steppe
#

remove the while loop, and in the speed function add a print string node which prints the velocity that you set

high sapphire
spark steppe
#

and tell us if the result increases by 5%

odd ember
slender bane
#

My char is looking up if i move my mouse down why? the input on this axis is on 1.00

trim matrix
#

It doesn't increase

keen wedge
# odd ember you're looking at it wrong. defer to the grid, always

sure, I'm thinking of the grid... so lets say at the start the player is in grid 1,1, they start to move but their transform is still in 1,1, but the sprite is overlapping 2,1 - visually I can see that, but how can I tell that they are now occupying (effectively) two positions? Surely I needed to know that they are "partially" in 2,1 so that if they try to spawn a block it goes into 3,1? I'm feeling very dense right now 😦

trim matrix
#

it just stays at 1100 velocity

obtuse herald
odd ember
trim matrix
#

wait

obtuse herald
trim matrix
#

quick question

slender bane
trim matrix
#

should it be like this

keen wedge
maiden wadi
# high sapphire

Curious. If you unhook Icon here and set an image directly, does it show?

trim matrix
#

put the print string to the "get velocity"

spark steppe
#

he does

odd ember
obtuse herald
#

threads when

odd ember
#

not "bounce" them

maiden wadi
# high sapphire Yeah, it does

What about if you put that back, unhook it where you're passing it to the constructed object, and set it manually there?

spark steppe
#

can't you set the linear velocity on the actor instead of the ball?

odd ember
keen wedge
# odd ember not "bounce" them

...in the case of placing a block to the right of the player, if they were partially overlapping the next space to the right, they would get moved back (to the left)... that would be quite visable? They dont move one block at a time in the game etc... e.g. the player movement doesn't snap from one grid position to the next, they can move and be half over different blocks... (hard to explain in text)...

trim matrix
#

you mean make a variable that is a reference to the BP?

#

I just did it and it gave me warnings

#

like a lot

odd ember
keen wedge
odd ember
maiden wadi
# high sapphire Yeah, that works too

It has to be coming out of the inventory null then. Looks like it's fine in your item you're picking up. Check where you're placing it in the inventory. If you missed a pin or something somewhere.

keen wedge
# odd ember no I am well understood with the concept. I am offering you two choices. one is ...

can I not have a third? πŸ˜„

Is it not possible to just calculate the next space along where a box could be placed, without the collision, and without moving the player back to the centre of the last position? Another reason for this, is that before I took these screenshots, the player was actually "bigger" than a block, 24x24 pixels, where-as the blocks that make up the scenary are 18x18... because of this, the player doens't have to move much in one grid space before their sprite is occupying the next...

Would love to find an example close to what I'm trying to do... I guess in 3D it would be kinda minecraft with the cube placement...

odd ember
trim matrix
#

ok, so when I call it on tick it doesn't multiply and keep the value

#

I think the issue is my speed custom event

keen wedge
high sapphire
maiden wadi
odd ember
# keen wedge ...but... surely... must be a way..?

everything in design, as well as in code is a trade off. you can check against the player's collision instead, if the player's collision is smaller than the player size. I'd encourage you to make everything the size of the grid though, or at a bare minimum multiples of grid size

high sapphire
keen wedge
odd ember
maiden wadi
# high sapphire Yeah, I knew when I was setting it up that the way I was doing it wasn't the rig...

Unless you want to restructure your inventory to hold the counts in a different way, you need to basically do a few iterations over the inventory for the display. Iterate once and get a list of all names, add them to an array using AddUnique or something. Pass that back from a function. Then use that array to loop over your inventory for each item to gather their count and create an object for each one for the listview.

spark steppe
#

what?

#

you iterate once and create a map

#

item <> count

maiden wadi
#

Yeah fair, that'll work too.

high sapphire
keen wedge
# odd ember cool down, start by making everything the size of the grid in terms of visuals. ...

I think I'm missing something... how does having the box collision slimmer than the sprite help here? I was actually assuming the opposite, e.g. have a collision volume that was larger, but then I need the "nothing is colliding its ok to place the block" thing, which obviously I wont get because you only get an event when something does collide, not when it isn't ....

Its almost like I'd want to draw an empty square box one whole grid position (100x100) in front of the player, as they move along, it effectively highlights the box that can be built in... I dont want the actual visuals for this, but this is what I see happening to work out where it can be placed etc... the player effectively pushes that along with it snapping to the next position thats available... sorry... probably not making much sense..

high sapphire
#

(The player has separate inventories because I figured that'd be the easier way to handle different types displaying on different menus - I'm trying to get the useable items inventory working before I copy the changes over to the other inventories)

odd ember
keen wedge
odd ember
keen wedge
odd ember
keen wedge
#

For example...
the player is partially in the box to their right, so, the next possible placement positon would be the red X etc...

keen wedge
odd ember
#

sure you can just add an offset to the grid to always +1 the position

keen wedge
high sapphire
odd ember
keen wedge
#

next space

spark steppe
#

but almost

keen wedge
#

that kinda thing...

odd ember
#

and I think you'll be having a harder time making players understand why that distinction happens since players won't know what the grid is or isn't

spark steppe
#

nat it's a bit more complex, you would need to check if the element exists on the map already, if so, you need to increase the count for the entry. you only add a new entry if it doesn't exist

#

maybe you can get around by using the find result on something that doesn't exist, not sure if it'll return 0 for non existing entries

keen wedge
# odd ember and I think you'll be having a harder time making players understand why that di...

thats very true, it will look odd if some blocks are placed further away from the player... I guess that "highlight" thing I mentioned above would help with that, as it would highlight the placeable areas... BUT... a) I have no idea how to do that b) its a single key press to place a block, so you'd have to almost have that on all the time... or... have a hold to see where it would go, and release to place... but then that leaves no "cancel" option

spark steppe
#

but overall, if authaer suggested to restructure your inventory, that's probably what you should prefer to do. instead of working around issues

maiden wadi
#

Er. Forgot the +1

odd ember
maiden wadi
odd ember
#

is this a game design assignment or a programming assignment?

high sapphire
#

So I was on the right track with using the boolean pin off of find

keen wedge
# odd ember but again you're overengineering this for the sake of not wanting to implement a...

I just think moving the player backwards is going to look a bit weird... I'll give it a try now and see... maybe it wont be as bad as I think...

I guess the highlighting thing though, that would then require the whole underlying grid approach you were talking about and would be able potentially use it...

Its a research project... I'm doing a study on violence in video games... it actually started out as more of a "can games where you dont break stuff be fun" kinda thing... the plan with this is a simple (LOL, I bloody wish) platformer, where there are three modes that the player is taken through... the first they can only build (place blocks) to leave the environment... the second enables placing and destroying the blocks... the third enables them to fire.. althouth there isn't any "need" to... the NPCs will be passive...

#

the aim is to study the behaviour of the participants and see what they do and get some data back from both the game and the participants afterwards relating to what they did, why the did it, and so on

odd ember
maiden wadi
#

Craft The World does that. If you place a block down too close to a controlled dwarf, it'll nudge them away.

keen wedge
#

I am already behind and wanted to catch up and didn't expect this bit to be the ball-ache its proving to be 😦

keen wedge
odd ember
#

wait you can get away with just 3000 words for a research project?

#

I should be milking that as a side gig

keen wedge
#

we had the choice between a 6000 word dissertation, or a 3000 word research report with final major project.... initially I was going to go for the dissertation but then I thought this would be "fun"... its now the fourth UE4 project I have on the go and its all getting a bit much..

spark steppe
#

"they adjusted their behavior to get along with the bugs in the software"

#

sorry for the spoiler

odd ember
#

6000 words isn't that bad either. my dissertation, with a practical project and a full study was some around 35000 words

#

not that I'd wish that on anyone

high sapphire
#

This feels like I'm also doing it wrong

keen wedge
#

still two months left on that one too...

maiden wadi
spark steppe
#

i think one problem may be that you seem to have items which share one object/name but have different effects

keen wedge
#

for my emergent tech module last year I did something similar with a platformer game, three modes of play, build a sip/puff device and hooked up the Tobii eye tracker to it all to control the player in the game... that one worked well, had hoped for similar model this time

vague dome
#

Thanks for the help by the way, i feared that would be harder than it was πŸ˜„

odd ember
#

anyway, back to the matter at hand

#

if your study is design based

high sapphire
#

Right now I have two items
A Health Potion (with a red potion icon, and which heals 20 HP), and a Magic Potion (with a green potion icon, and which replenishes 10 mana)

odd ember
#

which it sounds like it is

#

focus on things that make the design experience better

#

so in this case ensure that you have consistent and intuitive results for the player

#

e.g. don't do the +1 offset if they don't fit perfectly in the grid

#

because 95% of the time

#

they won't be perfectly in the grid

keen wedge
# odd ember if your study is design based

I'm basically using the game as a way to extrapolate some data that I can analyse etc... laymens terms (which would just be easier all round without all this academic stuff) - "was the game more fun when you could break stuff"... etc

keen wedge
#

the modulus thing worked a bit...

#

but was if they were just 0.3 or more into the box, use the next one..

#

thats when I change the size of the player to be the same size as the sprites used for the environment, because i assumed it would then be effectively half way or more - +1 offset...

odd ember
#

at which point you could as well just always make it so it's +1 and have all your troubles go away

keen wedge
odd ember
#

players will be overlapping grid spaces for the majority of the time

keen wedge
odd ember
# keen wedge feeling a bit lost now.... not entirely sure where to go...

well choose what option you want to go with: either stick to the initial plan of having the next grid square be filled and handle collisions one of two ways, or always spawn the blocks +1 grid tile away and forego all of the issues. just don't get boggled down into the idea of trying to do both

crisp vault
#

its technically a blueprint question: what does this red border mean? i have 2 animations, it appeared somewhere

keen wedge
odd ember
maiden wadi
#

Done several dozens of UMG animations and I've never seen that. O.o

high sapphire
crisp vault
#

sorry still new to this, ill get there with some time

odd ember
#

if only #umg wasn't dead

#

I got nothing, I've never done widget animations

lapis cave
#

hey gang, looking for some advice -- i'm making a simple Beseige clone as a learning exercise (basically a physics-driven block building game). I have a handful of blocks that can be attached together, and some blocks have things they can do upon player input (a motor block starting to spin when the player holds 'W', for example). I'd like to be able to specify arbitrary per-block keys for these actions at runtime (player selects a block, it brings up a window, player can assign keys to the various actions of the block). I've been poking around with ue5's Enhanced Input to help tackle this, but i'm still not sure the best way to go about it (it sounds to me like i'd have to create an 'inputAction' object for every potential thing i want a block to be able to do, which is fine if it's the way it needs to be done, but sounds messy). can anybody offer any insight on how to tackle this (structurally) without it turning into a heap of spaghetti?

crisp vault
#

im learning so itll be maybe better I use the better system?

odd ember
crisp vault
#

some numbers above enemy's head to indicate how much damage was made to it

crisp vault
crisp vault
#

okay

#

i think i misunderstood you but its all good, thank you anyways! :)

odd ember
#

you're welcome, another satisfied customer

small halo
#

this aint working

#

i can hear the sound when im nowhere near the location

fierce stump
#

I have these pickups in place (white one is health, black one is armor). They work as they should, but I want the player to be unable to pick them up if their health/armor value is already at 100.

small halo
#

make a branch and the condition is if player health is >= 100

#

cannot pick up

fierce stump
#

this is the event graph so far

small halo
#

wheres the pick up button

fierce stump
#

they're immediately picked up once the player overlaps with the collision

small halo
#

on event tick

high sapphire
small halo
#

make a branch and for the condition get the players health and then float <= set value to 100

#

make a bool ''can pick up''

small halo
#

set it to false in the false and true in the true

#

then at the beginning of the overlap do a branch and condition get can pick up and like the rest of the code to true#

high sapphire
weak zealot
#

Upon compiling my character, all my assets disappear, Aswell as that I'm getting errors from my event graph not being able to find objects. Anyone know what's going on here? Is this a bug?

maiden wadi
# high sapphire Though unfortunately I'm still confused by what you meant here

Your inventory system makes it somewhat hard to do this. Basically the idea was to condense your data down to a name and integer. But hooking that back up to your icon and name would be difficulty. Normally you do this with a key for the item. Basically you would pass your widget nothing but a key and the amount. The widget could look up the static data like icons and name through the key in a datatable or a dataasset.

hollow sequoia
small halo
#

I set it to true

#

Still didn’t work

high sapphire
#

Trying this worked as far as putting different entries for items with different names, it looks like. I'm just not sure how to get the number to display properly

hollow sequoia
#

@small halo you need to create one then feed it into you node

high sapphire
#

Maybe at this point it would be a good idea to restructure my inventory setup.. I keep getting myself stuck.

#

Though I'm not exactly sure how to restructure it

maiden wadi
high sapphire
#

Yeah, singleplayer

tawdry surge
#

Is there a state machine for 2d animations or do I have to build one myself?

odd ember
maiden wadi
#

First stop would be understanding typical key types. Things like FName, Integers, GameplayTags, etc. All of these are basically integers in some form or another that makes them insanely fast for lookup speed and comparison. You identify your items with these.

So Health Potion could be any one of the following
Integer Item ID = 30
FName = HealthPotion
GameplayTag = Item.Consumable.HealthPotion

Understanding key types lets you link other data to your items without having to have it in the actual struct. This way your inventory struct is very lightweight and only contains gameplay data, like how much of something you have, or how much durability of it you have, or it's quality type.

This leads to you have two separate structs for your items. Using your currently inventory as an example.

ConsumableItemGameData
ItemKey = GameplayTag
Count = Integer

ConsumableItemDisplayData
Name = FText
Description = FText
Icon = SoftObject Texture2D

You can either make a datatable out of the ConsumableItemDisplayData, or make a TMap array of it in a DataAsset. Either of these are static objects you can just simply get in your widget with no need to make a complex system for.

In the object you create that you send to your listview, you would just pass it your ConsumableItemGameData struct which just has the ItemKey and Count. When the widget has this, it can use that ItemKey in that struct to retrieve the Name, Description, and Icon from the static datatable or data asset.

When you pick up an item, instead of straight adding a new struct, you will instead iterate over the current inventory of consumables. If you have a struct in the array that already has an ItemKey matching the one you picked up, then you just add one to that array index. If the entire loop finishes, you assume you don't have that item and add it as ItemKey and Count = 1

On your items themselves you don't really need more than the ItemKey.

#

@high sapphire

high sapphire
#

So if I were to use gameplay tags, it'd look like this, give or take?
Item.Consumable.HealthPotion
Item.Consumable.MagicPotion
Item.Weapon.Sword
Item.Weapon.Mace
Item.Armor.Helmet
Item.Armor.Chestplate
Item.Accessory.Ring
Item.Accessory.Mask
Item.Generic.FlowerPetals
Item.Generic.IronOre

maiden wadi
#

Sure. You can set their hierarchy however you like.

high sapphire
#

Gameplay tags would probably be the easiest way for me to mentally parse things
Though I don't think I've worked with gameplay tags before, unless I'm misremembering

earnest tangle
#

they're pretty handy, definitely worth looking at

teal oasis
#

Hi hi.
I have a blueprint named bomb and it instance used on my game which when My character shoot a line trace to it, it could be explode.
I used cast to bomb in my character blueprint to get refrence of bomb which I need for give to fire impulse of my bomb when line trace hit bomb. but when I hit a bomb, the hitted bomb won't explode, wrong bomb explode instead that not hitted.
How can I get a refrence of my bomb blueprint on my character blueprint and use it for all bomb?

high sapphire
maiden wadi
#

Make a new property and look for GameplayTag.

#

GameplayTags are one of the most fantastic ways to organize data. They're basically just FNames with a bunch of coding around them that allows them to be tiered in a hierarchy. And they all boil down to integers, which makes them very fast. Not relevant here but they also replicate extremely efficiently.

earnest tangle
#

The only thing I wish gameplay tags is missing is strong typing but oh well can't have everything :D

high sapphire
#

Property as in variable, or?

maiden wadi
#

Yep.

#

Property = Variable

high sapphire
#

Doesn't look like anything is coming up?

dawn gazelle
# teal oasis Hi hi. I have a blueprint named bomb and it instance used on my game which when ...

Your line trace will have a "out hit" coming off of it. The "hit actor" would be the actor that would have been hit by the line trace. If you cast that "Hit Actor" to your bomb class, you can then call the bomb explode function from that. You may want to look into interfaces here though, as different objects may want to react differently to being shot at, so then you implement the interface on any objects that you should be able to shoot and they can determine each what they do rather than having to cast to different classes on your character.

maiden wadi
high sapphire
#

Oh, that explains it. I thought it was a property of a variable, my bad

#

It also looks like they can be added in the project settings themselves - or are those meant to be used for different things?

dawn gazelle
teal oasis
maiden wadi
high sapphire
#

So adding them from project settings and adding them from a variable, either way they get added and can be used?

dawn gazelle
#

You can add more of them whenever you access a gameplay tag field.

maiden wadi
#

When you add them to the project, you're adding them to an ini file. Think of it like a predefined name for something.

#

Seems mildly tedious at first. BUT THEY ARE SO AMAZING

dawn gazelle
#

They're only so good as you can keep them organized. I am struggling with that myself XD

high sapphire
#

Is there any difference between adding them from the Project Settings section and adding them from somewhere else? The fact that there's a dedicated section in Project Settings implies those are globally accessible, whereas adding them from a specific Blueprint - would they only be accessible from that Blueprint?

dawn gazelle
#

They get added to the ini file wherever you add them. They are globally available once added.

high sapphire
#

Ah, okay

gentle urchin
maiden wadi
#

Yep.

high sapphire
#

So if I want to assign a GameplayTag to a specific Blueprint, is that done by giving it a GameplayTag variable and giving it the value of the tag I want it to have?

gentle urchin
#

Probably stick one more layer to it

maiden wadi
#

Best part is that you can use the tag to do stuff too. πŸ˜„ Like, if you wanted you could have a function that switches logic based on the parent tags.
If ItemKey->MatchesTag(Item.Consumable) ConsumeIt.
ElseIf ItemKey->MatchesTag(Item.Armor) EquipIt.

gentle urchin
#

Since you can filter based on tag or tag parent etc πŸ˜„

high sapphire
gentle urchin
#

Ah ok then yes ^^

#

This is were my logic breaks

high sapphire
gentle urchin
#

Like, is tools part of items,

#

Or should they have their own catgory

high sapphire
#

I was only introduced to GameplayTags today
But dang I can already see a lot of potential

gentle urchin
#

Weapons in your case ^^

#

Yeah they are handy

high sapphire
#

(This is the parent object that I'm having all collectable items derive from, for instance)

dawn gazelle
#

Yes, you can do that if you intend on using that variable to check what the item is.

high sapphire
#

This is genuinely really cool, and I'm upset that I didn't know about this earlier, heh

#

This leads to you have two separate structs for your items. Using your currently inventory as an example.

ConsumableItemGameData
ItemKey = GameplayTag
Count = Integer
So for tracking how many of an item the player has, I make a map variable of GameplayTag:Int?

gentle urchin
#

Cant have gameplaytag as key, can you?

#

Also if its stackable to something less than max int, and you want several of them in the inventory, you kinda need some unique identifier to the stacks

#

It either being in an array, were ypu can have several of the same "key"

#

Or some custom struct with an id .. which.. gets us back to an array

#

Could be a map of index and struct(gameplaytag, int) tho

#

Index being slot nbr..

high sapphire
#

(I'm going to be afk shortly, though I will be bringing my laptop with me and getting back to this chat so I can continue fixing my inventory system
Thank you to the people who've helped me so far!)

teal oasis
gentle urchin
#

Sphere trace for other bombs

#

Or do radial dmg and react to it with a treshold

teal oasis
gentle urchin
#

This would be from the bomb being triggered

glass magnet
#

hey yall im curious on what might be the best way to achieve a fog of war

#

also hi how is everyone doing

mental trellis
#

I may be wrong, but I think people use a texture and paint the bits you reveal and then leverage that to render the fow

glass magnet
#

like black and paint on white to show?

#

well

mental trellis
#

Something like that.

glass magnet
#

this is a very very generic simplification but

tawdry surge
#

Post processing material effect is the short answer

glass magnet
#

uh in what way

tawdry surge
#

Using depth fade to mask out things beyond your given range.
There are tutorials on youtube or examples on the marketplace

odd ember
glass magnet
#

im a complex man

#

i think i might do

#

hm

#

im looking into different ways

#

cause i could do the way daekesh referenced or a line of sight it seems

inner laurel
#

Anyone knows how to create a script that renders and unrenders layers while taking a picture?

glass magnet
#

that seems like the accurate way t o do it

odd ember
#

I think a material based solution might be faster

#

although

#

it's not cheap when it's BP based

#

given that it's tile based render targets

glass magnet
#

i saw that

#

ill follow this

barren tide
#

hello! i got a pretty newb question. im trying to recreate sonic adventures on ue4 and am looking on google for a tutorial on how to do that bit where the coins "drops" from sonic after being damaged but cannot find any. any tips on how to do this please? say for example my character has collected 10 coins. gets damaged, coins go back to zero or any number i choose and the coins drop away from character. thank you!

faint pasture
#

Visualizing it is the easy part. Generating the data is the hard part.

#

You'll want c++ or it'll be a bad time

glass magnet
#

and that looks like polygon based?

faint pasture
#

Ye

#

Polygons then drawn to RT for masking

glass magnet
#

im trying to do a

#

moba/league style fog of war

faint pasture
#

Read their writeup

glass magnet
#

wah

#

this exists

#

πŸ™

faint pasture
#

Also read up on generalized cell based FOW. I haven't don't it but there's a million write-ups. The LoL approach seems to just do some fancy post processing on it.

burnt canyon
#

What would be the proper way to convert something like a look at rotation in to velocity for a Projectile movement component so it goes in the right direction as there seems to be no option for it

glass magnet
wild moth
#

Hello,
Do spline meshes not have collision in packaged builds?

#

if they are generated at runtime

cinder stratus
#

Hey, I have an actor speechbubble that is saved via reference in another actor. Now what I want to do is access the function setAlpha inside speech bubble, but the variable is saved as Actor, and when I try to cast Actor to SpeechBubble the cast fails, does anybody know why?

glass magnet
faint pasture
faint pasture
#

But you can do this without bringing a rotation I to it. Normalize(Target - Muzzle) gives you the velocity

#

Or the velocity direction rather. This won't solve for gravity though

burnt canyon
#

I figured it out, my brains are mush today, ty tho

glass magnet
dawn gazelle
#

Games? We make spaghet

odd ember
#

I think I made a function for this, lemme open VS

fervent jolt
#

Hey guys, I'm probably rarted but, How does one when a key is pressed add two floats?

odd ember
#

ha that's what I did

#

except check for whether world is null

#

maybe I should

#

also just noticed your library name lmao

fervent jolt
#

like this, sorta?

dawn gazelle
#

Exactly

fervent jolt
#

ah ok, thanks

trim matrix
#

I want to apologize to @spark steppe and @obtuse herald. I'm sorry for causing you trouble. I wasted your time because I forgot to mention I had clamped the speed down and that is the reason why it wasn't going up. After so many attempts of failing and all I did it. I want to show you my success thanks to your help with my stupidity.

#

I multiply the clamped min speed by a set amount and every on hit it calls back to it

spark steppe
#

so you got rid of the loop and it works as expected?

trim matrix
#

yes

spark steppe
#

nice

trim matrix
#

lol

#

thank you guys for putting up with me

spark steppe
#

don't worry, probably happens to all of us

odd ember
#

because nobody wants to get called out for terrible code πŸ˜‚

spark steppe
#

that^^ and c++ stuff often is more complex than some BP spaghetti

#

i don't want that someone has to crawl through 300 lines of code, to maybe figure out the issue

odd ember
#

300 lines of code is an entire subsystem for me πŸ˜…

spark steppe
#

yea, or a component

odd ember
#

CMC having 12k lines as well. I mean I can't vouch for the fact that you don't need those lines, but I'm sure they're not being verbose for no reason

spark steppe
#

my first big project wasn't OOP, and it's been following me until today....

odd ember
#

or I don't know

#

I kind of lost faith in the engine after seeing how half assed the AI module was

spark steppe
#

which ai module? AI perception?

odd ember
#

I think especially perception and to some extent EQS

#

I just ended up writing my own system

spark steppe
#

perception is pretty newish

#

theres another old AI sensing stuff creeping around in 4.2x

#

pawn sensing?

odd ember
#

yeah that was deprecated

#

I was talking about perception though

#

but I mean I suffer from NIH

#

so it's standard fare for me to remake everything

high sapphire
#

So would adding an item to the player's inventory work like this, using the tag:int map?

#

Hm, it almost works

#

This doesn't quite work right either, hmm..

odd ember
zealous moth
#

@high sapphire using add in a map overrides previous entries

high sapphire
#

I'm fine with only having one copy of the tag, but I want to track how many of the items the player has picked up. In this case, I picked up 3 health potions and 3 magic potions

#

Or does add not work for that either?

zealous moth
#

What is the situation? Single playet?

high sapphire
#

Yeah, singleplayer

zealous moth
#

K maps dont do well in multi

#

Maps can only have 1 unique left hand side value

#

So when you add you clear the previous

high sapphire
#

Is there a way to add to the righthand value though?

#

Ie, Item.Consumable.HealthPotion:: 3
Item.Consumable.MagicPotion::3

dawn gazelle
#

So if you're wanting to increment, you need to get the current value out of the map, and then add to that, then add it back into the map.

high sapphire
#

Ah, so I was going about that the wrong way. Good to know

#

So in my case, it'd be like this?

dawn gazelle
#

Yep

high sapphire
#

So picking up the items works, keeping track of how many of each item the player has works
Now to get the menu showing the right values

#

Not entirely sure where to start, though.. working with gameplaytags/maps is fairly new territory for me

#

I'm sort of able to follow along what @maiden wadi said earlier, but not entirely

unreal tusk
#

Can anyone help me figure out why the collision on this isn't working? The animation triggers the notify fine. Which calls for traceAttack. traceAttack gets called fine but while debugging it it won't get passed the first Branch for Return Value. Which you can see in the screenshot of the line trace it's treating this character BP as if it's not colliding. Which is why it won't pass this branch. I've confirmed I can hit at least the environment and walls around me, but it does not go passed the second branch obviously since it's not tagged as Enemy.

#

I've tried making sure the testdummy bp, capsule, and/or mesh was tagged as enemy. None seem to do the trick.

#

But then again, the trace isn't even detecting it, so probably need to solve that first

zealous moth
#

@high sapphire i wouldnt use a map for items though. Instead an array of structs.

high sapphire
#

Oh. So go with Authaer's suggestion of creating two structs - one for the tag + int, one for the name/description/sprite?

barren tide
#

is there another way to dash besides launch character? it makes my character "jump"

zealous moth
#

@unreal tusk print string 1 and 2 at each branches. What do you get?

#

@high sapphire1 struct is enough but yeah

#

@barren tide remove friction and launch laterally then enable friction.

unreal tusk
zealous moth
#

@barren tide there really isnt any better way. Worst case if the problem is the animation make a bool bIsDashing and if true dony play jump anims

obtuse herald
#

VInterp To

zealous moth
#

@unreal tusk sounds like your trace channel is ignored

#

@obtuse herald yeah but it fails mid movement and you have to deal with all movement vars.

#

Launch resets it

obtuse herald
#

why should a dash fail mid movement?

unreal tusk
zealous moth
#

I meant with vInterp

unreal tusk
#

That resolved my issue.

obtuse herald
#

I actually would prefer VInterp over launch character

obtuse herald
zealous moth
#

I guess it depends on the game and style

#

I tried vInterp, launch and 0 friction methods. Only launch wad anywhere near smooth

#

Was*

obtuse herald
#

temporarily increasing the movement speed can also do the trick

#

just telling that there are ways that do not include the character jumping

zealous moth
#

True true

#

But some of them are so ridiculously complex not worth it (like 0 friction)

lusty shard
#

how to print impact normal between a value of 0 and 1?

zealous moth
#

@lusty shard dot product

obtuse herald
#

isn't impact normal already between 0 and 1?

lusty shard
zealous moth
#

Its a vector so it isnt 1 value its 3

#

Dot product converts it to a float between 0 and 1 where 0 is parallel

#

Iirc

lusty shard
#

always prints 0 atm

#

even as im looking at different surface angles

zealous moth
#

Yeah?

lusty shard
#

yep. im trying to disable placement of a building if the angle is more or less than a value.

zealous moth
#

I would read up on it to understand what it does. You need 2 directional vectors. In your case the normal and the origin of impact

#

First google hit gives you a good example use case

abstract summit
#

Can we add +1 to a struck gor change is state ?

obtuse herald
#

depends on the struct

#

but bp structs definently

abstract summit
#

how

obtuse herald
#

set member

zealous moth
#

^ Set member in struct

obtuse herald
barren tide
#

another noob question. how do i add this lol. not sure what to look up

obtuse herald
#

that is an enum

barren tide
#

not that one. the actual pop up

zealous moth
#

@abstract summit oh god no

barren tide
obtuse herald
#

I think you hover over it and click on that small pin

#

at least that how it works for nodes

abstract summit
#

so i can't ?

dawn gazelle
#

by default the bubbles show up when you zoom out

zealous moth
#

@abstract summit no no your nodes are all wrong

barren tide
#

doesnt work on the one i made ; -;

zealous moth
#

@barren tide compile

barren tide
#

done that ; -;

#

the movement one is from base content

abstract summit
dawn gazelle
#

Click on the comment in question. Make sure "Show Bubble When Zoomed" is checked.

zealous moth
#

@abstract summit get the variable for level then do +1 and link that to set

#

I am not at computer so i cannot show

obtuse herald
#

yeah, you need byte add

#

but that only works if your levels are synchronous with the position inside the enum

dawn gazelle
barren tide
#

oo that bubble thing worked thanks πŸ˜„

abstract summit
trim matrix
#

is there any way to mess with the angle when I add an impulse?

storm vigil
#

Hi. Whats the logic wherein if you aim to an ai he sorts of dodge the moment you aim on it?
I assume if you can get a check that character is aiming and the linetrace hits its head, you play a rootmotion dodge animation? But how can we do that without triggering the fire logic and linetrace? Do i have to make another linetrace when aiming? Thank you

dawn gazelle
storm vigil
vapid grotto
#

is there editor Console command to stop all shader compilation ?

tawdry surge
#

No

obsidian topaz
#

I have a debugging question. I am relative new to unreal and I am currently playing with character movements. I used the ThirdPerson Template and moved the camera to the head. To have a "real" first person. However I did not attach it to the Mesh head parent. Because I got dizzy from the head bobbing / camera movement. I also set the controller rotation yaw on the class and use pawn control rotation on the camera. when i move with A S or D i get rubber banding. I don't get it on moving forward with W and turning with the mouse. What could the issue be ? What is the best approach to debug something like this? The last changes I did were not concerning any movement. I switched off anything custom by myself removing the connections...Could it be in regards of the animations? They are the default ones.

high sapphire
#

In particular, I'm not sure how to approach this part

In the object you create that you send to your listview, you would just pass it your ConsumableItemGameData struct which just has the ItemKey and Count. When the widget has this, it can use that ItemKey in that struct to retrieve the Name, Description, and Icon from the static datatable or data asset.

smoky rivet
#

is it possible to get the rotation of a bone at a specific time in a montage thats not playing yet

glass magnet
#

hey yall

#

im trying to follow this documentation on grid based fog of war

#

in this picture

#

what would be get local commander

high sapphire
#

When you pick up an item, instead of straight adding a new struct, you will instead iterate over the current inventory of consumables. If you have a struct in the array that already has an ItemKey matching the one you picked up, then you just add one to that array index. If the entire loop finishes, you assume you don't have that item and add it as ItemKey and Count = 1
Would that look like this, roughly? @maiden wadi

glass magnet
# glass magnet

im looking in an actor blueprint class but is it not in there?

dawn gazelle
# high sapphire > When you pick up an item, instead of straight adding a new struct, you will in...

Your inventory doesn't need to contain all the data about every item - just the gameplay tag and quantity would probably be sufficient as the data for each item would be stored in data tables. The data tables can have rows set up with names that exactly match the gameplay tags you created. This allows you to convert the gameplay tag to look up a specific row on the table to pull the information.
You could also separate each of your data tables out if you wanted, you just change the data table you want to look at based on the tag.

#

Your inventory UI then is just a series of a specific type of widget that just needs to know which inventory slot (ie. the index of the array) that it needs to look at, and pull the gameplay tag from it.

#

Once it has the gameplay tag, you can fill in the details where you need them, such as setting the text box for the display name, setting the image for the icon etc.

glass magnet
obsidian topaz
dawn gazelle
# high sapphire > When you pick up an item, instead of straight adding a new struct, you will in...

To add to the inventory, you do need to increment it something like what you have here, but structures don't quite work like this. You need to get the copy from the array, increment the quantity value, then set it back in the same index of the array.
The below example is how you can increment within a structure, but it's still not full proof as you need to be able to add items to your inventory even if they are not found in your inventory, so there's a lot of booleans involved and different functions involved to build up the inventory. The idea being now though is that your inventory is just an ID and a quantity and with that ID that you can then use to look up the data you may need about your item and then control how that item gets added to your inventory.

glass magnet
#

ey yall how can i get an update of when a characters visibility changes?

high sapphire
dawn gazelle
#

Its just a temporary local variable. Any time you get a structure from any array it is always a copy, not a ref, so you cannot set values back into the array directly. By using a local variable it stores the copy so that I can the modify it before it gets reinserted into the array

high sapphire
#

Ah

#

Weird, when I try to do the set members in [structname], it doesn't show quantity, just struct ref
Unless I'm doing that wrong too, which is a distinct possibility

gentle urchin
#

Click on the node

#

In the details panel

#

You can select which variables to show

high sapphire
#

Ahh, that explains it

#

Though, it looks like trying to print the contents of the player's inventory doesn't work anymore.. which is odd

glass magnet
#

hey guys im trying to figure out how to make an event dispatcher fire whenever the visibility of my character changes but I cant think of a way to figure that out

bleak swift
#

Doe's anyone know why when I try to test Listen Server for 4 Players it doesn't connect each client?

#

Shouldn't each Client try to auto connect to the server?

#

These 4 clients are on my same network btw

gentle urchin
glass magnet
#

right- ok but

#

damn it yeah ok

#

mb

#

x.x

#

can someone help me understand a fog of war i cant

#

i wasnt quite able to understand the article that someone shared and translate it to my project

primal smelt
#

Is it possible to find a print node from the console? As in, get print node printing specific value? Because I've gotten sloppy with my placements and now I've got some noisy b@stard singing off every frame and I canne find him

#

AH, it worked. Vent, and then ye shall find it.

magic parcel
#

I have no clue where to ask this..... but

#

maybe physics

#

ill try there first

sharp rapids
#

by default, How often does Garbage Collection run?

#

Is there a way to know when gc has run? like print string or something?

magic parcel
#

this is my issue, in case anybody here knows how to fix it, and is not watching physics chat πŸ˜›

neon jolt
#

Thanks for the reply, I found a solution that was casting to the player controller and do the logic there. Logic doesn't work I site widget for multiplayer πŸ‘

short pawn
#

How could I "get" the material of folliage instances. I am trying to set a parameter in the material

magic parcel
#

@short pawn get materials?

#

or maybe get material index, and then type the name of the slot for the material

#

however, i thought you had to create material instances to be able to modify values on the fly

short pawn
#

@magic parcel thanks but It was for folliage instances. i got al the folliage instances but for somereason i couldnt create dynamic material instances of them like regular actors

magic parcel
#

hm.. interesting

short pawn
#

@magic parcel I just decided to go a different direction thanks for trying to help

magic parcel
#

all good

#

I know we were using material instances for ours. (this was a bit ago) so good to know you got another way

#

❀️

short pawn
#

I'm re making a scene from death stranding and i wanted all the folliage actors to turn black

#

instead I scaled them on the z down to zero with a timeline to make it look like it was withering

magic parcel
#

oh... nice

#

i was doing something similar a bit ago

#

when the player walked up to the stone (altar) and placed an object there

#

the object would randomly change the environment to match the item placed on the altar

#

so it would need to change the dynamic material variable for colorVector in the base color node

#

sounds cool, bet it looks great!

#

material code is where I actually have fun πŸ˜› i think I would enjoy being a technical artist

primal smelt
#

Does a ForLoop within a function automatically limit what is being looped to the end of that function? I just noticed I hadn't closed off a loop properly and didn't notice any perceptible change in performance. I wasn't sure if it would try and loop everything on the exec line from the eventgraph thereafter, I guess not!

gentle urchin
#

If you only return on complete then no, theres no automagic optimization going on (there isnt in either case but one can potentially be way faster than the other )

#

Exiting early means the rest of the loop wont be executed

primal smelt
gentle urchin
#

Not really no

#

For it to end, you must call return

#

The circumstances around when you can call return depends on the functions purpose

timber knoll
#

It loops for what you define...

#

You can only choose to break the loop earlier, but that has to be done manually.

gentle urchin
#

^ exactly this

primal smelt
#

Ah sorry I'm an idiot, it's actually a ForEachLoop I am using

gentle urchin
#

Can break that early aswell, if you want

primal smelt
#

WHen you say call return, you mean the function and not the ForEachLoop?

gentle urchin
#

Yes

primal smelt
#

Well I'm not actually returning values with an output pin but I am setting values within the function that are being used elsewhere. Is this effectively the same?

gentle urchin
#

Calling return will make it stop whatever it was doing in the function

#

Well it doesnt matter if you return something or not

#

If you found what you were looking for, or did what you wanted to do (and know that the array doesnt interest you anymore)

#

You simply set the desired variables, and call the return

#

Most to gain in search functions

#

If this was for... equipment stats, you usually cannot skip out on doing the entire loop

primal smelt
#

I feel like I'm being stupid on something basic that I've glossed over, but when you say call return what does that mean without a return value?

timber knoll
#

When returning values, you decide what to do with those values. Otherwise you are just straight up changing data from the original.
Edit: both have their uses cases tho.

gentle urchin
primal smelt
gentle urchin
#

Returning from the function, yes

#

"Im done with this function, now get me out !"

primal smelt
#

I guess that means a pure function (which I haven't touched yet) can never be returned?

gentle urchin
#

They can

#

Pure especially in blueprints is fake pure

primal smelt
#

oooh, in bp they don't have an exec out though do they?

timber knoll
#

They basically start and end in between your last and next nodes

#

It's pretty much the same as using no pure in the same place.

gentle urchin
#

Pure is just a promise not to change anything inside it

timber knoll
#

Their use case is mostly just to keep things more readable and clean.

primal smelt
#

Ah gotcha, so a pure function is mostly for safety?

gentle urchin
#

Sort of, yes

#

Using pure nodes should mean that calling this will not alter the state of whatever it belongs to in any way

#

Atleast thats how i think of it

timber knoll
#

I just don't like using them in general, gives you less control over things πŸ€·β€β™‚οΈ

gentle urchin
#

There are drawbacks, especially in bp

#

Using pure nodes means you cant cache the result directly in the node

#

The function will be called again and again for each pin connected to it

#

While if its not a pure function, the return value is cached

primal smelt
#

Good to know. I had looked it over briefly but it didn't seem like something I'd be making use of

primal smelt
#

Thanks you two, sorry it was probably basic stuff with the ForLoop. I haven't quite fully understood how I'd implement them in my project yet. So far I'm basically using a couple of ForEachLoops to check controller thumbstick positions in relation to each other (both pushed in same direction? At roughly the same length? Same or opposite directions?).

gentle urchin
#

Doesnt sound like something one would loop πŸ˜…

primal smelt
#

Probably not, but I wanted to try it out at the time!

gentle urchin
#

Valuable to experiment :)

primal smelt
#

I need to just read up and look at some examples, I just haven't thought of ideas of what they'd be used for.

#

And yes experiment πŸ‘

timber knoll
#

This is why I'm always saying blueprints isn't different to actual coding πŸ˜› it's the same principles

gentle urchin
#

Inventory lookup , adding etc

gentle urchin
primal smelt
gentle urchin
#

Visual programming

timber knoll
#

The math functions exist in pure code as well, they're in the engine. (and often even built into the language)

primal smelt
# timber knoll What math? xd

Ah so I guess if you were using something like VisualCode or Notepad++ you'd get auto-fill optiosn if you typed in "cross product" (or whatever c++ wording you need to use!)

#

(If you can't tell, my written programming experience is severely limited. Did a bit of HTML 4 back in the day and that's about it :p )

timber knoll
#

Yeah basically whatever exists in BPs, exists in C++ as well (and even more stuff that's not exposed to BPs)

primal smelt
#

It's the only plug-in I intend to download though, trying to keep everything as vanilla as possible

timber knoll
#

Well yeah a lot of things have plugins which just add extra nodes that do the logic through C++

#

Which is something a lot of people do, they write some logic in C++ and use those nodes in blueprint because they like the workflow more

gentle urchin
#

Thats what i do ^

#

Recently started with c++, so converting my project actor by actor was a nice start

maiden wadi
cerulean palm
#

There's a export asset context menu option in content browser which exports asset to *.COPY file, I exported a material that way. Do I get to import it back? the import asset menu doesn't show COPY file in the known file list.

icy dragon
round basin
#

Hi, I would like to know if it's better to make a variable for the component to use (I'd put it just after the event), or if it's better to let it like that, or wouldn't it make any difference ?

#

I want to know what is more optimised

cerulean palm
#

In that case have to copy the whole project

icy dragon
cerulean palm
#

yes, the material is pretty much self-contained, doesn't use any material function or texture, a procedural one

#

Looks like the export is pretty much useless then, maybe this is for taking diff or something.

trim matrix
#

bump

gentle urchin
#

Timeline + some method of interaction

#

Overlap setting interactable object, which responds to an interface, f.ex.

high sapphire
gentle urchin
#

If the get

#

Is by ref

#

Then yes

#

It should work^^

maiden wadi
#

For example, this will let me change just the blue in a linear color without affecting other properties in the struct.

#

Make sure your Get on the array of structs has the diamond output, or else it'll be a copy.

high sapphire
#

So something like this?

gentle urchin
gentle urchin
high sapphire
#

Maybe it's the ~3 hours of sleep I'm running on, but I'm not entirely sure I know what you mean by "get the index from the macro", sorry

gentle urchin
high sapphire
#

Ah
Yeah it's the ~3 hours of sleep

#

Hm, am I doing the print-inventory-contents part wrong too?

maiden wadi
#

Looks fine.

high sapphire
#

Hm. Maybe my mistake is here? Not sure why the tags are showing up as "none" and the number is showing up as 0..

maiden wadi
#

Also looks fine. Have you set the tags on the items you're picking up?

high sapphire
#

Yeah, I have

maiden wadi
#

Hmm.

high sapphire
#

Three health potions, three magic potions, three swords

#

I also did create the data table, but I wasn't entirely sure what to do with it/how to use it

maiden wadi
#

Oh, the add thing at the end here.

#

This add on the bottom right needs to use the tag and amount from the function parameter, not the loop.

gentle urchin
#

Also,

#

Om the macro

#

You van make a custom one, identical to the original,

#

Except swap the internal get copy with a get by ref

#

Saves you extra get'ing

high sapphire
maiden wadi
#

That's a fair point. I don't think I modify structs much in blueprint. πŸ˜„

high sapphire
#

Though.. that also means I shouldn't use the others in the loop either, doesn't it
So is that where I use the datatable I made?

tight pollen
#

I try to do a smooth crouch. works fine locally, but when the server sees the client or the client sees the server when crouching, it goes through the ground. what am I doing wrong
? camera shake will be on owning client. don't look at it
;p

maiden wadi
# high sapphire

You can actually do one better with this table and use the Tag string as the lookup name. There is a Get Tag Name function for GameplayTags that'll convert their tag to an FName that you can use on the GetDataTableRow function.

high sapphire
#

So like this?

maiden wadi
#

Sure. But it's also worth noting that storing them here is pointless. You don't need this data until you get to the widget.

#

Only thing you need to store here is the tag and amount.

high sapphire
#

So I can turn the player's inventory array into just the tag/amount, and only worry about the sprite/name/etc. for the widget, and I'd still be able to connect the inventory stuff to the saving/loading system?

#

And now I'm trying to remember how to set up the object/widgets

gentle urchin
#

Yupp

crisp vault
#

i have a question about bp and object oriented thinking.
The way I see it is let say if enemy is an object and projectile is too, and enemy shoots this projectile, the enemy is the owner of the projectile object, and the bp written for this logic is in enemy event graph correct?

And if that projectile hits something, who knows about it*, the projectile or the enemy?
*here i mean where is the bp written?

gentle urchin
#

Projectile would know

#

Owner could be registered to a callback if desired

#

But does owner need to know? Probably not

#

Projectile likely only cares about what it hit != owner

crisp vault
#

where is the logic for the shooting then? in enemy, this needs to know and so does the enemy, does this make sense or would you do it otherwise?

gentle urchin
#

Shooting would be done in the gun

#

Enemy owns gun
Gun owns bullet :p

maiden wadi
#

You pass an instigator to the weapon. Weapon passes this to the bullet. On Damage, you pass this to what was damaged. What was damaged handles itself based on the instigator.

frozen spear
crisp vault
#

ouch so you break down even that far, makes sense, so it is okay to think this way i guess, i always disliked the idea of something happening inside of something else which has not much business with it

gentle urchin
crisp vault
maiden wadi
#

No.

#

Player, gun or bullet should have zero knowledge of said widget.

#

Widget knows about Pawn, pawn has health, widget displays this. Pawn doesn't care about widget. Bullet is instigated by gun, gun's instigator is it's pawn. Gun fires, passes instigator to bullet, bullet calls apply damage on other pawn, other pawn does damage processing on itself, widget updates on it's own.

frozen spear
#

The only communication from the hit point bar should be it grabbing the current health from the player pawn... The pawn shouldn't know anything about the hit point bar

crisp vault
#

Okay, that is cool, totally "imaginable" cause thats kinda how itll be in reality if we just apply values, thanks alot guys

#

Gotcha

frozen spear
#

This is of course generic and based on hud hp bars...of course if your game does some fancy functions that require the player pawn to know ..such as attaching it as a child and floating it over thier head...then of course the pawn would hold a ref...

high sapphire
#

Hm, still not quite working..

#

The individual widget (the green bar) BP:

#

The list (which spawns the green bars) BP:

safe musk
#

hello, some one can help me, i can't do the character look his head at specific location ... i tried this:

tight pollen
high sapphire
trim matrix
#

is there any way to get "input mouse wheel delta (how far the mouse wheel has moved/scrolled this frame)" equivalent of "get input mouse delta" node?

#

i'm pretty sure i've used it some time ago, but now i don't remember the name of the node, is it even possible to get it through a player controller ref?

tawdry surge
#

I'm not sure, but I'd think that would be an input event, like clicking

trim matrix
#

i want to implement the input in a widget bp. the "listen for input action" does not work with input axis, the only node that works in widget is this "get wheel delta" but i requires a "pointer event structure" ref (not sure how to use it)

slender bane
#

why is my char moving with animations to left right? i just have a normal movement ?

trim matrix
#

don't use actor's rotation to determine the forward and right direction to move. use controller rotation->break rotation->make rotation (with only the yaw input plugged in) -> get forward and right vector from that

#

this is how mine is setup

tawdry surge
#

Or split the vector output pins and skip the make break nodes

slender bane
#

guys i need a thirdperson char tutorial

#

do u know any good ones?

obtuse herald
tawdry surge
#

Define "make your own"
You mean assembly the peices or extend an actor class to make a new custom character class from scratch?

round basin
#

Thank you very much for the answer! πŸ™‚

trim matrix
#

Welp, is there not a single way to get mouse wheel delta inside of a widget in UE4? (Epic bros what are you guys doing)

#

now i have to make an entirely new actor class to handle mouse scroll just because i can't get a mouse wheel delta inside of a widget

tawdry surge
#

Why not just have it in the player or controller where you spawn the widget?

trim matrix
#

yeah that seems like the only option

trim matrix
tawdry surge
#

Controller would be the place to do that

trim matrix
tawdry surge
#

To be specific, I mean you can call enable/disable input on the player from the controller as well as spawn the widget and pass it the relevant information

trim matrix
#

i was doing it inside of the widget bp since most of the input bindings are there, guess i'll implement in the player controller

tawdry surge
#

I suppose that'll work, but generally speaking isn't "proper".

fierce stump
#

Armor pickup's mostly set up, but I don't quite know how to set up the logic to make it absorb damage.

odd ember
trim matrix
runic parrot
#

Hi! quick question, enumator lower value As Byte (To Int) = 0 or 1?

maiden wadi
runic parrot
#

if the first position is 0 or 1

#

like in arrays

odd ember
#

anything in code always starts from 0

#

so byte is 0-255, not 1-256

runic parrot
#

ty

junior badge
#

anyone active here?

fierce stump
odd ember
junior badge
#

I can't get this tutorial to work on ue5
https://www.youtube.com/watch?v=_Sdm_gsbaos

anyone know why?

Basically is a sun rotation controlled by a slider

Creating accurate and realistic patterns of sunlight and shadow is critical to some scenes, especially for large architectural and construction projects, and Unreal Engine's Sun Position Calculator Plugin provides a method to do this. In this Unreal Engine tips and tricks video, you'll learn how to modify the time of day with a slider during run...

β–Ά Play video
#

sun position doesn't update, yet I get no errors on console

odd ember
deep sundial
#

Is it good practice to add recoil to a Player through SetControlRotation? Maybe there is a better solution?

odd ember
#

I dunno. "better" is subjective

#

I'd personally do it through a timeline as it would be easier to gauge how much recoil to add. equally I don't know if you automatically want the recoil to disappear after each shot

deep sundial
odd ember
deep sundial
mild crystal
#

is it possible on a blueprint cast to level bp? i have a variable on level bp and i wanna cast to level to then set it.

maiden wadi
mild crystal
#

oh ok

#

i setup the enum actions there?

#

where is supossed to setup my enum?

#

@maiden wadi

maiden wadi
#

You mean controls. Those likely go in a Pawn or Controller.

#

Judging that it affects a pawn, I'd say it should go in your pawn, or a base class of it.

#

Generally speaking, level blueprints are terrible places to do any form of gameplay logic. Reason being is that you'd have to copy it into every single different level you make.

timber knoll
#

That definitely looks like logic for your player

mild crystal
#

i just set the enum actions i already found a solution

upper mortar
#

On todays episode of simple things google wont tell me, how to I get left vector?

gentle urchin
#

Invert right

#

Vector * -1

odd ember
#

no, reflection in general is limited in UE. there's the CreateEvent node used with dispatchers and timers, but that's about it

storm vigil
#

I just learned now that we can use rep notify on single player to change variables when it changes value like health or stamina

upper mortar
storm vigil
odd ember
storm vigil
#

Wanted to change my event using timers

#

But thanks for that info

odd ember
#

there is, but the CreateEvent node is better

#

you can use it with a select node

#

but generally what you want to do is bordering on not possible within the scope of UE

#

yes you do. but that would still be the case for any string based function

#

you can't call a function that doesn't exist

odd ember
#

yep

gentle urchin
#

Wouldnt this work ?

odd ember
#

I'd strongly advise you to try and find another way of doing this

#

instead of banking on reflection doing the work for you

gentle urchin
#

Im sure ive seen it ouside vcam

odd ember
#

again

#

if you find a non reflection solution

#

you won't have these issues

mild crystal
#

how can i check if a button is pressed twice? can i create a float that will me more 1 every time i pressed?

subtle valve
#

has anyone ever had an issue with spline meshes where the material defaults to world grid material, even if a different one is set on the mesh?

timber knoll
timber knoll
subtle valve
#

ok thanks

timber knoll
#

something like this

trim matrix
#

is there a "stop" node to stop doing multiplication?

#

because I have it gaining speed but I want to set up something that when the velocity equals a max speed it goes into a branch which then fires something off that stops the multiplying event

#

is there anything that can stop an event mid go?

viscid smelt
#

Hi guys, Question. Is it possible that in a loop where im instancing meshes, ie roof tiles i can "code" an exception to instancing in some kind of volume? I would like to instance roof tiles(which i already did) and in the place where i put my roof window i would like for this code to not instance meshes, so my window is not layed with tiles

mild crystal
# timber knoll

ok thats good, but i want to make that only go to other animation if i pressed 2 times the button. How do i do that because on transition i cant put what you make up there

earnest tangle
hazy grail
#

@trim matrix have a greater than on the multiplication then feed that to a branch

viscid smelt
trim matrix
#

how would I stop it?

viscid smelt
#

i will look into this

trim matrix
#

I get that when it's greater than the max speed it fires the branch

#

but how do I stop it?

hazy grail
#

@trim matrix have the branch be before the muliply

#

when x > value branch it leads to not multiply

trim matrix
#

oh

#

so like this?

mild crystal
#

what are this error

trim matrix
#

so when it's greater than max speed it returns true

#

then true is blank

hazy grail
#

@trim matrix yes

trim matrix
#

oh

#

it worky

#

you smart

#

you very smart

#

thank you man

#

I appreciate it

hazy grail
#

πŸ‘ glad to help

mild crystal
trim matrix
#

is that an animation?

#

because I am very new to all of this

mild crystal
#

anim notify

trim matrix
#

yeah, I haven't worked much with BP

#

I apologize

#

I am bouncing a ball everywhere in my project

#

I'm sorry

hazy grail
#

I have a problem with my timelines. Some how I made it so the graph doesn't show when I double click on the timeline anymore. The only way to get the graph to show is to make a new project. Anyone have this problem before?

unreal tusk
#

Anyone have any idea how I can cast to whatever target my player hits so that I can grab the enemies armor values? So basically just, Cast To Hit Actor or something. Doesn't seem to be a thing

hazy grail
unreal tusk
tulip mason
#

Ahhh casting, how you load your entire game in the main menu

mild crystal
#

is this ok for pressing 2 time left mouse?

timber knoll
#

That's literally what I gave you πŸ˜›

timber knoll
hazy grail
#

@mild crystal what happens when you press play and try it?

timber knoll
#

you have references with no value that you are trying to use

mild crystal
timber knoll
#

are you sure it doesn't work, have you tried printing on true or debugging

mild crystal
#

trying rn

#

1sec

dawn gazelle
#

Rest assured, the double click is working. Whatever happens when it does successfully double click probably is not working. (Are you sure your mesh on your character is set to use the Flight_AnimBP?)

hazy grail
#

@mild crystal I'd add a bool off on the True end so it doesn't trigger 2 clicks yet again if someone triple clicks

upper mortar
#

I am trying to do RTS zoom to cursor, The plan was to draw a line between the camera and the mouse location and move along that. How can I get mouse location but at Z=0?

hazy grail
#

@upper mortar the convertmouselocationtoworldspace it funny in the coordinates it gives. do a print string on it to see what is really going on

upper mortar
#

i saw that it was giving location very close to camera

mild crystal
#

i made this

echo salmon
#

The values in the time line is length 2.0 sec and at 0.0 value is -180 and at 2.0 is 180 and i got this strange rotation .

mild crystal
#

but test2 is not

#

i think

timber knoll
#

This definitely works, just tested

mild crystal
#

ok

timber knoll
#

A timer instead of a delay to have more control, but pretty much same principle with addition like unrealwater said
(I forgot to set the bool to off in first example)

timber knoll
#

You could just add rotation based on tick deltatime, with a certain rotation speed

echo salmon
#

i thought that the correct way to do it

#

with timeline

glass magnet
#

ey yall quick question about line tracing, Im trying to set it up right now but whenever i move my character it moves them in a weird way instead of staying stationary, does anyone know the reason for htat

timber knoll
#

It's one way of doing it, but since you are basically having it loop infinite and just add a constant value there's not much use in it

#

When you would instead have it follow some sort of curve over time or have it stop here and there, timeline would be more useful

upper mortar
timber knoll
hazy grail
#

@upper mortar yes

high sapphire
glass magnet
hazy grail
#

multiply that vector and it should hit something eventually

glass magnet
#

😎

upper mortar
echo salmon
#

@timber knoll should i use event tick ?

timber knoll
# glass magnet

End needs to probably be Location + the result of multiplication

glass magnet
#

oh

#

youre right

timber knoll
hazy grail
#

@upper mortar camera positon - mouse world x 1000

glass magnet
#

yeah youre right its + i put multiplaction thats dumb of me thank you PraiseTheFour

quick marsh
#

at this point I just want the Boolean to switch to true when the enemy sees the player

timber knoll
quick marsh
#

oh, sorry

mild crystal
#

thx

glass magnet
#

random question or something, how do i draw a circle in blueprints

#

like how you can draw a triangle how would you do the same for a circular shape