#blueprint

402296 messages · Page 759 of 403

icy dragon
#

Get Player Controller -> Set Input Mode Game and UI or Set Input Mode UI Only

fiery glen
#

uuuh, the interface issue appears to be related to new BP interfaces being read only

#

not sure how to resolve that

#

sheesh, are interfaces just busted in 4.27? something is up

round moth
#

im new to ue4

#

so its prolly me

fiery glen
#

sorry, I'm referring to the other guy

trim matrix
#

Me?

fiery glen
#

yeah, trying to reproduce the issue

fiery glen
#

I made a new blueprint interface and it's staying Read Only for some mysterious reason

trim matrix
#

You can't drag it in

#

Well, I can't

fiery glen
#

I forgot they can't have anything implemented in them

#

you just define input/output types

#

all of the actual instructions are implemented in your BP that implements it

#

(which you probably already understand, sorry)

#

and yeah you need to just right click to implement the event

trim matrix
#

Nah it's all good haha

#

It confused me for a second until I remembered as well

faint pasture
#

@trim matrixDo you know what an interface is and how it works?

#

you don't implement them in the interface BP itself

trim matrix
#

It's all good, it worked

civic herald
#

Are there any good tutorials for projecting textures onto skinned meshes at a specific point on the mesh.

icy dragon
civic herald
trim matrix
#

Would a kind of tiling work?

odd ember
#

this is so weird to have as an interface

#

an interface is per object

#

how does one object know about this question? unless it's a manager? and in that case, why the interface?

trim matrix
#

Idk

odd ember
#

well it's your interface

tall imp
#

hi, my cast to the game instance is failing and i cant find the reason why... does anyone know how i can fix that?

#

i was able to save and load perfectly yesterday bit then it just didnt work anymore even tho i didnt change anything there

harsh frost
#

Hi everyone, I'm tackling a tough cookie (for me anyway) here and I think I need some input. I'm trying to compare two render textures and count the number of pixel that differ between the two. I do that by sampling both texture and store the difference of both colors on a 3rd texture of the same size. "Easy" so far. I can then use Read pixel data to count the number of pixels that aren't 0 in a loop. The last part in inefficient at best, as to compare two texture of 1024x1024 pixels, I need to loop through each one of them. Yuck.

#

Is there a way of sampling both textures, compare each pixel, and store it in a single-pixel texture, being the sum of all difference ? This would reduce drastically the complexity as most of the work would occur on the GPU

#

I'm not sure having a target texture of 1 pixel will cut it 😄

#

Another thing would be to sample the result texture before writing to it, but I'm not sure this will fare well with massive parrallelism that occurs in shader

odd ember
#

failing that, breakpoints

harsh frost
#

Well, I was thinking of doing it in blueprints 😄 I could achieve it all using them, so if I can avoid C++ code for 3D, i'm all for it 😄

#

unless, of course, i'm completly mistaken on the channel

#

(which is quite a possibility)

odd ember
#

none of this is exposed in BP

#

and it wouldn't be wise to do it in BP either due to performance concerns

#

(even if it was exposed)

harsh frost
#

well, if I can compare all pixels by blending them (using blend difference probably) and store the sum of all differences in a 1 pixel texture, i'm golden 😄 but I'm hitting a roadblock as to my 3D knowledge and the blend/UV stuff

odd ember
#

you... can't

#

it's not exposed in BP

#

it is not available

#

the interface between graphics shaders <> code happens in the renderer, which is strictly cpp

#

and if you're talking about blending in the material editor, the material editor is not the same as blueprints

harsh frost
#

oh ?

odd ember
#

the material editor operates entirely on HLSL

#

and is strictly for graphics

harsh frost
#

indeed, I thought that was considered as a blueprint being the same graph design and all

odd ember
harsh frost
#

I'll repost using the graphics channel then, thanks 🙂

#

the more I can fit in a shader to lessen the data transfer to the CPU, the better, so I'd better start here. Sorry for the mistake !

tall imp
#

works now again xD

shell jetty
#

Really simple question. How can you limit a vector to stay inside a bounding box inside the world? I tried "Vector Bounded to Box" but it doesn't seem to work properly, or I'm just not sure how it works

odd ember
shell jetty
#

The box isn't outside the world. It's a system where I'm trying to keep an object within a certain distance of another actor

#

I found a way around it though. I decided to just check if the objects distance is further than a set float, and if it is I move it the object back by the difference in distance

maiden wadi
#

@shell jetty I personally find it much easier to transform the location into the box's local space. It's much easier to clamp via the box's size then because it's a matter of just clamping each axis after that. Then you can transform it back to world space.

wispy star
shell jetty
#

Hmm, ok that makes sense. I'll use that next time

#

For now I'll use my workaround since it does what I need for now

#

Thanks for the help 🙂

wispy star
#

i'm thinking about it now, and it may not be doing what users may expect...i need to look at source

dapper ore
#

I think this is the right place? I have a Spring Arm on my Camera that is not colliding with the environment. I used the top down preset and added a camera zoom and look around. Although when I disable those 2 features it still doesn't work for me. Could someone kindly help me get my spring arm to work?

wispy star
#

holy...it is indeed not doing what people expect

odd ember
dapper ore
fresh charm
#

Hello, can anyone explain this mystery to me?
Why I can't target my mouse on the left widget but the right one, as soon as I put the computer inside my house I can't see it anymore?

odd ember
digital ginkgo
#

Hello guys, I need some help, I'm trying to make a virtual piano, where I input MIDI, and then it triggers a rotation on the piano key static mesh to make it look like the key is pushed.

How do I make the rotation "smooth" rather than instantly snapping into place?

dapper ore
#

@odd ember

odd ember
#

what in the living hell

dapper ore
#

@odd ember

odd ember
dapper ore
#

@odd ember Can you see them in the second screenshot?

dapper ore
#

I want the Yaw of the camera reset to be the same as the character model. How can I pull that variable?

timber knoll
#

Or a lerp on single axis would also do

wispy star
#

@digital ginkgo I suggest you to switch to rigged skeletal mesh piano and use that for animation. as doing that by tick interpolators will make your code huge...
or, you can write a small ECS function

jaunty solstice
#

Can any Blueprint experts tell me whether its possible to detect keypresses in the Construction Script without resorting to Editor Tick?

dapper ore
timber knoll
#

It’s called when changing any actor value, not based on input

#

