#blueprint

402296 messages Β· Page 641 of 403

fresh sand
#

with?

indigo bough
#

Theory question, looking to create a 'volume' or at least some way of knowing if a player or actor is within a certain area which is non-standard. Ideally based on the outline of a closed spline loop.

Even more perfect would be something I could modify at runtime. The world would have multiple of these 'volumes' and each one would apply different effects (post process, area name drawn into UMG, change player combat stance, add player buffs, etc.)

My first thought was creating a flat mesh from the spline shape, and having a trace down from the actors which finds out which zone they are 'above'. However this is limiting as it doesn't support overlapping volumes where some changes might be additive, or volumes above/below another one.

Any thoughts on this. Basically it's a more complex shaped collision volume.

#

You could think of it as an RPG region volume, I guess. That's basically the use case

#

I guess my question is more, anyone aware of examples of something like this? Also a possible method to creating a mesh or some kind of volume I can get overlapping actors from πŸ™‚

round basin
#

Hi, I would like to possess 2 pawns at once, how can I do that ?

heavy lion
#

I dont believe a PC can possess two pawns.

#

Not 100%. But you might have to make a controller that sends inputs to two different pawns

round basin
round basin
#

I'll try that

#

thank you!

brazen prism
#

Im trying to add values 1,2,3... etc into this array but it doesnt work. Does anyone know what is going wrong?

dusky stirrup
#

why it isn't this piece of shit working?

#

i literally spent 4 fucking hours trying to make this work

#

and boom doesn't work

#

πŸ™ƒ

earnest tangle
brazen prism
#

hmm I was hoping the temporary value would just hold it all instead of making a variable. ill try to make a variable and see if it then works

brazen prism
#

oh this just works.. im kinda mad i spend an hour on this

mild anvil
#

Hey all, does anyone know of a way to alter a timeline's animation. Eg: Make a timeline animation slower or quicker using a variable?

#

NVM, got it I think: Dropping it here if anyone else needs it. Noob issue I know but I am indeed a noob.πŸ™ƒ

dusky stirrup
#

what im doing wrong?

#

someone please explain me

#

like i tried everything

#

and this piece of shit doesn't work

#

ahhhahhahashshahdhsahdhahsd ha fuck this

earnest tangle
#

It doesn't look like there's anything wrong with it at a glance... Have you tried printing messages to see where it breaks?

#

Like, does it trigger the overlap at all?

dusky stirrup
#

no it doesn't do anything

#

thats the thing

earnest tangle
#

Right - so if the overlap doesn't trigger, then it means the collisions are not set up right for it

dusky stirrup
#

collision set right because it detected im in damage area

earnest tangle
#

Okay so at least that's working then.. let's see

dusky stirrup
#

no printed message, no widget working πŸ™ƒ

#

im about to go monke

earnest tangle
#

your event is called TakeDamageDPI_1 but the function call is calling TakeDamageDPI

#

That might be the issue

dusky stirrup
#

oh boi it's gonna be lit

earnest tangle
#

heh

dusky stirrup
#

i really suck at this

earnest tangle
#

shit happens

dusky stirrup
#

🀣

earnest tangle
#

You might want to learn how to use breakpoints and the debugger if you haven't tried it

#

Another method which can help with problems like this is try to isolate the point where it breaks

#

For example you can put a lot of prints into the graph, so you can see how far it goes

#

If you can find where it breaks like we did now, you'll have a better idea of where to look for the problem

brazen prism
#

helps me find typos πŸ™‚

indigo bough
#

Further to my question earlier about regions. I've managed to create a ring of collision boxes along a spline, which would give me an overlap or hit event. However, because it's just an outline of boxes, I can't reliably tell if the player is within the ring. Because when entering the ring of box collisions, it'll trigger an 'end overlap' event. Any ideas how I might use something like this to determine the player is within the spline area?

patent wasp
heavy lion
#

@indigo bough Maths. Calculate distance between points or something haha

earnest tangle
dense tulip
#

@indigo bough You should give different names to each box that are outside, then give different name bases to inner sections maybe ?

indigo bough
#

Thanks folks, I think perhaps the nearest point on spline with some distance math is the easiest route to go long-term. Time to learn maths all over again πŸ˜„

#

Yeah, the complex part is these volumes basically change based on player input, so I can't guarantee really any size, direction, or shape parameters

trim matrix
#

Hey guys!

#

i'm new here

sharp rune
#

Hey guys so I am new to unreal and in the future I wanna make a game like zelda breath of the wild is this possible with only blueprints?

indigo bough
#

Yeah, a few people are doing it πŸ™‚

sharp rune
#

So it’s possible?

indigo bough
#

Anything is possible, really

sharp rune
#

Alright it’s going to be a lot of learning but I am in for it

indigo bough
#

Maybe start with something smaller to get your feet wet

#

Or pick just one system to focus on

sharp rune
#

Yea that’s why I said future

#

First Gona Make a lot of small project

#

Thx for the help cya

trim matrix
#

I have in mind

#

a game, a duel game, set in medieval times

#

Called "Band Of Bastards"

#

and, alone it's a bit difficult

#

so if anyone's up for it

#

just dm idk

#

Btw

#

Hope it would work, i have tons of medieval assets

trim matrix
white crypt
trim matrix
trim matrix
dusky stirrup
#

is there a way to make it so the player doesn't get hurt while also recovering armour?

keen terrace
#

I have custom characters, their shape and size can change drastically. Thin to fat etc etc. My question is how can I have accurate collision with those different shaped meshes, the game will have guns so I plan to use line traces. Is there a way that I can update my collision accurately to reflect the morphs the player chooses for their character?

trim matrix
#

there should be

#

a way of changing the collision box

#

or whatever it was called

astral estuary
# dusky stirrup

instead of substracting armor and then checking if you have no armor, check first if you have armor

trim matrix
astral estuary
keen terrace
astral estuary
#

you should have a "physics asset" related to your skeletal mesh πŸ€”

trim matrix
#

Guys, sorry, is it normal that i cannot write in #volunteer-projects? (I know it's offtopic, just asking)

keen terrace
tight venture
#

Hello everyone. I have a question:

Do object instances have associated .uasset files? That object's corresponding class is associated with a .uasset file, but what about each instance?

trim matrix
astral estuary
trim matrix
astral estuary
unkempt adder
tight venture
#

Its type is LandscapeStreamingProxy

#

so... yeah it's an actor

dusky stirrup
#

@astral estuary it worked

#

thanks a lot man

#

you saved me

astral estuary
leaden isle
#

Hey there. How would you get the index of an Enum within BP ? I have this :

#

the error is :
The current value (NewEnumerator0) of the ' Target Map ' pin is invalid: Map inputs (like 'Target Map') must have an input wired into them (try connecting a MakeMap node).

astral estuary
#

an enum is an integer πŸ€”

leaden isle
#

is a range of integer represented with labels

#

isn't it ?

#

he won't accept it if I only connect the Enum element to an int input

astral estuary
#

you can also try a "select" node

#

was it a select? πŸ€”

#

it's like a switch, but no excecution pins, only values

leaden isle
#

seems to work with a select

#

thx

astral estuary
#

woah, you have 0 in both enums

#

be careful πŸ‘€

leaden isle
#

lol isn't it supposed to set it automaticaly ?

astral estuary
#

nope, select let's you specify any value for each value of the input (in this case, your enum)

leaden isle
#

Ahhhhh

#

ok

keen terrace
leaden isle
#

also : can you call a none existent index on an array within BP ?
for example if I set the index 2 while length is 0 would it set it to index 2 ?
Or do I have to set all indexes within the default value ?

astral estuary
leaden isle
#

can it get set programatically ?

#

something like EEnum.length

astral estuary
leaden isle
#

ah yes

#

ok thx

astral estuary
#

during gameplay you need to run something on the console... lemme google....

#

