#blueprint

402296 messages Β· Page 590 of 403

atomic salmon
#

Out Range A = 0, Out Range A = 1

hallow nebula
#

Ah, I see.

atomic salmon
#

50 will be mapped to 0.5

#

The unclamped version also maps 150 to 1.5

#

The clamped version maps 150 to 1

#

Very handy, I use it a lot in my vehicle physics

hallow nebula
#

Where's the fun in that? I want to know how it works.

atomic salmon
#

It is very simple

#

Do you know the equation for a line?

hallow nebula
#

Geometrically?

atomic salmon
#

yes

hallow nebula
#

2D?

atomic salmon
#

yes 2D

hallow nebula
#

No.

atomic salmon
#

ok, let's try differently

#

let me draw something for you

hallow nebula
#

Is it something like (X1, Y1) -> (X2, Y2)?

#

Or Length and Degrees and Origin?

atomic salmon
#

You want to map the range 50 - 100 to the range 0 - 1

hallow nebula
#

Right.

atomic salmon
#

Connect 50 with 0

#

and 100 with 1

hallow nebula
#

Right.

atomic salmon
#

Now divide the range 50 - 100 in say 100 parts

#

each part has a length of...

#

0.5

hallow nebula
#

Goddamnit that means I was right to begin with.

#

It IS this:

atomic salmon
#

now if you also divide the range 0 - 1 in 100 parts, each part has a length of...

hallow nebula
atomic salmon
#

0.01

hallow nebula
#

Yeah. I threw out your results because I thought they were wrong.

atomic salmon
#

means each "step" of 0.5 in the range 50 - 100 corresponds to a step of 0.01 in the range 0 - 1

hallow nebula
#

I got it now.

#

Thank you.

atomic salmon
#

With that you can build the mapping rule. I can spell out the equation for you if you are interested

#

But probably you can do it yourself at this point

hallow nebula
#

I had it at the start but swore it was screwy.

#

Sigh.

#

It's the above. ^^^

atomic salmon
#

Yes that works to map to 0 - 1

#

The Unreal version maps to any other range, but that is easy because once you have mapped to 0 - 1 you can just multiply and shift to map to any other range

#

For example to map to -0.5 to 0.5 just subtract 0.5

#

To map to -2 - +2 just subtract 0.5 and multiply by 4

hot jolt
atomic salmon
#

@hot jolt seems to be part of the Sequencer Scripting plugin

#

Did you enable it?

hot jolt
#

I did actually, I restarted UE and I still can't seem to be able to get it

atomic salmon
#

Even if you uncheck Context Sensitive from the right click menu?

hot jolt
atomic salmon
#

4.26?

hot jolt
#

Yes

atomic salmon
#

let me check

worthy tendon
# hot jolt

You have dragged from execution pin. don't do that

#

simply right click without dragging from any pin.

hot jolt
#

Hmm

#

It doses the same thing

atomic salmon
#

@hot jolt yep it doesn't show up for some reasons

#

this deserves more investigation

hot jolt
#

Is it possible that it's not implemented for blueprint(yet?) and only for like python or something?

atomic salmon
#

The SequencerScripting plugin has a dependency on the Python Scripting one for sure

#

Let me check the source code

#

@hot jolt no, doesn't want to show up even if probably it should. It may be a bug of some sort.

hot jolt
#

Dang, well I guess I'll gave to report it

#

Thank you for your help though! It's nice to know it's probably not something I'm doing

radiant rapids
#

what would be the best workaround for a float precision problem? im trying to make a looping counter (delay set on 0,1) and every second it makes a ticking noise. problem is when i get up to 2.7 it goes into 7+ decimals and ruins the counter

atomic salmon
#

@radiant rapids can't you use a looping timer with 1 sec duration?

fossil linden
#

ruins the counter? you mean the sound duration or your show the number in a clock or something?

radiant rapids
# atomic salmon <@!186937773956005888> can't you use a looping timer with 1 sec duration?

Its for cooking a grenade, so the amount of time held is sent to the grenade that sets the "time for detonation" - "held time" having it counting whole seconds would end up with it being off, atm ive made it so it changes the float value into a substring with 3 characters so it only shows 1 decimal, it works but "2.7" shows up twice but set the switch on 2.9 instead so it looks dumb but works and since its only behind the scenes i guess thats alright for now

atomic salmon
#

@radiant rapids Sounds pretty complicated. You can have a looping timer set to 0.1 resolution, at each timer tick you add 1 to an int, then convert to float and divide by 10 to show it.

fossil linden
#

this, or you can multiply it and truncate it as int.. but marcos methode is more solid

radiant rapids
orchid garden
#

floats for precision don't work well.

radiant rapids
#

yeah, realised that... actually dissapointed in myself that my brain couldnt clock i could just use a damn int instead and just count it differently

orchid garden
#

even converting your int back to a float and then dividing it by 10, you can end up with some odd numbers. i.e. 55 / 10 = 5.4888789

#

wierdness like that.

#

round doesn't always work good either because of that.

radiant rapids
#

im just gonna use an int and keep it at that, without conversion. since the counter isnt shown visually only by audio so its alright

orchid garden
#

why's your timer set to 0.1 instead of just 1.0?

radiant rapids
#

it takes 4 seconds for the grenade to explode and i dont want it to so you could hold it for 3.9 seconds, then throw it and it would take another second for it to explode

orchid garden
#

so why not just have the timer handle the explosion as well? counts to 4 if int =>4 explode, kill timer?

radiant rapids
#

Thats what it does atm, it might be a weird setup, but the time held is counted on the player BP and then when you throw it sends the information to the spawned grenade and sets the detonation time to (4) - (held time)

orchid garden
#

couldn't you just use a notify on the spawned grenade? or access the grenade via a reference to trigger the explosion from the players timer?

worthy tendon
#

@radiant rapids Why not simply set a timer of 4 seconds when the grenade is spawned? is the grenade is spawned when player holds some input or is it spawned when player throws the grenade?

#

note that you can cancel the timer when ever you want (using the timer handle given when it was created)

radiant rapids
#

Works like this, i press a button, the grenade is spawned in my hand but only as a mesh. i hold right click the characters does the animation to get ready to throw and aim the grenade. When the animation is halfway through, it pauses and if i left click the pin is pulled and the grenade is active (this is when the counter starts), then when i release left click the grenade is spawned and the time held is sent to the grenade bp

stray island
#

I want my camera to tilt upwards so i can see my player when I’m walking on a sloped terrain , instead of going through the terrain and blocking the player

lyric topaz
#

guys i have a bug in my code for hp regen

#

i don't know why it isn't working

worthy tendon
lyric topaz
#

i used game time in seconds for putting hp regen on one second cd

#

but it doesn't seem to add hp at all

atomic salmon
#

@stray island is your camera connected through a Spring Arm?

lyric topaz
#

max hp is 250 atm and 1second variable is set to 0 by default, hp regen is 4

#

it should be adding 4 hp every 1 second

#

but doesn't work

stray island
#

Ya it is

radiant rapids
atomic salmon
# stray island Ya it is

so the Spring Arm should take care of the collision with the terrain. Strange it doesn't do it. In any case you can sense the slope of the terrain under your character and, if needed, adjust the Spring Arm accordingly.

#

Check that the collision sensing is enabled on your Spring Arm before trying any other solution.

orchid garden
orchid garden
hollow drift
#

Hey folks i am looking for a more reliable BP checker:
I have a ship and its sailors can stay and leave the ship. If the ship moves i want to move the sailors too. If the sailors leave the ship i want to move only the ship itself with all the sailors left on it. I could manage to do so but i think it might be a bad solution. Does anyone has something else to suggest?

worthy tendon
atomic salmon
#

@swift pewter typically using a Line Trace. On Hit you can show the widget, otherwise hide it.

#

The line trace can go from the camera along the direction of sight or from the center of the player body along its forward vector. It depends on your setup.

#

@swift pewter yes or if you want to optimize you can also do it on a lower frequency timer. It depends on which level and speed of interaction you expect.

atomic salmon
#

show some code

dawn gazelle
#

You don't want to be creating a widget every tick, and you can't take the pins from one execution path to the other.

hollow drift
#

@worthy tendon hey thank you, i just managed to do so. works like a charm πŸ™‚

dawn gazelle
#

Store it in a variable from the overlap.

atomic salmon
#

@swift pewter you create the widget in the actor but do not show it, then when the actor is hit by the line trace you ask the actor to show its widget. In this way it becomes very dynamic.

#

So each other can have its own widget and set of functions to interact with.

#

