#blueprint

1 messages · Page 56 of 1

prime stump
#

What are you actually trying to do? if its just setting 3 variables of the same type to the exact same value i'd just do 3 set nodes, if its gonna be repeated make it into a function that has an input called new value which plugs into all 3 of them

torpid rover
#

Anyone got the "Get Data Layer Manager" node to work in 5.3? The old Data Layer Subsystem is deprecated but still works. But Get Data Layer Manager is returning none. Can't really find any docs using it either...

finite raft
#

Hi everyone, I was wondering if anyone can help me with a camera issue I have. Basically I need to switch off inherit yaw on a spring arm camera when the player is in mid-air, as they go into a freestyle mode allowing them to do tricks. When doing flips the camera also flips due to the inherit yaw being on. I've tried turning off inherit yaw but the camera snaps pointing towards positive x direction, here's a video showing what I mean. I've also tried turning on set absolute rotation and a number of other things but is still not working. Does anyone have any idea on how to keep the camera facing the players look at rotation when first leaving the ground but then not inheriting any rotation until reaching the ground again?

quiet reef
#

Have you tryed making a separte platform to doing tricks

#

Like asphalt 8

finite raft
#

Its the camera I need help with, I've got the trick part working already

#

I need it to work like a 'free-cam'

prime stump
#

Might wanna try figure out why the camera is snapping to pos x to stop it from happening, otherwise if you don't need the camera to move at all then it might be worth having a second camera that doesn't move on player input and just possess it when in freestyle mode and then re-possess the original camera when out of freestyle mode

quiet reef
#

No lile make the camera rotate when you do the trick so the problem desnt seem so obvious

winged zephyr
#

Does get all widgets of interface return self if it runs said interface?

#

And would it be bad to call an interface if it doesn't have the receiving event?

modest tinsel
#

How could I make the spawn Not move with the Projectile Movement? 🙂

surreal peak
#

I only really use Components for Effects that are in fact supposed to follow the Actor.

fair roost
#

It might work, it might not. I still want to prototype the concept. Do you have any insight into how to do it?

jolly light
#

Hey Guys- I'm trying to learn tha basics of multiplayer blueprinting. I'm trying to make one of my 3 players print a string saying i'm chosen. It appears on each of the players, three times.. what am i doing wrong?

prime stump
#

Doing all that stuff just to get a ref to the player character is also unnecessary, you want to try avoid using any getters that takes an index (like GetPlayerCharacter) instead use GetController to get a ref to the player controller and you can use GetControlledPawn from a controller to get a ref to the players character

kind estuary
#

both these nodes remove the static mesh SM_Gun.
How do i restore back the mesh to its default mesh?

prime stump
#

Save a reference to the default mesh somewhere and feed it into NewMesh

kind estuary
#

so baiscally a soft object reference right?

jolly light
delicate surge
#

does anyone know, how to close the gap in my spline?

versed sun
#

Looks like you need to fix your mesh
try Add Pin on the multiply, and make it something from .9 to 1.1

kind estuary
#

How do I get the preview image thats in unreal content browser for the Static Meshes?

#

This little icon thats all i need for my UI texture

#

I have like 300 guns, and want to just get that little image preview and use it for my icons.
Is that possible? Or i have to just screenshot every single weapon and import the texture back to unreal?

distant hollow
dark drum
quiet reef
#

I am having a problem with my packing process

#

Its giving me an unknown error

dark drum
modest tinsel
#

Does anybody know why this wont overlap with the player? 🙂

#

God bless you all! 🙂 Jesus loves you! 🙂 have a great day!!!!! 🙂

quiet reef
#

Or

fair roost
distant hollow
delicate surge
narrow pawn
#

anyone knows how I initialize the items in my array without needing to look at them in my scrollbox?

#

basically I'm putting things in a scrollbox, but they only start executing their BP's when I scroll over them in the list

#

which is weird

delicate surge
trim matrix
#

anyone know what might cause say my weapon to fall through the world, even though it's set to collider with the world dynamic and static ?

#

also the weapon does have correct physics stuff etc

dark drum
trim matrix
#

which has the various boxes etc

dark drum
trim matrix
#

I have it setup so the skeletal mesh should be colliding with things but doesn't seem to be

remote meteor
#

collisions has to be the root component though

#

what is the orientation component?

trim matrix
#

tbf I can prob just fix the weapon in the model etc so I don't have to and remove the ori component as it doesn't do anything apart from that

trim matrix
stiff flame
#

Hi all. Basic question.

So I have a map with several door types. I want them all to operate the same way

Currently, I am using a line trace in the character BP to call an open door custom event in the door BP. How would I make this work with my other Door BPs other than "Door1?"

Wouldn't this be more effecient to cast my line trace to the door BPs instead of having all the interactivity in the player BP.

How would you tackle this? Sorry for the phone pics

atomic saddle
#

Hello i want to loop trough an array in blueprint like from index 1 to the last index

heady burrow
dark drum
# stiff flame Hi all. Basic question. So I have a map with several door types. I want them a...

You would first need an interaction system to handle interacting with stuff. I've done tutorials for both an interaction system and a few different types of doors you might find useful.

https://youtu.be/yvRZVX_HD3E

Welcome to this tutorial on how to create an interaction system in Unreal Engine 5! In this video, we'll go over a different approach to making an interaction system using Unreal Engine's powerful Blueprint visual scripting language.

Whether you're a beginner to Unreal Engine or an experienced developer looking to add a modular interaction syst...

▶ Play video
eternal spruce
#

I can't find an answer or how to figure this out but we are working on trying to connect a camera from OFF WORLD to a VR Pawn actor that will move with the character to the different positions. I'm really new to this but am trying to figure it out and am welcome to any advice. Also if this the wrong channel, please let me know what one I could post in! Thanks!

pastel olive
#

Why does my BP not allow me to place a teleport node? Other classes allow it, but this one only allows teleport trace.

pastel olive
#

set actor location doesn't allow rotation though, right?

dark drum
pastel olive
eternal spruce
dark drum
narrow pawn
#

help...

eternal spruce
#

But i do appreciate the help!

narrow pawn
#

why does this take the max value for my int in account?

#

and this doesn't?

#

thing is that I need to break, else all the int value of the array elements get set +1, I only want them to be increased one after another

spice hazel
#

Not sure it's the proper channel but I'll ask anyway. Is there a way to save a particular setup of the UMG widgets as a blueprint? Let's say I have a Canvas with some elements in a particular arrangement. Can I save it and then add more copies of it at runtime?

eternal spruce
dark drum
spice hazel
eternal spruce
# dark drum How are you doing it?

I used the Attach actor to section and selected VRPawn, and I believe that its not working cause the VR Pawn starts from the Player Start Position

dark drum
eternal spruce
dark drum
narrow pawn
faint pasture
eternal spruce
onyx token
#

question-
is this stupid? thenk

#

idea is-
When my dude attacks, and doesn't find anything to attack within 2 seconds - he goes back to idle

#

so every time i attack, i invalidate the last timer, and start a new one that'll take 2 seconds thenk

faint pasture
#

Why are you involving an enum here?

#

This can all be in your anim BP

onyx token
#

that.... is a point

faint pasture
#

It can probably be a state machine in the anim BP I'd guess

onyx token
#

bp -> abp communication - should i use interfaces or "get anim instance" ?

#

and then just save the cast on beginplay, and call the events?

faint pasture
#

What events? Just play montages

#

I think you can set it up such that you blend in and out of montages etc

onyx token
#

yeeah i guess you're right, right now i'm just blending using an enum, but i should probably use montages for the attack, and do "idle - walk - run" with a blendspace CatLookie

#

well... you kinda cant CatLookie

faint pasture
#

Do you want your controls to rotate look direction to rotate camera, or controls -> camera -> look directino?

#

I'd say the latter

onyx token
#

thank you btw v1 @faint pasture

#

wait- they legacy'ed the Blendspace1D? thenk

devout beacon
#

hi guys can someone help how i can get the player index dynamicly in animnotify

faint pasture
#

I would do:
Input -> controlrotation -> camera
Tick -> Trace out from camera -> AimLocation -> FindLookAt -> Head/Aim Rotation

#

thats your usual 3rd person approach