show COLLISION on the console πŸ˜›
bring the console down with the ` key. The one to the left of the 1, under esc

keen terrace
keen terrace
#

That is an exaggerated example, how would I get the collision to match that. Or have the line trace hit the mesh

astral estuary
#

ohhhhh, I am not sure how to do that... maybe having different physics assets and swapping them? :S

keen terrace
astral estuary
#

you can probably do a line trace and in the channel specify the "character mesh" channel πŸ€”
Expensive AF but might work

keen terrace
#

For skeletal mesh that would be "Per poly collision" I assume?

keen terrace
astral estuary
#

what is it that you are doing? πŸ€”

keen terrace
astral estuary
#

on shooters usually your character is merely cosmetic πŸ€”

#

your hitbox should remain roughly the same

keen terrace
#

Players are going to be able to have a really thin character or fat character though, that would end up with inaccurate hit results unfortunately for me

astral estuary
#

everybody would use the thin one πŸ˜›

keen terrace
#

I have thought about this haha - however it would be a strange experience to get a definite hit on a body part and nothing happen for larger characters or even miss and get a hit on thin ones :/

heavy lion
#

I have a function. It does a thing. I want to run that function n times. How would I do that?

#

So I have an int var that can be altered. When the parent function is triggered it will run the subsequest one n times

astral estuary
#

the run N times node?

heavy lion
#

wut?

astral estuary
#

there is a blueprint node called run N times

#

πŸ˜›

#

blueprints be crazy

heavy lion
#

Where?

astral estuary
#

do N times

#

my bad

#

oh, sorry, that doesn't loop on it's own

#

if you want it to do 20 times the same on it's own, just use a for loop πŸ€”

heavy lion
#

For Loop looks like the way to do it perhaps.
Just not sure how to say... do its 5 times now. Then maybe do it 8 times later

astral estuary
#

have it go from 1 to a variable

heavy lion
#

I'm not sure why this isnt working

#

If I remove the delay, I get all the messages in the log

#

But as soon as I add a delay anywhere nothing happens

astral estuary
#

your loop breaker is redundant. once your loop ran enough times it will stop by itself

heavy lion
#

I was just following the example

astral estuary
#

other than that, it should work

#

use the break wire in case you need to stop abruptly your loop. if not, let the index run its course and it will stop by itself

heavy lion
#

Just only seems to spawn 1 enemy

astral estuary
#

how many times does it print? πŸ€”

#

also, you can double click the "loop with break" node to see how it works internally

trim matrix
#

Can you have latent nodes inside for loops? Maybe it only spawns first /last

astral estuary
#

πŸ€” good point...

#

maybe a timer with event callback?

trim matrix
#

Use set timer by event and make it loop 5 times

#

Or what he said

heavy lion
#

pfft. Cant figure it out. I will try another time

#

Probably end up doing something stupid like this

valid widget
#

can someone help me

#

how would i detect flat land

#

on a terreain

#

every planet i need to detect a flat surface to land

trim matrix
#

I just checked and the delay node will not register if its already counting down

valid widget
#

use timer

trim matrix
#

How flat? You could have an approximate shape of the spaceship and do a line trace down from the middle, then move the ship say 10 units above the point the trace hits the landscape, if there are no collisions/overlaps with the landscape you can say the land is 'flat'

valid widget
#

well its a tardis

trim matrix
#

Really depends on your setup how exact you want to be

valid widget
#

so legit a flat square

#

so it checks the planet for any flat spot it can land and it lands there

#

this is chosen while in flight

trim matrix
#

Yes but surely you have some leeway where it doesn't matter if the ground clips into the bottom if people can't see it

valid widget
#

=yes

#

but how would i check the whole planet

trim matrix
#

Well you could approximate by discrete points

valid widget
#

i'm deciding between the voxel plugin and PGT procedural generated terrain plugin

#

i own both

trim matrix
#

hey i have some weird stuff happening

#

In one of my levels a blueprint controls that if there is a tag and it hits player it will kill the player. ok but one level doesnt even have that BP in it and still when i enter the tag to actor, it can kill me. Do the settings save onto next level even if i open it from my editor? I have no save system or anything else

#

nothing written to gameinstance and game mode either

#

its a bind event on actor hit in my levels player spawner

#

and when i open a level where there is not a spawner, it still kills me if there is a tag that can kill me

#

Do bind events stay forever then?

stray island
#

@dawn gazelle hi

noble basin
#

would anyone be able to help me with this? i have a spline, that i have an actor that travels along when the player overlaps it when you trigger an event, works fine, but i want to be able to tell when the player is at the end of that spline, how would i get the location of that spline point?

regal venture
#

What is the advantage to using gameplay tags instead of enums? It seems like both are mainly used as a way to find an object referenced by some sort of tag. In my using gameplay tags for maps, I'm just thinking it might be better to use an enum instead

weak gulch
#

Anyone know how to line trace from an enemy to the player properly? I can't seem to get it to work right and following normal logic just shoots the trace off into unexpected directions. I need to be able to have the actor check if the player is within sight and not blocked by anything and it can't use AI Billboards.

subtle creek
#

How could i make my players camera rotate around a level?

#

Feel like its very simple but im just trying to learn something

split cliff
# heavy lion

it's spawning one because the delay enqueues a unique task and then the loop continues immediately

flat raft
#

Best way to get the amount of seconds passed since I pressed a key?

sleek pecan
#

Hi all. Can anyone give me any clarity on in what contexts you can and can't use Timelines? I've found that depending on what BluePrint context I'm in, I either do or don't have access to Timelines and so far as I haven't been able to suss out the pattern.

If someone can give me a "rule" that Timelines follow as far as when they can and can't be used, I'd be very grateful.

oak timber
#

Anyone know why unpossessing a pawn wouldn't render a controller variable invalid?

trim matrix
#

how can i cast to bts?

tight schooner
#

@sleek pecan can't be used in a function (because a timeline is a "latent" node) and it can't be used in a BP component cuz I think timelines are part of the actor class? This is just my vague recollection. If you want to roll your own timeline-like thing, look into curve assets.

sleek pecan
#

@tight schooner The function seemed clear enough and yeah, the component thing seems clear. I just don't understand why exactly. I guess I can just look at the engine if I really want to find out, but "not in components" seems like a good enough rule in addition to "not in functions" for now

#

Thanks!

#

One other question: Does anyone know how Blueprint Arrays' Add function works? Are BP Arrays backed by Vectors on the C++ side or is this just some function that basically implements push_back for C++ arrays?

swift lake
#

hey im fairly new to ue4. I've made a project in a way that if a player walks over a box collision, he will take a 5% damage (function). He can Fire weapon through custom event. but when i the fire function is triggered, the begin overlap is stopped and it gives me an 'Accessed None' error. any solve?

stray island
swift lake
trim matrix
#

When you do your overlap you should double xheck it's the player overlapping the bpx and not anything else (like the bullet), only then should you trigger the event

surreal peak
chrome dust
#

Does anybody know what this even means in a landscape material ?

#

how can I locate mask 1110

trim matrix
#

Hi! I'm getting weird snapping troubles with my camera and I can't seem to figure out why.

#

I have a thing that dynamically adjusts the camera to compensate for camera lag, as in the above graph

#

A secondary graph lerps it to the desired position

swift lake
runic path
#

anyone know why spawning actors causes stuttering ?

surreal peak
#

How many actors are you spawning?

runic path
#

one

surreal peak
#

Does that Actor do anything expensive on BeginPlay or so?

runic path
#

not sure how to find out what might be expensive

#

cast to controller, sets variables from data tables, couple of calculations and sets timers

trim matrix
#

Are you auto possessing it with ai controller? Or is it player controlled

runic path
#

its neither

#

its tower which fires at enemies

trim matrix
#

Ah my bad you are just getting player controller or something?

runic path
#

yeah, im getting a ref to the game controller

trim matrix
#

What BP do you spawn it in

runic path
#

ui menu

trim matrix
#

Need to show the BPs

#

Is it at the very start of the level you have anissue, or are you spawning midway, or both?

runic path
#

its when there are lots of enemies in the level, but it aint that many, around 80

keen bluff
#

Can I ask, if I subtract B from A am I essentially doing 0 - 0.5, 0 - 0.5

trim matrix
#

Probably just a lot for it to process then

#

@keen bluff you are remapping to (-0.5,0.5)^2

runic path
#

if that was the case then its would gradually slow but it just stutters a bit then carries on

keen bluff
#

oh right?

#

thought I was understanding texcoord

#

I'll try read up on them more

runic path
#

all code is removed from Tick everywhere possible

trim matrix
#

If it has to process too much information at once it probably causes ms spike, look for ways to optimise

runic path
#

im trying to optimize but it seems to be small gains or im not looking in the right place

tight schooner
#

@runic path use the console command Stat Unit (or Stat Raw if you want a cool graph) to narrow down if it's a gamethread issue

#

if it is, then you might need to use the Session Frontend to profile BP

#

(there's also the newer Unreal Insights tool but it doesn't seem to record per-BP execution times)

#

The stutter suggests that it's something transient, like maybe loading an asset or idk

#

You can also use some deduction to narrow it down short of using a full-blown profiler tool, like if there are 40 or 20 or 0 enemies, is the stutter mitigated? Is something particular happening in the game when the stutter occurs? etc.

runic path
#

0 enemies zero stutter, once that number goes up thats when it happens

stray island
#

Can i remove , add items to instance editable structure

tacit maple
#

Anyone potentially know why spawning in an actor would remove focus from a widget? πŸ™‚

elder gulch
#

Hello, how can i make a phone mechanic like it rings at the start of the game and whenever i interact with ti ringing sound stops playing and the main call sound starts

crude spruce
#

How can i tell my enemy that im blocking. It currently hits me with a sphereoverlap.

#

My player has a blocking variable i use for playing the animation amognst other things

fallow sun
#

Hello !

I was wondering if it was possible to assign an enemy spawned via a Spawn Point to a spline track.

Currently, I have a Spawn Point and 3 different spline tracks. The enemy are following the Spline Track I chose for them when I place them directly into the scene, but they don't follow any Spline Track when spawned directly via the Spawn Point because they don't have any assigned.

Thank you for your help !

tacit maple
crude spruce
#

@tacit maple ok thanks.

fallen glade
#

I've been trying to make that and failing. My problem is that the delay execute only once so fi let';s say 10 things are added in the buffer only one will be removed at the end of the delay

#

if anyone can make me understand how to create and empty an array buffer please let me know!

#

my problem is the delay node only fires once no matter how many times it has been triggered

#

I would need a node that would delay each input

#

now is 123in - 1 out. I need 123 in - 123 out

fallen glade
#

I'm created a system that does that using real time seconds and repeating a delay, looks bad but it works wahtever

steep gull
#

Is it possible to instance a mesh in one BP then reference it in another? Am trying to make a city for an endless runner for a game, and creating the mesh instances in each tile is creating too many draw calls so im trying to figure out instancing the meshes once on a master blueprint then referencing them into the tile blueprints

spark steppe
#

is it less than the delay time?

dawn gazelle
# fallen glade I'm created a system that does that using real time seconds and repeating a dela...

Would something like this work for you?
After the delay you could also call another function or event for additional processing.

I think what you may be having trouble with is that you're looping through an array and then calling your removal event which has the delay in it, but for/foreach loops effectively execute for all elements within the array at the same time, and delays indicate on them that additional calls while it is counting down will be ignored.

spark steppe
#

after the remove index, you could check if theres still something in the array and call removeFromMemory again, so that the delay restarts, but that would give you a fixed 0.5s time between removing elements (basically what datura just showed you in the screenshot :D)

#

also, im not sure if you only want to remove it from the memory, you probably also want to remove it from somewhere else, wasn't that the main goal!?

fallen glade
#

1 add to map, 2 trigger delay 3, delay 4 keep going

#

and in 1 I collect the time it was added to the map

#

this is what I came up with

crude spruce
#

how can i solve this without doing 2 timers

#

equipped weapon 1 and 2 are the same masterclass

#

or whatever its called

#

both are child of a master blueprint

dawn gazelle
#

You want the timer to be started and stopped on both at the same time?

crude spruce
#

On either

dawn gazelle
#

So only 1 timer?

crude spruce
#

yes i think so

dawn gazelle
#

Is the "AttackTrace" function set up differently on both objects?

crude spruce
#

no the same

#

the master weapon has attacktrace and the subweapons have their own trace from that

#

I got it working, not sure i can solve it any nicer beacuse im not really sure what im doing.

#

Ill go on till it completely breaks

#

thanks

rain ravine
#

in BP what do I pass into Unbind Event methods? Is it OK to pass CreateEvent node into them, or do I need to save result of create event to a variable?

#

like this

bright frigate
#

Hi guys, if I want to make an analogue clock that follows a day night cycle in-game (so it represent the time corresponding to sun position) - what kind of options do I have? Is the only way possible via event tick adding a delay and then rotating the hands by x degrees? If so, is it taxing on performance? If not, what other ways are there?

dawn gazelle
bright frigate
#

yea for now don't really care about the hand movement - the rotation method is pretty much here, then there in its motion and that's fine.

Wouldn't the timer also still depend on event tick to figure out how long a second is?

dawn gazelle
runic path
#

you could also set the Tick Interval in the details tab of your blueprint

queen urchin
#

Hey guys. Is there any easy way how to save UObject in SaveGame?

bright frigate
bright frigate
runic path
#

lots of things shouldnt use tick, you should avoid where possible

dawn gazelle
bright frigate
#

Thanks

queen urchin
#

Tick can be good in case of UI in world when it should face the camera, in example

dawn gazelle
languid lion
#

Hi, would anyone be able to guide me on how to accomplish this:

  • I'd like to lean and look past corners in a horror game. The problem I'm struggling with is when I'm next to a pillar, I need to prioritize leaning out from the edge that's closer to my character's current position.
#

I'm currently achieving this by running a line-trace to find if I'm firstly close enough to a world static object to lean over

#

then I check on either side if I'm close enough to the edge to lean and be able to see around the corner

#

(by running another line trace on either side)

#

the problem I have right now is that I have no way of figuring out which edge is closer (and therefore prioritize leaning out from there)

dawn gazelle
#

So you're already running two line traces to get both edges?

languid lion
#

It just checks if I'm still colliding with that static object on either side

#

if not, then it's possible to lean on that side

#

in case of pillars

#

both corners will end up with the line trace not hitting anything

#

(hence allowing me to lean to the first/last side I've run a line trace for)

#

This is how it is right now

#

if that first line trace collides (the one originating from the player's current location), I check first for the right line trace, and then for the left line trace

proud hull
#

Run 2 more horizontal line traces? First line trace lets you know distance to the pillar, so run line traces back to where that hit from the right and left ones.

languid lion
#

The orange lines basically, yeah

#

How do I set things up to calculate that?

proud hull
#

I can make a quick screenshot for ya

tranquil tundra
#

or just calculate the distance of the first hit from the origins of the two side traces

languid lion
#

The two side traces always happen at a fixed distance

#

I basically need to compare the edge distance for the pillar (or any other corner when both sides can be leaned on)

proud hull
#

I am making these orange traces basically.

#

You can then compare distance of both of those hits.

languid lion
#

Thanks, I'll give it a try

proud hull
#

Won't be perfect for any non-square columns, haha. Round ones should be okay, but any irregular shaped walls will be problematic.

languid lion
#

Will the perpendicular traces give me a hit at the end of the pillar?

proud hull
#

It should hit the corner, I added 10cm forward from impact point of first trace.

#

Also, when you compare distance, it is greater distance of trace is the closer side:

#

This should be the directions. Trace should run back to the pillar horizontally and hit the corner.

languid lion
#

Thank you!

keen terrace
#

I am creating a character creation system that is based on morph targets. These can slide from thin to fat. How would I go about getting the value set by the player and instantly applying the same amount of morph slider to the clothing that they are wearing?

lapis oak
# keen terrace I am creating a character creation system that is based on morph targets. These ...

you would just have it linked up in the exact same way so when the value changes on the arm it would change on that section of the clothing a as well if the clothing is broken down into individual pieces , we use to have to make morph versions of each body part and anything that was attached to be able to mess around with morphing it,,,,,but this was udk3 like 8 years ago. but i know ue4 can now change sizes in game so im wondering if the item of clothing is attached to a bone and mesh and then the value of them is changed does it auto change the size of the clothing ? or do you still need to break the clothing up into different parts so each part can be morphed?

weak gulch
#

Can anyone help with running a line trace from a non AI actor to the player? I tried to follow the general way of setting one up from the character to anything else, but the line trace goes all over the place. My player is a vehicle pawn. I can't do a sphere trace for this use instance as it needs to be line of sight only.

lapis oak
#

https://www.youtube.com/watch?v=8HzjyfjMK5I&ab_channel=SimianLive as you can see its been a very long time and things have changed alot, only just getting back into it my self

This is my vinyl toy custom character that I'm using as part of my dissertation.

I am using a flash menu system, in front of you is a static mesh of your character.
my menu lets you change the material textures and RGB values in real-time.

The next video shows how my character can morph.

β–Ά Play video
dawn gazelle
proud hull
#

Also don't need the self node and don't need to add self to the array of actors to ignore when ignore self checkbox is true

keen terrace
# lapis oak you would just have it linked up in the exact same way so when the value changes...

Thanks, I would imagine there is a way to take the percentage of the morph and apply that number to the morph for clothing. Since all morphs are 0-1, 0.24 would be 24 percent. Lets say that this is for a Trousers and Fat is morphed to 0.32 and Thigh size is at 0.45. Then I would imagine that my Trousers that have the same morph possibilities just need to take those values, 0.32 and 0.45 and apply.....the how is what I am not sure about

weak gulch
proud hull
#

Sphere trace is basically the same as get overlapping actors, so that works too.

weak gulch
proud hull
#

Well you can still run the line trace to confirm

#

But dot product will allow you to make a sight angle, basically

#

Includes peripheral vision then

#

You can do dot product > 0.5 and that gives a 90 degree angle of sight

#

0 would be 180

weak gulch
#

Interesting, I'll have to experiment with that some more.

twilit anvil
#

hi, can anyone explain to me why my game (in build) is behaving like borderless fullscreen no matter which option (fullscreen, windowed fullscreen) i select? I am always able to move cursor outside of game window.

proud hull
#

If it passes all those conditions, you know it is in line of sight.

#

Or you can add AI Perception and let it do it for you.

weak gulch
proud hull
#

direction node

weak gulch
#

AI Perception doesn't seem to want to work with Vehicles, for some reason.

#

So I've been having to sort of re-create general AI behavior like this

proud hull
#

Basically what I explained to you is what AI Perception sight does for you, but with C++ code, so being at least a bit more efficient.

weak gulch
proud hull
astral estuary
#

If I have a class that inherits from another (say I have my custom PlatformerGameState that inherits from GameState), can it be casted to the base class? (In this example, Cast to GameState)

dawn gazelle
sleek pecan
# rain ravine in BP what do I pass into Unbind Event methods? Is it OK to pass CreateEvent nod...

Whenever you call Create Event, you're creating a NEW event. If you create a new event and tell a dispatcher to Unbind it, nothing will ever happen because that new event won't have ever been bound in the first place (since it was just created). To Unbind an event that was previously bound, you need to pass in the same event. If you're using Create Event to make events rather than using "Add Custom Event" in blueprints, yes, you will need to keep a reference to them so you can Unbind them later.

rain ravine
#

@sleek pecan well since I asked, I actually found a solution and what you said is not correct

#

There's even a test case in the answers showcasing, that CreateEvent is just a wrapper to bind, it is not creating separate events like it would seem

astral estuary
#

cpp me thinks it should work πŸ€”

dawn gazelle
# astral estuary I need to use polymorphism. I will have an abstract `PlatformerGameState` and fr...

You can cast to the game state you're using, which can be a child of another game state class, but you normally would not need to cast to a parent if you already have the reference of the child. All variables, events and functions from parents are made available in children, though the exception would be private variables I believe. Any events that would be triggered from the parent would be triggered in the children, and children can override the parent's functions and events to have specific functionality.

#

So if you just wanted to do a cast to a parent class it would work, but you wouldn't have direct access to any specifics from the child.

vapid ibex
#

Sometimes "Set Movement Mode" for character movement component causes the overlapping volumes to receive "end overlap" event. Is that a bug?

dawn gazelle
#

Parent cast, showing it has some functions available.

#

Child cast showing it has the parent's functions, but also its own child function

neat prairie
#

what does HOTRELOADED mean?

earnest tangle
#

that you should restart your editor between building C++ code

long smelt
#

Hey there.

Is C++ parent --> BP Child supported for Function Libraries?

earnest tangle
#

How would that even work? Aren't function libraries just a bunch of static functions, why would it need to inherit from something?

long smelt
#

I mean like creating a C++ Blueprint Function Library, and having a BP derivative of it, so I can keep all the code under one umbrella

#

Same way you create BP derivatives of C++ Classes and set stuff like Mesh properties there

earnest tangle
#

I'm not sure if it will work because of how the static functions would be handled, but it should be pretty easy to try it and see

long smelt
#

Wish me luck, I'm goin' in

#

Well

#

I would be able to find out

#

if I could reparent BFLs

#

I guess it doesn't really even matter

dawn gazelle
#

You can't create a blueprint version of a C++ function library.

languid lion
proud hull
#

Google sheets and screenshot plus crop and add arrows in paint.net, haha. I do simple stuff when it comes to anything art related.

unborn maple
#

i believe i need to set up mouse x and y but from there i am lost on setting it up

near glen
#

I have variable map of recoil amplification like after third shot it gains x2 recoil multiplier, after 10th shot x3 e.t.c. And I have input value of current shot in a row, how can I compare input value with map and get first appropriate value from the map?

earnest tangle
#

I think you can use Get Keys to retrieve the list of keys (I'm assuming you have key = shot number), and then you can compare the keys until you find the best one

#

after that it'd just be a matter of using the found key to Get from the map

faint pasture
#

Or just get value using int as key

#

Clamped to whatever the max key is.

near glen
#

the problem, that key is not a number in order, first is 1, next may be 4, after may be 11 and so on

faint pasture
#

What happens if you're on your 16th shot and you don't have 16 keys in your recoil map?

near glen
#

if to put nums in order there is no need to use map

#

I need to use what was the last before 16

faint pasture
#

Then just clamp to 15 or whatever and use that as the key to get your value.

#

Why even use a map though. That doesn't make any sense

near glen
#

1-0,5; 4-0.8; 11-1; 19-1.2
6s shot should be 0.8, 13th is 1 and so on

#

lol, cause I want recoil on different guns be higher after certain amount of shots πŸ˜„

faint pasture
earnest tangle
#

A curve would be a very easy solution

near glen
#

bruh, indeed, I forgot about it

#

holy moly, thank a lot, gonna look for guides about curves

twilit matrix
#

Hi, does anyone have a blueprint for having scalable realtime "time of day" lighting? A basic timer hooked up the to the directional light?

rough quartz
#

hi how could i increase the speed of my car by blueprints because i cant find any tutoarial about it, i was thinking by increasing drag coeficient gives more speed, but i could not get it to work

sturdy herald
#

Hello. I have an actor (which moving) and it has 90 degree rotation after i package. In simulation i cant see that. The programmed movement and rotation is fine in packaged version too, just everytime the rotation is not matched.

faint pasture
#

If you use the new Sky atmosphere it ends up looking really good.

#

Actually not to think about it, the easiest way was to have a nested tree of scene components representing each rotation. So you have one which is aligned with the planet pole, then one which is aligned with the site. Then just attach the directional light to the end of the chain

dull tree
#

Need help with "math"

#

i have ship that i control

#

and have position of my cursor

#

i need to check angle between forward vector of ship and cursor

#

kind of that

near glen
#

"While loop" executes every tick?

earnest tangle
#

while loop executes immediately where ever you put it

astral estuary
#

is there a way for the GameMode to pass some creation parameters to the GameState? πŸ€”

earnest tangle
#

@dull tree I don't recall off the top of my head, but if you google for "angle between vectors" or something, you might find some math for it

near glen
#

but every loop executes at every tick or nonstop at 1 tick till condition is false?

earnest tangle
#

nonstop

near glen
#

ok ty

earnest tangle
#

it doesn't have anything to do with ticking, it executes until the value is false when the execution reaches it.. it could be in a tick event or any other kind of event or function

#

if the value never becomes false, it will hang your game :)

near glen
#

yeah I got it

median crater
#

im trying to add weapon firing to the project, my weapon fires, but even so while unequipped on my back, so i tried to create a fire toggle along side the weapon equip button (press 1, takes weapon from back, equips in hands, enables firing input, press it again, put weapon on back, disables firing input)
the disable works, and stops me from firing the gun when i put it away, but when i equip it again, the input doesnt actually enable again, although the printstring says its turning back on, any idea?

faint pasture
graceful hamlet
#

Seeing an interesting error pop up ("EXCEPTION_ACCESS_VIOLATION") when a specific level is loaded/unloaded rapidly several times (like a player going back and forth to the overworld menu). Debugging shows that it pops up during the landscape static mesh load section (about 2 steps later), so it's probably something to do with loading.
Is there a better way to load than "open map"

#

Only alternative I can think of is level streaming, but that'd be a bit of a pain with a bunch of very different maps

faint pasture
near glen
north igloo
#

Hi friends, I could do with some help with Data Assets

#

I have these assets, my primary asset and a child of it with some values

#

and an actor that should be able to pull a child data asset

#

but no dice

void cobalt
#

hey guys, i have an issue that i wanna fix in my project, but i dont know how to go about it

#

basically, i have a top down shooter game

#

i have made a full auto gun with a set firerate

#

but i can bypass that set firerate by simply clicking faster

#

how can i fix that?

graceful hamlet
#

Cooldown

#

basically attach it to your fire event, only enable the fire event every X by having the bool reset after X ms

void cobalt
#

is cooldown a node?

graceful hamlet
#

no, you'd have the input action for fire check if a cooldown bool is set, if not, fire, then set it

#

and set a delay or event fire to reset it X ms or seconds later

maiden wadi
#

There's a pretty easy logic for this using timers and timer handles to check on button press.

graceful hamlet
#

yup

#

timers or timer events are the easiest way to set cooldowns, you just have a very quick bool check

void cobalt
#

i see

#

i will try it

graceful hamlet
#

the absolute easiest is just to set the bool when the inputaction is called, run the action, set a delay 2ms, then unset it

void cobalt
#

oh man my bp's are confusing lol

graceful hamlet
#

well... that's a different issue πŸ˜„

void cobalt
#

havent been on unreal in a while so this might take a while lol

maiden wadi
#

Basically, on button press, check timer. If timer is active, it's on cooldown. Start a new timer based on how cooled down the timer was. That way if the button stays held down it'll just fire again at the correct time. On timer end, check if button is pressed, if pressed, fire, if not, don't. Then on next button press, the logic would instantly fire because it's cooled down.

graceful hamlet
#

Yup, same thing

#

you check a bool for cooldown before proceeding to dispatch the fire

maiden wadi
#

If you're using timers, it's easier just to check the timer handle. Can make a pure function out of it if you don't like the extra couple of nodes in the way.

graceful hamlet
#

yes, but "isactive" is still a bool πŸ˜„

#

the point either way you feel like going is the logic is an incredibly simple little check from the standpoint of the engine

void cobalt
#

ahhh getting back into the groove of game design is hard lol, im still trying to figure out where to even start this haha

#

i have a TopDownCharacter bp and a BP_firingWeaponBase

#

and the shooting mechanics are in the topdowncharacter

near glen
#

In widget I have horizontal box and lots of same images inside, how can I align all of them to right side of box and restrict box to go right far than certain point?

void cobalt
#

and im not sure if thats correct

maiden wadi
#

I'd personally but the firing stuff and input in the weapon base. You can enable input on equip. That'll allow you to also use different stuff for the same key when a weapon isn't equipped because the weapon's activated input will override anything else.

void cobalt
#

this is what my shooting mechanic looks like in my topdowncharacter

#

how would i go about moving it into the firingweaponbase bp?

undone salmon
#

Hi guys! Is this a good way to reset the level?

hollow zephyr
#

Looking for some help with "OnDestroyed" / "Is Actor Being Destroyed". Neither of them seem to fire when I use "DestroyActor".

Context: I'm making a small soccer minigame and when the ball hits a trigger in the net, it destroys the ball. Which I thought would fire the "OnDestroyed" event or at least would return true for the "Is Actor Being Destroyed" function. At which point the spawn point in the middle would create a new ball, since it's looking for the "OnDestroyed" event.

north igloo
#

@hollow zephyr You could reference a spawnActor macro for the new ball directly after the destroyActor and skip the need for detection

hollow zephyr
#

I'll give that a shot

#

Also, can anyone recommend a good tutorial / walk through on event listeners?
I used them quite a bit in AS3 but I'm getting the feeling they work differently in unreal than in flash heh

north igloo
#

Mathew Wadsteins channel is always a good place to look for tutorials

#

Don't know if he specifically has one for event listeners

eager swan
#

I'm modifying the default first person blueprints and trying to add a magazine size, decreasing the magazine by 1 every time I fire, and checking to make sure it's not empty. But when I compile and load in the weapon just doesn't fire at all

tranquil tundra
#

Did you set some Default value > 0 for CurrentAmmo?

eager swan
#

Is that done by the Set Float box in the first picture?

tranquil tundra
#

you can do it that way (you need to connect their execution pin tho), or if you click on the variable you can set it on the details panel

#

(and if you don't need fractional values I'd use an int, just for clarity)

hollow zephyr
#

Best to use integers for bullets, as you can't fire a half bullet.
Also, you're not actually calling the set functions

#

in the first pic

eager swan
#

So I changed the default value to 30, but what does the set float do in the first pic, or how can I do what Bojangles is saying

hollow zephyr
#

It needs to be linked to something like "on begin play"

tranquil tundra
#

connect the execution pin

hollow zephyr
#

Just like that ^
I'm still waiting for my editor to open lol

dense tulip
#

How does one select the character that will be walking around when i start the game in editor mode ?

eager swan
#

Do I just steal the one from the VR section, I don't really need it

#

And I can't spawn another

hollow zephyr
#

Find your "Event Begin Play", and slip your two Set functions in there, making sure to connect the end of the last set to whatever the "Event BeginPlay" was originally connected to

dense tulip
#

Ah, figured it out πŸ™‚

eager swan
#

Done

#

It is a bit messy though

median crater
#

i have an equip/unequip function, on my characterBP, but the fire input is on my weapon, and im not sure how to check the variable, i imagine i have to move one to the other?

dense tulip
#

Is there a way to clear the message log ?

hollow zephyr
fresh sluice
#

Hi there, I have a strange problem: I have a player character and an enemy who has a sphere collider in front of it, set to overlap with pawn, ignore all the rest. When I walk into the enemy, the event fires as expected. However, if i remain stationary and the enemy walks into me, the event does not fire until i try to move. When I check with Show Collisions cmd in console, the sphere collider definitely overlaps with the character. What gives?

dense tulip
#

I think its related to not having been out of the collision

#

maybe you could try to force collisions to be reset ?

fresh sluice
#

ah, I should add I;m using on Component Begin Overlap in the enemy BP. I check if the other actor is player character there. But when I put a breakpoint, it does not stop execution at all when I remain stationary

median crater
#

@hollow zephyr the issue with that is i have a particle effect attached to the weapon, that isnt on the character

#

for my flamethrower

fresh sluice
#

aaaah, shiet, I think it's because the sphere collision is World Dynamic, and the player capsule is set to block these. So I guess it's like with the hit event. I'll try changing that and see if it helps

median crater
#

nevermind ive moved it and its almost working

#

i now just shoots flames if front of me instead of from the gun on the backpack

hollow zephyr
median crater
#

oh im probably misunderstanding you, im a fucking blueprint dummy

#

oh my god i got it

#

thanks

hollow zephyr
#

Everyone's gotta start somewhere, you'll get the hang of it

median crater
#

2 days

fresh sluice
median crater
#

now fixed

#

although it was amusing

hollow zephyr
#

LOL

eager swan
#

Is there a way to scale an actor effect in a spawn node?

#

I want the explosions to be smaller

fresh sluice
eager swan
#

I think that looks good, thanks

hollow zephyr
#

Just like that lol

eager swan
#

Instead of having a spawn transform can I attach it to the sphere spawn point?

lunar fog
# steep gull Is it possible to instance a mesh in one BP then reference it in another? Am try...

Hi yes, this is possible in theory. And it's fine if the instances are being spawned at runtime. - You'll need to be careful about managing the life of the instancedmeshcomponent though, and it cannot be destroyed outside of the owning blueprint. You'll need to call a function in the "manager" and destroy from there.

I hate instances and construction scripts in unreal. Why can't I spawn instances once and then have them be there next time I load the level!? Completely unrelated to your issues but I keep running up against it and it's hell!!!

sleek pecan
frozen otter
#

Hi, for some reason UI progress bar animations don't work in VR? I tested it without VR and it seems to work just fine, but the Percent animation doesn't show while wearing the headset. Wondering if anyone has any ideas? Thanks!
edit: For further clarification, if I start the game using a regular option like Selected Viewport instead of VR Mode, its shows, but the Play level in VR option does not show the progress bar percent animation. I searched it up online and no results were found, just tutorials on how to make level load bars iirc, so gonna ask here as my last option

eager swan
#

How do I change the target to the explosion

lunar fog
#

You can do this, but it's buggy as heck and I can't figure it out properly beyond getting stuff spawned. It spawns fine, but then i get load issues talking about "duplicated foliage" and I can't select it properly

#

Hi there is, but it's a bit weird to be honest! Buggy behaviour. I'm exploring this right now too. You can spawn actor from class "instanced foliage actor" then you can add a "instanced foliage mesh component" to it

faint pasture
#

@bright frigate I would definitely use a timer unless you need to update every frame.

#

@eager swan why would you want an explosion effect to be attached to something? Wouldn't you want to just exist at a point in space?

eager swan
#

It's my muzzle flash

#

and smoke

#

But now that I'm thinking about it, it's a bit wasteful

bright frigate
faint pasture
#

Just every so often go "oh goodness gracious look at the time" and update whatever. Turn Cinderella back into a pumpkin, move the sun, evolve the weather, whatever.

#

The interval at which you do that can vary from one frame to a minute or even more if you wanted

bright frigate
faint pasture
bright frigate
#

right, thanks, maybe I could put every 5s or something

#

I'm thinking of the GTA pace of 1 IRL minute = 1 game hour. Is that the same in FF14?

#

shadows will probably be a bit choppy considering the density of assets and geometry types I'm dealing with (lots of interior stuff - think Metro-type interiors with the houses detailed and all. But for now it's only one or two houses at most.

faint pasture
#

@bright frigate your sun moves at 1 degree every 4 seconds, so work your way backwards to figure out what would be indistinguishable

#

1hz update should be fine tho, go a bit faster if you want. If it's just sun tho just do it on tick, it's cheap.

bright frigate
# faint pasture <@396990950842564608> your sun moves at 1 degree every 4 seconds, so work your w...

I was looking at some of the games' day night cycle timelapses. But they're all sped up so not sure really, they look mostly the same. GTA seemed to be 1 day gametime = ~50 minutes IRL (let's say one hour). FFXV seemed around the same.

I saw a tutorial where the 4th method seems interesting - timer by function, which sounds like what we've been talking about here as well
https://www.youtube.com/watch?v=RZCfzGMHhAI

bright frigate
faint pasture
bright frigate
#

That seems like a good and simple approach, thanks!

pine idol
#

using my character position, and the center of the sphere, I know i can get the vector direction, but i'm not sure how to put that into usable math for rotations, as I'm horrible with math. lol. anyone have any suggestions?

eager swan
spark steppe
#

i would just calculate/set a random time for the weather cycle and start a timer, which when completed does the same again

halcyon grove
#

why is it when I "rotate to target" I always face the same direction but its not actually the target?

soft halo
#

Hi, I'm using the default way to spawn projectiles (FPS Temple). But i do get this weird offsets when moving and rotating cam.

Tried bunch of option to fix it but none seem to work.

sinful mirage
#

@halcyon grove I'm no specialist but are you supposed to multiply your speed by delta for the Interp Speed input? I'd just plug the Rotation Rate directly into Interp Speed, or better yet try with a constant first (like 1 or 10). Also, is Delta your actual Tick Delta?

eager swan
#

@soft halo idk what you mean by offset, it launches off in that vector when you click the button and then you move away and see it from a different angle?

#

It's just that the effects take a little while to show up

soft halo
#

Is ther any way to make it smooth like, doom or skyrim?

#

and sadly i'm kinda bad with 3D math

calm cobalt
#

Anyone know the best way to restrict camera rotation on a character? Currently the character takes a bit of time to turn so you can literally spin his head around 360 degrees like you are posessed. I want the camera to only be able to get a max of about 50-70 degrees +/- off relative center so the character keeps turning until it matches the camera but cant spin around the body.

trail saddle
#

Is there anyway to make smooth recoil system? For example, with my basic recoil system I am adding controller input in yaw and pitch, is there a way to smooth it out?

eager swan
#

@soft halo if you want it to be instantaneous like doom then you have to do it a completely different way, if you want it to have speed you can just speed up the projectile

#

Doom uses hitscan, not physical projectiles

halcyon grove
smoky oak
#

@soft halo you could try getting your characters velocity, and spawning the projectile where the player will be using the velocity to do the math.

halcyon grove
#

but further the rotation rate value in character movement is basically the value multiplied by delta

#

the way I understand it

#

yes delta is my tick delta

#

I've tried many methods... including using a constant

#

all i'm trying to do is smoothly rotate the character until its facing the target

#

the next method i could try is simply to add rotation on tick until it has the same rotation as the look at rotation

#

then use a boolean to switch over to straight "find look at" node

sinful mirage
#

Maybe Player Controller is blocking the rotation, as the Character is being controlled by it? Perhaps put some temporary test Actor in the level and try to rotate it instead of the Character to see if it works?

halcyon grove
#

ok

#

hmmm

#

also the speed of the rotation is important

#

as different characters have different rotation speeds

#

because i was simply using find look at into tick and set actor rotation

sinful mirage
#

But if it's not working then better to get it to work with constants and build up from there...

halcyon grove
#

which works perfectly

#

but it "teleports" to the rotation

sinful mirage
#

Well, in that case like I said I'd try with constant Speed first. Also, maybe try the other RInterp function?

halcyon grove
#

i tried both actually

#

and the same result

#

its weird

#

haha

#

it just goes to the same rotation over again

#

kinda like up

#

regardless of my position or the targets position

#

its a head scratcher but in any case I think I know a way around it

sinful mirage
#

Well, if you're calling Rotate to Target on Tick then it should work I think, so I'm out of ideas, sorry.

soft halo
fossil thistle
#

Hey everyone, not sure if this belongs in the BP chat or the audio chat but I'm running into a problem with my audio manager. Basically, volumes in the game call this ChangeMusicTo event. Then whatever music that's being played should stop and a new track should start. The issue that Im having is that utilizing the both the AdjustVolume node and the FadeIn/Out nodes cause the audio component to be killed (?). So when I try and play that same song an error message occurs. The code works fine when utilizing the SetVolumeMultiplier node but it doesn't fade and its more of a harsh switch. Can anyone help me understand why its happening/help me fix it?

#

The first Adjust volume is set to .00001 just to confirm that the code works using these nodes as long as I dont set the volume to 0

winter kettle
#

I'm using AttachToActor to attach one actor to another, but it isn't attaching to the socket

#

this is my socket

pine idol
pine idol
elder gulch
#

Hello everyone im trying to make an phone call mechanic where phone rings till you open it but i dont know how to stop the playing sound when you open the phΔ±ne can i get help?

oak shard
#

@atomic salmon Hey there, thank you for your response in #legacy-physics. I am very new to UE so I'm not sure where to go from here. Are you able to help?

#

Okay, a Get Component By Class set to SkeletalMeshComponent did the trick.

languid lion
proud hull
hearty lintel
#

hey guys, does anyone have an idea on how i could detect an input variation over time on the controller stick?
I need to fire an event whenever my input differs of an x value from the one taken a split second before.
I tried having a timer that saves whatever is the input of the stick ten times per second and then comparing the current one through a "greater than". It doesn't seem too reliable tho, what am i doing wrong?

ruby surge
#

I got a question about action and axis mappings. I'm currently creating a game filled with minigames (just to learn a lot of BP ;)). Now i've added some axis and action mappings for the first minigame, but I need the same buttons for different actions / axis mappings on my second minigame. Is there a proper way to do this or should I just use hard coded keys (key events) in the Blueprints?

flat raft
#

how do I calculate velocity on tick ?

#

i want to calculate the velocity of my root motion animation

faint pasture
#

You..... Don't? If you had to, easiest way would be to do an OS printer call but that sounds real fucky

earnest tangle
#

There might be some library you could integrate which can do it but that'd need C++ level integration

flat raft
#

anyone know how to calculate root motion velocity ?

lost solstice
#

i havent used blueprint or unreal in general for a while and im struggling with collision tags. Is anyone able to help? Im trying to see when a box collider overlaps with an object that has tag "Climbable" it will do something (climb) but when i spawn it is overlapping with itself and doesnt print any results for other overlapped components

dapper cradle
#

Does anyone here have any experience or know of a way I could pull/drag an object with the third person character ?
I have got a push mechanic but I am not sure how I would pull/drag

dapper cradle
#

Open to trying with or without.

faint pasture
#

How are you doing the pushing?

dapper cradle
#

symmulating physics with event overlap on a cube with a box collision

#

oh yeah and a physics constraint

astral estuary
#

Blueprint for loops are inclusive and that's why I have trust issues pphands

turbid shard
#

Hi, How can I move a character to the next spline point? Not the whole path, Thanks!

dark crow
#

Show how you assign it

astral estuary
#

If I connect the first pin of a sequence to the break pin of a for loop... will the other pins of the sequence run? thonk

sand shore
#

the only way to skip a sequence is to return from a function

astral estuary
#

In code, a break statement acts as a soft return πŸ˜…

sand shore
#

but if you break out of a for loop, you aren't breaking out of eg an outer switch statement

#

@astral estuary A great deal of the standard nodes (not functions you can call, distinct types of nodes) are macros that were created in BP. Take a look at StandardMacros

forest trail
#

Hello
I have trouble with the attach/detach system
I have a FPS character which works fine
And a moving platform which is also a character that I can drive in fly mode
I made a setup so I can jump on the platform with the FPS character, press E and possess the platform. FPS character is then attached to the platform (keep world) and I drive the platform character and the FPS character stays on it.
Then I press E again to repossess the FPS character and detach him from the platform (keep world), and when possessed he is teleported forward and falls in the air.
I noticed that the place he is teleported to reproduces the path the platform flyed along when he was attached to it (example : I possess the platform and drive to X+3, Y+5, then FPS character will be teleported to X+3, Y+5 from the platform). If I detach with "keep relative" instead of keep world, character is teleported to 0 0 0 in my world.
This is driving me nuts, I disabled all "on possessed" things on my character and this is still happening. No idea why.

astral estuary
sand shore
#

that one is actually code driven, you can view it in visual studio

astral estuary
#

abyssal cpp

sand shore
#

you don't write new K2?

#

pfft

astral estuary
#

Why do I feel blueprints try to be super easy and once they hit zero they underflow to like impossible cpp difficulty? sweat

sand shore
#

to make it easy, restrictions are in place. when you hit those, you gotta workaround them in an unnatural way. like passing delegates around.

#

but then, also, some constructs aren't meant for node graphs.

#

I wield both with abandon. Bow.

astral estuary
#

CustomThonk? thonkeyes (no, rly, what is that?)

sand shore
#

if so, they're what allows BP bytecode to handle wildcards

#

macros aren't the same, they don't have or need thunks

astral estuary
#

I tried to use a wildcard in a macrobp DogeKek

#

didn't take

sand shore
#

they crawl the stack for FProperty descriptors and void* addresses, usually paired with a function that is written with the reflection api

#

Anyway, thunks are like a meta function that processes how a real function is called. They can do what BlueprintNativeEvent does - doesn't call cpp if BP implements it - or they can just directly call the function. The keyword tells UHT that you're providing your own.

astral estuary
#

Oh, I remember what I tried to do: I tried to make a shuffle array function/macro in BP.
It worked but I couldn't get it to take a wildcard array 😦

sand shore
#

Shuffle should be a function you can call already? Do you mean Sort?

#

You can't nest macros and use wildcards on both outer and inner macros and expect it to work

#

you probably ran into that

astral estuary
#

I wanted a shuffle that takes an random stream dothingy so I can replicate the randomness if needed

sand shore
#

erganermics

#

(I agree)

#

hence the mocking spelling

#

easy enough to wrap in a custom function lib, but you shouldn't have to

#

pretty trivial to convert (either way) if you're looking to do so and willing to take the extra call

astral estuary
#

Ok, I will ride on the LowEffort library and one rainy day I will look into how this works πŸ˜…

#

thanks a lot for the pointers πŸ˜„

dark crow
#

Show where you actually set the reference, i get no info from that really

dark crow
#

Well, my cup of tea is that the the Pawn doesn't exist yet when it tries to assign it

#

Yes cause it eventually sets it, are you sure you're not running some functions before it's set?

#

In that cause it will spit out that there's None

#

Show me SetMove

#

It's complaining about the SetMove event

#

Not receiving the ref

#

Where were you setting that

#

I mean the Set MoveY

#

Ok but where in the Flow of the program

#

Where was it plugged

#

That's your problem

dapper cradle
#

Hey all,

I am trying to set a line trace up on a third person template.

What would I use to get the forward vector for a line trace ?
It doesnt seem to work from the camera...

#

I tried a couple of other things too like the character mesh

dark crow
#

Or you have it after the Is Valid or you make it a Validate Get

#

It matters cause you're trying to assign MoveY to nothing in the first place

#

That looks like Replication problem

#

Yes but if it has no Reference of your Character

#

It will try to assign it to None

#

Spitting out errors

#

Are you sure your code is Replicated btw?

#

Looks like Client and Server fighting

#

Theeen how is your server supposed to know about the movement?

#

The Server should modify the values, not the Client

You can change a value on the Client but on the Server it will always be 0 and it will correct the Client for example

#

Indeed but you still need to replicate changes to the server, like if you modify Max Walk Speed

#

What is the Move variable for?

#

Show me how you move then

#

Ok, but

#

How can you be sure that

#

Movement Locked

#

Is not True on the Server

#

Wait nvm that's stupid xD

#

Shouldn't really matter

#

Mmh

#

But it looks like something is F up

#

Do this

#

Instead of assigning the Variable on Begin Play

#

Do it OnPossess

#

So basically you're sure that your Controller has Possessed something in the first place

#

Returns the Pawn too

#

You could cast and assign the cast ofc

astral estuary
#

is the wrao int node broken in 4.26.1?
I have a wrap that has 0 and 2 as limits.
I start my int in 0 and increase it, it goes: 0 -> 1 -> 0 -> 1
ok now my int is 1, let's decrease it: 1 -> 2 -> 1 -> 2

WTF?!?!?
You cant go to the last or first element but you can wrap to those elements?

dark crow
#

Wait

#

I just realized

#

Make the Character Variable Replicated

#

πŸ€”

#

It was giving me issue when it was not, was spitting out None errors

#

What does the Server see when you try to move?

#

The Host or so

dapper cradle
#

tyvm @dark crow !

dark crow
#

Seems like some sort of Replication issue to me, cause the Client tries to move but the Server doesn't move it

#

Not sure why tho, if you use Add Movement Input it should be fine

#

You can move so the actual reference is there

#

Try this

#

To debug

#

Barebones

#

Still does the same thing?

#

Okay, is it set to Replicated?

#

Just to rule that out

#

The Character Reference

#

Still behaves the same when you play?

#

When you press W in this case

#

So here's the problem

#

If it goes through

#

Means there's a Valid Reference

dawn gazelle
dark crow
#

Show me the error again

#

It should not say that if you have a Validate Get

astral estuary
dark crow
#

Show me how you're getting the Reference OnPossess

#

Not the case, it could try Getting the player pawn before it actually possessed so it would be nothing

#

Show me OnPossess

#

Doesn't matter

#

PC still possesses something

#

Initialize the Character Variable not from BeginPlay

#

But OnPossess

#

In the PC

#

It returns a Pawn Reference too with it

#

Just so we're on the same page

#

Set it to Replicated

#

It's important

dawn gazelle
#

Are you doing a validated get or an IsValid before using Posssed Pawn on the input axis, effectively making sure it has a value before it's trying to be used?

#

You cannot assume that.

dark crow
#

Better safe than sorry

dawn gazelle
#

Yes, there are many reasons. Your PC exists before the character.

#

And input axis fire like tick.

#

So it's almost immediately going to be trying to use that value.

dark crow
#

Are you 100% positive it's not getting set somewhere else in the code?

#

To something invalid

#

Normal for it to not be valid

#

Till you possess

#

That's the point of the Validate πŸ‘€

#

But it still exists as a Variable

#

And PC is on Tick

#

Tick happens before OnPossess

dawn gazelle
#

Yeah you will get some invalids until it is properly set, but the point of using the valid checks is so you don't get errors from trying to use the value before it's available.

near glen
#

What is better optimized to call from another bp function or custom event?

dark crow
#

Okay so other question is, are you sure there's not any code in the actual Character BP that may F this up somehow?

#

Not sure what happens for example if you have 2 InputAxis, one in the PC and the other one in the Char

#

Cause i don't see why the one in PC wouldn't work

faint pasture
near glen
#

thanks

dark crow
#

Honestly not sure tides, everything seems right and the refs get set properly, my only guess is some overlapping code and / or something replication wise, you may wanna post the video of the Character moving in #multiplayer

Cause it seems like it only updates Client wise

dawn gazelle
#

Duplicated the set up on my side as well. Player Controller feeds the movement into the character, both on client and server.

dark crow
#

Yeah, this makes me think there's something else going on somewhere

#

Looks like it's only running on Client on his side for some reason

near glen
#

Is there anything like "select" but to chose execute node depending on ENUM value?

near glen
#

oh, thanks a lot

dawn gazelle
#

Just in case you have trouble finding the right node, you need "switch on <enum name>"

near glen
#

@dawn gazelle I just took it from enum variable ty, I just forgot how it's called

dark crow
#

Migrating stuff is not always as smooth

Guess you could try to create a blank Character class and use that, then see if the problem still persists

#

If it works then it's the Character

void cobalt
#

hey so i have made a shotgun weapon in my top down game that shoots with linetraces

#

and i have a variable that changes the amount of traces

#

with a spread

#

so that it shoots like a shotgun

#

but when the traces hit a target, it doesnt quite work

#

instead of each trace dealing its set amount of damage to the target

#

it shoots 1 real trace at a random spread value, alongside the other traces which are not actually real

#

so if i hit a target with one of the fake traces, it does no damage

#

but if i hit them with the 1 real trace, it deals ALL the damage from all the traces combined

#

so lets say i set damage per trace to be 12

#

and i have the traces used set to 7

#

it will hit 12 damage 8 times

#

how can i fix that?

#

sorry ik its a bit confusing haha

dark crow
#

Would you mind showing the code?

void cobalt
#

this is my "determine hit object" script

#

which is where i apply all the values like spread and traces used and whatnot

#

its also the parent for all weapon types, on the top left where it says traces used right now its set to 0

#

but i have another child bp which is a shotgun and it has 7 traces

runic parrot
#

Hi everybody, anyone related to AI perception systems? i'm having som troubles seeing if the stimuli source comes from hearing, sigth, damage, etc stimuli source.

dark crow
earnest tangle
winter kettle
#

I'm trying to attach an actor to another actor, however, Is there a way to make a socket on the skeletal mesh maintain it's position relative to the mesh but not move with the bone, or should I just add a scene component to the actor blueprint and attach the actor I want to attach to that scene component instead of a socket

void cobalt
#

the white box above just calculates critical hits

#

which ends up setting the actual damage of the shot

runic parrot
dark crow
#

Wouldn't this cause it only to consider the first hit?

void cobalt
#

oh?

runic parrot
#

now for real, thanks. That solved the problem.

void cobalt
#

hmmm i didnt think of that

dark crow
#

Seems overly complicated for what it does

#

Wait

#

Lemme grab an example i found

void cobalt
#

i did use a tutorial for most of this

dark crow
void cobalt
#

so i dont fully understand some of it

dark crow
#

You can directly apply the damage after the line trace

#

cause it checks every line trace on loop

runic parrot
#

jeeky, can't you check on trace hit to go back to the shotgun or your character, do the damage there and if you want to only do damage once, add the to a list of "already hited"?

void cobalt
#

hmmm

runic parrot
#

your idea is that if you use the shotgun that shots multiple projectiles, only 1 of them hits, right?

void cobalt
#

yeah

dark crow
#

ofc, i don't suggest using get player pawn 0, if run on server it always means the first player and if not it would still mean it tries to get it when it doesn't exist yet

runic parrot
#

make the trace, get the hit actor, check if it's an enemy and with that go back to check what kind of damage you should apply.
You can set that on your player or check from your gun.
Once you hit once and do the damage, you can make an array of "already hited" actors so you don't hit them twice (remember to refresh this array after each shot)

dark crow
# void cobalt yeah

If you want every individual projectile to do a set ammount of damage if it hits, you can refer to the example above btw

runic parrot
#

one variable on the weapon or character of "amount of damage per projectile" would be nice, you can check on that when applying the damage on hit

dark crow
#

No need to add to an array at all btw

#

Look what you're doing

void cobalt
#

i heard that before

dark crow
void cobalt
#

but it didnt work

#

so i had to keep the array

#

im not sure how it works

dark crow
#

You're looping to set an array then looping to get it again

#

when you can directly access the value from the first loop

void cobalt
#

so i could just get rid of the 2nd loop?

dark crow
#

Lemme explain the example above shortly

#

To give you an idea Jeeky

void cobalt
#

ok

dark crow
#

When it presses the Fire Button

#

It loops 10 times

#

Every loop shoots one LineTrace and if it hits it applies the damage then it starts again

#

In total you'll have 10 shots and only the ones that hit would have applied the damage

brazen dagger
#

his is just a hit scan shotgun

dark crow
#

That's what it does

void cobalt
#

yeah

dark crow
#

But it's hitscan

void cobalt
#

no projectile

#

line traces

dark crow
#

Shotly you don't need an Array since the code after the ForLoop it's run individually 10 times in this case

#

what it means

#

10 lines and each one of them checks for themselves if they apply damage or not

#

If 5 hit then if damage is 1 it does 5 damage

#

cause the other 5 didn't hit

#

So no Hit Actor

#

For safety you may wanna plug a IsValid at the Hit Actor in case it hits nothing

void cobalt
#

i have damage numbers pop off the enemy after they are hit

#

and that 100% works ive done so much to make it work lol

dark crow
#

Would still work

void cobalt
#

and if i hit the 1 real trace it pops off (in my case) 8 numbers of 12 dmg

#

so can i edit my bp to make it work?

dark crow
#

No reason for it to not work

#

You still use Point Damage

#

Just move the Function that displays numbers after

#

Just trying to make you think why you would need an Array

#

For the Hits

brazen dagger
#

or have the hit actor handle the dmg pop up

dark crow
#

When you ForLoop ecah one of them to start off

#

So it goes through each one of them

#

And what Tribe said too

#

The architecture there is just problematic to start off :p

#

Plus accessing Array 0 only considers the first shot

void cobalt
#

array 0?

void cobalt
#

right

dark crow
#

Condition is alwayas True too so always Adds

#

In the end you don't need the Array tho, just feed data from the first ForLoop directly

void cobalt
#

and how would i do that

dark crow
#

So you can have all logic there

#

Just with one Loop

#

Related to Each Individual Trace

#

If you want individual damages to show up you can just show damage each loop

#

If you want a total you can have a variable and add the Return Value of the Point Damage then ForLoop completed show Damage

#

All can be done there

#

Keeps code more compact and no use of many Loops

void cobalt
#

so in this example youve shown

#

the apply point damage and determine hit are in the same script?

dark crow
#

Yeas, cause when you know it hit you can already apply the damage from that linetrace, see?

#

Cause you already know it hit, not that useful to save the hit

void cobalt
#

hmmmm

#

i know there must've been a reason i did it this way

dark crow
#

Only reason would be if you need to use it in separate parts of the code, but in that case, it's the same to have everything dependant on the first Loop

void cobalt
#

so u think i could just move everything from my "apply point damage" bp into my "determine hit" bp?

#

this is the event graph for my firing weapon base btw

dark crow
#

Yep, cause as i said look what you're doing

Saving the hit in an Array, then iterating through that Array again to get the hits back

#

What's the point of the Array then?

void cobalt
#

hm

dark crow
#

When you can directly apply logic when you know it hit

brazen dagger
#

I would look at handling the dmg popup in each actors on dmg event, this way you can control it how you want for each actor (dunno what you are making but for example maybe you hit a barrel and don't want the dmg to show but on a person you do)

void cobalt
#

ok so i unplugged this

dark crow
#

Yeah, ApplyPointDamage you can think as an Interface for Pawns

void cobalt
#

and moved everything in apply point dmg into determine hit

#

like this

dark crow
#

If you want generalized you can keep it generalized, if you want different things to happen based on what's hit then you can use the Damage event

#

Okay

void cobalt
#

did i do it correctly?

dark crow
#

Get rid of the Array completely

#

For now

#

You can put it on the side

void cobalt
#

really?

#

this and this?

dark crow
#

Yeah, why do you need it

#

And it only gets the first index

void cobalt
#

idk what to plug into the other parts if i get rid of these

dark crow
#

So lemme tell you how to write the Logic

void cobalt
#

omg i think it works lol

dark crow
#

Press Button -> For Loop ( Calculate Damage and Critical -> Apply Point Damage -> Show Damage )

void cobalt
#

i did this

dark crow
#

Pretty much yeh

void cobalt
#

wow

dark crow
#

You many wanna reorganize the code to make it look pretty

#

But that's it

void cobalt
#

lemme test a bit more if the shotgun pellets all register seperately

#

wow yeah it works great

#

thank you man

#

❀️

dark crow
#

I'm glad it helped ❀️

swift coral
#

Hello! I came across another problem, I cant seem to solve alone. In my videogame, boxes are placed. There are figures that deliver and place these boxes. They all have different capabilities of taking paths. You place these boxes in the back of a truck, and for example to place a box in the back, the figures need to go there. How can I calculate this path? Maybe this illustration helps:

#

I basically need a solver that search for paths and is rather simple (moves from square to square and ignores square that already have a box)

#

Maybe someone can explain this or link to some tutorials if its more complex

near glen
#

I have socket on weapon that designate "aiming" position. What is the simplest way to move weapon in front of camera centering to that socket?

faint pasture
paper galleon
#

Question guys. I'm trying to rotate a component (whether in it's local space or world space) such that all three of it's axes are parallel to that of another Component. Without changing translation.

#

Can someone point me in the right direction?

covert lake
#

Hello I have a problem. I have 2 plugins, the first plugin is "First Person Story Adventure" and the second one is "Custom Movement". I want to make the ladder with the first person story adventure skeleton, but its not working. Any idea on how to fix this?

void cobalt
#

question, how can i make a sound play for a certain amount of time and then stop?

#

lets say i have a reload loop sound, i want it to stop when the reload time is finished

eager swan
#

@void cobalt I would put a condition that checks if the timer has reached zero and stops the loop if the answer is yes

void cobalt
#

is there no node that just stops the sound after a certain time?

#

like a timer?

eager swan
#

Not as far as I know, you have to use logic to tell the nodes how to behave with each other

#

But if there is one you can right click and search for it