So create a function or custom event in the actor to show or hide the widget and call it from the line trace when that actor is hit.

willow phoenix
#

Is there a way to compare a vector with another vector? i want to scale a model with a timeline and i want to destory the actor when the vector is basicly 0x 0z and 0y. but i can't find => or <= only =! and == *sadface

supple dome
#

well > and < doesnt really makes sense

#

you can know if the Size is < or > tho

#

so Vector1.Size < Vecto2.Size

willow phoenix
#

yea just when i typed it i realized i could use branch and ask if == is true or not

#

but these scale thingys are confusing :/

hollow drift
#

Have another difficult question:
I have 5 Tiles. The pawn is currently on the center tile. According to the type of tile below it will move the pawn to the next tile. Issue is the main Tile with the arrow can be Rotatet. If not rotatet, it will always move the pawn to "Target1". If once Rotatet it should move the pawn to "Target2" and so on. How can i calculate according to the tiles rotation where the pawn has to move to?

#

Note: I work also with custom coordinates. Each tile has a intvector coordinates which i would need to update on the pawn too. But possibly just adding a box collision to next tile with its coordinates to update should be enought

dawn gazelle
#

This set up is still creating a new widget every tick. You want some logic in there that prevents the creation if it already exists (store the widget reference in a variable and do a validated get / isvalid check before the creation). You should also notify the actor that the player is no longer looking at the object so it can remove the widget.

#

In my own game I did something similar by storing the hit actor reference on the player controller, and did a check to see if the current hit actor is == stored actor, and if so, do nothing. If the stored actor != hit actor, then notify the stored actor they are no longer being looked at.

stiff chasm
#

im making a fighting game

#

and i want to make a fighter bio menu

#

and the info changes based on the selected fighter

#

Do i make a Structure For Each fighter, and if i do how do i get it to switch between structures

#

im still new to UE4 πŸ˜”

normal bane
#

I'd go with either a Data Table or a Map variable with key Name

#

Then look it up by some sort of internal name like "fighter1"

stiff chasm
#

thank you!

#

What do i do for row name

normal mantle
#

Hi ue4 people, just joined the server. if i have a question do I post it just here? Or somewhere else ? Kinda new to discord

stiff chasm
#

it depends on what your problem relates too

#

if you have problems or questions with blueprints you post here in #blueprint

#

if you have problems with paper 2d, youd post questions in #paper-2d

#

im pretty sure thats how it works

normal bane
#

The row name you pick is totally up to you, make a convention

normal mantle
normal bane
#

You can iterate all rows from either a map or data table

stiff chasm
dawn gazelle
# stiff chasm So i dont make it the fighter names

You can name the row whatever you want, but that will be the reference to the row when you do something like "Get Data Table Row" - so it's best to name the rows based on a convention that you should create and follow.

stiff chasm
#

is this a bad name convention?

#

should i use Fighter 1 instead?

#

this is what my datatable consists of

normal mantle
#

Im sure this is an easy answer but cant find anything that helps me out there. I have created a flickering spot light and would like it to start flickering at a certain frame in my sequence. How can i achieve this ? Thanks in advance for any help !

dawn gazelle
normal mantle
#

I have tried this but it only plays the flicker when i play the level, not when i play my sequence, is ther a way to start the event in the sequence ?

dawn gazelle
#

Sorry read that wrong

#

Looks like you can create an "Event" track on the sequencer, then you can add a key where you want and then double click it to get into a blueprint editor. From there I imagine you'd need to get a reference to your light to call the custom event.

dawn gazelle
#

From what I see just mucking about with it, you won't see the effect until you actually render the cinematic, as changes to light intensity does not appear to be previewable in the sequencer.

hollow drift
deep imp
#

Wow 4.26 is amazing. Blueprint structs and animation retargeting are both much more stable. As a matter of fact I haven't had any crashes yet with animation retargeting or modifying blueprint structs.

I ❀️ UE

dawn gazelle
#

Would need to be before the cast otherwise it may fail to execute.

trim matrix
#

Hello everyone, I have a question, how do I disable a keyboard input only if another keyboard is pressed? (I don’t want to be able to run if I am crouching )

trim matrix
#

The nodes

dawn gazelle
#

Electronic Nodes

dawn gazelle
trim matrix
#

Ok thx

dawn gazelle
#

The branch you have right now is essentially comparing a reference of an object (hit actor) to itself (hit actor casted to BP_BaseItem) which means it would always return true since they are still the same actor. You need to set a variable with the actor being looked at after the cast succeeds, and then compare that variable with the hit actor before the cast. In mine, I'm checking to see if the "Viewing Actor" is defined, and if it is, then I check if it's the same actor or not.

honest wolf
#

Hello there. I have a question regarding custom movement modes in Blueprints. When switching to my custom mode, the collision of the Capsule is gone. Am I supposed to implement my own logic to detect collision?

crimson saddle
#

Hey not sure if anyone can help, I'm having trouble with a material instance on my procedural mesh. It doesn't seem to work at all and just shows the default material.

honest wolf
#

You need to assign the material to the mesh after creating it.

crimson saddle
#

How do I do that

honest wolf
#

nvm, I was thinking of something else, your code should already cover that

dawn gazelle
#

Better but you need to set the New Var 0 as the hit actor.

crimson saddle
#

Ye I'm not sure what is wrong. That code is on my beginplay so maybe I do have to reassign it anyway?

honest wolf
#

Begin Play should be fine.

cloud bridge
#

Hi i'm super newb here and in ue4, i just created a ball with floating physics inside a closed room (1 person shooter, i added a roof). i want it to do something every time it touches a wall. i tried to use overlap and test print but i get a message only in the first hit

#

what do i do from here?

dawn gazelle
#

new var 0 is not being defined anywhere. it needs to be set to the "hit actor" value after you've told the value stored in "new var 0" that the player is not looking at it.

mild granite
#

Hello all, anyone know of a solution to having a character (In my case a ball) turn based on the rotation of the camera? Example: Holding W to move forward, rotate camera 180 to look behind, ball slows and starts going in the direction your now facing?

#

Thanks in advance

dawn gazelle
#

You can't do this.

#

You're trying to reference something that you haven't gotten a reference of yet.

gentle holly
#

Hi everyone, I'm trying to do an Ue4 version of a boardgame. I'm struggling with cards, shuffle & deal. As anyone a link or tutorial to help me? So far, all my cards are Blueprints from differents class, so it's difficult to make random or spawn. Thks!

dawn gazelle
mild granite
#

@dawn gazelle I do, it's the basic Mouse Y > Add controller Pitch Input

#

and vice versa

#

I'll give that a go now1

dawn gazelle
#

If it's the wrong direction like forward is moving right, then swap the "Get Forward Vector" and "Get Right Vector" nodes.

crimson saddle
#

does anyone have a solution to my procedural mesh material problem?

mild granite
#

@dawn gazelle What is the X node that the Axis value is going into?

#

I am a noob sorry

dawn gazelle
#

float * float or float * vector

mild granite
#

Okay thank you!

tranquil dome
#

Hello everyone, any advice on doing some arcade hover vehicle movement ? Any video or tutorial on this topic would be welcomed.

I'm thinking of saying arcade as I don't want it to be too expensive on the simulation part. I've found some tutorials that use 4 line traces and are pure physics based but if can be done without physics then awesome.

mild granite
#

@dawn gazelle Works perfectly, thank you!

dawn gazelle
#

Good stuff πŸ˜„

mild granite
#

I knew it had something to do wit hthe Vectors, just had no idea how to impliment it xD

orchid garden
#

any idea why UE4 would return 0-1 = 1 ?

dawn gazelle
#

What type of variable?

orchid garden
#

int-int

#

i can't make heads or tails of it.

dawn gazelle
#

Getting -1 on my end. Got some example code where it's happening?

orchid garden
#

i was too but for some reason now im getting 1

#

even reversed the inputs, still getting 1.

#

chokes ue4

trim matrix
dawn gazelle
orchid garden
trim matrix
#

wdym

#

the keyboard input?

orchid garden
#

i set a boolean with my shift key for running, so if its true, the character runs while shift hasn't been released, if shift is released it toggles the boolean back to false and they stop running.

dawn gazelle
# trim matrix why is my sprinting system not working?

Not a very clear way of doing it. You should set a boolean variable when your character is crouching, called say, "IsCrouching". This can be set whenever you press the crouch button, and unset when you release it. Then in your left shift call, instead of checking if the key is down, just check IsCrouching == False.

orchid garden
#

on a totally unrelated note - Alien Isolation is todays free game. I wanted to try that one but never bought it.

