#blueprint

1 messages ¡ Page 69 of 1

pallid nest
#

well that makes me feel better and not that dumb hahaha , many thanks

#

thank you I will try

hollow cove
#

or if you're dumb like me and play everything on 2x speed because you're impatient, dozens of times

lunar sleet
pallid nest
distant hollow
hollow cove
#

also, why does every tutorial on youtube start with "hey whats up guys" and make you have to turn it up 2x higher than everything else

#

"first were going to create our project and im gonna make you sit there for two minutes while i do that"

pallid nest
#

there is one guy I love his tutorials because he is super quick, 1 min most of the time

pallid nest
hollow cove
#

i like those but they're too fast sometimes. mathew is about the right speed tho. i just try to be grateful that theres any information online at all and it brings down my stress a little.

distant hollow
hollow cove
#

cant imagine what it was like trying to learn this stuff back in the 90s or whatever

lofty rapids
#

i went through a tutorial and he kept messing stuff up, and fixing it at the end

distant hollow
#

That was how we used to learn

hollow cove
#

they had to actually read words printed on pieces of wood?

hollow cove
distant hollow
#

I started with BASIC in like… 1991-ish?

#

After that it was GWBASIC

lofty rapids
#

quick basic was awesome

distant hollow
#

Then C and Pascal in 97

#

No such thing as YouTube

#

Internet is kinda minimal

#

Those were the days lol

hollow cove
#

i feel like it must have felt more special to learn programming back then, being on the cutting edge. when im learning i just feel like im trying to catch up to kids who learnt what i have when they were like 14

void sentinel
#

So I have a question that I imagine the answer to is stupidly easy, but I'm having issues finding an answer to it

lofty rapids
#

people had big books that had all the stuff in it, bibles

pallid nest
# distant hollow Ah, not Mathew

but I think he is also one of my favorites (you refer to Matt Aspland I assume?) with another one called Gorka. I recently discovered also a guy really like although his tutorials area reaaally heavy and long but I think are very good (Ali Elzoheiry)

ebon olive
#

ohh i see. so player 0 bascially means the main player character?

ebon olive
#

no. i just want to figure out what this do because in the future, i wanna add more characters then swap around 😄

distant hollow
#

Oh wait there was another one

pallid nest
distant hollow
#

Wadstein or something like that

void sentinel
#

I'm missing a step somewhere

#

but I don't know what it is

lunar sleet
#

You’ll prly want to keep that turned off for later additions so you can possess when ready

void sentinel
# hollow cove

For some reason it doesn't allow me to select BPC_Inventory

lofty rapids
void sentinel
distant hollow
void sentinel
#

Yeah, but it won't let me set the default value to BPC_Inventory

lofty rapids
#

where do you set it ?

distant hollow
void sentinel
distant hollow
#

Not actor

#

An uasset in your contents

void sentinel
#

Ah, I don't fully understand what that is yet, would just casting be a better way to refrence this variable?

distant hollow
#

Are you using a plugin?

lofty rapids
#

get actor of class maybe ?

#

or what parent class for bpc_inventory ?

void sentinel
#

So I was looking at the tutorial again, realized I'm an idiot.

#

and confused two things

#

ended up basically copying what they did for BPW_InventoryGrid and BPW_MainUI to communicate with eachother now, which is a funciton.

ebon olive
#

huh i dont get it

#

why this #include got an error??

#

it was working on my previous script before

sonic crest
#

Sometimes when I get problems with include I ignore them, after I build it works fine

#

Or I add ../ or just /

#

Not sure why it sometimes needs it

thin panther
#

well you don't really want to ../ much in unreal

sonic crest
thin panther
ebon olive
thin panther
ebon olive
ebon olive
desert juniper
# ebon olive

Did you add the EnhancedInput module in the build.cs file?

thin panther
#

So add EnhancedInput to your module's build.cs, you need to do that whenever you want to use it elsewhere (because unreal uses sort of false include paths)

sonic crest
thin panther
#

if it fails to compile, find out why

#

if it can't open the include path, correct it.
A ../ or a / will never be the solution

floral stump
#

Why i can't cast to Item Drag And Drop ?

ebon olive
ebon olive
sonic crest
thin panther
#

again, that's rarely the solution

#

what file are you including

#

because there's nearly always a better way in unreal land

#

(except a few very very very exclusive situations for your own code)

zealous moth
sonic crest
sonic crest
# floral stump

Maybe you forgot to compile? Or are the stuff in C++ and not visible to BP?

floral stump
zealous moth
#

@floral stump is that a component, a scene component, a variable?

#

compile your other class you are trying to cast into

#

and it should appear unless it is private

#

or "Local"

floral stump
#

seems like you don't have experience with UI ?

#

in DragDrop we generate payload and assign it to DragDropOperation

zealous moth
#

did you cast correctly?

#

you wrote "DragAndDrop" but you cast in "DragAndDropOperation"

floral stump
#

its not even getting it in the list

lofty rapids
#

what are those circles all about, what kind of bp are those ?

thin panther
lofty rapids
#

and it looks like they are seperate

floral stump
#

what i am doing in here?

sonic crest
floral stump
#

that operation should get the drag drop class

ebon olive
floral stump
zealous moth
lofty rapids
#

i mean if it's a blueprint you can look at what your casting to

#

and check if it even has that variable

zealous moth
#

look at the names of her lists she had earlier

#

they are all named the same except for the suffix

#

and it's not what was originally asked

floral stump
#

this is from another widget

zealous moth
floral stump
#

yes

zealous moth
#

well wait if it works in the other

#

why not copy paste it?

lofty rapids
floral stump
#

uff

#

yeah my bad

#

that payload was needed

#

thanks

#

can't believe how i missed that

#

😂

faint pasture
#

also you're adding torque 4 times per frame

#

not sure if that's what you want

pallid nest
#

I finally found the issue @lunar sleet @distant hollow @lofty rapids , such a silly billy sausage. The widget reference (ACMSkilltree) is created in a function that I was excluding from my BP character for testing purposes . Thanks again for the help ❤️

abstract mango
crude timber
#

How can I get the previous index from a For Each Loop ? I'm trying to get a position of a previous index, so I can draw a path

lofty rapids
#

your not using index but maybe you can get index-1

#

or store the last whatever you need in a variable

#

that you can use on each loop

thin panther
crude timber
#

Ah ! Didn't tick in my brain doing a simple -1 and getting the array again after

#

will try, thank you !

lofty rapids
#

just make sure it's valid on 0 will be -1

crude timber
#

That worked perfectly \o/

lofty rapids
#

theres also storing it in a variable

crude timber
#

this did the trick for me

#

got a proper cable network with it :p

#

Do you guys have issues with Tags sometimes ? I feel like they're not reliable

#

Pretty sure I have it setup correctly and the Get all actors with tag returns me zero

#

Printing the length of the resulting array and it's nul

desert juniper
ebon olive
desert juniper
#

Comment it out and build. If it works, then delete the line

ebon olive
zealous moth
desert juniper
zealous moth
#

can character BPs if you use C++ not have their meshes set anymore in 5.3?

blazing kettle
#

Has anyone tried to send a blueprint interface message from a list widget item? I'm trying to get information back to my player character but it seems to fire on the list item end but doesn't reach my player

zealous moth
#

where is the pink window to change it?

blazing kettle
#

This is the widget initialization

#

And then this is the message code itself

#

I've checked and it does fire when selected

#

But doesn't send the message to my player

zealous moth
#

is it set to false somehow?

#