But you don’t need event tick either for input

digital ginkgo
#

I'm fairly new to these stuff, so I don't know if there's a better way to do this lol

icy dragon
timber knoll
#

Animation based as Alexey suggested is your best bet

#

The way you have it set up would require interpolation which is going to be even more of a mess 😛

digital ginkgo
#

By rigged skeletal mesh, it means like rigging with armatures+weight painting it?

timber knoll
#

Yes

#

Then a simple animation can take off the rest

digital ginkgo
#

I've been wrecking my brains to get interpolation to work lol

#

ahhh

timber knoll
#

Interpolation isn’t hard

digital ginkgo
#

I can't get it working for some reason

timber knoll
#

But you would need to do it for all currently pressed keys etc

#

So it’s a lot of extra nodes in your case...

digital ginkgo
#

They are trigged by MIDI events for each note pressed

#

So there's no event tick

timber knoll
#

Hmmm even worse haha

#

Skeleton it is 😛

#

Will save you headache later on as well

digital ginkgo
icy dragon
digital ginkgo
#

I guess into blender then >.<

icy dragon
#

I did this for my musical machinima project (still WIP)

digital ginkgo
timber knoll
#

Yeah for sure use naming convention for both skeleton and animations

digital ginkgo
#

I'll still need bones right?

timber knoll
#

You will need a bone for every key

#

And a root bone

digital ginkgo
#

Oh god, 88 keys

thin cradle
#

hey, I wanna make a fighting game and I've found almost all the unreal functionalities I need to do it, but there's something I can't figure out
I wanna attach hitboxes to my weapon, but also have some "floating" hitboxes that I can set the position of in my animation
problem is, I wanna keep the player character's stuff separate from each of the weapons's animations, hitboxes, etc, as in when I wanna add a new weapon, I don't wanna add all the required hitboxes to the main player physics asset, I want them to be separate
I found how to separate animations unique to weapons from the main player animation blueprint using linked animation BPs, but I can't figure out how to do that, any idea?

#

tl;dr I want each weapon and their animation set to have unique hitboxes but I don't wanna modify my player blueprint/physics asset/etc for each weapon, I want these to be stored in separate files per weapons

icy dragon
digital ginkgo
#

Just for luls, you can see the mess for every single 88 notes xD

timber knoll
#

I’m also trying to figure out a way to have animations unique to weapons tho so can’t help with that

thin cradle
#

yeah, and I can kinda see how to do that for the hitboxes that'll be directly attached to the weapon, but not so much for the ones that aren't
let alone be able to visualize those when editing the relevant animations

icy dragon
odd ember
timber knoll
#

Hmm how would those ither hitboxes function?

thin cradle
#

I'm sure it'd be possible to straight up like, make custom tools for the animation editor for that but I ain't ready to learn c++ just for that

timber knoll
icy dragon
thin cradle
#

@timber knoll https://www.youtube.com/watch?v=A3vCY-jU_tc check this out
all the weapons have hitboxes attached to them, but some weapon also have "static" hitboxes that spawn where the weapon hits

EDIT: I now have a discord! Join to talk about various things and maybe even help me make my minibosses!
https://discord.gg/4eReG6w

TIMESTAMPS:
Slow-mo demonstration of hitboxes - 0:00
Daggers - 3:54
Straight swords - 4:27
Greatswords - 5:40
Ultra greatswords - 7:19
Curved swords - 9:08
Curved greatswords - 10:13
Thrusting swords - 11:06
Katan...

▶ Play video
digital ginkgo
thin cradle
#

they had even more of those "floating" hitboxes in dark souls 1 iirc

digital ginkgo
#

Wouldn't it be a pain to need to "find out" what note is key_50 is?

icy dragon
#

The notes are cosmetic as far as the MIDI backend is concerned, and I could just assemble a MIDI sequence from OpenMPT.

digital ginkgo
#

So MIDI for an 88 key keyboard goes from 21 to 108, so you are suggesting I name the bones like key_21, key_22 etc?

odd ember
#

my question is

#

why are you not handling this procedurally

icy dragon
odd ember
#

instead of having 88 references

#

that you have to manually setup

icy dragon
thin cradle
#

yeah, that aren't attached to the weapon

timber knoll
#

Well you would just spawn them on the position based on hit info or animation

digital ginkgo
odd ember
icy dragon
timber knoll
#

So basically you do an extra shape cast for one frame on a hit location or socket

thin cradle
#

cause I could always just attach 1 hitbox to the weapon and turn it off/on in animations, but not only would I not have those extra hitboxes, I also wouldn't be able to see them when I set them up in an animation

icy dragon
odd ember
odd ember
#

in fact I don't know what that has to do with procedurally generating them

thin cradle
icy dragon
odd ember
#

doesn't make a difference if it's one mesh or several actors attached to each other

#

except ease of use and configuration

#

I certainly wouldn't try and configure it on a skeletal mesh level

unique finch
#

why would you want to make a piano tho

#

that's the real question

icy dragon
#

And by actual, I mean a model of a piano with reference to real physical piano.

odd ember
#

because dealing with 4 levels of child space sounds excruiciating

digital ginkgo
#

I want to make a virtual piano that responds to MIDI notes

unique finch
digital ginkgo
#

and then I plan to use mocap of some sorts to play it with an avatar virtually

#

So it looks like my avatar is playing that piano

icy dragon
timber knoll
unique finch
odd ember
#

I would recommend against making anythign one mesh

digital ginkgo
#

But I'm extremely confused right now

#

LOL

unique finch
#

it doesn't sound like a bad idea to make a piano so you can make your own music in game

timber knoll
#

and no, not able to see them in animation afaik, but you can have them enabled while playing and test them out that way @thin cradle

odd ember
#

every key needs modularity

icy dragon
#

Thus the wild naming convention trick comes from , because i need to have DX7 and Moog synth model respond to the MIDI sequence, not an arbitrary piano floating in space.

unique finch
#

Hey here's an idea

make a model of a piano rig, make a animation for each note

icy dragon
#

Though if it works for you, then I won't stop you. @digital ginkgo

thin cradle
#

thats gonna involve a lot of randomly trying positions

dim robin
#

when I "get all actors of class", how can I determine the order of the elements in the array? Let's suppose it gets 3 actors, how can I know in which order they are added to the array? thanks

icy dragon
thin cradle
#

but I guess that could work, thanks

odd ember
icy dragon
#

