#blueprint

402296 messages ยท Page 820 of 403

distant steppe
#

because this looks good but there are not many animations

timber knoll
#

this is basically part of rigging process

#

you telling what bones influence what parts

distant steppe
#

ok i see

#

so the best is to do my self the animations ?

timber knoll
#

for weapons probably yeah

#

they're not too difficult tho, as it's a mechanical thing

distant steppe
timber knoll
chilly geyser
#

@timber knoll I have 1 blueprint, that I can change to be 4 different types of dice (only 3 types are being used at the moment) Each die has unique faces and location in the map, 9 of each in a tic tac toe arrangement. 2 Teams (currently). All of the information of what was rolled, where it goes on the tic tac toe board, what type of dye. Everything is sent to my widget to update what you see on the widget. Im trying to get the information to correlate to update the widget with a texture of what was rolled. Ive done it already but it ends up being an infinite set of enums that I have to change like 1 thing on each of them

timber knoll
#

but depending on your needs you might need to do some custom ones as well

distant steppe
timber knoll
#

what do you mean by just hands?

#

you want reload/shoot hand animations for FPS arms only?

#

that will have to fit your weapon, so either IK setup or custom animations there

distant steppe
#

and how do i do to have 2 different cameras

#

like in fps mode i see only the hands but only the character shadow, and then when i switch tps camera i see al the character

tawdry surge
#

@chilly geyser I think you wanna look into data assets or tables. You basically want each die to know what it's state and position are so it can pass the desired information directly to the widget without all those enums.

chilly geyser
#

google UE4 data assets/ data tables will get it done?

tawdry surge
#

Will get you started

chilly geyser
#

thanks

timber knoll
#

then you need a full animated character

distant steppe
#

because then how do i do

#

there is no other choise right ?

dusky harbor
#

Can somebody help me. I am trying to make a new location with the loop but it makes only the 1. target. How can I do it for as much targets as I have?

vestal acorn
#

for each loop for all targets?

wary tinsel
#

how can I call an interface event inside a Widget from my pawn? I only managed by casting ๐Ÿ˜ฆ

austere copper
#

Hey yall, quick question. Is it more efficient for a pawn to cast to all actors of a class or have every BP instance cast and get a ref of the pawn?

opaque blade
wary tinsel
opaque blade
#

Why without target ? The widget is the target ?

gentle urchin
#

Widget is source

#

Pawn sounds like target

#

It wasnt really clear tho

wary tinsel
gentle urchin
#

Oh lol

wary tinsel
opaque blade
#

Oh thought calling from pawn on the widget object

#

Oh ok

wary tinsel
#

If I cast and create a reference to the widget it works....but it's what I want to avoid ๐Ÿ™‚ of course

gentle urchin
#

you need some reference to the widget

#

And typically widgets are player bound, so getting and storing a reference is .. the way to go about it ?

#

Atleast thats how i see it

#

preferably not in the pawn directly but it'd work aswell

wary tinsel
#

the best would be from the player controller ?

gentle urchin
#

"best "is relative

#

playercontroller is pretty commonly used

#

that or the hud class

#

both easily accessible

wary tinsel
#

because I handle its spawn and stuff from there...but since I'm using widgets with animations on score and stuff....I still don't know where the 'best' yet

gentle urchin
#

You'd probably want a dispatcher in the pawn

#

which the widget would simply bind to

#

ofcourse, it still requires a reference at some level

wary tinsel
#

exactly...haha I'm trapped

tame pecan
wary tinsel
tame pecan
#

Will you use this interface event more than one place?

wary tinsel
#

nope

dark crow
#

If it's already loaded, then Cast

tame pecan
#

Just cast it. You defeat the purpose of interface if you just use it once

austere copper
# opaque blade I am generally confused

I currently have a pawn that Id like to allow to pass through certain actor bps on key press. So to turn the collision off on the actor bps would it be more efficient to: cast to all objects within a class (turning off their collision) inside the character bp or pass a var to the actors by casting to the character in the actor bps. I hope that clears it up a bit. I apologize if it isnt, I'm still fairly new.

dark crow
#

Just be sure to not have a rabbit hole of casts leading to one another

wary tinsel
#

Ye in general my question was like...how to get a reference like in this case, I don't have any performance issues, just to know more ๐Ÿ™‚

#

but thank you guys!

opaque blade
#

If you would have cpp knowledge such things are a good use case for subsystems to decouple the logic from your player though

gentle urchin
#

Sounds like a scenario for a dispatcher really

#

If its turning of the collision on all of the desired actors at once

#

A manager can easily become handy as well

opaque blade
#

Dispatcher seems a bit bloated for direct messaging but yeah ofc you can bind to one

gentle urchin
#

Yeah it is, wasnt sure if they ment 1 to 1 or 1 to all

opaque blade
#

But it makes control flow harder to read, but I guess that is personal preference

#

From what I understood it was 1 to All

#

1 pawn to All ASomespecialCollider

austere copper
#

Thats correct, it from 1 to all

undone willow
#

how do I make it so my wallrunning character jumps off if its moving too slow?

austere copper
#

I appreciate yall, I got a lot to google now.

gentle urchin
#

using dispatcher for my global "toggleborder" command as an example

undone willow
gentle urchin
tame pecan
gentle urchin
#

^ I usually do everything from a master class instead of interface, but I can definitely see scenarios where that makes things... difficult.

outer pewter
#
  • i have an inventory, and when i delete a stackable item it works great, but when i delete a non stackable item it delete all the items of that class.
  • i think it is related to this photo, how can i delete just one item from an array instead of all items of the same class
tame pecan
gentle urchin
#

Well the top dog really just works as an interface

#

Just has the desired functions and close to 0 variables by default

tame pecan
#

Like in our game we have a power outlet that is custom static mesh component. That we can place on anything and it can be interacted, it has the interface in it, so with your system you erase the possibility of component interaction.

#

There are really only benefits running an interface instead of a parent class.

#

For interaction atleast

gentle urchin
#

I did an interaction compoment in a project aswell, felt more flexible compared to a parent class.

#

Using an interface in my latest project, but i keep walking back and forth on what it should do and handle

tame pecan
#

We donโ€™t use the interaction component.

gentle urchin
#

Guess its one of the many flaws in my setup

#

Not the compoment, but a custom one

tame pecan
#

No, we donโ€™t use any component for our interaction system.

What I was saying we can interact both with actors and components. We first check if the component we hit has an interface, if not, check the actor.

gentle urchin
#

Ah

tame pecan
#

The power outlet can be placed on a plant, and you can suddenly drag out a cable from a plant.

gentle urchin
#

I see i see

undone willow
#

why this no work?

chilly geyser
onyx token
#

when i make an actor that is a ball with simulated physics

#

and it falls down and hits the ground

#

how can i get that? rooThink1

#

like in unity you have OnCollision();

dawn gazelle
chilly geyser
onyx token
#

sure but i want to play a sound effect and spawn a little VFX emitter when it hits the ground

#

i wanna have like the signal when it collides

chilly geyser
tawdry surge
#

You have a table/asset with all the info you need and read from it, and do your logic based on it.
So if you need a particular image in the widget to show the position of a dye, you have that position correspond to the index you want in that dye's array of ui images

#

It's just a way to organize and access data quickly. You shouldn't need to change any of the information about the dye on the data table/asset, just update It's current state

chilly geyser
#

Here are my editable variables that I currently have

#

I'm trying to envision what you're saying and how I would do it. Might take me a minute.

spice smelt
#

