#blueprint

402296 messages ยท Page 545 of 403

celest oar
#

do it once and its done forever

blazing wasp
#

how do i control which pawns spawn for each specific player start?

twilit heath
#

override HandleStartingNewPlayer in GameMode, do not call the Parent, and spawn them mannually

hoary orchid
short coral
#

Hello there , can anyone help me with something on world composition? I want to have a smaller part of a sublevel to be visible in certain area , i thought about using level streaming volumes but i don't think i can since i'm using world composition , do you guys have any ideas i can use to solve this?

blazing wasp
#

@twilit heath so i spawn the actors by class... now what? they need spawn transforms and i need to possess them

twilit heath
#

you want different class Pawns for different PlayerStarts

#

that is not out of the Box functionality

#

so you need to stop unreal from spawning the default pawn

#

and do everything else by hand

blazing wasp
#

yeah i have default pawn set to None

#

but i dont know how to wire my players to these pawns that i'm spawning manually

twilit heath
#

one of the simpler ways is to derive a class from the PlayerStart, put in a Class variable for the Pawn it spawns, then Cast the ChoosePlayerStart result and pull it out for the SpawnActor

#

PlayerControllers also cache their StartSpot by default, and ChoosePlayerStart returns the cached one by default, instead of making another search

#

so you can assign the classes from an array on the fly, depending on what you want to do

blazing wasp
#

ok trying some stuff

#

thanks

#

sorry @twilit heath i guess i'm still not understanding how all this ties together

#

i've created a custom PlayerStart with MyPlayerCharacter class stored as a variable

#

i override BeginPlay and spawn my actor

#

oh, that just creates 2 copies

#

yeah no idea

rough wing
#

I came across this tutorial that adds delays to loops thought you might want to take a look

late marsh
#

ty i shall have a look

low lava
#

surely UE4 has a built in Look ahead Camera system for 2D games like Unity has ?>

#

this dude goes on to using 14 Branches to acieve a look ahead system that unity has built it?

rough wing
#

Ue4 doesn't specialize in 2d

#

Like at all

#

It sucks

#

But you can attaxh a spring arm and add offset so where ever the character is looking the offset makes the camera drag towards that side

low lava
#

Ya I was thinking of doing that, but I'd be cool if it can transition smoothly to the offsett

#

like when the D key is pushed and the character starts it's motion animation have the offset add up to the total smoothly

earnest tangle
#

You could do that fairly easily by interpolating the camera position

#

eg. you have a "camera target" which is by default locked to the character, and it keeps interpolating itself to the camera target

#

when you start moving, you then move the camera target to where you want the camera focus to be, and since the camera is constantly interpolating its position to the target, it would then smoothly move to the new position

rough wing
#

The lag option does exactly that

#

Set max distance and speed

low lava
#

Okay. That sound fairly simple, but for someone currently learning blueprints that seems super complicated to achieve. Can you drop a link or nudge me in the right direction please. @rough wing you can't go in the negative with the camera lag. so the lag is always behind you and not infront of you

strange junco
earnest tangle
#

doesn't seem too bad, you could probably organize it a bit more cleanly with maybe some comment boxes around individual groups to make it easier to navigate too :D

gusty stump
#

Yeah comment boxes is really the only problem I see, you could also use some reroute nodes to orginize the lining a bit better

strange junco
jade gull
#

anyone got any useful info about making a mystery dungeon type game in blueprints?, not having much luck with googling

earnest tangle
#

you'll have to be more specific than that

#

I for example have absolutely no idea what is a "mystery dungeon" game :D

gusty stump
#

yeah i was thinking that same thing

haughty ember
#

lol same here

rough wing
#

It's a mystery

maiden wadi
#

Pretty sure they just mean randomized dungeons.

gritty elm
#

how to get player controller in multiplayer?

#

it reutrn at 0 index, but i want to get player controller for clients

maiden wadi
#

@gritty elm That highly depends on which machine you run the function on.

#

On the server, player controller 0 is the first connected. In a client, it's the client's controller.

jade gull
#

sorry, a Mystery Dungeon game is a dungeon crawler thats sort of turn based, movement takes a turn, attacking takes a turn etc

#

usually procedural maps hence the mystery part

gritty elm
#

how i get reference to player controller for client

#

@maiden wadi

#

how i set show mouse cursor in client?

gusty stump
#

@jade gull first step is to make your game play on a static level you use for testsing and stuff, and then make the dynamic levels.

#

If the dynamic level is specifically what you are asking about then do a google search on the "carving out" method used to make random dungeon map

#

maps*

jade gull
#

i have so far made a procedural tile floor and a character that moves 1 tile at a time but is loopable

gusty stump
#

Thats a pretty solid start. I highly reccomend not developing on a dynamic map though.

jade gull
#

am mid watching an old unreal livestream about procedural generation that im hoping would shed some light on adding the walls etc

#

i'm not really sure how to go about the turn based thing either =/

earnest tangle
#

You can toggle whether the player can interact with their characters based on a boolean

#

So when the player ends their turn, you toggle the boolean to false, and then perform any actions that need to happen

#

Once it's the player's turn again, you toggle the boolean back to true

haughty ember
#

You might want to use an int instead of boolean though, if others needs to know who is currently playing

jade gull
#

what i have in mind is an actor for managing turns that interacts with a master "Things that can take Turns" blueprint, since its more of a single player thing the turns will fluctuate dependant on stats etc

gusty stump
#

Use both an int and a boolean if in multiplayer

#

one for PlayersTurnId and IsMyTurn

#

even if the PlayersTurnId is the players id and the IsMyTurn is turn, thats ok, the flexibility of using both out weights the small amount of redudantness

haughty ember
#

@gusty stump what do you gain from having a bool with an int and not just an int?

earnest tangle
#

you could quite easily just make a function to check it so you wouldn't need a bool :)

gusty stump
#

You want both because you use a int to tell when its anyone elses turn and the bool to tell when its your turn. In single player game you could most likely ditch the bool, but in a multiplayer game you let the server have control over the int and the client have control over the bool flag and only if both match up do you let the player take a turn.

#

in a single player game you might want ot use a bool so that you could allow a player to interject a turn into a place because of game mechanics

earnest tangle
#

I mean you could just check if turnInt == myPlayerId

haughty ember
#

client shouldn't ever control decisions, just the servers. so no reason for the bool

earnest tangle
#

so the bool is very redundant

gusty stump
#

say its suppose to be orc orc player in the turn order but player has the butt in ability and so he butts in after orc 1s turn and gets to set his my turn flag turn but maybe not advance the index variable

#

Sure guys go ahead and feel the way you want.

jade gull
#

that is an interesting idea

earnest tangle
#

I mean you can always find features that would necessite additional variables to be used :)

gusty stump
#

Develop the game system and get back to me on it :0

#

:)*

jade gull
#

so even though it hasnt reached his index it would still get a turn early cause the bool etc

gusty stump
#

well since I am a proffessional coder who works with designers on a daily basis i tend to opt to flexibility instead of having to rewrite my code every day when someone thinks of some kew new idea if we could only do this

#

and two years down the l ine when you think of a kewl new idea if only you would have used both a bool and an int

jade gull
#

i get stuck thinking too much ahead and dont have enough experience to actually make half of it xD

haughty ember
#

@gusty stump I'm not sure I fully understood your example, but I still wouldn't use a bool, and client still shouldn't control it.
Client should send the sever "activate but in ability", and server will set next turn to him. server also needs to remember who's next turn is it after (I believe that's your point), but still no need for a bool here

earnest tangle
#

If you try to predict every new feature you might think of down the line you're going to write very complicated features "just in case"

gusty stump
#

@haughty ember dude you will have tons of variables that are in the client that are set off of server authed variables because of gui and tons of other stuff

earnest tangle
#

@jade gull focus on what's immediately in front of you :)

gusty stump
#

I mean i am currently making a multiplayer game

#

and have developed tons of game systems

#

and can tell you that you really dont have an idea of how stuff works on a client

jade gull
#

yea if i succeed with this game it would be my first xD

haughty ember
#

@haughty ember dude you will have tons of variables that are in the client that are set off of server authed variables because of gui and tons of other stuff
@gusty stump That's no reason to add unnecessary variables ..

gusty stump
#

Sure dude

#

anyway im gonna get back to my game

#

if you bro and broettes need help feel free to dm me

jade gull
#

Have fun, thanks Trixer o/

gusty stump
#

o7

cobalt slate
#

Hey guys! Any chance anyone knows how to "PauseAnims" in the character blueprint, but still keep gravity enabled for that player? When Pause Anims is enabled, the player is paused, which i want, but they are floating, or won't move with an elevator, etc...

true marsh
#

I'm trying the Asset Registry to find CameraShake by class and its not showing? Anyone know if it might go under a different name?

Update: Its marked as a blueprint

sour ridge
surreal peak
#

It shouldn't be an RPC

sour ridge
#

rpc?

surreal peak
#

ExecuteOnServer RPC

sour ridge
#