Or actor BP, since it's going to be prerendered, and I don't give a fuck about performance in the case of machinimas.

odd ember
#

you cannot reasonably extend that

unique finch
#

imagine the note clipping through the piano

#

lol would that be funny though

icy dragon
odd ember
#

genuinely, the best way of to treat the piano itself as a manager, and each key as a child that you spawn procedurally. the piano itself determines what sound the keys play, each key handles its own animations etc.

unique finch
#

Doing it procedurally is good idea though, imagine wanting to have it so that if you press a key hard enough it'll hold down the note, seems even better than animating yourself

timber knoll
#

that might make it easier I suppose

thin cradle
#

good idea

digital ginkgo
#

I'll have a ton to learn I guess, I have no idea what you guys are talking now xD

dapper ore
unique finch
icy dragon
#

Okay, question time.
@digital ginkgo What kind of piano are you trying to have in the game? The one arbitrarily floating in space, or based on a physical, real life piano?

odd ember
digital ginkgo
#

This is the mesh that I have

unique finch
#

but manually moving the note downwards is the way to go without animation

digital ginkgo
#

I bought an asset off the marketplace

#

It has each note as a static mesh

unique finch
odd ember
# digital ginkgo

great start. all you need to do is wrap each mesh key in an actor class

digital ginkgo
#

So that's what I did, rotate the relative position

digital ginkgo
#

But that means it will only "snap"

unique finch
#

Ohhhhh

#

interpolation

digital ginkgo
#

it doesn't smoothly "push"

unique finch
#

is the thing

#

you want

#

@digital ginkgo use a timeline or use interpolation

odd ember
#

christ this is a clusterfk

icy dragon
icy dragon
digital ginkgo
#

I tried interpolation, and it doesn't seem to work, I think it's because the notes are triggered by a MIDI event, not an event tick

unique finch
#

Ahh

odd ember
#

for real

#

timeline an alpha value from 0..1, then use that to lerp rotation

digital ginkgo
unique finch
odd ember
#

it has a few drawbacks though

dapper ore
unique finch
#

yeah

odd ember
icy dragon
dapper ore
icy dragon
#

I was certain everyone will hate my idea.

odd ember
#

again. the easiest way, that would solve literally every single problem, including the mess of managing 88 individual keys, is procedurally generating the keys as actors from a class

dawn gazelle
#

^

digital ginkgo
icy dragon
odd ember
odd ember
icy dragon
#

Which is so easy in hindsight, maybe 5 years old can came up with the math/offsets.

odd ember
#

you have the same amount of control, for much less repetitive code

#

and much less code maintenance

#

then on top

#

if you make the keyboard (sans keys) a manager. you can use that to propagate different sound choices to each key

#

e.g. when you want to modulate the sound per key, per octave

#

literally, just like a keyboard would work in real life

#

plus you can extend the keyboard infinitely, if you so choose

#

want 64 keys instead? just set it to 64 keys instead of 88

#

same for 102, or whatever the max number of keys is on a keyboard these days

#

I'm sure some organist can correct me

digital ginkgo
#

Actor class is a blueprint actor right?

icy dragon
digital ginkgo
#

I think I already have it

#

hmm

odd ember
#

that's the entire keyboard

#

that is your manager class

icy dragon
#

Just have to modify it as per @odd ember precisely mentioned.

#

Or create a new one from scratch, I don't care tbh

odd ember
#

create new one, create a new static mesh component within, set the static mesh to be the key mesh

#

you'll probably need to formulate it per octave

digital ginkgo
#

But each key has a different mesh though

odd ember
#

that's fine

icy dragon
odd ember
#

you can in fact find the right keymesh by providing the corresponding note within the octave

icy dragon
#

The white keys are at least just 3 shapes.

odd ember
#

so you have an outer loop for the entire keyboard, then you have an inner loop per octave

#

or alternatively, you create an Octave as a separate class that is a collection of PianoKeys

digital ginkgo
#

I think this is waaaay to advanced for me right now >.<

odd ember
#

it's advanced now, but if you do the groundwork

#

you'll have much less problems later on

#

if you do it your way, you leave yourself open for a lot of maintenance work

digital ginkgo
#

Are there like youtube tutorials for this? lol

odd ember
#

possibly?

icy dragon
# digital ginkgo But each key has a different mesh though

And since keyboard accuracy doesn't seem to be your priority, use CE's method as opposed to my naming convention trick.

I'd avoid the procedural method because of the need to get very specific with the keyboard and the synth sounds.

odd ember
#

I can't vouch for them

icy dragon
odd ember
#

generally the quality of BP tutorials on youtube is low

odd ember
#

but, semantics

digital ginkgo
#

I'm completely lost haha. I'll have to revisit this in the future when I learn more >.<

icy dragon
# odd ember technically this method is procedural

Yeah, generating the keys in runtime, but in my machinima case, keyboard type accuracy to the synth sound is more important, and I would have to match the key positions with the character's finger in sequencer editor.

odd ember
odd ember
digital ginkgo
#

I have no idea where to start haha

#

Pretty much a complete beginner atm

#

.<

odd ember
#

like I said, create an actor called PianoKey

dawn gazelle
#

Eh close enough...

odd ember
#

clearly a magic keytar

#

octaveless too, but it'll do

digital ginkgo
#

Like this?

odd ember
odd ember
#

you are making one key. we'll use copies of this key to fill the entire keybaord

digital ginkgo
#

There's 8 different keys

#

How do I know which one to use lol

odd ember
#

you just need one actor for now

#

once you've created that

#

create an enumerator

#

an enumerator is just a fancy way of selecting numbers by using text

digital ginkgo
#

So I just drag and drop the static mesh in?

odd ember
#

don't do anything I haven't said

#

at least not yet

#

let's get it working first

odd ember
digital ginkgo
#

Lol

odd ember
#

there should be a big green button in the upper left corner

#

that says add component

digital ginkgo
#

Oh

#

ok go it

odd ember
#

cool

digital ginkgo
#

How about the "Add an event called OnPressed, and OnReleased"

odd ember
#

right click on the graph, select Create Custom Event

zealous moth
#

@Authaer#5436 how would you go about a charging mechanic?
So far all i thought about was a timer based countdown or a timer based buildup where the timer is started and stopped based on input.

digital ginkgo
#

I don't see it hmmm

odd ember
#

in the event graph

#

not as a variable