otherwise your target isn't loaded or in memory

cyan tiger
#

hey guys is returning to me how can i make it 24 hours not AM / PM?

blazing kettle
zealous moth
#

try a hard reference

#

that or your player ref is never set?

#

print string it and see if it exists.

#

and either way if you use a single player ref, use the "get player character" or controller function

frosty heron
# blazing kettle

If you never load the soft ref, resolving it will just return null ptr afaik

zealous moth
#

create a C++ project, brand new. Add in your folders a new BP of class "Character" and open it

#

can you edit the mesh's SK?

#

in the editor, not the construction script or through nodes

#

@frosty heron

#

mine doesn't appear to have it at all

frosty heron
zealous moth
#

yeah i do too, but in 5.3 it's just elsewhere it seems

frosty heron
#

5.3 a bit cursed, I'm not gonna upgrade yet. There is a bug that wipe the detail panel in that version

spark steppe
#

otherwise it just picks whatever your system uses

cyan tiger
#

Ben my system uses 24 hours format... it is weird

supple dome
#

looking at the code, theres a param for which style to use, however BP always call the default style (from current culture ie. console command culture en)

foggy basin
#

how do I check if the player's inventory array has space left over before adding an item to the slot?

fathom gull
#

Hey, I’m trying to have walking and running speed in two fixed states with the analog stick. So that when the left analog stick is turned a little bit in a direction the character will walk in a constant speed, and when the left analog stick is turned a lot, my character is running in a constant speed. I have it working but only on 4 directions, I would like to have it diagonal (and any direction) as well, what’s the best way to do this?

rugged wigeon
#

@fathom gull read the X and Y axis of the stick. Length of the XY (think pythagorean theorem) is the speed. Round that off as you wish to be either 0, walk, or fast. Direction is just the direction of the unit vector of those two

rugged wigeon
still swallow
#

Is there a way to not see and expose variables of an expanded node ?

#

I dont want Weapon Actor Reference to be visible, just like in switch node

#

Where unused conditions can be collapsed

foggy basin
rugged wigeon
#

so it's an array of 6 slots then. You're not changing the array, you're changing it's components?

foggy basin
#

yep

fathom gull
outer brook
#

Hello fellas. I have a question regarding "inheritance" in combination with "BlueprintComponents":

Let's say there is an actor "BP_Base" which owns a BP-Component "BPC_BaseComponent".

Now I would like to create a "BP_Special" which inherites from BP_Base. But I want the BP_Special's BPC_BaseComponent to inherit from "BPC_SpecialComponent". But I would like to set the reference between these BP-Components within the BP_Special without adding a new Component in in BP_Special. Instead, I would like to somehow set the inheritance of the component in another way... it's hard to tell what I mean but I hope someone understands me here!

How would you accomplish this? Is that even possible?

lunar sleet
#

If you add a special component to Special, then it’ll have that too

outer brook
# lunar sleet No idea what you mean. If Base has the component, Special will inherit it, the e...

Yes but in my scenario, BP_Base has the BPC_BaseComponent attached, not BPC_SpecialComponent, which should stay this way. But I would like the BP_Special to change that without adding a new component to it. Instead, it should use the BPC_BaseComponent of BP_Base and change it's type to BPC_SpecialComponent.

I do not want to exclude the possibility that I misunderstand something or that I made some logical mistakes regarding inheritance, maybe?

lunar sleet
#

You cannot change inherited components, most you can do is change default values of inherited variables

#

Maybe don’t have a base component to begin with if you’re going to change it anyways. Otherwise, you can always just plug in variables into a function in that component, so you can change their values on each child as needed, rather than trying to replace the entire component (which is not possible if inherited)

outer brook
#

No wait, i do not want to "replace" the component. I would like the BPC_SpecialComponent to inherite everything from BPC_BaseComponent so I can use all variabls and functions in BP_Special AND (!) everything from BPC_SpecialComponent.

It seems like there is no other way then adding BPC_SpecialComponent directly into BP_Special from the start. I just hoped, I could somehow define the specialization of that component in BP_Special in reference to the parent's base component...

rugged wigeon
outer brook
#

Anyway, thank you so far

rugged wigeon
#

@outer brook You definitively cannot do this.

Most likely your design has not utilized components correctly if you feel this is necessary.

outer brook
balmy kraken
#

Say I have a class structure like this
NPC (with inheritable event called Die), Die does some basic action
--Bear_NPC (inherits from NPC), Die does some additional actions on top of parent actions
--Spider_NPX (inherits from NPC), Die does some additional actions on top of parent actions

and say I want to do call Die on NPC as I don't know what child it is at the time, how do I have them also perform the child Die event?

rugged wigeon
#

it will do so automatically

#

your grammar here is a bit confused though.

Bear is a subclass of NPC.

You have an instance of a bear.

Something kills the bear. It doesn't know it's a bear. It only knows it is an NPC. So it calls NPC->Die.

But it's still a bear. And bears call Bear->Die, not the parent class implementation, unless Bear->Die explicitly class the parent class implementation too

#

tl;dr you don't need to know the subclass of an actor to ensure it calls it's subclass' implementation of things. This is always the case.

balmy kraken
#

hmm, i must have done something else wrong then, as it didn't happen as expected. is this true in blueprints as well as cpp?

#

or maybe i got confused because the engine kept crashing without saving :/

calm bloom
#

Hey anybody able to help out why my spawn actor doesn't attach to my character socket but just get placed into the map only?

plain ingot
#

Is it because 'get onwer'? I am learning blueprints for 1 week now. Maybe you need to put a get actor instead?

plain ingot
calm bloom
plain ingot
#

Ohh

#

Can you send a screen of the working blueprints so i can see the difference

#

I am just beginner, sorry

calm bloom
#

the blueprint is the same

plain ingot
#

Oh

calm bloom
#

i have to remove the collision type from my item

plain ingot
#

Oh i see

#

Ok

#

Thx

calm bloom
#

np

fathom gull
rugged wigeon
lime crow
#

I am making a projectile bp, but i will be creating child bps from it, i want to expoe these variables but not sure how i can do it (its just one variable and setting using that one variable) any ideas? Thanks

rugged wigeon
#

It's kind of hard to crash the engine with blueprints outside of things like infinite loops too

rugged wigeon
#

all variables of a BP parent class are accessible to its children class

#

they won't show up under "variables" but you will be able to see them in class defaults and you will be able to reference them in the blueprint.

balmy kraken
#

with the stater 3rd person level and only a few character bps

lofty rapids
#

how much memory

rugged wigeon
#

is your computer good enough to do this?

balmy kraken
#

32gb mem and 5700xt radoen card

#

just updated to the newest engine 5.3.1 i believe. crashed 5 times same error today

#

rtx is off

rugged wigeon
#

is it a laptop

balmy kraken
#

no

lofty rapids
#

does it crash in the editor or when you play ?

balmy kraken
#

when i play, but not compiled

#

played in viewport that is*

rugged wigeon
#

Is it slow as a potato when it runs

balmy kraken
#

not at all

#

great performance

rugged wigeon
#

dunno. that's hard to say.

balmy kraken
#

3.80 gigahertz AMD Ryzen 5 3600X 6-Core
Samsung SSD 970 EVO 1TB [Hard drive] (1.00 TB)
31.95 Gigabytes Usable Installed Memory
AMD Radeon RX 5700 XT

balmy kraken
#

thanks for looking anyway. i was on 5.1 then upgraded cuz of the crashes, still happens

lofty rapids
#

5.2.1 runs great for me

balmy kraken
#