I just put not replicated? instead of Run on server?
(a little edit, I'm doing a multiplayer game)

surreal peak
#

Do you want clients to freely damage everyone that can get a hold of? No you don't. So yeah, just a normal event.
You should mostly only forward input events, like "Fire my Weapon" to the Server.
Then the Server can do all the rest up until the damaging.

sour ridge
#

I see, thanks for the input. Good to know

vestal plinth
#

how do you add a timeline component to an actor? I can't seem to create one.

gritty elm
#

just add timeline, and the name of your timeline is the actual your timeline component, if you right click after adding time and search for your timeline, you will get your timeline component ref

vestal plinth
#

aha, cheers

#

what is a spline time?

#

no, on a spline

#

is it zero to one? or zero to the number of points? or is there some non-obvious way to set a duration?

near flint
#

Is someone avilable to help me with some problem i'm having? i'm trying for 4 days to fix it

vestal plinth
#

just ask dude

near flint
haughty ember
#

what is a spline time?
@vestal plinth btw, Given a time from 0 to the spline duration, return the point in space where this puts you

vestal plinth
#

there's no way to set a spline duration

#

it's zero to one btw

#

oh shit wait

#

it's in the details

#

you can't access it from blueprint though

#

and nevermind, now you can

#

mystery

#

cool

haughty ember
#

I haven't used splines much though, just reading the docs back to you tbh :p

heady jay
#

I've been trying to make a multiplayer spawning system, but when I run it, only one player is able to control their pawn. Additionally, for the rest of the players, their view is of somewhere completely different than the spawn location, but the actual pawn is spawned in the right locations. Here is the blueprint function: https://blueprintue.com/blueprint/f01eupz_/

If you have any resources that may help with my issue or any ideas on the cause, let me know.

vestal plinth
#

nobody reads the docs man

haughty ember
#

yeah usually I look at the source, but my IDE is closed

vestal plinth
#

๐Ÿ˜‰

#

hmm

#

so my problem is, when I set the timeline duration to match the path length, all it does is make the timeline longer. that last point in the curve still stays at 1.0

#

so I tried using GetPlaybackPosition to just get the time elapsed and use that like a linear curve

#

it still behaves the same though

#

the debug dot traces the path for a second to the second point then vanishes and doesn't complete the spline

#

actually, it always runs for a second. it doesn't reach the second point.

#

I guess setting the timeline length isn't working

#

ok, worked it out. the actual curve stopped existing after the last point so the timeline stopped running, no matter what the length was. so I just made the curve a minute long and it uses whatever part of it that it needs.

#

it's still ignoring SetTimelineLength and trying to run for the full duration of the curve inside it

#

I can work around that

vestal plinth
#

how do you guys handle banking with a spline mesh?

#

construction scripts don't act like I remember them doing in the past. if I edit a component's location or rotation directly on the actor it still uses the CDO value in the construction script, making them a bit useless as instance controls.

trim matrix
#

How can i make a movment blueprint for a blender model?

#

I cant make a blueprint on it.

haughty ember
#

@trim matrix make a new actor asset, add a static mesh component, and assign the blender mesh to that component in the properties window

still bramble
#

what the fric is this

mortal nacelle
#

Has anyone had an issue with a public struct on a BP actor not being modifiable on copies of that BP in the World Outliner view?

#

I added a new enum field to my struct and when I click the drop down to modify instances in the world, it won't accept the change (resets to default every time)

#

Actually, I even created a child instance and modified the struct fields on the BP itself, dragged it into the world, and it still wants to use the default value instead of my selected value.

zealous moth
#

@trim matrix it needs to be a skeletal mesh; is it?
@still bramble you have no font, so it defaults to a pink filler
@mortal nacelle no, but can you show how you modify it? is there a construction script in the actor?

still bramble
#

ok thanks

mortal nacelle
#

@zealous moth ah yes, there is a construction script. i'm modifying something from the store, so yeah I didn't know to look there. thanks!

#

i have an instance of the actor in my level. then I click it on World Outliner => Details Panel => Find struct field, click enum field drop down and select a new value

#

it doesn't like this

zealous moth
#

@vestal plinth set timeline length is not what you thin it is imo; try using Lerp nodes instead?

#

@mortal nacelle can you show me a screenie?

#

of the struct and your actor

vestal plinth
#

@zealous moth ok, cheers ๐Ÿ˜„

marble tusk
#

@mortal nacelle how are you modifying it in the construction script? My guess is you're accidentally setting everything else to default at the same time

zealous moth
#

you cannot set a hard-coded value already set in construction. construction overrides it unless there are specific fall back conditions

marble tusk
#

I'm just thinking they might not know about hiding pins on the Set members in struct node, and so might be setting the entire struct rather than just the value they're wanting to change

mortal nacelle
#

So this is not even trying to modify the field in the editor. Just on a BP itself. You can see EquipmentSlot is None for the world instance of this

#

It probably is Construction script related though. Because once I play in PIE, I can modify the field as expected. Which, I'm guessing, does not execute construction scripts anymore.

#

I think I have two separate problems. (1) construction script or something is resetting my selections. (2) my new EquipmentSlot enum field is not populating when I instantiate an actor in the map editor by dragging it in

full locust
near flint
marble tusk
#

@full locust that variable type is Vector 2D

#

And you can right click -> split struct for a lot of variable types like that one for instance to get the individual X and Y values

full locust
#

Ok thanks alot

mortal nacelle
#

Hmm, my construction scripts don't seem to touch the struct

#

ok, its definitely my construction script because if i disconnect everything from the starting pin, everything works as expected editor wise (changing fields, etc)

#

its kind of weird though, my construction script doesn't modify the struct. it just sets text on a widget...

marble tusk
#

Does it have a parent blueprint that could be modifying it in the construction script?

#

If one of these is part of the construction script, then chances are the struct is being modified in the parent class

#

You'd find the parent class in the top right of the editor. You can jump to it from there

frozen dune
#

For List View, how can I setup the height of my item widget ?

#

I tried to change the actual widget, but it keeps making it bigger than it should be

#

like I would like for each entry to be as small as that box on the side

flat raft
#

There is a stat command for showing you what is currently loaded into memory, and how much memory is being used. anyone know those commands? I knew them, but now when I need them, I can't remember what they were. ๐Ÿ˜‚

zealous moth
#

@flat raft stat fps stat unit stat rendering

#

and so forth

#

@frozen dune you can wrap it in a size box

flat raft
#

Found it here... obj list

frozen dune
#

@zealous moth you mean put a size box in my entry widget ?

zealous moth
#

i think so :x

frozen dune
#

the skill list itself only has this

mortal nacelle
#

@marble tusk yes, I followed it to the parent (through like 3 layers of inheritance lol). seems to be something in the parent BP because that is the construction script I disabled to restore behavior in the editor, although nothing is setting any fields on the struct that i see so far...

zealous moth
#

oh, no , try in the actual list item

frozen dune
#

I did tried, but the list itself becomes small rather than each individual item

#

and the widget item I am using does have a static size

mortal nacelle
#

it does call the getter of that struct field, but thats about it. would that be enough somehow? no right? it should be setting somewhere if i am seeing it overwritten

#

ok, this is interesting. the base class function is overridden by an event on the eventgraph? this seems to be the issue

#

why does Change Item (Target BP Base Item) actually call an event on the subclass first? is that because BP treats all function calls as events under the hood?

#

I would have expected InventoryItem to have an override method for ChangeItem() if this was a normal coding language

#

anyways, this is definitely where the original author was setting my struct. they take the ID and look it up in a data table and then reset it from that ๐Ÿคฆ

wispy star
#

Greetings. Is it possible to make array of Foliage Types in HISM instead of Static meshes? (FT stores the materials too)

fossil thistle
#

This is part of my code to fire a projectile. When I try and fire it though, nothing appears in the world. No actors, nothing. If I do wonky stuff with adding vectors, then the projectiles appear but it does not stay consistent with the player movement. How do I fix this?

#

the goal here is to spawn the projectile at the center of the screen instead of at the barrel of the gun btw

#

changing the collision override to always ignore does not fix the problem

hazy basin
#

try disabling the collision on the model for your projectile and see if that helps

cobalt slate
#

Hey guys! Any chance anyone knows how to "PauseAnims" in the character blueprint, but still keep gravity enabled for that player? When Pause Anims is enabled, the player is paused, which i want, but they are floating, or won't move with an elevator, etc...

chilly jetty
#

is there a way to get a camera to ensure it always has 2 objects in its view no matter the distance?

tranquil gorge
#

@chilly jetty you mean like zooming back and forth like a fighting game depending on the distance they are appart ?

chilly jetty
#

yeah

#

or like in DMC5

#

when you lock onto a target and no matter how far away you are you both are in view

tranquil gorge
#

hmm im thinking about it

rough wing
#

I've done that

#

Get all characters you want to include in the view

#

Add locations

#

Divide by number of actors

#

Set camera loc

#

Or something like that I can't remember much on top of my head

#

@chilly jetty

chilly jetty
#

will try that

rough wing
#

Oh wait I just remembered some more

#

I think I was only getting the largest and smallest amounts of x y and z

#

and then dividing and setting

tranquil gorge
#

hope you can figure it out mono bc i have only a clue yet but no solution.

#

i dont know if there is a way to use the "Get Distance To" node and the "Get delta World Seconds" node to get the float distance to the other actor and compare it with a greater than or less than value to another point in times distance; making the value an increase if there was a greater number than the other point in times value (get delta world seconds; subtract 0.1 to represent the past). Then vis-a-vis to store a variable decrease in distance to the other actor.

#

@chilly jetty @rough wing sorry if that doesnt make sense thats what i got to

#

i can try to explain it better if need be

#

that hypothetically would allow you to track the increasing and decreasing values of distance to each other at least

#

after that you can use that variable to manipulate the camera

rough wing
#

I mean you dont need to track increasing and decreasing distance

#

you just get it and set camera location

#

you dont need to track anything else

tranquil gorge
#

how do you get it

rough wing
#

the way i explained it

tranquil gorge
#

so they have a node for that is what you are saying

rough wing
#

GetDistance

tranquil gorge
#

hmm ok thanks

#

btw i had a question about this blueprint when trying to get my character to align to the surface of faces of geometry while walking/running

#

the array that says world static

#

how do i get the world static option for my make array node

willow tendon
#

is there a way to get a range of static meshs for "adding static mesh component* to an actor by name?

#

or would it be better to just add all the static meshes to the actor and unhide them when needed?

thorny marsh
#

For Loop?

willow tendon
#

ew

#

well i suppose i could.

#

in construction

#

hmm

thorny marsh
#

How many SMs are you talking about?

willow tendon
#

but you wouldnt be able to pass any kinda name parameter to say which mesh you wanna pull

#

bout 70

#

possibly more later

thorny marsh
#

Once the SM component is created you can also set its Mesh etc programmatically.

willow tendon
#

oh tru

#

that might be better

#

then i can just make the name a public var

#

i think too non-procedurally sometimes

thorny marsh
#

๐Ÿ‘

willow tendon
#

thanks mang

thorny marsh
#

NP

willow tendon
#

probably still need a for loop in my construct tho to pull all the names and make an arry tho

#

and im also an idiot

#

DONT SAY IT

#

i know what youre going to say

#

lol

thorny marsh
#

... Yeah that

#

lol

willow tendon
#

hahaha

#

im new.

thorny marsh
#

All good ๐Ÿ™‚

willow tendon
#

pew.

#

now just attach that to On Tick and im good!

#

i got jokes.

thorny marsh
#

Your going to tank your FPS calling that on tick lol

willow tendon
#

๐Ÿ˜›

thorny marsh
#

Haha ok

#

All you would need to do now is just use a ForEach loop on that Array and set the mesh after creating the Component.

willow tendon
#

nah

#

get copy

#

set index from other thing.

thorny marsh
#

๐Ÿ‘

willow tendon
#

only selects one mesh

thorny marsh
#

Ah

willow tendon
#

we good ๐Ÿ˜„

thorny marsh
#

No worries

willow tendon
#

selects different backplates

thorny marsh
#

Nice

willow tendon
#

yeah. eventually ill tie in a nice animation transition for that

#

just wanted to get the basic idea in first

thorny marsh
#

Looks good.

willow tendon
#

oh one mroe dumb thing... does UE have some kinda math operand thats like an int count with a range / loop?

#

could use use a rand int too i guess for testing

#

just curious

thorny marsh
#

Array->Length

willow tendon
#

so event timer to an int++ count loop at max 70

#

etc

thorny marsh
#

There are many rand implementations

#

Maybe i misunderstood what your asking.

willow tendon
#

lemme sketch it out

#

ah okay i see a problem here

#

keeps adding.

#

derp

#

guess just cast newmesh to a var

#

but yeah

thorny marsh
#

Oh right, yeah you want to save the StaticMeshComponent to a variable, the next time you want to change its Mesh, just set a new one, dont recreate the Component.

willow tendon
#

yeah

thorny marsh
#

Your missing the -1

willow tendon
#

yeah was about to add.

#

just w/e for testing

thorny marsh
#

Since Arrays in UE4 are Zero indexed

#

Fair enough

willow tendon
#

yerp

thorny marsh
willow tendon
#

ya i just did it this way

thorny marsh
#

๐Ÿ‘

#

That works to

willow tendon
#

soory, just a question, are there advatages to say putting the 'make static mesh compenent' in the construction script vs. the event?

#

theres gunna be more stuff to do other than just make a component... so im just curious if i should be building things in construct

#

that just init things

thorny marsh
#

If you do it in the construction script it will run everytime the Actor changes, even inside the Editor.

willow tendon
#

hm

thorny marsh
#

So for example, if you were to drag around the Actor within the Scene, the construction script will run alot.

willow tendon
#

oh

#

my logic would say a construction script means.. do once.

#

like period.

#

heh

thorny marsh
#

Yes, however the Editor is different.

willow tendon
#

i see

thorny marsh
#

That is true for Runtime

willow tendon
#

ah

#

okay so then its not so bad

thorny marsh
#

Editortime is different

#

Running it in the construction script can cause you to easily tank your fps if your not careful.

willow tendon
#

right.

thorny marsh
#

Especially when your programmatically creating Components

willow tendon
#

for safety ill just leave 'make' things in the begin play before any events.... then let the actual programmer sort out what goes where.

#

heh

thorny marsh
#

For simple BP stuff, you can get away with ignoring the Construction Script

willow tendon
#

im more of just a generalist on the whole project.

#

idea is to just prototype things for the other team

thorny marsh
#

Fair enough.

willow tendon
#

makes life easier when illustrating what you want vs trying to explain it

thorny marsh
#

For sure

#

BP is good for iterating on design

willow tendon
#

so ive noticed

#

alot of this will likely get nativized to C anyway... well .. the heavy dumb shit anyway

#

not my problem tho

thorny marsh
#

That makes it easy then ๐Ÿ˜‰

willow tendon
#

still good to learn

deep elbow
#

Anyone knopw why adding a sphere component that is just set to overlap dynamic, would cause a pawn to be unable to move

vivid saffron
#

Guys, why UE4 stores savegame files in different locations if you package with "developement" and "shipping"?

#

Shipping also makes them available to clients very easy... so they can hack them

glacial eagle
#

They can "hack" them anyway, doesn't matter where it saves them

formal forge
#

Vehicle component doesnt have engine stats exposed with realtime editing why is this...?

ashen sparrow
#

Canโ€™t I use delay in a BP-function?

deep elbow
#

no

#

if you have a delay in a function then it probably shouldnt be a function. you can use a macro, or if you are using a fucntion to collapse a bunch of nodes to make it look clean you can use the 'collapse nodes' right-click option to 'hide' a bunch of stuff in a small clean package

#

function is suppose to be calculate something and return it immediately - like get all actors called Robert and sort them by distance. no delay required etc#

ashen sparrow
#

Got it! Thank you ๐Ÿ˜

harsh coral
#

Hey guys, I need to control several CAD objects via blueprint, so the client can have them fade in and out. Is this possible WITHOUT a material solution? The CAD objects are quite complex and consist of 20 materials each.
I have no experience in blueprints, so before I go on a google rampage, maybe you can tell me if its even possible...

deep elbow
#

gut instinct is it's not possible without a material - you can create a global material parameter collection to control multiple materials from a single value set in a blueprint though

#

have you tried a low cost solution like just scaling the objects down over a short time using atimeline or something - that would give you some form of animation so it doesnt looks too cheap etc

harsh coral
#

The client wants fade in...

#

Iยดll look up global material parameter collection and how to use them in blueprint then.

#

My colleague was suposed to take care of the blueprint part of things, but he is out sick...:(

deep elbow
#

maybe parameter collection would be a bit annoying as you would need individual parameters for each object - might not be easy to scale it up if you have dozens of objects.

harsh coral
#

Canยดt I use the same global material parameter collection for all materials that are referenced by all objects?

#

Fortunately all objects use the same set of material instances.

deep elbow
#

it might be easiest to create a material function that has some parameter like "Opacity" feed that into DitherAlphaTransparency - put that into every single material - you hopefully have a master material and use instances as that'd speed things up.

#

add the top stuff to construction script, and then trigger the fade in or out in the event graph

#

as long as each material has a paramater called Opacity it'd work, just have to set it up in materials

harsh coral
#

Yeah, all material instances of one master material. Except for one material, that is refractive, for that Iยดd have to have a different solution I guess.

#

Thanks for the suggestions, Iยดll look into it.

deep elbow
#

can still use the same setup, just need to have opacity parameter in the material - you could have the opacity parameter drive a lerp between full refraction and default refraction, would turn out alright

jade gull
#

i'm getting a weird issue with the tile based movement i've made, it seems to ignore the delay for the first few seconds after the first movement button press and will zoom around instead of moving 1 tile at a time as intended, after a few seconds it does work as intended but i'm not sure whats causing it, any advice would be appreciated

#

thats all thats in there so dont know where its going wrong

#

also any advice on making the contents of that second image better, i know the way i've done it has issues so would like to improve it

earnest tangle
#

Not sure about the delay, but you can treat the movement as two numbers instead of four bools

#

so X and Y, where 0 is no movement, and for example 1 is right, -1 is left for X

#

if you use that method you can then calculate a direction from the numbers, and choose the enum value based on that, which should mean you don't need that much branching

dense slate
#

Hello.
I am new to UE4.
I have a question regarding "camera switch animation" using Blueprints.

Is this the right platform for that?

fallen glade
#

1: inserted with "add static mesh component" in construction script 2: normal mesh

#

Alt+c is not showing collision and traces are not working

fallen glade
#

Could it be because my parent class is NavLinkProxy? How do I fix this? can it even be fixed or I've done goofed?

ancient stag
#

I'm getting an error that the variable "Dynamic Material Instance" accessed none trying to read the property. I did initialize the dynamic material instance.
I do change the element index and target mesh of said dynamic material instance later when the user presses a button. Does that somehow make the dynamic material instance invalid?

late kraken
#

Hello!
I'm creating a mechanic where I need to check if the player is aiming at an object. It did that with a linetrace, it works perfectly but I want to allow that the player doesn't have to totally be aiming AT the object but also around it. I tried to use a sphere linetrace but the results are off. Does anyone already did something like this? What were your approach ?

sharp fox
#

Hello. idk how to create widget for one player on multiplayer. Help

crimson saffron
#

when I press jump (spacebar) nothing happens

sharp fox
crimson saffron
#

oh

#

why doesnt my method work

#

I want to understand so I can avoid making logical errors

sharp fox
#

couse you use character movement to target. you must use character controller for target

crimson saffron
#

oh!

#

ok thanks

sharp fox
#

Hello. idk how to create widget for one player on multiplayer. Help

crimson saffron
#

and how do I increase my character speed while pressing shift?

sharp fox
crimson saffron
#

I cant find the set module

late kraken
#

You need to set from character movement because this is from this component that you can find teh max walk speed

crimson saffron
#

yeah but I cant find it

sharp fox
#

and search max walk speed

crimson saffron
#

ok thanks

fallow fox
#

Hello guys! I want to create a touch event for a mobile game, to rotate an actor. My problem is that the touch is not getting any event only if I'm touching some text or border from the UMG. How can I make the touch to receive events from the entire viewport?

#

If I press on the 'Damage' text and start moving, the weapon rotates

crimson saffron
earnest tangle
#

check if you have crouch enabled in the character movement component

fallow fox
#

Did you checked CanCrouch?

crimson saffron
#

oops x3

#

How can I make a slide? I already got the conditions part working but dunno how to do the rest

#

so far this is what I planned but dunno how to make the position relative to the camera

earnest tangle
#

if you get the camera's forward vector, you can then multiply it by a float to generate force in that direction

crimson saffron
#

oh thanks!

#

adding a force doesnt seem to do anything

#

yay I got it working

ornate cairn
#

hey how would I make a bus move in-game instead of the default player character?

#

the player is going to be stuck in the vehicle. it's not like an enter/exit thing

zinc portal
#

Hi All,
I am working on UI and about to create an ENUM with All UI commands in it.
Is there any reason to not have an enum with a few dozen items?

crimson saffron
#

I was initially scared to start Unreal because of blueprints (I come from Unity's Visual script) but I just realized how easy and intuitive they are

zinc portal
#

Yes they are awesome. I have no coding background and I am astonishing myself all the time with what I can get done.

crimson saffron
#

agreed

#

blueprint nativization is incredible as well

opal stone
#

How do you change you default player pawn during runtime? I have code in the playercontroller that makes it a problem when I possess pawn. I need to change the default player pawn as well. Please @ me so I can see later thanks.

ornate cairn
#

try level blueprint maybe?

haughty ember
#

@opal stone The default pawn is used when the game starts, it makes little sense to change it at runtime

sharp fox
#

Hi i dont know how to make "when player touch triggerbox then". I cant make begin overlap becouse i have this blueprint in Third Person Character and i can't do overlap.

gusty stump
#

3rd person characters can still use begin overlap

sharp fox
#

nope

jade gull
#

@sharp fox you would have to do it in the blueprint the triggerbox exists in, if you just dragged it into viewport that would be level blueprint i think, then you can do the beginoverlap event, keep the box selected when you go into the blueprint then right click

sharp fox
earnest tangle
#

Don't copy nodes from other blueprints

jade gull
#

^

bright dagger
#

Are you able to make a var with type data table?

earnest tangle
#

That's why it's not working

jade gull
#

a data table is based on a struct so the struct as an array would count?

bright dagger
#

yeah was over thinking it lol

crimson saffron
#

guys how can I make my katana animate when I press left click?

jade gull
#

start with left mouse button, then depends how you've animated it

crimson saffron
#

How do I animate stuff inside unreal?

jade gull
#

if it just rotates or something you can do a timeline lerp

#

if its skeletal you'll need to learn animation

crimson saffron
#

its a first person character, hands arent visible

jade gull
#

so floating sword?

crimson saffron
#

ye

jade gull
#

a moment, trying to make an example

sharp fox
#

Someone help. I don't know how to add widget to only one player like health. Someone Help?

jade gull
#

in character, Create widget, From reference, add to viewport

#

or add to hud then add hud in that way

sharp fox
#

yes but i have to do when player go over lap with actor then add to viewport

jade gull
#

@crimson saffron thats a basic tmeline lerp you can use for simple rotation animations or change to location or transform for other types

#

within the timeline is just a float track that goes from 0 to 1 over 1 second to feed the alpha

crimson saffron
#

but how can I animate it?

jade gull
#

that changes its rotation over the time set

sterile light
#

Unreal crashes when i try to select this node to delete it, so I can't delete it. Is there a solution?

normal rampart
#

@sterile light

  1. Your name makes me thirsty for tea.
  2. Are you able to delete the variable itself? Like not the node the whole variable (assuming it's not used much. If it's used anywhere else I'd create a new variable of the same type, run find in blueprints on that variable and replace all of them with your new variable (by clicking and dragging the new var from the left onto the set node. This might crash unreal when replacing the one shown in the screenshot, so I'd try replacing that one first to save time), and then finally delete the L Buff variable. (If you weren't able to replace the L Buff node in the screenshot bc it crashed, replace all the other ones and then delete the L Buff variable even though it'll whine that it's in use.
sterile light
#

There is no variable. I've coppied that code from somewhere else so it makes sense it cant find the variable but I can't delete the set node

#

I've tried creating a variable with the same type and name but it doesn't register them as being the same

#

I guess because the previous var was a local var

near flint
#

MULTIPLYAER | I need to set a nickname on the Main Menu Level, and when i join a session I want the nickname on the Lobby Level will apear on the Text Render above each character.

Any solutions to achieve that?

sharp fox
#

Someone help. I don't know how to add widget to only one player like health.

normal rampart
#

@sterile light Have you tried both LBuff and L Buff (with a space)? Also trying the drag and drop to replace like I mentioned above isn't a bad idea

sterile light
#

Yes tried both

#

@normal rampart I didn't really understand what you mean above

#

All I want is to obliterate that node. Isn't there a way to do that without selecting it?

#

Like delete nodes with error?

drifting mulch
#

Is there an alternative to structs for data management (items, stats) that allows composition or inheritance?
Right now I'm storing every possible item type data struct in one big Item struct and it's getting spaghettier and spaghettier.

sterile light
#

omg

drifting mulch
#

Ideally I'd rather use inheritance so like base item, equipment extends item, weapon extends equipment etc

sharp fox
#

Someone help. I don't know how to add widget to only one player like health. But i must do it in level blueprint

sterile light
#

I just dragged a variable onto that set node and it fixed it

normal rampart
#

That's what I was saying lol

normal rampart
#

Glad to hear you got it fixed. ๐Ÿ˜„

sterile light
#

thanks for the help

sharp fox
#

Someone help. I don't know how to add widget to only one player like health. But i must do it in level blueprint

vast lion
#

Is there a Cast To node that is dynamic?

hidden hearth
#

Is there a way to set a UPROPERTY in my GameInstance from a widget blueprint?

#

I have an options menu but I'm wondering how to get the data out of it and into my C++ code ๐Ÿคช

supple dome
#

@vast lion no, usage? sounds like you want a component/interface

#

@hidden hearth maybe i dont understand, but to set a uproperty in the game instance, just GetGameInstance > cast to your game instance > set property?

vast lion
#

@supple dome Yeah you're probably right

#

The second time I call it the Loaded array is empty

#

Why is this?

hidden hearth
#

@supple dome thanks :)

mortal wharf
gusty stump
#

the problem is your code has refrences to stuff in another map

keen goblet
#

@mortal wharf At first glance, that looks like it's saying that its level BP contains bad references, specifically refs to actors in the map from which it was duplicated. If that's the case, replace the refs

gusty stump
#

you need to go into the editor and change the references to ones on you rmap

crimson charm
#

so in my fps i have set up my rifle to attach to the right hand via a socket on begin play in my character. the arms are "static" and are just in one position, but will move for animations like reloading.
How would i go about making it so the arms would change if i were to say equip a pistol?

void oak
ashen sparrow
#

Is there a smart way I can make this work in my Animation BP? Basically what I want to achieve is using a certain aim offset depending on if the player has a rifle or a pistol equipped, but if the player isn't in combat mode - use another (or no aim offset at all actually)...

#

So basically I want to switch between two different Aim Offsets but only if certain conditions are met... if none of them are met - don't use Aim Offset.. Can't really wrap my head around the nodes in the Animation BP, I'm kinda new to them still...

trim matrix
#

can anyone help me with rolling this ball slope down

ashen sparrow
#

I've tried doing it like this instead, which works... kind of. It's jittery but it "works". How can I make the Aim Offset more smooth using this method?

lone garnet
#

So here's a tough one. I need help with some array work. Hopefully I dont Overcomplicate this. I want to create a crafting system in which you dont have a given recipe. I have 4 slots. each slot can have an item dropped in it from the inventory. I want to check these slots to search my data table of recipes and see if they match up, then it can output the item to craft.

#

Does this make sense?

#

I have the data table and a way to look through it. I have the crafting slot information array. Just need a way to search the data table for the exact items that are in the slots

void oak
#

@lone garnet use [for each] item in array of "items needed for crafting" [find] item inside of inventory array.

lone garnet
#

but i dont want to find the item in the inventory, I only want it to check the data table against what I've put in the slots. Some of these recipes have 1 item needed for crafting, some require 2-4.

#

how can i 'Find' against multiple items and not just 1 item

void oak
#

with a map

lone garnet
#

I haven't dealt much with maps. quick rundown?

void oak
#

a map is a "heres this key" give me information on it

#

heres this warrior. give me its health

lone garnet
#

and this can be used with a data table?

#

does the data table require one of the variables to be a map too?

void oak
#

no you would have to create the map

#

Im not sure why for each wouldnt work in your case

#

with just basic arrays

lone garnet
#

I think the problem is that it cant narrow down the data. Like I can foreach the crafting slot items, then check if it is contained in the data table. This way it inputs possible recipes, but once I add another item into another crafting slot to narrow down the recipe, it treats it as if thats the item to lookup and not both

#

so I need it to lookup the items in the data table that have all of the items in the crafting slots and not one or the other

void oak
#

If you have the recipies as an array it should be simple

#

something similar to that

lone garnet
#

But I cant be dealing with 'Identical' Because then it requires the items to be in order

#

is there something I can use as an 'almost identical'?

#

like contains but I dont want a contains Item, I need a contains Array kind of thing...

jade gull
#

@lone garnet have you tried using the "and" node and multiple contains if its more than one item?

#

then only return those that match both 1 and 2 (and 3 and 4) as needed

lone garnet
#

@jade gull If I have multiple contains, I would have to have one for every outcome of recipe combinations i think

jade gull
#

yea would need one at end of each branch 4 total but just need a variable that says how many filled slots to guide the branches

#

or selects if you can use them well but i dont know if they are more costly or anything vs branches

lone garnet
#

I have a check which already tells me that there is an item in specific slots. Is the contains necessary if I have that really?

ebon cloak
#

Hey everyone, I am trying to get the triangle/polygon I am clicking on. FaceIndex seems to return -1, what am I getting wrong?

#

I think FaceIndex should return something other than 1 if I am clicking a static mesh object, here, I am not. the mesh lives in a BP as a component

#

so I can get the Hit Component, which I assume would be the mesh

#

not sure how to get the FaceIndex from there on though thonk

#

since the hit result is broken and the face index is fetched before I can get the mesh stuff from the component we are hitting

rocky stratus
#

Has anybody encountered their delegates not binding after casting on mobile? I find it often I need to add a slight delay after casting to a specific class so I can properly bind/access variables

#

I haven't really found stuff about it this anywhere and I was wondering what do y'all do with this "issue"

earnest tangle
#

That sounds extremely strange ๐Ÿค”

rocky stratus
#

Indeed, I have no idea how I even found the "fix"

earnest tangle
#

What does your binding logic look like?

rocky stratus
#

I keep putting stuff in airquotes cuz this is very sketchy to me

#

Let's see, I do a cast to my gamemode to get a reference to a manager and afterwards I bind to that manager one of it's delegates

#

and that bind fails if I don't have a slight delay before the bind

earnest tangle
#

is the manager spawned or in the level?

rocky stratus
#

Ah... it is grabbed on beginplay with "get actor of class". It is in the level already however

#

by the gamemode

earnest tangle
#

It could be that for some reason the beginplays run in a different order on mobile

#

I'm not sure if the order of those is guaranteed

rocky stratus
#

the casting is happening in my menu widget

#

on event construct

#

I would guess the widgets are probably the last of the stuff being spawned/handled

earnest tangle
#

If you create the widget from your HUD's or such beginplay I think that's when they get initialized

#

the construct is called afaik when the widget is added into viewport, so if you build and add the widget to viewport, it probably happens in sequence

rocky stratus
#

Yeah, it is created and added to the viewport within my HUD class on begin play

light glen
#

Hi, is it possible to create a sizebox in blueprints, i can see how to create a widget but not a raw sizebox

earnest tangle
#

Yeah sounds like this could be the problem then if the begin plays run in a different order

rocky stratus
#

I see

earnest tangle
#

I can't really think of any other reason why it would fail like this

rocky stratus
#

weird part is the cast doesn't fail

earnest tangle
#

I'm doing something similar with managers in my game - in my game mode, I have an event I can bind to to check if the managers have been initialized

#

what are you casting?

#

the gamemode?

#

the gamemode itself is immediately available, but its begin play might not be immediately called

#

@light glen use Construct Object if you need to create builtin UMG widgets

rocky stratus
#

I think I misspoke, I am accessing a variable from the gamemode and casting on it

#

I suppose it should fail if it's getting messed up before it

earnest tangle
#

So you're doing Get GameMode -> Cast to MyGameMode -> Get MyVariable -> Cast to Whatever?

rocky stratus
#

yup

earnest tangle
#

Yeah the final cast definitely should fail if the value hasn't been initialized yet ๐Ÿค”

light glen
#

thanks @earnest tangle

rocky stratus
#

I'm doing something similar with managers in my game - in my game mode, I have an event I can bind to to check if the managers have been initialized
@earnest tangle Are you getting a callback from your managers that call your "completed initializing" delegate?

earnest tangle
#

Yeah, I have a "Are Managers Initialized" boolean value in the gamemode, and if the value is false, I bind into the delegate

#

I feel like I could probably do it in a slightly better way by using interfaces and calling a function on all objects implementing it or something but I set that up a while ago and it works so I haven't changed it yet :D

rocky stratus
#

I feel ya

haughty egret
#

Did anyone else find their blueprint diff feature broke in 4.25?

pale blade
#

So I have an ActorComponent: BPC_PotionRecovery. This handles all the logic for potion recovery. Attach this component to any actor.

Then I have an interface: BPI_PotionUsable. Attach this to anything and it represents that the thing can use potions.

I have code that checks if something implements BPI_PotionUsable. Doing this, I know if something can use Potions.

So basically, a character/enemy that can use potions will:

  1. Implement BPI_PotionUsable. (Tell others that they can use potions)
  2. Have BPC_PotionRecovery attached. (Logic for potion recovery)

However, to make things cleaner, here is my idea:
Remove the interface completely.
If I need to see if something can use potions, I'll just see if it has the component attached.

Are there any downsides to not using interfaces in this case? Is there a better way?

void oak
#

This is how you get a list of maps for anyone wondering.

hidden hearth
#

Any idea why Text is appearing as an output instead of an input for a function with signature UFUNCTION(BlueprintCallable) bool validateMatchID(const FText &text)?

#

Nevermind, I forgot UPARAM(ref)

simple berry
#

heya, i need a lil help, basically im trying to set up a direction dash, doom style, and was trying to use the "launch character" node, but every time i try to use it, it warps the player location for a split second but ends up moving them not at all, any idea why?

near flint
dense isle
#

How is that a Warning and not a compile error? Can I change the severity of that warning? It was caused by a param rename in C++. I've been chasing a bug for 2 hours because of this

dapper kiln
#

I'm hiding the "head" bone on my enemy when I shoot him in the head. But is there a way to also get child components attached to that bone and hide them as well? Things such as hats, etc?

still trellis
violet wagon
#

@still trellis I had the same problem. For me it happened because I was adding UI in a multiplayer game and you have to add widgets in the player controller using Owning Client event replication.

vernal scroll
still trellis
#

Ah it just occurred to me that begin play on the character might happen before on possess

pulsar abyss
#

is there a way to automatically apply blueprints to certain meshes when importing level geometry? for example, adding door blueprints to objects named 'door' etc

waxen mulch
#

Hey sorry kinda of new

#

any help this only shows on the local client

#

not the other clients

opal stone
#

Does anyone know how to store a possessed pawn when loading or opening another map? Right now it keeps defaulting back to the original player pawn when loading another map. Please @ me. Much is apprecaited! If you can point me to a tutorial or send me steps on how to do it that would help out greatly. Thanks!

violet wagon
#

@opal stone Take a look at the 'GameInstance' blueprint. It stores info when transfering through levels.

pale blade
#

Does pass-by-reference on arrays to functions not work?
I passed in an array of enum to a function with a timer loop
Then modify it elsewhere, but it doesn't see the update in the function

earnest tangle
#

The logic of that doesn't sound right

#

Values that are passed as parameters to functions only exist in the function for the duration of the function call

#

Something else cannot modify those values during the function's execution

pale blade
#

How do I make it by reference?
The player has an array of potions. There is a function that gets passed that array of potions and reads it and does calculations. However, outside factors affect the player's array of potions should be seen in the function as well.

#

Just want to pass-by-reference an array of stuff, it's possible, right?

#

I mean... you can do it with normal programming.. I can't imagine it not working here

earnest tangle
#

Pass by reference should definitely work

#

If you tick the box for that then it should do it ๐Ÿค” Not sure why it wouldn't work, maybe you don't have the same ref where you're modifying it?

pale blade
#

I did tick the box.. Hmm
Same ref?

earnest tangle
#

I mean if it's a copy where you're modifying it instead of a ref to the same value

opal stone
#

@violet wagon Thank you! I'll take a look!

modern cove
#

hrm..do delays not work the way I thought they did? I have a UMG that takes an array of battle command and executes them. I told it to reveal one line of results, wait a second, then reveal the next and wait a second after that. When all lines in one command are shown, I told it to do a 2 second delay then start showing the second commands results.

It ends up blazing through the commands, not showing any until a couple seconds later, at which point it shows what might be the last command's result.

formal forge
#

Day 2 of me asking without an explanation, Is there any way to real time edit an engine on a vehicle as it is not exposed...?

pale blade
#

@earnest tangle
Am I using pass-by-reference incorrectly?
I have a variable in Actor. I pass it into Setup in ActorComponent.

In ActorComponent, I have it print out the value of the variable every tick (which is -10).
I change the value in Actor (by pressing 5 so it should now be 500), but in ActorComponent it is still -10. It should've changed to 500, since it is by reference?

ember dawn
#

So I have a blueprint using a Branch, but I needed to add another condition, and I figured instead of adding another Branch, I'd just make the first branch use an AND boolean that checks BOTH conditions. And it seemed to work fine. But I kept getting error messages whenever I exited Play. Using two branches, no errors.

#

Anybody know why?

lucid granite
#

can I inspect UMG widgets at runtime

#

that is the only thing I have in my HUD

#

Can I inspect the blueprint at runtime?

#

I can't find it in the world outliner

zinc portal
#

General architecture question. This relates to UMG but not only so putting it here.

context:
A VR game where I have a UI which lives in the main screen of an aircraft. In addition to the main screen I have small vertical screens next to the main screen. These have button icons that change depending on context. These commands will be used by pressing "physical" buttons next to them. Physical buttons are missing from the capture here, also there is only the Left button bank right now.

My current plan:
Button overlap will send a "pushed" message to the Widget with the button icons (Navigation, tasks etc. in the capture) . ButtonBankWidget in this case.

The ButtonBankWidget will handle changing commands, colors and text on the button icons and when pressed relay the command both to the main screen widget which will load appropriate layout and to any external places it needs to go to.

Is this daisy chain approach bad?

The button icons already have functions to change the content (color, command, text) so I thought they might as well do the executing but not sure if there are issues with doing it in a widget rather than another kind of actor.

Thank you for anyone who bothered to read! ๐Ÿ™‚

mellow folio
#

@ember dawn I bet you're doing an ISVALID check in one of those booleans. You'll have to show a picture.

#

because perhaps before you were doing an ISVALID and then checking the property on a reference, but now you're looking up a property on a reference before confirming its valid

#

just a guess

ember dawn
#

Not an ISVALID check

mellow folio
#

@modern cove It sounds like you might be trying to use Delay nodes inside of a FORLOOP?

#

that is a big nono

modern cove
#

I saw a demo of a custom Macro For Loop with Delay and tried that but it didn't work either

mellow folio
#

@ember dawn Actually that kind of IS an isvalid check. The top boolean is checking to see if you hit anything. The bottom value is checking the SIMULATINGPHYSICS on a component that might not even exist. You need 2 branches here, because you shouldn't ask for a reference to the Hit Component unless you know there was a Hit at all.

ember dawn
#

@mellow folio Gotcha. Weird thing is it still worked, it just gave me errors afterward.

modern cove
#

I also tried a new method where an Event Tick would display the lines one at a time based on a quantity that grew each tick, but attempting to use While Loops to hold up the process until the messages were all done caused it to complain about Infinite Loops

mellow folio
#

@ember dawn Yeah the engine hates bad references like that, definitely don't want to leave those, even though it technically works

ember dawn
#

Wish I could combine LineTraceForObjects and LineTraceByChannel. They both have parts I need and I'm having trouble replicating them myself.

mellow folio
#

@modern cove Is this coming from an Array of things?

modern cove
#

kinda

mellow folio
#

@modern cove You should just create a literal loop with a delay node in there. Never use FORLOOP nodes with delays inside.

Try something like this maybe

#

but whatever you're doing I'm fairly sure you're overengineering it

#

beddie bye

modern cove
#

I'll see if I can build something like that

tight schooner
#

you can set them, clear them, etc... lots of timer-related nodes available

modern cove
#

maybe next working session I'll have to scrap my current Battle Execution Process and try something like that

tight schooner
#

they're way more controllable than delay nodes

craggy shadow
#

Ok so i have a dino game, im trying to figure out the best way to set up eating, i have the thirst and hunger going down, and will go up if i set up a trigger box with the function to add hunger or thirst connected to the trigger, well next step is how do i set that up on a actor, so i can press e on it, it will disappear and use the add hunger function and make hunger go up, anyone have examples of the best way to do this

#

or even a tutorial, cant find much on eating, or kill actor then eat it, seems to be a issues people dont commonly have

ember dawn
#

Anybody know a way to check if something from a LineTraceForObjects is Visible, in the same way that LineTraceByChannel does? Need to make sure I'm not tracing objects through walls.

pale blade
#

What the heck.. am I going crazy here:
Default value of float is -999. Pressing 5 key should change the value to 500
But all I see in the output is -999, even after pressing 5

ember dawn
#

Yeah that looks to me like it should work

#

Did you compile everything?

pale blade
#

Yes

#

I even restarted editor and re-created the variable

ember dawn
#

If you turn off the event tick, can you confirm that its registering you pressing 5?

#

Only two pieces. Gotta test them individually.

pale blade
#

I can confirm "SET TO 500" prints out when I press 5

#

With or without event tick

ember dawn
#

Instead of telling you to value on an EventTick, try making it tell you the value when you press 6

#

Then press 6, then 5, then 6 again

pale blade
ember dawn
#

No, I mean like this

#

Press 6 to test if the default value is correct. Then press 5 to change it. And then press 6 again to see if the change worked.

pale blade
#

So it looks like it's set correctly, but not in Event Tick

ember dawn
#

Try hooking it up to EventTick again to see if the problem comes back. We've established it should work.

pale blade
#

I hooked it up back to Event Tick, still shows -999, even after pressing 5

#

Are you also seeing the same behavior?

ember dawn
#

No, it works with EventTick for me

#

Which version are you on?

pale blade
#

4.25.3

ember dawn
#

I'm still on 4.24

#

Might be a 4.25 issue?

#

If you need a timer there are alternatives to EventTick

#

I try to avoid using EventTick myself

pale blade
#

I'm using Event Tick as an example to figure out pass-by-reference, which I still don't understand how to use

#

But even before that, there's this issue

#

I can't believe it

ember dawn
#

I'm a novice and know nothing of pass-by-references, so I'm afraid I cannot be of help there

pale blade
#

I just can't believe it.
I made a brand new project, tested it. It works as expected.
But when I do it on my current project, it has that issue. I remade the variable. Nothing should be modifying it.
Is my project corrupted?

ember dawn
#

What else have you done in this project? Anything?

pale blade
#

Nothing relating to that variable

#

Nothing that should cause issues

ember dawn
#

What happens if you try with, say, an Integer variable instead of a Float?

pale blade
#

Let me try it out

#

@ember dawn Thank you very much for your help

ember dawn
#

Happy to be a rubber duck!

wicked vale
#

i kinda need help not gonna lie, i want to know if there is a way to change gamemode in runtime using blueprints?

trim matrix
#

Hey can any one help me to change duplicate an actor if it's position is changed anyhow

#

Hey

#

Paul

#

Are you typing a book

twilit heath
#

@wicked vale not even remotely

wicked vale
#

oof

trim matrix
#

Hey can any one help me to change duplicate an actor if it's position is changed anyhow

sudden spear
#

hello!
Math question:
I have a location in the world which calculates the distance to the player character (get distance to node). I've clamped the result from 0 to 10 so when I'm at the location the value is 0 and when I'm far away the value is 10. How can I inverse the value? So that when I'm at the location the value is 10 and vice versa?

twilit heath
#

10 - value

sudden spear
#

that results in a negative value but I just wan't it to be inversed

#

like... not minus inversed .. u know ? ๐Ÿ˜…

simple bison
#

So on vehicle component the values seem protect, none of the values are editable realtime for things like speed and such (like if damage is dealt to car lower its speed), Is it possible to expose these values into blueprints without breaking physx ๐Ÿค”

deep elbow
#

@sudden spear map range clamped or a lerp could give you that

tawny bison
#

how would i delete save game object from savedgames folder? Should I just overwrite it with an empty file that way it takes no space but i can use it later if needed?

grave relic
#

Could anyone help me? I have a door that makes asound when opening and closeing, it opens when i enter a trigger box and closes when i leave, but right now the sound playes while i move around in the trigger

haughty ember
#

@grave relic Check if the sound you're playing has loop enabled?

#

that results in a negative value but I just wan't it to be inversed
@sudden spear no it's not

grave relic
#

@haughty ember Is dosent have looping set to active

haughty ember
#

@grave relic Remove the Play Sound -> Play connector. Do you still hear sound when moving around?
Same question when removing Play Sound -> Reverse connector

grave relic
haughty ember
#

Do you still hear it when disconnecting each of those lines as well?

grave relic
#

When its like on the picture sound still plays

elfin hazel
#

You write that the sound plays when you move around in the trigger box, but does it start playing what seems to be every frame, or less frequent?
The sound playing is just a symptom of how the On begin/end overlap works. ANY object will trigger these, assuming their collision overlaps. So if you have a character made up by a lot of primitive components, as each of those components overlaps the triggerbox, each will trigger the overlap event.

weary jackal
#

No he's using box as an component

elfin hazel
#

What you can do is to query what overlaps. And use a simple state machine for the door. For example, it shouldn't transition to the opening state, if it is opening.

weary jackal
#

So it plays every time it begin overlap

#

Just on begin overlap cast to your player character

#

And then do this things

elfin hazel
#

It is also possible that the door itself triggers the overlaps.

untold fossil
#

I'm trying to make a test array with 3 different entries. However, when adding said entries to the array in one single frame it adds 3 times the same entry. Anyone know why this is?

#

The entry variables are steam item structs

grave relic
#

Its only when i walk around in the trigger myself, im useing the normal FPS player

elfin hazel
#

@grave relic The fps character has a component, that is supposed to be the gun, does it not? So there's 2 overlaps already, one for capsule and one for the gun, as you enter the trigger.
The best thing for you to do, is to print the actor and component to see just what is triggering the overlaps.

weary jackal
#

@grave relic The fps character has a component, that is supposed to be the gun, does it not? So there's 2 overlaps already, one for capsule and one for the gun, as you enter the trigger.
The best thing for you to do, is to print the actor and component to see just what is triggering the overlaps.
@elfin hazel rather than that while overlapping with box. Check the overlapping box actor by casting and for successful casting follow the open /close part

grave relic
#

I figured it out @elfin hazel @weary jackal, it was almost what you both said so i when into look, in the original FPS controller for some reason is there a tiny sphear collider on the camera, remove that and it fixed the problem :=

#

๐Ÿ™‚

sudden spear
#

@haughty ember
I was wrong. You're right of course. Except that you didn't mentioned that I need a absolute node (or maybe also another node which I don't know) to get a positive value out of it. Anyway, this works now. Thanks all ๐Ÿ™‚

haughty ember
#

@sudden spear You don't need abs. If X is between 0-10, and Y = 10 - X, Y can only be between 0-10 as well.

sudden spear
#

I need time to process this ๐Ÿ˜† ๐Ÿ˜ญ

haughty ember
#

Take a paper/notepad and write all the possible values of X for the formula 10 - X. That is
10 - 0
10 - 1
10 - 2
..
10 - 10.
See the result of each one. That should help

sudden spear
#

I dont get it ... how should the graph look like? Maybe I'll get it then

haughty ember
#

just without abs

sudden spear
#

That results in 0 till -10 ( -10 when I reach the desired location)

#

I'm probably just too bad at maths ๐Ÿ˜…
Sorry for being confused^^ and thanks again

hard charm
#

hi guys ๐Ÿ™‚

restive dagger
#

I want to reduce an integer each 5 seconds

#

how?

#

Tick is like each frame

earnest tangle
#

A timer perhaps?

restive dagger
#

oh yea

maiden wadi
#

It's worth noting for learning purposes that Tick has the length between each frame. The Delta Time. You could add this up until it is >= to 5 and then do your thing. Then set that counter back to 0.

#

The timers essentially do the same thing, just in a more efficient way in a manager class.

restive dagger
earnest tangle
#

If you mean the event, drag from it and search for "custom event"

restive dagger
#

the event is a separate event for reducing integer

#

but the execute?

earnest tangle
#

Is this for a timer?

#

you'd usually connect the exec pin so that the node gets executed in the sequence you want it to

restive dagger
#

yea

earnest tangle
#

right, so it depends on when you want to start the timer in that case

#

for example, you could connect it from Begin Play if you want to immediately start counting it down

restive dagger
#

not working

#

:C

#

nvm

#

yay

#

thanks guys

rough wing
signal cosmos
#

Hi guys, Is it normal that the function GetInputKeyAtDistance returns the percentage of the curve instead of the input key?

dusky marsh
#

Hi, im new here. was a happy accident finding this discord whilst searching for an answer to my problem, I started ue4 3 days ago and this is my first attempt at making a ball bounce and then reset to 0 on landing, it all goes well up until it lands and the "event on landing" doesnt fire, can anyone help me out with this please, much appreciative ๐Ÿ™‚

rough wing
#

Try event on hit

#

Or wait that's a character ball

ancient topaz
#

Hello! I want to make a cast to ControllerBP, but i dont understand how can i make this. it is possible?

#

What add in OBJECT?

sacred gate
#

@ancient topaz is it a player controller?

ancient topaz
#

No, this is vehicle pawn

sacred gate
#

so you need that pawn reference to cast to it

quartz gazelle
#

I got a friend who built a game mostly using blueprints. One issue he is having is that now replacing outdated content such as the UI takes a significant amount of work as he has to fix and adjust several blueprints for each piece. Anyone with more experience have a good idea of how to fix this quicker and/or with less effort?

gilded pebble
#

Hey

#

how do you use Add Movement Input with Get Actor Forward Vector?

#

I've tried this setup, it works fine until I try to go backwards

#

then it just starts violently shaking

sacred gate
#

@quartz gazelle what engine version?

quartz gazelle
#

whatever the latest is. 4.24 iirc

sacred gate
#

@quartz gazelle thats what he build it with?

quartz gazelle
#

Well, he has been building the game for the last couple years. But he updates his code and engine with every update

sacred gate
#

normally you dont want to update in the middle like that but ive done it with one project also from 4.23 on and have not had any issues. What exactly is breaking?

gilded pebble
#

I have that already, what I'm trying to do is to disconnect character movement direction and controller forward vector

#

so I can look elsewhere while moving

sacred gate
#

@gilded pebble in camera uncheck use control rotation most likely?

gilded pebble
#

and same line if I go forwards

quartz gazelle
#

Well nothing is breaking. He is just running into things like wanting to update his UI, but in order to change just a piece he has to adjust like 15+ blueprints. So I was wondering if there was a better way to speed him up.

gilded pebble
#

so it seems that the forward vector of the actor violently changes when the character moves backwards

#

@sacred gate I've done that already

sacred gate
#

i think you may want the controller forward vector rather than actor maybe

gilded pebble
#

yes, thats the basic setup, but I need to be separate from the controller's rotation

#

so I can look around while moving

sacred gate
#

yeah so you will need to go off of the control rotation for that

#

so if you open a blank third person template thats basically how its set up

gilded pebble
#

yes, I've done that already

#

but the problem is that the thirdperson templace characters uses the forward vector of the controller

#

what I need is the forward vector of the actor

sacred gate
#

why?

gilded pebble
#

because it's very basic to only be able to move in the direction you are looking

#

I would need a system with which I can move in one direction and look into the other, it's very useful in tps pvp situations

sacred gate
#

thats exactly how the third person template is set up. unless im missing something im not sure why that wont work for you

gilded pebble
#

the third person template is very simmiliar, but it uses a the forward vector of the control yaw

west sentinel
#

how i can set a Class Array parameters in blue print ? how to access them ?

sacred gate
#

yeah im not understanding why you need actor forward. you can move in different direction from what you are looking in with control rotation forward

dusky marsh
#

@rough wing it works on event hit, but then when you touch a wall or a ceiling you get your jumps reset.. thats the problem lol

gilded pebble
#

as you can see on the top left corner, the actor forward vector wildly changes if I go backwards.

#

this is a fresh project with the tps templace

#

any way to fix this?

sacred gate
#

thats because forward vector is just giving you a direction. you are moving backwards but the forward vector is still pretty much the same

#

try this

#

should give you about -1 when going backwards and 1 when going forwards

gilded pebble
#

for some reason forward vector complete and the yaw rotation of the character is jumpin all over the place when moving the character backwards using the actor forward rotation

sacred gate
#

i think this is what you want

#

actually i dont think you can use add movement input how you want

#

you would need to do something like this

open linden
#

guys, quick question.

what is the cheapest blueprint class i can use? is there even anything like that?

I'd like to create an actor/scene component or whatever is cheapest for that, spawn and attach it to the player character and let it handle all the sound.

so far i have figured out that only actor type blueprints can have timelines. what do you guys think?

i know there is just this basic "object" but is it the cheapest? ๐Ÿค”

sacred gate
gilded pebble
#

I found a solution

#

it was caused by the "Orient rotation to movement" checkbox

sacred gate
#

oh you said you had it unchecked earlier. ok good then

gilded pebble
#

I unchecked the controller one

#

turns out there is one in character movement as well

teal spade
#

Hey everyone! Correct me if I'm wrong, but currently there's no way to change a level's tile position inside a blueprint, when using world composition. You can only set it manually, once. Right? Tried setting the transform, but that didn't do nothing, or get the tile value I added before (as a reference).

dusky marsh
#

Im so confused, "event on landing" works on ue4 third person character, but not on my own character blueprint classes ๐Ÿ˜ข

pale blade
#

How do you know if it's by reference?

I have this function:
If I add to the array of structs somewhere else,
top will not reflect the changes
bottom will reflect the changes

Obviously that means for the array of structs, the:
top is pass-by-value
bottom is pass-by-reference

But why? Is there a way to always pass-by-reference (there's no tick box option for these things)?

earnest tangle
#

tbh this is part of why I moved some of my data processing to C++

#

the distinction between value, pointer and reference is much more clear there

willow tendon
#

for other actors to use etc

pale blade
#

@earnest tangle Is there a way to tell which is what?

#

Or really, a way to make it so it's always by reference

earnest tangle
#

I think you would have to manually make sure you never pass it by value or copy the value

#

It might be easier to just store the value in one place, and access it from there. This way you wouldn't have this problem because everything that accesses the value is always accessing the same one

#

@willow tendon as in, you're directly rotating or tilting an actor by calling a function on the actor from you widget?

pale blade
#

I have the variables stored in the component to make it flexible and reusable, so at least in this case it makes sense for it to be there
But I'm surprised you can't do something so basic as pass-by-reference for these things..

earnest tangle
#

It might be partially caused by BP being an abstraction on top of C++

#

You could probably do the logic in C++ quite easily while still allowing the rest of your code to be in BP's

willow tendon
#

@earnest tangle yeah

#

sorry to interrupt

earnest tangle
#

I guess it kind of depends on how the widget is designed to be used

#

I usually have an event dispatcher on my widgets, and I bind into it to do something with updated values

willow tendon
#

its mroe of a debugging widget for quick access to variables

earnest tangle
#

Yeah if you're using it to directly poke a specific actor's properties it seems like this is an entirely valid method too

#

The reason I'm doing it with dispatcher in my case is I'm not necessarily 100% sure what I'm going to do with the data

willow tendon
#

yeah im using a dispatcher

#

isnt that what that is?

earnest tangle
#

Ohhhh

#

Sorry I didn't realize it was a dispatcher call

willow tendon
#

oh LOL

earnest tangle
#

Yeah that's definitely a good way to do it lol

#

It looked like a regular old function call at a glance

willow tendon
#

no sweat, my issue is... on my other actor

#

not sure how to 'point to' that widget

#

has to be a variable in the new actor?

earnest tangle
#

at least in my case I bind into the widget's events where it's created in my HUD

dense mica
#

as far as i know you can use inputs on bind events

#

also same for timers

crimson saffron
#

how can I edit inherited content?

dense mica
#

you mean component by content?

#

if yes, go to base class and set "editeable when inherited" to true

surreal peak
#

@willow tendon You theoretically have access to the Instance of that Widget when you create it. The CreateWidget node returns it.
From there on it depends on where you created it and if you can get a quick reference to that Actor.

#

EventDispatchers can be used if you need something generic. If your Widget shouldn't care about who uses those events.
If this is however just to control one specific Actor and nothing else, than creating the Widget in that Actor and giving the Widget a reference to the Actor should be enough.

willow tendon
#

oh

#

so in my other actor BP i'd just make a var to that widget?

#

essentially what im saying is, i'd like an "on value changed" event handler elsewhere

surreal peak
#

Ehm, yes and no. A Variable to Actors, Widget or other Objects is empty by default. It's like an empty box where you can put an instance of it in.
If you just make the variable you won't be able to access it (you will get "Accessed None" errors if you try). You'd need to fill that variable with the return value of the CreateWidget node.

#

Hm, so you want a very generic event that can just be hooked into at any time to receive the Widget values?

willow tendon
#

yeah thats what im shooting for (im just prototyping things for an actual UE programmer)

#

heh

surreal peak
#

Singleplayer?

willow tendon
#

well, more of just a previs thing, but yeah

#

end project no.

surreal peak
#

Okay so just for this then:

willow tendon
#

multiplayer thing, god knows where the other dev team is on it

#

yeah

#

i jsut give them simple lil previs projects ancd say 'do that, but make it work and better)

#

hah

#

learning along the way tho, so thats good

surreal peak
#

What you can try is:

  • Create the Widget in an Actor that is easily accessible, for example the PlayerController. There is a "GetPlayerController" node, which you can use to get the reference to your PlayerController.
    NOTE: That's not so straight forward if Multiplayer!
  • Save the CreateWidget return value into a Variable that exists in your PlayerController.

Whenever you need it you can then grab the PlayerController with the Get node and cast the return value to your own class and access the widget. Then you can bind to the Delegates of the Widget.

#

Let me know where you struggle with it

willow tendon
#

that sounds good (except for making the widget in the actor, im already doing that kinda on its own in my level BP)

surreal peak
#

Yeaaaah LevelBlueprint is a bad habit

#

It's not accessible from outside in BPs

willow tendon
#

well just drawing one widget

#

ah ha

surreal peak
#

You won't be able to access that Widget. :D

willow tendon
#

well therein lies the problem huh

#

LD

#

well , ill just move it to its own actor then

surreal peak
#

It's also generally not a good idea to put that code into there. UI Code and specially input related stuff should be in teh PlayerController

willow tendon
#

and let that chill in there

#

good tip. im hating level BP stuff more and more

surreal peak
#

It's fine if you use C++, as you can access and extend it from there. Just BPs are not the best in utilizing it

willow tendon
#

roger that

surreal peak
willow tendon
#

cool, just made an actor and threw it in the scene.

surreal peak
#

If you drag that pin out in your PlayerController (once you moved it)

#

There is a button at the top about creating a variable

#

Forgot the exact term

#

That makes sure you have a proper variable directly without having to manually select the type usually

willow tendon
#

ah thats handy

surreal peak
#

cool, just made an actor and threw it in the scene.
Honestly also not the best idea. You can't get the reference to that Actor easily.

#

Hence the suggestion to move it into the PlayerController class.

willow tendon
#

ok

#

but where does that happen?

surreal peak
#

Right, so you know how to create new Blueprints in the Content Browser, right?

willow tendon
#

i mean not on the level blueprint

#

yup

#

not entirely new but yeah

surreal peak
#

Did you ever create a GameMode based Blueprint?

willow tendon
#

nope

#

might be a good time to learn

surreal peak
#

Right, so the GameMode (since UE4 is for games), defines the rules and what classes of UE4's defining gameframework are used.

#

Part of that is for example the Character Class you wish to spawn

#

Or the PlayerController class

willow tendon
#

ok

surreal peak
#

Once you created your own GameMode class and you open it, you can find those settings in the ClassDefaults of that BP

#

You would then also create your own PlayerController class and assign it in your GameMode.

#

The GameMode can be set either project-wise or on Levels

willow tendon
surreal peak
#

Top

sharp fox
#

Hi. Someone know how to get camera reference from level in player character blueprint?

surreal peak
#

If you open that BP up you should see something like this in the Class Defaults

#

If you create your own PlayerController, you can assign it there

willow tendon
#

gotcha

surreal peak
#

You can set the GameMode default in your Project Settings

sharp fox
#

Hi. Someone know how to get camera reference from level in player character blueprint?

surreal peak
#

@sharp fox Posting the question directly again will not make me answer you faster. I'm busy with someone else atm first :P please wait.

sharp fox
#

ok ๐Ÿ™‚

surreal peak
#

@willow tendon Top left of your Editor "Edit" -> "Project Settings". Then in the Project Settings on the Left you can find "Maps & Modes" and there you can select the DefaultGameMode.

willow tendon
#

go ahead, im gunna delve into this... just one last thing, so now that BP that summons my widget goes in my playercontroller eh?

#

yeah ive done that now

surreal peak
#

Awesome

willow tendon
#

boop

surreal peak
#

The code that creates your Widget goes into Cube_PlayerController

#

For example BeginPlay

willow tendon
#

awesome

sour ridge
#

@sharp fox you could always make your camera in the level be a blueprint, thenn on your character/controller do, Get all actor of class

surreal peak
#

Again, not Multiplayer friendly, but enough for this

willow tendon
#

yeah. thats fine./

surreal peak
#

To confirm that your GameMode and PlayerController are actually utilized you can press play and double check your World Outliner (top right of the Editor by default I think). It should list them.

willow tendon
#

yeah saw them when i did all that

#

so now that im in the player controller doing this widget overlay... i'd still have to get the player controller and send it as a var i guess

surreal peak
#

Ah

#

No, just rightclick the event graph and search for the variables again

#

It's basically just UE4 being stupid

#

It wants a version that does not have the Target pin as the variable is part of the PlayerController anyway

willow tendon
#

oof

#

heh

#

i am the edge case master

surreal peak
#

@sharp fox You have a camera in your level that you need a reference to?

sharp fox
#

yea

rough blade
#

get

surreal peak
#

By using a GetNode