digital ginkgo
#

Like this?

odd ember
#

yes siree

digital ginkgo
#

Why does it say OnReleased is used

odd ember
#

probably because it's used internally

#

it's fine

#

don't worry about it

digital ginkgo
#

ahh

odd ember
#

you can called it OnPress and OnRelease if you want to keep a standard between them

digital ginkgo
#

How do I create an enumerator?

odd ember
#

in the content browser

#

right click > create advanced asset > blueprints > enumeration

digital ginkgo
#

Oh got it, what should I name it as

digital ginkgo
#

Ok got it haha

odd ember
#

cool

#

now that you have it, go back into your PianoKey actor

#

and add a new variable

#

in the list of variable types, look for EOctaveKey

digital ginkgo
odd ember
#

boom

#

just like that

digital ginkgo
#

What should I name it

#

Lol

odd ember
#

KeyInOctave or something

#

now that you have it, go into your construction script

#

get a reference to your static mesh component

#

you can literally select it and drag it into the graph

digital ginkgo
#

The static mesh component at this point is just empty right?

odd ember
#

yep

#

from you reference, drag out and find a function called Set Static Mesh

#

or might just be called set mesh

#

idk

digital ginkgo
#

Which one do I use?

odd ember
#

the latter

#

so there's one thing we forgot to do with the enumerator, so if you go back and open that one up

#

inside of it, create a new option for each key in the octave

#

so, C, C#, D, D#, E etc.

digital ginkgo
#

Just within an octave right?

odd ember
#

yes, but including black keys

digital ginkgo
#

Would it matter if the first key of an 88 key piano does not start with a C?

#

It starts with an A

odd ember
#

it matters somewhere down the line, but not here

#

you want to create a standard octave first

#

everything else is an edge case

digital ginkgo
#

Alright

odd ember
#

once the enumerator is done, go back into the construction script where we left that set static mesh function

#

from the mesh pin, drag out a select node

#

for the index of the select node, add your KeyInOctave variable

digital ginkgo
#

Like this?

odd ember
#

yep

#

I assume you know your octaves

#

so I can't vouch if it's correct

#

but it looks like it

digital ginkgo
#

Like this?

odd ember
#

yep

#

now you can use that to fill the correct key meshes for the correct slots in the octave

#

obviously, correct the execution thread as well

#

now that you have this setup, you'll want to expose your variables as parameters

#

so for each variable you have, in the details panel, tick the boxes for: Instance Editable and Expose on Spawn

digital ginkgo
#

What do you mean by correct the execution thread?

odd ember
#

the white line

#

that connects the nodes

digital ginkgo
#

Oh

odd ember
#

is the execution thread

odd ember
#

so, Play Sound Cue with the sound cue variable you have

#

if you want the whole rotation thing, we can handle that afterwards

#

but that's your basic PianoKey actor

digital ginkgo
#

Hmm I see

#

Interesting

odd ember
#

now that we have this, duplicate your piano actor

#

not the keys, but the actual piano

#

once you've duplicated it, go into it

#

note down the offset between keys

#

you'll need this

#

then delete all the logic and keys inside of it

digital ginkgo
#

That means I delete all the variables, and stuffs in the event graph?

odd ember
#

yes. did you note down the offset?

digital ginkgo
#

I did

odd ember
#

cool, yeah torch everything

digital ginkgo
#

Do I delete the keys static meshes as well?

odd ember
#

everything

#

except the keyboard mesh itself

#

since this is a duplicate, if you ever want to go back, you'll always have the original

#

once done, create a Integer variable called KeyAmount

digital ginkgo
#

is this right?

odd ember
#

small caveat here: we're making this currently as an arbirarily sized keyboard, which means you can input any number of keys, but the keyboard will always start from an octave, and the starting key will always be C

#

if you want to include special rules, you'll have to change some initial logic, but nothing major

odd ember
#

for the sake of ease of use, set the start index to 1, and the end index to KeyAmount

#

create a float variable called KeyOffset and set that to be the value you noted down before, as a default value

odd ember
#

set the class to be PianoKey

#

let me know when you've got this

digital ginkgo
#

I can't find the spawnactorfromclass node

#

hmm

odd ember
#

I see

#

it's not accessible in constructionscript

#

welp, that's a drag

#

no worries

digital ginkgo
odd ember
#

create a custom event inside the event graph called SpawnKeys

#

in the details panel for it, tick the box for Call in Editor

#

cut and paste the loop from the construction script onto that event instead

dim robin
#

is there any way to "get all actors of class" and sort them in an array by a name (or int, or whatever)? it looks like the array order is determined by when they were instanced

digital ginkgo
#

Like that?

odd ember
odd ember
#

now find that spawn node

digital ginkgo
odd ember
#

yep, set the class to PianoKey

#

and click that white arrow at the bottom and show a screenshot of that once you've done those two things

digital ginkgo
odd ember
#

ok, bit weird it says invalid for KeyInOctave

#

can you check you have all the keys in that drop down?

digital ginkgo
#

Oh yeah

#

I can

odd ember
#

cool

#

if you right click on your spawn transform node and select split pin or whatever the option is called

#

you should see it turn into a few things

digital ginkgo
#

Oh yeah

odd ember
#

now if you select the location pin and do the same

#

you'll get 3 float values

#

create a reference to your KeyOffset float from before

digital ginkgo
#

Like this?

odd ember
#

yes, almost

#

multiply it by index

digital ginkgo
#

wait how? lol

odd ember
#

there is an int * float node

digital ginkgo
#

oh like this?

odd ember
#

yep

#

see if you can spawn the keyboard actor in world now

#

just to test

#

once you've spawned it, you'll see the SpawnKeys event in the details panel as a button

#

the expectation is that it's spawned KeyAmount of PianoKeys at KeyOffset from each other, all being of EOctaveKey type C

digital ginkgo
#

So I drag the keyboard actor in the world

#

and hit spawn keys?

odd ember
#

yes

digital ginkgo
#

Nothing happens lol

odd ember
#

troubling

#

or perhaps not

#

can you try calling SpawnKeys from BeginPlay and enter into PIE?

digital ginkgo
#

Like this?

odd ember
#

err

#

no

#

but yeah I mean you can do that

#

but it's not elegant

digital ginkgo
#

How do I do that then lol

odd ember
#

what you want to do is get a call to that event

#

right click and find SpawnKeys in the search menu

#