oh wait, new drivers. let me try that

lime crow
rugged wigeon
#

what do you mean its all one variable

#

your problem was wanting that one variable to be accessible in children, no?

lime crow
#

sorry for not being clear, i need to use separate variable to expose them all in the child blueprint, but im setting multiple particle spawns from one variable

rugged wigeon
#

I'm not sure I parsed that correctly. But I think what you're trying to do is track multiple particles and have them be accessible in th child class. But you don't want to make a unique variable for each particle.

#

The answer is probably to make your particle variable an Array of particle objects, rather than just one.

faint pasture
#

When x happens, you want y to happen

foggy basin
lime crow
#

I want to have exposed variables on a child blueprint. But because i am using one variable to set multiple particles in the parent blueprint, it wont work. I need a way to expose the variables for the different particles

pastel skiff
#

is there a way to make a delay in fuction?

rugged wigeon
#

No

gaunt burrow
#

howdy, anyone here familiar with cases of the event graph 'skipping' functions, potentially related to the bind event to onclicked function?

crude timber
#

Damn I just reactivated the Flat Nodes and the engine graphs feel way smoother for some reason

gaunt burrow
# gaunt burrow howdy, anyone here familiar with cases of the event graph 'skipping' functions, ...

if so, I have a post up on the Unreal Forum here: https://forums.unrealengine.com/t/my-event-graph-seems-to-be-skipping-sections-but-not-always/1591683
where I've tried to lay out my issue. (that way I'm not clogging the chat up)

rugged wigeon
#

This is not really readable

#

At least not on mobile

gaunt burrow
#

Yeah, I'll see if I can get a cleaner pic, the single attachment limit was kinda rough

#

though, any version would require a lot of zooming, since I'm essentially trying to fit a large portion of my event graph into a single image

rugged wigeon
#

I see some binding, bear. Are you remembering to unbind?

acoustic tundra
#

Hi, I got a quick question on which I've been lost for some time. I created a hotbar with 3 slots. Each of these contains a border with an image. Whenever I pick something up in-game, the icon gets added to the image slot, but the background color of the image slot changes to the same color as the border color. So say the item is in slot 2, and I got that slot selected, the background color becomes yellow (same as border), but when slot 2 is not selected the background color is black (same as border). How can I make the slot's background color consistent so that it doesn't update the image color to the border color?

lofty rapids
#

how are you highlighting ?

#

with a yellow image ?

#

you only change border and it changes the whole thing ?

acoustic tundra
# lofty rapids with a yellow image ?

No, I have a int variable in my playercharacter called selectedindex, which I feed into the function of the widget. This is the code that updates the image slot

#

Then here I change the border color of the highlighted index and reset the color of the other 2

lofty rapids
#

what is border ? is it the whole thing ?

#

instead of a border ?

faint pasture
#

and probably an enum instead of an index but it depends

heady burrow
#

is it possible to configure a decal to ignore certain objects but not others, like, discriminating by actor name or type.

acoustic tundra
lofty rapids
#

does the border change that whole inside black part ?

#

could be going behind the image

#

and is the icon transparent ? and that's what your seeing ?

echo dirge
#

WASD key navigation in widgets.
Does anyone know what onKeyDown override function I can use in Blueprints to make the navigation go Right for D keypress and Left for A keypress for example?
Is there a Node I can call on that will move the navigation Right Lefy Up or Down in the Widget?

lofty rapids
#

so when you put an image in there the transparency shows the actual background

#

you could probably fix it by putting another square behind it of a solid color that you want to use

acoustic tundra
#

but how does the slot stay as gray when there isn't a texture assigned to the image?

faint pasture
lofty rapids
#

are they images ? or what are they ?

acoustic tundra
#

They are images yeah, and I have given them a color in the details pannel

#

but what I find weird is that at the start the border goes around the image, but when the image is updating the border fills the image

lofty rapids
#

probably because you gave it a color

#

and then you switched it to an image

ancient siren
#

does anyone know how/where (if there are any) tutorials on how to make a spline that you can customize in game?

gaunt burrow
#

ok, updated the post with some better pics I hope

#
#

ok, made one last tweak because the first image still seemed a bit wonky, still works best on pc though

lime crow
midnight field
#

Is there a way to retrieve a parent actor from a state tree's task blueprints? I'm having trouble locating any such function.

lunar sleet
lunar sleet
midnight field
#

Fair enough.

solid needle
#

how can i generate a random int without repeating the number

thick glacier
#

Hey gang, I'm messing around with game templates for the first time in ue5.2, I'm having a issue with changing my third person character mesh. when I change skeletal mesh in viewport details it does not change in game mode. any tips on what i'm doing wrong?

hoary junco
#

if I have a camera that's separate from the player character, how do I make it so the player character's movement direction is in the direction of the current camera angle rather than the world direction?

frosty heron
solid needle
#

without repeating

frosty heron
#

from the out value, promote it to variable. Use that variable instead

finite hearth
#

What is the advantage of using a trigger box vs. a collision box? I need to fire an one-time event when something enters the box. Should I use trigger or fire an overlap event of the collision box? Is it the same?

native canopy
#

how to fix the item is over the box?

frosty heron
native canopy
mental trellis
#

Why is there a random top knot?

native canopy
mental trellis
native canopy
mental trellis
#

I see.

native canopy
#

i know the problem but idk hwo to fix

#

if pickup new item the item icon is moving column

mental trellis
#

Add brushes to every slot that have no image / transparent one / set to invisible. Add those images to an array. Position them on your UI.

#

Then simply set teh right icon in teh right slot based on the index of the array.

mental trellis
#

Shrug it's a perfectly workable solution.

native canopy
native canopy
mental trellis
#

Horizontal box is not a good idea.

#

Try a grid?

native canopy
native canopy
mental trellis
#

That looks very much like you're adding them wrong.

#

When you add a slot to a grid it defaults to 0,0. You need to set the row and column when adding it.

frosty heron
native canopy
frosty heron
native canopy
frosty heron
#

You know what a row and collumn is right?

native canopy
native canopy
frosty heron
#

say you have 30 slots, add 30 Empty slots to it

#

like an empty item that is represented by empty icon

mental trellis
#

You could even add the image widgets in those slots to an array so you can access them sequentially.

native canopy
#

i get that

mental trellis
native canopy
mental trellis
#

So design your UI in the umg editor, don't make it dynamically.

native canopy
mental trellis
#

Code to do what? You design the ui in the wysiwyg editor.

native canopy
#

idk how to do that with 8 image

mental trellis
#

Expose the image widgets and set their properties from your hud variable.

#

See the pins in #umg to learn how to do these things.

mental trellis
#

The pinned messages in that channel

native canopy
#

@mental trellis i Use Wrap

proven dune
frosty heron
#

don't really like the tutorial tbh, I would handle deleting on the building it self. Have a function to delete in the Building.
Player can then just tell the actor to call the delete function

proven dune
#

Ohh you are right! ( I didnt follow the tutorial for the deleting, did it myself, but thanks for the correction! 😄 ) I'll try that!

#

What Class should I cast to though?

proven dune
frosty heron
#

see if the floor gets printed

#

if not it could be another code somewhere

proven dune
#

Good idea!

#

ill try

#

Ah I see, here comes a plot twist

#

It doesn't print anything

frigid jetty
#

Is there a good way to connect an array element pin to a fallback struct structure pin from a For Each Loop to a Create Widget? I'm pretty new and have been following this tutorial. It works if I rebuild it by replacing the Create Widget and then compile it but for some reason it breaks when I close the editor and reload the project.

