#blueprint

402296 messages · Page 620 of 403

trim matrix
#

everyday Im asking my self more and more that why not c++ 😄

tired cypress
#

Or your GameInstance because you can just Get Game Instance 🙂

proud hull
#

Or put in GameMode, GameState, GameInstance, PlayerController, PlayerState, etc.

#

HUD even

trim matrix
#

i think i will do good old game mode, game instance saved for saving stuff

#

get game mode

proud hull
#

UMG based, you can use HUD as a middleman

tired cypress
#

You will need to set the right collision channel for the ghosts

#

You may even need to make one where they ignore each other's channel

fossil osprey
#

@tired cypress well i did that for the capsule collision on all of them, and are set to object type "enemy" and "ignore enemy", but they bump into each other. If i set the object type enemy and ignore enemy to static mesh and mesh(inherited) its same issue

tired cypress
#

So you made a custom collision channel called Enemy?

fossil osprey
#

yes, and friend too

tired cypress
#

Since default response is Block, you will need to set the Collision to Custom and then be sure that Enemy is ignored. I would do this for the capsule and the mesh

fossil osprey
#

mesh (inherited) or static mesh?

proud hull
#

All the above

snow halo
#

@proud hull welp, beyond my wildest expectations, I might have nailed it on the first shot:

#

Seems I can now select the "downloaded" datatable with a widget combo box np

#

but still testing. I would be floored if it doesn't break somewhere in my testing

tired cypress
fossil osprey
trim matrix
#

guys.. I just casted to level bp from umg. 🙂

#

thanks!

#

Did it quite differently but yeah, there is Level event possibility if you right click on it and then just delegate the wanted thing there and cast or get actors from umg 🙂

uneven crag
#

Does anyone know how to handle flying enemy pathfinding over pits using a navmesh? For example I have a flying enemy that I want to be able to fly over a pit to take the shortest route (I'm using EQS to determine its target/path), but I just can't seem to wrap my head around how they would not follow the ground and just fly over any gaps in the landscape

#

I also have regular enemies that walk on land so they would have to go around the pit

tired cypress
#

If you have other meshes...just set them all the same

#

That SHOULD work

fossil osprey
#

yup it worked i will mess around with it thanks!

tired cypress
#

Awesome! It's looking great

hollow panther
#

Hey does anyone know if there is a way to call a parent's parent event?

uneven crag
#

if it's a parent bp then it's available to all its children

#

just call it normally

rough jay
#

can you replace a timeline with set timer by event

uneven crag
# rough jay can you replace a timeline with set timer by event

they're twodifferent things, though what's commonis they have a timing mechanism. Can probably solve a lot of things with either, but there's usually a more appropriate one. Timelines are better for when you need to do something at each tick throughout the timeline based on a value that is set throughout the timeline. Timer by Event is better if you only need the event to happen every X seconds with no value being set by the timeline

rough jay
#

what abt lerping in speed can set timer do that

uneven crag
#

if you're doing a lerp you probably want a timeline

#

but depends what you're doing

rough jay
#

im just lerping actor 1 to actor 2

#

ok i got it to work just lower the time to make it slower

hollow panther
# uneven crag if it's a parent bp then it's available to all its children

So the issue is that I have a blueprint "Collectable_Object" and I have a "Laptop" which i want to be a child of "Collectable_Object" but I also have a "Terminal" and I want the laptop to inherit events from both the Collectable and the Terminal, so I made the terminal a child of the Collectable and made the laptop a child of the Terminal, but i need to call an event in Collectable which i overrode in Terminal. In short I'm confused 😦

uneven crag
#

that way from Laptop you can call your event from the Collectable_Object class, and then that new event from Terminal

hollow panther
trim matrix
#

Anyone know how I can get my pawn to change when I overlap a trigger box?

#

thats what I have but its not working of course, I know I need something in the target pin but idk

uneven crag
#

need a controller

#

player controller

trim matrix
#

how should I get it? Im pretty new at this so sorry if its a dumb question lol

#

I am using the starter stuff so Im guessing I have that stuff needed just need to get these nodes set up right

uneven crag
#

Get Player Controller

trim matrix
#

okay got it

#

where should I connect it up to?

#

Oh I got it (sort of like still super broken) working, when I overlap it my controls now move the other pawn but sadly the camera doesnt move over to that one so idk what that is about

undone quiver
#

If I assign the same AIController to two actors is it still a single instance?

#

Sorry, two characters I mean.

#

To be more clear... I have setup an AI Controller. I'm not using behavior trees. Instead, I'm just doing simple behavior in the controller. I have character wonder code in there. It works perfectly for a single character, but when I spawn in more than one, they appear to be sharing the location vector I use for a wander target. The vector is a variable in the AIController, so it looks like the controller is a single instance and not one instance per character.

gentle urchin
#

I'd think itd multiple instances (dont think a single controller could possess two pawns) but they share the value if the variable is the same in both controllers (default values). Having the value in the actual pawn instead could be beneficial, and just exposing it there

#

Then the controller would just get pawn and cast to that specific blueprint, accessing its variables.

#

Variables then probably being instance editable ane adjusted to your needs :)

left niche
#

Is there a way to make a destructible mesh from a static mesh in-game? I want to use something like a freeze attack and move it around with a grabber

fast orchid
#

my gui isn't opening for some reason. I have tried everything but it never goes onto the viewport, here is the code

#

and the gui is some text and 2 progress bars

mellow folio
#

The problem is almost definitely your level open node. The level is the context within which everything happens in unreal. You can’t open the widget, while opening a new level and expect it to still be there

#

Try it without the level open node

fast orchid
#

that fixed it

#

but how can I make this work then

#

because I need it to open this level somehow

mellow folio
#

The code to open the widget needs to occur sometime after the level has loaded. The level itself could load up that widget. For a more sophisticated approach, you could save the widget on the game instance to be triggered by the loading level

#

Try to understand that Whatever object this code on is is getting destroyed because the level is changing

fast orchid
#

I fixed it now

#

but how do I change values of that gui if it is in the level bp?

mellow folio
#

Level widget is not a good place to create widgets. You should have the player controller create the widget on begin play. If the widget is map specific, have the levelbp call the event on the controller to create the widget. Either way, player controller is preferred place to create widget and store reference

maiden wadi
#

The AHUD class is also a good place for that. Very easy to reach globally via GetPlayerController0->GetHUD, and it can help keep your controller cleaner for gameplay stuff.

short pawn
#

hey does anyone know how to make widgets reflect in reflective materials?

little cosmos
#

For saving r.raytracing commands, do I need to put them in the DefaultEngine.ini file?

olive sedge
#

I need to know something about a class before I spawn an object of it (the height of the capsule). Can I set or get this static somewhere?

maiden wadi
#

@olive sedge Not without making it a class variable you can get via GetClassDefaults. Otherwise the only way to get that in blueprint is to spawn an instance, get it and then destroy it.

olive sedge
#

@maiden wadi so a static variable in C++ that I expose to BP and then in BP GetClassDefaults?

maiden wadi
#

Should work. Alternatively... let me check something really quick.

olive sedge
#

ok.. that should be easy. I have a C++ base class on this anyway. But yea.. I'll hold

primal smelt
#