you should get a blue node

digital ginkgo
#

Oh yeah

odd ember
#

put that on BeginPlay

#

and reconnect SpawnKeys

digital ginkgo
odd ember
#

yep

#

test it

digital ginkgo
#

What does enter into PIE means

#

Hmm, I hit play, and nothing happens lol

#

The key doesn't spawn

#

ok nvm it worked, I did not set the KeyAmount variable

#

But it spawned away from the piano actor and is LARGE

#

lol

odd ember
#

you may want to look at the original keyboard actor and check the scale of them

digital ginkgo
odd ember
#

the keys

#

but, so far so good

#

these are tiny kinks

#

and it works otherwise

#

so now we want them to form octaves

#

there's a few ways to do this, but for the sake of this we'll just go simple

#

how many keys does an octave have?

digital ginkgo
#

including black, 12

odd ember
#

12

#

ok

digital ginkgo
#

The scale for the keys is 0.1

#

How do I set it hmmm

odd ember
#

on the SpawnNode

#

you have SpawnTransformScale

digital ginkgo
#

Oh yeah

odd ember
#

for spawning it at the keyboard location, we'll figure that out in a second

#

for now

digital ginkgo
#

The size is right, but they're spaced too far apart now

odd ember
#

create a KeyScale float variable

#

multiply that with KeyOffset where you handle the spawn location

#

split the SpawnTransformScale pin into 3 floats

#

set them all to be KeyScale

#

assuming they are uniformly scaled

digital ginkgo
#

Is it like that?

#

Hmm the offset doesn't seem to be correct lol

odd ember
#

to the keyboard itself? we'll fix that later

#

for now

digital ginkgo
#

I think the origin for each key static mesh is not the same

#

Lol

odd ember
#

it is

#

it's just using world 0 atm

#

because we having added in a custom location

#

if you want to fix it, create a MakeVector node

#

add the current float result we have from Index, KeyOffset and KeyScale, into the X value of that

#

then right click on any of the 3 location floats and select combine struct pin

#

then use the GetActorLocation node and add it to the output your new MakeVector, then set that to your new SpawnLocation

#

it's not going to be perfect right now

#

but we'll replace it later

digital ginkgo
#

There's no combine struct pin

#

Oh you mean on the spawn actor node

odd ember
digital ginkgo
#

Oh cool, it's in the correct Z now

#

Lol

#

Oh wait, actually it's not

#

Lmao

odd ember
#

anyway, onto the next task

#

right click in the graph and type %

#

that should show you what is known as a modulo node

digital ginkgo
odd ember
#

float

#

or actually

#

int

#

in the bottom field, type 12

#

the top pin should go into the Index of the For Loop

#

the output should feed into the SpawnNodes KeyFromOctave

#

normally we could do this differently, by taking the length of the enum. but this is complicated in BP so we'll omit it for now

digital ginkgo
odd ember
#

ffffff

#

try the byte version then and see if you can feed the Index into that

#

otherwise you can convert int to byte

feral ice
#

why does it not draw box around the stone?

odd ember
#

a bit of a faff

feral ice
digital ginkgo
#

Now it's like this 😮

odd ember
#

oof

#

yeah okay, I forgot that keys may have different sizes

knotty sequoia
#

hi, i want to ask how can i get location of some actor in the world in the script of main character? i was trying to use this (screenshot) but i dont know ho to change the "Target" from self -> the actor. This is my first project so i dont really know how to do it, thanks

odd ember
#

so different offsets

digital ginkgo
#

Also why does it not spawn C first

#

hmmm

odd ember
#

yep that is a bit strange too

feral ice
odd ember
#

but otherwise, is it a correct octave? @digital ginkgo

feral ice
knotty sequoia
digital ginkgo
odd ember
#

cool, we can make that a special case

#

actually I know why

#

first index is 1, not 0

#

so what we should do, (what we should have done from the beginning), is set the first index to 0, and last index to KeyAmount - 1

digital ginkgo
#

Like this?

odd ember
#

yep

feral ice
#

whoops forgot an e in the reference

knotty sequoia
#

ok thanks

digital ginkgo
#

@odd ember Do you mind if we continue this in the future? May I DM you next time? It's 3 am and I need to sleep now xD

feral ice
odd ember
#

but sure

#

you have the base of it now

#

now the fun part of extending it begins

knotty sequoia
digital ginkgo
#

@odd ember Thanks a lot, you've been a great help!

#

I divided the offset by 2

#

Looks like my suspicion was right

feral ice
digital ginkgo
#

I think the meshes are not made equal

#

lol

#

xD

knotty sequoia
feral ice
#

name it wheterver you please

knotty sequoia
#

ok, thanks

feral ice
#

sorry

#

just use this node

feral ice
#

my bad, my way works fine but this one is cleaner and simpler

knotty sequoia
#

ok i will try

feral ice
#

but if you have multiple actors of the same class it will not work on of them however, there is a way around this by using the get all actors of class. It will save each actor as an element in an array. You will be able to reach each actor by accessing the array. There are a lot of videos of this. Reference ue4 on youtube

knotty sequoia
#

ok

#

and what should i connect here?

feral ice
#

i think this is what you want. Im taking my dog for a walk just to let you know if you have any more question ill answer them later

odd ember
knotty sequoia
umbral ginkgo
#

quick question, how do I change sensitivity on the first person example map thing? I changed the variable sensitivity but that did nothing

odd ember
#

which sensitivity? mouse?

#

gamepad?

#

camera?

#

movement?

worthy carbon
#

I was packaging my game but it says cook failure and than Unknown cook failure how do i fix this?

umbral ginkgo
#

Mouse, i havent used unreal in quite a bit and was messing about in the first person example project

spark steppe
#

look at the playercontroller, or character. whatever handles the input axis events

#

and then multiply/divide the axis value

odd ember
dreamy ice
#

So, if i'm going to add many different systems to a player such as (leveling, inventory, quests, achievements, abilities, and more) Should I add them directly to the player/controller or should I create them in some sort of other blueprint/class and attach that to the player/controller? What would y'all do?

odd ember
odd ember
dreamy ice
#

I'm not sure what that means?

odd ember
#

that means that generally it's better to create components (in this case) and couple them to the player

#

especially if you can make a clear distinction

dreamy ice
#

That's what I figured. and if I'm doing anything that needs to live past character death, I should attach it to the controller right?

odd ember
#