frosty heron
#

determine which one cause the floor to be deleted

proven dune
#

Oh wow, never seen that before

#

lets see here

#

I see! The delete system isnt what deletes the floor

#

Ill debug a little

#

I think i see where it is coming from

frigid jetty
#

Oh wait I figured it out. I had to set my widget to active.

#

Lets go!

proven dune
frosty heron
#

so if it's not valid destroy it? I mean you can;t destroy nothing

proven dune
#

Yeah that makes sense

#

I've got this blueprint

native canopy
#

can i use this for RMB? without LMB

frosty heron
native canopy
frosty heron
frosty heron
#

actually can't get the hovered widget

#

there is, IsHoveredWidget however

#

OnRightMouseButton Released -> If This Button is hoevered -> Do X

native canopy
clever rose
#

Hello, I'm having issues with my character movement. I was following a tutorial that was setting up 8 directional locomotion and it works fine for him. However, if I hold down W, my character is stuck moving in one direction no matter which direction I'm facing. The same goes for A, S, and D. Can anyone help me out? I know this is a dumb question but I'm pretty new

frosty heron
#

you probably don't have focus if you need to do it twice

#

on hover -> Set Keyboard focus

native canopy
#

i mean that working but need double press

frosty heron
native canopy
#

how game use unreal like apex when using item need to press ui with RMB

frosty heron
#

No idea, don't have their source code

#

if their code is leaked, someone can just make a copy of the game

#

I would make a base Widget that have the functions I described

#

that way you can make a right clickable button as many as you want

hoary junco
#

is there a way to restrict a character's movement so they can only move within a navmesh? Or is the only way to restrict movement using things like walls and blocking volumes?

dark drum
hoary junco
# dark drum What type of game are you making? Ultimately, only characters controlled by AI c...

it's an isometric puzzle game set in cyberspace, so the level is built of a bunch of platforms sorta freefloating since that's the aesthetic. The character can't jump so I've already turned off their ability to go off ledges but even when I do that the character model is kinda half hanging off the ledge when I go to the edge, I'd like it to stay fully within bounds so I was going to use a navmesh for that

hoary junco
dark drum
clever rose
#

Hello, I'm having issues with my character movement. I was following a tutorial that was setting up 8 directional locomotion and it works fine for him. However, if I hold down W, my character is stuck moving in one direction no matter which direction I'm facing. The same goes for A, S, and D. Can anyone help me out? I know this is a dumb question but I'm pretty new

dark drum
# hoary junco no, WASD movement

I'm not aware of anyway to use the nav mesh in the case then. You might need to implement your own ledge detection system. The one built into UE uses the capsule center (hence why it overhangs the ledge).

dark drum
hoary junco
dark drum
hoary junco
dark drum
hoary junco
frosty heron
clever rose
# dark drum You'll need to provide more information about how you move your character and th...

In this episode, we finish setting up the character and animations for basic locomotion.

Content:
0:00 Intro
1:05 Animation Layers
2:30 Directional Blendspace
6:06 Setup Base Pose
13:48 Idle state machine, turn in place, stop
24:24 Test (+bonus cat sounds)
30:01 fixing blends and anim states
33:43 Sum up and outro

Disclaimer - this is a part o...

▶ Play video
timber crystal
#

Hello friends
I'm really at my wits' end when it comes to a flying opponent

So now I'm just trying to program a projectile movement so that it moves in the air in my direction.
My question is, is it possible to tune a projectile to move as soon as it sees me, i.e. with Pawn Sensing?
i upload my Bp image
Because the problem is now taht it moves in my direction but not if he sees so at the begin of the game he starts to move

(I know that's not the right way for a flying opponent, but I'm still far too new to unreal to be able to do everything without being able to see the whole thing in a video or picture)

bold flax
#

So I am working on a spawn system for my multiplayer game and trying to get a reference to the player controller from some logic I have in the level that runs on begin play. How might I do this? I am not wanting to put the logic on the player itself becasue I only want this spefic logic to run when the player loads into this specific map. Each map handles spawning differently.

main flume
#

Hey there

I want to check if my bool has changed from the last two seconds (if the player doesn't move the mouse for 2 seconds, the cam resets). I made a function for checking if the mouse is moving but I can't seem to find a solution for the timing thing...

versed sun
#

A Retriggerable Delay might help, but it has to be in an Event , not a function
You could use the Triggered of of your mouse input @main flume

main flume
#

Sorry if its a basic question, I switched from Unity to Unreal a week ago

versed sun
#

I think you are on the old Input system, so you would add it in Input Event LookUp and LookRight

main flume
versed sun
#

so, whenever the mouse moves , it resets the Delay
if you don't move the mouse, the Delay is allowed to finish

#

ok, so in main graph, add your inputs

main flume
#

Where can I find the delay though?

versed sun
#

you wont see Delay nodes inside a Function

main flume
#

ohhh

versed sun
#

has to be in the Event graph

main flume
#

Like this?

versed sun
#

nope

main flume
dark drum
# main flume

Why do yo square the input value and then square root it straight after?

versed sun
#

Under your tick , right click and type LookUp

dark drum
main flume
versed sun
#

there you go, plug both Triggereds into the Retriggerable Delay, and unhook it from Tick

main flume
dark drum
# main flume

Is there any reason you're using two sperate input actions for looking around?

dark drum
main flume
dark drum
main flume
#

This still doesnt seem to work

dark drum
main flume
#

Oh I found out

#

I need to put it into started instead of triggerewd

#

since triggered is tick based

versed sun
main flume
main flume
#

ah oh nevermind

uncut seal
#

how can I smoothly update an objects transform? i tried the following, but it was still very jittery) I also attached a video showing the jitter that I want to fix (starts at approx 20s)

dark drum
# main flume ah oh nevermind

Yea so you have a bool you set to true when you start moving and then set it to false when they stop. The other stuff is just to reset the cam after 2 seconds which is independent from the looking bool.

uncut seal
dark drum
# uncut seal It is.

O you'll need to swap out the vinterp to the constant one if the end location moves. It jitters because it's trying to smoothly interp the values but the following tick the end location has changed which messes up the smoothing it's trying to do.

main flume
dark drum
main flume
#

This is how I use the variable in the cam

dark drum
# main flume

Move your camera movement stuff off tick and add it to the triggered on the input action. Some of these checks can then be removed.

main flume
dark drum
uncut seal
main flume
dark drum
main flume
#

Basically if the car is going faster, the cam is moving upwards

dark drum
# main flume

So this should only call when the player hasn't move the cam for x amount of seconds?

main flume
#

and the normal camera movement should be called otherwise

versed sun
dark drum
# main flume Yes

In which case, create a new bool called 'bShouldResetCam?' when you call the 'ResetCam' function, set this to true. In the function where you check if the cam is moving, check if it's false and should reset cam is true.

main flume
main flume
#

Thanks for the help!

uncut seal
#

I just realised that the locomotive doesn't lag at all. this is being updated in the tick function, but all of the others are actors which get spawned in by the locomotive, do lag. I think this is because they are being updated in a for loop, meaning they get updated 1 * number of cars times slower. ill do some testing to make sure this is correct, and then i may need some help

dark drum
dark drum
uncut seal
dark drum
#

When you spawn them, attach to the locomotive and they'll move with is so you wouldn't need to manually update their locations and rotations.

uncut seal
#

but wouldn't they be in a straight line? the rotation is based on a spline and it has curves which is why i did that

dark drum
uncut seal
dark drum
uncut seal
#

