#blueprint

402296 messages ยท Page 428 of 403

plush ridge
#

Was my fault

#

Had a Macro near beginplay that checked if GameMode was valid inside of Opponent, instead of if Opponent itself is valid first

#

Thanks!

pure tulip
#

Hey, does anyone know why, when I try and set a variable the FInterp doesn't actually change any values? If I set it directly to the value I want it to get to, it will work fine, just instantly. If I use the FInterp to do it, it doesn't do anything.

plush ridge
#

@pure tulip Can you screenshot?

pure tulip
#

I do see that maybe having the variable plugged into current would mess it up but I tried not having it plugged in as well.

plush ridge
#

No, that's fine, are you setting delta seconds on tick?

pure tulip
plush ridge
#

Actually, I believe Interp needs to be run on tick to actually update it every frame. In your case it will run once during that chain (which I'm assuming is not hooked up to the Event Tick)

#

If you want to run the interpolation once, you can use a Timeline with a Lerp instead

#

Set up an Alpha in the Timeline and hook it up to the Lerp

pure tulip
#

Good idea! I was trying to run a delay every 0.01 seconds until the value had reached what I wanted but that didn't seem to work.

#

I had thought it was that.

plush ridge
#

Yeah, interpolations are usually used to smoothly interpolate between values and this has to be updated constantly until the value is reached

#

A couple use cases:

  • An FInterp via Event Tick to smoothly but constantly update the rotation of something.
  • A timeline with a Lerp to smoothly update the same rotation of something, but only once and once the value is reached, stop.
#

You can either use a Sequence node to split off, one running the timeline and another continuing your logic, or you can use the OnCompleted output in the Timeline to only continue once the value transitions fully

#

๐Ÿ‘Œ

pure tulip
#

I can't seem to make a Timeline? Can make one in a macro?

plush ridge
#

No, as far as I know they can only be created in regular graphs (event graph, for example)

pure tulip
#

Ah, ok. Thanks for the help!

plush ridge
#

Np!

pure tulip
#

Any ideas on how I could make my character look towards my enemy? I've got it kind of working. Each screen shot is one the opposite side than the other.

silent crag
#

hello, probably a simple question but, if a function i made returns an array and i want to copy that array to a variable, can I use set? or should I use a for each loop and add?

dull sentinel
pure tulip
#

By the looks of it in my opinion one of the knee axis are being bent the wrong way. Say that the left and right is X and forward and backward (The proper movement of a knee) is Y. The X axis is taking the Y values and the Y is taking the X. If that makes sense?

dull sentinel
#

I thought something similar too, but have gone through the code several times and see no errors. :/

pure tulip
#

Hmm. I'm not too sure then. I've tried many times when it comes to making IK stuff and I had absolutely no luck so I just resulted in getting a plugin on the marketplace called Dragon.IK.

dull sentinel
#

Thanks, Maybe I'll do the same to save some time

pure tulip
#

Np ๐Ÿ™‚

echo blade
#

I've been having a problem lately where I can't get an actor to attach to a socket on a static mesh, it just sits there until I shift + f1 out of the editor and click on it in the outliner, any ideas?

#

It's being spawned in at the location of the socket, then it tries to attach itself to the socket it spawned at

#

Is there something that I need to be waiting for before trying to attach this actor, which gets triggered when you select it from the outliner?

pure tulip
#

Is that running on an event tick?

#

actually, no. You wouldn't want to spawn it every tick..

echo blade
pure tulip
#

So wait, you only need to update it to make it attach to the socket?

echo blade
#

For now I guess?

#

I'm trying to just make it show up in the player's hand

#

I don't have a skeletal mesh for them yet, so I'm attaching it to a socket on a static mesh

pure tulip
#

You could try moving it to the socket location once to update it. Then it should automatically follow with animation? I feel like I read what you said wrong.

sullen radish
#

hello everyone,,, i have question?
by getting an object reference of a specific blueprint into another.. and i'm able to access all the variables inside it, why do i get "accessed none trying to read property"?!

echo blade
#

No, setting it's transform doesn't seem to work

pure tulip
#

@sullen radish I'm pretty sure that means the object isn't initialized in the world or placed anywhere. So It can't find anything.

sullen radish
#

aha okay ๐Ÿ™‚

#

@pure tulip does making a reference for a certain BP acts like casting to this BP ?

pure tulip
#

Do you mean like taking a cast to and making it a variable to use somewhere else without having to cast again?

cyan surge
#

I've been having a bit of trouble disabling VFX is this not correct?

sullen radish
#

@pure tulip no i mean making a new variable and setting it to an object reference to another BP ..

#

when i use casting on that variable a blue note under the cast node says "It's already that object"

pure tulip
#

I'm not too sure. Though, making a variable of an object instead of casting it is still getting info from the object I believe so I don't see an issue in that.

I'm no pro though.

sullen radish
#

i think i figured it out at the end

maiden wadi
#

You don't need to cast a variable if it already is that variable type. Casting is just used to change the reference type.

sullen radish
#

the variable has not been initialized as you said, it's empty, i think the best way to do is to get all actors of class instead.

#

@maiden wadi yeah i get it now, thanks.

toxic salmon
#

I have an event on one blueprint that works fine if I call it from construct. If I call it from a different blueprints construct (using cast to) it behaves different. Any ideas for a solution? This is the event:

sullen radish
#

@pure tulip thanks for the help

toxic salmon
pure tulip
#

@sullen radish Not sure how useful I was but np ๐Ÿ˜„

toxic salmon
#

It still prints the string, but not all meshes are removed, it seems to only select some at random

#

Any ideas why it'd behave differently when called from another blueprint?

zealous moth
#

probably did not cast properly

#

always have your cast failed with a print string

maiden wadi
#

That kind of function looks like something that should be put in a library instead of used from a different blueprint.

alpine copper
sullen radish
#

@pure tulip You told me that it has not been initialized, and that was the password for me to understand ๐Ÿ˜„ lol so thanks a lot

#

i didn't even get where the problem was ๐Ÿ˜„

toxic salmon
#

Except with failed cast the print string in the other blueprint wouldn't have fired right? Or could it half-fail?

#

@maiden wadi you can only call DestroyComponent from the actual blueprint owning the component, not from other blueprints/library as far as I know

echo blade
#

Well, my problem was resolved by engineering around it

zealous moth
#

ah true that... try print stringing everything with sequences of 1 to whatever and see where it breaks

still barn
#

heay i have problems with y rotion on degreas with controller

maiden wadi
#

@toxic salmon Just tried it, it works fine.

#

Would destroy any spline mesh components, just needs the actor reference fed into it.

toxic salmon
#

Thanks @maiden wadi !

fathom spindle
#

Hi there, anyone know how to get a total number of line trace hits? like if i have multiple line traces firing out and hitting the player, is there a way to get the total number of hits happening simultaneously within a given time frame?

#

the multiple linetraces are all firing out from one linetrace node

#

using an array of the objects vertices

maiden wadi
#

@toxic salmon Anytime

#

@fathom spindle I don't know if there is a built in way to deal with that. If you want to amount of hits in a given time, I'd probably just put a function in the line traces to add to the count somewhere and reset it on a timer or tick?

fathom spindle
#

@maiden wadi ah i see so it would be a matter of specifying a range and listening for hit events within that, adding them to an array then getting the array length?

#

i'm trying to get a number which i can compare to the total number of traces to get an occlusion percentage

fluid folio
#

@maiden wadi Did you see my reply i made yesterday about my problem? I tryed to add clear and it did clear but still didnt work all the times. That was about the mouse over hit trace thing with enemies i had.

lapis inlet
#

I need help with making platforms that are intangible and invisible until you press shift, and if you press shift again they revert to their original state

maiden wadi
#

@fluid folio I missed it. Been off and on. I remember thinking about it, but did I ever ask you to put a print node on the tick right after the get hit results to see if the cursor was on the unit or if it was an issue with the highlighting code?

#

@lapis inlet Not sure if there's a better way, but basically you need to get an actor reference to those platforms, and set their hidden to true, and collision to false.

lapis inlet
#

Where is collision located?

maiden wadi
#

Use SetActorEnableCollision

lapis inlet
#

Got it

fathom spindle
#

Ok rethought the question a bit. I have 30 line traces firing out from the vertices of a static mesh. I want to check to see if there are hits happening anywhere on each line trace. If there are hits then add that to an array if there are no hits on that trace remove it. This should allow me to get the total number of line traces that have current hit events. I've not worked with arrays before so any help is very much appreciated.

maiden wadi
#

@fathom spindle Yeah, I just realized I answered that a little wrong after I realized what you were trying to do. If I understand right, you're trying to see how much of an object can be seen by another using multiple line traces?

lapis inlet
#

How do I apply the two conditions of actor hidden and collision to false upon game start? What is the event start?

fathom spindle
#

yeah thats correct, trying to derive a percentage

#

of how many of the traces are being hit

maiden wadi
#

@lapis inlet Use Event Beginplay, probably.

lapis inlet
#

Alright so it does make the platforms initially invisible and non intractable, which is good

#

But now I need to set the input to make them visable

maiden wadi
#

@fathom spindle Mostly what you need to do, is run a function. Probably put all of your start points in an array, for each loop and run the trace, if the trace hits the specific object, add to an integer variable. At the end of the for each loop, take the hit count variable and divide it by your total number of start points.

lapis inlet
#

I currently have an input in the project, which is โ€œshiftโ€

#

But even though Its there, when I press it, the platform doesnt appear

#

I added the โ€œinputโ€ and the results

fathom spindle
#

yeah i have all my start points in an array and a for each loop already to do the traces

#

and i can break the hit to get the start hit vector and compare that against my array of starting positions

#

what im not clear on is the specific node to check if == then add to array then check != and remove

maiden wadi
#

@fathom spindle Drag off of the OutHitHitActor from the trace, and ==. Then use that to check each trace against the target actor. plug the bool end of the == into a branch after the trace. If Hit actor == target actor is true, then add +1 to an integer variable. On the completed part of the loop, take that integer variable and divide it by the total number of traces you just ran.

fathom spindle
#

@maiden wadi thanks i'll give that a go now. was trying something but fairly sure it was garbage

maiden wadi
#

@fathom spindle Can I see your trace part?

fathom spindle
#

sure

#

then off that break hit result i'd want to check the vectors of the trace start to see if they are the same as the vertex positions

#

but maybe it doesnt

maiden wadi
#

Is the actor that's being fed into the function the actor you're trying to check how visible it is?

fathom spindle
#

no sorry, im trying to check how much of the actor thats sending the traces

#

linetraces coming from the sun and hitting hands

maiden wadi
#

In this case, wouldn't your end point be the camera instead of the hands?

fathom spindle
#

yeah the end point is in the direction of the camera * a large number

#

but the thing im trying to get is how many of the traces at the line trace source have hit something

#

so im checking if the hitStart matches the vertex positions of the source mesh

#

there a grid at the position of the sun sending the traces

#

does it make sense?

maiden wadi
#

Not entirely. If you're trying to see how much of the sun is occluded, you'd want line traces from the skybox where the sun is all of the way to the camera lens location. Or the other way around, direction doesn't entirely matter. Then you'd let the hands mesh block them on it's collision channels. Note any line trace blocked by the hands and get your percentage from it.

fathom spindle
#

i see, i've done it this way because the dev of the sky blueprint im using recommended putting a mesh at the location of the sun and tracing from it. In theory though it should be possible to check if hits are happening on a line trace and if so add it to the integer and if not remove it? even if its not the ideal way to go about it

#

maybe this helps clarify

maiden wadi
#

What are the numbers being printed?

fathom spindle
#

thats the HitItem from Break hit result

#

they are being printed if the hitStart matches the vertex positions array (if contain does what i think it does), so they only thing i need is how to +1 to an integer and -1 if its not, then can deal with finding the percentage at the end of the loop as you said

maiden wadi
#

This is inside of a function, so you could just use a local integer variable. Right after the contains node if I'm not mistaken? If it contains, add one to it. If not, do nothing.

fathom spindle
#

do you know the node for that? i'm new to blueprints so learning as i go

maiden wadi
#

Ah, yeah. On the left side, you have your variables, at the bottom of those under EventDispatchers should be LocalVariables, click on the + to the right of that.

fathom spindle
#

yeah i have that made a local integer

maiden wadi
#

You can either use the Increment node, or get it, add 1 with the addition node and then set it.

#

Either of those works.

fathom spindle
#

ah amazing thanks so much

#

ill give it a go

#

works great thanks! ๐Ÿ™‚

maiden wadi
#

Victory!

#

Queue bad inspirational music.

normal rampart
#

Greetings friends. I have a kinda complicated question, but maybe one that has a simple solution.

So, here's the scenario:

In the world, there's an actor A of class A and an Object B of class B
Object A has a child actor of class C (and an object reference, set in the construction script, to the actual actor of class C that's inside of the child actor wrapper)
Object B has an object reference of class C

How can I get object B's object reference to match object A's object reference (which is a reference to the class C child actor in object A)? I'd prefer it to be set in the details panel of object B in the world editor, but when I try this setup, the child actor is not listed.

crisp wigeon
maiden wadi
#

I don't think it's the cast so much as that you set the variable again.

#

Also, things like this should be event driven instead of being done on tick.

fathom spindle
#

Hey @maiden wadi Everything is working great I just need a way to reset my values to zero when theres no hits

#

currently decrementing the integer but that still leaves 2-6 hits in it

charred flint
#

When my player dies I wana disable all in game UI in 1 or 2 nodes so that I dont have to create an endless amount of visibles and hiddens but this doesnt do the trick. What am I doing wrong?

crisp wigeon
#

@maiden wadi Yes, I am using "set timer by function name" Node. I'll will remove event tick. But i want to ask that I have many enemy and actor blueprints which use PlayerRef so it will affect on performance? If I cast player again and again

alpine copper
#

how can I compare scores so that I have a podium with the best 3 players ?

odd ember
#

not like that

#

or you can, but it's not a great way of doing it

#

but you still need the foreach loop

alpine copper
#

with this I can get the best

#

but I need two more

odd ember
#
float HiScore = 0;

for (player : playerlist)
{
  if (player.GetScore() > HiScore)
    HiScore = player.GetScore();
}

return HiScore;
alpine copper
#

I'm not that comfortable with code, but isn't it the same thing I'm doing now ? you are getting the score and if it's greater than the hiScore you set it

odd ember
#

yep

#

you can get the player directly as well as a variable instead of using their index

#

saves you looking it up again

alpine copper
#

yeah that's cool, so what I was thinking is to remove the winner from the list and then run then same process to get the other two

#

do you know of any other way to do it perhaps?

odd ember
#

if you want them ranked you need to sort

alpine copper
#

this is how it looks currently, what do you mean by sort

odd ember
#

I would look up and see if anyone has done a sorting algorithm in blueprint

#

and just copy that

alpine copper
#

thank you ๐Ÿ™‚

mighty fable
#

@odd ember hey, did you happen to see my message on dynamic or static?

still nexus
#

is there any PDF viewer plugin for ue4 ??

fluid folio
odd ember
#

@mighty fable yeah but I'd gone to bed by then

#

so how are you setting the color of the player?

#

and is there a relation you want the color of the player to have to the color of the enemy

mighty fable
#

@odd ember Right now I just have it being set by the default material. If we could just make the player blue and the enemy red that would be decent. I'm new to UE4 so bear with me here.

odd ember
#

ok but if you just want those two colors then why dynamic?

#

just out of curiosity

mighty fable
#

because it seems like it would make it easier down the line if I were to learn how to add more teams or something like that

#

if that makes sense

#

a friend and I have been trying to get it to happen but cant quite get it. He has some stuff that he's been working on but I've been tied up with work so idk where he stands with it exactly either

odd ember
#

I mean I can show you how but from a design point of you it's probably in your best interest to pick each team color to be unique

#

just saying

#

anyway, you need dynamic instance materials

mighty fable
#

ok well here lemme say this... we need the player and the base character to be different colors. If that is dynamic then we're on the right path

odd ember
#

the logic is the same regardless

#

I'm not concerned about where you put the logic

mighty fable
#

Ok awesome, so how do we start?

odd ember
#

I just don't think it's worth making dynamic

#

you need a material

#

with an exposed vector4 parameter

mighty fable
#

lemme open my project so I can try to work on it at the same time, sorry just got home from work

#

quick question for you, is it possible to keep the existing material and change the parameters on that instead?

odd ember
#

as long as those are exposed, yes

mighty fable
#

ok, so lemme see...

robust temple
#

Why would getting game instance succeed 10 times and fail 11'th or whatever the numbers, switching widgets from game instance, part that fails once upon few tries is this thing

#

And this gives Unhandled exception

mighty fable
odd ember
#

we're not really interested in the material

#

so once you have the parameter let me know

mighty fable
#

ok hmmm ๐Ÿค”

odd ember
#

like I said you need a dynamic instance material

mighty fable
#

I'm trying not to change the material if I can help it just have it work off of a branch command when the mesh is player controlled and when it isn't

odd ember
#

sigh

#

you're not changing the material

#

just do what I'm saying

mighty fable
#

ok, sorry I'm learning, gimme a second and lemme see if I have the right train of thought

odd ember
#

yes

#

pick a source material

#

the one you want to use

#

we're creating an instance

#

which means sort of like a copy that exists in a transient space during runtime

mighty fable
#

so the material would be the one that is already on my character

odd ember
#

it could be any material you want

#

if you want it to use the one already on the player you can do that too

mighty fable
#

yeah, I just want the material to change colors depending on whether or not its player controlled

odd ember
#

just do mesh->Get Material and plug that node into the source material pin

fluid folio
#

@maiden wadi Ommmgg i found another way to fix this, i used object instead of channel and it works like a charm, i hope it wont change my results in future tho ๐Ÿ˜„ thanks for the help!

mighty fable
odd ember
#

yea

#

so delete the branch and those other nodes

#

from the return value of the dynamic material instance you should get something like set parameters on material instance

mighty fable
#

Alright

odd ember
#

yeah vector

#

so

#

from the same return value also get vector parameter values

mighty fable
#

so off of the yellow node call for the players position?

odd ember
#

no

#

you don't have the right node actually

#

because again you didn't drag it off the return value

#

forget about the mesh variable

mighty fable
#

oh!

#

ok I have that now

slender sage
#

guys, please, i really need your help. I've been stuck with it for week.
I need to set my camera rotation zoom like in mario games
When i rotate camera up which i assume -90 degrees it should zoom (or move) back
when it's 90 degrees it should zoom (or move) in
It's like in mario odyssey
I am a newbie so i don't know a lot of things ๐Ÿ˜ฆ
I would really apreciate your help ๐Ÿ™‚

odd ember
#

so from your get vector parameter value, drag out a node and then search for !=

mighty fable
odd ember
#

yep

#

or well actually

#

you wanted it based on whether or not its played controlled

mighty fable
#

yea

odd ember
#

find the select color node

#

keep the get vector parameter value

mighty fable
odd ember
#

yes

mighty fable
#

ok

keen goblet
#

@slender sage Spitballing here -- you could do something like on Tick check the world rotation of the camera, and then fire a custom "zoom out" or "zoom in" event when the rotation becomes < your "zoom in" angle or > your "zoom out" angle

odd ember
#

so your player controlled bool goes into that

mighty fable
#

I can kinda see where we're going

#

into the "A" node right?

odd ember
#

the Pick A

#

the only place it can go

mighty fable
slender sage
odd ember
#

IsPlayerControlled

#

not IsPlayerController

mighty fable
#

ok got it

odd ember
#

k

#

so

#

the GetVectorParameterValue goes into the A pin

mighty fable
#

ok so I have that

odd ember
#

cool

mighty fable
odd ember
#

from the GetVectorParameterValue drag out another node called LinearColor - LinearColor

mighty fable
#

off of the exec?

odd ember
#

always the return

keen goblet
#

@slender sage Don't see a check on the camera's rotation in there. My idea could work, but there's probs a better way
I'm not the best guy to give advice on this anyway, since I almost exclusively do VR. Messing with the camera transform in VR is a great way to make ppl ๐Ÿคฎ

slender sage
#

sad, thanks for help anyway..

mighty fable
odd ember
#

yep, but put it in the bottom pin

#

instead of the top

mighty fable
#

ok

odd ember
#

drag the top pin out and write white

mighty fable
#

ok

#

linear color white into the top blue node

odd ember
#

yep

#

so this is the math behind the color

#

whatever your player's color is, the enemy color is inverse

mighty fable
#

do I plug that linear color - linear color into anything else?

odd ember
#

oh yes, into the select

mighty fable
#

ok so can I set colors from anywhere or what's next? I feel like we're missing something

odd ember
#

we are missing something, but this is the math behind it. what colors do you want to set?

mighty fable
#

so since we subtract the white color value from the value that is inputted into the player character that is how we come to showing the enemy players colors?

#

I would like the colors to be the typical red v. blue if possible

odd ember
#

we subtract the player's color from white

#

white in math terms is just a vector with (1,1,1,1)

#

so subtracting the player's colors we get the negatives of those colors

#

we then assign those to only those that are not player controlled

mighty fable
#

oh ok, so essentially if we want to generate a color we would subtract from one of those placeholders to get said color?

odd ember
#

subtract from white

mighty fable
#

and if we subtract from white we get black

odd ember
#

it's important that white is the one being subtracted from

#

otherwise you'll get black like 90% of the time

mighty fable
#

right because white contains all colors

odd ember
#

no

#

it's math

mighty fable
#

oh

odd ember
#

white is jut 1,1,1,1

#

black is 0,0,0,0

mighty fable
#

ok, that makes sense then

odd ember
#

all colors are inbetween

#

in the RGBA gamut

#

so if you subtract something like a 0.5,0.3,0.8,1 from white's 1,1,1,1 you get 0.5,0.7,0.2,0

#

which is the inverse

#

alpha doesn't matter in this case though so it's discarded

mighty fable
#

gotcha, so how do we assign those values to subtract and get the character to display those colors?

odd ember
#

we already have

slender sage
#

someone else.....help

odd ember
#

that's the purpose of the select node

#

and the SetVectorParameterValue

#

now, like I said we aren't done

mighty fable
#

ahh ok, I think I understand

odd ember
#

I just did an intermission to explain the logic to you

mighty fable
#

ok, makes sense to me

odd ember
#

so in your screenshot you're still not getting the GetVectorParameterValues from the material instance

#

you need to get it from its node

trim matrix
#

Hello, so I got this weird thing going on: the mouse is locked onto the screen but if I go really far on a side I am able to click on the game window and resize it. On fullscreen, nothing happens but the input (click) is lost

mighty fable
#

so from the target node on get material? Or where would I want to put getvectorparametervalues?

trim matrix
#

I have been messing around with locking mouse to screen, hiding cursor with no luck

odd ember
#

it needs to come from the dynamic instance material node

mighty fable
odd ember
#

nope

#

delete the node you have

#

and get it from the return value

#

the node you have is the wrong node

mighty fable
#

the get material node?

odd ember
#

the dynamic material instance node

#

cmon man

#

I've said this like 3 times

mighty fable
#

Sorry, like I said im new to Unreal, been toying with it for 2 weeks.

odd ember
#

just read what I write

#

I'm trying to help you out here

mighty fable
#

I know and I appreciate it. When I drag off of the return node from get material it wont let me attach to getvectorparametervalues

odd ember
#

I keep telling you

#

dynamic instance material

mighty fable
#

oh ok, then that goes into the linear color - linear color node right

odd ember
#

yes

#

two things are missing

#

once this is done

#

you need to find the name of the color parameter in your material

#

whatever it's called

#

and put it in as it is written exactly, in the Parameter Name pin

#

for both the get and set node

#

once you've done that, at the end of the execution thread, you need to use a Set Material node on your mesh

mighty fable
odd ember
#

probably

#

has color in the name

#

is a linear color

#

makes sense

verbal bolt
#

Is it possible to trace only a single object?

odd ember
#

normal traces only trace to a sngle object

verbal bolt
#

I mean, only a single CHOSEN object

#

as far as I can tell, it traces the whole scene

odd ember
#

what are you looking to do

#

like a trace only exists in the world you trace in

#

it doesn't exist as an abstract concept

verbal bolt
#

I have some ground plate (platform). I have a character that has to stick to it

#

I would like to trace only that single platform

odd ember
#

so get that platform's location and trace to it

mighty fable
odd ember
#

get material params return into A of the Select

mighty fable
#

So B has the black box next to it

#

because that is the inverse of white

odd ember
#

no

#

A has a black box on it because you didn't connect it

#

so it'll show up as black

mighty fable
#

oh I think I misunderstood you then h/o

odd ember
#

... you can drag out multiple lines

#

from your return values

mighty fable
#

๐Ÿ˜ฃ

#

ok got it now

odd ember
#

so you didn't hook up your dynamic material instance into the functions. where it says Self you need to plug it in

ocean radish
#

Anyone have any insight into this, I have actors spawned in the world, I want to store the actors into say crates, how would you handle this, store all the stats in something like a struct and destroy and respawn the actor, hide the actor or anything I'm not thinking off, I need to keep all the variables on the actor, but dont need to 'see' the item in the crate, any help on this is muchly appreciated

odd ember
#

in the Set Material node, connect your mesh to Self

#

and your dynamic instance material into Material

#

@ocean radish destroy crate -> spawn loot

#

but really you will want a loot manager

ocean radish
#

I wont be destroying the crates there just containers that can store items in

odd ember
#

depends on how your game is setup

#

storing items usually refers to an inventory subsystem, so you'd store them in an inventory rather than physically

#

unless you have a physics game

ocean radish
#

think of it like a top down rts style where AI's can go to get resources(but each resource is unique)

#

Yea I was thinking that, just didnt want to have to go back and put all the vars into structs and rewrite a bunch of stuff ๐Ÿ˜„

odd ember
#

that's why it pays off to think ahead

#

technical debt is real

faint pasture
#

@ocean radish Depending on how on depth you wanna go, I'd make an InventoryComponent that holds an array of structs or classes, and you can call DropItems on it.

#

DropItems will then spawn all the items or unhide them or whatever.

slender sage
#

nevermind i did it myself woooohooo

mighty fable
#

Sorry Cranz I don't understand what I am plugging into the dynamic material

ocean radish
#

@odd ember Yep big mess up on my part on this one totally overlooked it for no reason what so ever ๐Ÿ˜„

odd ember
#

@mighty fable reread what I wrote pls

#

it's all there

ocean radish
#

@odd ember @faint pasture Thanks peeps confirmed what i was thinking but was hoping there was another way ๐Ÿ˜„

mighty fable
verbal bolt
#

@odd ember but what if my platform has a curve-like geometry?

odd ember
#

see if it works, and if it doesn't, reread what I said again

#

it's all there

#

@verbal bolt what do you actually want to do?

verbal bolt
#

Say you have an Earth Worm Jim like game with all the curvy platforms.

faint pasture
#

@mighty fable You are setting the vector parameter value on nothing. Save the dynamic MI to a value and call things on it.

verbal bolt
#

Your character once lands on a platform now has to "stick" to it.

odd ember
#

@faint pasture you don't need a variable if you assign it to a slot

#

afaik

#

anyway that's the least of his problems

verbal bolt
#

and when you go forward, you just stick to the next nearest point on that platform.

odd ember
#

I don't have a reference for that

#

can you find a video of it

odd ember
#

which part?

verbal bolt
#

even on the picture shot you can see that the platforms are actually not flat

#

sometimes you go up sometimes down

odd ember
#

yeah but I still don't understand what you want to do

#

just walk around on them?

verbal bolt
#

yup

odd ember
#

just use box collisions

verbal bolt
#

as "simple" as that

#

you mean non-AABB ones?

odd ember
#

I mean the simple collision

#

available

verbal bolt
#

but how can I place the character exactly on them?

odd ember
#

rotate them until they fit

verbal bolt
#

I wanted to trace a segment for the platform that I'm currently on to place a character

ocean radish
#

Could use custom collison imported with it

verbal bolt
#

ok, so once they are rotated and placed as I want, how to place character ON THEM

odd ember
#

if your collision is correctly placed, it will handle it

verbal bolt
#

I have a pivot at feet, now I want to place that pivot on ground (platform)

odd ember
#

otherwise you're looking at IK

#

if you want the detail level of it

verbal bolt
#

that's nice

odd ember
#

but the collision in your case are going to be more than enough

verbal bolt
#

that would be nice*

#

you mean physics collisions?

#

so that my character would be placed on the ground be the physics engine?

odd ember
#

all collision is physics collision

#

but that's how you do it

#

that's how all games set up collision

#

the complex meshes are rarely used as collision because they are too expensive

verbal bolt
#

so how do you implement the gravity then?

#

I just wanted to trace beneath the character and stick to the ground

#

on the resulting hit point

#

so that the character would "scan" the ground

odd ember
#

gravity is already implemented on the character movement compnent

#

no need to reinvent the wheel

ocean radish
#

yea gravity is already there, you just need to implement IK to place the feet, to make it look like there walking on the surface

odd ember
#

probably won't be necessary

#

earthworm jim doesn't do IK either

#

at least from the video

verbal bolt
#

gravity is already implemented on the character movement compnent
@odd ember even on non-physics based character?

odd ember
#

yes

dusk dust
#

How can I use a texture to define where I can spawn meshes or blueprints?

#

For example I have a ring generator that spawns instances of an asteroid mesh in a ring shape. I also have a ring material with a texture, I only want to spawn my asteroid generator where the ring exists

#

The ring material is applied to a plane

#

This was manually placed

mighty fable
odd ember
#

random vector in volume or something @dusk dust

#

@mighty fable have you tested it?

dusk dust
#

@odd ember but I want it to be based on the texture

odd ember
#

then you're in teh wrong channel

dusk dust
#

Okay

odd ember
#

your best bet

dusk dust
#

Thx

normal rampart
#

Okay so I have a problem

Here is a simplified scenario:

I have a light. I want the light to turn on when a button is pressed. The button is a child actor inside a buttonbox actor. In my light, I have a variable for an object reference to a button. I place both a light and a buttonbox in the world. I want to be able to set the button reference in my light in the details panel, but the button isn't listed since it's not directly in the world and is actually a child actor inside the buttonbox.

Any ideas on what I can do? ๐Ÿ˜‹

mighty fable
#

@odd ember yeah, it didnt work because im not launching it

odd ember
#

you probably want it off begin play

mighty fable
#

both characters are the base color

odd ember
#

did you hook it up?

mighty fable
#

yup

odd ember
#

try to promote the return value of the dynamic instance material to a variable, and then use that variable for all the other nodes where you used dynamic instance material's return

vernal torrent
#

I need help again, only a day has passed... ๐Ÿคฆโ€โ™‚๏ธ

odd ember
#

just state your problem

vernal torrent
#

yep, sorry 1 sec

#

here I'm taking what actor I have taken in vr, and seing if it is in a specific class, all good

#

it works as intended, but it only lets me plug it If I plug the array last. The problem goes when I close and reopen the engine, then it gives me an error and I have to unplug and replug the things, then it works again. Of course, if I wanna be able to release the game I cannot have it like that

mighty fable
robust temple
#

Does print string also print to crash log if one happens?

vernal torrent
robust temple
#

Yeah I did check it

vernal torrent
robust temple
#

But still no log and engine crashes

vernal torrent
#

it does to my understanding, but I'm not sure

#

the engine?

robust temple
#

I mean both editor and standalone been checked

vernal torrent
#

the log probably gets lost then

faint pasture
#

@normal rampart why is a buttonbox and button seperate?

odd ember
#

@vernal torrent that's a bug, report it

vernal torrent
#

nice, I'll do. Glad to hear it's not my fault at least, thanks for the help again!

mental sail
wintry grove
#

any ideas why my turret is facing the wrong way ? its supposed to be looking at third person character but its looking perfectly backwards at me. any help would be appreciated

normal rampart
#

It's just an example. ๐Ÿ˜ŠThe buttonbox just represents a wrapper that holds a child actor. I don't want to place the button in the world directly though. @faint pasture

distant sedge
#

Your interp speed is too slow or the barrels model itself isn't facing forward in the X axis?

wintry grove
#

SparkyMcSparks how to increase the speed ?

gentle urchin
#

the mesh itself is wrong way compared to what you think is forward it would seem

whole roost
odd ember
#

@wintry grove try switching the position of player location and barrel location

gentle urchin
#

or reimport with the offset rotation needed

#

or add 180 degrees to rotation found ๐Ÿ˜›

odd ember
#

reimport would be the wisest but we don't know for sure how wrong the forward is yet

gentle urchin
#

fair point

strong barn
#

how do I use functions from a blueprint function library in a game mode blueprint?

mental sail
#

Brรถther, is there an easy way to create a "singleton" in editor, using blueprints? Or just C++? For example I want some player stats values to update and read from, and save, but they should always return the same value from anywhere in the game when accessed...

#

Would a Struct and Data Table suffice?

strong barn
#

A struct should work

gray lantern
#

I know this is such a simple thing but I keep forgetting how its done

#

I want to reference in the Static sphere mesh from Ball reciever Test

#

an then plug it into my niagara static mesh sampler

wintry grove
#

@odd ember what do you mean "Try switching the position of location and barrel location"?

distant sedge
#

Change it before you export it from your model app? Or in the details panel there is import options where you can add an offset of 180 on the Z axis and then reimport

odd ember
#

@wintry grove well follow the other suggestions if you want, but in your code you're getting the look at rotation. switching those two vectors would at least see if you get a correct rotation

#

if you get it right there then you can change it on reimport

wintry grove
distant sedge
#

The very bottom one you have circled

wintry grove
#

worked

trim matrix
#

can someone with fps knowledge help me rq?

#

or just anyone?

odd ember
#

@trim matrix state your question and if someone can help, they probably will

fickle nebula
#

Hey guys, how do I save the level actor in the save slot? Example: I pick up a stick, save game, load the level and I want the stick to no be there anymore

trim matrix
#

@odd ember alright, so i have a gun w/ animations seperate to my third person mesh animations and I was wondering how would i go about adding my gun animations to my third person character

#

i have the gun already added the character but not the animations

gray dune
#

can someone help me out

#

i am currently having issues with fps object clipping

#

so i want to make a script that stops character movment when the box collider is overlapping

#

how can I check any static mesh (not cast to a specific one) but any static mesh in the scene

#

and set walkspeed to 0

#

if it collides

odd ember
#

@trim matrix first person animations don't mesh with third person animations... if you have both you'll want to use third person animation and some camera trickery to show it from first person view

trim matrix
#

no like actual gun animations like reloading

gray dune
#

this is what i have currently

trim matrix
#

not first person arms animations

odd ember
#

so just regular animations for third person?

trim matrix
#

no like the gun itself

odd ember
#

not sure what you mean... like you put animations on the gun itself?

trim matrix
#

yea but i already have the animations how would i add them to the gun

#

just anim bp?

odd ember
#

I mean the gun isn't supposed to have animations really. I struggle to understand how you'd want that to function. perhaps through anim notifies you can make it work

trim matrix
#

well my reload animation is having the magazine removed

#

on the gun

odd ember
trim matrix
#

alright

odd ember
#

@fickle nebula you'd have to ensure when item is picked up it is added to a no spawn list that you save in the game instance

fickle nebula
#

@odd ember Yeah I thought about it, but how manage this list when I'm not spawning the item in the beggining, I'm just loading the level?

odd ember
#

@gray dune this is a bit more difficult than you'd want, since yuo would have to mark up every static mesh you'd want to do this for

#

@fickle nebula you could have every item check its own existence on that list

zealous moth
#

@odd ember well Cranz, you were right about the game instance but to answer the original question, in my game context, the save file would serve better to store values than the game instance

#

thanks anywho

odd ember
#

@zealous moth sure but the game instance also doubles as a space that is persistent throughout the game. so if you need variables that need to be correct regardless of level, they need to be stored there. you also don't want to save values to a savegame too early

#

so you shouldn't really store values until you want to save

gray dune
#

so my problem is that I have a box attached to my fps character infront

#

if i walk close to a wall

#

the box clips through entirely

#

I dont know what to do, anyone got a fix on that?

#

my characters capsule works just fine but even when usign a box collision on the object

#

it ignores static meshes

#

it works fine on physic meshes

#

but static meshes, I get clips every damn time

#

I am getting mad lol

odd ember
#

@gray dune set up a new collision channel in your collision presets, that everyone blocks

#

(and set the box to block everything)

gray dune
#

the box collison was set to block all

odd ember
#

collision is a two way street

gray dune
#

the box collision i overlayed ontop of my object i didnt want to clip through walls was set to block all

odd ember
#

BOTH actors need to be set to the same collision

#

so if one blocks and the other overlaps, it won't work

#

both have to block

#

each other

#

that is

fickle nebula
#

@odd ember When I press play the level load, I dont spawn any item.. that's the problem, How I will check if they are in my list?

gray dune
#

let me check

odd ember
#

@fickle nebula inside the code for each item I meant

zealous moth
#

@fickle nebula foreach - print string

odd ember
#

each item has a BeginPlay event

#

in there you can make it check itself against the game instance's list

fickle nebula
#

so in each item, begin play -> if it's on my list -> destroy actor

odd ember
#

if they all derive from the same base class you're in luck, you can do that logic once in the base class

#

yea something like that

#

keep in mind this is just the way I'd do it on top of my head

#

it's good because the item is responsible for its own behavior

#

failing that, a spawning manager system could also be implemented, but that's a bit more complex

hollow dove
#

Hey how do I perform something on game quitting? For example if someone presses ALT + F4

hollow dove
#

It can be in C++ or BP doesn't matter

fickle nebula
#

but imagine a lot of sticks, so if I picked up one stick once , It will make all my sticks dissapear

gray dune
#

@odd ember as you can see

odd ember
#

@hollow dove pretty sure alt f4 is a windows command, so you can't execute logic as it overrides game logic

gray dune
#

the wall and the box are block all

#

still it clips like its nothing

#

why is it so

odd ember
#

@gray dune because whatever it is clipping with doesn't have the collision set up to block that mesh

#

both have to block each other

#

do you understand?

#

@fickle nebula not at all, since every stick performs the check individually, only sticks you have picked up would disappear

#

(as in, only the sticks that are on the list)

gray dune
#

if thats the case

#

the wall shouldnt block my character

#

if the wall didnt have collision

#

it blocks the capsule of my character just fine

#

as you can see i have the box collision set

#

up

odd ember
#

show me the collision setting of the wall then

#

I can't actually see the collision settings

#

you cut them off

#

the collision presets are what matters

#

and whether or not you have set them to custom or not

gray dune
#

its the fps test map

#

by default

#

those have collision

#

otherwise I cant explain why projectiles etc bounce off

odd ember
#

I still can't see what's inside your collision presets

#

like I said

#

if BOTH actors have collision set to block each other, it's fine

#

if only one of them has block, it won't work

#

my guess is that is what is wrong

odd ember
#

right but I can't actually see inside of your collision presets

#

you're just showing me the "block all"

#

but you could have custom logic inside there

gray dune
#

i dont have any custom logic

#

its all standard test mapo

odd ember
#

cool

#

show me the other collision you're saying fails

#

@fickle nebula I think I left out that you'll probably need to use some kind of identifier to identify the item. perhaps it would be better if the array was a struct of class or soft ref + id string

fickle nebula
#

yes, I'm trying to do a list o obj ref

odd ember
#

or perhaps a map with string : class

gray dune
#

thats the box collision in my fps character

odd ember
#

try unticking generate overlap events

trim matrix
gray dune
#

didnt work

#

hmm

odd ember
#

so it goes through the wall?

gray dune
#

I really dont know why

#

yes

trim matrix
#

nevermind then

gray dune
#

unticked on the box collision

trim matrix
#

people are rude

odd ember
#

yeah excuse us for not answering your questions immediately while in conversation

#

we're not paid to be here

gray dune
#

Id help but I am not really experienced with ai

#

and cranz is currently trying to help me out

#

so we were ina convo

odd ember
#

ok so a bit far out

#

but

#

perhaps try a video

#

@gray dune

#

so I can get an idea of your issue

gray dune
#

of the issue

odd ember
#

yea

#

it's kind of hard to gauge it with the limited info here

gray dune
#

okay 1 sec

#

here you go

true valve
#

Is there a way to add components in a BP Actor via blueprint?

odd ember
#

that is indeed strange

gray dune
#

no idea, the cart itself has collision

odd ember
#

untick hidden in game for the collision volume

#

let's see if the collision actually follows you

gray dune
#

yep does follow me

#

but wont react to static meshes

#

physical objects get interacted just fine

odd ember
#

is the cart overlapping your capsule in any way?

gray dune
#

simulated*

#

static mesh is, the volume i think not

#

let me double check

odd ember
#

try making it so both aren't

#

just to eliminate it as a possibility

gray dune
#

just did, didnt work

odd ember
#

@true valve literally, Add Component node

gray dune
#

this is why i was wondering if theres some way to get any overlapped actors with box (check if its static and then idk stop movement

#

which in return would be a really bad solution

odd ember
#

you shouldn't have to try and hack it

#

and the hack wouldn't work either

gray dune
#

yea i see bunch of problems with that

#

can you maybe try in your end and see if its works fine

odd ember
#

the collision needs to function

gray dune
#

maybe its just me

odd ember
#

try deleting your box and do a sphere or capsule instead

#

see if you get different results

gray dune
#

i did a sphere which did the same

#

then i resorted to box

true valve
#

@odd ember I don't see Add Component when I right click and search for it. It's in the components tab but I want to add stuffs via blueprint nodes.

fickle nebula
#

@odd ember It worked ! ๐Ÿคฉ Thank u

odd ember
#

@true valve it's a node in existence

gray dune
#

maybe got any last clue

odd ember
#

hmm

#

object type is dynamic?

#

idk just the barest spitball here

#

@true valve you have to specify the type of component to add

true valve
#

I want to add a BP to a child actor. ๐Ÿ™‚

#

Then that child actor will go under the scene in Components tab.

#

so add child actor to a scene

#

I will need to add multiple of child actors to that scene

odd ember
#

@true valve you should never use child actor components

#

they're terribly inefficient and there are much better ways of doing whatever it is you want to be doing

true valve
#

How to add BP to a BP? Let's say I have a light-bulb BP with some features and I put that in a houseBP which has its own features.

echo scaffold
#

Any best practises for creating save games while in development where variables and such might change?

odd ember
#

@true valve why does the light bulb have to be an actor? can it be a scene component?

#

@echo scaffold not really, save what you need, and only what you really need. it entirely depends on your game otherwise

echo scaffold
#

Is it a bad idea to create a SaveGame Object which contains a single struct of all your data you want to save

#

Rather than have the variables separate and within the SaveGame Object

odd ember
#

I mean structs are useful when you're organizing variables

#

if you just have one struct that every variable is part of, then you might as well not have it

#

unless you need those variables to be together at all times

#

it's better to think of packets of data that you want to keep together

echo scaffold
#

Yeah that makes sense, so in this case it's a character creator save game

#

So a struct seems like it would make sense. But I'm concerned that it would be less stable with constant development, things being reordered, renamed etc

#

Since wouldn't it break the entire struct / save then? Rather than if it was all free floating variables

odd ember
#

if a save fails to load then that save is corrupt, structs or not

echo scaffold
#

I don't know how either structs or SaveGame objects work behind the scenes really, so I can't imagine how it might break or might not

odd ember
#

in the end the data is serialized, so it's gibberish anyway

echo scaffold
#

Right but if one variable of a save game doesn't load, won't it just ignore that variable?

#

Or will the entire load fail

odd ember
#

nope

#

well if the variable is a null value it'll load fine in either case

#

if it's corrupt it'll probably crash your game

echo scaffold
#

Alrighty thanks for the answers then, will do some stability tests to see what I can get away with

odd ember
#

but like I said behind the scenes it's all serialized anyway, so in terms of data it doesn't matter

woven pagoda
odd ember
#

you can get one, yes

#

you can't make it in BP

woven pagoda
#

I'm trying to do this in a level blueprint event BeginPlay and the value is none

odd ember
#

then it doesn't exist

woven pagoda
#

if I first get the player controller 0 and use that to get the local player subsystem, it works...

odd ember
#

looks like it might have to be called from the player

#

not the level blueprint

woven pagoda
#

odd.. so getting player controller 0 then the subsystem is the correct way to solve this?

odd ember
#

subsystems will instantiate themselves if not instantiated already. so if one returns null, it either doesn't exist or isn't callable from where you want it

woven pagoda
#

i wish this were documented on that page

rose spire
#

How do i change key board focus when a widget is opened for example? So my arrows left and right will move the player but if I open up my journal it will also turn the page. I don't want them to do both at the same time.

odd ember
#

@rose spire there's a node for this, set input mode

woven pagoda
#

is there a way to access the ULocalPlayer in blueprints -- that seems like it fits the docs better?

odd ember
#

GetPlayerController is probably the closest equivalent

rose spire
#

@odd ember It's legit called set input mode? I can't find it

odd ember
#

tbh I seem to remember these being a single node

#

but I can't find that one anymore

#

@woven pagoda if you have the low entry standard library, that has a function for getting local player (still requiring player controller):

rose spire
#

thank u

stuck hedge
#

how can the default of that spawn node be the third person character when it's connected to the variable which has a value of "drone" as it's default class?

narrow kelp
#

@stuck hedge your var could have been modified after creation

stuck hedge
#

Creation of what? that's what it's set to now.

narrow kelp
#

you could make a breakpoint and verify if its still drone at the point

stuck hedge
#

It's not running

#

this isn't about running.

#

Notice the search box at the bottom

#

if i search for "third" it claims the default for that spawn actor is third person character, but it clearly isn't.

#

I'm trying to delete the third person character BP because I don't use it or need it, yet it's claiming several BPs have a reference to it. This is one of those BPs, so when I searched it claimed this node had a reference to the third person character BP, but there is no reference there.

narrow kelp
#

just fyi I believe there is a bug where the first search doesn't really work

#

I always have to search twice

stuck hedge
#

No. I just found the issue.

narrow kelp
#

dono if that has anything to do with ur problem tho

stuck hedge
#

if I unhook the variable, the spawn node has "third person character" set as the default.

#

if you set something as default and attach something else, it seems to "remember" it.

narrow kelp
#

ok

stuck hedge
#

I've never seen that before.

#

so If I clear what is set there, and hook the variable back up, it works fine, and the "default" is cleared.

rough wing
#

With spline mesh

#

Can anyone help me

rare gale
#

Anyone know the node I need to set the number of characters to show after a decimal of a float? I know one exists, but can't find it again

fickle nebula
#

@rare gale I think it's set precision

rare gale
#

hmmm, not finding that...

fickle nebula
#

hmm this is in cpp, wait

rare gale
#

the one I'm thinking of is ToText(Float), but I was looking for one as a string... maybe not the same

#

that one works for me... had to dig it up in an old project. ๐Ÿ™‚

cobalt current
#

Does anyone hear work in VR or am I just along here

fickle nebula
#

@rare gale clamp works for u?

#

@cobalt current no..

cobalt current
#

@fickle nebula
Well that is insanely disappointing. Is there any other channels that deal with VR or is it just not here in this Discord server

rare gale
#

@cobalt current There's a VR-AR channel in Platforms

#

@fickle nebula Clamp didn't have the option since it changes the number. I just wanted to set how many digits were shown in UI and print strings. ToText then ToString worked

#

ToText lets you set the digits to show

fickle nebula
#

aaahh interesting

slender sage
#

hello, how can i make "if camera stopped" node? i need it for my timeline

slender sage
#

help)

tight schooner
#

@slender sage you need to write camera location (or transform) into a variable as the last thing in your timeline update chain, and then you can compare the current camera location to the variable, which represents the previous frame camera location, to determine if the camera has moved at all. There may be some better way but idk anything about your project so that's a generic approach.

maiden wadi
#

@cobalt current There's quite a few people in here that work in VR. I don't personally, but there are some.

robust temple
#

Following Unreal Engine's Blueprint Multiplayer tutorial series on youtube, it's approach is that game instance handles switching widgets (creating them) and if you have something like back button in one of widgets, you remove from parent and then call creation of some widget from within game instance (you get game instance on construct of each widget that needs to switch between widgets and cast it to your own game instance class). Although the issue there is I log each getting game instance and failed cast, unreal engine crashes, nothing is logged, and idea why that is?

slender sage
#

@tight schooner are you talking about timeline that moves synchrony with camera float?

fathom spindle
#

Hi everyone, I'm running multiple line traces in a for each loop and accumulating the number of hits, then once the loop finishes dividing this by the total number of traces to get a percentage. The question I have is how to smoothly interpolate the resulting percentage float. I think I need to store the old hit percentage to a variable every time it gets updated and use this and the new one to drive an finterp with delta as the alpha, but im really confused by the order of operations of how to set this 'LastPercentage' variable. Maybe someone could help me with the maths to get the last frame and compare it with the current and set them that way?

tight schooner
#

@slender sage you can use my solution on tick or on a looping timer; it works anywhere. The premise is to compare the camera's past state with the current one to determine if the thing has moved over time.

slender sage
#

Iโ€™m sorry, iโ€™m pretty bad at speaking english. So i donโ€™t understand the half of your message

tight schooner
#

To determine if an object is stopped, you need to compare the object's past location with its current location. The object's location should be stored into a variable. Then, in the future, you can compare the object's stored location to the object's current location. If the two match, the object is stopped.

slender sage
#

Ooh ok

#

I got it

tight schooner
#

You can do this operation on a timeline, or on tick, or on a looping timer.

#

Any event that fires regularly will work.

slender sage
#

Another question i have is that: can timeline play animation as object goes?
What i mean is that i have a camera with timeline. If camera is 90 degrees, the timeline animation should be on 90th frame or second
Is this even possible
I heard something about โ€œtime setโ€ but iโ€™m not sure

tight schooner
#

I think that's possible. I'm not in front of the computer so I can't say how to do it.

#

It should be possible to play the timeline at any starting point.

slender sage
#

Should i cast camera rotation to float?

#

And put it in the time set or something

tight schooner
#

I suspect you'd have to do some math. Timelines work with seconds rather than frames.

slender sage
#

Then i..guess i should make the timeline 180 seconds?

tight schooner
#

That seems like a very long time. It's possible to set the timeline's playback rate if you want to go that route though.

#

I know very little about your project, so I can only speak generally.

slender sage
#

I can show

tight schooner
#

I would suggest simply trying stuff. Get it working first. Over time, you will discover cleaner ways to do it.

slender sage
#

Well

#

Iโ€™m going to show anyway

tight schooner
#

How many seconds long is your timeline?

slender sage
#

...1

tight schooner
#

I should know this, but I always forget. Rotators range from +180 to -180 right?

slender sage
#

yeah

tight schooner
#

Your script might be feeding the timeline's "New time" with a very large number. For example, 90.

#

It's telling the timeline to start at 90 seconds, but the timeline is 1 second long

#

You need to do some math on the rotator's values so that it can produce a number in between 0 and 1.

slender sage
#

ok

#

btw

#

i can't press anything

tight schooner
#

It's a glitch. Restart the editor or something.

#

(I wonder if that's even in the UE issue tracker, lol.)

slender sage
#

holy jesus

#

it worked

#

it actually worked

#

thank you so much man

#

you are a true savior

#

now i have to figure it out with negative degrees

tight schooner
#

"abs" (or "absolute"?) node will remove the negative sign from negative numbers, if that helps.

slender sage
#

no, i have to make a timeline for negative numbers

#

those were positive

tight schooner
#

oic

slender sage
#

lol, is it possible to make in timeline -90seconds

barren rain
#

So I've been following CodelikeMe on youtube, with his climbing system. But I've run into a problem and can't seem to find a fix for it.

I have a Enum, where i have a couple of movementstates that my character can go into, but I just get stuck in my idle hanging animation. I think I've narrow it down to either there's a error in the animBP locomotion or in the way I'm handling my Jump. I would love some fresh eyes on it since I've been fighting it these past weeks.

verbal bolt
#

is there some kind of shortcut method of inserting a new node into an existing flow?

#

to brake an existing flow with a new node, to paraphrase that

sullen radish
#

hello guys, how can i make an integer that has values of thousands... for example (1200) to be have decimal rounding link (1.2k)

#

and (2000) to be (2.0k) ... knowing that it's a slider so the UI for the value is dynamic and always updating

#

doing the simple integer-integer will not work in this case i guess, coz it gonna update the slider value.

#

so what's the best way to do it?

severe rune
#

You can use the to text node to format an integer as text, there's an option there if you expand it to include a thousands seperator

sullen radish
#

@severe rune Thanks a lot, that really did the trick

sick sapphire
#

how do I round a float so that its still a decimal and not completely an integer
for example 2.8734 to 2.87

sullen radish
#

@sick sapphire I've just asked this question, and @severe rune actually gave me the exact answer, >> use the "To Text Node" and expand it to modify the rounding options and criteria you like

sick sapphire
#

@sullen radish wow, i never noticed there was a dropdown!
thanks, that worked!

sullen radish
#

@sick sapphire you're welcome, actually @severe rune is the one who helped me figure it out first ๐Ÿ˜„

tribal umbra
#

@sullen radish still not quite sure how 'ToText' is going to help you convert to using 'k' as an abbreviation? Would love to see your results

sullen radish
#

@tribal umbra actually i've made some few work on it, and i will post you the blueprint as a screenshot, i'm not sure is it gonna be helpful but here it is

#

it's a simple set text in the UMG and i've added some text values as variables containing "Million KM" and "Billion KM" .. that's why i've divided the float by 1000

#

the slider current value i mean (Integer) That i've converted into float.

#

simply by checking if the text contains Million .. it takes the number and divide by 1000 then by using the "To text" node i was able to make the decimal rounds properly by controlling how decimal rounds i want to display,, and then set the text to "Billion" if if the value of the current slider more than or equal 1000

#

also by implementing the Format Text node, i was able to get the different values separated from each other and alter each one individually .

#

@tribal umbra Hope that helped.

tribal umbra
#

Thanks for sharing!

#

Im wondering if you could use a select with the different text suffix and select based on the length of the integer, maybe thats over complicating it though

sullen radish
#

yeah maybe you're right i guess i have to try that too. Thanks

short coral
#

How do you manage having 100 AIs all running at once , just walking around , what would be the best way to handle that many of them in the least performance cost way possible?

fickle nebula
#

Interesting question, I also want to know it

odd ember
#

@short coral turn them over to a minimum activity BT at certain distance

#

there's no simple answer really

#

but the fact is you don't want 100 AI active at the same time

#

unless you want your PC to send smoke signals

short coral
#

So turn off their behavior tree?

#

But if that's the case won't they still be rendered regardless?

#

I have thought of pooling as well but pooling can only do so much

odd ember
#

sure they'll be rendered

#

you gotta find out smart ways to make them work

#

you probably still want them to perform tasks, just very low key

#

optimizing at that level requires cpp access really

#

you're not going to do it effectively in BP

#

mathwise estimations running on an off thread custom BT might work

#

swap in for normal BT when relevant for players

short coral
#

So cpp is more or less necessary for all of this

#

Damn :/

odd ember
#

yea AI is a huge performance hog

short coral
#

I tried a pooling system where it would put the AIs into place depending on distance but even then

odd ember
#

you did pooling in BP?

shut estuary
#

Using in a BP AddHierarchicalInstancedStaticMeshComponent on an actor during runtime. When selecting that actor in the world outliner the added components do not show up in the details panel, but the meshes definitely exist in the world. Is this expected behavior?

odd ember
#

I'd say check the documentation

#

it should tell you

teal spade
#

does anyone know, why I keep getting different calculation results, with static forms? eg., I've three nums, in array, and I'm looking for their average. Sometimes I get the correct amount, sometimes I don't. It's totally random, as far as I can tell. Any ideas?

slender sage
#

how can i make a timeline for negative numbers? with new time set help!

odd ember
#

@teal spade debug it. use breakpoints. look up breakpoints in the documention.

teal spade
#

@odd ember been sort of doing that for a while, by listening to those three variables

#

and other parts of the graph

odd ember
#

have you used breakpoints though?

teal spade
#

I just, but it tells me nothing. it hangs up on a branch

#

then resumes

#

thought that even if I were to manually set (A+B+C)/3 gives a different results sometimes

#

the variables come from traces. sometimes they magically don't hit anything (most of them), thought that might've been the problem as well, but...

odd ember
#

have you set a breakpoint on your average function?

teal spade
#

can only watch that function, can't breakpoint it

odd ember
#

you can if you scope to it

teal spade
#

not sure what you mean by that

odd ember
#

double click it

#

but a break point on the return node

teal spade
#

nah, can't open it, don't have visual studio ๐Ÿ™‚

odd ember
#

then I suggest you make your own avg function

teal spade
#

did that with simple math, but that changes as well

slender sage
#

never mind i figured it out

teal spade
#

btw, is there a limit on line traces?

#

as these variables come from them

#

as far as I know there isn't, unless it tanks your resources

#

however, they're hit&miss with thin static meshes

odd ember
#

no limit

#

well

#

performance is your hard limit

#

but you'd need upwards of 20 traces in BP alone to even feel that

#

several hundred in cpp

#

per frame that is

teal spade
#

'cos I'm working on a climbing system, and if I move my pawn near a thick wall, all traces fire, all the time. But, when I approach a more narrower, it becomes a Russian roulette. Mind you the wall is about 20-30 units thick (guessing)

#

I see

odd ember
#

3 traces is like spitting in a bucket

teal spade
#

even if lined up? they worked perfectly thus far, until they see this:

odd ember
#

what, exactly, do they see

#

I can't see the traces there

teal spade
#

its infront of pawn

#

facing forwards, to detect walls

#

but if I move to that one (on pic), the go haywire. But if I approach a much thicker block, everything seems to be fine

faint pasture
#

Show where you are starting and ending the trace

#

Also draw debug

#

You should be tracing from capsule location to capsule location + 100 x capsule forward vector

short coral
#

What about the best approach to populating a city? Is it the same kind of dilemma ?

faint pasture
#

@short coral That will depend on your scale and how persistent the AI needs to be.

short coral
#

I would just like AI that would walk around pavements and such

#

To show up only in a specific distance

teal spade
#

@faint pasture you say I should ditch the line trace?

faint pasture
#

@teal spade No, show how you calculate the trace start and end

#

@short coral How many AI at a time are you thinking?

short coral
#

Say a maximum of 30

#

Or 40 tops

faint pasture
#

That should work just fine with AI controllers.

teal spade
#

@faint pasture simple Arrow component > Get world location (Start); Arrow Comp. > forward vector + start location = end

#

plus some change for the difference, mine is set at x130

faint pasture
#

Draw debug for a frame and make sure it seems right.

#

Make sure it's ignoring the player mesh too.

teal spade
#

strangely enough, now I scaled down another wall, and it seems to work

#

they're both simple meshes

#

dunno why it works with only one

#

wait

faint pasture
#

In my experience a line trace isn't gonna bug out, it's either the collision setup or geometry being messed up.

short coral
#

OK , lemme just explain my setup of this whole thing so maybe you can suggest something to help , what i have right now is a function that ticks every second which checks if a player is within distance of a point , if true it will spawn Ai to just walk , if he's far from it , it will destroy the AIs if necessary.

odd ember
#

probably collision set up incorrectly

#

use overlap events

teal spade
#

I just checked, again after you said, that the smaller wall didn't have the *Generate overlap" set

odd ember
#

like doing stuff on tick is going to cost you more, not less lmao

short coral
#

But dont overlap events tick every second anyways? to check if it is being overlapped with an actor?

odd ember
#

@teal spade traces use Hit events, not overlap

faint pasture
#

Line trace on tick is practically free. I run several hundred a frame in 0.8ms

odd ember
#

@short coral well no not really, and it's cheaper anyhow because it's all done mathwise

#

BP are always going to be more expensive than cpp optimizations

short coral
#

That's unfortunately so true\

odd ember
#

so why are you doing stuff on tick

#

in BP

#

if you want to optimize

#

like you can get away with not using tick in 95% of cases

teal spade
#

it kinda works, but still doesn't register all forward facing traces, only one

#

this drives me nuts! ๐Ÿ˜›

odd ember
#

can you take a screenshot

faint pasture
#

@teal spade show a screenshot with the trace debug

#

Also show the trace and the collision setup of the wall

teal spade
#

(mind the jumping, its offset)

#

as you see, because only one trace fired

#

so as only one trace registered, the average of the three vectors are messed up

odd ember
#

that looks like the traces are too far

teal spade
#

yeah, because if I get too close, it fires the actor; didn't tick that off, because that's irrelevant (its now set to Tick, not manual input)

faint pasture
#

Show a screenshot with it screwing up.

#

And why do you have 3 traces? Just trace once out of center of capsule.