#

@dawn gazelle something hickuped in the engine, restarted it and now its returning -1 again.

#

though its still not removing the item from the array, its at least getting the count right now lol...

#

index 0 is the first array element right?

#

is there a way to print out a arrays content wihout a loop like dumping the array to screen?

dawn gazelle
#

yes, 0 is the first element.

jolly oriole
#

Is it possible to setup data structures such as binary trees using BP?

warped hedge
#

Hi. I am trying to create modular widget text by using the editable text value from one of my blueprints however i keep getting an access none error in the widget blueprints and im not entirely sure what the solution to resolve this is.

dawn gazelle
warped hedge
#

yes sure one moment

#

there you go

zealous moth
#

You have to expose your var on spawn for the widget

#

Then edit it when you create it

warped hedge
#

i am a bit confused what you mean by exposing the variable? are you meaning i have to make it public?

dawn gazelle
#

If you set it to "expose on spawn", you can feed in a reference to "self" on this node:

north onyx
#

you may think the constructor argument in meaning of expose on spawn

orchid garden
#

i've ran into a intresting problem.... items with physic properties 'placed' into the world aren't using their weight, but items spawned into the world are, any ideas what would cause that?

north onyx
#

@orchid garden How do you setup the new actor location? Are you enabling Sweep or Teleport parameter?

orchid garden
#

for the things dropped?

north onyx
#

Yeah what do you do?

orchid garden
#

still, the object placed in the world and the one spawned are one in the same, but while one has the 20kg weight (Spawned) the other (placed) doesn't as shown in the video

north onyx
#

where do you setup the properties? in the world editor or class defaults?

orchid garden
#

in the object class defaults.

mild granite
#

Hello all again, can someone briefly explain why this doesn't work? I just want my ball to jump up when it hits the overlap box, but it doesnt

north onyx
#

what is your placed method? isn't that are you spawning a new object while you placing things?

#

i mean if you want to place somethings you shouldn't need to destroy it you can basically change the actor's location anyway

orchid garden
#

placed as in placed in the world map before running it.

north onyx
#

okay can you check the simulate physics property in world editor?

orchid garden
#

by default its on

#

those are all default values.

north onyx
#

okay can you increase the z value of mesh and see if it's falls or not? that is very strange problem....

orchid garden
#

yep they fall, bounce about, (just like shown in video), but only the dropped ones (spawned) have the 20kg weight and can't be moved by the player bumping into them.

north onyx
#

may you can the collision handle overriding

orchid garden
#

the red sphere interacts with the player only, the object itself interacts with all world objects.

#

happens with default collision as well.

north onyx
#

I mean this one, it should always spawn, also can you change different of spawn locations(increased Z Value) to test it out? may your character is blocking while your spawning it at the same location

#

also i remind that you are using the sphere's collision, not the static mesh's one

orchid garden
#

its being spawned 50 units infront of the player then a random impulse being added to it from 3000-5000

#

the spawned object is getting the weight added for the physics. its the placed ones that seem to be ignoring it.

north onyx
#

i watched the video right now and i think the spawned objects is not simulating physics anyway, just spawns though it

#

do spwaned actors falling to the ground?

#

also you may check pressing F8 to unpossess from the character in PIE and check spawned objects

#

state of collisions etc...

orchid garden
#

just did some fiddling and they have physics, its just ignoring the player.

north onyx
#

can you write a simple print stringon the event that red sphere things overlapped?

#

i mean let's test that out as simple

#

do they blocking each other? or player? we need to know that...

#

F8 is useful key if you want to see the properties of spawned actors in playing on PIE

orchid garden
#

its the sphere causing the issue.

#

the sphere was to keep the random physics bug of launching the character into the sky from happening... but on spawning the object the sphere stops the player from being able to move the object.

#

so i litterally have 2 physics bugs. physics weight either isn't being applied or isn't being applied properly (seriously lower value then 20kg) and the sphere.

#

cause 20kg should be around 53.58lbs, something someone shouldn't be able to move just bumping into it.

north onyx
#

you don't need to use sphere as a extra collision if you want to move the object though static mesh

orchid garden
#

.<

#

There is a physics bug that when running into a physics object it can randomly launch your character into the air, and not just a littlebit, like he just got a rocket shot up his butt.

#

the collision sphere was to stop that bug.

#

works fine with NON-Spawned objects.

north onyx
#

you should overlap the character for spawned actors, therefore you don't need it...

#

and you set up the proper values for the applying impulse and mass

#

if your spawned actor overlaps your pawn collision channel you can still generate overlap events

orchid garden
north onyx
#

check your collision settings under collision presets @orchid garden

orchid garden
#

😐

north onyx
#

can you show your collision presets for static mesh component?

orchid garden
#

its on default right now. Been testing the different presets.

#

if i set it to any overlap preset i get the above error.

north onyx
#

are you expanded the menu?

orchid garden
#

yes.

minor lynx
#

is there a way to get the state machine type functionality from a animbp but not in an animbp? I am wanting to manage the characters speed based on multiple things and keeping track of bools seems like the wrong way lol. i got crouching, walking (default), sprinting, and dashing (super speed). and they should all be exclusive and only certain ones can transition into another. I cant figure out a away without creating spaghetti code

orchid garden
autumn plover
#

Trying to do an fps spectator mode using target with blend. When player dies and observes an alive player it jitters on yaw turns and pitches. Anyone how to resolve this?

minor lynx
#

yeah now add 2 more levels to that for crouch speed and super speed πŸ˜› @orchid garden it gets messy. its 100% doable i just feel like some kind of state machine would make things so much cleaner

orchid garden
#

use a multiplier for your super speed?

#

could do the same for crouch speed

minor lynx
#

yeah but you also have to determine if you can enter those states even

orchid garden
#

my crouch speed is the same as walk so no issue there.

#

could always use a int to track the current speed, 0 walk, 1 jog, 2 run, 3 superspeed.

#

or even a enum

warped hedge
#

@dawn gazelle @zealous moth Finally sorted my problem after researching the things you brought up earlier thanks very much for your help

covert delta
#

@minor lynx I would make a macro that outputs a pin for each possible state, and trigger it every time the state is modified

worthy tendon
#

basically create the state machine yourself πŸ˜„

abstract summit
covert delta
#

@abstract summit in the details panel, with the text object selected, check off "Is Variable". Then in the BP you can drag it into the graph and set it's text.

worthy tendon
minor lynx
#

i think i got an idea 1min

abstract summit
#

is variable case must be uncheck?

covert delta
#

must be checked.

#

When it is checked, you can refer to it, and modify its properties in the bp

minor lynx
covert delta
#

@minor lynx the important bit is getting a clean way to switch on state without rewriting a bunch of branches and what not each time. It's not the worst thing in the world if there's a lot of crazy branches under the hood.

#

This pic you've shown seems to be a very roundabout way of saying "If new state != current state then set current state = new state"

orchid garden
#

so im quickly coming to the conclusion unreal engine can't properly handle physics for small objects.

minor lynx
orchid garden
#

im having issues with small physics objects when i player 'walks' onto them, they like to make the player bounce around or launch into the air..... imagine stepping on a lego and having it do that to you instead of just making your foot hurt....

#

seems anything thats under the 'step' height is prone to that unless it has 60kg weight or higher.

#

imagine a coffee cup weighing 150lbs....

covert delta
#

characters kinda do their own thing when it comes to physics

orchid garden
#

not only players

#

pretty much any player controlled pawn

karmic pebble
#

what is the correct forumla for making the character move to a point directly behind them. +/- on that float doesnt seem to make a difference

maiden wadi
#

@karmic pebble Add it's current location to the vector you get after the Vector*Float

karmic pebble
#

also helps when you use the damn actor and not the mesh thats rotated 90 degrees. I knew i was missing something.

#

Thank you @maiden wadi, been sick the last few days and my head is not on still. πŸ˜„

stray island
#

i had a problem where my camera goes through the slopped terrains when , now i fixed it but not the way i want , now it just zooms to the player when the player is in slope , i want the camera to tilt upward instead without zoomings

reef ingot
#

Hello, would anyone know how to use "Export fbx" in blueprints? The above code generates a "true" return value, but i dont see the actual fbx file anywhere. I found find the documentation for it on unreals website but its still confusing haha. Thanks for any help!

#

perhaps this screenshots better lol

autumn hawk
#

Can any1 point me in the direction of creating a timeline that I can dynamically set the length of (based on an input var)?

maiden wadi
#

Could always make your own. Timelines are just actor components.

rough eagle
#