e.g. inventory is very clearly defined

dreamy ice
#

yeah

odd ember
#

for what it's worth, I'm running at least 10 different components (not all on player), that I attach in a similar fashion

dreamy ice
#

I figured it was better

chrome eagle
#

Hi there!

I have a working point system - I shoot 100 target, I get 100 points.

What I'm trying to do is bring up a little text every time I shoot a target that says +100 just so theres representation that you got points (I wanted to do same for HP and time)
I'm on my HUD and trying to bind the text to the points but I can't for the life of me figure out how to bring up a variable from an actor

#

I'm new, so this could be completely wrong I've no idea.

odd ember
chrome eagle
#

Oh, sorry no. I have targets woth 100/500/1000

odd ember
#

I see

#

how do you want to visualize this?

chrome eagle
#

In this BP I'm working with the 100 target

odd ember
#

can you draw a sketch?

chrome eagle
#

A sketch of what?

odd ember
chrome eagle
#

You lost me, what do you want me to visualize? I'm working on binding a variable to a text on the hud.

odd ember
#

my bad

#

I thought you wanted to know how to visualize the +100 points

#

on screen

chrome eagle
#

ahhh~

#

The green "Score" is where I'm trying to make the "+100" pop up

odd ember
#

so where is the logic for when you achieve the points?

eternal reef
#

Can anyone tell me how to correctly set a cameras transform from one camera to another?
I can swap between two different actors (each of which have their own camera) but when I use the location + rotation from Camera 1 for Camera 2 the Actor is not centred anymore, my guess is using the camera boom? But I couldnt get it to work there either

chrome eagle
#

My 100 target actos has a 'points' variable.

#

((Not sure if that answeres your question))

odd ember
#

ok, but when you shoot them

#

how do you communicate the 100 points belong to the player

chrome eagle
spark steppe
#

but reading your question again, that might not be what you asked for

eternal reef
odd ember
#

so create an event dispatcher in your game mode called OnPointsAdded

#

as a parameter, add an Integer called PointsToAdd

chrome eagle
#

To clarify* When you say add a parameter, I should add an integer variable?

odd ember
#

on the dispatcher itself

chrome eagle
#

Sorry idk how to do that >.< I made the dispatcher but I don’t see how to add a parameter.

odd ember
#

it's in the details panel

#

the UI is a bit convoluted because it deviates from the normal

#

it's up top, instead of at the bottom like for functions

chrome eagle
odd ember
chrome eagle
#

AH! 😄 sorry!

#

okay done

odd ember
#

cool

#

now in that function you showed

#

drag the dispatcher into it and select Call

chrome eagle
#

done

odd ember
#

the points should be the PointsToAdd from the function. you can get function parameters as a reference by typing get <function param name>

#

so get PointsToAdd

#

and hook it into the call

chrome eagle
#

Do not click this.

knotty sequoia
#

bruh

odd ember
chrome eagle
#

Done lol

odd ember
#

go to your widget

chrome eagle
#

yep

odd ember
#

do you have the OnConstruct event?

#

or maybe just Construct

chrome eagle
#

"Event construct" yea

odd ember
#

Get Game Mode -> Cast to <your specific game mode> -> Bind event to to OnPointsAdded

#

for the red variable that pops up on the node, drag it out and type in Create Event

chrome eagle
#

done

odd ember
#

there should be a drop down

#

on the Create Event node

chrome eagle
#

yepo

odd ember
#

click Create new event

#

a new event will spawn. call it whatever

#

congrats, you now have a bonafide connection to when your points get added in your UI

chrome eagle
#

hmmm I don’t have "create new event"

odd ember
#

Create a matching event

#

ok weird

#

just create a custom event with the same parameters then

chrome eagle
#

So I connected my new custom event to the "bind event on onpointsadded" node and deleted create event

#

lol nope I'vve no clue what I'm doing xD

knotty sequoia
#

hi, i want to ask why this does not work? it should move the character to 0 0 0 if i press E and if i press any movement keys it should cancel the movement but for some reason when press E it does nothing

chrome eagle
#

Is the BP inside your player controller?

knotty sequoia
#

it is inside FirstPersonCharacter Event Graph

chrome eagle
#

shrugs Sorry, I'm clueless at all this lol

knotty sequoia
#

ok, thanks 😄

chrome eagle
#

I cant even get my HUD to work xD

knotty sequoia
#

xd

#

i figured it out

chrome eagle
#

NICE 😄

umbral ginkgo
#

Does anyone know why this isnt working?

#

trying to modify sensitivity

willow phoenix
#

whats better: having a "check if player is below x units in Z axis" on tick or a giant (i mean, GIANT) killZ volume with an on begin overlap event?

#

or "better performance"

#

im not sure how much the "im waiting for someone to overlap me" impacts the performance, but my guess is, it is better than the tick version

dawn gazelle
umbral ginkgo
#

k thx

dawn gazelle
#

Usually axis values are from 0 to 1. So if you multiply by 0.5 then it'll be half as sensitive. If you multiply by 2 it'll be double.

dawn gazelle
willow phoenix
#

the actor gets destroyed then? or is it an other event that gets triggered?

dawn gazelle
#

Pretty sure it's just destroyed.

timber knoll
#

you can override it for characters

#

also wouldn't be so sure about overlap being better than checking location on tick

gentle urchin
#

Id just do it on tick tbh

mystic mist
#

Hello! Ive got an interesting question.. well first my blueprint. I am making a door open and close via a switch. Click it, door opens, click again, door closes. Magic. Awesome. However, If one repeatedly clicks the switch while the timeline is making its move, it starts again from the start of that timeline - I don't want this to happen, but I don't know how to prevent it. I tried switching it to Play and Reverse on the timeline respectives, but all it did what just auto rotate without any animation. Anyone know how to help?

timber knoll
#

you would have to keep track of the current time

#

so let's say you are .5 seconds into opening

#

you would have to either reverse it from that point

static charm
#

just use one timeline

timber knoll
#

or play another timeline based on that info

#

if it's a simple open just use one yes

silk hinge
#

Hey, I've been working on UIs lately, I would like to know if there is a way to get data from a clic, Like i'm into my inventory and would like to get the data from the item I just clicked on ?

mystic mist
#

@timber knoll and @static charm thanks! that almost works, but now it does a similar thing every now and then. I wonder... Maybe I will make different switches (one for each side of the door), but it just animates open to clsoe.

