#blueprint

1 messages · Page 273 of 1

livid ibex
#

Hello, I would like to ask if someone could tell me how to make it so that when my npc touches an object that can be placed by the player, the npc does an animation?

tropic peak
#

What is the good practice for widgets? What should I do after adding the widget to viewport when it's no longer needed?

ocean helm
#

Sorry, it’s possible that I misunderstood something in what you’re trying to explain so clearly, but not everything sounds clear to me. I might have also misled you with my response, or perhaps I didn’t fully understand it myself.

BP_EnemyTemplate has an Attack interface, which exists in BP_EnemyTemplate, and the function itself is implemented in BP_EnemyTemplate. The Attack interface is part of the AI behavior tree, as shown in the image below.

I’m not able to remove Attack, as it’s an inherited interface (if interfaces can be inherited—I don’t remember adding it manually to BP_Skeleton), and it’s called within BP_EnemyTemplate.

The function responsible for the animation override is PlayAttackAnim, which I call in CharacterTemplate and connect it to the Attack interface in EnemyTemplate.

Here is the attack interface, the non visible node is just a string print.

#

Here’s an example that makes the animation work for me: (Instant of playing fuction Play Attack Anim on BP_EnemyTemplate I play it on BP_skeleton

#

Play Attack Anim - Fuction that is rensposible for animation ovveride, it is that fuction:

#

but the goal is to make it work for interface in BP_EnemyTemplate

#

not in the BP_Skeleton, in the skeleton I just want to choose what animation I want to ovveride, so in the future i just can choose any other animation for diffrent enemies that will inhirate from BP_EnemyTEmplate

#

Sorry for the spam and I hope thats help!

surreal peak
#

GC will clean it up then next cycle.

tropic peak
#

thanks, I'll give it a try. currently something is not working as it should and it looks like the widgets keep multiplying

surreal peak
#

Like, it's visible in the screenshot.

tropic peak
#

so when the widget animation is played the second time I get "removed widget" print twice

surreal peak
#

Hard to tell with just that code.

#

RemoveFromParent will only Deconstruct the Widget. It will be fully destroyed by the GarbageCollector if you ensure that all references to it are nulled.

#

As long as you have reference to it somewhere, it will stay alive.

tropic peak
#

yeah.. that's a problem.. shit

#

I wish I could get a better screenshot of the code but graph printer hasn't been updated to 5.5 yet

surreal peak
ocean helm
surreal peak
surreal peak
#

Or the tutorial's setup fwiw

ocean helm
#

I still have some trouble understanding interfaces. Did I add this interface myself, or was it inherited when I inherited from the EnemyTemplate class?

surreal peak
#

You could also rightclick the Attack node on the right of my altered screenshot and click on "Add Call to Parent", which will give you a slightly differntly colored Parent: Attack node, which you can connect to the Attack.

#

But that's a bit redundant if you don't do anything additionally.

surreal peak
tropic peak
#

I'm setting the widget reference on begin play, should I nullify it when the widget is removed from parent, and set it before it's played?

#

(F) FadeInScreen is a custom event from within the widget blueprint that only plays the animation for screen fadein/fadeout

surreal peak
#

Inheritance allows Child Classes to override Parent Class functions. Also Grandparent etc.
In C++ it would be limited to functions that are marked as virtual and that are at least protected and not private.
In Blueprints it's usually all public and virtual internally, so you will find a lot of functions in the Override menu of the Functions Tab.

Now it doesn't really matter where the Event Attack comes from. In your case, BP_EnemyTemplate got the BPI_AttackInterface (or whatever it is called).
The Interface acts as a Parent Class, just that it itself can't define any Functions or Declare any Variables.
It can only Declare Functions which other classes can then override.

In that case, Attack can be overridden by BP_EnemyTemplate, and you also did that to call PlayAttackAnim.

But now, based on what I said about Inheritance before, Child Classes of BP_EnemyTemplate also inherit from BPI_AttackInterface and can thus override Event Attack too.

#

@ocean helm

#

I hope that makes somewhat sense. If not, then it might be worth googling a bit for Inheritance in general.

#

Even if it's a bit of code involved, the examples are usually simple enough.

#

Override Menu I mentioned.

#

Might need you to hover the underlined FUNCTIONS part of the UI to show.

#

You'll find lots of other functions there too that your BP_Skeleton can override from the Parent Classes (in this case Actor, Pawn and Character)

ocean helm
#

This definitely explains a lot to me. I learned some of C++ before Unreal, and I came across concepts related to class accessibility, although I didn’t practice them very well. I understand what you’re trying to convey. It makes sense now! Thank you so much! I’d be grateful if you could share your PayPal, so I could send you some money for your help, even though I don’t have much to spare. I can even add you to the game credits if you’d like. 🥺

surreal peak
surreal peak
#

Why are you even trying to remove the Widget?

#

The code looks like you are trying to reuse that.

tropic peak
surreal peak
#

You are never recreating the Widget after all

tropic peak
#

you are right

#

it looks like I lost a thought along the way

surreal peak
#

Like, you can remove it from parent and then later call AddToViewport again when you need it fwiw

#

But there is also the big problem of your code with that delegate pin

#

What exactly is that doing?

#

Oh that's an Engine function

#

You are binding tons of times

tropic peak
#

yeah. basically

surreal peak
#

When the binding calls back you gotta unbind!

tropic peak
#

I didn't know that it's fine to leave the widget after it finishes playing

surreal peak
#

I mean, that's just your own custom Animation after all.

tropic peak
#

for some reason I was forcing myself to remove it

surreal peak
#

You can leave that widget there forever if you want.

#

You also don't need to remove it from the Viewport if it's otherwise invisible and not blocking input or so

#

It probably doesn't hurt removing and later readding it

#

But either way you gotta unbind if you aren't destroying it

#

Or, well, if you aren't clearing the ref to have it destroyed.

#

But to answer your question from earlier: Yes, you'd need to set that reference back to null if you want the Widget to be cleaned up fully.

tropic peak
#

hmm

surreal peak
#

RefFadeOutWidget that is

tropic peak
#

I'm thinking what's worse, leaving it invisible until it's needed again

#

or having to reference it every time I try to play it

surreal peak
#

If you can ensure that its visibility is set to Collapsed and you set it back to HitTestInvisible or so when you actively want to show it, then it would be fine to keep it

#

Just to avoid you later wondering why you can't click on a button

#

Due to that thing overlapping in some way

tropic peak
#

hm

#

well it's not something that is supposed to be clickable anyway

surreal peak
#

I mean, ultimately, it probably doesn't matter too much.

tropic peak
#

might as well just set it up now

ocean helm
tropic peak
surreal peak
# tropic peak might as well just set it up now

You'd do it something like this:

In EndDay you either do:

  • RefFadeOutWidget->SetVisiblity(SelfHitRestInvisible)
  • RefFadeOutWidget->StartFadeOut()

or

  • RefFadeOutWidget->AddToViewport(..)
  • RefFadeOutWidget->StartFadeOut()

or

  • RefFadeOutWidget = CreateWidget(..)
  • RefFadeOutWidget->AddToViewport(..)
  • RefFadeOutWidget->StartFadeOut()
#

And in StartDay you'd either do (matching the numbering):

  • RefFadeOutWidget->BindAnimationFinished
  • RefFadeOutWidget->StartFadeIn()
  • OnAnimationFinished:
    • RefFadeOutWidget->SetVisibility(Collapsed)
    • RefFadeOutWidget->UnbindAnimationFinish

or

  • RefFadeOutWidget->BindAnimationFinished
  • RefFadeOutWidget->StartFadeIn()
  • OnAnimationFinished:
    • RefFadeOutWidget->RemoveFromParent()
    • RefFadeOutWidget->UnbindAnimationFinish

or

  • RefFadeOutWidget->BindAnimationFinished
  • RefFadeOutWidget->StartFadeIn()
  • OnAnimationFinished:
    • RefFadeOutWidget->RemoveFromParent()
    • RefFadeOutWidget = null
#

That's kinda all there is you could do

#

It all more or less results in the same.

tropic peak
#

is there a simple way of determining if widget anim finished playing?

frosty heron
#

OnAnimationFinished

surreal peak
#

I guess I need to add something to my example

wild pumice
#

Hi all, I have a Blueprint character that has animation montages and Anim Notifies. I need to duplicate that Character to create a variant(different mesh, animations, etc.). Since the Anim Notify casts to the original character BP, Do I have to duplicate all of the Anim notify and manually cast to the new duplicate everytime I create a duplicate? This seems tedious since I have a bunch of Anim Notify. What is the best practice for this scenario? This is for my Enemy Characters which will have different animations But will have the same functionality.

frosty heron
#

Your enemy character and your character should derive from the same base class

#

You can then just cast to the base class.

You probably should use component to handle your combat. Then you can just get the component for the anim notify.

surreal peak
#

@tropic peak Altered the list of possible options a bit to include the delegate binding stuff.

surreal peak
#

That's what Inheritance is for after all.

#
  • BP_Character_Base
    • BP_Character_Variant1
    • BP_Character_Variant2
      • BP_Character_Variant2_Spec1
      • BP_Character_Variant2_Spec2
#

Etc. etc.

tropic peak
surreal peak
tropic peak
#

thanks

surreal peak
#

If you choose to go with the visibility way of handling it that is.

wild pumice
#

I'm beginning to understand how I should tackle it. Thanks @surreal peak , @frosty heron For some reason my mind went to duplicate the blueprint when prototyping and I as saw I, created a bunch of issues. I should definitely have a parent class for all the enemies who have similar functionality.

surreal peak
#

DataAssets and such, that's something else of course.

tropic peak
#

one last question. Is this correct? (bind/unbind)

surreal peak
#

Looks correct, yes.

#

If you don't want to have those ugly noodles there, you can also make a delegate (called EventDispatcher in BPs) in the Widget itself and call that from within your Widget when the OnAnimationFinished stuff called back.

#

Then you can bind to that directly on the Widget instead of always grabbing the animation.

#

Also there is the "CreateEvent" node that you can connect to the red pin of the Bind/Unbind nodes

#

That will give you a dropdown to select what you want to Bind/Unbind

#

Removing the Red Wire to the Event itself.

tropic peak
#

yeah i'll fix the mess later, just wanted to know if that's the right way 🙂

#

I'm still not too confident with this, it feels like I don't understand it correctly

surreal peak
#

Best to just ask what you don't understand.

tropic peak
#

Remove from parent does nothing

surreal peak
#

@ocean helm Don't take it the wrong way please, but "Friends" on my Discord account remain actual IRL friends :P

surreal peak
#

There is basically some huge "Tree" like structure, the WidgetTree.
Each Widget having Slots for other Widgets. Viewport being, to keep it simple, the Root of said tree.

#

UE will render only the Widgets in said Tree.

tropic peak
#

hmm

surreal peak
#

If you add to the Viewport, or to any Widget that is already part of the Tree, it will be rendered (unless Collapsed)

tropic peak
#

yes that makes perfect sense

surreal peak
#

If you call RemoveFromParent it will be kicked out of said Tree again.

#

If you go with the Visiblity route, so calling SetVisiblity, then you'd replace the RemoveFromParent with SetVisibility(Collapsed)

#

Aka keeping it in the Tree, but marking it as Collapsed so UE doesn't waste resources on figuring out how big that Widget is etc.

tropic peak
#

one minute please, I'm a slow learner 🙂

#

I'm at the event dispatcher part. I'm familiar with the concept, but haven't used it enough to remember which option does what (call/bind/event/assign), and how to reference it from another place - eg. widget bp

barren tangle
#

Hello, If i use: "Set Time by function name" with a loop.. That will execute the function endlessly... is there a way to stop a timer? or it's something that we have to control with Branch?

thin panther
#

clear and invalidate timer by handle

supple ridge
narrow sentinel
#

Anyone able to help me with when I do get user widget object from a widget component on my actor why i'm getting none when I try printing the object name ??

#

i'm doing this on begin play

#

the widget is valid as well the gets created

#

and the class is valid

surreal peak
#

And "How to reference it from another place" is the same as with all other properties of other objects.

#

You are already doing exactly that when you are binding to OnAnimationFinished.

#

You just need a valid reference to the Object.

tropic peak
#

oh right.

surreal peak
#

I wonder if the BP calls BeginPlay before the WidgetComponent creates the Widget. Even if it's just a frame.

narrow sentinel
surreal peak
#

But I doubt, cause I accessed it on BeginPlay before.

#

Can you share your code please.

narrow sentinel
#

whether i call it after 1 second or streight after the begin play

barren tangle
tropic peak
#

So, something like this?

narrow sentinel
#

so the begin play is to the left

#

I've checked and the rvm cast works fine

#

it's both the cast of the widget object fails and when I check what widget object was there it's none apparently

#

i've checked as well that the widget class is matching up with the one being casted to

surreal peak
tropic peak
#

thanks, I'll try the other way now but it's probably going to take me a moment

surreal peak
#

Sure

surreal peak
#

The Cast failing if the Object is null is normal.

#

So the better question is why is the Object null if you expect it not to be null

narrow sentinel
#

thats the confusing bit

#

the widget derives from UUserWidget

#

and it is set and the class for the widget component which I've checked and the widget is there when I enter PIE and it shows etc

surreal peak
#

Wild Widget Class name btw

surreal peak
#

Given you are in the BP that has the WidgetComponent on it, why the getter?

narrow sentinel
#

it's getting the model actor as all the data lives there

#

but the widget is living on the view actor

#

it's just according to editor it sees the widget object as null when it defo isn't

surreal peak
#

The thing is

#

This specific Getter can totally return something else than what you think

#

And without us seeing what exactly that is doing, it#s hard to help.

#

You could be setting the Widget Class on Component X but you get Component Y

#

If you take a simple Actor BP and you add a WidgetComponent to it.

#

And you set the Widget Class in it. And then on the BPs BeginPlay get the Component and get the UserObject, it should be valid.

#

If that simple setup works, then your GetRVM thing returns something wrong maybe.

narrow sentinel
#

so ignore the getRVM

#

the widget component lives on the RVV which is that graph you see in the screenshot

#

we're getting the widget component into the graph from the component list like normal, getting it's user widget object so it can be cast to

#

the bit which we can't get why is the widget cast specifically fails and return none for the object name of what the user widget object returns

#

sorry to sound abrubt there

frosty heron
#

Casting is just a type check. If you feed empty or not the same type the cast will fail.

#

You can just print string the object to see the type.

#

Unless you have bp corruption, the computer wouldn't lie.

narrow sentinel
frosty heron
#

And what does it print?

narrow sentinel
#

None

#

as in "None"

frosty heron
#

Then the object is never set

#

Your object is null, it's not gonna go past any cast

surreal peak
#

Yeah the problem is, @frosty heron , that Ryan says the Widget Class is set and the Widget is visible when playing.

#

So either there is a strange bug, or the Widget that is visible is not from the Component that they get the UserWidget from :P

tropic peak
#

ok this seems to be very wrong.

frosty heron
#

Yeah I want to point out that it's probably is null and he maybe looking at widgets from different instance, not the one where the cast is failed.

tropic peak
#

(that's from within the widget bp)

#

and the time manager BP

#

from what I understand I want this ED to trigger when animation "FadeIn" finishes playing

frosty heron
#

Looks wrong

tropic peak
#

yeah

#

event dispatchers are a little confusing for me still

surreal peak
#

Yeah pretty wrong haha

tropic peak
#

especially that part

frosty heron
#

Why are you binding fade animation complete on fade animation complete function?

surreal peak
#

I will show you an example

tropic peak
#

like this?

frosty heron
#

You want to bind before you finishes your animation.

#

You should set alarm to work before work started.

Setting your alarm after work started is pointless.

tropic peak
#

uhh

#

okay I thought it works a little different

#

okay it's a tricky one all around no matter how I look at it I'm sorry

#

if I wanted to do what you just said I would have to stick this behind the play animation (after the fadeInScreen event)

#

but then

narrow sentinel
#

that to me doesn't sound like how a widget component works

tropic peak
#

god this breaks my brain in so many places right now facepalm

frosty heron
#

@tropic peak you can set the alarm anytime that make sense.

On construct or begin play is fine in this context.

faint pasture
#

Is there anything between the entry/exit points and the room actor root component?
If the component layout isn't:

Mesh
Entry/Exit point

Then youll need to modify the relative transform calc

tropic peak
surreal peak
#

@tropic peak

tropic peak
surreal peak
#

Maybe this helps a bit more. idk

tropic peak
#

there's a "play animation with finished event" node..?

narrow pendant
#

how do you constrain a playable character to another object while keeping movement enabled?

surreal peak
#

Yeah, that wraps the Delegate. You can use that too of course, but that only works in EventGraphs cause it's a Latent Node.

#

Relatively important to understand EventDispatchers/Delegate for most other cases.

surreal peak
narrow pendant
#

argh

surreal peak
#

You can try to do the same in Blueprints in the Character, but it might give shitty results.

#

The idea is mostly that you check if the Move you wish to perform violates the constraint

narrow pendant
#

can confirm that

tropic peak
#

thanks Cedric that makes much more sense to me now

narrow pendant
#

right, so not use physics constraints at all and actually check with distance check etc before allowing movement input

surreal peak
#

If you were to code this in C++, you'd probably have that AnimFadeOut variable private.

#

And you'd probably not expose it to the outside, but rather handle it inside the WIdget and only expose to the outside what other need.

tropic peak
#

yeah I mean it's always good to practice important parts of the engine that I don't understand - like ED's

#

thank you

austere vapor
#

Hey all! Im on a quest to find how far along a playing montage is between two sections. I'm working on a rail shooter and during a boss' attack, time dilation will trigger and target rings will appear. I want the rings to turn red as the player runs out of time before the boss' attack lands. The trigger for the dilation and hit are controlled by montage events, so I was thinking of taking a lerp of [WhereTimeIs] between [TimeOfStart] and [TimeOfEnd]. This will let me lerp between green and red on Tick, but I cant seem to find where to get this information. "MontageGetPosition" is a thing, but "SectionGetPosition" isnt. This is code that will be used across different Skeletal Meshes, and thus different AnimBPs, so a solution outside of the AnimBP is preferable. Am I going about this the wrong way?

frosty heron
#

Is that anim notify state?

#

You can get the anim notify state start time and end time from the anim Event Reference afaik, I just did this recently.

#

Not in bp but pretty sure they are exposed.

austere vapor
#

ah, C++. My sworn enemy

frosty heron
#

Finding the gap there is just end dilation start time- start dilation end time

#

Maybe doable in bp, pull out the anim event ref and see if you can get the start time end time info.

#

You should see the param on anim notify start and on end anim notify end

#

Using anim notify probably a shit show for what you want to achieve btw.

#

If the window is small and the fps is low then rip

austere vapor
#

PlayMontage has the Notify begin and end, so I can find the section info like timing, but only after it plays through it

#

This is a single montage that uses a single animation, not a series of animations.
Also whats the concern with low framerates? Something about frame skipping right? How low is too low, this wont a very big or intensive game

frosty heron
#

How low is low depend on the window to fps ratio

surreal peak
#

Isn't there something like "SectionDuration" or Length?

#

Given you gave your Anim sections too

austere vapor
#

There is but only for sequencer stuff for cutscenes and cinematics

glad fern
#

Hello, I can't tell if this is the right place but is there a way of having a BP component collision sphere with a higher polygon count so its smoother?

austere vapor
surreal peak
#

A SphereCollision should in theory already be infinitely smooth cause it just uses radius.

austere vapor
#

^

surreal peak
#

Maybe not though, not sure. Never had that issue.

glad fern
surreal peak
#

That's part of UAnimMontage.

#

Those are public, so if you feel confident enough to add 1 or 2 function library functions, then you could expose them.

frosty heron
#

The ammount of things not exposed to bp lurkin

Nvm had brain fart

austere vapor
#

Yeah I saw a forum thread discussing that, I think it may be the only way. but putting it into a Library Function might smooth things out 🦐

surreal peak
#

Would be something like this (pseudo code):

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"

#include "YourFunctionLibrary.generated.h"

class UAnimMontage;

UCLASS()
class UYourFunctionLibrary : public UBlueprintFunctionLibrary
{
  GENERATED_BODY()

public:

  UFUNCTION(BlueprintCallable)
  static float GetAnimMontageSectionLength(UAnimMontage* AnimMontage);
};
#include "PathToYour/YourFunctionLibrary.h"

#include "Animation/AnimMontage.h"

float UYourFunctionLibrary::GetAnimMontageSectionLength(UAnimMontage* AnimMontage)
{
  if (!IsValid(AnimMontage))
  {
    return 0.f;
  }

  return AnimMontage->GetSectionLength();
}
#

Please give the library a better name than whatever I chose

#

If you need the other function with the start and end time, then you'll need to change the function signature of course

fierce timber
#

Hey i am trying to make a Building System with foundations that have physics for a Raft

If i play as Client and spawn Foundation 2 it attaches with Foundation 1 if i have multiple Foundations the whole Foundations start to jitter i also tryed to use Physic Constain Component but having the same issue if i play as Standalone or Listen Server i dont have this issues does anyone know what i should try to fix this?

surreal peak
frosty heron
#

Physich and multiplayer 😱

surreal peak
#

The Character, in theory, can handle it to some degree via its BasedMovement logic.

#

That requires Server and Client to being able to communicate what the hell the player is standing on.
And the different in location isn't allowed to be too great, otherwise jumping and landing will be a correction.

#

But getting that Physics Raft to be in sync between Server and Client is a whole different story.

fierce timber
#

okay thanks for the quick response

surreal peak
#

Yeah, sorry to sound so negative about it, but it's sadly very true that Physics and Multiplayer aren't the easiest thing to solve, especially in Unreal and especially in BPs.

narrow sentinel
#

cause it must be a bug as I can't remeber something like this ever happening at least not on normal UE builds

frosty heron
#

I would recommend going on empty map and testing it with one instance.

#

You may have multiple earlier and possibly had some instance that have null

#

Missing component like that normally happend if you touch cpp and corrupt the bp in my experience.

#

Never had that sort of issue in bp only project.

weak minnow
#

Can the Level Blueprint not move actors? For some reason it just never moves

fierce timber
surreal peak
#

I don't think the LevelBlueprint has any restriction to moving an Actor.

weak minnow
#

I just figured it out. It wasn't movable facepalm

surreal peak
#

Welp.

weak minnow
#

just a reminder to check your message log warnings

gentle urchin
#

Those silly things...

#

Who has time for logs anyways!

#

Used to ignoring hundreds of warnings 😆

glad fern
glad fern
lost hemlock
#

This is the Easy Building System project plugin from the store, I tried to view the references of those events. They are never getting called. So I wonder how any of those events are supposed to work to add up numbers and data

#

I try to debug these on the project template instelf also and it didn't work. So how are these working if they are never getting activated?

lost hemlock
faint pasture
lost hemlock
narrow sentinel
#

Sorry to ask in here but is there a report function for people spamming and trying promote services though direct messages when it's not requested

autumn pulsar
#

Is there a way to see if a name is empty?

inland walrus
#

Anyone know why this isn't loading rotation?

frigid jasper
#

i was learning how to use data layers today, and one thing confused me there
the documentation page (https://dev.epicgames.com/documentation/en-us/unreal-engine/world-partition---data-layers-in-unreal-engine) tells one to activate layers with the node as shown, but for me (UE 5.4) this node only exists with target as Data Layer Manager
In the end it still works, it just got me confused for a second
is this just a case of an unupdated documentation or am i doing anything wrong here?

Epic Games Developer

An introduction to Data Layers and how they can be used in your projects in Unreal Engine.

ocean helm
stoic otter
#

Hello everyone! I'm trying to get a way of showing some elements when a button is clicked; A filtering for a Menu, I'd like to be able to select several buttons, say for tables, chairs and you'd see tables and chairs, that currently works with my setup, the thing is, if I click, say, chairs again, they appear once again, I can't get myself to have this working

#

I've been told that after the "Is Not Empty Branch" I should do a Foreachloop, but I tried and still, this behaviour happens where I get two of the same if the same button is clicked

hardy merlin
#

How can I tell if a character is touching the ground or not? I can't rely on the character's movement mode because it could be custom, walking, or airborne at random when I am checking.

#

I could bind to Landed but that wont fire if they're already on the ground, right?

daring bison
#

Is localization bugged?

I have a shipping build with cooked cultures (project launcher and packaging settings) that works and changes when on standalone mode but the shipped version cant change culture

maiden wadi
daring bison
#

It changes the brush color so I know it fires

#

but yeah through a widget

maiden wadi
#

Odd. Are you on 5.5.1? I don't have a localized project past 4.27, but I can set something up to test in a little while and see.

daring bison
#

I'm on 5.3.2

#

would be lovely if you could test

#

could it be that steam is interfering with it?

maiden wadi
#

Shouldn't. Steam doesn't normally override anything like that. Unreal sets up the language by trying to get one close to the user's active language in windows when the game is opened first time. If that fails it'll fall back to the project default language until a user selects one themselves.

odd widget
#

so im trying to make a game that could go onto mobile in the future, a tower defense game with no set paths(basically where you place the towers makes a maze the AI has to work around) and its my first time really straying into mobile

#

my main question is how much i should be optimising

#

i know theres the infinity nikki game using UE5 that has a mobile release but i imagine that would have an insane amount of optimisation, i dont really want my game to be high poly and to mainly have a cartoony feel with acceptable graphics being that of the original tower madness for the ipod touch which i am basing it off

daring bison
#

that was set to english only

#

fkn insane that it doesnt auto switch

#

Unreal checkbox moment

maiden wadi
#

Oh. 😮 Oof

daring bison
#

Now I don't have to feel like an idiot posting patch notes before it works XD

maiden wadi
#

I had one of those yesterday... 20 minutes into debugging through complex code and.. Fixed it with a checkbox.

daring bison
#

might be smart to seperate character visuals completely from the code driving them

odd widget
#

i was planning to try have one central AI

daring bison
#

and disable lumen KEKW

#

a lot of the optimizing will be making smart game design desicions

odd widget
#

like one class not only determining the path, but feeding it to all of them, so they werent all trying to path to the next waypoint themselves

daring bison
#

you can only do so much to make a boat of lead float

odd widget
daring bison
odd widget
#

i learned game design in uni and they never taught many optimisation methods

daring bison
#

that makes sense, as thats programming

#

I sort a bunch of integers and then it has top down execution

odd widget
daring bison
#

im doing ue for almost a decade and I have no clue how I would approach infinite enemies

daring bison
#

will they have collision?

odd widget
#

im trying to find a ref image, not just dipping on that sorry

maiden wadi
#

Unreal also has Mass. But do note that getting into ECS is a huuuuge hurdle for a lot of people.

odd widget
maiden wadi
#

ECS is a programming idea. Unity's Dots I think is the same thing.

odd widget
#

im planning on like maximum of 1 per meter

daring bison
#

I had a programming following ECS for a multiplayer fps, I heard complains everyday

odd widget
daring bison
#

I thought it was something built into UE tbh 💀

maiden wadi
#

Realistically with good optimizations you could probably support 200 enemies on mobile, depending on your needs with default implementations. But we're talking about removing all sweeping movement, using navwalking, making special optimized skeletal meshes, etc.

#

CPU wise the big thing will be component transform updates. If you have a lot of scene components on them. Specially with complex skeletal meshes and a lot of visual attachements on enemies this costs a ton.

After that you're mostly looking at issues with dynamic light stuff from the GPU from skeletal meshes, though I'm also not sure how this specific case has changed with nanite and lumen.

odd widget
odd widget
daring bison
odd widget
#

no, im making my own since i also enjoy learning 3D modelling

daring bison
#

Ah oke good, I bought some polygon packs, they look low poly but they arent really

odd widget
#

https://www.youtube.com/watch?v=CvOSRhdfEzs the game im basing on(feel free to x2 speed tbh

Thanks for all the LIKES & COMMENTS & FAVS

Happy Gaming

Dan

Road Racer Alpha Gameplay:
https://www.youtube.com/watch?v=YWLY3yDbjGw

RoadRacer Facebook Page:
https://www.facebook.com/RoadR

AddMeGamers Website:
www.AddMeGamers.com

Facebook Page:
https://www.facebook.com/pages/AddMeGamers/161837693872131?fref=ts

AddMeGamer Reviews
http://www....

▶ Play video
daring bison
#

so be adviced

odd widget
#

also this is the second in the series, im basing off the first one that ran on ipod touch

#

thats the main one i could find a decent vid or pic on tho

odd widget
#

most my meshes are sub 1000 with a lot being around 100

#

this, ironically, would be one of my higher poly projects given im working with more detailed meshes and both humanoid and beast(cow) models

odd widget
# daring bison so be adviced

yeah, i never use fab packs personally, i compulsively add them to my library, but after our old programmer(referenced before) bricked our project with some high def models ive never used a temp model i havent personally made or know a team member has made(yes, i know its bad to kepp that habit but its worked for me so far at least)

daring bison
#

ye I mean look at this xd

odd widget
#

yeah, those leaves would be a sphere for me XD

daring bison
#

should just be flat planes, it looks flat anyway

#

oh well, was only 50 bucks

odd widget
#

admittedly an untextured sphere since i dont have a sketch pad and can harldy draw with mouse XD

odd widget
daring bison
#

the whole environment pack, not just the tree xd

odd widget
#

way to make me feel glad i only poach all the free fab models 😅

odd widget
daring bison
#

I cant do art so this is the only way for me

#

making small adjustments just to see if something "looks better" bricks my brain everytime

frosty heron
#

@gentle urchin @pulsar axle I've thought about the infinite effect to spawn the rooms. Based on what squize says about grids.

So the grid location will be the seed. Giving random x and random y will always spawn you in a "random" level.

Now you just need to spawn neighbouring rooms.

The system can only have a few exits though. North south East West.

Think about map in 2d.
So let's say you spawn at grid x 5 y 102.

If you want to go north it will be x 6 y 102. And you can spawn the room using that grid number to randomise the room.

Going back to previous location or reloading the level with the saved grid location will always spawn the same room.

odd widget
#

i went into game design, ended up a programmer(admittedly BP main)

#

but even i have the basics

daring bison
#

those things are hand in hand though

odd widget
#

if you want to be, you always can

odd widget
#

and my artist friends(who admittedly are proibably just being nice) say my low poly models are up to snuff

#

and thats before i even learned i had to retop XD

daring bison
#

Personally I like looking at this menu, but I wouldnt say it looks nice

odd widget
#

im not saying i, or you, will be amazing at it, but what ive learned is everyone can do art

odd widget
#

if i have the choice, its the first task i ask another team member to do XD

daring bison
#

yeah I tried to have chat gpt make the UI assets

#

that did not go well

frosty heron
#

Chat gpt to make UI?

daring bison
#

only images

#

I can show some examples

frosty heron
#

Have you ever heard of mid journey

daring bison
#

mid journey is ass

#

I use canva or chat gpt

frosty heron
#

Ye A.I isn't reliable for consistent art

odd widget
#

personally i try to avoid AI, i dont want to deal with the backlash, if the big man on top gives me ai assets, thats on them, but if its something that goes back to me i avoid it

frosty heron
#

I used it to generate concept art

daring bison
#

this 3 examples of a UI button by chat gpt

#

glossy and cheap looking

#

but I found people who could draw so now it looks much better

odd widget
daring bison
#

this whats in rn

#

wouldnt change it for anything

odd widget
#

ooh, those look quite nice

#

i tried a 3d model AI

#

just to see what it would turn out like

daring bison
#

doesnt look too bad

odd widget
#

definitely would need a retop though

#

got half way through before remembering it was AI based and id rather not have the fallout from that

daring bison
#

I dont understand the fallout, its obviously worse than a human hand

#

if microsoft wants to be fully ai then let them sink

#

Ai is just the poor mans jack of all trades for hire

frosty heron
#

You have to deal with angry mobs that think A.I steal their job.

odd widget
daring bison
#

bro if AI steals your job with the quality of today, you dont really care about ur craft or your boss doesnt

odd widget
daring bison
#

There is a bunch of weird AI ads going around

#

Somehow its more cringe than a standard ad, idk. Its just so off and out of touch

odd widget
daring bison
#

I think the biggest problem is the rhythym of the whole thing. People and all animals relate the world to their heartbeat to some extent

#

Its why cats like different kind of audio because their heart bpm is way different

#

The pace of AI ads is so off

odd widget
daring bison
#

No cohesion, feels like nausea

maiden wadi
#

@daring bison On a side note. I put Finnish in my side project, and it's working in PIE and Standalone. Still waiting on a cook to test that but I'm 99% sure it'll work.

daring bison
#

but ty for the effort regardless

maiden wadi
#

Oh nice. 😄 I needed to get this going at some point regardless, so now is as good a time as any.

daring bison
#

it was the internationalization box

#

I found it because I came across a example .ini from 4.27 with this and I couldnt find it in my own ini

#

crazy hidden

maiden wadi
#

It is a bit odd that it's not default. I wonder what the reason for that is. 🤔 I'd also be interested in why there are three special sets for the more common loc languages... Like I get that they're common, but.. just include them in the loc dashboard and be done with it?

#

I'm curious if some people cook Asian and European/US versions separately to strip out the other languages from them when shipping to said regions. That would be.. super odd, but it's all I've got.

kind estuary
#

How do i change the camera projection mode of the default pawn/controller

#

its the default camera

#

cant even get to the actual default camera

odd widget
#

when you say the projection mode, what is the exact result you want?

daring bison
#

maybe they did this for mobile games

normal raft
#

if you play a animation .. how do you revert the animation mode back to default ?

#

bah nm is was set animation mode i just frogot to connect the exec pin

kind estuary
kind estuary
odd widget
odd widget
kind estuary
odd widget
#

np at all hun

kind estuary
#

i thought i had to access the set projection mode

odd widget
pulsar axle
gentle urchin
#

ah yes there was a bug there aswell

#

first pull from the seed must be discarded

#

interesting

#

moving the seed up and down 1.... it sorta shows how it's only actually one stream of numbers ? 😄

maiden wadi
#

We're doing exactly that in Atre. I use a primary game seed that every client gets. And then I round any location based stuff to closest integer and add their X/Y to the seed before making a stream for randomizations.

gentle urchin
#

So it seems the seed is just the index to start at

#

In this single stream of numbers?

maiden wadi
#

Isn't this because of you adding the index to the seed?

#

The stream itself is just a randomization of the initial seed each pull. But that only applies if you reuse the same stream. Where you're actually resetting the seed each iteration.

gentle urchin
#

I thought providing a new seed would provide me a new stream of numbers?

#

Even if two seeds are next to each other

maiden wadi
#

It's not technically a stream of numbers so much. All the stream does is offset your seeds.

#

It uh... sec

gentle urchin
#

784 = 01362715...
785 = 13627154...
786 = 36271542...

#

Definetly not what i expected

maiden wadi
#

Here. When you call like GetIntegerFromStream. It'll internally run this to return a 0-1 that the calling function can use to make an integer out of based on that scalar.

/**
 * Returns a random float number in the range [0, 1).
 *
 * @return Random number.
 */
float GetFraction() const
{
    MutateSeed();

    float Result;

    *(uint32*)&Result = 0x3F800000U | (Seed >> 9);

    return Result - 1.0f; 
}```

Note it's running MutateSeed before pulling the value. Which is nothing more than a hard coded offset from the seed. So each time you call this on a stream, the seed changes, but predictibly. Which is how you get the same numbers in order. But you have to use the same stream, instead of creating a new one with a new seed.
```cpp
void MutateSeed() const
{
    Seed = (Seed * 196314165U) + 907633515U; 
}```
gentle urchin
#

For a predictable grid with free directions i feel like i cant really do that

#

This is ofc just a fun experiment, nothikg im actually gonna use

#

But imagine trying to setup minecraft chunks

#

You start at chunk 0,0, and can move in any direction at whim

maiden wadi
#

You mean for randomization of the chunks?

gentle urchin
#

World generation, yes

maiden wadi
#

I'd probably default to Perlin for that.

gentle urchin
#

How would you pull the correct random from the seed

#

Dont pick an easy solution 🤣

#

We've been there hah

#

Perlin as seed generator could work tho

maiden wadi
#

It's nice because it smooths out over distances. And gives you a nice -1 to 1 to work with for whatever you need. And you can use it for a lot of stuff. There are functions for 1d, 2d, and 3d. Though annoyingly they're not BP exposed I don't think.

gentle urchin
#

Yeah they're not

#

Resorted to plugins when i played with itn

#

Pre c++ time

#

Plugins + latent ForEachLoops in bp to support > 100x100 worlds 😂

maiden wadi
#

😬

#

Man. I wish I could work in grids.

#

We're doing pure voronoi stuff mostly.

gentle urchin
#

Grids are fun!

maiden wadi
#

My day just got fun. I get to find a way to make dynamic mesh component affect navigation.

gentle urchin
#

make it double fun by making it a grid assignment !

#

Generate a sparse voxel octree in the actor, and use that to spawn some ism instances that covers the mesh 🥲

#

tripple fun with that algo thrown into the mix!§

maiden wadi
#

It's going to be so weird for ISMs to be a CPU optimization from now on. O.o

frosty heron
#

Question time. How can I work this out.

#

I want to play montage at random but across network.

#

But I don't want to replicate the montage

#

I need to play it locally

#

So I'm thingking of using network clock

#

Which I sort of have already but they come with error margin

#

So how can I use that correctly

maiden wadi
#

Sounds like idle anims?

frosty heron
#

Imagine client clock is 2.95 but server is 3.02

#

It's hit react anim but at random. Not caring about which direction it get hit from. So no local dot product calculation, just pure playing montage locally

#

The only network part is the network clock.

gentle urchin
#

why'd you sync them at all ?

#

wouldnt you locally simulate hit from the proxy ?

#

then hit react is local ?

maiden wadi
#

Yeah I'm not sure why you need the clock here? If it's from hit reacts, you're applying damage from somewhere anyhow, so it should probably run off of that?

frosty heron
#

Hmm right

#

I'm just trying to figure out how to play it at random

#

So obviously client gonna hit the A.I first.

#

It's just going to play a montage there.

#

Then I have to apply damage on server.

#

Which then execute game cue to everyone but the player that intiate.

maiden wadi
#

Where does the randomness come in though if it's a hit react?

frosty heron
#

Let's say there are 3 to 4 animations

#

I want it to be played at random but at the same time everyone see the same montage

#

Maybe I'm overthingking this.

surreal peak
#

Probably only with a Stream?

#

And even that could go async in theory

maiden wadi
#

Realistically, it won't matter much. But if you really want to, I assume you could clamp the current time to like a second and use that as a seed.

frosty heron
#

A seed can randomise the array but a simple desync like an attack that isn't acknowledged then the whole order mean nothing.

gentle urchin
surreal peak
#

Shuffle the array once at the start, make the array replicated and go through it sequentially :D

gentle urchin
#

who would ever know if they saw the same hit react?

#

heh

frosty heron
surreal peak
#

Sadly even the sequentially part can desync

gentle urchin
#

arbitrary order an arbitrarily ordered array?

frosty heron
#

Which is initiated by the server

#

So the root motion that get played will depend on the montage.

gentle urchin
#

ah i see

maiden wadi
#

Funny enough my wife and I realized that even idle animations don't play nearly at the same time on ESO. That game is so async it's insane.

gentle urchin
#

bet its a clinet only thing

#

servers dont idle chars

frosty heron
#

Ahh yeah I gave up trying to sync idle anim

#

I almost did it but not worth it

surreal peak
#

I was heavily surprised how well sequencer syncs

#

We had a train sequence in The Ascent, that would drive in a train that you can then board.
That had to happen on everyone. Even with a 200ms ping it was happening at the same time

#

Ultimately you are doing prediction here

gentle urchin
#

probably a smart sync at the start ?

#

or that

surreal peak
#

So you won't really get around the idea of sending the server the index of the RM you played

gentle urchin
#

couldnt you just provide a seed that's synced tho ?

surreal peak
#

You'd need to ensure it remains synced

#

What if you locally deal damage but server denies

gentle urchin
#

you'd force a reset of the seed

#

done

#

😄

frosty heron
#

🥹

surreal peak
#

Yeah that's not so straight forward depending on how the system atm works

maiden wadi
#

We had a lot of issues with that on RS2. :/ It's made me really dislike damage application prediction. Kaos will probably shank someone if they talk about it to him at this point. 😂

surreal peak
#

Especially if things happen quickly and with higher pings

gentle urchin
#
// Server response
..()
{
  if (!ValidateHit())
  {
    ResetHitReactSeed()
  }
surreal peak
#

I would also not do that. Given that the damage is applied to a SimProxy CMC

#

I would let the server trigger the GC and that's it

#

And given that the ASC handles montage replication, I would not even use a GC

gentle urchin
#

It's already covered 😮

#

neat!

surreal peak
#

Just play the montage on the target on the server

gentle urchin
#

i neeed to get to the meat of the ASC 😄

surreal peak
#

No prediction of course

gentle urchin
#

no prediction on GC?

surreal peak
#

No prediction if you play the montage directly on the sevrer

#

I'm pretty unsure if a SimProxy can even trigger a RM Montage on the CMC.

#

So the only gain from predicting the montage would be the animation part, not the movement

frosty heron
#

Hmm atm I don't have any prediction and have the montage played when damage happend on server.

surreal peak
#

I gotta get ready to get to the office. Will chat more later.

frosty heron
#

But when I asked for opinions, everyone says they predict their damage

surreal peak
frosty heron
#

Have a great day!

frosty heron
#

Damage is always server only

#

But visual stuff like montage can be predicted

#

Anyway ttyl

surreal peak
#

Montage, sure, but root motion Montage?

jovial steeple
mild pine
#

Hey guys, I’m trying to shock/electrify my AI, but without animations.

There’s few shocked animations, and the one I found was part of an expensive library. I was thinking about jumping back and forth in animationframes, but referencing an earlier pose is maybe not possible? Or maybe playing an array of animations with a 0,2s timer to interrupt eachother?

jovial steeple
#

If you have an animation asset, you can "reference an eailer pose of the animation" in multiple ways.

#

Your able to directly set the animation to play, or freeze at a specific point through code.

#

Even without an animation blueprint. Though you could even set this up in your animation blueprint as a state.

mild pine
#

Freezing the anim is fine, but I’d need to look into how to get an earlirer pose in that case 🤔 Then again, playing a rapid variety of different anims would maybe simulate the shock effect well enough until I have actual anim for it

jovial steeple
#

Then set the play rate to be zero. So it freezes

#

That would be the simplest, no brain solution.

icy gust
#

Hi all, I'm wondering if someone can help me figure this out.
I made a currency system for my game, and I can add money when I press a key, and remove money when I press another and this updates the UI aswell. Now I'm trying to adapt this to my collectable system so I add a certain amount when a collectable is collected. Problem is when I try and add that function to my collectable blueprint I get "Accessed None Trying to Read Property" error from my Collectable BP. Here's my current setup:

#

From my character BP:

#

From my collectable BP:

frosty heron
#

Accessed none means you are trying to access object reference variable that is not yet set / null

#

the error should tell you which of the null variable you are accessing.

icy gust
#

yes but that variable reference works in my Character BP

frosty heron
#

regardless, it's null at the time you are calling it.

#

so maybe it was set later on but in any case when you tried to access it where the error occurs, it wasn't set.

jovial steeple
#

What variable is null? Im assuming LitCoinUiRef is null? What does the error log say was null?

icy gust
frosty heron
#

you have more than 1 unset variable at the time you are accessing them.

#

debug and go over your code step by step

jovial steeple
#

Just because it works on the player doesnt mean it will work anywhere D:

frosty heron
#

you can do is valid check, and print string when it's not valid.

icy gust
#

Well based on the working version in the Character BP do you have any suggestions on how to adapt that to the collectable?

frosty heron
#

the issue is not about "working version" or not

icy gust
#

this is the collectable setup

frosty heron
#

you need to understand why you get the error.

#

the important bit here is to understand the flow of your code

#

and why you are accessing something that is NOT YET set

#

not knowing references, you will just end up with another issue

icy gust
#

I guess I'm just fundamentally misunderstanding how this works haha

mild pine
#

Thanks!

jovial steeple
# icy gust Well based on the working version in the Character BP do you have any suggestion...

You seem to have a misunderstanding of how references work.

While playing the game, the player BP and the collectables BP exist in two different places in your computers memory. Heres what that might look like:

// The computer memory for the player BP:
BlockOfComputerMemoryForPlayerBlueprint
{
  SaveGameReference = MySaveGameInstance!
  LitCoinUI = MyCoinUI!
}

// The computer memory for the collectable BP:
BlockOfComputerMemoryForCollectableBlueprint
{
  SaveGameReference = NONE
  LitCoinUI = NONE
}

As you can see, these two blueprints exist in two entirely different places in your computers memory, and can have different values. The Values in the Collectable blueprint are all set to NONE. Anytime the game loads a new blueprint into memory, all the references will be NONE. You need to specificly setup the references for each blueprint.

#

If you attempt to access something on the LitCoinUi, and the reference is set to NONE, you will get an error.

#

You need to make sure you properly setup those references when the collectable blueprint loads. You can do this by setting up those references on the BeginPlay function.

#

There is numerous ways to get a reference to something. Your collectable UI looks like it already has some code to get a reference to the SaveGame (It must just not get ran ever, explainaing why the reference is set to NONE still).

icy gust
#

Ok I think I'm understanding, I'm gonna mess around with it for a bit to see if I can make it work. Thank you!

#

GOT IT

#

lmao

jovial steeple
#

Nice

icy gust
#

that was a perfect explanation

#

that's going to help me so much moving forwards too

jovial steeple
#

I have no idea how the LitCoinUI is setup

#

But like if the LitCoinUI was created by the player.

icy gust
#

It's really simple, this is in the graph of the UI

boreal terrace
#

im trying to make local multiplayer for a school project, when spawning my second player it doesnt have any controls :) any pointers?

jovial steeple
#

Should be fine! Dont worry, im just overanalizing.

icy gust
jovial steeple
#

Tbh ive never used local multiplayer.

boreal terrace
icy gust
#

welp, it worked once, and then it completely broke 😅

jovial steeple
#

😂

icy gust
#

Why did my Coin Ref disappearrrrrrrrrrrrrrrrr

#

It was working and then it just stopped, I don't think I changed anything

jovial steeple
jovial steeple
#

Ill dm you

lost canyon
#

Hey, I'm trying to make a foliageinstance converter to convert from static mesh to Blueprint so I can make Pickable objects, It says to use a Class Reference but I can't seem to find it?

frosty heron
lost canyon
#

this is what I have, I'm trying to change Flowers that are used on the Landscape Grass Type From Static Mesh to Interactable Items that I can pick up, So I can procedurally place Sticks, Rocks, Mushrooms etc that I can pick up in the world

frosty heron
#

That's not something you do at run time

crude dew
# lost canyon

Im not sure about how you would do what your asking but I do see that you are not passing any array to the for each loop node ? Someone else might be able to answer if this is is possible.

frosty heron
#

Creating a blueprint class in editor, will just create a new bp of type actor with the static mesh you selected.

lost canyon
#

so how do you get procedural sticks, rocks etc spawn on terrain like in medieval dynasty on the terrain?

frosty heron
#

I don't know, suppose there's a lot of techniques.

#

but converting static mesh to another type is not a thing

#

converting an object to another object is not a thing

lost canyon
#

I'm not a programmer I'm an artist unfortunately 😦 but I remember someone who did this one, changed the static mesh to blueprints on runtime and you could pick up the procedural items

frosty heron
#

He is probably just creating a new blueprint that takes the static mesh he/she selected

#

by right click static mesh conver to blueprint

#

and that is not converting a static mesh to an actor object

#

that is just manually creating an actor object, with a static mesh component

lost canyon
#

but it works on runetime he runs around the map picking up stuff spawned on the terrain through the landscape grass type

frosty heron
#

Must be a misunderstanding or entirely different thing

lost canyon
#

I dunno 😦

#

I need to figure it out though

frosty heron
#

what you can do here is have a blueprint class

#

that takes a static mesh actor

lost canyon
#

you can only put static mesh in the landscape grass type

frosty heron
#

and you just spawn that bluepritn class

lost canyon
frosty heron
#

and assign the static mesh component in that bp, with a static mesh you pass

lost canyon
#

yeah that's what I'm doing 😄 ?

#

#blueprint message

Here I'm getting the Instance Mesh, Replacing it with a Blueprint Actor and Removing the Instanced Mesh?

frosty heron
#

I'm trying to change Flowers that are used on the Landscape Grass Type From Static Mesh to Interactable Items
This part is wrong, the short answer is you can't

#

ok I guess if "replacement" is worded like that

#

i mean you are just spawning and deleting

lost canyon
#

yeah so it spawns the actors in world, then replaces them from mesh to blueprint which is interactable then I can pick them up

frosty heron
#

You spawn an actor then delete some other object (instanced mesh)

#

it's not really replacing

#

so you should figure out how to get a reference to your instanced mesh first

lost canyon
#

that's what I'm trying to do 😄

frosty heron
#

then store them into an array, only then you can do the for loop

#

the wording is incorrect

lost canyon
#

I am not good at wording stuff

#

😄

#

Sorry

#

Sorry let me try again 😄

frosty heron
#

don't be sorry, Im just trying to make it clear that you can't change flowers static mesh to interactable items

lost canyon
#

i have autism and adhd I suck at ording stuff

frosty heron
#

what you can do is spawn interactable items with the static component set to the flower's static mesh

#

So imo, your first step here is to figure out the instanced static mesh you want to iterate.

#

in what manner are the instance static mesh gets picked? A radius from the player? a line trace?

lost canyon
#

Okay so, I am creating an open world simulation game where you can farm, part of that is picking up sticks and stones off the floor, mushrooms and edible stuff, flowers to paint your homes with, I want it all to be procedural because the world is huge, so I can't manually place all this foliage that you can pick up and put in your inventory, so my idea is that I can use the grass type on the landscape that procedurally spawns mesh on the terrain, however you can't just pick up static mesh on the terrain, it has to have an interactive blueprint, I purchased the Dynomega Inventory system so I can use the inventory it's already setup, but what I want to try and do is find a way to replace the static mesh that is spawned in on the terrain with interactable items I can pick up, so I don't have to manually place thousands of flowers, stones, sticks, and other interactables in the world 😄

#

does that make more sense?

#

perfect! thank you ❤️

frosty heron
#

I never touched instanced static mesh or work with open world stuff

#

but maybe I can help with replacing them

gentle urchin
#

it's easy

frosty heron
#

provided you are able to get the reference to the instanced static mesh

gentle urchin
#

hit index = instance index

#

hit component = ISMC

frosty heron
#

So how do you want to replace those static mesh? When the player press Interact or something?

#

i hope you got that figured out already

lost canyon
#

It's a huge open world 😄

maiden wadi
#

I keep meaning to look into lightweight actors for this kind of stuff.

lost canyon
#

yeah so one sec let me show you

gentle urchin
#

Its how my city builder works

#

every interactable actor is an instanced mesh

#

with a manager, i can get the entity data

#

based on the component and hit index

lost canyon
#

Do you mind if I message you squize and pick your brain?

gentle urchin
#

just do it in here

lost canyon
#

Okay so this is what I want but not with a bx with Other things 😄

gentle urchin
#

right, so first order of business is being able to hit that instanced mesh

#

with a trace

lost canyon
#

okay

gentle urchin
#

so print something like hit component and hit index , to verify that it's correct

frosty heron
#

I'm struggling with 30 NPCs

#

and here people doing open world

gentle urchin
#

havn't touched mine in way to long but

#

aiming for some thousand npc's

frosty heron
#

with mass?

gentle urchin
#

i made this pre-mass

#

so no 😦

frosty heron
#

👀 I thought actors is too heavy

gentle urchin
#

They're not actors

#

everything (except buildings) are ISM's

frosty heron
#

ism stands for instanced static mesh?

gentle urchin
#

yeah

frosty heron
#

so they are not moveable?

gentle urchin
#

they are

#

i lerp them

frosty heron
#

👀 👀

#

Nice

dawn gazelle
#

static mesh = they don't have skelebones so they don't animate

frosty heron
#

that's thingking out of the box

gentle urchin
#

gonna use VAMP to animate them

dawn gazelle
#

they can still move of course 😛

gentle urchin
#

VAMP + ISM = pure gold

#

well.. almost :d

frosty heron
#

I thought vertex animation is only good for cheering crowds

gentle urchin
#

nah it's pretty solid these days

frosty heron
#

seen someone trying to do vertex animations to do their version of total war

gentle urchin
#

yeah plenty of those around

frosty heron
#

i'm glad i'm not making those games 😅

gentle urchin
#

2022, god damn

#

this is some goap inspired ai

spark steppe
#

nice, they even have names

gentle urchin
#

they are entities, altho singularly named 😄

#

was gonna do some large random list of names but meh

spark steppe
#

it's kinda easy tbh (DM)

mild pine
#

I have a random float from 0-1. How do I ensure that every time I tick it, it gets the random float, but with for example a consistant 0.3 range? So if the random float is .9, it has to be 0.6 or below 🤔

burnt citrus
#

guys, there's a way to access a specific mesh socket in BP given the name? or i need to get the sockets array and compare the names in a loop to get the one i need?

gentle urchin
#

that's probably the way yeah

gentle urchin
#

RandomFloat * MaxValue

lost canyon
#

Sorry I'm head deep into this blueprint trying to set it up 😄 But yes ISM is instanced, so it's pretty much free, if you do it right, you can also use Data Tables for ISM, same with Characters, I can't remember but I saw a video where you could have thousands of NPC's using similar logic to reduce memory consumption

gentle urchin
#

Data table ?

#

these cubes represents what's gonna be an "npc" once i get a proper mesh and vamp integrated

lost canyon
#

In this multi-part video we take a look at the benefits of Instanced Static Meshes, how to create and utilize them. The differences between instanced static meshes and hierarchical instanced static meshes.

This multi-part video will also go over how to create a instance/object position exporter from Maya or Blender with Python. And how to writ...

▶ Play video
#

this tutorial tells you how to use Data Tables for building buildings with ISM 😄

#

it's really fucking good man especially if you want to build Log cabins out of logs and not mesh walls with normals and displacement

lost canyon
#

lol

gentle urchin
#

heh

lost canyon
#

lol

gentle urchin
#

i've parked the proejct 😛

#

altho the framework is nearly done 😄

lost canyon
#

I really could use a partner who can programme and do BP shit 😄 I'm so bad at coding man I can do art for days, but any type of BP and my brain fries 😄

gentle urchin
#

I really could use someone who do art and stuff

#

but I'm so limited on time that it's not really much of an option, I work when i can and that's very .. unreliable 😄

lost canyon
#

If you click on my name you can see my portfolio 🙂 ? and i'm the same bro 😄 I have a wife and 6 kids and a full time job 😄 I probably do 1 or 2 hours a day 😄 lol

surreal peak
#

Small reminder that this is stuff you should handle on the job board please.

lost canyon
#

Job boards never get anything done man 😄 it's more just chatting but will make sure any offers will be done on there ❤️ : )

surreal peak
#

Just chatting would be offtopic (: at which point it would still be wrong to do that here.

sharp condor
#

hey guys im new to unreal engine ang im copying some youtube tutorials about widgets and i seem to have ran into a problem
when i press the J button which I set as a keybind the widget doesn't seem to go away

#

is there something im missing

surreal peak
#

You'd want to do that slightly different.

sharp condor
#

im still learning though can you give me guides

surreal peak
#

Put a Sequence after the Input Event.
On Then 0, check if the JournalWidget IsValid. If it is valid, leave it alone.
If it isn't valid, create it like you are already doing, set the Variable and add it to the Viewport.
On Then1 you want to check again if the JournalWidget IsValid (mostly for sanity), and after that do your FlipFlop.
To further improve this, you might also want to replace the FlipFlop with a Branch and use the IsJournalActive variable to decide if you want to Hide or Show it.

#

Given you are a beginner I assume you aren't using the CommonUI plugin (unless the Tutorial suggested that already). If not, then you'd also need to call SetInputMode with either UI or Game depending on the Journal being open or not.

#

In addition to showing the Mouse Cursor.

#

It's also good to keep in mind that, if you have more than one Widget that could be opened and require a different InputMode and the Cursor, that calling this where you are creating and showing the Widget would be wrong, because the Widgets could set InputMode to Game and hide the Cursor without knowing the other one still needs them.

sharp condor
#

I'm actually also using the Horror Engine which is Im also trying to explore and adding stuff into it

surreal peak
#

No clue what that is, but I believe it doesn't matter for what I said.

#

There is, by the way, also a PlayAnimationWithFinishedEvent or so node, that gives you an extra pin for when the Widget Anim is finished.

#

Then you don't need to use that ugly delay.

sharp condor
#

let me figure out how to add that to my widget step by step

#

thank you for the guide

surreal peak
#

Yus. It's sad that YouTube tutorials are still so wrong and outdated most of the time :/

#

But can't really be helped.

sharp condor
#

in sequence 0 that triggers the 1st button press and 1 triggers the 2nd one? is that how sequence works?

surreal peak
#

No

#

It's just to make the graph prettier and easier to read.

sharp condor
surreal peak
#

Each press will trigger both, one after another.

sharp condor
#

ohhh got it

surreal peak
#

Without it you'd need to ensure that both IsValid True and False lead to the next part. Which quickly gets ugly.

#

Especially if you have code with even more branches.

#

In actual code it would look like this:

if (IsValid(JournalWidget) == false)
{
  JournalWidget = CreateWidget(...);
}

if (IsValid(JournalWidget) == true)
{
  if (bIsJournalVisible)
  {
    /// Hide
  }
  else
  {
    /// Show
  }
}
#

Without the sequence you'd basically need to put the second if code into the first one and then also again into the else of it.
In Blueprints that's just a wire, so it's not THAT problematic. But still shitty to keep organized.

sharp condor
#

that looks so much easier

#

i tried adding a close button on the widget earlier but i just close the journal picture and left the pages, buttons intacked on the screen

surreal peak
#

Right, the problem with that is, that if you handle the Closing in the Widget (in addition), that the place where the Key is pressed wouldn't know about it.

#

So the JournalVisible Boolean wouldn't change etc.

#

If you need this to work from both sides, then you usually add like a function to the Widget, e.g. "CloseJournal". That then plays the Animation and calls an "EventDispatcher" (that you'd need to create in the Widget), e.g. "OnJournalClosed".
The code that create the Widget would then bind to that OnJournalClosed to react to it and simply call CloseJournal if it needs to. And the WIdget itself would also call CloseJournal. That way both cases go through the same code-path and both cases would ensure that the code that create the Widget gets notified by the EventDispatcher.

Might be a bit too advanced for you maybe, but could be easy to understand if someone walks you through it. Don't think I have a tutorial for that at hand though.

surreal peak
sharp condor
#

yes im having trouble comprehending this information

surreal peak
#

Yeah no worries. It's difficult to do things the "right way" if you are lacking the tools for it. I would suggest to stick to what the Tutorial shows you for now.

sharp condor
#

in the tutorial i watched he added this,

surreal peak
#

And maybe follow a bunch of them to cross reference if what one of them told you is actually correct.

surreal peak
sharp condor
#

wait lemme copy what he did

#

he added another set visibility and made it hidden

#

after the other one which is set to visible

surreal peak
#

That's a different widget

#

Just follow it for now. Makes no sense to analyze it atm.

sharp condor
#

sure, thank you for you time and help, ill ask again later once i solve it

maiden wadi
#

I'm having a real wtf moment right now. The first image is a profile I've assigned to a mesh. The second are the collision presets on a pawn's capsule.

I have other actors overlapping the first profile just fine, everything in fact except for this one pawn. And I can't understand how this one class is failing to overlap. It's not a timing issue, pawn enters collision long after the game starts. Pawn can be traced and overlapped by other things. But these two specifically just hate each other?

jade inlet
#

I'm working in the construction script of a blueprint and try to debug the value of a variable by using a print string, but for some reasons I get two values displayed in the viewport. Does anyone know why this happens?

marble tusk
#

Either you're printing twice, or there's two of the blueprint in the level

jade inlet
marble tusk
maiden wadi
jade inlet
marble tusk
#

I don't really know what else to suggest other than showing the code since maybe it's setup some way where it'll be called twice even if it might not seem like it

jade inlet
frosty heron
jade inlet
frosty heron
#

something is better than nothing

#

show the print string at least

jade inlet
#

I noticed that the log still shows two values

frosty heron
#

that obviously don't help at all..

#

zoom out

#

also get rid of the Key

#

and print string self

gentle urchin
#

construction script runs twice on bps

#

atleast in some situations 😄

loud tree
#

Oh boy fresh print string code to steal pepeLaughPeeps
(Sarcasm)

Hope he's able to get things resolved.

jade inlet
gray lantern
#

how might i do an inverse select?

#

So if It's 0 I can get 1 and 2

merry mirage
outer torrent
#

Hello everyone,

how do I do this in Unreal 5.5? I tried to replicate the video, but this video is in an older version and it no longer works. I want to be able to use First Person in the New Motion Matching Sample Character:

https://www.youtube.com/watch?v=3G-LOQCcgiM

Hello guys, in this quick and simple tutorial we are going to see how to be in first person in the new Motion Matching Sample in Unreal Engine 5.4.
↪️Project Files: https://bit.ly/GorkaGames_Patreon
📖Download Free Unreal E-Book: https://bit.ly/Free_Ebook_MasterUnreal_GorkaGames
🔥Discord: https://bit.ly/GorkaGamesYouTubeDiscordServer

Check it ou...

▶ Play video
high gale
#

I have this as my sprinting and crouching in my game, but I don't want my character to be able to sprint and crouch at the same time. Could anyone help me fix this problem?

gentle urchin
#

just check if you're doing A or B already

#

e.g. when trying to sprint, check if we're already crouching

#

when trying to crouch, check if you're already sprinting

#

you have the states there already ( the two bools)

hasty sable
#

How do you change the mouse sensitivity for the UI cursor?

high gale
barren tangle
#

Hello, is there a kind of limitation of using Event Dispatcher?
I bind an event into the HUB. Display the widget and call an event from the widget to update a Text Field. That doesn work.
I bind an event into the widget. And modify the widget text and it works.

when i call the function on construction de value of the text is set and displayed.
When i update the text through the even that the HUD call... the value is not changed

#

so why the function doens work??? it's the function that doesnt work when i call it with the Change Timer (Custom Event)

#

Everything else seems to work... so i'm wondering if there is an issue with Event Dispatcher to update a widget on the notify

#

i try to bind the text to a variable

#

the print display the correct value, but the text doesnt change...

#

i start to believe it's an Unreal Engine bug

proud bridge
#

how can I set a sphere collision inside a bp to not generate hit events when other actors for example "line trace"

barren tangle
proud bridge
#

but i dnt want to avoid the whole actor, just the sphere collision inside the actor

barren tangle
#

You Have a BP with a sphere collision, You want that sphere to avoid the line trace

proud bridge
#

my actor has a sphere collision which detects other players nearby, but when other players do a line trace to shoot, they get hit event in the sphere collision and not the actual capsule collision its meant to.

barren tangle
#

yes so for your Sphere you want a custom collision to detect only your BP actors

proud bridge
#

so it will solve this problem?? :: that when other players line trace, the line trace doesnt end in the sphere collision, but penetrates it

trim matrix
trim matrix
#

from project settings, in collision details

trim matrix
#

I am not good also in blueprints, you can check custom collisions from youtube,

barren tangle
proud bridge
#

ok let me play around with the customcollisions. i dnt want to add exception to the linetrace code, bcoz its a lot of other stuff there

barren tangle
#

so into your actor you give the type of collision

proud bridge
barren tangle
#

and into your Sphere, you avoid everything except the actorType

proud bridge
#

thanksss man, i understood

barren tangle
proud bridge
barren tangle
#

when people work on hard stuff... i can't change a simple text from a text widget.... 😢

#

Is there a kind of God of UE5? i summon you to help me!!

proud bridge
#

@barren tangle using the trace channel worked. it was so f simple. thanks

faint pasture
#

Speed = 500 + 200 x sprint - 200 x crouch

past hull
#

hey, i am following a tutorial and the guy use a self reference to a pawn object reference parameter in the AI move to node. How is this possible ? I cant seem to do it on my BP

#

Do I need to do this ?

thin quiver
#

anyone know why component overlap components/actors seems to be offset if 2 actors have different scales?
it works properly when they are the same scale?
solved: I somehow moved the "basic cube"s box collision, not sure how as I dont recall touching anything of sort.

frosty heron
past hull
past hull
#

But now I cant get this simple code to work :

#

the move to returns " aborted"

frosty heron
#

You should derive from a pawn not actor if you want all the juice of pawn in your blueprint

#

The comp is irrelevant, you will need to derive from pawn so you have the pawn movement comp

#

Although maybe what you want is a character as opposed to pawn

past hull
#

oh ok I just needed to use the character B P

#

thank you

hoary hedge
#

the "Blend Poses by Bool" isn't working as intended - I attached a crouching animation to my character but the thing is when I'm playing the game, it just loops and loops without my character changing any position while I am crouched and walking also the blend time is working.
If anybody want more I can send a video but if you get what I meant then please reply to this message and ping me.

glossy cloak
#

Anybody come across this issue? I've lost my debug tools to step through my breakpoints.

brittle oxide
#

Is there like a SetChildClass node in Blueprints? How would I change the class of a Parent to one of it's children at runtime?

faint pasture
#

change the class of a spawned actor? Or just change the value stored in a BaseClass ref to be SomeSubClass

brittle oxide
#

I figured out what I needed, tysm!!!

#

Change the child class of a parent at runtime. Spawn the parent at begin play, and the change the class to one of its children

fiery swallow
wise ravine
#

Q: Is it expensive to run a line trace off of Event Tick in BP_Character?
For: If the player is looking at an BP_Interactable, then WB_InteractDot will be added to viewport. Vice versa

glossy cloak
#

One of my games uses three multi capsule traces that get gradually smaller to pick the object closest to the cursor.

wise ravine
#

Gotcha! I thought that much, but wanted to make sure. thanks both of yall

zealous moth
#

@glossy cloak a long shot but try reseting the editor layout

glossy cloak
frosty heron
#

You should look where you are setting the should move

past compass
#

I have a new pawn that I can control but I’d like to be able to adjust the camera setup for this pawn , would there be any differences in setting up a camera? As in, would I just add a camera / spring arm to it and it would just default to that camera ? It’s currently just FP defaulting and it’s inside the mesh rn

maiden wadi
cold lion
#

I have been stuck thinking about this all day. I have a few items in my game that act as abilities (just collectable abilities) There are three each with a different effect etc, whatever. They show up in the HUD when collected and have bools and all that however.

The idea is to have a button to swap between these abilities, then another to use the selected one. However I am stuck on how to make the AC_Items know which one is selected? and how to swap it? (think like carousel) Would an ENUM be the correct approach for this?

maiden wadi
#

For me, each ability wout be a data asset. And so when granted, you'd populate an array of the data asset type. To carousel through them you simply pick the next index in the array of granted abilities and activate that ability with the picked index from the other button.

cold lion
#

okay I will look into that. Right now the abilities/items are actor classes when walked over, are checked as true, the if true added to hud and able to use ability, ability data is stored in an AC_Items component to make sure the player has the items

#

I haven't worked with data assets that much or even if at all however, but I will read about them

frosty heron
#

I love how you can add function to data assets.

autumn pulsar
#

Is there a sane way to manage a bunch of switches? like I'm trying to make an actor say, immune to certain types of damage

#

I guess a map?

hoary hedge
hoary hedge
dawn gazelle
#

A simple way would be to type your damage using GameplayTags, add an "Immune" gameplay tag container on your player. Check if the incoming "DamageType" tag from the attack exists in the "Immune" tagcontainer - if it does, they are immune.

autumn pulsar
#

Was thinking of using an enum and bitmasking it

dawn gazelle
#

If you wanted resistances, that's a litlte more advanced and you'd probably want to use a Map Instead of Tag > Resistance which can also act as an immunity at 100%

frosty heron
dawn gazelle
crimson talon
#

I havent seen people talk about it but it seems like the default Jump for ThirdPersonTemplate is frame dependant

frosty heron
#

It's crying GAS already

autumn pulsar
frosty heron
#

The fact you have attribute, skill, immunity blocking tags etc etc

crimson talon
#

setting to 10 fps vs unlimited Im seeing a huge difference

frosty heron
#

Bruv what memory

#

You will love GAS for this kind of traits

#

Need to block something? Just pass a tag

#

Want immunit? Pass a tag

autumn pulsar
#

GAS feels a bit overkill for the scale of my project

crimson talon
#

What alternative do I use to have concistent movement regardless of FPS? Jumping as default and my dash setting a velocity seem to be frame dependant

dawn gazelle
#

Don't necessarily need to go GAS, but GameplayTags make management of checking things like this really simple.

autumn pulsar
crimson talon
#

when i look that up it seems connected to physics?

frosty heron
crimson talon
#

using root motion feels cursed tbh

frosty heron
#

Then use delta time if you want to programatically drive the anim.

#

Though I don't know what's cursed with using root motion

crimson talon
#

I feel like it would be a nightmare to try to set speed varaibles like for example if you are hit while moving through the root motion

frosty heron
#

If you change anim then your root motion will cease immediately

#

Not like you will continue your dash when your character is hit

crimson talon
#

i c i c

autumn pulsar
crimson talon
#

idk I still feel uncomfortable relying on root motion but I've been struggling to change my code to work with delta time

frosty heron
#

On the contrary if you calculate dash then you will carry the harden of stopping the dash the moment the character is hit

frosty heron
#

Move object a to b with X distance

#

Within 3 seconds regardless of fps

#

Once you figure that out then work your way up.

crimson talon
#

thats what im trying to do rn

frosty heron
#

Delta time is the time it takes from last frame to current frame

crimson talon
#

currently I have it where I am using a timeline that is 0.6 seconds long, with a distance multiplier = time and multiplying that by a set distance

#

I was under the assumption timelines were frame independant

frosty heron
#

You probably don't need delta time if you use timeline

#

2 seconds timeline will run for 2 seconds

#

Just lerp

#

Most likely you do something wrong. Share the bp for others to check.

crimson talon
#

What's messing me up is after this I set my velocity to this times forward vector, all my set velocities are frame dependant rn

#

one moment

#

not as helpful but here's the timeline

#

At 60 fps this goes my desired distance, at 10 fps it does not move

#

right now I do not have my dodge animation complete so I am elongating a t-pose animation (also I'm petty as hell and refuse to use a premade dodgeroll lmao)

#

I'm not very connected to this code so if someone gives a better implementation idm using it

hoary hedge
maiden wadi
hoary hedge
crimson talon