no, the front is perfectly fine, but somethings up with all the rest

dark drum
lyric rapids
#

im trying to make it so when the player steps on this actor it will change its material however its not working does anyone know why?

frosty heron
humble tulip
#

hey developers, im trying to call an event in a blueprint from a blueprint but for some reason im getting some errors.

thanks in advance!

frosty heron
#

it simply doesn;t know which BP lamp gas station in the world you are pointing at

true pendant
#

Hi guys, I made a switch between camera, the first one is on the character, the second one is attached to a socket on a weapon (to create an aim down sight), the one on the player works fine but when I switch I loose the pitch control on the weapon, I can look left or right but not up or down. Anyone has an idea ? (I have an anim off set that works on the player I though it would follow with the other camera?)

humble tulip
#

but how can i set it?

frosty heron
humble tulip
frosty heron
#

So nothing to nothing is nothing

versed sun
#

how are you choosing what Lamp to use?

frosty heron
humble tulip
frosty heron
#

Well which BP lamp Gas station do you want to Turn State?

#

there might be 1 - 2 - 3 or hundreds of BP Lamp Gas station

humble tulip
frosty heron
#

you need to set the Variable to one of them

versed sun
#

You are pressing E to use it , so i assume you are looking at it/ mouse over it / close to it?

humble tulip
#

no, its a switch, where the switch turns off/on all gas station lamps

frosty heron
#

Then you want to make use of arrays

#

but if you don't know how a single pointer works, an array can probably wait

humble tulip
frosty heron
#

An object reference (Blue pin) is a pointer

#

BP lamp Gas Station pointer, points at a BP Lamp Gas Station Instance

versed sun
#

This would get all

frosty heron
#

^ That will work to turn off all the BP lamp gas station but you better off learn how to use array later because there are times where you don't want to turn off every BP lamp gas station in the world

versed sun
#

This would get what you are moused over

#

This would get Lamps close to you

humble tulip
#

wow

dark drum
# versed sun

Eww... Get All Actors of Class. 🤮 lol. Yea it definitly would work but not recommened. 😛

dark drum
# humble tulip no, its a switch, where the switch turns off/on all gas station lamps

Assuming the lamps are placed in the level by yourself via the editor and not spawned at runtime, create an array var of type of your lamp on your switches and set it to instance editable. In the level with the switch selected, you'll see the var in the details panel. You can then add each lamp you want the switch to control that is placed in the level.

When the switch is toggled, you would just loop through the array and call the Turn State function.

versed sun
humble tulip
frosty heron
#

A BP_LampGasStation variable will only point to one instance

frosty heron
#

Cool, how do you fill the elements? did you pick from the level?

#

If that's the case all you have to do is just For Each Lamp -> Turn State

humble tulip
frosty heron
humble tulip
#

i select class, is the object?

#

now it worked

frosty heron
#

it should be object ref not class

humble tulip
#

now appears the lamps

#

worked!!!

acoustic tundra
#

Hi, I want to fire off an event in BP_Item_Flashlight from my playercharacter. I made a variable in the character of type BP_Item_Flashlight, but I can't make a reference as you can see on the right. Does anyone have a clue why?

frosty heron
acoustic tundra
#

Yeah usually I would assign the reference in the details panel outside of blueprint mode, but since I don't have the character placed in the level I don't know how I can assign it

frosty heron
#

Plenty of ways, but it all depends on your design

#

How is the flashlight spawned?

acoustic tundra
frosty heron
#

and how do you want to grab it?

acoustic tundra
#

Interacting with it (which already works)

frosty heron
#

ok show me your interaction code

acoustic tundra
#

I got info about the items stored in a struct called ItemInfo

frosty heron
#

I assumed you get error here?

#

when did you even set flashlight

acoustic tundra
#

accesed none trying to get flashlight

#

but i'm unsure how to set it, since i can't get a reference to the flashlight from my character

frosty heron
#

I'm assuming you want to Spawn the flashlight in that code?

#

if that's the case, you can get the return value from the Spawn actor node. That will be your flashlight (or w/e you spawned)

acoustic tundra
#

not quite, since that's the actor that gets dropped when I already have something else in my hotbar on that index, it just drops it (which is what the spawnactor is for)

#

but the actor that gets spawned from there I don't use, it's just dropped in the level

frosty heron
#

Then you should expand your interaction system

#

pass in the object ref of the item that is being picked up

#

that will be w/e u pick up. Including the flashlight

acoustic tundra
frosty heron
#

in your pick up logic , pass in the object you are picking up

feral night
#

is there a simple way in blueprints to rotate a single bone in a mesh?

acoustic tundra
#

what should the type be, since it could be anything that I pick up

frosty heron
#

It should be the base class of Item

#

all of your item should derive from that base class. FLashlight, food, weapon w/e

acoustic tundra
#

ah right makes sense

frosty heron
feral night
#

Ah so I need to set up an anim blueprint?

frosty heron
#

Well for my case, I have to. Not sure with what you want to do

feral night
#

Ah ok thank you. 🙂

acoustic tundra
frosty heron
#

How are you picking up the item? By pressing button that do overlap checks?

acoustic tundra
#

so i got the class, how do i make it so it's a single pointer target

frosty heron
#

what ever method you do to obtain the item, pass in what you are picking up along

frosty heron
#

it only points at an object

acoustic tundra
frosty heron
#

altough I don't know why u want the item

#

How I would do it is

Pickup Item -> Get the Item Info -> pass it to Player inventory -> Destroy the pickup item

Player use a weapon -> Spawn the weapon for the player

acoustic tundra
#

Because I want to run a custom event in another bp for which I need a target ref

frosty heron
#

yeah but why do you need that object you picked up on the floor. The object you pick up can just contain information about the item. If it's a flashlight, what hp and so on.
What I mean is you want to handle equipping in the Item Class

#

but anywayyyyy

#

you can still pass the object ref if you want

#

it's just not something I would do

#

@feral night This is the node btw

#

incase you need it

acoustic tundra
frosty heron
#

Such as Equipping/Use
Drop
Remove
Trade
etc etc

#

Each child (BP_Flashlight) or BP_Sword can handle the Equip Function differently

#

like Use on Potion will regenerate HP while Use on Flashlight switch it on

acoustic tundra
#

I see, and the bp_item_master would take the object class? Or how would it know what item should be used?

frosty heron
#

SO when you grab a BP Flashlight -> Use
It will run the version in BP Flashlight

fringe junco
#

Hmm so i am attempting to setup a camera for third person in an RTS, similar to the men at war series. I have most of the logic down but can't figure out which value to use to drive the aim rotation such that the camera mouse xy values drive the aim of the controlled pawn. any thoughts?

rugged wigeon
#

@fringe junco PlayerController->Get Hit Result Under Cursor By Channel

fringe junco
surreal peak
#

Is that only one pawn you control

#

Or more RTS like where you can select pawns and tell them to do something?

#

@fringe junco

rugged wigeon
#

It is still probably what you need. Your units will need to have ai controllers that you will be passing indirect commands to.

fringe junco
#

theres both -- you have the overhead camera and the direct control camera

#

i have switching between both

#

i just can't figure out how to tie the player controller control rotation to a non-possessed pawns control rotation

#

which sounds obvious that u shouldn't be able to do this but

#

we'll see if theres a work around lol

rugged wigeon
#

it needs to be possessed by an ai controller

#

because it's going to be doing things when not possessed by the player

fringe junco
#

i have an AI controller setup cuz i have movement logic going