I have a primarydataAsset, who seem to need to be recompiled/saved every time i start the editor. (it contain a simple list). is there something special to do to "save" it definitively ?

zealous moth
#

@autumn hawk I don't think it is possible simply because of how they work. They appear as single nodes but they are set as complex functions.
@stray island what you are looking for is a physics based camera. I made one sometime ago and I am pushing it in the epic store. Your only other alternative is to have a separated camera with an offset calculation much like Matthew Wadstein's 2d sidescroller video.

stray island
#

Assasins creed does it too when i go down from terrain

#

Alright i will try out , and u can direct me if u put one in store

dreamy ice
#

Okay so hear me out... Would it be better that I store player's cash balance in the player state or the game state. Because both can be accessed by all clients and the server. Players would be able to spend their balance and increase it and that would be reflected to wherever it's stored. Is there any major difference or downsides to using one or the other?

autumn hawk
#

Thanks Zanet and Authaer, I did find one solution where I set a static timeline to 1s then use Set Play Rate to dynamically adjust length.

dreamy ice
#

Is there any major differences between player state and game state other than the fact that one is owned by the player

odd ember
#

yes one is easily replicable

#

for players

dark crow
#

GameState holds match information, PlayerState holds information of the player that holds it

#

Just use them how they make sense

#

If i want a current match score or all connected players i would store that in GameState

If i want player ID, Name... i would store that in PlayerState

dreamy ice
#

So store player balance in the game state?

#

or store balance, health and other stuff in the player state because it belongs to the player

maiden wadi
#

@dreamy ice PlayerState would be for currency that belongs to one player. You'd only put that in GameState if it was a currency that all players could use. Realistically it doesn't matter. But Gamestate is often meant to be game wide replicated variables. PlayerStates are things very specific to that one player. It's largely organizational.

dreamy ice
#

That makes a ton of sense. Thanks.

dark crow
#

Don't store Health variables in PlayerState
Imagine PlayerState for variables that are always common to yourself, even if you change Character

If my Character dies, my ID is still gonna be the same, same with my Name

dreamy ice
#

What if I need the other players to know my health?

dark crow
#

You could then yeah, but in this case of course you would want it reset when you respawn or so for example

dreamy ice
dark crow
#

I don't know if i would use playerstate for that personally tho

dreamy ice
#

What would you do?

dark crow
#

It would work with Widget Components, you could just pass the reference of the character that created the Widget on the server and use its values on the Health Bar

#

Health variable and Max Health would be replicated in this case

#

So the servers knows who owns the widget you're looking at and has their references stored, when the Health gets modifies for example it will modify the Widget too since it's linked to that Character's Health

#

But honestly

dreamy ice
#

oooh. okay. Didn't think about doing things that way.

dark crow
#

You could store stats in Player State too

#

Nothing wrong with that

#

It really depends on how you find yourself better with things

#

There are multiple ways to do things, like always

#

Another one you may wanna consider is Game Instance

#

If you change level, Variables will remain the same

maiden wadi
#

You can also get a reference to the Pawn from the PlayerState as well. Makes it easy to get replicated variables on any machine to the correlating pawn.

#

Really depends on your design.

dark crow
#

Yeah, i just say go with what fits you the best

#

As long as it works

dreamy ice
#

Alrighty. There are a good few things I'll need showing for other players so I may just do the widget components with the character references. Seems itll keep things a bit cleaner.

orchid garden
#

my stats are stored in a actor component, and the widget is updated via the component.

#

i do have a question that maybe you know the answer to @maiden wadi , i need to store the static mesh of a object, then replace that mesh with another for a period of time, then restore the original, would using a reference of the original mesh work for that or would it be overwritten when i replace the mesh?

maiden wadi
#

If you make an empty StaticMesh pointer, and get the original mesh to save in that pointer, then change that component's mesh, you can set it back to the original from that pointer.

orchid garden
#

i have actors that consist of multiple body parts, head, chest, arms, legs, feet. and sometimes the body part needs replaced with another for equipment.

#

so im trying to figure out the best way to handle that... considering there is a male and female that will be using the same master character

maiden wadi
#

The two different ways I could see are probably storing static mesh pointers to each mesh in the master class and populating them in the base classes for the different types. So if you equip something, it'll use that equip thing there, but upon unequipping, it can use that pointer to change it back to the 'default'. Alternatively. Depending on how you're doing equipment you could specify different meshes for defaults in datatables where your equipment stuff is, if you're doing it that way.

#

You'd probably want this one, if you're just swapping meshes inside of an already existing component.

orchid garden
maiden wadi
orchid garden
#

okay i'll give that a go, i can populate them during construction in the child blueprints.

#

ty @maiden wadi

maiden wadi
#

I am so insanely shocked at how much performance sweeping movement takes. :/

orchid garden
#

im finding some things no matter how hard you try to optimize just like to take a bite out of performance.

#

but could be because im doing everything with blueprints and no c++

maiden wadi
#

500 simple actors using VInterpToConstant with a simple capsule collision and sweeping movement? 55FPS. Disable collision on the capsule? At 55 FPS, that same 500 number goes to 2300. Same object, just no collision event from the sweep.

orchid garden
#

damn

#

and here im happy with 50 little guys walking about in a single scene with good fps lol...

#

i think i spend more time putting in reroute nodes then working on the code ... lol

#

so... if Characters can properly effect physic objects, why do physics objects effect characters? you'd think that would of been something with physics that the unreal team would of thought about, but i guess not, went hunting for a answer to my problem and found it... just can't use the physics in the game... have to code my own to make it work with the character... seems to be what everyones doing... i was hoping to rather use the internal physics but... its not looking like its possible.

#

which is odd to say the least as i can have physics on the character clothing and it works properly with the character... just not world objects...

#

i.e. i can litterally stand on top of a coffee cup and ride it across the map due to the physics not reacting the the character properly.

#

it sees the character as zero weight. is why the character launches off into the sky sometimes too like he has a rocket strapped to his back lol.

maiden wadi
#

That's odd, like the physics object is able to be stood on and the character gets carried along with it?

orchid garden
#

yep

#

simple test - make a third person project, make a small physics item that is smaller then the character step height, throw a few of them in the little demo scene, and walk up on them.

#

i've been launched into the air, rode them, been totally turned around by bumping into them... all kinda of wierdness.

#

can even have the same thing happen in the first person shooter test scene, only difference i found was i didn't get spun by them in it.

maiden wadi
#

Hmm. I wonder if you could maybe test the event hits from the character capsule, get the kg count and apply sideways impulse on the object if it's too small? Like someone jumping on something and it slipping out from under them.

orchid garden
#

yeah thats what people are doing that i could find to resolve it, overlaps and bumps.

#

found posts back to 2016 so its been around for awhile.

#

i wanted to get a nice effect like in fallout, where a bunch of stuff can be dumped out on the floor infront of you and it moves the stuff around like if your wading through them.

#

only other thing i could think of doing is making some physics balls and attaching them to the joints of the player, have them not visible in game, and see if that would do the trick.

#

lol just noticed there is a physics channel here.

maiden wadi
#

Who knows, maybe Chaos will solve some of that. I really want to use 4.26.. but that interface bug is really messed up.

orchid garden
#

yeah im gonna give them time to get the main bugs out of it before i try 4.26

trim matrix
#

How would one do a headbob in 4.26+? They deprecated Camera Shake

#

It's just Start and Stop camera shake now and start camera shake doesn't work as Client Play Camera Shake did

maiden wadi
#

Not even sure about that before 4.26. I do all of my camera effects with actual camera movements so as to affect aiming and such as well.

trim matrix
#

Well can you tell me how to do headbob please for first person?

dreamy ice
#

Okay so how would one go about creating an automatic rifle without creating an infinite loop. For some reason im struggling

trim matrix
#

I've just created a very simple actor BP (a platform) that when my character collide with it, the actor BP is moving. Though I'd like when the platform reaches the end, then it reverses.

#

I can have a loop if I click on "Loop" in the timeline but the platform reaches the end then instantly teleport at the beginning. I'd like a reverse.

tulip yoke
#

maybe just make a custom event you call when finished that just plugs into reverse?

dark crow
#

There's a Reverse node for a reason

tulip yoke
#

or loop it in to itself^

deft hawk
#

How expensive are linetraces?

trim matrix
#