devout beacon
#

Adrielll

devout beacon
#

i am new to ue5 and i might be disturbing :((((

meager ingot
#

how do I make a collider do overlap but not raycasts or physics?

kind estuary
#

I need to destroy an actor, but this actor needs to be ressurected with all its variables and everything intact in the next 10 seconds.
How do i do this?

gilded harness
#

Hello everyone, I want to change the animation using control rig, but when I try to bake a mesh to control rig, my control rig is not in the baking list. How can i fix it?

lunar sleet
lunar sleet
lunar sleet
kind estuary
meager ingot
lunar sleet
#

Overlap != block

faint pasture
lyric quiver
#

I'm making a bullet spawn to damage the player however I can't seem to get them to collide properly to apply damage to the player as they do collide but the bp doesn't run as I would expect. I have overlapall on the bullet.

lyric quiver
#

also the game is in 2d so that might change stuff

lyric quiver
#

ah thx I'll try that

faint pasture
#

the is valid is redundant

#

the cast will only succeed if it's valid AND a BP_Player

#

What do you want to have happen if it overlaps something but it's not a BP_Player?

lyric quiver
#

just destroy itself

#

for now

faint pasture
#

This is probably what you want

lyric quiver
#

Yh I've got it to work now thx

faint pasture
#

You can even just skip the cast

#

just apply damage to whatever you hit no matter what it is

#

that will do nothing in most cases, but if you implement an event any damage then it'll do something

lyric quiver
#

ok

trim matrix
#

out of interest is there a way in Behavior tree task to have an Enum be able to be set in like what enum it's for ?

#

obvs I can do a byte to thing but that won't tell me for that enum what the bytes would be

quartz mural
#

How come this doesn't change the array? I'm trying to get the first item, and then remove it after. I want to dig through the array, like a list, removing each piece after I use it, but the remove node doesn't seem to remove anything from the array with default values.

trim matrix
#

You could just remove from the array by index instead of remove by item.

trim matrix
trim matrix
#

I don’t believe so.

#

I have this

#

and what I was hopeing to do was have the enum be selectable etc

#

You can do that by having an instance editable enum property on your bevaior tree task blueprint.

quartz mural
#

Both of these do the same thing, if I insert a print node to observe the effect, it just prints "Living Room" ad infinitum.

trim matrix
#

if I can't fairs I'll just have to leave is as a byte

trim matrix
#

If your intent is to remove the first index, you want to remove it by index and not item

quartz mural
trim matrix
#

That’s what I said, there’s no errors with the provided code. The only thing I pointed out is that the way you were removing the item from code was “extra” meaning overkill.

#

The errors lie somewhere else outside the scope of the picture.

quartz mural
trim matrix
#

No there shouldn’t be not right now. I would confirm that this function is being ran when it’s supposed to.

#

But in the future… yes there will be things that reset your default values.

#

Blueprints error out all the time and certain property’s will get there default values reset. This isn’t an issue at all right now, don’t worry, but if you keep relying on default values, at some point in your projects lifecycle that default value will get reset.

#

As a general rule of thumb, don’t rely on default values being correct.

#

It’s best practice to actually setup the values on some sort of initialization logic for your blueprint.

quartz mural
#

Yea, I'll construct a temporary array based on the default array, and then use that instead.

#

Thanks for the guidance.

trim matrix
#

That’s not what I mean

#

I mean it’s best to always have the default values of variables mean absolutely nothing, because those get reset all the time by the engine during normal editor operations.

#

It’s best to leave the default values as nothing, on begin play actually set the value of the array to what it needs to be.

#

Or on construction even better

brazen pulsar
#

so, on refresh, the level isn't spawning in the characters/actors I want it to spawn in, not sure why

trim matrix
#

The second cast node will never fire.

#

It has zero chance to ever execute.

#

Oh sorry your casting to character?

#

Is teddy cylinder a child of character?

brazen pulsar
#

yes

trim matrix
#

In that case, why would you need to cast to character first?

brazen pulsar
#

I assumed it needed to to get a reference to the actor

trim matrix
#

Ok then I take that back, the second cast node will execute, but casting to character is completely pointless.

#

The misunderstanding is about the cast node then.

#

Wait I may be confusing. Myself even more MorganaLaugh

brazen pulsar
#

Ha! don't worry, any help is good

trim matrix
#

Why are you ever spawning character base class?

#

That’s pointless entirely…

vivid marten
brazen pulsar
#

Idk, I'm just trying to make it so on day 2, teddy and alice are in the level

#

to say the least, I barely know anything about coding

trim matrix
#

Ok sorry, I think I finally wrapped my head around the code.

#

So firstly, your spawning the Character class

#

The character class is an empty, invisible, framework class that is never meant to be spawned

#

You are meant to derive other blueprints from the character class, then spawn in those blueprints.

#

Instead of spawning character, you would need to spawn Alice, and spawn Teddy.

#

Also back to those cast nodes, I believe they are completely irrelevant to the code, and like i said before, the second spawn actor node will never have a chance to run. It’s literally impossible with the casting you’re doing.

#

You should probably just delete the cast nodes entirely.

#

I see no point to them.

#

Also it’s only supposed to be on day 2 when teddy and Alice are both in the game? Why is the execution pin hooked from day 1 and 2?

brazen pulsar
#

well, that was something I added in to see if it would fix anything, and since it's tied to the refresh event anyway- starting on day 1- it wouldn't matter. since it jumps to day 2

#

I'll take it out now tho

trim matrix
#

Casting will not fix anything here, that is not the proper use case at all.

#

Casting transforms one type of object reference into another type of object reference.

#

And returns cast failed if it’s unable to.

brazen pulsar
#

Ok, I think that fixed it. I've definitely got the components after teddy/alice to spawn in... I think the coordinates for where alice and teddy spawn in are off tho

trim matrix
#

Yea those locations look off

timber crystal
#

Hello friends, can someone explain to me why Ai suddenly freezes in the animation?

trim matrix
#

Are you just plug-in a blendspace 1d into the output pose?

#

First thought is just if the animation is set to loop.

timber crystal
#

no i dont set something in loop

#

the default slot is empty i put just for future in

#

ok now it works with the run animation in loop ok but thanks a lot rappy i think thats it right?

trim matrix
#

That’s right.

timber crystal
#

thanks a lot mate!

quartz mural
trim matrix
#

Oh… if it was a local variable then yes MorganaLaugh

agile berry
#

i m trying to make a ghost car replay and i was just testing it? why does after 20 seconds the actors snaps into the current position of the car? i m indexing every after game start... what m i doing wrong?

olive yarrow
#

try'na get a simple dodge roll goin'... followed Gorka's tut, then some other bloke. both leave me with the same result - an animation and no push. Roots are active, if i remove the montage the player will dodge but... no anim. Any thoughts?

pallid nest
#

hi guys, quick one, I am creating a cinematic which basically moves the the variable of a sky (5 is almost night and 6 is dawn the second picture). The event in the sequencer works fine as when I run the cinematics I can see how the variable increase from 5 to 6 but the actual sun doesn't move (it will move if I move it manually in the editor only). Am I doing something wrong?

tight pollen
#

it is possible?

#

in UMG

pallid nest
#

i must say the same occur with other variables (for instance when I change the preset from normal to storm) , it works fine in the editor when I change it manually and in the sequencer I can see how it moves from "normal" to "storm" but there is no visual effect and stays static as first screen

tight pollen
knotty cloud
#

Hi there,

I'm trying to add a crouch / slide system into my project and what I have works so far however when I slide the model clips into the ground until the animation finishes and then the next step brings you back above the ground to normal walking height again, Is there somthing im missing here or is the problem located elsewhere?

olive yarrow
olive yarrow
carmine palm
#

What the yellow fuck

olive yarrow
#

It's like, uh, like a highlighter y'know?

heady burrow
#

what am I missing, Im only seeing changes in one value, Y.

#

ah, wait, right, this is not "angle", this is that weird thing... I just remembered..

sonic crest
viscid echo
#

I'm currently having an issue in the course i'm trying to complete where 1, When i start play it doesn't remove the monster in the middle of my screen. and 2, when it spawns the 3 monsters and sends them at my player I can shoot them with a fireball and the monster fades out like he's dead but doesn't actually die. just stays invisible.

And the monster in the middle of my screen can get hit and deal damage to me but can't seem to die?

Not sure what i've screwed up

sonic crest
sonic crest
viscid echo
#

well the way I have it setup. instead of destroying actors it puts them back in the pool and then calls them back in later? cause theres going to wind up being tons of mobs spawned repeatedly cause it's a 2d bullet hell style game like vampire survivors that i'm working on.

I have a clip from my channel if that would help show you what i'm talking about

#

basically I hit them. they turn invisible. proceed to continue walking toward my player. and the guy in the middle i'm not sure why he's still there

sonic crest
#

You can disconnect the AI Controller, teleport them into the pool, then whenever you want them back, set their world location back and Spawn Default Controller back.

olive yarrow
sonic crest
#

It looks like it worked?

sonic crest
olive yarrow
# sonic crest Tutorials aren't always right.

hey - fair enough. It caused major issues for my attacking system - but heck. if it doesn't seem to be here, and the lack of root isn't raising any red flags in your mind... guess i'll keep codin'!

sonic crest
#

Keep codin' glad it worked out for you

sonic crest
frosty berry
#

Using SpawnAIFromClass and passing the vector location of a spawn point. If there is already an object there, should it spawn another right beside it or will it spawn perfectly in place?

knotty cloud
olive yarrow
sharp crane
#

https://youtu.be/2DcwzltX-zY?si=EHWHUc6fJKzSMjKV&t=118 🌺Hello friends! I'm trying to create an item pickup widget similar to the one in Zelda Tears of the Kingdom (timestamped in link above), when you pick up multiple items, the newest item is added to the top of the list and the others get pushed down, and only 3 show at a time. I haven't found ANY tutorials for something similar, really hoping the bright minds here have some ideas!

This is Zelda tears of the Kingdom device dispenser guide will show you exactly what you need to do to use your Zelda tears of the Kingdom zonai charges in order to get more of those useful Zelda tears of the Kingdom zonai devices.

Socials:
Twitch: https://twitch.tv/kibblesbits
Discord: https://discord.gg/SBQsaQzyM2
Twitter: https://twitter.com...

▶ Play video
#

Currently, I have a list widget that has about 20 items in a set order, collecting items will make that specific row unhidden (see reference) for 5 seconds before hidden again

knotty cloud
olive yarrow
frosty berry
#

WHat would be a good (or right) way to handle this. I have a map/level that is a building with multiple floors. I would like to have my spawner react based on the floor you are on. Would that be a good use of tags (based on the actual floor bp/object or something that denotes the floor you are on) or what?

vivid marten
#
meager ingot
#

I have an array, is it common for them to not remove things from itself when I set it?

devout beacon
vivid marten
carmine palm
#

Yea you have to clean it up manually

devout beacon
#

is it a problem to use index 0 directly, when i add multiplayer

carmine palm
#

I use it here

#

for clearing array

eternal spruce
#

This might be the right spot, I'm trying to get this camera system to work. The idea is there is camera above my VRPawn and I need that camera to teleport above my VRPawn everytime the VRPawn teleports. What would be the best way going about this?

vivid marten
eternal spruce
#

Would you build that inside the VR Pawn bp or create a new class?

vivid marten
#

I haven't done things specifically for VR.. do you have a camera attached inside to the VR Pawn BP ?

eternal spruce
#

So I have my HMD camera that gets teleported but need another on that floats above to teleport to that world location.

vivid marten
#

something silly like this (after you do the teleport)? @eternal spruce

eternal spruce
vivid marten
#

where are you doing that ? inside the level blueprint? Player BP?

#

probably makes a difference where you tell it to update

eternal spruce
#

Pretty much the player blueprint

vivid marten
#

but the player doesn't own the camera .. its just in the level correct?

vivid marten
#

I put a cube in the level and put this inside the level blueprint

#

each time I press Z the cube jumps to my character location just fine..

#

i assume a VR template has a level blueprint same as thirdperson @eternal spruce

ornate trail
#

is there a way to do a hi-res screenshot of an entire BP?

carmine palm
#

theres a bp version of pastebin

ornate trail
#

great thanks

carmine palm
#

np

ornate trail
#

ah ok, I think I need smth that actually does hi-res screenshots. This one doesn't handle custom nodes very well

vivid marten
#

3440x1440 resolution

trim matrix
#

How can I take this and kind of do a changed thing

#

so bassically see if something has changed and if so call a dispatcher else don't do anything

#

I'm sure I've done this before and it's worked like as a check to see if something has changed

broken wadi
trim matrix
#

too far in now to mess with reverting to UE version so just gotta go with it now haha

broken wadi
#

It's just a component

trim matrix
#

is my BP code right though to see like if something has changed compared to last frame ?

broken wadi
#

if you want just 1 frame you can use delay until next tick

trim matrix
#

and is the bool thing right so bassically when the local variable is not equal to the customer pawn sensing

#

I would think that means something changed ?

lunar sleet
devout beacon
#

how should i get the player dynamicly

#

should the data come from server etc.

lunar sleet
#

There’s also a compendium in the pins there you should read

magic ingot
#

anyone know the best way to make an inventory system?

daring spruce
#

hey quick question for people who used ue4 do you know how to use this node now

#

this is it on ue5 no dropdown

lunar sleet
#

Make sure you picked the right node

daring spruce
lunar sleet
daring spruce
#

sure I hope that's it

lunar sleet
#

It usually has a drop-down, if not, double check the event you’re binding to, maybe the signature’s wrong 🤷‍♂️

daring spruce
#

you were right all I did is restart the engine and it's back thank you

nocturne fossil
#

is there a node for lerping between 2+ things? like

wicked cairn
#

Hi guys! I'm making a spectator camera for each of my players so when a player dies, they have their camera swapped to one of the other player's spectator cameras which are replicated.

Currently the camera does not have a roll, and I'm trying to get the player's mouse input and transfer it into the look rotation of the spectate spring arm but cannot figure out how to do so. Any ideas?

near shard
#

I feel like the answer is obvious but if I use a linetrace, how can I tell if the actor was hit by it?

#

Id like to make the object that was hit trigger a custom event

near shard
#

But thats only looking for a specific blueprint, so if I had say a chest and a door as 2 different blueprints I wouldnt be able interact with both of them yea?

carmine palm
#

I have a progress bar object stored on my creature object class. How do you spawn them above your actor?

#

Moshi make an interact interface

vivid marten
#

🙂 you didn't give specifics so I just made a way to see if you hit it as you asked... this would print if you hit either things but using an Interface is the way to interact with things for sure

calm shell
#

If I have created a class (that is not an actor) in C++, how can make an instance of it from blueprints? The class already has, Blueprintable and BlueprintType, I'm just missing how to do it from the BP editor

vivid marten
vivid marten
carmine palm
#

Yes

#

Like how to spawn it above their head

#

Make it yea. Make it visible in world/actually spawn it that I don't know how to do

red berry
#

Whats the best practise for handling functionality between different items? For simplicity, we can have 3 types: base item (bare minimum), weapon and food.
I'm using DataAssets here. How do I make it so only food has water, hunger, etc. but not a weapon? In the picture provided I'm using a struct that has those variables, but you can't set the struct to null. So it looks weird if an AK47 has 0 hunger, when it should be null.
And vice versa. If I have data about guns, e.g. damage, reload, animations (lots of them), I don't want my DataAsset having a bunch of unused variables for food (since they won't use that data).
I know you can reference another class or data asset (like a reference to a material or mesh), but then you have to click it to open it up, and I want all of the item's data in a single tab, in a single place (since its easier to work with).
It would be annoying having to open up "Apple01" and then click on "Apple01FoodData" just to edit how much water/food a player gets from it. And there can be a case that Apple02 has FootData of "Apple01FoodData" (it has the wrong one), so it becomes more confusing. (I kinda wish there was a way to see variables of variables in DataAssets, like a dropdown section)

vivid marten
carmine palm
#

That just modifies it

#

Doesn't make it visible

vivid marten
#

you added a widget to the Enemy BP?

carmine palm
#

Cpp lol

#

Widget component

#

Found this

#

So ill make a npc widget class

vivid marten
#

that is what I asked originally if you used a Widget Component .. but I don't typically do C++ stuff.. sorry

carmine palm
#

It's fine

#

I made a spawned object that I can just drop creatureObject class on and set count on the spawner and radius and it spawns them randomly in that area. And my creo class stores their health/attacks/speed/states/etc.

#

Spawner object*

#

Oh and appearance (asset ref) and material ref

#

So I can randomize it between a set of materials if I want diff slimes for example

wicked cairn
steady night
#

Refresh my memory pls, this get true if any is true right ?

queen heron
#

always use a print string to make sure things go the way you expect

#

it helps

#

every

#

single

#

time

#

😄 👍

steady night
#

true

queen heron
#

anyone know where I could learn how rule tiling is processed in the code?

#

so far I'm at the raytrace part where it reads if the hit object is the same

#

but idk how to make it get which direction is the first object detected

#

and how each directions are read (N, SW, NE etc)

deft remnant
#

Hey guys I’m relatively new to unreal engine (about 6months in). I’m working on a project where everything is working fine in the engine until I try to use stand alone or package. Once I do the player character mesh won’t load and some meshes have the same thing. I’ve tried just about anything I can think of and legit can’t find any documentation or similar discussions online. If this is the wrong place to post I apologize please direct me on the proper place. Thank you to anyone who can help in advance 🙏

graceful holly
#

how can i make an input that can perform two different actions based on how is it pressed: single tap and hold down and release (but being the same button on the gamepad)?

deft remnant
# graceful holly how can i make an input that can perform two different actions based on how is i...

Create your enhanced input option. Once you set it there are option for adding more functions. So for instance if you add to tap X on controller for jump you could and another row, select controller X input and you should see an option that will let you set a condition such as holding and releasing X. I hope that makes sense I’m in bed now but could probably send a screenshot if needed tomorrow. Lmk

proven garnet
#

Hey! Anyone know why the static meshes in my blueprint adds or retracts very small decimals (only sometimes) when moving/rotating them?

I'm going half mad needing to change it to a whole number half of the time!

Snapping is on.

queen heron
#

it may be possible to change the transform values into integer, but that would require source code editing

#

or maybe creating your own tool that lets you transform objects with integer method

#

but that would take away the possibility of having halfs

proven garnet
#

Sounds way to complicated. But damn that is just annoying

queen heron
#

nothing is perfect 🤷

proven garnet
#

It's not the end of the world but I spawn in some stuff and just knowing that I imight spawn them in with a very slight rotation irks me 😛

#

I guess

glossy fern
#

Hi there, i have this code connected to an event dispatcher where a widget is closed , it's supposed to change the input mode from UI only to UI and game , but it throws this error

#

btw this code is inside the player controller , and i'm launching the game on client side

frosty heron
#

you can;t have half/decimal in integer

crimson totem
#

Hello everyone, I'm implementing the node blueprint "Simple Move To Actor" but an error like this appears, and the target character doesn't work.

UNavigationSystemV1::SimpleMoveToActor called for NavSys:None Controller:None controlling Pawn:NULL

Does anyone know the solution?
thank you, please help.

frosty heron
#

make sure your AI controller is valid

crimson totem
frosty heron
#

You are getting null reference, means u are trying to access something that don't exist

#

print string the value of ai controller

#

if u don;'t know how to do that I suggest looking at your first hour in unreal

#

now if it prints nothing, then you have an issue. You don't have a valid AI controller

#

though I think with simple move, you don't need AI controller

queen heron
#

am I doing something wrong here?
before this for each loop, this actor is set to add 1 in a random available index from the CrossDirection array, so some indexes have 0 and some have 1
now for some reason the output from the switch node always gives the same execution index every loop

versed sun
#

It will always Get the 2nd item in the array
try Plug Array Element into Selection

queen heron
#

how do I find 1 then?

#

here's how the result looks zoomed out

#

with just the find node, it gives only 4 times north or east

versed sun
#

connect green

distant hollow
#

What Type is your CrossDirection array holding?

queen heron
#

here's the result with Array Element connected

#

I just want to make it find the item 1 in the available array indexes
so if it does not find 1, it should fire the Default execution pin

#

hmm

#

I seem to have found a solution which does not require the Default execution pin

main bobcat
#

would anyone know how i can disable controller navigation on widgets? when i press a keypad button on the controller it will go to the next button, i know i can disable is focusable but i need that enabled for somethins else

graceful holly
#

someone has time to rubber duck with me? it's crazy that it is not returning anything here

forest crater
graceful holly
#

yes it has 4

forest crater
#

I think I remember not seeing any debug data when working with an array like this, have you tried e.g. printing element display name and seeing if it does?

kind estuary
#

I have an array of icons that correspond to the actors detected on screen.
its drawing and moving the icons on tick in the widget.
So for that i actually have 2 arrays and one Map.
1 array for the icons, 1 array for the actors, and the Map that is actor -> icon.
Now whenever an actor dies, the actor becomes "None".
And i cant use it to clean/remove the actor from the arrays and the icons, because its None.

#

So that means the array gets filled with Nones sometimes and the icons get messed up and go to actors that dont belong to.

#

How can i solve this problem?

forest crater
kind estuary
#

thats what i will do

#

On Destruction event right?

#

thanks

#

but since im asking

#

is there any way to iterate through a map and clear the Nones ?

graceful holly
#

solved, but still weird, yes i was not adding new elements but at the same time the number of the elements was changeing every time

#

perhaps unreal puts empy lements into the array automatically on tick

#

have no idea

forest crater
# kind estuary is there any way to iterate through a map and clear the Nones ?

You can remove them one by one as you go I think. After you delete the actor, drag from the map -> Find node, and leave it empty, it should find the none, then just Remove it.
I've not worked with maps, so can't guarantee it, but sounds reasonable imo.

Other than that, I've looked up a way to iterate through maps in a ForEach loop, it's kinda wonky, but it's there if you prefer this approach.
https://www.reddit.com/r/unrealengine/comments/i956wb/is_this_the_only_way_to_iterate_through_a_map_or/

Reddit

Explore this post and more from the unrealengine community

forest crater
edgy ginkgo
#

I am getting an infinite loop here and I don't know why

kind estuary
#

because you cant "Find" a none

#

so ok you iterate through the keys but the key is None so how do you remove it from the map

forest crater
distant hollow
#

In fact the Set Next Spawn Point is also redundant because they would be in the same value

#

When you spawned FloorTile at TransformA, it’s transform will be the same as TransformA, so you are setting it to itself

edgy ginkgo
#

oh shoot that's meant to be the location of the arrow

#

that's why!

#

good spot

distant hollow
#

As for why it is an infinite loop, you will need to look at what is calling this

edgy ginkgo
#

I understand why it's happening now

distant hollow
#

If your loop condition is based on SpawnTile1 being true then yes it will continue indefinitely

edgy ginkgo
#

since this triggers when walking to a location and makes it continue forever

forest crater
distant hollow
#

It should trim the array automatically

#

Otherwise there should be some kind of option to resize the array iirc

kind estuary
#

an array can remove by index

#

a map can only remove by key, and if the key is None, then we are in trouble 🐺

distant hollow
#

How do you store and read your maps?

#

And why would you need to remove them

undone nebula
#

hi, could anyone help me with my enemy healthbar not projecting the actual health? death works perfectly fine, damage too but the healthbar isn't visualising that.

#

when dead hes still 100 on the bar

#

event graph damage ^^

#

update health bar function

#

binding inside widget bp

thin panther
#

progress bars have a 0-1 range

#

your health likely isn't in that range

#

you need to map it onto there

#

normally by dividing current health by max health

undone nebula
#

i fixed it, it was my apply damage section of code needing the update widget

stiff solar
#

noob question here.This is not continuing to subtract one from "ZombieRound".It decreases on the first itereation and then not again

#

also just not sure if it even would stop the spawning process in general

#

it is supposed to constantly spawn enemies until it the var reaches zero

marble tusk
versed sun
#

so , after you decrement the int, check to see if it is 0

#

also, don't change to Float, keep it Int

stiff solar
#

it seems to decrease to 0 but still continues to spawn

versed sun
#

show code

stiff solar
#

i have zombieround set to 1 yet it just continues to spawn more enemies

#

figured it out lol i needed to use the clear and invalidate node not just invalidate

#

one more question though.So i have multiple target points I would like to use so how would I put them into an array?I do not want to just do a hundred sequences

high path
#

What are those target points? Like what will they do?

#

If you want the zombies to go to the closest target points you can make an get all actores of class to the target points and white a for each loop estimate the lenght between the zombie and the point and just take the integer of the one closest and get a copy to it

#

After witch you just to AI move to and yea

stiff solar
#

the target point is just where they spawn from

high path
#

Ohh.....

stiff solar
high path
#

You basicly do the same think but inside the players blueprints

stiff solar
#

Blueprints seem so confusing to use after coming from a programming background. Im hoping itll all click soon

high path
#

They are very use to use but there are a lot of them

#

If you want you can change the name of the blueprints

#

If it's that what confuses you most

stiff solar
#

yea lots of them is a big thing and the whole plugs and pins confuse me

high path
#

If it'll help you understand the plugs are just the () of UE5, like in C# you will write for(i = ? ; i <? ; i ++) and in unreal you just have the note FOR with the plugs being the ()

#

Sorry for the poor explanation but I am writing on a phone with the poorest english

stiff solar
#

yea makes sense

#

this is what i have just for choosing a random target point

high path
#

It prety much the same think you just don't need to be scared of mising a single ; and your code to stop workinh

stiff solar
#

lol true

stiff solar
high path
#

I depends

#

How often will the zombies change target

stiff solar
#

everytime one spawns I want it to be a random location

high path
#

SO on begin play

frosty heron
#

u got it the other way imo

#

also you can use last index instead of -1

#

array starts with index 0, trying to access something lower will result in out of bound crash

stiff solar
#

rep ur right I always forget to check what pin stuff gets plugged into lol

stiff solar
high path
#

Nice

frosty heron
#

I suggest using behavior tree for A.I stuff

high path
#

It is a little advance for first project with blueprints but if he wants to try

stiff solar
#

how does that work?This is my first project with game dev so I am pretty lost on all the nodes and stuff.Im just tryna make like a super simple black ops zombies mode

frosty heron
#

well

#

u gonna end up deleting what u have anyway

#

is all im saying

#

black ops zombie? at bare minimum should be done using proper tool

#

WIth behavior tree you can define states

#

and abort task

#

bare blueprint is not the right place to do A.I

#

if you wanna go simple for first project, perhaps don't do zombie fps shooter

#

I mean you can do w/e you want, im just giving my 2 cent

high path
#

What is easier than zombie shooter for a firsts game

frosty heron
#

a lot of people say pong

#

I would do a puzzle game

#

seems easy enough

thin panther
#

platformers too

stiff solar
#

i already know its gonna suck im just tryna learn the engine by myself without mindlessly following tutorial

thin panther
#

shooters are in fact incredibly complex as a first game

#

animations, weapon mechanics, ai navigation, eqs, etc, procedural animation, melee attacks, special enemies

frosty heron
#

with decent (subjective) practices

spice sequoia
#

Is there a way of storing all the positions of certain actors in my level during runtime that is kept after the game ends to copy and use in a blueprint/in editor mode? - I want to retrieve all the positions of a certain actor that is then used in other Blueprints without having to retrieve and input each position from the editor?

high path
#

If you want to make battlefield like game with realistic recoil yes, but for a simple linetrace i think it's perfect

stiff solar
thin panther
frosty heron
#

not blueprint territory

stiff solar
spice sequoia
frosty heron
distant hollow
distant hollow
#

Then read from the save file

timber crystal
#

hello, greetings, I have the following problem: I can't put a simple "slide" animation from mixamo "in place" over unreal, so with "root motion" the whole thing doesn't work because the animation then looks very strange

I've already used 2 different tools via blender and also mixamo converter but it doesn't help. Can someone please help me?

lusty oak
#

I'm trying to make an enemy follow the player when the player is within a sphere collision bounds. I initially used OnComponentBeginOverlap, but realized that only hits once. What should I use instead to ensure it hits every frame as long as it's overlapping? Do I just move it to tick or is there something better?

frosty heron
#

tick will run every frame

#

you should ask your self how the enemy damage the player and how often

#

it can be as simple as a timer that runs as long as the player inside the capsule

#

and stop the timer on end overlap

lusty oak
#

I know tick will run every frame, but it seems like good practices in UE is to avoid using tick in favor for other events. I'm just not super familiar with UE yet and wasn't sure if there was another event that would check for overlapping collision objects every frame or not.

frosty heron
#

You dont need to avoid tick

#

you use tick where it should

#

and dont use tick where you shouldnt

#

If it needs to run every tick then put it there

#

Is it the right place to run damage logic? hell no!

#

if u are damaging every tick

#

A computer with 144 fps will get hit 144 times

lusty oak
#

idk where you got damage from. I never mentioned anything about damage.

frosty heron
#

a computer with 20 fps will get hit 20 times

#

well i just read hit

frosty berry
#

In the following snippet, the GetPlayerCharacter is coming back null. This is in another character class (Enemy) so the enemy will chase the player. What would cause it to be null here?

distant hollow
lusty oak
distant hollow
broken wadi
sour crater
#

How do I connect the two animations together, and not just one at a time? I want to properly do it. I got the other ABP from another ABP, and currently intergrating it.

lusty oak
sour crater
frosty heron
#

Why do you need 2 ABP?

sour crater
#

i have all the states and nodes in one, i am putting two together

#

intergrating them

#

but i cant get thise LAST plugin to connect

frosty heron
#

still don't get the idea of 2 anim blueprint

spice sequoia
frosty heron
#

editor utility?

spice sequoia
#

No just a BP and a data asset

heady burrow
#

Trying to make my actor move in the direction of its yaw, do I need to do some trigonometry or is there something already cooked up for this?

kind estuary
#

Is there something like an event On Block

#

I have an on begin overlap event but it isnt working because the actor just blocks

#

i need it to actually block, but i also need to know when its blocking

#

Should i create a separate collision just for this?

remote meteor
distant hollow
heady burrow
distant hollow
#

Yes

heady burrow
#

there is a moveForward on Pawn, but not on actor

#

I could use that but, yeah, only for Pawn.

lusty oak
#

On an overlap event, how would I check that the other actor is the player? I thought I could do "other actor == GetPlayerPawn->RootComponent, but that didn't seem to work.

#

op jk, got it. just needed to do other actor -> RootComponent

kind estuary
#

that other alternative also worked

remote meteor
#

but you gotta connect the OtherActor first to make sure the compare node is compating AActors

lusty oak
remote meteor
#

APawn is an AActor, but AActor might not be a APawn

sour crater
#

Sorry to bother yall again, it's just that noone is talking about blueprints or ABPs or any of that sort of At #animations, and I jsut want to fix this one code. I'm trying to connect these two nodes together, to work at the same time. I tried to use the Additive Node, but that distorted my character to a high degree. Any advice would be amazing.

frosty heron
#

It's hard to explained what can go wrong without knowing the full extend of what each node does

#

but in general you need to cache the pose

#

and pick which one to use

#

don't really get how exactly "2 animation" or additive in this context. You can do the additive stuff in the Blend space or w/e. There is also Blend per bone if you want to seperate anim by the bones

sour crater
#

The two animations you are you refering two, is when you get two different engines, with two different animations to two different characters, and then you have the mighty task of intergrating those two together, into one. This is the blendspace of the intergration, and the final piece to the puzzle.

#

How would I cache the pose?

frosty heron
#

To cache pose, simply add a new cached pose by right clicking on empty space

remote meteor
#

animation are usually in a single chain

sour crater
#

you're right

remote meteor
#

a cached posed is then used in a different state machine

rich torrent
#

I am trying to add a main menu to my game, I have my buttons and in all tutorials there is a events tab in the default tab, I dont have it. How do I add an event?

faint pasture
rich torrent
#

How?

frosty heron
#

on the detail tab there is an is variable check box, tick it

#

problem solved

sour crater
rich torrent
#

Thanks XD

faint pasture
sour crater
#

is there a node for that lol

#

i have multiple state machines

faint pasture
sour crater
#

i thought it could only do two

#

can you educate me more on this node?

faint pasture
sour crater
#

the true isnt working

#

im confused a littel bit yes

#

been coding a while and a little fried

frosty heron
#

You use a boolean to control which pose gets to be played

#

Your active value is false so it will always be false

sour crater
#

i want them to play at the same time

frosty heron
#

First of all you seem to have misconception on how animation works

sour crater
#

you cant can you

faint pasture
sour crater
#

thats all you need to say summer

frosty heron
#

You have different idea of blending

faint pasture
#

You can blend by a float if you want something halfway between wounded and not wounded

frosty heron
#

throwing nodes isn't a good idea, start small and try to understand what each does. I have no idea what u are trying to do, animation is not an easy task to tackle for me. I try to keep it as simple as possible

sour crater
sour crater
#

i keep trying to go to big, so i ask for help

frosty heron
#

if you are trying to blend between 2 posses, well what exactly are you blending?

#

i can't picture that

lusty oak
#

Anybody know why my function variables say "out of scope" when I try to view their values while running? Hovering over class level variables works fine, but function level... I can't seem to view.

sour crater
#

Cold summer, I'm trying to fix one chain

#

combine two chains okay?

#

intergration

#

it's not easy

frosty heron
#

Combine two chains in what sense?

sour crater
#

omg -w-

frosty heron
#

what are you combining exactly?

#

Nvm

sour crater
#

combat, and flight system

frosty heron
#

i don't think you want my 2 cent

#

don't have energy for this

sour crater
#

i do

frosty heron
#

hope someone else can help

sour crater
#

but you are just telling me you don;t know, and i keep telling you im intregratiing flight animation, to combat animations

#

to where i can block in the air

#

thats all im trying to do

#

i think i know how to fix it now

#

thank you summer and adriel

frosty heron
#

Blend per bool just mean, on True. Use the true pose, on false use the false pose

#

you will have to figure out what goes where

remote meteor
#

flight animation could be a state machine yes, but blocking should probably be a montage

frosty heron
#

there is also blend by enum

#

I would probably use states to determine which animation the character should be in

#

Flying, OnLand, etc

#

You can have branches on each state too. For example in the Flyign State machine if health is low, use that as a condition to a Blend per bool node where on True Play Flying Wounded and False Play Flying Normal

sour crater
#

how do i access blend by enum, i tried from graph, but i think i got the right one

#

and is any documention of blendspaces i can look into, so i can know some more animation nodes?

frosty heron
#

I learn from looking at other people anim blueprint, don't know about docs ( I doubt there is any )

sour crater
#

thats how i been learning a lot

#

but its good to know the proper way to do things

frosty heron
#

by that I don't mean youtube btw

#

more like market place assets like ALS and DCS

#

but some of them are too hard to dechiper for me

#

some take lonnng time

#

I suggest starting really simple, have some states to drive your anim. I would use enum

#

Just start with 2 states

#

1 is flying the other is walking or w/e you want

#

Then find out how to work with state machine

#

once you have cached pose for Flying and cached pose for Walking then it's just transitioning between them using enum

#

Blending is not really Blending animation btw. It's more like transition

agile berry
faint pasture
frosty heron
#

so what you are doing here is the same as setting the location to the last index

faint pasture
#

Assuming you have one position recorded per frame which is kind of ridiculous, each tick, you need to increment an index and then just get the vector at that index. It's kind of a goofy way to do it though.

#

Or you should do instead is save a transform and time for every point, maybe at like 10 times a second, then you need to do some interpolating on playback.

#

Otherwise, what if you record at 60 FPS but play back at 30?

agile berry
#

so i add a delay? and then when seting location i add the same delay?

frosty heron
#

No 😄

faint pasture
#

You could maybe have a delay loop but I would use a timer. Just get something that can fire at some certain interval.

#

Hell go with tick for now.

agile berry
faint pasture
#

Timer

frosty heron
#
#

can translate it with bp pretty sure. Been long time since i checked the content tho

agile berry
faint pasture
#

You could actually probably do something slick with a spline. If you record the time and position and rotation of the vehicle, you can probably just create a spline with that data and then just plug the lap time into the time coordinate to sample the spline every frame

#

The spline would basically handle the interpolation for you

agile berry
faint pasture
#

Yeah, the more I think about it, the more I'm pretty sure that a spline is exactly what you want.

#

You could get away with not even recording the lap time for every recorded point, just make sure you start recording right at zero and use a timer to record every 10th of a second or whatever.

#

To reiterate, when recording, you save the transform every 1/10 of a second into an array. For playback, you create a spline, and feed it the saved points from the array, and set each points time along the spline just the same as when you recorded them. Starting at zero at incrementing by 0.1. that would lay out a spline in 3D space that you could just sample by feeding in a time and it would spit out a transform

agile berry
#

what do you mean by this:
Starting at zero at incrementing by 0.1. that would lay out a spline in 3D space that you could just sample by feeding in a time and it would spit out a transform

ornate trail
#

if you're shooting arrows and having them stick to a mob. How would you then make sure they all get destroyed once the mob is killed?

lunar sleet
faint pasture
#

Say you moved at velocity 100,0,0 for 1 second
You'd record your points like this:
0,0,0
10,0,0
20,0,0
30,0,0
40,0,0
50,0,0
60,0,0
70,0,0
80,0,0
90,0,0
100,0,0

Then you'd add all those points to a spline, set its duration to 0.1 * ArraySize, and on tick, you'd sample it like
Tick -> LapTime = CurrentTime - StartTime -> GhostLocation = Spline.GetLocationAtTime(LapTime)

ornate trail
#

that's pretty much what I have but occasionally getting null pointers when deleting from the arrow array even with checks in place. Wondering if there was another way.

faint pasture
#

OKTimeToDie -> for each AttachedActor -> destroy actor
-> destroy self

ornate trail
#

that's what I mean, check if it's a valid pointer, then destroy if yes. Still sometimes crashes

faint pasture
#

why would it not be valid?

#

Show how you're adding to the array and how you're destroying

queen heron
#

so, we all know that in blueprint its impossible to setup a 2D array list
now the question is, how could I determine the directions using X and Y integer array variables?
like, how do I code in blueprint:
if X has N 1 and S -1 and Y has E 1 and W -1 (-1 means empty space), then the direction is NE (horizontal/vertical direction, not diagonal), and then if its NE, then set that particular mesh

faint pasture
#

Are you trying to select from an array with 8 entries given some cardinal direction?

#

What do you have, and what are you trying to get?

queen heron
#

2 arrays, 2 indexes each

#

I'm tryna make myself a rule tiling

#

and now I'm at the part where I gotta find a way to select the current combination of occupied spaces next to the current tile

faint pasture
#

Why 2 arrays?

queen heron
#

because in blueprint its impossible to have a 2D array variable

faint pasture
#

why would you need a 2d array for this?

#

What would the 2d array store?

#

neighbors?

queen heron
#

yes

faint pasture
#

but there's only always 8 of them right? just the 4 sides and 4 corners

queen heron
#

currently I'm doing with sides only

#

once I get the thing working, I'll go for diagonal

#

lemme show you the blueprint

faint pasture
#

Why not just 1 array and use the indexes like:
N, NE, E, SE, S, SW, W, NW

queen heron
#

how?

faint pasture
#

just make that your convention

queen heron
#

already tried that

#

was getting way too messy

faint pasture
#

nah that's the way to go IMO. Thats what I use for WFC

queen heron
#

and there's no tutorial about how to do rule tiling in unreal engine

#

only in unity with its built in 2d tilemap feature

faint pasture
#

you're talking about this kinda stuff right

surreal peak
#

2 Arrays for a 2D Array?

#

Has one every heard of simply using a 1D array and some math

#

0 1 2 3
4 5 6 7
8 9 10 11

queen heron
#

except I'm making it in 3D

#

its really tiring building the tiles manually

#

moving, rotating, etc

faint pasture
#

because in 3d thats gonna be a lot of cubes

surreal peak
#

This gives me Minecraft vibes

queen heron
#

the outer cube is the grid and the inside cube is the collider for the diagonal detection

faint pasture
#

Let's just say you already know what the neighbor cells "are", so you're ready to just choose a mesh or whatever

#

a rule would be an array of cell contents -> this cells mesh

#

say your convention was:
Top, Front, Back, Left, Right, Bottom
A rule might look like
Air, Dirt, Dirt, Dirt, Dirt, Dirt -> DirtWithGrassOnTop

#

Dirt, Dirt, Dirt, Dirt, Dirt, Dirt, -> SolidDirt

#

You'll need functions to do rotations and mirrors unless you want to make all of those by hand, which you probably don't want to do

queen heron
#

the rotation part is already taken care of

#

works like a charm

faint pasture
queen heron
#

I just need to know how to properly tell when should the mesh be a Turn, when to be a Straight, when to be a T etc

faint pasture
#

go with the last or first rule that it satisfies

agile berry
faint pasture
#

you can play it back on timer if you want (it'll jump around 10x per second) I guess but name the events better

#

RecordGhostLocation
PlayBackGhostLocation

queen heron
agile berry
faint pasture
#

that's the beauty of a spline

#

your data points are like keyframes

#

I don't see a spline anywhere in your code

thorn moth
#

I am trying to trace box the component box inside an actor, but when the actor is rotated the trace gets the wrong size and rotation. I need to trace the box based on the component bounds (the green boxes) Can someone help me?

faint pasture
agile berry
surreal peak
#

can't recall if the local component bounds were exposed to BPs

#

The ones that aren't affected by rotation that is

#

I know I had to expose them once, but maybe that got exposed by now by default

#

Would then need to rotate the manually by WorldRotation so they aren't AABB

#

iirc

thorn moth
#

Yeah, need to make some transformation. Tried multiple things on the internet and nothing is working

surreal peak
#

You need to get the local bounds first

#

And if they aren't exposed to BPs, then not sure

thorn moth
#

rotating the vector almost makes correct, but the sizes are wrong

#

cant get the local bounds

#

only from static mesh

faint pasture
#

A quick and dirty might be
Unrotate it
get bounds
rotate it back
now you have local bounds

thorn moth
#

what I do with local bounds?

brazen pulsar
#

I have some custom events in my level bp, I know I can't cast to it, but I'm not quite sure how to trigger them. I'm guessing it's got something to do with the event dispatcher?

#

I can put them in a different bp, like the game instance, but I'm worried they'll spawn in the wrong level then

faint pasture
#

Are they level specific like Battlefield Levelutions?

brazen pulsar
faint pasture
#

when should they spawn?

queen heron
#

I can't think of any other way to define tile shape

brazen pulsar
#

so they spawn after a story beat- after an autopsy for one and after talking to a random character for the other- I don't want them to spawn unless the player is in the right map though, and the autopsy event is in another map

faint pasture
#

ok

#

first off, how many states can a location be, just 2? Occupied vs Unoccupied?

queen heron
#

yes

#

there's two indexes in those arrays

#

if an index has integer of 1, its occupied, and if its 0, its unoccupied

faint pasture
#

So you can think of your entire world as a 3d grid of bools right?

queen heron
#

here's my setup to make the tile actor check for occupied spaces

faint pasture
#

I don't need all that, need to drill down to the fundamentals of the system

#

At tile 3,5,230, what is there? Is it just Occupied or Unoccupied, or does it have Air or Dirt or Fence or Glass or what?

queen heron
#

I'm not planning tile types yet

#

until I get the basic stuff working

faint pasture
#

ok so bools will work for now

#

so you can represent the neighborhood of a certain tile with an array of bools

#

3x3x3 if you want to include the tile in question, 1 smaller if you don't

queen heron
#

hmm

faint pasture
#

thats if you're going diagonal, if you're not then it's just 6 or 7 bools

#

I wouldn't use tracing, unless you have a very small map. I'd use some sort of abstract representation

#

in 3d it's gonna be real big

#

that's why Minecraft uses chunks.
Anyway, you'll need functions like these:
bool IsThisTileOccupied(Coords) / TileValue GetTileValue(Coords)
bool DoesSubgridMatchWorld(TArray<TileValue>, Coords)
TArray<TileValue> RotateSubgrid(TArray<TileValue>)
TArray<TileValue> MirrorSubgrid(TArray<TileValue>)

brazen pulsar
faint pasture
agile berry
faint pasture
#

I'd start out by recording the points and doing a draw debug when you press a button, drawing a point at each one to make sure they look right

stiff flame
#

Ok. Got a weird question.

Thank you to whomever it was that recommended the blueprint instance video yesterday. It was very informative. I have been using them for a bunch of features now

Ok, so I currently have an icon (billboard) that pops ups
over openable doors via a line trace from the FPS Camera. What I want is to add a bit more dynamics to the icon. I want it to change scale slightly in relation to the player. So that the billboard gets slightly larger the closer the camera gets to it.

So far I have a Get Distance To node comparing the distances between the door and the player, making the result a float variable

How would I take that float variable and have it interact with the billboard scale? Lerp?

stiff flame
thorn moth
#

the bounds in some angles are still rotate 90degrees, dont know what to do

#

probably because no players is controlling and the mouse input go to zero

queen heron
#

this might just be what I was looking for

#

I knew a foreach was needed

#

now to test it out with print strings

dawn gazelle
#

The switches wouldn't be needed unless you only want index 0 and 1 actually proceeding with the incrementing, assuming there's more than 2 elements in your arrays.

queen heron
#

well, its an almost

#

this is the actual test setup

#

its missing one turn and added one dot

agile berry
swift lagoon
#

Hi everyone!

I have a question and i'm a bit stuck with my project.
I am trying to create a cannon that shoots projectiles towards the player position.
I am spawning projectiles at the location of the cannon actor, and setting the rotation of the spawn based on the player position.
The problem i am facing is that - with location node connected, the projectile rotation is away from me, and following my position as projectiles spawn, but only on X axis. The projectiles are not coming towards me.

Then with location not connected, the projectiles land next to me but they spawn at 0 0 0 so they come up from under the map...

I tried with get location from xy, i tried with get player camera location but i can't seem to find a way around this.
Thanks!

agile berry
# agile berry

plus this warning witch i thought it was from the mesh but it isnt :x

surreal peak
#

You simply want to get the "ForwardVector" instead of the WorldLocation for that

#

Also doesn't need to be on the RootComponent

#

The Pawn itself should have a GetActorForward or so function

swift lagoon
#

thanks for your reply! I will check that out

#

this was my initial idea

#

this is what's happening in game

swift lagoon
#

this is how i implemented your feedback. I might be taking this all backwards, sorry - i am a newbie 🙂

#

this ship would have multiple of the cannon actor, and each cannon would shoot at the player who is on the beach. So the projectile should target the player

surreal peak
#

You want the Direction to be Pointing from the Cannon to the Player?

swift lagoon
#

probably flawed logic but this is where i'm at now!

#

yes!

surreal peak
#

Right, that makes more sense

#

Direction in Vector Math is Target - Source

#

And then theoretically normalizing it

#

So it's of length 1 again

#

In your case that would be the WorldLocation of the Pawn, minus the SpawnLocation of the Bullet

#

For the Rotation part you don't have to normalize it though, you can just use the result and get the Rotation from X

swift lagoon
#

i'll have to wrap my mind around that

#

cheers! thanks for the help!

#

hm, not sure what to do with that. Sorry. I guess i don't understand vectors well enough.

The problem is when i add get actor location to the location connector, though. IF i don't do that, the projectiles land next to me so i assume are fired towards me from the 0 0 0 spawn location

#

i don't understand why saying "spawn at the location of current actor" would rotate the direction away from me

twilit jacinth
#

I want actor components to ignore components of the parent. I have a setup with actor class that have two moving components on them. I want to have two actors or more to overlap on the scene and when their moving components overlap perform a function. But since I have two moving components on each actor, they have one tag and detect each others collision . Performing function when there is only one actor.

swift lagoon
#

here is what happens if i leave "location" out. This is what i want, but then i can't see the bullet anymore

queen heron
#

getting close, last thing is getting the rotation to set properly

surreal peak
#

You are using a Location as a Direction

#

That doesn't really make sense

#

That's why your result is also so difficult to understand

#

You basically tell it

#

"Spawn at 0,0,0 and Rotate to (X,Y,Z) of my Pawn."

#

The math I told you for direction is

#

Target - Source

#

If Source is (0,0,0) then you would end up with Target of course

#

Since you spawn at 0,0,0 when you remove the SpawnLocation, it will by conincidence aim at your pawn

swift lagoon
#

I see. Well i guess i just want to know what i can do to these nodes to get what i want

#

this was the initial design, the rest was just me tinkering trying to find a way around why it spawns the way it does

#

i understand i need to normalize the vector of get actor location before i link it to the location connector on make transform node?

swift lagoon
swift lagoon
surreal peak
#

Let's take this example. Let's remove the third dimension, cause the math is the same.
Your pawn stands at (3,1) for (X,Y).

If you spawn the project at a e.g. (0,1), and give it the WorldLocation of your Pawn as Direction/Rotation, it will point to (3,2).

If you remove the Spawn Location, so the projectile spawns at (0,0), the red line will also move 1 down, and then "magically" aim at your pawn.

#

If you want it to aim at your Pawn, you need to math out the direction from Projectile to Pawn

#

Which would be that green line

#

In the example, that green line is the result of PawnLocation minus ProjectileLocation

#

So (3,1) - (0, 1), resulting in (3,0)

#

An actual direction would be normalized to size one (so (1,0)), but that's irrelevant for the general direction it is pointing to

#

The (3,0) is basically the value you need to add ontop of your Projectile to get to the Pawn

#

Another example, projectile spawns at (1,3).
To get the Direction, again, Target minus Source: (3,1) - (1,3) = (2, -2)

#

So to get from Projectile to Pawn, you would need to move (2, -2)

#

If you push that result into a Rotation (let's ignore the magic of the conversion here), you would have the Projectile point towards the Pawn

#

One tricky thing about Vectors, if you never worked with them, is that they can be Positions and Directions, and without context you wouldn't know

#

(2, -2) can totally be a location. Can't draw that on the image cause I have no negative Y axis, but still.
However here it's a direction from Projectile to Pawn. The Context of when it's a location and when it's a direction is usually very straight forward.

#

Cause you basically define a vector as such. You say "this is a Location" and use it like that. And same for a Direction, but that goes beyond the problem atm

#

So to get your Project to work, again, you need to Subtract the WorldLocation of the Pawn, from the ActorLocation of the Projectile, so basically of the SpawnLocation

#

And then use the result for the RotationFromX node

swift lagoon
#

Well dang man, you just earned my respect. Thank you so much for explaining this in depth. I definitely understand now that i don't know enough about vectors, and it sounds like i need to shape all that up before i continue. I didn't understand the distinction between location and direction in a vector either and this is complicated for me at the moment.
I'll be referencing this for now and in the future to get my project to work again.

Thank you so much again!

surreal peak
#

No worries

#

(:

lusty oak
#

Does anyone know why my FollowPlayer function is not working? My goal is for the enemy to begin moving towards the player when I am within a certain distance of it, otherwise it should stay still. Currently, when I move close enough, it teleports some distance behind the player and then just stays there with a little bit of shuttering movement. The function in this blueprint is getting hit on tick as long as the player is close enough. https://blueprintue.com/blueprint/6jyfbiyw/

fringe frigate
#

this interface event doesnt get called. Even though i'm implementing the interface.
i have a character bp, holding a weapon, and i'm trying to call the interface on the weapon from the character. I can't find out why it doesn't get called

torpid yacht
#

I have to check in blueprint, on actor begin overlap, if the overlapping actor is one of a series of classes by trying casting to each. Right now i do that if one cast fails I try an other and so on, but it won't scale well once the classes to check for are too many, do you suggest a better way?

queen heron
#

success 😄

frosty berry
#

How would you approach putting a target reticle at the blue circle along the red line at the distance of the cursor (balck triangle)? Reticle could be any distance from player.

surreal peak
#

Take the mouse location in UI space and place the reticle there

#

Like, what have you tried and where are you stuck?

faint pasture
#

I'm guessing you're tracing, hitting the ground, but you want to aim at the point shoulderheight above that

frosty berry
#

Note the blue circle is not mouse exact as I want it along the trace from the barrel.

steady night
lunar sleet
#

Surely you know how to debug Accessed None after all the time you’ve been here ?

steady night
#

well yeah... but i dont get why 😮

sick sky
#

hello
is there a way to reference a interface class in a variable ?

dawn gazelle
# steady night

This error is not happening in the code you've shown here. If this is multiplayer as well, what is likely happening is you're running a dedicated server and are attempting to add a widget you're trying to create on the server to the viewport.

sick sky
#

because i cant find a way of doing this

steady night
#

@dawn gazelle

#

yeah its from this

dawn gazelle
#

Widgets don't replicate, and can't be created on dedicated servers. You probably should multicast the event to display the damage, but make sure you're only creating and adding the widget on clients (do a check if is dedicated server, if false, add the widget)

lunar sleet
trim matrix
#

Anyone know how to get rid of this error please

#

thats what i'm doing when enemy dies but it seems it's still trying to do something

sick sky
# lunar sleet For what purpose ?

im doing a system using a infinite amount of structures, i need to select a specific interface class to use for "does implement interface", so i would like that in my structure you can select the one to check for

kind estuary
#

I have a bunch of units fighting.
Then some of them will surrender (randomly).
So for this im doing it on the Take Damage function.
So when the health becomes less than < 20, i make it randomly decide if it will surrender or not. So that now i can capture this unit.
Now the thing is that, the unit will keep taking damage and it will keep on testing if it surrenders.
I thought of the DoOnce node but it doesnt work inside a function.
How do i make it do this only once?

proper flower
#

hey guys, how can I see the output value from this?

#

I cannot find any visual output for math expression

#

in material blueprint

lunar sleet
dawn gazelle
#

I don't think you can do this directly in blueprints. You should be able to use an "Object Class Reference" but then someone could potentially select any object. @kind estuary

trim matrix
#

Anyone know how to get rid of this white text

#

don't know what it is or why it's ther

sick sky
lunar sleet
#

It’s navmesh information

steady night
#

@dawn gazelle

dawn gazelle
steady night
#

yeah exactly

sick sky
trim matrix
sick sky
#

function has to return if found or not

lunar sleet
#

Cool, now give the rest of the answer

sick sky
#

before finding a workaround i prefer knowing if what i a maskign is possible

trim matrix
sick sky
trim matrix
#

Attempting to move a fully simulated skeletal mesh /Game/Core/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.BP_Guide_C_UAID_2CF05DE488FD6FC501_1984580743.CharacterMesh0. Please use the Teleport flag

#

anyone help with this please

#

when I kill the enemy I get loads of these after leaving PIE

#

I'm pretty certain I've done everything right

lunar sleet
sick sky
#

still not answering

lunar sleet
#

Ok

sick sky
#

how can i know if it was sent with sucess if nothing is returned

lunar sleet
#

I don’t think interfaces are designed that way

sick sky
#

ok ty ill find a workaround

lunar sleet
#

Dude

trim matrix
lunar sleet
#

Just call the interface function

#

If it’s there it’ll do something

#

If not, it’ll move on

sick sky
dawn gazelle
#

Yeah but you may need to know whether or not it's going to do that thing.

trim matrix
dawn gazelle
#

And you wouldn't necessarily want a return value on all interface calls :/

sick sky
#

ty Datura

lunar sleet
trim matrix
#

let the interface do the job of deciding whether it can do it or not

sick sky
lunar sleet
#

He’s creating “infinite structures” with apparently hundreds of interfaces

sick sky
#

not hundreds

trim matrix
#

so for that specific interface have a return

trim matrix
#

I'm being being dumb here sorry

sick sky
#

a few or dozens is enouugh for interactions system in most games

dawn gazelle
#

1 should be enough for interactions.

sick sky
#

it still a map of structures, and depending on that its not the same call

trim matrix
faint pasture
sick sky
#

ask this to the customer

#

my goal is to make a modular system, thats why i was asking if you could create a var type of interface from the UDS panel

trim matrix
#

?

sick sky
#

no

faint pasture
#

Does Implement Interface