rugged wigeon
#

Ok, so have your player controller send cursor data to the ai controller which in turn uses that to determine where to look

fringe junco
#

like the basic feature set rn is:
0verhead rts camera with pan orbit and zoom
Third person camera with movement and animation
marquee selection and deselection

#

ah okay

#

the ai controller eh

rugged wigeon
#

My system has the player controller sending "Unit Order" structs to the AI Controller which reads the queue and executes them one by one. orders such as "move here" or "aim here" or "interact with this".

#

I would say you should probably do the same.

fringe junco
#

yeah an order queue is a good idea

#

im very early on, just trying to make a prototype

rugged wigeon
#

its going to be a big thing. Pick one or the other of RTS vs. controlled and just implement one on its own for now.

#

Although personally I think the whole "RTS where you can be a unit" just won't ever work conceptually as a game design thing.

#

RTS units don't fight in an interesting way. They sort of inevitably stand still and attack or kite and attack. Humans don't have the micro to handle things otherwise. It's too much. So if you imagine possessing a unit, it's really hard to imagine what the enemy ai should be. If it's dumb like RTS AI then it's going to be really bad FPS gameplay.

odd kiln
#

Hello all ! Does anyone know how to pass another float variable to the event "Apply Damage" please ? For example for a "Stun" amount

fringe junco
#

yeah fair lol

rugged wigeon
#

My thing is like a real time squad thing and my basic takeaway is that if you're asking people to control multiple units in a setting where you expect to do real time positioning, people will struggle to handle 3+ units

fringe junco
#

yeah, the only time this whole direct unit control thing worked for me was in like 4 player plus multiplayer coop matches where u split units

#

and thats specifically in that men of war series, idk if they have good ai or smth but its not so bad

rugged wigeon
fringe junco
#

u are right tho, i think the micro makes it difficult for sure

odd kiln
rugged wigeon
#

maybe. I haven't seen that game

odd kiln
#

I thought I could work with "Damage Type" tables but I don't really understand it

rugged wigeon
#

@odd kiln Probably this should be an Interface. An interface is a set of functions that you can say things implement. Like "Receive Damage"

rugged wigeon
#

Start by making a "Damage Interface". Give it one function called Receive Damage that takes, say, a float for damage and a float for stun.

#

Then on all the actor classes that you want to be damageable, go their settings and mark them as implementing the Damage Interface

odd kiln
#

That's what I'm trying to do

rugged wigeon
#

Then finally, you need to actually go into the bp and define what "Receive Damage" does for that actor class

odd kiln
#

Ok great I just have to replace my "Event AnyDamage" to "Receive Damage" event

rugged wigeon
#

yes

odd kiln
#

But I have to replace also my "Apply Damage" right ?

rugged wigeon
#

Yes, you would replace it with TargetActor->ReceiveDamage

odd kiln
#

Thanks a lot for taking time to help me ^^ I'll try this right now !

#

It works great, thank you very much !

feral night
bold flax
#

Got a question, wondering if its possible to hand the server over to another client if the server disconnects. Hope this makes sense?

frosty heron
#

if the host leave, everyone auto dc

bold flax
#

Thanks

frosty heron
#

Listen server is not the norm anymore anyway. Now days people use dedicated server

rare shore
#

Hi! I have an array that holds 3 elements inside when i save the game. I have it all on print string so i can follow it. Then i load and i see that those 3 elements are still there as they should be because there is no node in between that resets or sets the array to something else. The only node i have that is touching this array is ADD to the array, so nothing can ever get deleted right? So as i said when i load my game and the elements are still there BUT if i load again and again and again, it will stop working sooner or later. SO without dooing any changes to the code, after loading a few times ( sometimes after 2 loads, sometimes after 5+ ) the elements in the array just dissapear. I see it because my print string no longer shows them and they are really gone. What could possibly cause this? How can elements of an array just dissapear if they are once saved to slot? Everything else works, enemies, ammo, guns, etc.. i made it all work but this is giving me nightmares.. 😦 please help. thx🤘

unkempt warren
bold flax
ruby cobalt
#

hello!

I want to send a duration in seconds and control a interp node with it.. not sure what the formula is

bold flax
unkempt warren
bold flax
frosty heron
#

but I suppose that still an option

#

better than dc all together

bold flax
visual crest
#

What would the best way be to go about wounding a stat? Like lets say health's max value is 150 but you take 10 wound damage and now its max is 140, but that wound can be healed latter so max health will eventually be 150 again.

frosty heron
#

I would attach a buff that reduce the player's max hp

visual crest
frosty heron
#

applying a buff that reduce player's max hp. There are many ways to do buffs, in my old project I use Dynamic combat system from marketplace, it already come with it. For my new project
I would probably use GamePlay Ability system GameplayEffect to apply buff

visual crest
#

Oh I see you mean just reduce max health by 10 then increase max health by 10 when removed? That won't work because I want to show it on the health progress bar as black or for mana as brown

frosty heron
#

I don't see why not, you can represent the black area as the penalty

#

A buff is just something you can apply to your system, it should be able to do anything code wise.
You can probably use component. Have basic features like if the buff is stackable, removeable, etc

latent ridge
#

Hello! I'm new here and encountering a problem with Unreal Engine 5.2. I've managed to spawn an actor at the point of projectile contact, but it's creating multiples at repeated points of contact instead of destroying the previous one. Attempts to destroy the extras haven't worked, as it doesn't validate their existence. Can anyone assist?

remote meteor
#

are you spawning a new projectile each shot?

#

if so, the variable could not be the same, hence Last Perimeter BP wouldnt be valid

frosty heron
#

this one have duration, but it can be changed to infinite. And can always be removed with Tags (To remove the wound effect for example)

latent ridge
visual crest
frosty heron
#

well I can't re-invent the wheel (a worse version) , that's why I'm trying hard to understand this system

visual crest
remote meteor
fleet lichen
#

Hello , Should I learn how to code, or are blueprints enough?

frosty heron
remote meteor
#

and maybe percentile correction on Health when the MaxHealth is changed

visual crest
frosty heron
#

Use Component for the Buff so you can apply it to not only your self but to enemies too.
On Buff Applied -> Do X
On Buff End -> Do Y

frosty heron
latent ridge
remote meteor
visual crest
remote meteor
#

essentially stats modifer stacking 😄

#

now i want to add a potion that will increase the MaxHealth by 50% for 3 minutes!

paper gate
#

Trying to orient the character to the surface normal, so that it's forward vector is pointing towards the surface. Currently running into an issue where -90 and 90 angles work, 180 and -180 degrees result in being rotated directly opposite to the surface and the inbetweens are, well, inbetween the two. Any idea if I'm even on the right track with my 'solution'. What am I doing wrong?

#

To get the 'vaultNormal' I am performing a line trace and taking the 'normal' parameter

#

I feel like I've scoured the whole internet for the solution, nothing though

rugged wigeon
#

You are trying to get your character to face the same way as the vault ledge, yes?

paper gate
#

Yeah, essentially. Something like this

remote meteor
#

you want to negate(multiply by -1) the normal then rot from x

paper gate
#

This seems to work. I'll do some further tests, but thank you

faint pasture
rugged wigeon
#

you're just trying to say "I'm turning at x speed and it's been y seconds since the last frame so figure out how far I should have turned

silk frost
#

Hello everyone, I have a serious question about how to save the fact that when I picked up a flashlight, the save system would save it. I have already made a Save System and made it so that when you click “Save Game” it saves the “Player” data and when I click “Load Game” I teleport to save the player’s coordinates, this is of course good, but it does not save these things that I have already picked up please tell me how to fix this.