I'm trying to do a line trace that gets the me the material of what it hits. Problem is, it gives me the material instance rather than the material the instance was created from. I'm working on a vehicle and the material instances allow me to adjust friction depending on the surface, however I also want there to be a check for the "parent" material so all material instances belonging to this count as "drivable". Walls for example will have material instances belonging to a different "parent" material and so will be ignored by any attemptsa to accelerate (if the vehicle is up against the wall on it's side for example).

Could somebody please give me some tips on how I would get that "parent" material?

maiden wadi
#

@olive sedge Wanted to double check if it was possible, but since you're working with C++ as well, you could also get the class's Default Object and get the capsule height from that. At least it seems to work with a default ACharacter using this syntax.

    ACharacter* MyDefaultCharacter = Cast<ACharacter>(ACharacter::StaticClass()->GetDefaultObject());
    float CapsuleHalfHeight = MyDefaultCharacter->GetCapsuleComponent()->GetScaledCapsuleHalfHeight();
    UKismetSystemLibrary::PrintString(this, FString::SanitizeFloat(CapsuleHalfHeight));
olive sedge
#

@maiden wadi thanks man!

maiden wadi
#

@primal smelt I'm not for certain on that one. Does calling GetBaseMaterial from the retrun value of GetMaterial work for that?

primal smelt
loud marsh
#

Hi!

Anyone can help me out a tiny bit? I have a database that I am getting values from. However there is a slight issue that I have encountered. So the database has string columns for different area values. So 14.5 squaremeters is actually 14,5 in the database.

The problem is that we cannot just re-write these to correct format in the Database, because they have systems and sites working with these formats. Since they are kept as STRING, when I get them from the database, and do a String To Float, the value becomes clamped.

Eg. 14,5 becomes 14.

To work around this issue, I have created a macro, that takes the string, splits by the "," delimiter, takes the left side, then checks the right side, then adds the two together. This works perfectly fine, HOWEVER there is one BIIIIIG issue, that's runing everything.

I've made my code in a way that if a field in the database is empty, then remove that in my app completely. However it seems like that due to my macro, there are no "empty" values, as if there was a previous one, that was valid, it gets stuck and carried over to the next loop iteration, putting these wrong values in the next blueprint, when in reality they are empty, and should be removed completely.

#

Here is an image to the macro itself. It's kept in a macro library

#

Tried Floor, Truncate, Round, all does the same

haughty bone
#

Hello, I dont know what I'm doing wrong,but it seems like I cant change a structure's variable. As I'm making a inventory system I wanted a drop system. In the structure variable, I have a integer that is for quantity which I want to decrease by one when an item is dropped. But it simply will not decrease. Am I doing something wrong? Here is a video showing the code and the issue. https://youtu.be/et6fm9nntoQ

loud marsh
#

Here is the part that removes the element from the map if the float value is empty, however any previous valid value gets stuck in the macro and carried over so nothing is actually removed.

weary jackal
#

Where you are checking float == 0. Is it returning true? Cuz even a fraction differs than it's not equal. And if it's the issue then try 'nearly equals to' rather than ==

maiden wadi
#

@haughty bone It's likely that you're trying to set a copy by ref.

loud marsh
#

@weary jackal No it's returning false.

I'm getting 160 rows of data from the DB. And for example:

1st row FIELD1 FIELD2 and FIELD3 contains: 15,5 - 16,5 - 17,5

2nd row FIELD1 FIELD2 and FIELD3 contains 14,5 - 0 - 0

But when I use the macro to convert the string to float, the first rows values (where it would be empty) gets carried over, so second row ends up like this:

FIELD1 FIELD2 and FIELD3 containts 14,5 - 16,5 - 17,5

I will try and make a pure function instead of a macro and we will see how that goes

inland merlin
#

your string have comma where String to Float expect "dot" (not sure of the english word aha)

loud marsh
#

@inland merlin Can you please elaborate? Also @weary jackal Using a Pure Function instead of the macro works perfectly fine (same code in both)

#

@inland merlin Aaah I see, tbh I don't fancy BPs that much and barely use any string operations. If it were for me I'd have set up the DB correctly from the start

#

But yeah your replace solution is 100% better than my math method 😄

inland merlin
#

And it will keep working if you ever replace the data from your DB

loud marsh
#

tbh, looking at the web code and the competency of the web dev company who made this shiat that they dare to call code and db, I highly doubt anyone will ever touch it

inland merlin
#

Do you ever clear your map?

loud marsh
#

Each BP that holds the data in the end, has an empty map that just has the types set correctly: String - Float (Key - Value)

inland merlin
loud marsh
#

When I get the DB data, I use the MakeMap node to create a brand new map in place

#

Then I set the given BP-s map to this MakeMap

inland merlin
solemn parcel
#

Hi, can someone help me to find a way, to avoid the 'stagger' from the Pawn, when a Projectile with physics enabled enters in collision with a Pawn, even tho, on Event Hit, that projectile is Destroy Actor ?

last abyss
#

use overlap instead

solemn parcel
#

Yeah, the thing is, overlap gets the thing too complicated for the use I want for it. Especially the fact that I need the Hit Impact Point, that overlap cannot give me

#

There isn't a simple way to avoid this 'stagger' thing ?

inland merlin
#

Seems a bit hacky but you could have a second capsule in your character that collide only with projectile, this way hit won't push your character

solemn parcel
#

That could be an idea. Or a sphere trace on impact to get the end point as hit location, as Overlap. What would be the most performance efficient ?

maiden wadi
#

Being a very low mass projectile, it shouldn't affect the pawn much if at all.

trim matrix
#

trying to make a window pop up with the clicked on actors stats

#

but im missing something lol

#

do i need a for each loop or something?

#

thats the cast sorry bout that

maiden wadi
#

Don't do it like that. You should just pass in information into the newly created widget before adding it to viewport rather than relying on bindings. The binding's logic is a bit off too.

trim matrix
#

ah okay

#

how do I do that?

worthy frost
#

thing is the NPC is the one showing that widget

#

so make a variable for your NPC on the widget

#

and make it expose on spawn

#

and just pass it in

maiden wadi
#

Simple example.

worthy frost
#

or use Expose on spawn and do it in Construct

#

either way

maiden wadi
#

True. Used to my own method of sending UObject pointers through more dynamic initialization events in widgets.

trim matrix
#

@maiden wadi thanks! whats the set text box tho?

maiden wadi
#

Just an example. That would set the text of a TextBlock inside of that widget.

trim matrix
#

@maiden wadi howd you do that tho?

#

i can only binf

#

bind

maiden wadi
#

Make the text block a variable and then do like I did in the bottom image.

trim matrix
#

ay it worked thanks 😄

worthy frost
#

@prisma stag there is an #gameplay-ai channel might be better there

red oyster
#

Ok, this may sound stupid, but how to create a 2D array?

#

Nvm, using maps for this.

opal sinew
#

Have this blueprint for crouching in multiplayer

trim matrix
#

hi, how can create Pulling back time mechanism?

opal sinew
#

This is the start and end crouching functions

#

For some reason things looks wierd

#

When I coruchon the server

#

clients can see it but server cannot

#

When a client crouches

#

Client can;t see it first time

#

But serverr does

#

Second time client crouches it works

#

Unsure on why

#

Help would be appreciated

maiden wadi
#

@opal sinew You should not replicate from your AnimBP. You should set variables in the Character that replicate, and that your AnimBP can pull from in it's update event.

opal sinew
#

I see, so character variables that have an update event

#

Which trigger the action in anim BP?

#

And in my srv events I only have the variable updates?

maiden wadi
#

The character should be what's replicating. That way your crouch only needs to be a button press event, and a server RPC with a boolean to tell the server if you want to crouch or not. Then server sets that replicated variable and all clients get updated and in the notify you can do stuff with it.

#

Alternatively. If you're using the base Character class, crouch and jump are already both replicated with client side events to call.

opal sinew
#

Ah I see thanks, I am using the base character class but had to change the crouch animations to work with guns

opal sinew
stray island
#

Od i want to trigger an event based on which of these two boleans is true

#

How is that

maiden wadi
#

Really depends. All it should be doing is setting and checking variables from it's pawnowner. You will not notice and performance gains until you have quite a few hundred instances of it. The heavy lifting is the animations themselves, but all of that is done on a separate thread.

opal sinew
#

So my understanding is:

  • Character BP has crouch bool
  • Crouch event calls srv notify (run on server)
  • Which calls multicast event
#

Where do I put the actual crouching function?

#

With the edit of moving coruch bol to character BP

#

My guess is crouch event and multicast?

high frost
#

I'm learning dialogue systems based on behaviour trees. What's the best practice for displaying player characters lines? I mean I display NPCs speech in a widget from BTTs but character speech is currently represented as option selection in another widget in a vertical box. But I would like to have multiple sequential player character speeches. The only thing I can think of here is using the same BTT for displaying dialogue line but I intuitively I find this not really good because I would have to write all main character phrases in my NPCs behaviour tree. Are there any other options for this?

paper trench
#

So I deleted my character parent by accident. Anyway to restore it? All my variables and functions are gone in ThirdpersonCharacter and AiCharacter

#

It auto saved after i did it and cant undo the delete

orchid garden
woven wing
#

(this is why we use version control systems)

maiden wadi
#

@paper trench Check your project's directory in ProjectDirectory\Saved\Backup

#

If you're lucky you have an older version of it.

stray island
#

Anyone can see my question ^ ?

last abyss
stray island
orchid garden
stray island
#

I want based on which of them is true

#

Yes i do that too but i think theres better workaround ?

#

Smth like switch on int

#

Or similar

#

Like how u do switch on enum

orchid garden
#

enum is basically just a switch on int

stray island
#

Can i apply switch on int on this some how

orchid garden
#

only real reason to do that is if you wanted to be able to fire both events otherwise its just abit of unnecessary coding.

stray island
#

I dont like how it will go through first branch then check if its false then fire the other , i want it to fire the other directly if its true

orchid garden
#

you could take the whole thing there in the image, turn it into a macro/function, then have the trues set a int value and return the int value so you could switch on int, last false setting int value of 0.

stray island
#

Ok thanks , i will try to understand and check how that would work

orchid garden
#

the third thing (for firing both events) would just be a branch check to see if both were true.

#

so then you'd have 0=nothing, 1=first true, 2=second true, 3=all true.

lusty escarp
orchid garden
#

check mouse position vs. center of screen, if position > < center falloff, increase movement in x / y direction.

#

stick the check in a timer, have button down trigger timer, button up invalidate timer.

mighty fable
#

When implementing console commands into my game how do I make them so they do not rely on being custom events?

orchid garden
#

c++?

earnest tangle
#

Yeah you need to use C++ for it

#

You can make them BlueprintImplementableEvents though, allowing you to do the implementation of it in BP's, but it still needs the basic declaration in C++

tired saddle
#

I have a Blueprint class that is getting quite big, as in having many Components. This makes right-clicking in the Event Graph slow since it lists functions that can be called on all the Components as well. Is there a way to disable this, so that only functions and variables on the Blueprint class itself is shown?

solemn parcel
#

How can I get that Projectile, overlap walls ? I mean i've tried to get the wall in all collision setups possible, it just passes through.

inland merlin
solemn parcel
#

@inland merlin Just tried it again, didn't worked

inland merlin
#

also enable GenerateOverlap event

solemn parcel
#

For the sake of showing, i've enabled everything as overlapping

#

Simulate physics isn't enabled to let the ProjectileMovement component active

#

ohhh

#

Nevermind, it was about the target non valid

faint pasture
#

What should hold the world data about who's on what team etc, Gamestate?

white field
#

thanks @tight schooner 🙂

faint pasture
#

Say I want to Get all characters on team Blue, I'd save an array BlueTeamCharactersArray in Gamestate right?

onyx violet
# faint pasture Say I want to Get all characters on team Blue, I'd save an array BlueTeamCharact...

yes that's what I do. What I do personally is have an array of the player controller class I use that updates anytime someone joins or leaves the server (i.e. event on login and event on log out) Then in my player controller class, I have a reference to the Character class the controller is using. So when a player joins a team or leave one, I call an custom event on gamestate class that clears the team arrays, then for each loops the player controller array, get the character class reference, gets the team variable on the character then adds to team 1 or team 2 character array

pulsar lion
#

oh they actually fixed DoesImplementInterface

crimson saffron
#

Any good resources to learn BP?

mortal isle
#

how can I change value of the pp material using bps?

tired cypress
tired cypress
last abyss
#

alex the pp material

tired cypress
#

post process I assume

tired cypress
#

He has a ton of topics he has done

mortal isle
tired cypress
#

Unfortunately @mortal isle I'm not sure offhand.

mortal isle
#

Ok

#

THanks anyways

nimble cedar
#

So I'm trying to draw text from blueprints in UMG. Is the correct way to position things is to get the Viewport Size divided by Viewport Scale to get screen height/width then position from there?

#

or is there a way to get the x/y position of a Canvas panel? (I haven't been able to figure out how)

pine trellis
#

is it possible to add more flips to my flop?

fervent tree
#

Anyone know what the new version of the "Render Movie" node is in 4.26. It would usually work off "construct Automated level sequence capture" but is no longer an option?

winged sentinel
#

Hi everyone one, currently Im making a 4 player coop game mode, do you suggest I make teams for the AI vs the 4 playeres?

brazen dagger
#

So does the "Print string" node play to all clients (when testing the game locally with multiple clients on the same machine), regardless of where the code is playing?

#

feel like I have been banging my head on the wall trying to work out why code (print string) was playing on all my clients

#

when I can get other things to work correctley

#

🤦‍♂️

stable dove
#

Is there a way to split this vector3 into xyz the route is coming from an input node in a macro

sterile helm
#

what component do I need if I want to check if there's something directly underneath?

unique harness
unique harness
unique harness
unique harness
# pine trellis

You probably would want to just use an enumeration (enum) here

unique harness
nimble cedar
#

specifically the On Paint function

unique harness
#

Sounds like you're over complicating things. can you post a screenshot?

nimble cedar
unique harness
#

should also move this conversation to UMG

sudden zephyr
#

I got a probably very edge case question.
I'm trying to make a procedural aim offset, the problem I'm currently have is rotating the spine_01 upwards or downwards. Problem is, I need to rotate it while it has it's "offset", rather then it's own orientation. Any ideas how to achieve this?

nimble cedar
#

so I can't just type in the text

vapid ibex
#

Is it possible to make an actor to be a consistent size in the viewport? I need to create floating speech bubbles for characters. Characters can be in front of each other so their bubbles should occlude each other accordingly Optionally it would be great if they could never be occluded by static geometry. Is it possible?

unique harness
sudden zephyr
#

In hopes to clarify the issue. I'm aiming downwards and the character is bending over, the problem is, it should not bend straight down but actually bend down and lean a bit. If that makes any sense. You know how when you hold a rifle your spine is rotated slightly clockwise. If you would aim down, you'd not aim straight as your spine is facing but at an offset. If that makes any sense whatsoever. xD

sudden zephyr
unique harness
#

so what isn't working ?

sudden zephyr
#

I want to rotate it aligned to direction of the character regardless of spine direction itself.
😅

#

Lemme try to manually rotate it in hopes it can show what I'm after.

regal crag
#

Hey guys so is it possible to work on my character animation while having my character in my boat mesh so i can see where the walls are and stuff?

unique harness
broken garden
#

hi all, I have an issue that I've been banging my head for a couple of days now. I import a skeletal mesh with animation. It's a fish moving around (made in XSI and cleaned in C4D). Basically, I want to hit the mesh and place a UI element in overlay. When I do so, everything works and I get a reference to the actor, but the position return is based on the 0,0,0 of the whole animation. Can I add an actor to my moving mesh?

sudden zephyr
unique harness
sudden zephyr
#

Left is simply rotating one of the axis. Right is manually approximate how it's mean to rotate, it requires 2 axis rotation.

unique harness
short bramble
#

hello! is there any way to init default values in a Behaivour Tree, or should be all set in beginplay?

tardy kayak
brazen dagger
#

@tardy kayak look up dynamic material instances

tired cypress
tired cypress
#

Then return the location of that component

quartz kestrel
#

Hello! I find once I possess character A, and then possess another character B to trigger a elevator to take character A to higher place, the character A will be still there, not moving up as the elevator goes up.
Anyone knows why?

#

If I don't possess character A at the beginning, the elevator will work well.

#

Seems like once a character has been possessed, something changed. But I don't know what it is.

#

I put an unpossessed character to compare. It really is the problem.

#

Also, when I repossess character A from character B, it will suddenly move on to the elevator.

tired cypress
#

Maybe possession is somehow changing the collision?

quartz kestrel
#

I eject to check the character and comparison one. Collisions are the same...

#

Is there a place like an array to store the controller possession history? I want to clear that.

#

Also tried unpossess the old one first then possess new one.

#

In the elevator BP, I use "set relative location" to realize elevation. Is that right?

sudden zephyr
#

Try that on the capsule component, maybe that will work, or it needs some dormant AI. I assume it's the way the character BP (character movement component or some of them) that do some fuzzy stuff if no player or AI attached? (turning off physics and perhaps making it a static object or some such)

green eagle
#

Realized this might be a better question for this channel...

"Making a checkers board style game just for fun.

Is there any particular trick/bp/node that anyone knows of to set points? Like each square has a point, player can move piece to adjacent points if point is not occupied by their own piece check if its empty if empty it can go there, if not it does further checks to see if it can take the other players peice.

Any case.
Trying to think of an easy tool or way to have set points on the board? If that makes any sense.. any and all ideas are appreciated 😉""

quartz kestrel
#

I tried turn on "Simulate Physics" when unpossess, but the character capsule is easy to flip aside.

sudden zephyr
#

There should be some (keep upright or keep on Z) unless i'm mistaken.

#

Meanwhile, anyone know if you can get bone transforms from attached child actors? I'm really struggling with this one. xD

quartz kestrel
#

Dormant AI might be a solution.

sudden zephyr
#

You could however also actually move the dormant pawn with the platform as well with a trigger box that detects any non-controlled characters and moves them up too.

#

That way you can make the other character "static" as in so that the other "controlled" character can't push it around by mistake. Unless pushing non-controlled characters should actually be a feature.

quartz kestrel
#

I'm trying physics + locking Z.

real tree
#

Hello. I need help figuring out something. I'm trying to get it so every element in an array except for the one selected through the select node is affected by the for loop. How would I go about doing that?

trim matrix
#

For each element != (selected one) continue..

sudden zephyr
#

I'd assume... ¯_(ツ)_/¯

trim matrix
#

Thats correct 👌

real tree
#

Seems to work like a charm! Thanks!

unique harness
#

for a cleaner implementation

trim matrix
real tree
#

It's now cleaner

#

Although in my hovered boolean, I had to add a NOT boolean to it to flip the value

unique harness
steep hazel
#

This definitely is skyrocketing my vision into the skybox, and I am aware of why. Any suggestions for making the crouch a smooth movement rather than an instant one?

real tree
unique harness
#

nice

trim matrix
steep hazel
#

It's literally a fresh first person template, so no

unique harness
#

so your timeline would just be a horizontal line

steep hazel
#

I'll go ahead and play around with that

unique harness
#

@steep hazel

spark steppe
#

does the standard camera actor have some kind of tracking where it keeps focus on an object? (and rotates to the object)

unique harness
steep hazel
#

Well, I don't know what to do. I have the crouch going up and down, but not the playercamera/arms are lower than where they are when spawned in for the first time. How do I get it to be consistent in that it returns to the starting point?

unique harness
#

you probably want to set it up a bit differently

steep hazel
#

I feel like I should just go the animation route

#

yeah

spark steppe
daring turret
#

Hey, I’m new here. Also I’m having an issue with my blueprint code. Would anyone be able to help me figure out where I went wrong?

spark steppe
#

well, just ask?!

daring turret
#

I did ask.

spark steppe
#

that wasn't really specific

daring turret
#

Basically I’m trying to make a block move in 2 directions endlessly as long as the chunks are loaded. In the future I’ll change it so they all generate at once and it’s limited amount of chunks. It’s a 2d game with basic Minecraft like mechanics and it’ll have a story and such

#

The issue is the code isn’t completely working in regards to making the blocks generate

spark steppe
#

you would have to show some screenshots of your BP where you generate the stuff

#

otherwise it's hard to tell what is wrong

daring turret
#

I can. Where shall I send them

#

I understand

spark steppe
#

just in this channel

daring turret
#

Okay. It’s lot of screenshots. I already took them

#

That’s all of them

#

If you need to see what’s in the variables I’m using I can send those too

spark steppe
#

hard to read half of them so much zoomed out

daring turret
#

My bad. I can zoom in on them

spark steppe
#

does it work for some chunks or doesn't any chunk at all generate?

daring turret
#

No chunk generates. Just a single block

spark steppe
#

what is MainC1? is it the chunk actor or the player actor??

daring turret
#

Player actor. The chunk actor is procedural. It just contains the block. I’m trying to make it so when the player moves chunks generate

spark steppe
#

spawn chunk at is always called with 0, 0

#

should be the current for loop values

daring turret
#

Thanks it works now! Only issue is that the blocks are too separated. But I know how to fix that part. I appreciate your help. 😊

flat raft
#

What's the best way to animate a lerp node inside a function ?

#

wait... does a timeline work inside a function ?

daring turret
spark steppe
flat raft
#

Booo

#

I don't like using a custom even that is called from outside just to tick. 😔

#

anything internal?

spark steppe
#

probably all depends on your actual use case

flat raft
#

Ohh yes... I forgot set timer

#

thx!

#

it's so my AI can lerp into transitions rather than snap

kindred crow
#

is it possible to rig the new free stylized characters in als v4?

opal creek
#

is there something incorrect with my blueprint because the player camera rotates for no reason

#

im not even touching the mouse it just rotates

rough jay
#

i think its because even if mouse X was 0 which is not moving it adds +1 right???

opal creek
#

ok so i fixed it but now up and down are inverted

#

nah setting it to zero works

fast orchid
#

I have a session system and I want to display all the current servers being hosted. how can I put all of the sessions into buttons which can be clicked and the user will join that server

#

or how can I add a button for each result?

fast orchid
#

yes

trim matrix
#

Well first you want to get all the sessions available to join and store them in a variable

#

from there I mean there's like multiple ways you could send that information to the UI Widget responsible for joining sessions

#

The easiest way would be to create a button in the widget first, and then from there have that button cast...

#

Cast to whatever blueprint is storing the session variable

#

... Let me show you an example hang on

#

This is what I mean, all I did was create a button... I then casted to mygameinstance which is where my sessions are stored, and then I called the appropriate event

#

@fast orchid

#

does that make sense

fast orchid
#

no not really

trim matrix
#

which part

fast orchid
#

all I wanted to know was how to make a ui list. think like csgo custom server list

#

just a button for each server

trim matrix
#

You just want to know how to make the list only? Like no code

#

just list

fast orchid
#

there is code

#

foreach server inside (server array reference)
make a button going horizontally
and if you click the button: join server

#

now that in bp

trim matrix
#

right.. That's what I'm trying to tell you

#

You need a widget for that... And then after you create the widget, you have to add code to the widget aswell

#

it's as simple as you seem to think it is

fast orchid
#

I have a widge

#

t

trim matrix
#

screenshot it

#

I don't know where you're at

fast orchid
#

its just an empty widget with no code

trim matrix
#

okay

#

so on the top left there's something called a pallete

#

Drag and drop button off

fast orchid
#

I know how to make widgets

#

just the code part

trim matrix
#

....

#

you are killing me dude

fast orchid
#

damn sorry

trim matrix
#

so click on the button

#

scroll all the way down in the details panel

#

and you'll see "Events"

#

From there click on on the "+" icon next to it, and it will take you to the beginning of the code for that button

fast orchid
#

ok

#

done

trim matrix
#

now you should be in graph

fast orchid
#

I am

trim matrix
#

From here

#

there's a few things you can do...

#

For example, what I did was cast to my game instance

#

because that's where my logic is for joining games

#

I'm assuming your logic is also in a game instance

fast orchid
#

what like FirstPersonCharacter?

trim matrix
#

a blueprint, yes

fast orchid
#

in in the event graph for the widget how do I add buttons for each item inside of the sessions array?

trim matrix
#

man you're really confusing

fast orchid
#

this is what I have for the hosting and joining

wind tartan
#

You could stick ten buttons in a vertical box and then reveal / hide them based on the number of found sessions, otherwise you will have to create widgets dynamically

fast orchid
#

top for join and bottom for create

#

I want to create them dynamically

trim matrix
wind tartan
#

Thats what i meant

trim matrix
#

But explaining how to write code for that is not something I want to do lmao

#

that's a bit of work

#

if you don't know what you're doing anyway

wind tartan
#

I dont work with blueprints often so i cant show you step by step how to. Im sure there are tutorials on it

fast orchid
#

I can't find anything online

wind tartan
#

You just need to break down what you want into steps. Dynamic widgets for session joining is too specific of a question. Look up those things separetly then combine them

surreal peak
#

Usually you have a widget called ServerList and a Widget called ServerListEntry.
In the ServerList one you have a vertical box.
When the ServerList widgets calls Construct it empties the VBox, calls FindSessions and creates a ServerListEntry widget per result and adds it to the VBox. The ServerListEntry widget would have the button to click on and needs variables to show the name and save the SessionResult.
The button press then calls JoinSession.

#

And there are tutorials for this as it's an ages old topic.

#

You can probably also look into ue4s multiplayer cowboy example. That might have some widget examples for this

#

Code of that, given how bad the lobby tutorials are, is probably shite though

trim matrix
#

Dude that's such a good idea

#

I didn't even think of doing it that way

surreal peak
#

That is, at least in a very basic sense, the only way I would come up with

trim matrix
#

Only thing I'm confused on is how you would get the button to go to the correct session

#

I'm assuming you would use a get to pull one out of the array of sessions...

surreal peak
#

Well yeah

#

You loop over the sessions

#

And create a ServerListEntry per

trim matrix
#

ooooh

#

ha

surreal peak
#

And pass it the session struct

trim matrix
#

that's freaking dope

#

that's not what I had in mind at all

surreal peak
#

ServerListEntry needs a variable of that type set to InstanceEditable and expose on spawn so it shows up on the CreateWidget node

#

Inside of the ServerListEntry you can then call JoinSession with that variable

#

There is obviously more to do in the long run. Refresh button in the ServerList, disabling all entries when you click join, etc

#

But that's more UX than anything

trim matrix
#

Right

#

you're actually making me want to create it just to try it out

#

It seems so efficient

willow island
#

Does anyone know how to bake an array (because it goes back to zero when restarted) made with a forloop?

surreal peak
#

Bake an array?

#

That sounds like an artist throwing random terms at programmers haha

#

You want to save stuff between game restarts?

willow island
#

Sorry about that. I am generating a coordinate system to use in the game (so 256^2 = 65536, but I need a lot more, which takes time to generate, I mean loading), just trying to find a way to make it more streamlined.

surreal peak
#

Oh that suddenly sounds a lot more complex

#

Do you generate that everytime you start the game?

willow island
#

Yes.

#

Only once before the game starts.

#

I can do it by hand, but it's going to take forever.

surreal peak
#

And that is just some numbers stuff?

#

No logic or graphics involved?

willow island
#

Vector 2D with coordinates (0,0)

surreal peak
#

I mean you can save them to a savegame

#

Or at least try

#

Also questionable if you need the whole array at all times or just a way to math out the required coordinate

willow island
#

So save (as a placeholder, only for that purpose) and just load them?

surreal peak
#

Is it the same for all playthroughs or different per new game?

willow island
#

I think that can work.

#

Almost the same. Only need when the game starts.

surreal peak
#

So you can't generate it pre runtime and save it with the map?

willow island
#

Sorry, I didn't catch what you mean.

surreal peak
#

Well if that array is the same for every player and every game then there is no need to create it when you start the game

willow island
#

Oh, yes. I just want to populate the array.

surreal peak
#

Simplest and dirtiest idea would be placing a custom actor into your level

#

And let that generate the array in the construction script

#

That will then save with the map

#

You can use the GameMode or GameState BeginPlay to grab that actor via GetAllActorsOfClass as long as it only exists once.

#

But dirty solution. There are prettier ones

#

Then you have access to the precreated array

willow island
#

@surreal peak Just ran a test and working. I really appreciate your help!

fiery crest
#

Hi there, Does anyone know how to have it so that the Characters slow down gradually so that their animation slows down as they come to a halt rather than an immediate stop?

maiden wadi
#

@fiery crest Try to change the braking speeds in the CMC.

vernal wind
#

Is there a shortcut to edit a nodes comment bubble (not box comments)? I know it's possible through right clicking the node or hover-clicking the bubble but it sucks to always have to click. So far neither UE docs nor aunt Google had any helpful hints, so I assume this shortcut/hotkey is simply not implemented?

fiery crest
#

@maiden wadi I played with those settings a little but the walking animation still snaps back to the idle animation

maiden wadi
#

@fiery crest Depends on your anim blueprint then. You have to set it up via velocity of the character and a blendspace so that it blends between idle and moving based on the speed they're moving.

fiery crest
#

I have all that setup which is why it's confusing me as to it not working

maiden wadi
#

@muted comet Got side tracked and am putting this in the Blueprint channel instead, but I'd strongly recommend learning ENUMs. They're a pretty basic data type and widely used for readability. I'd recommend reading up on them, but in short to try to explain it, they're just an ordered list of named numbers. Way back when they still walked uphill both ways to school, programmers just used integers and did logic based on them. Which works fine, but it can be hard to follow sometimes. For instance, rather than having three booleans and doing three if statements for something like an anim blueprint and you have movement modes. You'd do three bools IsRunning, IsSwimming, IsFlying. Then do If Is Running, If Is Swimming, etc. Instead, you create an enum that has three entries for those names. So... IsRunning=0, IsSwimming=1, IsFlying=2. This allows you to branch your logic with one value rather than three. It also allows you to better keep state because you don't have to set the other two booleans to false whenever you set one to true, you simple set one value. The following screenshot might clarify the similar uses a bit.

vernal wind
#

Yep but beware that the UE Editor/Blueprint implementation of Enums kinda sucks and renaming/sorting them breaks a lot of stuff. I learned the hard way to just completely ignore Enums and substituted them with GamePlay Tags, which are (so far) superior in every possible way.

muted comet
#

Ok lol so I’ve always done it the Boolean way I guess

maiden wadi
#

Not really any different in C++. Just don't rename them. But then refactoring of any kind is usually difficult. Programming without a plan can be brutal.

muted comet
#

Ok but wait this haven’t been a fix for my problem yet

#

My problem involve the replication part. I haven’t been able to get that right. Right now it works for the clients only

#

I can’t seem to replicate it across all clients without issue

#

At first I tried in the player controller and had no luck. Then I extended it too the game mode

#

That just got over complicated

#

I assume I need to just tell the server to update his Boolean and then he can update everyone else’s

vernal wind
# maiden wadi Not really any different in C++. Just don't rename them. But then refactoring of...

As a long time C++ dev I know ups and downs of enums but I had my rose colored goggles on and assumed meaningful abstraction inside the editor and BP system. Sadly I got let down and then threw them out the window, since using them inside a BP state machine was worse or equal the amount of work compared to just doing it in code the first place. Hence I switched to GamePlayTags which are basically enums on steroids and have more decent support. 🤷‍♂️

muted comet
#

Not gonna lie tho that Enum example is great @maiden wadi I can understand that easy

maiden wadi
#

I had a pretty similar experience when I first started in Unreal. My only "Programming" experience was LUA scripting some UI design. Couldn't use Enums, so everything was switching off of integers. Keeping that all readable required a lot of commenting. Enums sounded dumb when I first started, now they're just a commonplace basic datatype.

muted comet
#

Wait im in the wrong channel now whoops

maiden wadi
#

@muted comet And the reason you can't replicate it across all clients on either of those is because neither of them exist on all clients.

#

GameMode exists only on the server, you cannot RPC or Replicate from or to it.

vernal wind
muted comet
#

so it should be the player state im doing this stuff in

maiden wadi
#

What is the variable for? What's it supposed to affect?

muted comet
#

the booleans will tell the players UI which character has been selected

#

so then they can make the buttons disabled so players cant use them and take that character

maiden wadi
#

Hmm.

muted comet
#

ill show u somtin

#

its messy right now

#

as u may tell

maiden wadi
#

Are these characters different classes, or the same class with a different mesh?

muted comet
#

but that was my "original" idea

#

diffrent in alot of way

#

they need to be separate

maiden wadi
#

Right, but I'm asking id you're making separate classes for them entirely, or if they're just different meshes used in the same character class.

#

If they're separate classes, rather than using booleans or enums, you could just make a list of character classes, and make your selection RPC simply pass that class through the RPC.

muted comet
#

sorry had a phone call, they use diffrent meshes and they have diffrent ability in there actors,

#

should i move this to the multiplayer chat?

#

one other thing that complicates thing is that its you click a class then you click ready, and when all players are ready it spawns them all at once

maiden wadi
#

Doesn't matter so much being blueprint related.

muted comet
#

true

maiden wadi
#

But are they different actor classes?

muted comet
#

ye

#

alright, im gonna try and use the gamestate instead of player controller

maiden wadi
#

If I was doing this, I'd probably use mostly the selection widget, GameState, PlayerController, and possibly GameMode for the actual spawning on start.

muted comet
#

alright good, we are thinking along the same lines here, should i be using a has authurity in the state?

maiden wadi
#

My setup would possibly be... On setup, GameMode could populate an array of classes that clients can get. This array of classes will be all selectable characters. This is just to tell clients what characters can possibly be selected so they can set up their own UI. This allows you to alter this via game rules, or added characters later, or whatever.

muted comet
#

that could work

#

might give it a shot when this one im doing burns into flames

maiden wadi
#

So client gets this replicated to them, and they set up the buttons. Each button gets that class it's meant to select passed into it. On click, it gets the local player controller and passes that class through the event, That controller RPCs that class to the server. The server version of that controller calls an event in GameState that tells GameState that controller wants that class. First it checks if that class is in the originally replicated list, if it is, then it checks a second array to see if anyone else has selected it, if not, it sets it in that array. The second array would be an array of structs that is a PlayerState, and that Class. This array also replicates so that clients can update their UI when it's changed for selections.

#

Then when everyone has selected and clicked ready, the server can iterate over that second array, and spawn each class in the array, for the controller associated with their playerstates.

muted comet
#

that makes alot of sense in my head and usually that never happens

#

Oof great

#

i cant cast to playerstate

maiden wadi
#

@muted comet How do you mean?

muted comet
#

its alright i had to use the override i fixed it

#

ok so werid issue

#

it? worked??? idek

#

might just be it glitching

maiden wadi
#

Not sure what you're doing.

muted comet
#

me neither

maiden wadi
#

What problems were you having?

muted comet
#

Umm honestly cant tell, trying to trouble shoot, ive moved the booleans into the state, ill show u a image

#

i think

#

i need to update the bools via a diffrent method

#

@maiden wadi u free to voice chat haha, i think im brain ded

maiden wadi
#

I can't. But I can advise not using tick for that. You're basically asking a client to send information to the server sixty times a second that doesn't change that often.

muted comet
#

yep already working on fixing that

foggy escarp
#

Anyone know the best way to create a harpoon using the Physics Constraint? Changing the linear limit seems to not work correctly.

#

basically be able to change length of cable and hook onto actors.

#

Doesn't look like i can even get the current constraint length, however i could sync it with a variable using the default setting
EDIT...
Set Linear x,y,z Limit seems to make the constraint no longer free to move towards the center but instead of acting like a rope act like a rod

crude sun
#

Hey guys, I have a very strange problem in UE4

#

in my HealthPickup blueprint I have a slot for a trigger volume

#

but UE4 won't let me choose one

#

but if I click on one nothing happens and the health pickup volume stays defined as none

#

got it, I was trying to do it on the main blueprint when I needed to create an instance of it in the world and then it let me choose a trigger volume

surreal peak
proud hull
# crude sun in my HealthPickup blueprint I have a slot for a trigger volume

Your health pickup blueprint should contain its own collision volume instead of using one provided to it by the world that you then have to link up later. You can simply add an actor component (box, sphere or capsule collision component) and then setup your overlap event inside the health pickup blueprint. The overlap event itself with provide any necessary references to interact with whatever triggered the overlap.

#

Or, you go the opposite route, and have a volume attached to your player so when that overlaps a health pickup then it fires the correct event. Less volumes needed this way, only a single one for the player for all pickups.

solemn parcel
#

I got this error text when I build lights : 'MainCharacter_BP_2 Static mesh actor has NULL StaticMesh property '

#

Any ideas ?

proud hull
#

Did you set the mesh of the static mesh attached to MainCharacter_BP_2?

orchid garden
maiden wadi
#

It's like telling the unhatched chicken what it's mother is.

orchid garden
#

i.e. null = empty

solemn parcel
proud hull
solemn parcel
#

But the text says MainCharacter_BP_2

#

yeah

#

But I ain't got second actor of that name on the map

proud hull
#

You want to look for when you reference the static mesh in question. Somewhere in your code, you are trying to get the mesh of that static mesh, and it is not assigned anything.

#

Right-click the mesh you have highlighted in your component list on the left. Then find all references. Click the binoculars to see all blueprints that reference that mesh. Then you can add breakpoints or print string by every instance of where you access or change that mesh's properties.

orchid garden
proud hull
#

Try, right-click content folder, choose fix up redirectors. Save everything and restart editor. Open level again and test.

orchid garden
#

(on save all - do from the file menu, not the save all on the content folder listing)

proud hull
orchid garden
#

yeah when fixing redirectors

solemn parcel
#

So, I got 3 references because it's a new char, and all of them are tied to animation exec on event. I'f unpined them, still the same problem.

#

I saved all, fixed redirections folders on the different folders

#

quitted and launched again

proud hull
#

Try the redirector fix first. Could be a non-code issue and engine issue instead.

#

Ok, cool

solemn parcel
#

still the same

#

when I delete the actor on map, it works

proud hull
#

Do search in content browser for "MainCharacter" do more than 1 blueprint show?

solemn parcel
#

but what I don't get is why on Play mode, it counts a second actor of the same class

proud hull
#

Hmmm, yeah, just readd the actor then if it works.

orchid garden
#

does your game mode spawn a character?

solemn parcel
#

yeah got one

#

it doesn't spawn any char atm

proud hull
#

If it spawned in a character though it should use the default settings of that character bp, which has a mesh set.

#

You running this in multiplayer test?

orchid garden
#

if hes adding one and it requires a pawn possess but doesn't have one, it can cause a slew of errors.

solemn parcel
#

Nah purely single player

crude sun
orchid garden
#

i've made all sorts of wierd sh... happen in ue4, all part of the learning process lol.

fallen flume
#

whats wrong with this? im really new to unreal engine btw, whenever my character spawns in camera angle is stuck and cant move

proud hull
fallen flume
#

im not sure

#

what does that look like

proud hull
#

If you are this new to unreal, you might want to load up some example content to play around with first.

fallen flume
#

oh wait my bad i got it

#

yeah i've been following youtube tutorials

#

im just stuck on a character selection menu rn, it doesn't spawn the character I want and instead spawns the default third person that you start with

proud hull
#

Stay away from any tutorial series that has you work out of the level blueprint a lot. Seen too many people trying to do everything in level blueprint then wonder why it can't communicate well with their other blueprints.

proud hull
#

Or edit the third person game mode to change it

solemn parcel
#

When I click on the highlighted BP_MainCharacter_2, nothing happens. Why does it create another instance of that BP when there is only one assigned to the level, when I build lights ?

fallen flume
#

this is the ui blueprint for when u click the button for the character

#

that is the project settings part

dusk flame
#

Hey guys, I have a "data flow" question, coming from somebody who's not too familiar yet with Blueprints.

I have a WBP_Hud which I need to initialize with some data. I've made BP_Hub, and attached the WBP_Hub inside of it. This is because it needs to be an actor in the world.

I want to attach some dynamic data to this BP_Hub and then expose it somehow so that WBP_Hud can initialize itself based on this data. What are my tools to get this done properly?

orchid garden
#

if you've added one into the map, and then your controller is spawning one, then its most likely BP_MainCharacter_2 is the one thats spawned.

#

@solemn parcel and thats why your unable to click on the bp

proud hull
fallen flume
#

yeah

proud hull
#

@solemn parcel so at that point you aren't even hitting play, just building lighting? That means that it has to do with the physical character you dragged into the level.

#

Do you run anything on "construct event" for that blueprint?

solemn parcel
#

@orchid garden Yeah But i spawn in that character on Play mode, and there isn't another spawning asset

#

@proud hull Just when I build lightning it happens, things seems fine in editor and in play mode

#

On 'construct event' ? If you mean the 'Construction Script', it's empty

orchid garden
plain flare
#

Hey, I'm trying to write, If character don't moving, Play ..... animation. How can I do that ?

proud hull
plain flare
#

I dont mean Idle, either it is on Idle, If player doesn't pressing keys, How can i write this

dusk flame
#

set a reference for the bp_hud in the wbp_hub when you aded it, then in the wbp_hud you can use that reference to grab any of the vars

I'm a little confused about this part.

plain flare
#

For example, if player doesnt pressing anything about 5 seconds. I want to write, If player doesnt pressing longer than 5 secs, make this, make ........

solemn parcel
#

@proud hull ConstructionScript ?

proud hull
orchid garden
proud hull
dusk flame
#

Thank you 👍

plain flare
#

@proud hull Im using it on Idle

solemn parcel
#

Nah, empty

plain flare
#

If velocity smaller than 1, Im playing Idle animation. But how can i say,

#

If velocity near to 0, more than 5 seconds, change animation

#

If in Idle too

#

@proud hull

proud hull
# plain flare If in Idle too

state transition from your movement blend space, which include idle. Transition needs to check for velocity near 0 to guarantee you are in fact, idling. Then you need one more condition check based on time. How you set that is up to you. On release of movement input, you can set a variable to save current game time and then check against that variable to see if 5 or more secs has passed.

dusk flame
#

GeekyGek, I would need to create a function called "Set Parent Reference in WBP_Hud", right? Variables don't automatically get getter/setter?

proud hull
#

Gotta get ready for work, good luck all.

sudden zephyr
#

I'm experimenting with something where I added a copy of the hand bones in the weapons skeleton itself to hold the weapon properly. Is there a way to copy all the bones shape onto the mannequin?
As in, to avoid a fustercluck of Transform (Modify) Bone in the anim BP xD

orchid garden
solemn parcel
#

@proud hull Thx, gl too

plain flare
#

@proud hull how can i save location ?

#

I mean, I didnt understand you well. Now, i should save player's location, then i should get that saved location after 5 secs, then i should comparison them, If they aren't same, i should play sitting animation, right ?

dusk flame
#

Hmm I think there is something I am still missing here

#

I created my variable called "ParentReference" inside of WBP_Hud that points to a BP_Hub Object Reference

#

I also set it to be instance editable.

#

Now inside of the BP_Hub event begin play I am trying to call Set Parent Reference, but I don't have the right data to connect up.

#

Because in BP_Hud, my Hud "variable" is NOT type WBP_Hud but rather type Widget Component.

#

@orchid garden am I following the flow you were describing?

#

Oh gosh! Sorry I didn't see you had PMed me!

orchid garden
plain flare
#

How can I say, "Longer than" ?

#

I mean, for example I'm pressing to ESC. I want to say, if player pressing to ESC longer than 3 sec, do ....

#

How can I do that ?

#

Something like "still" command ?

orchid garden
orchid garden
#

does a check for hold, single tap, and double tap

#

'hold time' would be the amount of time you want the player to have to hold the button down. Tap Tollerance is the amount of time that can pass between a single / double tap detection.

#

default for tap tollerance is 0.25

plain flare
#

Ok, thanks, that code is about button pressing/holding. But, how can I check a value ? I mean how can I say, after 5 seconds "If value equal".

#

For example, I have a valuable that changable. How can I check, " if this value, still same value longer than 5 seconds" ?

orchid garden
#

think i did the and right....

plain flare
#

Hold on,

orchid garden
#

no it shouldn't have the not...

plain flare
#

I have speed of my character.
If my character's speed >= 1, character walking
If my character's speed <= 0, character in idle

Now, I want to achieve:

If my character's speed still 'speed <=0' after 5 seconds, make character sitting.

#

@orchid garden you sent about buttons. But speed value isnt about buttons.

plain flare
orchid garden
#

@maiden wadi may be able to make that abit cleaner 😉

maiden wadi
#

Realistically I'd just switch on velocity in the anim's update.

#

You need velocity for the blendspace's speed anyhow, usually.

plain flare
#

@maiden wadi I have it, I'm already using it for my Idle.

orchid garden
#

@plain flare its how you asked i guess... you asked about checking a value vs. how long a button was held

maiden wadi
#

If it was me, I'd create a small enum and just use it's logic based on states in the animupdate.

restive tundra
#

anyone know the maths to make this so that it provides the inverse values than it currently is? i.e currently when the player is close to actor it produces a value of 1, and when the player is far away its a higher number, I want this to be inverted so close = 100 and far away = 0

plain flare
#

@orchid garden yes. ESC was an example. But my real problem is: If my character's speed still 'speed <=0' after 5 seconds, make character sitting.

orchid garden
#

i'd do like @maiden wadi said, set a enum state, and then have the anim bp check for the state being set to sitting.

restive tundra
#

unfortunately that does the same thing

boreal ether
#

map range

plain flare
#

@orchid garden I have anim bp already. I didn't understand how can i solve this problem with enums. Is enum checking "If my character's speed still 'speed <=0' after 5 seconds" ?

boreal ether
#

Or just 100-x?

orchid garden
plain flare
#

Yes. I'm already using that for my Idle. like, if its <=0, idle

orchid garden
#

far as a idle counter, you can do that with a simple timer you activate when they are inactive, and invalidate when they are active.

#

so the animation bp would check to see if speed <=0 and idle counter => 5

#

before starting the timer you'd just reset the idle counter.

restive tundra
plain flare
#

@orchid garden Set timer by event ?

boreal ether
plain flare
#

Im gonna write it into Animation BP's Event Graph, right ? @orchid garden

orchid garden
#

then off the true and false you could set a enum state and in the anim bp you could check the state to see if its set to sitting, if so, make them sit. if not make em stand.

#

@maiden wadi basically what you were saying isn't it?

#

acutally you'd need to reset the enum state off the first false come to think about it.

plain flare
#

I'm writing it now,

orchid garden
#

its probably got flaws, its just a slap together.

#

(i just used a int as a 'pretend' enum state)

plain flare
orchid garden
#

or... you could litterally set the timer to 5 and skip using a idle counter.

plain flare
#

Isn't Idle Counter float counting seconds ?

orchid garden
#

yeah idle counter was just counting seconds.

#

thats why i said you could skip that setting the timer to 5

jaunty stirrup
#

Hello , i have a skeleton inheriting BP_mob , the mob can walk to the character to attack him , It works fine when i place BP_skeleton in the world but when i use the node spawn actor it does not walk , the skeleton stay in place

#

Is there a thing to do with spawned characters to make them work correctly?

orchid garden
#

order of execution? you may be telling it to start walking before its spawned (if doing it off the contstruction event)

jaunty stirrup
#

The construction script ajuste the size of the trigger box detecting aggro

#

maybe the construction is not called when spawning?

orchid garden
#

its called, just some things i've noticed seem to happen before the items spawned

last abyss
#

check if the pawn auto possesses when placed in world and spawned

fallen glade
#

does anyone know what's the formula to find x here: 0.75 * X = 1

#

I shouldn't have been sleeping in school

boreal ether
#

1/0.75?

jaunty stirrup
#

x = 1/0.75

fallen glade
#

🙏

jaunty stirrup
#

Kira where is the setting auto possess please

last abyss
#

in the actor details

orchid garden
#

(the skeleton)

last abyss
#

yeah but shouldnt it auto possess ai?

jaunty stirrup
#

Its a BP_mob which inherit from Character

plain flare
#

Hey @orchid garden I write codes like that. And It worked ! Thank you from the bottom of my heart :)

last abyss
orchid garden
#

gj @plain flare

#

yep was just looking at that, needs to be set to 'spawned' i believe

#

@last abyss

jaunty stirrup
#

@last abyss @orchid garden Thank you very much

#

Its so good to have this discord 🙂

plain flare
orchid garden
#

that fix it @jaunty stirrup ?

jaunty stirrup
#

yes

plain flare
jaunty stirrup
#

it wasnt possessed when spawned

orchid garden
plain flare
#

Yes, I know it, this macro was that codes, right ?

plain flare
orchid garden
#

yes

plain flare
#

Ok, got it, thanks again

solemn parcel
#

So I still have a warning ONLY when I build lightnings. I've tried a tons of things to fix it in the BP_MainCharacter, which is the only actor on map with that name atm. I've even changed the mesh from it and still got the error.

#

That warning writes : BP_MainCharacter_2, BP_MainCharacter_5...

#

Meaning on building, it creates other instances of that actor, and I don't understand why

#

The BP is pretty simple for now, nothing in Construction Script, and the mesh is preperly rendered when Play mode.

#

I'm quite lost

atomic salmon
#

Do you have a Player Start in your level?

#

Are you possessing your Character?

#

@solemn parcel ^^^^

solemn parcel
#

@atomic salmon I deleted the player start.

hollow cape
#

can you confirm that the L_Hand_CastingPoint static mesh component has a static mesh assigned?

#

@solemn parcel

solemn parcel
#

@hollow cape You found it. I did a test earlier deleting that component, because it doesn't have a static mesh assigned. But for some reason it still wasn't working. Tried it again, it worked.

#

Thanks !

#

damn

hollow cape
#

yep

orchid garden
#

thought it had to be a null mesh

#

glad ya got it working @solemn parcel you've been working on that project for awhile now 🙂

solemn parcel
#

@orchid garden Glad too ! Actually it's the third time I restart it, for different reasons, but this one will be the final one 😉

orchid garden
solemn parcel
#

Yeah, and mostly reusing most of the code ! It feels really good sometimes to make a fresh start on something that looks more clear !

orchid garden
pliant frigate
#

I'm sorry to interrupt. I am forgetting something easy. What will cause an Add to Viewport to fire an "Accessed none trying to read property..." error?

solemn parcel
#

@orchid garden Exactly 😉

orchid garden
pliant frigate
#

This is in a class that inherits from Player Controller.

grizzled rain
#

When I updated to 4.26 I got a performance drop on mobile. Any idea why?

pliant frigate
#

Not that it will help anyone else, but the solution to my issue is "Switch Has Authority" , since I am using dedicated server.
Edit: This may not actually be the best solution.

faint pasture
pliant frigate
#

Yup, which is why i needed to add "Switch Has Authoirty"

faint pasture
#

You need to only do the UI if it's a local player

pliant frigate
#

Yup, that's what i was saying was the solution to my problem.

faint pasture
#

Switch on Is Local instead

pliant frigate
#

ok

#

I will do a branch and check if Is Local Player Controller instead, then.

maiden wadi
#

@grizzled rain I would ask in #mobile. People there are going to probably be a lot more used to profiling or optimizing for mobile devices. First guess for an engine update would be that something like a plugin for the engine got added or enabled that you're unaware of. Or a way you're using a default class is now different or wrong. I know 4.26 did quite a bit of backend restructure to some components at least. But in short, your easiest way is going to be profiling and comparing. Look for the highest cost and trim it as much as possible.

#

@pliant frigate On a side note to your issue, this is another reason I find it nice to use the AHUD class for UI. For pretty much all of my UI purposes that are not done in WidgetComponents on actors, my UI is done via calls to custom events in my AHUD class. Only one is created per machine for the local player controller and not available on a dedicated server. Getting the local controller and calling GetHUD on it will return your AHUD to you to use for local UI. Basically if the local controller's GetHUD returns null, then you're not on the local controller in your execution. Which makes it infinitely more easy to debug and understand widget related stuff in networking.

pliant frigate
# maiden wadi <@!202543499650924545> On a side note to your issue, this is another reason I fi...

Thank you! I will read more into AHUD then. I am still very new to all of this, having mostly just experience on the art asset side. Its a challenge, but I am enjoying it and am having fun. I managed to blunder my way through compiling unreal for a dedicated server, got that up running, and successfully got friends to connect to it from the outside - I have decided to use that as my testing/learning environment.

maiden wadi
#

@trim matrix Why would you even consider running timelines on tick? Both a timeline and a tick run at the same speed.

pliant frigate
#

@maiden wadi dumb question: is AHUD same as the HUD class?

#

(I am working from blueprints. I assume AHUD is a C++ class? Again, I'm pretty new to this).

maiden wadi
#

Correct. The HUD class set by GameMode.

pliant frigate
#

Awesome. Thanks again.

maiden wadi
#

@trim matrix All a Timeline is, is a component that runs it's own tick and updates the timeline. So it's already running on tick. You should find a logical way to use Events to trigger the timelines. Or simply ditch them and just use tick itself for the logic.

#

It's really ill advised. But I suppose if it works. 🤷‍♂️ Make it til you break it. Then you get to profile and fix the stuff. If your game is very simple, or incredibly small, I doubt you'll notice it unless your target platform can't handle it.

#

You're asking why you shouldn't use a car to drive a car. If you have one car, why do you need a second one to drive it?

#

Timelines are just to organize your ticks into more easily event driven logic. So turning around and putting them on tick takes away the point of them.

#

Timelines are not normal nodes. When you put a timeline node down, what you're actually doing is adding a new ActorComponent to that actor. This actor component is designed to send updates through the node you placed when it's own tick runs, if it's supposed to run based on the logic in that actor component.

atomic prairie
#

Heeey! I’ve a little problem, I’ve a platform (ActorBP) which turns at 360degree, but when Im on the platform and I jump, I am propelled according to the movement of the platform, it also makes this with platforms which move from left to right. Does anyone have the solution?

#

I think I need to set the platforms movement can’t influence my character movement but idk where is that

maiden wadi
#

@trim matrix Here is a good and very simplified example of the timeline component and how it works. Normally you would do the things like calling the StartTimeline event by putting execution through the Play on the Timeline Node. But this is how a timeline component would work if you did it in blueprint.

#

Whoops. Wrong logic on the tick in the component. Should have been CurrentPlaytime < CurrentDuration.

#

@atomic prairie I haven't messed with those, but you might try the Impart settings in here, in the CharacterMovementComponent.

fallen flume
#

trying to follow a yt tutorial, but he doesnt show what the green set variable is :/ anybody here able to tell me? im creating a jump animation for a character btw

last abyss
fallen flume
#

what would it be called if im trying to add it into the event graph

atomic prairie
#

@maiden wadi I’m gonna try this

last abyss
#

let me know if I'm understand it right, are u asking what he is plugging into the set node or are u asking what the set node is?

fallen flume
#

what the set node is

last abyss
#

it's a variable (on the left hand side you can add it)

fallen flume
#

the green one?

last abyss
#

yeah, it's a float

fallen flume
last abyss
#

alternatively you can drag off the vectorlengthsquared pin (or right click) and promote to variable

#

then it will automatically show up on the left hand side of ur screen (in My Blueprint, Variables) as a float variable

#

got it?

fallen flume
#

yes

#

does it matter if i change the New var 0 name to speed?

#

oh wait

#

sorry im really new i dont think i did it right

#

this is what i got

last abyss
#

it doesn't really matter, but naming is handy to remember what the variable represents

#

looks good to me

fallen flume
#

it keeps saying theres a warning in compiling

#

should i just ignore it?

last abyss
#

i'd continue following the tutorial

#

surely it doesn't end there :o?

fallen flume
#

it does lol

#

i think i'll just delete what i did and find a new tutorial on yt

odd plume
#

How would I be able to remove this mini map widget? I want to get rid of it when isMapOn != true; since it runs on tick

fossil osprey
#

I can't find any tutorials on this but basically im trying to spawn actor (points) across my whole level using EQS, but i can't figure out how to do this 😦

odd plume
#

I can try; what should I use the flip flop on?

#

I'm not sure if that would work; I cannot get it to be removed from the screen at all

last abyss
#

is it running the remove from* parent? @odd plume

#

idk i just tried it with the flipflop sebbi recommended and it works fine for me ?

odd plume
#

I used the flip flop, that worked

last abyss
#

🤯 nice

odd plume
#

I could not get it to use remove from parent tho

#

😦

#

Like the two things to the flip flop instead of the function?

#

That worked better. Thank you guys for the help

sterile helm
#

is there something like setactorlocation sweep, where instead of putting the actor at the location the sweep hit, it just doesn't to the movement at all?

#

basically only teleport if there's nothing in the way

#

I'm making a prototype for a grid-based game and if the hitbox matches the grid exactly it seems like it sometimes gets stuck on edges, and if I make the hitbox smaller the sweep places my player off-grid

#

I could do it without the hitbox and instead just do a linetrace in the direction I'm trying to go, but I figured I should give the 'proper' way a go

autumn hawk
#

Hi ppl, what method do you recommend for a simple single AI (chase player, move to location). I started with Blackboard but am now thinking it is overkill and considering moving logic to the AI character BP...

maiden wadi
#

@sterile helm If your actor uses a fairly basic shape, you can shape trace with the same size shape from the actor to the intended spot. Otherwise, you could just save the actor's location, do the sweep move and if something is hit, set it back to the original location.

faint pasture
#

You had an interface function and an event with the same name on that class

#

Just make an event called event shoot and have the interface function shoot call event shoot, or just do the shooting stuff right in the implementation of the interface function

sterile helm
maiden wadi
#

As in your actor's shape components, or?

sterile helm
#

if I spawn an actor during gameplay, the sweep hits it, but if I put it in the level before it works fine

#

as in, I'm spawning in a block to act as a bridge

#

it also only seems to be hitting it in certain directions

stable dove
#

they are abit off and its annoying me

burnt berry
#

I believe the shortcut is to select the node and the reroute node and hit Q

#

Can I take a look at the implementation of SpawnActorFromClass node?

#

Nevermind found it.

#

UEditorLevelLibrary::SpawnActorFromClass

rotund basalt
#

or
right click, straighten connection

stable dove
#

ty

#

anyone know how i can view contents of an array for debugging?

tight schooner
#

@stable dove set a breakpoint on a BP node, and when it gets tripped during gameplay, you can mouse over variables and data pins to see the values in them IIRC

daring turret
#

What might be making black lines in between different layers of instanced static meshes?

tight schooner
trim matrix
#

How I accomplish that? lol

#

nvm got it

#

👍

mental sail
#

Hi, I'm wondering if anyone knows what I can do to capture mouse wheel scroll inside of an UMG INputKeySelector widget, which itself is inside of a scroll box? Basically I'm building a keybinding menu, and the Input box is not capturing mouse scroll, the scrollbox keeps scrolling...

tired cypress
#

Hmmm, that's tough. I think the scroll box is designed to steal the mouse wheel input

mental sail
#

Hmm. then I should disable scroll when input key selector widget is clicked on...

tired cypress
#

Maybe that would work. Is it because you want finer control over the scrolling?

mental sail
#

Well, the game uses weapon next/prev and I want to bind that to the scroll wheel. But the menu with the keybindings customization buttons is inside of a scroll box because it's long

tired cypress
#

I would probably have to build that out and test it to help heh. Usually the scroll box only responds if the cursor is over it right? Does it work as desired when the cursor isn't hovering over?

#

Because if that is the case, you should be able to set your scroll box to visible but not hit testable

#

Which will make it ignore those scrollwheels

mental sail
#

if the mouse is inside of the box it captures it

tired cypress
#

Yeah take a look at the visibility setting of the box. Set to non hit testable and try

daring turret
#

I have a bit of an issue. My character falls through procedural mesh. However she doesn’t fall through anything else. I could use some help

mental sail
#

Sounds like you're not generating collision

tired cypress
#

Yeah I have had to setup collision on both the Capsule and the Mesh for characters, otherwise that happens

daring turret
#

I have collision on

#

Collision works on my sprite character as she stays on every other type of mesh

#

Just procedural mesh. I made a code to generate the block

tired cypress
#

Yeah, a Character object type usually has a Collision Capsule that helps handle this

mental sail
#

Treat "complex as simple" for the box?

#

For the scrollbox issue and input key select, i turned off scrollwheel consume on the scrollbox (so I have to drag the bar to scroll), but the input widget still doesn't get mouse wheel scroll as input 🤔

tired cypress
#

There's an option called Not Hit Testable

#

Which should ignore the cursor if it is over top

mental sail
#

thanks for the help, I can't get the mouse wheel spin captured (just click) by the input widget, and I think I'm just going to cut my losses and make it a togle option to use mousewheel or not in the menu... the show must go on

karmic pebble
#

okay so why the hell isnt delay showing the timer countdown. This makes no sense. The upgrade in 4.26.0 had this and now 4.26.1 its no longer there. Everything compiles just fine. Was this intentional for UE4 to do this now? -_-

stuck hedge
#

how can a spline have an "on component begin overlap" event if it doesn't feature any kind of collision?

worldly dew
faint pasture
#

Otherwise, if lower-upper is too big (90 degrees?) Play some anim that shuffles the feet while lerping lower to upper

worldly dew
#

I understand setting a yaw for the mesh rotation, but how would I get the two different ones for one mesh?

faint pasture
#

There's a million ways to do it but fundamentally you need to keep track of 2 yaws

#

1 might be the capsule/mesh/root bone already

#

Depends on how your skeleton is set up. What's after root?

worldly dew
#

the bone name is "Spine"

#

the one after root

faint pasture
#

Show the heirarchy

worldly dew
#

one min..

#

I'm using a mixamo model

#

if you want to see the rest ill take another screenshot

faint pasture
#

So where's the legs, what's the last common parent of the legs?

worldly dew
#

sorry

#

here is the rest

faint pasture
#

Alright so you're gonna have to drive hips by the rotation delta and spine by the opposite. So if the difference between loweryaw and upperyaw is 30, rotate hips by 30 and Spine by -30

#

There's nice smoother ways to do it like layered blends etc but they're so quick and dirty get it to actually work and let you understand the concept. there's a million videos on it if you want a step-by-step

shrewd lagoon
#

random question but is anyone else getting tooltips in the blueprint editor showing up, flickering, then going invisible? Or like if you're typing in a new blueprint to add? I've tried to run verify but it doesn't seem to fix it

spark steppe
#

does anyone know how to get a newline in a text field thats part of a structure/datatable? shift + enter doesn't work -.-

shrewd lagoon
spark steppe
#

doesn't, tried that

#

and i can't even use replace node in text, so i would have to convert it to string and then back to text if i want to manually replace it 😦

#

just wonder if theres any way around that

teal spade
#

Hello everyone !!! I’m my game ( third person template ) I control using impulse my character that has been ragdolled. You’ll know here they the ragdoll is in fact the mesh so the capsule doesn’t follow the rsgdoll. I am trying to make so when the ragdoll touches a trigger box, it will teleport the ragdoll to coordinates. I used some things that worked for another project but the player wasn’t ragdolled and the fact is that it doesn’t work in this project. How can I make this work ? I don’t find any clue on google unfortunately

#

Here is how it looks

#

« lesolcdlalavemdr » is the trigger box

#

And in dest location I putted an actor instead of coordinates but yeah you get it it doesn’t work even if i change it

trim matrix
#

So the teleport doesn't work?

teal spade
#

Yep

#

When I touch the trigger box literally nothing happens

trim matrix
#

Does your mesh have collision enabled

teal spade
#

I think or it would go through walls doesn’t it ?

#

Well it doesn’t go through them

#

So yeah

#

Is the blueprint correct ?

#

Or do I refer the wrong thing

trim matrix
#

I think you need to cast to the player character

teal spade
#

I don’t understand

dense tulip
#

Casting is way to select a subtype that is part of a class or struct

trim matrix
#

I also made one in a moment try to adapt this in yours.

teal spade
#

Okay

trim matrix
faint pasture
#

You don't have to cast anything, does the overlap event actually fire?

teal spade
#

Since my computer is closed right now it’s really hard to follow

#
  • I’m a newbie so it’s harder
#

^^

#

I’m screening solutions to work on it tomorrow

trim matrix
#

Yeah no casting.

dense tulip
#

@teal spade like a Bear is ..a bear, and a bear is also an animal, sometime you dont care about the bear features and just nead info about the animal part