( that is what I've used but it jumps directly from the end to the start )

tulip yoke
#

well what i mean is that take the "Finished" execution pin and just wrap it into the "Reverse"

#

or as I said, make a custom event that plugs into the reverse and then call that function when the timeline is finished

trim matrix
#

doesn't work 😦

#

I tried to plug on Reverse on the second timeline, below

#

I also inverted the value in the beginning and in the end of the timeline

#

but it doesn't work

#

my platform moves then is just stuck

tulip yoke
#

that is not at all

#

what i mean

#

take the reverse custom even

#

and plug it into the timeline even which you already have

#

event*

#

cause you already have a functioning timeline you can just use that instead of attempting to make a new timeline

#

that's just wasteful

trim matrix
tulip yoke
#

almost there!

#

now on your original timeline

#

call the reverse custom event

#

off of the 'Finished"

trim matrix
tulip yoke
#

can you show me your blueprint again so i can see if it's right?

trim matrix
tulip yoke
#

can you attempt to get out of the collision box and record what happens?

trim matrix
#

Well, if I delete it, it just happens nothin

tulip yoke
#

hm im going to assume you dont have an "On Component End Overlap" event?

trim matrix
#

Nope

#

This is the entire BP

tulip yoke
#

well, i wanna see what happens; click on "Box" under components and make an "On Component End Overlap"

#

and off the execution pin just call the reverse custom event

tulip yoke
#

it seems to snap into place interestingly enough

#

and yeah what i think the cause of that is

#

in the 2nd video

#

it attempts to reverse but since you're in the box it goes back up

trim matrix
#

ah

#

wait

#

you're right

#

that's maybe because my collision box is too big

tulip yoke
#

i assume the way you're doing it is to place an actor in the level that has the stuff

#

you could possibly the code in the level blueprint

#

put the code***

trim matrix
#

I made it super big, just ike this, just to be sure it works... but it collapse from too high so then comes back, I think

tulip yoke
#

yeah cause it's parented to the box so it moves with it

#

well the mesh is the parent of the collision box

#

should i say

#

so it'll attempt to come back down but then just hit the player and play it again

#

ill make something really quick and show you what im talking about having it in the level blueprint

trim matrix
#

( I deleted the Event EndOverlap )

#

And then :

tulip yoke
#

that's really odd hm

#

so it does reverse which is obviously what you're going for i guess?

#

but then it does jump straight back to the beginning

trim matrix
#

this is it

#

and it doesn't reverse immediatly when he reaches the end of the course, also...

tulip yoke
#

does it stay stuck in the air after it bouncing back up?

#

ohhhhhh

#

wait wait

#

i was looking back

#

and change the reverse node to not connect to the "Reverse From End" but just the "Reverse"

#

try that and see what happens maybe?

trim matrix
#

Actually, it rises, it stuck for 2-3 sec, it goes down, until under the ground, then teleport up above, stuck 2-3 sec, the goes down, etc, etc

#

ok, I try

#

not bad at all :

#

I just don't know why it stops a bit once up above but, well...

#

apart from this, it works just like I want πŸ™‚

#

I must leave

#

If you know why it stops, tell me

#

but it's pretty good

#

thank you for the help

tulip yoke
#

your timeline is probably longer in length and it has to go through the entire timeline before it reverses

trim matrix
#

Yep

#

Thanks again ! Bye :-p

tulip yoke
#

yeah lmfao

#

you're welcome! cheers!

cinder laurel
#

Hi. How do you force the editor to update during the execution of the blueprint to get the latest infomation?

tiny meteor
#

what do you mean? see blueprint values or rerun the script

#

you need to use the construction script graph in BP for it to run code in the editor, not during runtime

cinder laurel
#

I'm making an Editor Utility Widget

#

My goal is to record the world location of an actor frame by frame in a sequencer

#

Like this: Set it to frame 1 -> record the location -> set it to frame 2 -> record the location.... and so on

#

Somehow, all the location recorded is the one at the first frame
Edit: It's the first frame

odd ember
#

Because you're not storing the saved locations?

cinder laurel
#

I don't think so. Even just print it out wont change the result

#

My bad, it's the first frame. Not the last

lapis path
#

Hi there, I've got a general blueprints questions (or even a global coding one, but I'm asking there for blueprints purpose) : I've got a custom event with a delay in it. Another event calls this event, and some functions after that. However all of the functions are called in a blink, but I'd like to wait the delay of the first event is finished before calling next functions (I hope it's clear enough to understand my question).
So to resume : is there a way to wait for an event is "finished" before calling next functions ? Or is this the normal way this works and I have to set up a delay manually ?

#

A screenshot to clarify : On CloseMenu call, I'd like to wait until close sub submenu has finished before playing the animation. But Close SubSubmenu has two delays in it, and their length can vary.

#

(oh and in case it's important, I'm in a widgetBP event graph)

deft hawk
#

How do I get the direction of flight of a projectile?
Is it just projectile->get velocity?

dawn gazelle
lapis path
#

Not exactly, the event uses an animation, spawns a sound, removes a widget from parent, sets some variables, calls another function and then is finished.

#

(also I tried with this node but for any reason I encountered limitations in my setup)

dawn gazelle
#

You need to use asynchronous functions like the one above to achieve something like that as you need something to do some kind of call that it's finished. What is it that you're wanting to wait to finish?

lapis path
#

And my events use a delay, that's why I don't use functions

#

Actually I've got a menu, with potentials submenu and sub-submenu. When I call "close menu" event (I want the whole menu to be close), I want to wait until subsubmenu and submenu are closed (if they exist) before to close the main menu.

#

Please note that I actually found a workaround, manually setting another delay in the close menu event, but I'm asking is there would be another more "conventional" way to achieve this. Perhaps not πŸ™‚

dawn gazelle
#

The conventional way is to not use delays, instead use async tasks, or perhaps bind events to things happening if they support it. Without knowing specifically what type of blueprint nodes you're trying to use I can't be much help. As an example, the below could be used to determine when an animation is finished rather than arbitrarily setting a delay waiting for it to complete.

lapis path
#

Oh that's great ! I didn't mind such node even exist πŸ™‚ Thanks a lot. Here is what the Close SubMenu event looks like.

dawn gazelle
#

Yeah so the example above would help you eliminate the delay node you're using as you can plug in your "opening sub menu" animation variable into it. You can also unbind events to the same event delegate if you're no longer needing to listen to animation happening (just in case you reuse certain animations for different things)

lapis path
#

Yep that definitely could help me clarify the thing. Thanks a lot !

#

Also subsidiary question on the same blueprint : I've got 4 event made the same way : Close submenu, close subsubmenu, open submenu, open subsubmenu, but for some reason open submenu is considered as a function, not a simple event. Those 4 events are interface functions and have no difference in the interface setup (but their inputs)

#

When I try to edit Open SubMenu, it opens in a new function tab, not in the main event graph

dawn gazelle
lapis path
lapis path
dawn gazelle
#

Do you have Open Submenu returning something?

#

In your interface bluerpint?

hardy sphinx
#

Guys maybe somebody know how to put this white ball to the side of the door like on the next photo

#

I forgot how i made

lapis path
lapis path
hardy sphinx
#

no

lapis path
# hardy sphinx no

Simply a relative location of the static mesh ? The white ball represents the defaultsceneroot

hardy sphinx
#

but i made this in my previous project

#

u can see

lapis path
#

I have to admit I don't see many things with your only 2 screenshots. The second door looks scaled along X

hardy sphinx
#

how to scaled it along x&

dawn gazelle
# lapis path Specific function graph

I think you may have changed the return value after first implementing it into your blueprint. Copy out everything in the function into your event graph, then right click on the interface on the left menu and select convert function to event then hook up what you copied out to it.

lapis path
#

Set relative scale to something different than 1 in X @hardy sphinx

dawn gazelle
#

Create a new temporary interface and implement it, copy what code you want hooked up to it. Delete old one. Rename new one same as old.

lapis path
#

Yeah that could be efficient. For now I'll let the setup as is since it works. I'll clean this before releasing. Thanks for your advice !

#

(also I noticed Open SubMenu is the only one of the 4 that can be duplicated, the other functions cannot)

cinder laurel
#

Anyone know how to get object references of the objects spawned by the sequencer into level?

olive sedge
olive sedge
#

@dawn gazelle ayyy. Perfect, thanks!

wind orbit
#

Hey everyone, I'm new to unreal and I'm working on my first project (chess)

So far, I have an array index to spread out the tiles, color them correctly and place the pieces however ive got no mechanics at all.

I'm trying to figure out how exactly i should go about giving each piece movement rules and stuff.

I seem to be a little stuck with my grid. When I am clicking i should see numbers related to which square of the board i clicked however the numbers are weird and range into negatives and stuff. Can anyone give me any general advice as to keep my workflow non destructive and stuff, because now I just feel overwhelemed and like I should give up. But I don't want to.

Also if anyone could take any time to try help me get back on track i'd be really thankful.

short pawn
#

does anyone know how i would go about making an online leaderboard or scoreboard? i just want to send some info strings (username, score) to a webside and recieve the top player score( username, score)

lapis path
wind orbit
#

sadness

lapis path
short pawn
wind orbit
#

I would but I didn't want to spam up the discord :p gimme a sec

lapis path
#

Honestly I can only suggest you to look for plugins and/or tutorials.

lapis path
wind orbit
#

So i use this sytem and when i output the index i click on i get weird ass numbers

#

pardon my comment names, not edited them yet

lapis path
wind orbit
#

I made a click function that gets the last index selected and just prints it to the screen but I removed it because it wasn't working properly and I didn't wanna break anything else. Hold on I'll grab it back up.

dawn gazelle
#

If you're wanting to reference the tiles like that, wouldn't it be better to have them as their own Actor rather than just static meshes added to your board? If you had them as their own actor, you could populate them with data as well, such as its co-ordinate on the board (useful for calculating valid moves), if the space is occupied, etc.

worthy tendon
# wind orbit

First of all, make functions. that way you don't get lost when you want to fix something or change something. believe me, It will help you to stay focused.

lapis path
worldly radish
#

how does one trigger an event that plays a looping timeline on a bp using sequencer so that it can be recorded without entering playmode?

#

I have a light flicker BP actor that has a timeline but when adding a event key and calling my function that calls Play on the timeline it does nothing

#

it works fine if I press simulate in the Play Options but not in the playback of Sequencer

dawn gazelle
#

From what I've seen mucking about with the sequencer, you won't see the effect until you actually render the cinematic, as changes to light intensity does not appear to be previewable while using the sequencer

cinder laurel
#

How do you get objects reference of the object spawned by sequencer in level?

dawn gazelle
cinder laurel
dawn gazelle
meager idol
#

Hi, any idea how i would create a game pause while holding a key down? Kinda like in Dishonored or other immersive sims where you can choose a weapon/equipment while the time is stopped.

My initial approach is this and it seems the moment I pause the game it suddenly stops reading inputs, is there a way to change/get around that?

lapis path
meager idol
#

What exactly would that do? Slow down time for everything but not for the player? Would not that make player for example fall while everything else is stopped?

lapis path
meager idol
#

But i don't want the actor to move at different time speed then the rest of the environment, would then just setting the inventory/menu widget to normal time dilation?

#

Sorry if that sounds dumb, but unreal node documentation tells me basically nothing >.>

cinder laurel
#

I was following that tut to spawn objects in level

lapis path
meager idol
#

I have not yet gotten to that part, started from the pause mechanic

#

But probably the same way any pause menu would be spawned, not sure yet tho

dawn gazelle
#

There's an option you can set on the input axis. Same goes for any other inputs you may want to use on the player controller or character.

lapis path
#

This could help you though. Actors have the ability to tick even when game is paused.

#

I can confirm cursor is not affected by pause

meager idol
#

Yeah, the camera does not seem to be affected by time dilation either for some reason

dawn gazelle
#

You want to use "Execute when Paused"

lapis path
#

can you show your click/release setup ?

meager idol
#

This is the click/release, i just mapped the button(s) to an axis mapping and whenever the axis val is not 0 it should keep the game paused

lapis path
#

Which axis do yo use ?

meager idol
#

Not sure what you are asking but this is what i ave in the input settings

lapis path
#

Imo prefer using an input event (button) pressed/released

meager idol
lapis path
#

Yeah that's not the good way imo. Use Action Mapping with Q or E. This will create an event with "pressed" and "released" exec outputs.

meager idol
#

Oh

#

I am dumb lol, just realized that the "released" pin exists

dawn gazelle
#

Even still what you were doing would work. You just need to set the input to "Executes while paused" and it would work.

meager idol
#

Yeah, but I am gonna use the time dilation because it just looks cooler x)