#

or maybe Im not doing something right? XD

timber knoll
#

don't reverse from end

#

just reverse, will reverse it from current time

mystic mist
#

oh! ok

#

that makes sense

timber knoll
#

reverse from end will force reverse it from the last keyframe

mystic mist
#

makes sense. huzzah! it works! many thanks.

dawn gazelle
silk hinge
#

I dont press a button, I press to open a menu, then I press the button of the menu I opened, And I need the clic the register the item data I clicked to open the menu, to use it depending on what Info were into the data

#

I got a drag and drop operation I dont remember how I got that, that is taking the data to move it across the inventory

#

I have no idea how I created that, or if it was into the Engine with those infos

dawn gazelle
#

So you're trying to get info from the inventory item after you've dragged it somewhere and dropped it?

silk hinge
#

Let me show you the thing, would be easyer to picture

#

so this is the inventory, I got my drap/drop working.
But now I got a drop down sub menu, with a "USE" button, I have to press an item with "Right clic" to open this menu, so I would like to get the Item data of the Item I pressed with Right clic to open the menu, to do somthing depending on Data, when I press "Use" button

#

And this is the blueprint I'm using to open the menu

dawn gazelle
#

I'm guessing this is what is showing the Use/Close widget?

silk hinge
#

yeah it's casting to the player to creat the widget and add it to viewport

#

get player pown is a terrible choice tho to reach for the player xD

dawn gazelle
#

So what I would do different, is have the inventory widget create the use/close widget and in the use/close widget you can have an exposed variable that feeds in the inventory data you want. Then in your Use/Close widget you can do what you want with that data.

silk hinge
#

My inventory widget is just a grind tho, I dont think I can do anything with that

#

I got one widget to greyed out the screen, one that got the lines and cells, and another that is just the Item

#

so those items you see are all diferent widgets

dawn gazelle
#

Are you using a base widget class for all of your item widgets?

silk hinge
#

Yeah "Item Widget" should be the base, this inventory is a tutorial base cause I really wanted to have full spacial inventory etc... But I just keep running accross all things to understand it properly xD

dawn gazelle
#

Ok. So you are storing some reference to the item in question in the widget, yea?

#

Like this drag and drop operation has the Item Object reference.

silk hinge
#

just the item Image (Icon) and the Size

#

OH wait

#

I got an "Item Object reference"

#

its the data

odd ember
odd ember
dawn gazelle
# silk hinge I got an "Item Object reference"

Ok. So then again, I'd make it so your "Item Widget" widget basically does what ever is contained in the "Usage Menu" in the screenshot below (be it creating or showing or what have you) and you then need to feed that "Item Object Reference" into the "Usage Menu" widget - it can be through an event or when you're creating it using an exposed variable.

chrome eagle
silk hinge
#

I think I got something let me run a test quick

chrome eagle
odd ember
#

take a look at the event dispatcher in your game mode

#

show me how it looks

chrome eagle
#

o7

odd ember
#

hmm

#

have you compiled your game mode?

chrome eagle
#

pffft nope. Now I've got an error on here xD

odd ember
#

well then

chrome eagle
#

Ok well I'm a moron.

odd ember
#

show me the details panel for your dispatcher

chrome eagle
odd ember
#

right click on the Call node and hit refresh node

silk hinge
#

@dawn gazelle ahah
Since the Item widget is unique and I had a reference to Item object allready, I just had to get the variable, since it's specific to each item, I could just access it with no problem xD

I just didnt thought about it, thanks

chrome eagle
#

I refreashed it and it removed the ppoints to add node

silk hinge
#

Literally just had to do this x)

odd ember
#

reconnect it

chrome eagle
#

pfft ok reconnected and compiled and it works now (So confused~)

silk hinge
#

Yeah some blueprint, needs to be recompiled even some times have to restart the engine for like physical material etc...

chrome eagle
#

@odd ember Okay NOWWWW when I attach a 'craet event' to the bind event to onpontsaddded under my HUD WBP, The drop down
https://prnt.sc/1zlk3ru

Lightshot

Captured with Lightshot

odd ember
#

in this case it's just a question of recompiling every time you make a change

odd ember
chrome eagle
#

I did, I was trying this again lol

#

hold~

odd ember
#

if you compile your blueprint, the create event node should now have your event in it as well

#

so you don't have to have this long red line through going through everything

chrome eagle
#

so I've compiled it and it seems not-broken.

#

lol

odd ember
#

try with the create event node and see if you can get your event to show

chrome eagle
#

I doublechecked, the text is binded. No good T^T

odd ember
chrome eagle
#

The bind to the score text on the HUD

odd ember
#

that's not correct

#

use the event

#

that's why it's there

#

the red node

chrome eagle
#

The one I named "Points to add custome event" right?

odd ember
#

yes

#

that's where you do your logic

chrome eagle
chrome eagle
#

oh x:

#

I didn’t think it'd be this diffucult xD

odd ember
#

it's not

#

you're making it harder for yourself

chrome eagle
#

I'm new to the program mate I only know limited ways of doing stuff.

odd ember
#

whenever the event triggers, it will give you the points in the widget

#

so all you need to do is use SetText with the points (and a message potentially), then use a delay, then remove the text

#

there's also the Format Text node that can be helpful

#

it does exactly the same as the binding

#

but you get it for free

#

whereas the binding is expensive

chrome eagle
#

What do you mean? like processiong power?

odd ember
#

yes

chrome eagle
#

gotcha

#

fuq I gtg. Ty for all your help

proper umbra
#

Is there a way for me to set the variable given here?

gentle urchin
#

Pass by reference

#

Checkbox under the input

proper umbra
#

And then do I use set integer (by ref)?

gentle urchin
#

Yepp

proper umbra
#

ahh ok sounds good

#

thanks

jaunty solstice
#

I have an array of custom object. Lets call this 'Spawners'. Now I simply want to retrieve a specific spawner object in this array.
Why is there no 'Get Object at Index' node in Blueprints?

brazen merlin
#

it's just called Get

#

get a reference to your array, drag off from the array, type get, and it will have an index you can control

odd ember
#

but then we can't be angry over the fact that it's not called Get Object at Index 😩

manic vessel
#

Hi all, Im stabbing a character in VR with a knife .And Im using the hit normal of the surface, But I want to set a condition where it only works if the blade is in a perpendicular threshold to the Hit Normal. of the surface.. whats the best approach for this.