(in green correct calculations, in red unreal's calculations)

maiden wadi
#

UI can't use Timelines, as they're ActorComponents

#

@trim matrix Consider using the GetRealTime node when you start the cooldown. Save a float as GetRealTime+CooldownTime=SavedFloat. In the widget's tick function you can just do SavedFloat-GetRealTime to get the remaining duration of the cooldown.

spice smelt
#

nevermind I had lost a node in the forest

onyx token
#

hmmm so it seems like ActorBeginOverlap works, but only on other actors rooThink1

#

and not on the floor

maiden wadi
#

What are you trying to overlap the floor with?

onyx token
#

nvm, solved it, i forgot to tick "Generate overlap events" in the collision window

maiden wadi
#

@trim matrix

#

Nothing to do with Timers. Timers are affected by time dialation.

near wolf
#

hey guys, so I imported a working car to another map. But now for some reason some input buttons are not working - W and A. S and D work perfectly

#

why could W and A not be working?

outer pewter
#

@dawn gazelle this is the code for the remove array function.

#

how can i make it remove only one item from the array instead of all item of the same class

vital aspen
#

can someone help me with a drag and drop thing,

brazen merlin
dawn gazelle
# outer pewter <@!218956378654507008> this is the code for the remove array function.

Ok, so the issue is that using an "item" to try and remove from an array of structures is finnicky - you have to have the exact data within that structure. If you have more than one of that item, you'll end up removing them all, there's no way around that. It's probably working ok right now for your stackable items, but once you have two stacks with the same quantity of item, I imagine you'll run into the problem with that too. Instead, you may want to consider removing items from your array based on index of the item you're looking to remove rather than the structure of the item.

vital aspen
#

This is on my on Drop in the storage slots for something like a chest.

#

as you can see there's a Component Move Item.

outer pewter
#

im so confused haha

vital aspen
#

This runs on the drop comeing from the third person char. Then it runs a Move Item in the inventory component.

dawn gazelle
# outer pewter im so confused haha

An example, if you have a slot-style inventory, each one of those slots would exist as a reference to an index of the inventory array. When you perform say a drag operation, you would store the index of the slot you began dragging from. The drop function to trash the item, you would pass through the slot # of the inventory. Then when you want to remove the item from the inventory, you just remove the item at the index. Your array will still stay the same size, just you're saying remove whatever is at index #.

vital aspen
#

Last part. This is what happens and should happen, I don't think it setup right.

#

This should add the item(s) to the storage and remove them from the players slots. I keep getting a false return on.

outer pewter
#

i dont know how to add the index thing to my item or to the version of inventory i made from the tutorial

vital aspen
#

This is what should do the add to storage.

dawn gazelle
#

Your UI can read the item that resides in your inventory array by the index.

maiden wadi
outer pewter
#

my inventory slots are an array so i dont know witch one holds what

#

is it possible if i stream and show you my inventory setup and you can show me what to do if you have time of course.

maiden wadi
outer pewter
#

yes

maiden wadi
onyx token
#

well i was using static meshes, forgot to activate the button tho rooDerp1

maiden wadi
#

There is. It works the same as C++. It removes all instances of matching structs.

outer pewter
#

but i dont have an index in my item

#

this is how my item is added

maiden wadi
#

Okay. Does what you posted above work, but it removes too many things?

outer pewter
#

it works on stackables and remove only one item but when the item is non stackable it remove all items with the same class

#

like hp potion isnt stackable and i have 5 when i remove 1 all are gone

maiden wadi
#

Yeah, cause all of their data matches. So if you Find the index of the first one and remove just that instead of all five, it works.

outer pewter
#

its like its not just emptying a slot but all teh slots that have that same item

maiden wadi
#

Remove will remove all structs from the array that match your input.

#

RemoveIndex only removes that specific index.

outer pewter
#

how can i add an index to an item

maiden wadi
#

Why would you?

outer pewter
#

how can the array know the index if the item doesnt have one

#

sorry if i asked something confusing

maiden wadi
maiden wadi
outer pewter
#

i ll try it 1 min

#

like this ?

maiden wadi
#

That should work, yeah.

#

Should only remove one of your health potions.

outer pewter
#

you have no idea how bad this made me feel i was considering watching and making a new invetory system but its working now.

#

thank you all so much you're life savers

#

do i need to do the same thing to add or just when removing ?

verbal bobcat
#

Hi, So I have this problem that prob is simple to solve but I just cant figure it out, basically I tried to make a stamina system and as long as I had stamina a while loop will deduct stamina at a certain rate per second, but I get after like a second of running a infinite loop error what do I do to fix this or get something alternative for while that repeat doing this?

blissful grail
#

Use a timer to deduct the stamina.

outer pewter
#

i used a timer to call for the function that does the decreasing

blissful grail
#

What is happening though - you don't have an exit condition for the while loop. So, the loop will run forever.

outer pewter
#

and inside it i put a branch to only decrease if its above 0 so it will stop there

dawn gazelle
#

While loops are traps.

winter garnet
#

Hey yo! I created a custom Scene Component where I want to display a Static Mesh.

#

Is there any way for me to display something in the editor just for game designers?

#

As you can see, it shows nothing (as expected) - but I'd like to be able to display something in there โ˜๏ธ

#

Clues?

dawn gazelle
#

No necessarily just in the viewport, but also when looking at the world before game... there's a checkmark you can check on components "Hidden in Game"

winter garnet
#

๐Ÿค”

#

Well, that's not what I'm looking for.

#

But you gave me a great idea. ๐Ÿ˜›

dawn gazelle
#

ie. I have these displayed, but they don't show when the game is started.

winter garnet
#

I'll just inherit my Scene Component from a Skeletal Component

#

I think I expressed myself incorrectly, @dawn gazelle

#

I created a scene component as shown:

atomic salmon
winter garnet
#

And as you can see, there's nothing being displayed

maiden wadi
#

The widget where you are doing the cooldown thing.

#

Oh. Whoa. Wait. This is for gameplay code?

#

Why do you want the Barrage Cooldown to not be affected by time dialation?

#

This definitely should not be handled in a Widget. If you want the same thing, I recommend doing that same thing in the Character's Tick function instead of the Widget.

#

Yeah, but Widgets should not handle gameplay code, they should just display what is happening. Your character should handle it's own cooldown logic.

#

Right. And you want this cooldown to not be affected by time dialation, right?

#

Then you'll need to change that timer in the Character to a tick function. Or a Timeline as someone suggested earlier with IgnoreTimeDilation checked.

#

Yeah.

#

Timer is entirely useless here. You're looking to set a float of RealTime+CooldownTime, and then you check on tick if that set float - real time is <= 0. If it is, then your cooldown is done.

#

Tick runs once per frame drawn to screen. It's DeltaTime will be modified by the time dilation, but the event will still run just as often. So if you're not using the DeltaTime, you can still use it for non time dilated stuff like checking your float against RealTime.

#

@trim matrixYeah, and in all reality, you might not even need Tick.

#

Widget can use Default and Remaining time to get it's data for display. Other code can use the IsBarrageAvailable.

#

Completely time dilation independent.

opaque blade
#

Btw would advise putting a Max(x,0) behind calculating the remaining time

maiden wadi
#

Custom function.

maiden wadi
vital aspen
#

I fount out that the issue I'm having is in the inventory types. I can get the info on what item is getting dragged and from Where. How do I set where it's going too. Whats the destanation of the item. Or Direction.

maiden wadi
glossy bane
#

Is there anyway I can check if the engine culling is working for the instanced static meshes that I'm spawning? The amount of meshes is large but only 1-5 are ever on screen, but there is a considerable performance hit, and I'm suspecting the ones off-screen are not being culled

maiden wadi
#

What is a considerable amount of meshes?

glossy bane
#

I dont even actually know how many there are, probably a couple hundred

#

The performance hit is not noticable on PC but it is on mobile

#

Each one is around 4k triangles but I just figured it would be fine since only 1-5 are ever on screen

maiden wadi
#

Well, the logic still applies. You can set the cooldown where ever you like, such as at the beginning of the hold or after it ends or halfway through on button release if that stops it, etc.

final kiln
#

I made a level system, kind of standard, but I want the levels to be represented by names not numbers, how could I make the numbers become names (of my choice)?

blissful grail
#

Can use a data table. Then query that data table.

final kiln
#

I tried to use array, but it didn't work very well, the level 1 got all names from the array and the other levels had no names at all

final kiln
gentle urchin
#

Its not the containers fault^

final kiln
#

โค๏ธ

gentle urchin
#

Its flawed logic..

quartz pawn
#

so I got an issue. On the first row, the cast to Main_PS works as it should. On the second row, the cast to Main_PS fails. Anyone know why and how I can fix this?

maiden wadi
#

Have to create it yourself.

#

You have to create it yourself. Click the function and add an Output, or drag from the minus node and drop it on the return node.

spark steppe
quartz pawn
#

a array of player controllers

maiden wadi
#

Definitely need to ditch the idea of using controllers to identify players.

#

GameState->PlayerArray houses all playerstates in the game. You can get a list of players from there much easier than controllers and on any machine. And if the controller of that player is necessary, you can call GetOwner->CastToPlayerController

quartz pawn
#

so you can get a player controller from a player state>

spark steppe
#

regarding player controllers, does someone know if there are cases where more than the pc0 exists on a singleplayer game? e.g. with VR Controllers or Gamepad connected

#

or does unreal wrap them all on the same playercontroller?

quartz pawn
maiden wadi
#

Player Controller owns the playerstate. So you can get it from GetOwner and casting it.

quartz pawn
#

awesome the playerstates work

brittle wind
#

ive got a little question. so when i press 1-3 the character design changes. everything good. but if the player press 1 (he got the first character) he should not be able to press 1 again because he has already this char. when i press 2 he get another char und then you can switch back to 1st char. how can i code that in blueprint?

split dagger
#

Hi, I'm appending some strings together in a UI Function and I need line breaks. I've used "shift-return" in other blueprints before but it doesn't work in the UI function (where I bind the function to a text object). Anyone know how I could do this? I suppose I could get the "shift-return" string as a reference. But if you know a better way please let me know. Thanks

minor pagoda
#

How could I set a Map value by key?

brittle wind
blissful grail
#

he cant press 1 if its already "selected"
I've highlighted the important part in your statement.

split dagger
#

Use a variable and track which character he has. Then check if that character is already being used and if it's not being used then continue.

blissful grail
#

Generally speaking - if you just talk out loud the logic, you will arrive to your answer.

flat coral
#

I've got this BP that's just a scene root and a plane mesh, and the problem is, I can't select it in the level editor. Clicking just selects whatever object is behind it.

#

What's the best way to make an object like this clickable?

tawdry surge
#

Grab it from the world outliner instead

flat coral
#

That's exactly what I'm trying to avoid

tawdry surge
#

How often are you moving it?

flat coral
#

Well, I'm deleting it and replacing it a lot as I'm making it, once that's done I've got the 4 child versions of it to place in level, each of those will probably have to be corrected at least once probably twice. That's just my test level though, it'll all repeat when I make the actual game level they're in

#

So probably like... 20-30 times, minimum.

tawdry surge
#

Some stuff like lights, volumes, etc.. are just easier to grab from the the outliner. You can add a 3d mesh above it in the BP or something as a handle while building but I really don't think you can make it more sensitive to selection in general

dusky harbor
#

Heyyy! I am wondering how could i make for each loop for array with make array? Any ideas

dusky harbor
#

but it doesn't work , i want to make for every target the same thing. Right now is doing only for the 1. target

#

i would like to make it for as much actors as i want

maiden wadi
#

No, you're definitely doing that for all three. Your issue is that you're doing it for every component all three times.

hot lotus
#

Hi everyone, is there a way to spawn a textbox widget with text in it and all the text is already selected (something like a "ctrl + a" after focusing the widget), like the player has just to type to override the existing text

hot lotus
#

Oh yes sorry did not see the channel, thanks

dusk ember
#

are you able to discuss this now?

winter garnet
#

Is there any way to prevent UObjects from being garbage collected other than assigning them to variables?

maiden wadi
#

Out of curiosity. What are you trying to do with UObjects that you wouldn't want to put them in variables?

dusk ember
winter garnet
#

@maiden wadi

Pretty much I have an object called StartMatch (yes, not a noun) that when initiated, it displays an (async) countdown of 5 seconds before actually starting the match. Sometimes the GC was collecting it before the countdown finishes, so...

#

But I fixed it by creating a Set of Objects to temporarily prevent from GC on GameInstance.

eternal drum
#

Can i use the scroll wheel for inputs?

winter garnet
#

sO @maiden wadi

#

And when the countdown finishes...

maiden wadi
#

Any reason you don't just use a widget or something you could throw away?

spark steppe
#

@winter garnet some object flags like ASYNC prevent it

#

maybe also RF_Standalone (not sure about it tho)

#

but the Set might be better as you can keep track of them, and you can purge them all easily

trim matrix
eternal drum
#

how do you smotth floats?

trim matrix
tawdry surge
#

Change it in the gamemode

eternal drum
trim matrix
tawdry surge
#

Idk what that means. "Smooth out floats"

#

The gamemode is set in the project settings or world settings?

eternal drum
#

instead of the mgoing from o to 1 immediently, you could interpolate between the m to make them smooth

trim matrix
tawdry surge
#

Not what that is called..
Those are snapping options

#

Which one is it set in?

#

Project or world settings?

trim matrix
#

@tawdry surgeYES

#

and it's not working

tawdry surge
#

Thats world settings
In this case the player in the level must be set to auto possess player 0.

trim matrix
#

ok how?

faint pasture
tawdry surge
#

Open the player blueprint, under the class defaults in the pawn section

trim matrix
tawdry surge
#

Set auto possess disabled

trim matrix
#

thank you so much guys

normal yew
#

does anyone know how to rotate a vector to align with a normal

spark steppe
#

you can convert a vector to a rotator, and then use that rotator to rotate the other vector

normal yew
#

how do you do that in blueprint

faint pasture
#

Tada, the vector is now aligned with normal

#

The progress bar widget doesn't even exist?

#

You gotta be specific. When you say the bar doesn't appear at all, what do you mean?

#

Place a breakpoint in the widget BP where it fetches the CD duration and check where it's breaking

#

Are you sure or is it just filled to 0 percent?

#

I bet it had a transparent background.

#

Just start putting breakpoints all over and figure out where it's broken

#

Start with printing the value on the character to see if it's even working over there.

thin panther
#

No errors doesnt mean working

#

breakpoints help you step through code to see where it goes wrong

faint pasture
#

It means you need to dig around your code and use print strings and break points to figure out what the hell is different between this cooldown and your other three cooldowns

turbid cedar
#

Hello everyone! What's the best way to see where/how a function graph is called? When I "Find References" with right-click, the only result is the function itself

faint pasture
#

@turbid cedar there's a button to search for references in other blueprints as well

thin panther
#

so step through the code, and see where it goes wrong

#

narrow it down a bit

faint pasture
#

@trim matrix do you want cool Downs to slow down or not when time dilation happens?

#

For game design, I would want the cooldowns to respect the time stopping

thin panther
#

yeah cause otherwise you could just slow down time and spam it

nova flume
#

There should be an option in the right side that says something like 'in all blueprints' with a goggles icon @turbid cedar

turbid cedar
#

@faint pasture There is? All I see is this option here

#

OOOH I see

#

thank you guys

thin panther
#

fair enough ill take your word on that

faint pasture
#

By the way you can get game time ignoring time dilation

thin panther
#

but you still need to use breakpoints to find out exactly where things are going as unexpected

turbid cedar
#

If anyone else needs to know, you can search all blueprints with this button here

thin panther
#

ok

#

so progress bars only work from 0 to 1

#

so at 4 till 1, its gonna be full

#

then its gonna jump to empty

faint pasture
#

Ding ding ding we have a winner

thin panther
#

been there done that

#

what specifically isnt working now

#

step through it, see at which node things go wrong

#

breakpoints help you visualise what happens piece by piece

#

cause it happens waaaay too fast at runtime

faint pasture
#

Show how you tell the bar it's fill percentage.

#

Nope it's not that.

#

Show where you set the bar fill amount

#

Probably in some widget

thin panther
#

That looks like it isnt being normalized to go between 1 and 0

#

you can still manually set a float above that value

#

but im not sure why

regal crag
#

Is it possible to bend a skyscraper mesh during runtime in any way in UE4/UE5?

faint pasture
#

@trim matrix divide time by max time to get the 0-1 range

#

And you still have not showed where you set the bar fill amount

dawn gazelle
#

Percentage always requires a division.... 1 / 1 = 1 = 100%. 6/6 = 1 = 100%. 2/6 = 0.33333 = 33%
Current value / Max value

minor pagoda
#

Is there any "Need to know" when using this method to spawn an actor from an UObject?

vital aspen
#

anyone in that can help with a drag and drop.

faint pasture
#

Just ask the question. Unless that was the question

lean crest
#

could anyone tell me what is the '0' on the B input in this image?

vital aspen
#

when you drag something from like the players inventory and then you want to drop something, (Like into a chest). How does it know where it's getting dropped at.

thin panther
lean crest
#

ok, I'll try in there

flat coral
#

Is it possible to set the parameters in a material from blueprints?

dawn gazelle
vital aspen
#

Yes, that tells me where the drop is coming from. what tells it where's it's going.

minor pagoda
#

Is there a way to change an UObject outer from BPs?

vital aspen
#

@dawn gazelle

dawn gazelle
vital aspen
#

so if I hold the drop over, like the chest. That's tells the on drop detected where's it's going. Is that right

dawn gazelle
#

Press hold mouse -> OnDrag -> Create Drop Operation -> Move to other widget -> Release Mouse -> On Drop on Receiving Widget is fired

vital aspen
#

ok, some where this info is hidden. any idea how I can get this info. or to set variables to it.

dawn gazelle
#

The drag and drop operation itself?

vital aspen
#

No, I mean the info on where the on drop is dropping the item at.

dawn gazelle
#

When you're letting go of the mouse, the thing receiving the drop would fire its OnDrop function. You handle the drop in that object, whatever it may be.

#

You can cast to different classes of operations and only process the ones that it's meant to handle too.

#

If you wanted to pass data back, then your operation would need to pass a reference to the thing where the drag originated from, and the OnDrop on the receiver could then call a function on the source widget referencing itself as the thing where it got dropped.

vital aspen
#

ok, well sorry I don't under stand what your saying. How ever I did get it to work from what your saying. That's just a little hard to understand. Thank you

dawn gazelle
#

No worries, it's a bit hard to explain @_@

vital aspen
#

Yes, it is hard to do too.

#

This doesn't work the way it should work.

#

I need a simple sample of just how to do this. anyone know of a video. Something like pickups get added to the inventory (Player). Then you drag and drop them into a 2nd inventory. (Chest). Any ideas.

winter kettle
#

I have the following classes Foo Bar (child of Foo) ChildOfBar
Foo has a component, if I modify things on the details panel of this component I can still edit the component through Bar but the details panel is empty for that component in ChildOfBar is this normal?

tawdry surge
#

I've had the one where it says I don't have the input pin I just made.
Resetting the editor usually fixes it

#

That's odd. You can try deleting the generated project files (intermediate, saved, the other one i forget) and let the engine regenerate everything

turbid cedar
#

Can a player have both an AI controller AND a controller with WASD movement? I'm trying to make it so that the player can move with WASD, or automatically move to certain characters (enemies/friendlies) and either start attacking or open a menu on LClick

fair magnet
#

Can I get a Variable for World in ue4?
And would like my variable to be a dropdown to pick from levels I've made

marble agate
#

Hey guys, currently trying to get a little health bar on my widget component and it isn't showing up whatsoever. It does show when its set to world space, but screenspace just doesn't work. I'm on 4.27

tawdry surge
#

Are you ever adding to viewport?

marble agate
#

Normally I never had to do that for widget components. I am starting to discover its based on when my character spawns in.

#

Basically my setup consists of choosing a class, and then spawning, which means the main player doesn't actually see it, this apparently makes it so the spawned class doesn't see it either.

tawdry surge
#

If you're adding to screen space then you have to tell it which screen and add it

marble agate
#

Alright, I'll give that a go

tawdry surge
#

3d widgets in world space already have it added to the widget component directly

marble agate
#

Ooh, I see.

#

Ahhh okay, yeah that worked. I was trying to reference my old Tower defense game that used this same method, except the enemies were spawned after the player was, so thats why it worked fine there.

tranquil abyss
#

-Im new ish to unreal engine and I have a Issue

So I have A Sword Class blueprint that is responsible for my taking and doing damage components in a few places. I'm wondering what the best way to make is so It casts the weapon that is in use Because right now it only casts to default sword

#

2 examples

#

For further explanation, If I duplicate this class and use it

#

it does not work Because its is not specifically the DefaultSword class

#

Should I make a parent class and cast to the whole class

#

and make the weapons the childen

#

-I hope my problem makes sense

tranquil abyss
#

Im gonna need to figure that out

tawdry surge
#

You want a BP interface call from the weapon to the hit component and use that to pass the damage of the current weapon and do whatever

#

You can do the casting route as long as the info you wanna access is also part of the parent class

tranquil abyss
#

So having a damage value for each weapon would not work as part of the child class

#
  • So would the logic for the, lets say weapon pick up need to be in the Parent class and that just gets inherited to the child
#

Also blueprint interfaces confuse the hell out of me

trim matrix
#

What

#

Parent class can be called MasterWeapon

#

On master weapon, you have a variable called WeaponDamage

#

Now every child of MasterWeapon has the WeaponDamage variable automaticly

tranquil abyss
#

you know I make a Child class of the blueprint and the variables were not their

trim matrix
#

Just type, Get (VariableName)

#

they are there

#

they just are not on the side

tranquil abyss
#

dont be that way dude im learning

#

I started this a week ago

trim matrix
tranquil abyss
#

I get generally the info I need tho

#

Hopefully I can string it together tomorrow

#

thanks

marble agate
#

Damn

dawn gazelle
vital aspen
#

just sent a friend request

faint pasture
#

That's why I always cringe out of my skull when I see a tutorial starting with UI. Start with your data, then add your behavior, then add fluff/UI/UX

fervent temple
#

having trouble getting my projectile damage to work

#

this is what should be run when the projectile hits my character

#

^theres my projectile code

#

ive tried so many things and been stuck for days and just havent been able to get a read out from the print string

stable osprey
#

hey quick question, does a pawn have to be possessed to use the AddMovementInput node?

brazen merlin
# fervent temple

that looks right... that is: Overlap > Switch Has Auth > Cast > IsValid. What's the collision setup?

twilit heath
#

does your overlap event ever execute?

fervent temple
fervent temple
twilit heath
#

let me guess

fervent temple
#

both in the projectle bp print

#

and it tells me the character name

twilit heath
#

if your listen server hosts shoots someone

#

it works

fervent temple
#

let me see

stable osprey
twilit heath
fervent temple
twilit heath
#

its not a difficult test

fervent temple
#

that never gets fired

stable osprey
fervent temple
#

it should print 20 in dark blue but nothing happens

#

also this is its spawn in the character bp

twilit heath
#

projectiles aren't one of the classes that can typically send RPCs

#

only objects owned directly by a player controller can send or receive client RPCs

fervent temple
#

hmmmm

twilit heath
#

if you try with an object that doesn't fit that constraint, you'll get a "No owning connection for..." warning in the output log

#

for a listen server host though, that shouldn't matter

fervent temple
#

yeah and didnt work on listen server nor on my ai

#

so the damage node doesnt fire

#

but everything before and after does

twilit heath
#

you also have a wrong wire connected to DamagedActor

fervent temple
#

it shouldnt be other actor?

twilit heath
#

you connected get owner

fervent temple
#

well it dont work either way lol

#

prints both of my strings in the projectile bp

twilit heath
#

that is client shooting

#

what are your play in editor settings?

fervent temple
fervent temple
twilit heath
#

that is dedicated server running

#

switch to Play as Listen Server

#

then try shooting with the host

fervent temple
twilit heath
#

generally

fervent temple
#

OOP

#

it does work

twilit heath
#

you want to send RPCs through an object owned by the PC

fervent temple
#

so it only works when sent by the owner of the listen server how do i fix that

twilit heath
#

your PlayerController, PlayerState, PlayerPawn or anything that had owner assigned as any of those

#

you do have a weapon actor?

fervent temple
#

this is a magic fireball projectile tho

twilit heath
#

well, if you move the server deal damage event inside say Pawn

#

your third person character

#

then access it from the projectile and call it on the Pawn

#

it will work

#

as Pawn can send RPCs

fervent temple
#

so use the get player pawn

#

call the event?

twilit heath
#

uh no

#

you should stay away from those GetPlayerSomething[Index} functions

#

there is another thing

#

overlaps happen on server and client

#

the moment your overlap handler passes through that HasAuthority check

#

your execution is server side only

#

so you don't need RPC to start with

#

you can just connect ApplyDamage to the end of that overlap handler

fervent temple
#

ok so i just connect the begin overlap directly to the apply damage node?

#

im just a lil confused

distant dagger
#

how would I make a trigger notice an object as a player?

twilit heath
#

i do believe you did break your projectile spawning a little too though

#

as your logs past the switch authority should never start with Client 1

#

unless that client spawned the projectiles locally

fervent temple
twilit heath
#

in which case it has authority over them, but they aren't replicated in any way

fervent temple
#

my client spawns them i believe

twilit heath
#

HasAuthority != IsServer

fervent temple
twilit heath
#

yeah

#

you'll want to calculate the projectile location and trajectory

#

then RPC that to server

#

and let server spawn them, replicated

#

its not an approach i would consider for a production level game

fervent temple
twilit heath
#

but this looks like a learning project so its fine

#

so

fervent temple
twilit heath
#

InputActionAttack -> you calculate the position and velocity of the projectile -> you send a Server RPC with that information -> Server RPC spawns the projectile

fervent temple
twilit heath
#

yes

fervent temple
#

why is this bad for a production level game

faint pasture
#

The projectile won't appear on the clients screen until the rpc makes it to the server and the replicated projectile makes it back.

fervent temple
#

got it

#

thx

faint pasture
#

Ping + processing

fervent temple
faint pasture
#

So probably ping + a frame

distant dagger
#

how would I make a trigger notice an object as a player?

faint pasture
lilac storm
#

hi guys , Why Get Actor Forward Vector giving me a forward vector in Local space ? definition says it gives you in World space

#

Value is always (1,0,0) no matter you move it , or rotate it

brazen merlin
#

that would be it's facing direction in world space

lilac storm
distant dagger
#

could some show me how to cast overlapping actor to YourPlayerPawnClass on overlap

turbid cedar
#

Can a player have an AI controller and a normal controller (WASD on the keyboard to move) at the same time?

dreamy basin
#

Hy can ayone help me i want to launch my character where my line trace end

faint pasture
woven ermine
#

hey guys anyone knows how to make a single key toggle between multiple custom events ? what I did doesnt work because it calls both of them at the same time, and I want it that each time I press they key it toggles between them

#

i.e: Press "change time of day" once, it fires of the "dusk" event, press it again and it fires the "night" event and so on

gentle urchin
#

Flipflop

#

or a switch on byte/int where you increment and reset it at your discretion

#

if its just two events then flipflop

woven ermine
#

DOH

#

i knew it, i just forgot the name >< thanks so much man!!

#

@gentle urchin thanks so much

#

I had brain lag

gentle urchin
#

No problem!

zealous fog
#

You can also make an enum and the switch on that enum. Its useful if you dont wanna have to remember which time is 0 and which time is 1 etc

gentle urchin
#

Good point^

#

Im so used to not having enums in my dayjob that i tend to forget about them ๐Ÿคฃ

bright frigate
#

erm Dart maybe lol but dunno if it's used for games

#

as far as I know, maybe they've introduced them now!

gentle urchin
#

programming languages for logic controllers based on older IEC standards

#

Not sure when Enum was actually added to the supported data types in IEC 61131-3, but it doesn't exist in GX 7, but does in Codesys 3.5 atleast

bright frigate
#

when I was in Finland we had to use (and still have to use) a programming language that is completely dead, but the elevators there in small towns only use that language. There is no support page, no nothing since at least the 80s or something lol. So that's another language still in use which probably doesn't have 90% of features available today haha

still delta
#

Morning peeps, looking for some help. Wondering why my Main Menu UI won't remove itself once I load into the next level after clicking "Enter" on the widget. It's a basic menu at the moment, so I didn't expect to run into this problem. Main Menu lvl uses basic game mode with no overrides, and the Alpha Level uses Main Game GM, so my game's UI appears but the Main Menu UI itself doesn't disappear

gentle urchin
#

Widgets gets cleared on Open level,

#

so no need to explicitly remove it

#

It sounds like its being created again in the new level

still delta
#

Yea that's what it looks like... I removed the Remove from parent node n the problem persists. I don't have any code for this UI in my player character so idk where else to look xS

gentle urchin
#

Right click the create widget node , find all references

#

Then clikc the binocular on the right side of the search bar

#

Should give you all create widget events , if there are several..

#

If not double check that you're using the right classes..in the gm

#

Wait what do you mean by main ui shows, but not mainmenu ui?

#

Perhaps i misread the post ๐Ÿ˜…

still delta
#

seems to be the only one

#

oh I can show you lol one sec

gentle urchin
#

Mainmenu levelbp spawns a widget , which might be the game ui ?

#

Makes more sense if its main menu widget, so i guess thats what it is

#

Cant see which bp your code resides within

still delta
#

I have code in the uh, main menu lvl to spawn the UI, then obv the code in the UI BP itself to close it once i hit enter

gentle urchin
#

What widgets are created in Charbp?

#

PCChar or whatever

still delta
#

just the player HUD as far as I'm aware, I'll revisit it in a sec here

gentle urchin
#

There are 3 widget creations there

#

So...

still delta
#

Oh uh... yea character UI, esc menu and inventory so far

#

it's my first project lol so going with basics

#

Yea i just checked them, they all call the proper widgets with no random references to this other UI

gentle urchin
#

Hmm..

#

Well in the event construct of the main menu widget

still delta
#

Should I not use begin play in the level to create the widget?

gentle urchin
#

Add a print message

#

That says "i got created now"

#

See if it triggers again after open level

still delta
#

alright one sec

#

yep, something's going on. the string prints when the alpha level loads

gentle urchin
#

Now to source the culprit...

still delta
#

I was thinking maybe the game modes but I checked. Just a default game mode used in main menu lvl and the only thing changed in the alpha level for game mode is the player character

wary tinsel
#

is it normal that on a new empty level (I litterally just created the landscape and set a directional light) I have 64 unbuilt objects???

#

ah my bad ๐Ÿ™‚ I thought it was counting in a different way thanks!

#

on an empty level, with no game mode or stuff when I hit simulate the engine crashes, what could cause this?

topaz plover
#

Is there a way i can hit a key to export the last 5 seconds of gameplay as mp4?

topaz plover
#

at run time

#

im looking for a way to facilitate early player feedback

#

and take my own clips for trailers at runtime ๐Ÿ˜„

spice smelt
#

if i do something like this, will the condition read the updated value each time, or it will keep the same boolean state that was read the first time?

icy dragon
# topaz plover at run time

Well, since putting editor code isn't really allowed for shipping, you'd have to go the C++ way and using third party libs (FFmpeg seem to be a good choice) to assemble videos from frame renders of demorec, and if necessary, record the audio in separate pass

topaz plover
#

each node is real time afaik @spice smelt id expect that to update. have you tried printing out inside the loop to check?

#

when in doubt, print everything ๐Ÿ˜„

spice smelt
#

yeah

#

except unreal crashed

#

lol

topaz plover
spice smelt
#

but didn't get stuck so not sure if infinite loop or just unreal being unreal

icy dragon
topaz plover
#

just set it to false and run it again.

#

if it doesnt crash, then the loop is crashing it

#

condition for the branch, infinite loop as you said

spice smelt
#

ay ok infinite loop confirmed ๐Ÿ˜

topaz plover
#

@icy dragon ok thanks! I'll look into it. familiar with ffmpeg but not so much C++ ๐Ÿ˜„

#

(sorry for confusion there)

spice smelt
#

lol somehow i forgot the while node exists, problem solved ๐Ÿ˜†

azure bolt
#

Hey I have a problem with removing foliage instances, or changing the transform of instances. I have it working, but I get a lot of lag when there is a lot of meshes (grass in my case) and I harvest one at runtime. Its exactly the same issue as this guy. https://answers.unrealengine.com/questions/464484/view.html

but the only answers are from 2016-2018 and they seem to be that there is no answer. Is there any updates on this?

stable onyx
#

Anybody know if there's a way to default to opening blueprints in the Full Blueprint Editor? I'm getting tired of it starting in data only mode every single time ๐Ÿ™‚

swift yarrow
#

Hi everyone, I have an issue regarding widgets. I build a search character widget that needs to be accessed from other widgets across the game, I thought the solution to that would be to just add the search char widget as a child of the others and access it from there, but the search char widget contains instantiated buttons that need to add text to the search widget. They populate their scroll box ok, but when clicked, the button throws an error saying it can't access the widget.

#

Using V.26.2. Any help on this will be greatly appreciated, I've been struggling with this for two days now.

errant sage
#

Hello devs, I am not sure where exactly to ask this question as there is no channel specific to optimization. Let's say you have a car and the material for the brake lights needs to turn on emissive every time the brake is pressed. I see 2 options: 1: Change material instance to a copy that has emissive on or 2: keep the material instance but instead adjust the emissive parameter from 0 to x amount using a parameter collection. Which one is more optimized and why?

dawn gazelle
#

Or at least, connect it to it's parent's begin play in case it's a child class.

zealous fog
#

@errant sage I would imagine changing the parameter would be more performant because your gpu is handling one fewer material but someone more knowledgeable than me should probably confirm haha

dusk nymph
#

why do i cant drag the variable ?

broken quiver
#

Ehh how do I turn on the collision of my skeleton and access its value?

dawn gazelle
# swift yarrow Hi everyone, I have an issue regarding widgets. I build a search character widge...

Your code you've shared seems like all it would be doing is setting whatever text value is stored in your "Search Button Text" variable from your I guess button, into the "Search Result Text" within "UI Tanda Database" widget which should work without any issue, so long as there is a "UI Tanda Database" widget that exists, but this wouldn't update any text fields of widgets unless you have their display bound to the variables.

Not sure if this is relevant, but if you're nesting widgets within other widgets, sometimes you need to remove and reinsert the widget if you made changes to the coding behind it.

dusk nymph
zealous fog
#

Have you tried compiling

dusk nymph
zealous fog
#

Just remake it by dragging of a pin and promoting to variable

swift yarrow
dusk nymph
dawn gazelle
swift yarrow
#

And it worked

#

What the hell

zealous fog
#

Wait am I looking at it wrong or do you wanna place a variable from one class in the event graph of another graph

swift yarrow
#

Thank you so so so much @dawn gazelle

zealous fog
#

That's not possible you'll need to access it another way

#

But maybe I'm not seeing it correctly

#

Not super familiar with ue5 ui

dusk nymph
zealous fog
#

Looks like a bug to me

dawn gazelle
#

Dividing anything by 1 is basically pointless as you'll always get the same value out.
1/1 = 1. 2/1 = 2. 256/1 = 256 etc...

Current value / Max value gets you a percentage.
Eg 1 /1 = 1 = 100%. 1/2 = 0.5 = 50%, 2/4 = 0.5 = 50%, 1 / 4 = 0.25 = 25%

dusk nymph
zealous fog
#

Maybe I dont have a clue I'm sorry man

dusk nymph
dawn gazelle
#

The max value of the bar is 1. The point is you're trying to convert something that isn't equal to 1 (your maximum cooldown time) to equal 1 when the bar is supposed to be full.
If your cooldown is 6 seconds, you know that it's full when your cooldown timer is at 6 seconds as 6/6 = 1 = 100%.
If your cooldown timer is at 3 seconds, then it would only be half full as 3/6 = 0.5 = 50%.

odd ember
#

everything is affected by time dilation

#

it's a scale value on game time itself

grim peak
#

Hi all... I'm looking into ways how I could change background elements (these are props like box,tube,sphere,, but they need to be randomised. Would this be BP thing? or more in the line like Foilage volume perhaps,, with Foilage Types.. make different type...and the simulate in the Procedural Volume. I just need it for different BG... but need different setup. Thanks so much. ideas welcome.

nocturne stirrup
#

Can anyone point me in the right direction? I'm trying to implement a camera system with more than 2 positions, but I'm having trouble making a counter that will loop between them.
I'm trying to get a First person, a close-up over the shoulder, a regular 3rd person follow, and a DISTANT 3rd person follow.
The main hurdle is the camera switching.

tawdry surge
#

Array or switch
Or for the distant camera you could just adjust the length of the spring arm with a lerp/timeline

odd ember
#

just so you're aware as well, catering for that many different cameras will make your environment look weird to scale

nocturne stirrup
#

I'll figure that part out if/when I figure out cameras

odd ember
#

it's not something you just "figure out"

#

it's a choice that will affect everything

nocturne stirrup
#

#YOLOcodeIdkwhatimdoing

odd ember
#

first person and third person alone will need different sizes

#

nevermind the other different cameras you want

#

maybe consider what cameras are actually relevant for your gameplay

nocturne stirrup
#

So how exactly does it make the scale look off? Is it the camera FOV? Cuz that can be changed right?
I'm thinking of the cameras in RDR2 and GTA

odd ember
#

the camera is part of the player character

#

so if the player character is in third person, you can have issues with entering new rooms in buildings for instance, because there will be situations where the character has entered the room but the camera hasn't

#

so you can end up having the character hit the wall on the other side of the room before the camera is inside the room

nocturne stirrup
#

Oh that

#

Pretty sure the spring arm can be set to squish in to fit if the player has like a wall to their back

odd ember
#

nah spring arm won't solve this for you

nocturne stirrup
#

Also Advanced Third Person Camera has blueprints for turning things transparent between the player and camera

odd ember
#

professional projects have this problem all the same, and they require difficult decisions about scale being made

#

doesn't matter

#

you're still going to have that problem

#

it cannot be solved by code alone

nocturne stirrup
#

Yes but games actually do have 5he 3rd person camera squish in to avoid objects
Like it is a thing that can be done

#

Just a matter of figuring it out

odd ember
#

that doesn't mean they haven't already scaled the environment to fit

#

well good luck if you think you can single handedly solve a problem that is one of the core game design problems in the industry

#

I like your bravado

nocturne stirrup
#

Ignorance is bliss! :D

#

But probably set it so that if the 3rd person camera squishes too much it just smoothly slides into the close up or even 1st person mode until there is enough room

queen flicker
#

Does anyone know if there is a way to use an integer counter to dynamically add slots to an array? I am using a 'Do N' node to spawn a beam particle a certain amount of times and I need to keep them in an array so I can destroy them after a delay outside of the function.

odd ember
#

this is what I am telling you

#

it doesn't matter what you do with the camera

#

there are other factors you have to take into account

deft leaf
#

actor Object Reference is not compatible with the Player Start Object Reference?

odd ember
deft leaf
#

But in this tutorial

odd ember
#

tutorials aren't flawless

#

they are often made by people who don't know what they're doing

#

you can change the array type to be of the PlayerStart type

nocturne stirrup
odd ember
#

so you can either listen or fail and understand why on a personal level

#

your choice

deft leaf
nocturne stirrup
#

I'd listen but I want more explanation. Like why can't a camera solution be enough? How do games with proper real life scaling do 3rd and 1st person then? Because they seem to pull it off just fine.
I'm just confused because many of the games inspiring me to mess around with unreal do what it seems you are saying is impossible

odd ember
#

very few games do real life scale

#

I don't know of any on the top of my head

#

they make it seem real life scale, but it isn't

nocturne stirrup
odd ember
#

lol

#

arbitrary

nocturne stirrup
#

Not to someone who doesn't know

odd ember
#

either you want to listen or not

nocturne stirrup
#

Also it would be cool to see an explanation of how that "scale trickery" works if I haven't pissed you off enough yet

odd ember
#

everything I've told you will allow you to figure that out

#

it's literally right there in text if you read it

waxen sorrel
#

I'm trying to get the direction to my pointer and move there, but when I start moving in X/Y my direction start to flow in every direction, someone knows a way to fix it ?

nocturne stirrup
#

@odd ember
Like I said, maybe it's obvious for someone who has more background knowledge.
You have been giving me some of the fastest responses to questions I've ever recieved so believe me, I'm trying to follow what you're saying.
But really, there's 3 things you've taught me.

  1. Players can hit the other side of a room before the camera enters
  2. Changes in scale are done to help this (What those changes are and how they still look normal is not explained)
  3. Other factors are involved (No further explanation)
    I'm simply asking because I don't know. I'm looking at what I see in games that have been produced, and I'm looking at what you are saying and there is a disconnect.
    You're bridging the gap but not completely, and you are getting frustrated with me for not understanding an incomplete explanation.
    I'll gladly watch a YouTube video instead if you have a link, because so far I haven't found what I'm looking for.
dawn gazelle
odd ember
# nocturne stirrup <@224571781862653952> Like I said, maybe it's obvious for someone who has more ...

well think about the problem that I've laid out before you. I've not explained it deliberately because you can think about the problem to understand how to solve it. I don't know your exact specs for camera either, so it's not like I can give you a 1:1 solution that will work for you. like I said, the environment plays a role. those are the other factors. FoV can play a role as well, since it's a function of how much screen real estate you are giving to the player, and at what distance.

if you are expecting a finite solution to one of the most common and arguably, one of the greatest problems in game design, then you are in the wrong business.

#

this is generally also known as the "3C" problem - camera, character, controller

spice smelt
#

Is there a way to make a loop with continue in blueprint?

while(...)
    {
    if(...) { continue; }
    ...
    }```
worthy carbon
#

hi, can someone explain me how to create and inventory? (WITH HOTBAR) i want to learn how!

faint pasture
worthy carbon
#

Okay! thanks

queen flicker
# dawn gazelle I believe the return node stops execution of the function. Do you need to use Do...

I think the add node is what im going to need. Im using the Do N for a couple reasons, I originally had written each spawn emitter out individually and it was getting to be a hassle so I figured the Do N would help me reduce the amount of nodes I was having to add. The second reason is that i'm making a system where I can add new types of weapons as easily as possible, so for shotguns and burst guns that spawn 3, 5, or however many bullets at a time, I can just plug that number into my function and have it spawn the needed amount of particles, etc.

#

as you can see here, my original system worked, but was not efficient

#

what ill do is create just create that local variable array in the function itself so it creates and updates everytime i run the function. Should do the trick, thank you very much! @dawn gazelle

dawn gazelle
#

You'll need to get rid of the Do N and use a for loop. The return node stops execution of the function.

maiden wadi
#

Of course this won't stop sequences. If you need that sort of power, you need a function to return from.

queen flicker
#

or rather, the array was only 1 item and i wasnt sure how to use the integer value to increase it during runtime

spice smelt
#

Guess ill go the subfunction return route, thanks

fierce grove
#

hi everyone! i've added a dialogue system to my game that checks from a data table for the text but now i want to add in a simple quest system like spyro where the dialogue only changes if certain conditions have been met (i.e. the player collects a certain amount of fish or kills all the enemies on the map) can someone help explain how i'd start going about this or does anyone know a good tutorial i could follow to learn?

queen flicker
dawn gazelle
# queen flicker

This logically doesn't make a lot of sense.... You have a Do N node that will execute the logic N times. Then at the end, you have a loop doing nothing I'm guessing N times as well?

queen flicker
#

there might be a redundancy, all I know is that it's now working and everything is being updated and destroyed properly

#

rounds per shot is the counter that replaces the input from the function you showed in the screenshot

faint pasture
#

As with almost everything, start with the data. Make a Quest struct and think about what information should be in it. Start simple, quest objective handling can get really complex really fast.

fierce grove
faint pasture
#

You'll probably want some sort of central handler which can filter and keep track of all the events. Like for a kill quest, everything that dies would tell the handler "I died and Player killed me at x location". The handler can then check if any of your quests are tracking that mob type etc and update stats accordingly.

golden echo
#

can I call a construction script on another externally?

gentle urchin
#

Not really

#

You can wrap it in a function and call that

golden echo
#

can you? ok let me try that

#

thank you!

#

oh yes! perfect. thanks

zealous fog
#

<@&213101288538374145>

torn kettleBOT
#

:no_entry_sign: SHA3DOW#6851 was banned.

balmy vessel
#

not sure if anyone has encountered this but I have a custom scene component ive placed on a blueprint with a child box component. When I place this into the level it wont let be change the instance of the blueprint's box component size, it'll just snap back to the default. Any ideas why?

#

trying to change the box extents but they snap back to 32 each time

glass stump
#

Would it be wise to create a BP of a lamp and a light together?

#

oh no, haha, just want to keep my lamps, etc, organised and don't want to have to put a light for each and every lamp manually.

short bramble
#

Hey! does anyone know a function to know the name/string of the sublevel an actor belongs. Actors are not spawned, but they exist in potential sublevels that could be loaded or not (since they are procedural).
I don't find a simple way of getting that data, while you can easily see it in the outliner while playing/simulating.

rancid cloud
#

How to implement soft object reference?

#

I use asynch node then cast but it fails

glass stump
#

Ah, thank you, good to know! I wasn't sure if this was the standard way of doing it, or if there was a better way.

rancid cloud
#

Can someone show how to use soft object ref sample in a bp?

#

Do you have sample link?

rancid cloud
#

I read somewhere that it helps in loading

short bramble
#

hey, thanks for the answer. It is basically a AI spawner that is part of a streamed level. The owner of the spawner gives a null, and if I get the level spits out the persistent level, never get the name of the streamed level.

dawn gazelle
#

When you have hard references, you are loading those things into memory Soft references prevent you from having to have everything loaded into memory all at once.

rancid cloud
#

Thank you. But are soft object ref. usually used for textures?

dawn gazelle
#

They can be, if you have a lot of them.

rancid cloud
#

I tried using it in a bp (with skeletal meshes, code, etc) and use soft ref.. then used the asynch load asset node then cast... but it fails always

#

So i got the impression that soft object ref are just for texutres/cosmetic

#

I dont why

dawn gazelle
#

What type of soft reference were you using?

rancid cloud
#

I'll open my laptop ๐Ÿ˜†

jolly island
#

Hello, does anyone have an idea why enable input node doesn't work for me? I have a stun mine that's just begin overlap, play montage, disable input, delay and enable input. The other nodes work fine but the input is not enabled at the end.

dawn gazelle
jolly island
rancid cloud
#

like this one..

#

it always fails

#

Dummy Var is already soft ref object of "Cartridge OG"

#

ahhh

#

sorry

maiden wadi
#

Cause you didn't wait for it to load.

rancid cloud
#

let me reedit

novel silo
#

Hi, I need some help. I'm an API developer and I'm experimenting with JSON data with unreal. I'm using varest to make the request but I want to move the data to umg widgets. Trouble I got is that the request works fine in blueprint because can make a callback when is done, but I don't know how to do that with a widget, How do I wait for the data to be downloaded to then show it in the widget?

dawn gazelle
rancid cloud
#

sample

dawn gazelle
rancid cloud
#

still fails

dawn gazelle
#

What type of soft reference is it (skeletal mesh?)

#

Or is it just a blueprint?

rancid cloud
#

just a sample blueprint i just made just now

#

I'm not sure if my UE4 is broken

#

it just a defaultsceneroot

mellow folio
#

are you sure the variable has a value?

dawn gazelle
#

So it doesn't make a lot of sense I don't think to soft reference a blueprint.... Blueprints get instantiated when you need them as it is. you'd use a blueprint class soft object and feed into a spawn actor node.

#

I believe.

rancid cloud
#

the variable has value of "none"

rancid cloud
dawn gazelle
mellow folio
#

he's not really right, you can soft reference a BP if you want, you can soft reference most anything, but doing so can be meaningless if that thing is already in memory in your game environment, which I assume is what he meant

dawn gazelle
#

Blueprints aren't really objects in the game world.

#

There are actors that are spawned in, those are the actual objects.

mellow folio
#

Flaming, that soft reference variable has to point to something....

#

it can't be none

rancid cloud
#

hard to find good soft object articles/youtube vid.

rancid cloud
maiden wadi
#

Because it's a topic that requires other understanding and not just hooking up lines to make something do something neat. You can't get easy youtube viewers with that.

rancid cloud
maiden wadi
#

Do you know what a Class Default Object is?

rancid cloud
maiden wadi
#

To understand soft pointers, Class or Object, you need to understand what a hard pointer is, and what the CDO is, as well as a vague understanding of how Unreal handles garbage collection. Without those three fundamentals, we could talk all day about soft object ptrs and you won't get it.

rancid cloud
#

i understand class, object, and hard and soft reference. I'm trying to review structures

#

that's why I'm trying to implement soft object ref. on my bps

#

as i've recently learned that casting would load a lot of things if not properly implemented

#

and recently learned about soft object ref. so that it won't load all things at once

novel silo
mellow folio
rancid cloud
#

I've watched the unreal "demystifying..." video but I can't do it for a soft object ref of a Actor BP. Casting always fails. Now, i'm having impression that the "async load asset" node is just for texture/material

mellow folio
#

The reason the variable is empty, the reason you can't select anything to put in that field - you'd have to tell us more about that variable, what type is it?

mellow folio
maiden wadi
#

Hard Pointer is a memory location. When you create a new object, you store it as base data in memory. Hard pointer is a number id that lets you find this data where it's stored in memory for that instance.

Class Default Object (CDO). For every object you intend to instantiate or use, there is a CDO. To spawn an actor, it's CDO must exist as spawning is largely copying this CDO into a new instance.

The reason you need to know this is because when you don't point to a class or asset via a hard pointer in Unreal, the CDO will be garbage collected. Thus nothing to copy. When you use SoftObjectPtrs or SoftClassPtrs, they do not hard reference the object's CDO, so the object can get garbage collected. This is on purpose. So to use that actual object, you have to load the CDO, and this is what your Async loading is doing. Soft pointers have a path to the location on disk where that object is located, and it uses that path to load up the CDO so that you can actually use that object from them on. If you then do not use it, or you remove all hard pointers pointing to that object, the CDO gets garbage collected and released from memory.

dawn gazelle
#

A blueprint soft reference is similar to a standard object reference, save that the item isn't loaded into memory automatically.
If you have a variable of an object, let's say it's of "ThirdPersonCharacter" type, that object isn't automatically populated with a reference to your "ThirdPersonCharacter" blueprint - you have to populate that variable yourself with a reference to an actual spawned "ThirdPersonCharacter" that exists in the world. Third Person Character objects don't really exist unless the game is running, once they are spawned, then they exist, and they can be set in ThirdPersonCharacter variables.

So, now if you're dealing with a soft object reference of "ThirdPersonCharacter" you have the same issue - you still need that thing to exist before you can actually reference it somehow, but again, before the game starts, Third Person Character objects don't exist. So a soft object reference to a Third Person Character can't exist, as you have nothing you can set to them.

If you were dealing with a Skeletal Mesh.... Then you could absolutely use the soft object reference as it's referring to the mesh object that your project contains, so it exists. It's not specifically an object in your game, but it is an object that the engine knows about.

maiden wadi
#

The complexity of this topic is also the reason people are so uppity about Casting in general. Casting is perfectly fine if you understand what you're doing and how you're setting up your classes.

mellow folio
#

Flaming try changing that variable from a Soft Object to a Soft Class

#

should fix it

rancid cloud
maiden wadi
#

Interfaces are largely pointless and a terrible direction. All they do is create more work.

mellow folio
#

interfaces are commonly used and will work fine for what you're trying to do

maiden wadi
#

Relying on interfaces to solve the problems that you should be solving with a correct inheritance chain is just bad programming.

#

It really doesn't matter if you have 10,000 core classes loaded if they don't reference heavy assets. They're tiny little miniscule things that take up nearly no memory. The only time you need to worry about avoiding that is when you start adding meshes, materials, and whatnot to classes and then casting to them. Which is why you don't do that and you create a non visual base class you can cast to.

rancid cloud
mellow folio
#

you sure you're casting to that class, or a parent of it?

rancid cloud
maiden wadi
#

Did you ever set a value in that soft pointer?

rancid cloud
#

just made sample here for the topic

mellow folio
#

off the COMPLETE node

rancid cloud
maiden wadi
#

What is CartridgeOG

lean thistle
#

I downloaded a level from online and im trying to play with a character in it. The level has a cinematic camera thing going on when you start the level, but i want to disable it. Any ideas?

maiden wadi
#

What type of class is that?

mellow folio
#

change the variable to a SoftClass, you have it as a SoftObject

dawn gazelle
#

It's just a blueprint...

rancid cloud
maiden wadi
#

But what is it? What are you using it for?

rancid cloud
#

it's really just a sample blueprint

maiden wadi
#

Okay. Lets take the discussion somewhere more theoretical to give better examples.

mellow folio
#

I assume you want to Spawn an actor from this? In which case you need to stop ignoring me and change it to a SoftClass instead of SoftObject so we don't all have to sit around arguing about this all day.

dawn gazelle
#

You can't use blueprints directly as soft references and async load them. It doesn't make sense as you normally spawn blueprint objects from the class.
You can use blueprint class soft references, and use the "resolve" to get a reference to the class, then spawn the blueprint object you're trying to use.

maiden wadi
#

Take a game like Fortnite. Every player character is the same. You all play with the same class. The only thing that changes is your skins. So there's no point in soft classing the character class. Instead, you SoftRef the Skins, the skeletal meshes.

On the other hand, consider a traditional fighting game or a game like Overwatch where characters can be insanely differing but still have lots of similarities like taking damage and such. You do core gameplay work in a core Character class. But inputs, moves, meshes, etc you can place in a child of your core character class and softref this new child class and only load it when you need to.

#

For the first, where you're soft reffing assets, you use SoftObject pointers. For the second you use a Soft Class pointer.

maiden wadi
#

Like Datura pointed out, your Cartridge is a class, like the Characters I mention in the second example.

#

Class is still empty.

mellow folio
#

What is the variable value set to? It's probably empty

rancid cloud
#

yeah... @maiden wadi and @mellow folio . This one I don't know how to set a value

maiden wadi
#

Click the pink node, and change it in the details panel.

rancid cloud
#

fudge.. I feel stupid

#

thanks man

#

I mean it doesn't work on object, but on class it did

#

i could sleep now

unreal quail
#

how can I get a world location from a relative fvector and an actor ?

mellow folio
#

don't use Object at all

#

until you learn more

rancid cloud
mellow folio
#

soft references are mostly for loading classes

unreal quail
#

I could just add vectors but it'd ignore rotation and scale ๐Ÿ˜Ÿ

maiden wadi
#

No they're not? You load assets more than you load classes.

unreal quail
#

I just want to "apply" a transform to a vector

rancid cloud
#

@maiden wadi @dawn gazelle @mellow folio can I add you as friends? Perks is sometimes you'll get dm from me asking UE4 stuff

maiden wadi
#

In fact, with the rare exception of changing your child classes into asset classes like I mentioned for a fighting game or whatnot, you rarely soft ref classes.

mellow folio
unreal quail
#

really there is no way to convert a relative vector to a world vector?

maiden wadi
#

Transform Location

unreal quail
rancid cloud
#

thanks again. Will sleep now.. 12:46am here

unreal quail
#

I kept looking for vector but I should have looked for location ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

maiden wadi
#

Haha. To complicate that it messes with me in C++. As it's named Trasnform Position there.

unreal quail
#

oof

gentle urchin
#

relative to world is just the relative + the actors world location

mellow folio
#

is that a question?

gentle urchin
#

xD

mellow folio
#

lol

#

np

#

for super simple Cooldowns, I like to just save it as a Float Variable as the time when the ability will be ready again, so it's just Cooldown time + GetGameTimeInSeconds

#

Then "IsCooldownReady" is just a function (Is GameTimeInSeconds > Variable)

#

But like I said, this is an ultra bare bones approach

gentle urchin
#

Is there some automatic overflow for the GetGameTimeInSeconds ?

#

never used it

#

sounds safe enough tho

#

guess nobody plays long enough for overflow anyways ๐Ÿ˜›

mellow folio
#

I don't know what overflow means, so no, definitely not ๐Ÿ˜Ž

#

oh nvm

#

Yeah I don't know how they handle that

#

but I assume it's safe

gentle urchin
#

I'd probably just use a regular float for the cooldown but the result is the same regardless

#

Why dont you want it to change with time dilation ?

mellow folio
#

it works with dilation and pausing

gentle urchin
#

Sounds like they want a solution that ignores time dilation

#

for whatever reason

#

Stop time on others?

#

or time in general

mellow folio
#

I believe Delta Time ignores time Dilation, watch that video

gentle urchin
#

so himself included

#

there you go, you need time dilation ๐Ÿ˜„

#

then its not all time.

#

There's custom time dilation.

#

thats what your stop time should do

#

Stop time -> Set Custom Time dilation on all affected actors

#

?

#

you dont set it on UI

#

Who's cooldowns

#

ITS NOT AFFECTED

#

๐Ÿ™‚

#

No.

#

Not when you use custom time dilation.

#

Custom time dilation is specific per actor.

#

No

#

Thats the node, but no

#

Wrong target(s)

#

I think global time dilation overrides custom ?

#

define everyone

#

everyone in range?

#

everyone on the map?

#

unspawned actors?

#

In range -> you need something to check your range. Collision volume perhaps.

#

just make them

#

๐Ÿ˜›

tranquil abyss
#

Hey everyone very simple question here

#

I have this level up logic here at the end of my AI

#

and basically what im doing is increasing the players base strength per level

gentle urchin
#

No exp overflow ?

tranquil abyss
#

In the character

tranquil abyss
#

after this one

#

anyway I need to signal after the level up has taken place

gentle urchin
#

Not seeing anything increase base strength based on level

tranquil abyss
#

to recalculate the

tranquil abyss
gentle urchin
#

After a levelUp has been done, just call a "Calc stats" function?

tranquil abyss
#

I need a signal to crecaculate that strenght value on level up

gentle urchin
#

which handles the stat math ?

#

the CalculateStats would be called on beginplay/load game and whenever a stat would change (weapon equipped, level up, weapon unequipped etc)

tranquil abyss
#

hmm

#

this is in the Player

#

RIght now I have on picking up a new weapon it rests based on the default strenght

#

this might be a architecture issue more then anything

#

And I also dont know how to Call a function form one blueprint then make it run on another

mellow folio
#

You want a dispatch I think

#

I think you have a Weapon doing damage, and you want it to recalculate its damage when the player levels up

tranquil abyss
#

Yeah its Weapon damage + player damage pretty much

#

and player damage goes up on level

mellow folio
#

Ok, go to the character and add a Dispatch

#

call it LevelUp or something even more generic like "Recalculate Stats"

#

Then Call (The LevelUp Dispatch) inside your character's Levelup logic

tranquil abyss
#

Dispatch is creating a event

#

im very new to unreal

gentle urchin
#

Does the weapon strength increase based on player level?

tranquil abyss
mellow folio
#

Yes, a dispatch is a type of event, that other events can "BIND" themselves onto.

So the Weapon wants to BIND its RECALCULATE event to the character's LEVELUP dispatch

gentle urchin
#

Thats what i thought

mellow folio
#

Perform that binding at BeginPlay of the Weapon, or whenever the Weapon gets a good reference to that character

tranquil abyss
#

Im gonna need to watch something about this