lapis path
#

(Harder to setup too !)

meager idol
#

Eh, difficulty won't stop me from at least trying

lapis path
#

Good mentality there ^^

fair magnet
#

I wonder... would it be faster to set a variable for a reference or is it "faster" to just to try get pawn owner and then do its stuff ?

dawn gazelle
#

Then right click on your event go to properties, and you can specify the actor/character to the event.

lusty escarp
cinder laurel
dawn gazelle
lusty escarp
#

Custom depth used on the NPC for the outline

lapis path
#

Try deactivate custom depth and check again

cinder laurel
lusty escarp
#

problem still persists

lapis path
lusty escarp
#

Havent got one in the level yet

lapis path
#

where is your post process outline material set up ?

#

could you deactivate/remove it to check ?

lusty escarp
#

The outline is another mesh that is set to the objects mesh and set to an outline material ( I didn't make it, It was part of another project)

lapis path
#

Does the problem persist if you remove or hide this another mesh ? I guess something is wrong with the outline material vs the widget rendering

#

Try tweaking ZOrder on your widget (some positive value)

shadow saddle
#

anyone know how to do the eff in pokemon when u hit the pokemon there is a white flashlight indicates that u hit the pokemon

orchid garden
#

particle effect?

#

sry i don't play pokemon

lapis fern
#

I would say particle effect, yes

orchid garden
lapis path
#

Ok but does it mess up with the text widget even if hidden ?

orchid garden
#

oops my bad you were trying to help @lusty escarp i meant that for him, if the mesh is hidden it shouldn't render in the scene so it shouldn't effect the widget.

lusty escarp
#

yeah found the reason, Thanks guys

lapis path
#

Oh I though that was @lusty escarp writing, my bad πŸ™‚

lusty escarp
#

wonky Tuesdays

orchid garden
lapis path
lusty escarp
#

There was a customDepth Pass on the Main Character which has been enabled by previous developer for some reason, The character never used an outline for themselves, so odd

lapis path
#

Glad you found out though !

shadow saddle
#

something like this

#

cant upload 2nd pic

#

weird

orchid garden
#

yeah some do that

shadow saddle
orchid garden
#

watched a little 'sword and shield' pokemon, and the fight stuff in it is all particles

shadow saddle
#

no i mean

#

how to do the effect

orchid garden
#

battle of hoenn seems to use the same thing

shadow saddle
#

any keyword

#

so i can google

#

im looking for guidance

orchid garden
#

particle effects

#

i'd tell ya more but i haven't used particles yet.

#

there was a free set of them... donno if there is anything that shows how to use them though in it...

shadow saddle
#

which free set ?

frank elk
#

please help someone?

shadow saddle
frank elk
#

i want that the player can take a box to the inventory and than replace it in another place

#

and i dont know how to make this system

shadow saddle
#

what do you mean by "replace it in another place"

maiden wadi
#

He means place it back down in the world.

frank elk
#

like minecraft

orchid garden
#

@shadow saddle in the learn tab of the epic launcher, scroll down to Legacy Samples, and there is a project in there on particle effects

maiden wadi
orchid garden
frank elk
#

not realy

frank elk
#

is 2D game

shadow saddle
#

Many of you have requested a way to leave me a tip so I've created a PayPal and a Patreon.
PayPal: https://paypal.me/reidschannel?locale.x=en_US Patreon: https://www.patreon.com/reidtreharne
Discord: https://discord.gg/PdvudWx
Hello! In this video I'll be showing you how to create the basics for a drag and drop inventory system. If you have any ...

β–Ά Play video
orchid garden
#

so you just want to click on something and have it picked up and follow the curosr, then place in the new spot the player clicks?

shadow saddle
#

i think

#

this is wahat u want

#

drag from bag

#

and put in world

#

ignore the thumnail

shadow saddle
#

click the video and see urself

orchid garden
# frank elk yes

your going to need drag and drop events setup for interaction, watch that video welhang gave you it'll give you the basics of drag and drop functionality.

frank elk
#

thanks i will comeback soon for questions after the video

meager idol
#

What's the difference between Macro and function?

#

Macto seems to be able to have more than one exec output, is that just that?

orchid garden
#

one major difference is a macro can only have one output node, where a function can have multiple return nodes.

dense mica
#

Functions can also return multiple execution pins but its not very possible in blueprint

orchid garden
#

o.O

dense mica
#

Other major difference is you could have be able to use latent functions inside the macro, but personally never tried

lapis path
#

Functions cannot use delay and time nodes, macro can

meager idol
#

Ah I see, MAcro doesnt really have to have exec output/input so i can put just some maths bs into it

dense mica
#

Pure functions also can return variables only

lapis path
#

there is also a difference since macro act just as a big collapsed graph, function is called from another point

orchid garden
#

well... to wrap it up in a nutshell.... a macro is basically a collapsed node you can use inside other functions.

#

hehe @lapis path we both decided to do the quick n' dirty explanation πŸ˜„

lapis path
#

That's how I learned that πŸ˜„

lusty escarp
#

Hey i'm back, How would I bind the PlayerCharacter in a Sequence ? at the moment it is just a SkeletalMeshComponent

covert delta
#

How exactly are the notify Begin and End pins used on Play Montage? Is it triggered every time you hit a notify, allowing you to run something custom that isn't the predefined notify event?

Like an anonymous function or something?

shell rivet
#

hello, how do i make the actor fall, but when touches the ground is destroys itself?

#

and when player touches it it adds a point

#

and also destroys itself

covert delta
#

If the object is simulating physics, gravity will make it fall. No need to add a force.

shell rivet
#

it doesn't have any physics

covert delta
#

Then adding a force won't do anything.

shell rivet
#

or how do i add physics?

covert delta
#

Well, first choose. If it's something that should fall realistically, it wants physics. If it's something that falls gradually at a constant rate you choose, you don't use physics.

lapis path
#

A timeline could do the trick

shell rivet
#

i made spawning

#

and the question is, how to make it fall?

covert delta
#

Ok, and should it float down at a constant rate or should it fall like a real world object

shell rivet
#

at the same speed all time

covert delta
#

ok, then you do not want to use physics

#

for now I would just throw something onto event tick. that says set actor location to be the actor's location + a vector down * speed * delta time

shell rivet
covert delta
#

What you're doing there is spawning a fruit every tick (every frame). That's a lot of fruit.

past girder
#

hi, working on a slide system, how can i go about doing this. Can i just add force and play an animation?

covert delta
#

@shell rivet the snippet I showed should go inside the fruit's bp because this is something each fruit does.

lapis path
covert delta
#

@past girder Add force won't work if it's a character. Characters do their own thing. You want to use character movement -> launch

lapis path
#

That way it lets you call something when movement is ended

past girder
#

k

#

thanks

shell rivet
covert delta
#

I don't think that's a good solution personally, xystrol. It won't work if, for example, the expected end location changes because something that should block the fruit appears underneath it, or whatever surface as originally used to calculate the end location disappears.

lapis path
covert delta
#

@shell rivet That's (Almost) right, except it's probably in the wrong place. What BP is this?

lapis path
#

However end location can be set up dynamically

covert delta
#

Yeah, so spawn the fruit as you're doing in the world blueprint, and put the movement stuff into the candy blueprint.

#

Also, again I'm going to warn you that you're going to spawn an enormous amount of fruit if you spawn one every frame haha.

lapis path
#

That'll make a big fruit salad

shell rivet
past girder
#

But, how can i check if the player is in a slope?

astral fiber
#

Is it somehow possible to select an (Abstract) GenericClass als an Actor in this node?

past girder
#

then i can check the value and add speed

covert delta
#

@shell rivet I wouldn't mess with the tick settings. You can make a loop like this instead:

#

@past girder trigonometry. get the arcCos of the dot product of the normal vector of the ground below and the upvector

past girder
#

ok, thanks

covert delta
lapis path
#

(the variable "fondu new game" has no place there, imagine the output "animation" from button struct as input)

dawn gazelle
#

can you show lower down what's happening? I'm curious where the pins are coming from that are going into your loop and get statements

lapis path
#

oh there are old events for other buttons

#

And tests

#

Note that if this setup works, it won't with gamepad focus (what I'm trying to do, actually)