sand arch
#

I'm trying to recreate the cropout project that comes from the Unreal Engine example. But the enemies are crossing my building, does anyone have any idea what to do?
I'm using method AI Move To in Blueprint

dapper galleon
#

Hello! I can't figure out why this code doesn't remove the members from the array:

broken wadi
rugged wigeon
dapper galleon
#

At first, I attempted to remove the exact item (the "Enemy" input on the event), but it didn't work either

#

So I switched to index, figured it'd work more reliably

#

But no, it just doesn't remove anything

broken wadi
#

Do you want to remove just a particular item or clear the entire array?

dapper galleon
#

Just one item per dead enemy

#

As the player kills the enemies, this event gets called again and again, and eventually, the array is empty, which triggers a second wave spawn

silk frost
dapper galleon
#

My only hunch is that like, I'm changing it but I'm not setting it?... But I don't know how to go about that, the "REMOVE INDEX" node doesn't have an output

broken wadi
#

yea you need to set the array again otherwise that node removes it but then keeps it in memory without actuallying applying the change back onto the array

dapper galleon
#

but how??

#

it doesn't have an output!

rugged wigeon
humble sleet
#

the Remove node passes array by ref, so it directly changes the array rather than first obtaining a copy and changing the copy

#

hang on

#

nvm I think I misunderstood

broken wadi
#

yeah i think you have to set it again

rugged wigeon
#

Does the struct break provide values by ref though?

humble sleet
#

it's because you're operating on the result of a find node

dapper galleon
#

.....huuuuuuuuuuh.

humble sleet
#

this returns a copy

dapper galleon
#

Okay

#

So, what I need to do is

#

uh

humble sleet
#

so you need to set the value

#

map = key value pair

rugged wigeon
#

When you spawn a wave, store the current wave as a var

humble sleet
#

which you know since you're using one :P

rugged wigeon
#

I mean like yeah. That could work but generally speaking try to think of structs as immutable. Don’t edit things within a struct.

humble sleet
#

?

#

I use arrays of structs to keep multiple sets of data lined up properly

#

is that bad?

rugged wigeon
#

No

dapper galleon
dapper galleon
rugged wigeon
#

I’m saying don’t edit content within a struct. Worst case create a new struct based on the old one plus a change.

humble sleet
#

ah

rugged wigeon
#

I mean I’m a functional programming guy but I think you should try to avoid mutating objects wherever possible.

#

Game dev requires otherwise but structs are going to be data and you can obey clean functional thinking there

humble sleet
#

OH I realised what I wasn't getting

#

rather than grabbing a book from a bookshelf, tearing out pages, gluing new ones in and putting it back

#

get the book, copy it with changes, put the copy back

rugged wigeon
#

Yes

dapper galleon
#

Oh my god IT WORKED

#

It worked, thank you so much

humble sleet
#

👍

rugged wigeon
#

Well for example right here we have someone getting confused because they were mutating an object that they thought was a reference but was in fact a copy

#

If you avoid functions that depend on something being pass by ref and treat it like data you’ll just have a cleaner workspace

#

To begin with I would try very hard not to have a stored struct (ideally immutable data) that has references to an actor (stateful stuff)

humble sleet
#

I realised some of that soon after I posted my message lol

#

thanks for the info :)

ruby cobalt
lament fox
#

hello , this is the year integer but it looks like this. do you have idea how i can fix it ?

versed sun
#

year x 1000?

#

or, is it a comma for grouping

#

open up your Int to Text if you have it

lament fox
#

thank you so so much 🙂

umbral galleon
#

I got this error message, and I have found a rather reliable method to reproduce it - what is the best method to go about contacting the development team?

"LogOutputDevice: Error: Invalid object referenced by the PersistentFrame: 0x000000000000001e ... - If you have a reliable repro for this, please contact the development team with it."

pallid nest
#

hi guys , I have this variable that will display in a widget whatever you write in the description box. Is there any possible way to make a variable to be a warped text? The problem I am facing the description has to be very short otherwise

rugged wigeon
#

Wrapped

#

It’s in there somewhere. I can’t check now. Maybe it was only a rich text box thing but I think not

pallid nest
rugged wigeon
#

I’m sure it’s in there or at least on a rich text box with some name in the same vein

pallid nest
#

you are actually right, i was looking at the wrong place thanks!!!

finite hearth
#

Is there a way in BP to round floats to a nearest tenth? The only function is see is nearest int.

humble sleet
#

multiply by 10, round, divide by 10

#

you could even make a blueprint function library and make a pure function that can round to any number of decimal places

finite hearth
#

My very first thought

#

Ty so much

slender dagger
#

Can someone help me figure out a way to add and remove items from arrays depending on if they're spawned in or not? Basically I want to spawn certain power ups but not if they've already spawned in. And then add them back once they've despawned.

humble sleet
#

also show code if you have any

slender dagger
#

The array code is just off to the side because I wasn't sure how much space I'd need

humble sleet
#

well for starters I don't know what your random float in range is doing - that will always return true

slender dagger
#

I need to still plug the class in once I've found it, but I'm not sure which one I'm going to need. I've tried setting this up other ways and while I can get it to spawn the first time, It's spawning stuff with a different array

slender dagger
humble sleet
#

nvm then :P

#

I'm still trying to get my head around what you're trying to do

#

what is the desired effect?

faint pasture
slender dagger
#

so basically it has a x% chance to spawn a power up, when it spawns it, remove it from the array and add it back in after the power up ends.

humble sleet
#

ahh

faint pasture
#

Just for each class in your array, get actor of class, if it fails, there isn't one

faint pasture
slender dagger
faint pasture
#

Don't confuse an instance with a class

#

You have an array of CLASSES

slender dagger
#

the array is just in the instance blueprint. The array is made up of classes though

humble sleet
#

wrong kind of instance :P

slender dagger
#

oh wait

humble sleet
#

he means instantiated class

slender dagger
#

yeah i just realised lmao

slender dagger
faint pasture
#

I'd do it like this.

Spawner:
PowerUpClassesArray

When you go to spawn a powerup:
For each class in array, add a copy to some other array if there's no instance in the world
That 2nd array is your array of allowed classes, get a random element and spawn it

slender dagger
#

lemme do a little mockup to see if I get what you mean

faint pasture
#

SpawnRandomPowerup -> for each element in PowerUpClasses -> get actor of class -> if not valid -> add class to AllowedClasses
-> finished -> get random entry in AllowedClasses -> spawn it

#

Don't do that on tick, just have like a 10s timer or whatever your spawning interval is

#

That's a quick and dirty way to do it

slender dagger
#

So I have power up and allowed power up arrays, Would the power up array be completely empty and the allowed one full?

faint pasture
#

the 2nd one gets filled every time you go to spawn something

#

you never remove any, just clear it after spawning

#

AllPossiblePowerups
CurrentlyAllowedPowerups

#

It can just be a local variable in a function

slender dagger
#

so something like this? The is valid goes back into the for each while the not valid just spawns the random from allowed.

#

Apologies if this is not at all what you're on about, never really done much arrays all that much aside from basic for each loops

#

ok I don't think that's worked. Ran into an infinite loop on the first spawn

#

got rid of the infinite loop

#

but it still keeps spawning duplicates

lofty rapids
#

why not just check on a timer if any are missing from a full array to respawn them ?

#

so have an array of all the powerups, remove from array when you destroy, loop through and create the ones that not valid

#