brazen merlin
odd ember
#

Get * at Index

odd ember
#

the normal of a wall faces outwards

manic vessel
#

I tried that. But I didnt work out. I tried to use the Dot product of the Out hit impact normal and the Up vector the the knife mesh

odd ember
#

why would you use the up vector and not the forward vector?!

dawn gazelle
manic vessel
#

In theroy I would rather use a arrow as I can apply that direction to different weapons

odd ember
manic vessel
#

because the knife is pointing down

odd ember
#

... the knife pointing down does not mean it's not its forward vector you're using

manic vessel
#

I will do this again with the arrow so I can use forwards vector. But Atleast I know that Dot product is a valid method.

odd ember
#

you genuinely dont need an arrow

#

the mesh is likely pointed towards the forward vector

manic vessel
#

In my Bp and mesh Its pointing - z

#

x is the the side

odd ember
#

ah nevermind

#

in that case you can try up vector * -1

#

for the down vector

#

if you want it to hit a perpendicular surface only, the dot product should be -1

manic vessel
#

Just found that out. By hitting with the handle It worked. so was wrong direction 👍

rough cedar
#

Anyone have an idea why my Jump fuction stopped working after updating to 4.27? If I drag off of "Pressed" I get the option to select jump. But when I click it I get this kinda node?

#

Says "Call unknown function jump"

odd ember
#

has it been replace with a different character movement component?

rough cedar
#

yeah its there, i dont think its been replaced at all though.

#

it definitely used to work

odd ember
#

I can't say. I haven't had that problem upgrading to 4.27

#

you could perhaps try reparenting, then parenting back to character

rough cedar
#

just tried that. same resut

icy dragon
rough cedar
#

no it compiles fine

#

i just cant jump

#

it even fires the jump animation fine

icy dragon
#

Maybe the magic bullet: restart the editor

rough cedar
#

but no height

#

disabling animation just to see if the character moves upward shows it doesnt work

#

ill try restarting, but its been happening for a while now

icy dragon
#

I know it sounds so cliched, but worth a try at least.

rough cedar
#

ok

hazy fulcrum
#

Evening chaps, in a bit of a pickle. I'd like to use Set Timer to run a function that reduces the player's stamina by a given amount, but the Set Timer By Function Name node doesn't appear to allow a parameter to be passed to the function specified. Is there a workaround for this, or a better approach?

odd ember
#

much more robust anyway

heavy ibex
#

I have a 10-faced dial (static mesh) that I am trying to rotate 36 degrees every time it is clicked. I am keeping track of the needed rotation (as an int, incrementing by 36 every time) and when I click I'm using a timeline to lerp from the current yaw to the updated rotation value. It works the first couple times (0 to 36, 36 to 72) but something weird happens when I try to go from 72 to 108 .. it seems to rotate just fine but if I print the final yaw it says it's at 72 still. Then subsequent clicks seem to thrash it around wildly. I think I must be approaching this wrong. What is a better way to lerp between rotations with an absolute final rotation? ugh this was a sloppily worded question

icy dragon
odd ember
#

if you can, rotate using quaternions

heavy ibex
heavy ibex
hazy fulcrum
#

@odd ember I'm not seeing any way of passing a float parameter into the event with your suggestion, unless I'm missing something?

odd ember
#

that's my best guess anyway

heavy ibex
#

hmm, I thought the threshold was 180. And I added some simple logic to deal with that (I thought) by reducing by 360 if I'm over 180

icy dragon
odd ember
hazy fulcrum
#

event dispatchers would

#

Knew I was missing something obvious.

odd ember
heavy ibex
heavy ibex
odd ember
#

basically in rotator logic, 270 = -90, 90 = -270, 180 = -180

icy dragon
# heavy ibex

A bit of short sighted, but maybe you could replace Set World Rotation with RInterp To? I forgot if the node has some kind of "alpha" so that the Timeline node has something to work with, or not.

odd ember
#

to be honest, the rotator version of the lerp has a way that might work with this

#

so you could save yourself some headache if it does work

#

but quaternions are still the best option

odd ember
#

@heavy ibex

rough cedar
#

@icy dragon Same result 😦

heavy ibex
odd ember
#

in that case quats are your only hope, obi wan

icy dragon
round moth
#

im in this blueprint but the windows are all messedup for some reason and i cant get to the event graph

icy dragon
round moth
#

ok that worked

#

but how can i make it like the other blueprint

#

where it is normal

icy dragon
odd ember
icy dragon
#

(ignore the Enable Fullscreen highlight)

round moth
#

i did that but it changed my whole unreal

#

not the actual tab i did it on

#

@odd ember

odd ember
#

did it change it for new tabs that you open?

icy dragon
round moth
#

well ima assume all new ones i make will be normal

#

im just confused why this one is broke

odd ember
#

so close and reopen

dreamy ice
#

so my ability system will allow players to interchange abilities. How would I go about that? Like do components within components?

odd ember
#

or close, reset to default, reopen

dreamy ice
#

i cant wrap my head around it

round moth
odd ember
round moth
#

i have much less option to add

icy dragon
dreamy ice
#

I really wanted to do it on my own so I knew the groundwork for it.

odd ember
dreamy ice
#

I considered making them actors to spawn on the player but that didnt really make sense.

icy dragon
# round moth

It can't be data only BP, parent class is one of the base classes 🤔
Magic bullet it is then.

odd ember
#

actors spawning on players does make sense, but not for abilities necessarily

icy dragon
dreamy ice
#

My worry is that won't be efficient enough for my idea. I want the abilities interchangable at any time during runtime.

icy dragon
#

Basically the ability actor's going to tell the character what animation to play, and how many damage (and element if any) to apply.

odd ember
#

no need for it to be an actor for those

icy dragon
#

It's my method, so I expect it to not work on other's project.

faint pasture
odd ember
#

I'd personally create a systemic approach where there's an ability queue or stack where abilities are put on and executed in order

#

an ability could be an object

#

since it just needs to carry data for the most part

faint pasture
#

Well yeah you can go down that route then you basically end up with GAS with extra steps and with worse networking

#

but abilities as actors or components works fine for someone new

dreamy ice
#

id like to store the ability code itself individually, can i nest components within components?

odd ember
#

nope

faint pasture
odd ember
dreamy ice
#

hmmmm, they're not necessarily complex all the time, but there will be many.