shell rivet
lapis path
#

@dawn gazelle On tick, the anim runs on loop, not only once

#

So that I tried with a for each loop node

#

But with the "play anim with finished event" it only goes one time forward and keep stuck in that state

covert delta
#

@shell rivet That looks like the same as what you had before? Is this the candy BP?

dawn gazelle
# lapis path updated setup

Well... Your foreach loop is firing every tick, which means the animation would be trying to play every tick, which means the finish probably never gets to fire.

lapis path
dawn gazelle
#

yes, because the loop is starting over again, so it starts fresh

covert delta
#

@shell rivet The candy should not be spawning other candies. That part you can put back where it was before.

lapis path
lapis path
#

as far as I know, "doonce" should only be called once after each "reset", no ?

dawn gazelle
#

But not if the loop starts fresh every tick.

lapis path
#

even on tick

#

haaa I see πŸ˜„

#

well

#

how could I set up such a system so that on any button hover the event is triggered ?

covert delta
dawn gazelle
lapis path
#

yes but I'd set up one event for each button, and it won't take gamepad focusing as hovering

shell rivet
covert delta
#

add event tick. Drag delta seconds into the float input of your float * float node; and drag the exec thread from tick into the set actor location.

shell rivet
#

emmmmm

#

@covert delta

lapis path
covert delta
#

@shell rivet Make sure you've set a default value for fall speed.

#

click it in the variables section, then in the details pane, scroll down to default value. Make it something bigger than 0.

shell rivet
#

i know i know

#

it's working

#

thanks for help

#

(and sorry for my bad english - i'm from poland)

orchid garden
#

ur english is fine @shell rivet

covert delta
#

cool. For your other stuff. You're going to want to use Event Actor Begin Overlap, to figure out when you're colliding with a player or the floor or what not.

shell rivet
#

i know that (i guess)

covert delta
#

scroll right. Can't see the whole error

shell rivet
#

ah, i see

covert delta
#

looks like your ui text is doing something weird

shell rivet
#

i didn't changed the castto from character to candy

#

@covert delta i can't get the text from candy

dark crow
#

You would want the points on the character

#

It's better if you get the reference on construct btw

#

And pass the reference with an exposed variable or use Get Owning Player

orchid garden
#

so...
When a player drag and drops a certain item I want to pop up a 'confirm drop' box, then continue with the drop request... but i need to pass several variables from the drag drop event for the 'yes' click, what do you think would be the best way do handle that?

  1. store the vars as variables in the confirm widget
  2. store the vars in the main widget and complete the action on confirm
shell rivet
#

i mean will it work?

#

i want to make something like this:
when it touches ground, it destroys itself
when it touches player, it adds a point and destroys itself

dark crow
#

You could just use an Increment if you just want it + 1

orchid garden
dark crow
#

And at that point it should handle itself being destroyed

#

If it overlaps with anything it destroys itself

#

If your chatacter overlaps it, you get 1 point

#

And handles its own destruction

covert delta
#

@shell rivet the code wont' do anything unless something threads into it (the white execution pins). So for that code you have about setting the points and destroying the candy to do anything, it needs to be triggered by an event. In your case, you want Actor Begin Overlap,

shell rivet
#

how do i need to make this?

covert delta
#

right click, add event actor begin overlap

shell rivet
#

i really need it

shell rivet
covert delta
#

either is fine. I guess I would do it in character.

zealous moth
#

i am late to the party, @shell rivet can you paste what was the original issue?

dark crow
#

You could have in both

#

One for adding points in character

#

The other in candy for destroying itself

shell rivet
covert delta
#

Drag the other actor pin into the cast to candy node

#

as well as the execution pin

orchid garden
shell rivet
dark crow
#

Probs didn't have the points in the character at the time

orchid garden
shell rivet
#

no

shell rivet
covert delta
#

that should be it. If this doesn't seem to do anything, its probable that your collisions aren't set up and the overlap event isn't being recognized. Add a print statement after Destroy Actor to just say "Hello" so you can tell if the event is happening or not.

covert delta
#

Yeah that's fine

#

Both your character, and your candy's colliders need to have the checkbox "Generate Overlap Events" ticked.

orchid garden
#

always a good idea to untick 'log' on the printstring for objects in ticks.

#

i flooded the log once and made unreal crash with a tick printstring lol...

shell rivet
#

i know

#

it works again

orchid garden
#

on the actor capsule if they have on, if not, on the mesh they colide with

shell rivet
#

one more thing, when it touches the ground, it needs to destroy yourself, how do i do this (sorry for taking everyone's time - i'm bad in UE)

worthy frost
#

you want OnHit

#

and detect if the hit is not the player

#

then destroy

shell rivet
#

@covert delta can you help me? again

orchid garden
#

was looking at a game "building survival game set in the steampunk era where humans and technology meat."

er... i hope not lol πŸ˜‰

#

always check your spelling both in the game, as well as for descriptions πŸ˜‰

#

so back to my question, would it be optimal to pass the vars and store them to the 'confirm box' then have it execute a event to handle the 'yes' click after?

shell rivet
covert delta
#

go to your candy and make sure "Simulation Generate Hit Events" is ticked.

#

Then add Event Hit

#

Drag "Other" out and try to cast it to your character. Drag the Cast Failed pin out to Destroy Actor.

This goes on your candy BP, and is basically saying if it hits anything besides the player, destroy it.

shell rivet
#

it doesn't works?

covert delta
#

is this in your candy bp

#

and did you check "Simulation Generate Hit Events" for your candy collider?

shell rivet
#

yes

#

and it just moves throught the floor

dreamy ice
#

is using an actor projectile as a bullet the best method of creating guns or should I do line traces?

#

If I do line traces I can't add gravity to the traces

trim matrix
dawn gazelle
trim matrix
#

When printing the length, always reports 0 items in array

#

It was working before, not sure why isn't now though.

Thanks in advance

dreamy ice
trim matrix
#

It's being run from a child class of the parent Actor yes.

#

It's a light switch, that toggles all found lights basically.

#

Would I need to make the array from the level bp and then toggle all those collected lights on interact from the switch?

dreamy ice
#

I would create the array from the level blueprint, yes. Just as a personal preference.

trim matrix
#

I will try that, thanks!

shell rivet
#

@covert delta so what?

covert delta
#

set the collision preset to overlap only pawn

trim matrix
shell rivet
covert delta
#

@trim matrix that implies it's not finding anything. ARe you sure your level has spotlights?

trim matrix
#

For sure yes lol

covert delta
#

that exist when begin play is called?

dawn gazelle
trim matrix
#

I had this working before from the actor, and on restart, doesn't seem to be broken.
And yep, they're existing before begin play.

trim matrix
#

When doing it from the actor, it still reports 0 spotlight components found.

#

:s

covert delta
#

@shell rivet add a print statement to it. does it print anything?

#

add it to the event hit directly. forget the other code

trim matrix
#

Could this be an issue with the latest version of the engine? 4.26 (release)

covert delta
#

@trim matrix you're aware you're looking for spotlights on the actor that's calling this right?

trim matrix
#

I'm getting different solutions here, haha.

Okay, so when it was with the switch actor before, the lights were just placed components, they weren't children of the switch, and it was working.

Since then, I was told to generate the array from the levelbp.
I will change that back to the actor, and add the spotlights as the children, and see if that works. :)