or they are all seperate classes ?

slender dagger
#

yeah they're separate classes

#

one is the parent so idk if that might help

#

I've tweaked it a bit so it doesn't duplicate but instead it just keeps missing one out instead

lofty rapids
#

so do you destroy the actor ?

slender dagger
#

so the power up spawns when one thing dies, you can choose to pick it up and when the power up is finished then it is destroyed

#

I'm just trying to make them spawn randomly and not duplicating it though atm

jolly oriole
#

Quick question - should I test for interfaces before trying to use them, or is that redundant?

#

For context, the above screenshot is executed when the interact button is pressed

lofty rapids
slender dagger
#

yeah

lofty rapids
#

what if you kept an array of destroyed ones

#

so you could loop through that array to respawn

#

and just just empty out the array after

#

then add to it, when you destroy

dim agate
#

Anyone have advice on how to get this to continuously fire as long as the player holds down the input (right-click)? At the moment it just instantly turns the player character to where the mouse was when right-clicked, I want the player character to rotate to be looking at the cursor location while right-click is held down. I've considered event timers but wondering if there's a more efficient way.

versed sun
#

Triggered = On Tick

#

you want Started i believe

slender dagger
versed sun
#

well, started for the Mappin Context part, Triggered for the Set Actor Rot

slender dagger
#

it looks like this atm

#

but for some reason it doesn't actually randomise

lofty rapids
#

what is the random connected to as far as the power

slender dagger
#

the output ref?

#

That goes into what's being spawned

lofty rapids
#

i mean on the execution it's in the loop body ?

slender dagger
#

both the not valid path and after remove go to the spawn which takes the random

lofty rapids
#

because your removing the element so if it's after loop body it will not work the array will be empty

dim agate
slender dagger
lofty rapids
#

are you removing if it's valid ?

#

you probably want to keep those classes of what you removed in an array

slender dagger
#

I've got the power ups and possible power ups, I was gonna remove them but neither of them work

lofty rapids
#

wdym "possible powerups" ?

slender dagger
lofty rapids
#

and that updates when you remove one ?

#

your possible spawns should be the ones that are destroyed right ?

slender dagger
lofty rapids
#

show where you plug the random in

#

but you are removing items and trying to get random

#

but i don't see where that should matter, you remove the item, get a random, and then spawn

slender dagger
lofty rapids
#

before you destroy the actor, save the classname in an array

#

that you can check and spawn whats in there

slender dagger
#

the actor isn't being destroyed for a while in this case

#

the power up is only being destroyed after it's effects have worn off

lofty rapids
#

right but you want to respawm it right ?

slender dagger
#

yeah but I don't want to spawn another one if it's already been spawned/being used

fringe junco
#

So im trying to setup a third person camera view switch in generally overhead RTS. the camera switch works fine, im just wondering how I can move the aim rotation of the pawn because i merely attach the camera to the pawn and dont possess them, but need them to aim lol

split girder
#

Hello im trying to create an execution system by playing another AnimMontage when the enemy is below 25hp, however if one enemy in my scene is below 25hp the animation always changes. Is there anyway to make this instance only, possibly with a trace? although ive tried to trace and couldnt work out what to do with the Out Result

lofty rapids
fringe junco
#

I have an aim offset set up an all, its just driving those pitch and yaw values. do i use the control rotation?

fringe junco
split girder
#

I can get the instance and print it from the out result but im unable to get that instances health

fringe junco
#

hmm

faint pasture
#

Check, then add if there isn't one

slender dagger
#

that ends up giving me an infinite loop

faint pasture
slender dagger
faint pasture
slender dagger
#

to get another one that isn't valid

faint pasture
#

the loop body runs for each thing in the array

lofty rapids
faint pasture
split girder
#

th health works individually

#

so i can kill different enemies and the health doesnt go down

lofty rapids
#

idk anything much about c++ or how you would get those "attributes"

split girder
#

but when i get a ref to that health in blueprint it is referencing all actors of that typ

#

type

split girder
#

thats the blueprint

slender dagger
# faint pasture

so it randomises properly. Sometimes it spawns duplicates though.

split girder
#

but i see that im not referencing a enemy instance and rather the whole enemy class

#

but im not sure how i can reference a single enemy instance

faint pasture
faint pasture
lofty rapids
#

if you can

slender dagger
#

is there a way to check the array every frame?

lofty rapids
#

yep

#

you could also put it on some kind of a timer though

split girder
lofty rapids
lofty rapids
split girder
#

I have 2 enemies, one 100hp and one 23hp in my scene, i want to be able to add a finishing move on the end of my combo if the enemy im fighting is below 25hp

#

But im not sure how to go about it tbh

lofty rapids
faint pasture
#

@slender dagger

split girder
faint pasture
split girder
faint pasture
#

The enemy you just hit, the enemy you have targetted, whatever you want

#

In plain English, how do you know which enemy you're "fighting"?

split girder
#

targetted is a good call i have a target component on my enemy

slender dagger
tropic peak
#

Hey guys. I'm starting fresh with blueprints, and lets say I'm super new. I need a prod in the right direction. I decided to set a new task each week to develop a small functionality that won't really be used anywhere. I just need to create stuff so blueprints finally click for me. This week I'm making a "dice roll", and to determine what I rolled I figured I'd make a sphere at the top of each face, and the sphere that after rolling the dice has the highest X value would qualify as the roll result. (screenshot attached). If I wanted to add these spheres to an array, and compare their transform details .. how would I go about doing that?

faint pasture
slender dagger
ruby cobalt
split girder
tacit rock
#

Hello, when I make an open level it doesn't load my gamemode in the level because I can't control my character but when I launch the lvl through the editor it works.

faint pasture
#

You need to cast Hit Actor it to YourEnemyClass and save a ref of that type if you intend for it to always be of that type

faint pasture
rugged wigeon
# tropic peak Hey guys. I'm starting fresh with blueprints, and lets say I'm super new. I need...

Running with this design because of your stated goal… first off don’t do child actors like that. They’re kind of annoying and come with some baggage. Basically each “child actor” is more of a container so you’d need an additional node to get the actual out. For a task and implementation like you’re suggest use “scene components”, which are basically just transforms not visible at runtime.

faint pasture
#

look like meshes which are scenes anyway

rugged wigeon
#

Ah yeah. That’s more ok. But I would say use scene components properly to make it cleaner even for this toy example. No collisions ever. No visibility at game time.

timber crystal
#

@rugged wigeon i used now your way at it works!!! 😄 The AI ​​finally moves in the air. I've spent the whole day on it, but I would be very happy if you could watch the whole thing again over the next few days... since the AI ​​doesn't exactly move forward as soon as it sees me pounces on me from above but at least it's alive!!! 😄

I can then show you the new, functioning bp again; it would really just be a small finishing touch

But enough zzzz for today and thanks again for your tip 🙂

rugged wigeon
#

Anyway, since each of them is part of your class, you can reference them at any time in the BP. If you want to make an array of them you can do Make Array <whatever type> and then add pins adding your 6 elements manually.

#

You can use a for each loop on that array to iterate over each and track which is the furthest along your chosen axis on its transform -> location

lofty rapids
#

create the array on beginplay

#

you can just drag n drop

rugged wigeon
#

And then finally you’ll need some method to figure out which side that scene components corresponded to. This is a bit of a convoluted place to be in but you can come up with some silly to do that association, like perhaps, a map of the components to int values

lofty rapids
#

if i create an array in a specific order, can i guarantee it will keep that order if i don't change it ?

faint pasture