shell rivet
maiden wadi
#

@trim matrix I haven't read the full conversation, but the reason that doesn't find lights in the map, is because when you add a light to the map, it's actually an actor of a specific type with a light in it that has the component, the component isn't added directly to the map. So you need to use GetAllActorsOfClass and look for SpotLight actor class.

dawn gazelle
#

You can't use "Get component by class" as that is looking for components attached to the specific actor. So unless those lights are attached to the actor the code is running in, it won't get a reference to them.

Using a light switch actor gives you fine control of specific lights you want to turn off and on, and can fairly easily be changed in the editor.

If you wanted to control all lights of a specific class in the scene, then you should be doing a light switch actor anyway, and then have it get all actors of class. You can do this multiple times to build up an array that you control. Though this can work in the level bp as well.

fading raptor
#

Im having trouble getting my enemy to replay an animation montage as long as it is colliding with a box collision

trim matrix
#

Okay, I will try it, thank you both Authaer and Datura.

I see the difference between them now :)

fading raptor
#

I dont see what the problem is, I set a boolean to check if the enemy is in the box collision, but for some reason the montage only plays once

shell rivet
#

@covert delta so?

covert delta
#

ehhhh. idk. Let's doing overlaps again I guess.

Go to your candy. Set the collision preset to overlap all dynamic. In your code, rather than doing Event Hit, do Actor Begin Overlap again.

trim matrix
#

Using the component as class, and adding lights as a child component, finds the lights fine, but doesn't provide any access to the visibility function.

Using the get actors by class, doesn't find any spotlights at all, including those as children or placed as placed lights within the map

dawn gazelle
#

Mebbe your montage is longer than you expect as well? Check the float value coming out of the montage play node.

trim matrix
#

No lights found.

#

I really appreciate all of you taking your time to help us, thanks again.

dawn gazelle
#

You have spot lights in the level?

trim matrix
#

Yep

maiden wadi
trim matrix
#

I will try restarting the engine

maiden wadi
#

That's...odd.

trim matrix
#

Okay, works now.. How weird!

#

Thank you very much! :)

maiden wadi
#

4.26 may be the first version I don't dive headfirst into. :/

shell rivet
#

because when overlaps the player it prints the string

spark steppe
#

could hurt tho

trim matrix
#

Yes, I already had issues with splines vanishing, the world outliner not finding any actors at all, random freezes and other issues, which I have sent reports for when it crashes etc. :')

shell rivet
#

and when i close the preview is sends errors

trim matrix
#

I shouldn't have been so eager to upgrade the version :')

maiden wadi
#

@trim matrix C++ UInterfaces don't show up in searches either.

#

Can only see BPIs

covert delta
#

show me your code

#

koko

trim matrix
#

Has it always been like that?
I was thinking of doing more stuff with C++, since blueprints seem overcomplicated vs. programming (which I have done for a few years as is).
I wanted to try using bps, as I thought it would be a faster way to prototype ideas.. haha

shell rivet
covert delta
#

and that doesn't trigger when it hits the floor?

shell rivet
covert delta
#

drag out Other actor and try to cast to the character. If the cast fails, destroy the candy.

#

I think the problem is both the character and the candy are trying to destroy the candy.

maiden wadi
#

@trim matrix Blueprint is definitely better for prototyping beyond a doubt. At least in most cases. I don't know what they were trying to do with 4.26 that messed UInterfaces up, but hopefully they get it sorted, because I really want Chaos and the water stuff. But as for the interfaces, This.

covert delta
#

white pin needs to go to cast to sidescroller

trim matrix
#

I see, how weird, do you know if a report was sent to UEDevs?

maiden wadi
#

Note that they still work, you just can't use the class like that to check if something implements the interface. I had to write a custom function for specific interfaces to test against rather than one function. Decided to go back to 4.25.4

covert delta
#

from the event

maiden wadi
#

I bug reported it. We'll see. πŸ€·β€β™‚οΈ

shell rivet
trim matrix
#

Smart idea with the function actually, but yeah, kinda odd, afaik, there was no changes with interfaces or the outliner, so not sure how they broke that.

covert delta
#

yeah

shell rivet
covert delta
#

np

regal venture
#

Can someone point me in the direction of resources regarding playback of audio from the PS5 DualSense controller from UE4 audio?

fading raptor
#

@dawn gazelle The print string works fine, you were right about the montage length. However now the problem is that only some of the AI's attack multiple times, even though they all have the same BP

#

It doesn't print a false string when they attack only once so im kinda stuck

dawn gazelle
#

are they using different montages?

fading raptor
#

No, its all the same, I just duplicated the AI's into the map

#

Strange, now I noticed it prints false enough though the AI is still in the box collision

#

It prints it only after one attack

deep warren
#

Hi, I'm trying to spawn an actor attached to another actor component from a client trough replication using a "Run on server" function, I can't understand why it spawns only on server, if I use multicast it spawns only on client

#

Can someone help me?

covert delta
#

make sure your actor has "replicated" checked off. Otherwise when the server spawns it, it won't try to do so on the client.

#

Run on server is the correct choice. Not multicast.

deep warren
true kiln
#

Hello guys, I'm trying to update animation on my skeletal mesh but the problem is if I try to read the socket location & rotation in the same tick, the new animation is not updated and my item goes to the wrong place... is it possible to fix this problem or I had to update the location after a delay somehow...

random hill
#

is 4.26 officially out?

dawn gazelle
vast lion
#

Why is the max float number I can store in a BP 17,283,256,262,359,777,280?

#

That's not even close to the max float value

dawn gazelle
#

lol

hybrid lodge
#

Hey, fellas has anyone merged successfully Horror mechacnis with ALS system?

dawn gazelle
#

If you're trying to store a number like that in a float, you're not understanding how floats work. Try entering in 20000.01 and see what happens.

worthy frost
#

err

#

max float is 3.402823466 E + 38 hmm

dawn gazelle
#

The issue being, floats are 32-bits. 32 bits can only store 4,294,967,295 individual values.

#

trying to store exactly 17283256262359777280 in a float is not going to work.

#

err

#

I should say...

#

17283256262359777280 will work, but try storing some numbers that are slightly less.