#blueprint

402296 messages · Page 517 of 403

rustic steppe
#

randomly appears whenever I run it?

sick galleon
#

@faint pasture just fyi if you ever need it, ive found a prefab plugin on the market that is free and seems quite awesome so far

#

@rustic steppe ok im not sure what happens in your scene, but you probably just have a camera actor already present, so with your ship camera, you have 2 cameras active. One of them has the priority over the other. Just make sure you have only one camera active. That being said I wouldnt put my camera in the ship prefab, but get a blueprint for the camera alone, that follows the ship (that will allow you to avoid having a rigid link between ship and camera)

#

@thin apex I think its a reference unless specified otherwise

rustic steppe
#

damn

#

oh okay

#

I know what caused the problem

#

the playerstart pawn was the problemo'

#

though its not moving

#

gonna learn that now

tired saddle
#

Is the While Loop node different somehow from a C++ while loop?

I want to implement the following logic:

int LastProduct = -1;
int CurrentProduct = -1;

void On3()
{
    print("Got key event");
    while (LastProduct == CurrentProduct)
    {
        CurrentProduct = RandomInteger(3);
        print("Comparing " + ToString(LastProduct) + " and " + ToString(CurentProduct));
    }
    LastProduct = CurrentProduct;
    print("Decided on product " + ToString(LastProduct));
}

and I made this Blueprint:

#

This loops forever when connected as shown. It detects that I change Last Product, which makes the While Loop condition, a loop we already completed, true again and execution jumps back there. Why?

#

If I connect the lower path then it executes as I expect, but then the Last Product variable is wrong for the next iteration.

sick galleon
#

@tired saddle in your blueprint, you're linking the output to start the loop again, thats not how it works

#

its basically saying "while (condition) do while (condition) do while (condition) ..."

#

the while will do its loop as long as it can, no need to plug it back to complete the loop (or you will start new children loops)

#

the same thing as "for each" loops

#

so simply unplug the output of your top print

trim matrix
#

I use three sequences for a 1D aim offset ( pitch) : up, center and down but something isn't working well...my first time trying offsets.

tired saddle
#

@tired saddle in your blueprint, you're linking the output to start the loop again, thats not how it works
@sick galleon I see. I wanted to go back to the top of the loop so I put a wire back to the top. Make sense that this would be automatic. Thank you.

sick galleon
#

yw

rustic steppe
#

when pressed I want it to gain speed, but which node should I use for that

#

also what is the difference between inputaxis and inputaction

nocturne remnant
#

axis is a float range

pale blade
#

Is there a better way of doing this? I understand the top two diagrams, but the bottom is what I'm trying to achieve
Currently I have it such that I have to filter out the actors based on if it implements an interface (for example, the box implements Targetable, line trace gets everything and just filters out non-Targetables)
I was wondering if there was a better way

nocturne remnant
#

consider the logic of it. How would you know if something is in the way if you're pretending that it doesn't exist?

pale blade
#

Hm, I suppose so
So in this case, I'd have to do a line trace by Visibility (basically everything is a BLOCK), then check if the output implements Targetable?

rustic steppe
#

Do I need to use input axis or action to make character move forward?

maiden wadi
#

@rustic steppe The FirstPersonShooter template's character class has a good setup to refer to for how to move a character.

nocturne remnant
#

More or less if you're just concerned with the first blocking hit. If you actually pull in a whole array is when you can fall into some weird shit.

rustic steppe
#

@maiden wadi yes, but it isnt exactly for flying

#

I am planning on making spaceships where there is no gravity

#

I checked the flying project but its so confusing

sour aspen
#

Hello I have a question I cant figure out

#

I am trying to create a method that returns an integer array without repeting numbers.

#

For example [1,3,4,2,1,3,2] is OK but [1,2,2,3,4,1,1] is NOT OK

#

I have two methods but I can't seem to figure out how it still creates arrays that have the same char next to one another

#

Can anyone spot the problem?

earnest tangle
#

the random node will generate a separate random number for every pin you connect it to

#

so your == check gets possibly a different number than your return node

sour aspen
#

OMG

#

IS THAT REALLY

earnest tangle
#

yeah

#

nodes without exec pins behave in that way

#

can sometimes lead to subtle and hard to track down bugs :P

sour aspen
#

FUCK THIS COSTS ME SO MUCH TIME IF THATS THE ISSUE I'll try now

earnest tangle
#

I don't know for sure if it'll fix the problem in your logic, but it's definitely something that could cause weird issues with it

sour aspen
#

Yep it is solved

#

I spent two hours trying to debug this shit

#

Thanks a lot

earnest tangle
#

👍

tight schooner
#

@pale blade maybe look into the multi line trace nodes. They return arrays of all hit objects so I would imagine you could then run whatever logic you want on that.

pale blade
#

Once I get the hit objects, I'd still have to filter it by objects that implement Targetable, right?

tight schooner
#

I suppose I'm confused by what you're trying to do. Rereading it, I can't think of a better way than what you have — doing a single line trace and then getting some data off the object.

#

The only thing you could mess around with is how it gets the data — actor tags, collision channel, whatever else pops out of the hit result struct. But using an interface is ok too.

#

It's not clear to me how you want to optimize it

lunar flower
#

how would you do a *= in blueprint?

#

float value

earnest tangle
#

get value -> * -> set value

lunar flower
earnest tangle
#

yeah

lunar flower
#

hah

#

thanks

nocturne remnant
#

I hope you're making a helicopter simulator

lunar flower
#

Airplanes for now 😅

#
angleOfAttack = Vector3.Dot(rb.velocity.normalized, transform.forward);
angleOfAttack *= angleOfAttack;

Can anyone explain to me why this yields completely different results? Am I doing anything wrong?

C# code on top works as intended but not BP

obsidian meteor
#

I'm having an issue where I'm switching out the base mesh for a pawn among a few varieties. they all have the same sockets for thrusters, but in different locations. the thruster scale and location updates, but only once the pawn receives some impulses... I've tried a few different methods to make the components 'wake up' and realize they are no longer in the right spot (moving the fuselage a few cm, adding a slight angular impulse) but it seems not to work...

does anyone know how to refresh child components when the socket location has changed?

nocturne remnant
#

if you're changing where the sockets are, you should be detaching and reattaching those components at the new location

obsidian meteor
#

@nocturne remnant thanks, let me try that

#

should I tick 'call Modify' on the DetachFromComponent?

#

does this look right?

nocturne remnant
#

I don't know what the call modify actually does because there's not an event for it. Whatever it does though, I'd assume you wouldn't need it since you're just moving the locations.

obsidian meteor
#

now this is working properly for the update, but for some reason both thrusters are being put in the right thruster socket. I'm doing a print as well with the names and it clearly prints

#

'LeftThruster' then 'RightThruster' but for some reason they're both in the same place

nocturne remnant
#

Pretty much. Though I'm actually not sure you have to explicitly detach it because I don't think you can have it attached to more than one thing. And if they have physics you might want to be welding them

#

Does it still do that if you actually make an array variable for your socket names rather than doing the make array?

obsidian meteor
#

I have a million variables so I don't really want to make any more

#

but I just switched from doing a for each loop to just doing one after the other and it seems to be working properly. go figure.

thanks for your help

nocturne remnant
#

That's why I was wondering about using a variable. Sometimes it does some weird shit on non-exec nodes. Kinda like whoever had the problem with the random number since it changes for every output pin.. but normal variable use doesn't do that at all

#

So, in a rarity, I have a question. Am I missing anything on Custom Movement modes? Because as far as I can understand it, UpdateCustomMovement is in the territory of completely building movement code from scratch. There's no AddMovementInput, it's just take whatever raw variables/input/whatever and then specifically having to change locations and play animations.

neon aspen
#

Is there a way to listen on a given collider if it has been hit by a raycast or not? (since I'm working on a mod and not my own game I don't have access to modify the raycast sender's logic)

trim matrix
#

Hello i have i question cause if i would want to make a procedural generated world made with cubes i saw how i can make water based on height but how would i make it on a flat terrain but for the water to be in a clusters and not water cubes randomly places all over the world

neon aspen
#

@trim matrix can you share what you have?

#

some screenshots or something would be nice

trim matrix
#

well to be honest im just making a plane from cube meshes with different colors

neon aspen
#

can you describe what you mean by water in clusters a bit more in depth?

trim matrix
#

soo as you can see the blue tiles are "water"

#

aaand how could i make them to not be so randomly placed but more like all in one place

proud hull
#

All values below a certain number would be water, above would be a random choice of grass or dirt.

#

Or another noise is used to determine grass and dirt pattern.

sick galleon
#

Lets say I want to do an enemy squad prefab.
I create a new actor blueprint.
I add 3 child actors components using my enemy blueprint
I can set each of those 3 child actors some template values, such as weapon held, hp, whatever, ok.
Now, what shoud I do if I want to take two of these actors, and set their "leader" parameter to be the third actor ? It doesnt seem possible for one child actor component to reference another ?

trim matrix
#

@proud hull but how would i do that cause if i would set frequency to lets say 1 and make a branch if =0 then something and if =1 then something so it would always say 1 since its set so it would always be one thing or probably im just stupid

proud hull
#

@sick galleon You make an array of these references and call it "mySquad" or something. Then you can cycle through the members from any of the squad members and check for the leader.

sick galleon
#

@proud hull I dont see how to do that from the blueprint object editor, so Im assuming you mean I have to do a specific script *in that blueprint (on beginplay or something) to cycle through each child actor and see if there is leader (so I would have to put a boolean on one actor to say "im the leader") and then go back to the other actors and say "your leader is X" ?

proud hull
#

@sick galleon if they are all children of the same actor, you can simply do this.

#

If they are not connected like that, you build the reference like I mentioned.

sick galleon
#

I was afraid so.
It feels counter-intuitive, or at least really not straightforward when you have your actors in your blueprint, and you cant just pick one and reference another actor of the same blueprint by simply accessing its details.

#

This example is pretty simple to solve because I can have many squads prefabs use the same script, since theres just the leader parameter. But more complex things, like say some kind of a battle prefab, where you want to pick each "soldier" and set which other soldier he's shooting at, you cant easily do that :|

#

you dont have control over each individual actors relation to each other actor

#

unless you do very specific script everytime

#

(and unless im mistaken)

proud hull
#

Are you working on an RTS game?

sick galleon
#

close enough, a city/colony builder

#

I picked the soldier example as it was easy to picture

proud hull
#

Gotcha

#

Best way for squads of any unit might be to make a struct with an array of actors (or the base class of your units so multiple unit types can be in a squad together), then make an array or map of those structs to store multiple saved squads.

sick galleon
#

@proud hull I see. Im starting to really consider moving back to Unity over this. I was assuming I was misunderstanding something about blueprints as it seemed over-complicated compared to other engines management of blueprints, but it appears it works pretty much as I thought.

Just for the sake of it, another case study, closer to my actual problems.
Say I want to make a building prefab/BP, in which a player can enter. There are other BPs in there, like a fridge, a shower, no problem they can be used alone and dont need special relations with other objects in the building.
But there are light switches. Light switches need to be linked to one or more lights they control.
To make that work, for each of my buildings "prefabs", I would have to create array or maps variables, and then some script using those arrays to then reach for every child actor and fill in their relation to other objects informations.

If you have many buildings to do, this sounds really redundant and ineffective, so once again I thought I was mistaken in my understanding on the system, but apparently I was not :(

I have to admit its a little bit frustrating to me when you just have the actors right on your screen, and the actors have their whatever-relation-to-other-object variable ready to fill in the template, but you just cant fill it with another actor from the same blueprint and be done with it.

Im somewhat venting here and I know theres not much to answer to that, but I just really wish to be wrong about something here and have someone pop out and tell "wait no, you didnt get it, you just have to XXXX and YYYY and thats it !"

trim matrix
#

Hey there, everything works in my save games but no matter what I did, my actors do not save/load... Why?

sick galleon
#

Really wanted to work with Unreal on a new project, but Im afraid thats not the right project to do so :|

proud hull
#

@sick galleon I really don't understand what you mean. If you have a multiple appliance/furniture blueprints (fridge, shower, bed, lights) and a building blueprint that you added them to, then you already have the reference in the blueprint.

#

All the components at the top are also created as variables for you to use in the blueprint.

sick galleon
#

but they are components, not child actors. Give me a minute to illustrate my problem.

#

for instance here I have object that can have relationships with others - here its pathnodes, but thats just an example

proud hull
#

Using the light switch and light as an example. The light switch BP doesn't know what lights to control without you telling it. So you create an array of light BPs. Now the switch knows which lights it can interact with. Or, you create an event dispatcher, let's call it, "lightToggled" that is called and every light that is listening for it has an event triggered.

sick galleon
#

in the world editor, you can just set "this pathnode is linked to that pathnode"

jovial elm
#

Any recommendations for how to have it so when the player holds a button, the character keeps attacking? I'm currently just thinking of having an event tick with a branch checking if the player is holding down the desired button. Not sure if that way is susceptible to being the source of errors down the line.

sick galleon
#

but if you put those 3 in a BP, you cant do that anymore and have to go through scripts, variables and loops (if I understand correctly)

#

well maybe not loops

trim matrix
#

@jovial elm on pressed set bool to true and when true then attack and on released to false ?

jovial elm
#

Now that you mention it, that might be much simpler 🤦

#

I'm gonna try that rq ty

sick galleon
#

I just feel like there is a smarter/simpler way to link lights to switches in a building BP of a house than to create a script for that house, and have SwitchA -> Get ControlledLights[] -> Add Light1, Add Light 2, Add Light 3; SwitchB -> Get ControlledLights[] -> Add Light4, Add Light5 ...

simple lantern
#

can anyone recommend a tutorial or workflow for dynamic IK hand placement? A lot of tuts I see are for climbing systems, but I'm just trying to create and place actors at key locations which my character will reach out to if they get close, like a door knob or telephone

harsh night
#

Sounds easier to have the switch spawn the lights and use that to set a reference to the switch in each light

simple lantern
#

I've gotten to the point where I am feeding the target vector and proximity to the target into a two-bone IK in my anim BP, but when I turn my character the hand doesn't stick to the target, it just rotates freely with the characters body

sick galleon
#

it all boils down to : its easy to have an actor use a reference to another in the world (literally 2 clicks), but the same situation in a blueprint have so many extra steps (needing a specific script with at least 5 nodes if you need to fill an array with even just one reference to another actor) ... doesnt it make maintenance of "prefab" blueprints much more time consuming ?

#

+more prone to mistakes

signal ibex
#

is there any way I can get the world location of a bone on a skeletal mesh?

thorn blade
#

can anyone explain why im able to disable nodes but not enable them?

#

ive done the keybidns in editor but i cant enable the nodes i previously disabled

simple lantern
#

@sick galleon But if you want to be able to duplicate a setup and place it other places without having to add more references, how else would you accomplish that? With a BP I just have to place it in the world and it is already communicating with my character about where the hand should be and everything

#

I could make one BP and place it 15 times in my world, and my character knows to reach out to each one of those spots without my having to reference every single one individually. Thats like... the whole point of BP

sick galleon
#

@stark verge thats because you dont need pre-established relationship between your character and (what I assume are) pickable items.

Again, the situation is :

You want an actor (light switch) to be linked to other actors (lights) though an actor array variable
In the regular "world / map" editor, you just pick your switch and add the light actors in its array from the details panel. Easy and intuitive.

If you now want to do that in a blueprint, you cant just use the details pannel (as lights & switches are child actors components). You have to make some script, using variables names, add to arrays and so on, having to either switch back and forth between the blueprint 3D view and the script to make sure you're handling the right light and switch, or first make sure you have a solid naming scheme so you dont mistake child actors.

It may sound petty, but when you have a lot of prefabs, this become a noticeable chore / time sink (+ more opportunities for misakes and harder maintenance). Such a difference between "world edit" and "blue print edit" seemed weird to me so my assumption was I was wrong about how it works or Im not using BPs properly, but it seems thats really how it is ?

simple lantern
#

thanks for the writeup, i think i see what you're saying

proud hull
#

@sick galleon I think what you want is to make the variables public. What you are talking about setting in the world is a variable that is part of the BP you placed in the world.

#

You can place a light switch and then adjust its defaults in the world editor.

#

So if it had an array of lights variable, you can add lights to it the same way you connected those nodes.

simple lantern
#

I think that's what they're saying, no? That you make your variables public then add what you need to from the world, and create your references that way, rather than trying to do it all through BP

#

At least that's how I interpreted it

proud hull
#

The point is, no matter how it is done, the two blueprints need a way to reference each other. There are many ways to accomplish this.

sick galleon
#

Basiscally :
I make my building if the world editor. I link all my lights & switches neatly.
I try to turn the whole thing into a BP.
References between switches and lights are lost (because they're not lightsBP / switchesBP anymore, but "children actors component" that will spawn an actor).
--> I have to relink everything through script and variables.

simple lantern
#

Yeah I think I just have a different workflow, I prefer to build everything up in BP and only drop actors into my world

proud hull
#

@sick galleon They will retain their references. I think you may be misunderstanding what a blueprint exactly is.

#

A blueprint is the class. You move it into the world, it is then an object.

#

An object retains all its info until it is destroyed.

#

If you had a building blueprint with working lights and place an instance of it in a world, it becomes its own object, but also has all the other objects in it too. If you place a 2nd building, that creates its own objects as well, with different references, but they are already made because you setup your blueprint to connect switch A with light A, etc.

sick galleon
#

@proud hull I understand that. Thats what make BPs harder to work with than prefabs (as seen in other engines) for this kind of cases.

proud hull
sick galleon
#

anyways thanks to both of you @proud hull and @simple lantern for your time and patience, I now have a confirmation the BPs are not as straightforward as I hoped for my uses.

#

I looked at Prefabricator and tried to use it, I was excited at first as it seemed to solve my problems, but afaik its bugged : ive had chunks of my prefabs spawn at the center of the map (out of an actual prefabs object) and randomly the prefabs complain about parts not being static at PIE start, and sometimes working fine without a change.

#

Maybe its not designed to work with moveable objects ?

thin apex
#

Why do a lot of things in my blueprints get reset everytime i compile The Project (not the BP)

sick galleon
#

@thin apex clearly, because BPs suck.
(I lied, they dont suck, im just mad at them)

thin apex
#

ok XDDD

harsh night
#

That’s the way it works. I don’t do much directly in the levels apart from static stuff.

dusk dust
#

how can i set a post process material through blueprints

#

i have the pp volume in the blueprint

#

now i want to set its material in the bp construction script

#

anyone

sick galleon
#

well, Im curious about your pp volume, and where you put it, but I guess that wouldnt be appropriate to discuss on this channel

dusk dust
#

post process volume

sick galleon
#

I understand. That was an attempt at humor, but my joke skills are on par with my blueprints skills, so it failed miserably.

dusk dust
#

i mean

#

i understood what you meant

#

but just in case

#

i clarified

harsh night
dusk dust
#

hm

harsh night
#

Bear in mind there's 4 Add or Update Blendable nodes all with different targets

dusk dust
#

oh ill check it out

flat raft
#

@sick galleon having trouble making lights and switches?

trim matrix
#

Guys, anyone know how to disable tab on uniformgridpanel?

#

i don't want it to focus on the slots at all

south socket
#

hello guys. Does anyone know a youtube tutorial about blueprints; specifically where you can open a door with a key but when you release the key the door will automatically close back.

flat raft
#

Maybe tie an event to the equip and un-equip of the key

jovial bobcat
#

Is there a way to achieve this effect in unreal?

flat raft
#

A floating shotgun is very easy to make

south socket
#

@flat raft I will try lookin in to it. Slightly new to ue4.

jovial bobcat
#

I was talking about the picking up of a weapon like how it floats towards you

#

it was a timed link

winged holly
#

contents of a render target asset are memory only ? I rendered something to it and restarted the editor its now black !

flat raft
#

it was a timed link
@jovial bobcat Ohh.. my iPad loaded it from the beginning. It's just seems like a set actor location on tick. Target would be ur players hands.

grim lantern
#

I have 5 nodes that are getting their input from an int node, how can i change the input of all of the 5 nodes to another node? rather then 1 by 1?

flat raft
#

I don't understand the question. Got a pic?

grim lantern
#

Ahh...found it Ctrl + Click the output node

#

then you can move all of the outgoing connections

#

thx

simple lantern
#

How can I set an IK target for my characters hand to be fixed, so that it stays in the same location even when i'm rotating my character?

#

I have a two bone IK set up for my chars hand, with a target being fed from a separate BP, so that when my character walks up to the actor they stretch they're hand out and but it on the target, like a doorknob

#

this is working fine, but only when I'm directly facing the target. when I turn the camera (it's an FPS) and my characters body turns, the hand position turns with it and stays stretched out in front of me instead of back on the target

#

🔸 Hold the phone, I figured it out. World Space is what I needed, not Component Space🔸

tired saddle
#

I have a similar problem as @sick galleon, but with Components instead of child actors.

In light switch terminology I have a PointLight, a MyLight and a MySwitch. The point light is the regular built-in light source but the My.* classes are my own Components. MyLight contains a reference variable, called Bulb, to a PointLightComponent and some variables that decide what state of the PointLight should have. MySwitch contains a reference to a MyLight and calls functions on it from time to time based on player interaction.

I put instances of these Components into Actors, for example an Apartment Actor may contain multiple of these Components. I have not found a way to link the components together when creating the Actor Blueprint.

Let's say that I have HallwayBulb, HallwayLight, and HallwaySwitch in a Blueprint.

When I select HallwayLight, an instances of the MyLight component, in the Blueprint's Component list I expect to find a picker icon in the Details panel next to the Bulb entry so that I can pick which PointLigtht it should reference. Or at least that I would get a list of PointLigths when I click the drop-down. But I get none of that. How can I set these references in the Blueprint Editor?

flat raft
#

GetOwner > get component

tired saddle
#

In the construction script? Or BeginPlay?

tender sierra
#

Hi, anyone here got good knowledge on Game modes and Player controller?

The question I got is if a Player controller can automatically generate Input bindings (inside Project settings), or if input bindings always has to be defined manually.

maiden wadi
#

@tender sierra Wait, are you wanting manually create named binding events, or did I read that wrong?

tribal axle
#

I was trying to make my camera rotate over time by pressing q and e, kind of like an R6 thing, it shows the camera rotating, but the viewport stays still. How can i fix this?

flat raft
#

@tired saddle either... but most people use BEginPlay

tender sierra
#

@maiden wadi

To be specific, I intend to migrate the character from eg the ContentExamples project to my own project. I like the character, the way it moves, etc.

So I wondered if the bindings, that you can see under Project settings must be done by hand, or of they can be made auto-generated by something else, eg the Player controller (or Game mode, or something else)?

maiden wadi
#

Ah. I have a memory that you can just import those blueprints in. If you're doing it on a project level, it'll create the bindings for you. If you're doing it on a class level, there should still be an error when compiling and I think it'll let you right click on the nodes to create those bindings. It's been a while.

tender sierra
#

Ah. I have a memory that you can just import those blueprints in. If you're doing it on a project level, it'll create the bindings for you. If you're doing it on a class level, there should still be an error when compiling and I think it'll let you right click on the nodes to create those bindings. It's been a while.
@maiden wadi
Can you please assist me to check how this works? Documentation you know of, or if you have the time to look into it?

I migrated from one project to another, but the bindings didnt follow along.
So I am curious about how I can make them follow, or how I can bundle them together or anything.

maiden wadi
#

When you compile that blueprint, do you see the errors?

tired saddle
#

@tired saddle either... but most people use BEginPlay
I have tried both and they both work. I currently prefer Construction Script because it makes the state visible in the level editor. I have noticed that setting a variable in the construction script makes it grayed out in the Details panel in the Level editor when selecting one of the Blueprint instances in the level and a Component of that instance in the Components list. Makes sense since the Construction script would override whatever the level designed would set, but it seems like a limitation of this solution. Not a problem right now, but I suspect that at some point a level designed may wish to tweak a specific Blueprint instance. That would require a completely new Blueprint, I guess.

flat raft
#

So, you say u have a apartment bp. Just curious of ur design ...

#

If you want 100 lights in ur apartment, do you add 100 components to ur apartment bp?

#

@tired saddle

tired saddle
#

Yes. Well 300: one PointLight, one MyLight and one MySwitch per light.

tender sierra
#

When you compile that blueprint, do you see the errors?
@maiden wadi you mean I migrate the game mode with all that is connected to it and in the new project, I compile the blueprint?

#

is that how you expect the bindings to be made by the blueprint?

tribal axle
#

I was trying to make my camera rotate over time by pressing q and e, kind of like an R6 thing, it shows the camera rotating, but the viewport stays still. How can i fix this?

flat raft
#

How's your performance @tired saddle ?

#

There are a few official unreal vids that say that that's a bad idea.

#

Might depend on ur implementation, but I'm curious if you've seen any performance drops

tired saddle
#

@flat raft Haven't gotten that far yet. And the light/light switch discussion is just a way of framing the problem. In reality the components are RigidBodies and Constraints and I don't expect there to be more than 10-12 of these per blueprint. A Blueprint would, for example, be a vehicle, the bodies chassis and wheels, and the contraints hinges and such.

flat raft
#

I see.

maiden wadi
#

@tender sierra Game mode shouldn't have anything to do with it. Those are project settings. You either have to bring in the blueprint and right click the events to make them, set them manually, or import the whole project.

tired saddle
#

@flat raft I hit this problem a while ago and at that time I looked at the built-in physics and they used names for all component references so that's what my current implementation is actually doing. I don't like that at all, names are brittle. I started investigating this script-based setup approach when I saw it mentioned above and it may be a better solution.

tender sierra
#

@tender sierra Game mode shouldn't have anything to do with it. Those are project settings. You either have to bring in the blueprint and right click the events to make them, set them manually, or import the whole project.
@maiden wadi
Correct, I assumed too the Game mode links together the blueprints
But the Pawn and Player controller, these are blueprints from my understanding.

So, which of the blueprints stores the Input bindings? Is it the Pawn or Player controller?

sour aspen
#

How can i create a hashmap like structure? I want to map certain integers to certain materials. In a way I will be able to retrieve material from the integer. I've created a struct with a material and int but what else should i do??

tender sierra
#

@maiden wadi I compiled both, yet none created any binding under Project setting > Input
In the Output log, I could read warnings instead, probably that it expected the bindings to be there in the first place
Warning: [Compiler PlayerCharacter] Input Axis Event references unknown Axis 'MoveForward' for InputAxis MoveForward

tired saddle
#

How can i create a hashmap like structure? I want to map certain integers to certain materials. In a way I will be able to retrieve material from the integer. I've created a struct with a material and int but what else should i do??
@sour aspen When you create a Variable in a Blueprint you can set its type to Map, where you would select Single Value or Array.

maiden wadi
#

@tender sierra They're not saved in a blueprint. They're project level configurations saved in a config file. If you go to the project location and look for a folder named Config, inside is DefaultInput

tender sierra
#

@maiden wadi
the bindings? Yes, I know that. I could export them from the original project and import them into the destination project.

I am wondering however if a blueprint can do this for me. Is that even possible?

#

This would ensure that you get what you need during a migration...

sour aspen
#

@tired saddle thanks a lot

maiden wadi
#

@tender sierra Doesn't look like it. Just tested. So either by hand, or by copying the lines from the config file to the other config file. May be another import way I don't know.

tender sierra
#

okay, thanks for helping out
I will keep investigating a little more, just to be 100% sure

harsh night
tender sierra
#

@harsh night although this is a runtime solution

I was rather wondering/hoping, that the PlayerCharacter and/or the PlayerController would autogenerate the binding they need

#

Say I have a project with multiple pawns/players from different project. eg the first person, the third person, one for archviz and so on.
I want to store them in a data bank of mine.

If each of them have different binding settings (I am guessing, I have not compared different projects), I would want to be able to switch what Pawn class I want right now, and the Input-bindings would just follow. Instead of keepint track "ok, now I use the first person, which has this and that feature, so I need to import this particular Input-binding (XML)" and so on

#

I was looking into some automatic way to make the Pawn and PlayerController work out of the box

harsh night
#

I haven’t seen something like this but I haven’t delved deep into input mapping, I just put down the hardware keys directly as the event triggers.

tender sierra
#

I haven’t seen something like this but I haven’t delved deep into input mapping, I just put down the hardware keys directly as the event triggers.
@harsh night but when you do, will they work without you defining anything under Project settings > Input?

tight venture
dim loom
#

please can somebody help me out am trying to get my fps hand working and have got it so far as the hands move from stat to stat and the gun spawns as a actor and that seems to work but the rotation isent right and i dont wanne have to keep on changing it in blender . is there a way that i can maby posision it befor it spawns and see it and then change the location and rotation so i can match it up with the hands i have been struggling with this for some time now. also i know i can use a slot on the model but i dont want to so that not a option

#

what i wouldent mind is that i would have control in the viewport befor the gun spawns so i can position it the right way is there a option for that

tight venture
#

@dim loom What do you mean, your "hand working"?

dense tinsel
#

I would have a quick question im currently working on doing linetraced projectiles instead of full physics objects and wanted to ask what is the best way to do the calculation of projectiles slowing down over time(reducing theyre velocity?) does somebody have some example math i could look at to give me a headstarts ?

harsh night
#

@tender sierra Yes they will. Input mapping adds some convenience like being able to link multiple hardware inputs to a single action. That would make targeting multiple platforms much easier since you could define the ways “jump” can be triggered: spacebar on PC, X on PS4 etc and just call that Jump action mapping . But the whole thing is not needed. If you define actions based on specific hardware triggers in the pawn or the character controller, those are going to be called as you would expect when the player presses that particular button.

dim loom
#

@tight venture i mean my hands ar moving the way i wanted them too but i just can position the gun and thats anoing

tight venture
#

Are you using a socket?

dim loom
#

no am spawning it in as a actor

tight venture
#

You should probably be using a socket for that

dim loom
#

thats just it . i have been folowing this tutorial on how to get fps hands and gun working https://www.youtube.com/watch?v=Fdp5k1lxUAI

In the first part of this short series, learn how to create a functional and game-ready First-Person player pawn, starting with setting up the pawn and weapon blueprint and creating an animation blueprint from scratch. Topics covered: Asset handling, material creation, skeleta...

▶ Play video
tight venture
#

Put a socket on your skeletal mesh where you want the gun to go, then attach the gun to the socket

#

the hand movements will probably be done with an animation blueprint

dim loom
#

but the you cant drop it right ? the gun i mean . he talks about using a actor for droping it and picking it up . but its just vary weird about how he got it working

harsh night
#

@dense tinsel You could do that and build a robust friction/deceleration system but did you consider just using a timeline to reduce their movement speed over time? Probably don’t need any complex math, just tweak the curve until it feels good.

#

Probably not a good idea if you want something that looks physically accurate, but otherwise should work fine

tight venture
#

sorry bunny, I can't really help you beyond that

dim loom
#

or does anybody know any other tutorial on how to get it to work right

tight venture
#

I don't have specific experience with that myself

dim loom
#

hmm ok wel thanks any way

tight venture
#

bunny I don't really know exactly what you're trying to do

#

It would probably help to explain it in big-picture simple-word style

#

no implementation detail

dense tinsel
#

@harsh night i need to possibly manage 100 projectiles at the same time im using a class and preatty much add any new projectile thats in the world to the class thats why i use linetraces. Getting this many normal projectiles up at the same time is otherwise problematic. I use tick and each tick i calculate the new position based on the projectile heading direction and the current speed just need to find a way to reduce the projectile each frame which is somewhat accurate

dim loom
#

i am trying to make a fps shooter . i made hands in blender and a gun in blender and now am trieng to set it up in unreal . but this guy talks about spawning the weapon in the hand but in that video you see it matchs up perfectly and when i do it i get that result where the gun is flipt and sutch .

harsh night
#

So you make a line trace, use the two locations (start/end) to get your projectile going in the right direction and towards whatever the line trace hit is that it?

dense tinsel
#

yep

harsh night
#

If you have hundreds of those maybe stay away from any complex math then to avoid overloading CPUs.

dense tinsel
#

yeah thats what im looking for a simplified way to calculate projectile velocity changes

harsh night
#

Maybe see if you can get something that looks fine by just reducing the velocity by a set amount each tick

dense tinsel
#

llike 0.98 ?

harsh night
#

Depending on the type of projectile you might be able to get away with it

#

Yeah something like that

#

I think it’ll very much depend on what the projectile is in the game

#

The right solution for a flying rock won’t look credible for a missile shot by a fighter jet if you know what I mean

dense tinsel
#

spped = speed -(speed * (0.02)*tickrate)

#

hmm yeah that might be a issue in general but i will treat actual velocity based projectiles like ugl/grenades/rockets differently then normal projectiles fired by rifles

harsh night
#

That should work yeah. One concern is that by having this on tixk it’s still pretty heavy. If it ends up being too hard for the CPU try doing this with a timer so you don’t have it running every tick

dense tinsel
#

well im doing all of this code in c++ i have to user tick preatty much probably to get a okayish result

harsh night
#

Yeah I get it. it goes back to the specific intent, for example the slower projectile the easier it will be to notice any trickery happening. Same with camera distance, stuff that’s in your face needs to be smoother.

dense tinsel
#

yeah

#

i might look into how default ue4 handles velocity changes

#

thx for your help tho @harsh night

harsh night
#

Sure thing. Hope you find a good solution!

meager vessel
#

Hey everyone, i have a problem. I'm using Get Hit Result Under Cursor For Objects to see if I can build a tower on a Node (white squares - actor). I have set the filter to World Dynamic. That bit works. But my towers have a Collision Sphere for their attack radius. The Get Hit Result Cursor For Objects hits the collision sphere so i can't check the nodes around the tower that are in range of that sphere. Is there an easy fix around this?

earnest tangle
#

Use different trace channels

#

For example you can create a new trace channel called "Construction" or whatever

#

Set the towers to block on that, and set the spheres to ignore that

meager vessel
#

@earnest tangle Thanks, that was actually super easy!

#

Already made it work 🙂

vital ingot
#

I have a question! When you're using multiples of the same node (In this instance the post-processing 0), does it hurt performance compared to just using 1, or as few as possible? I assume the tutorial did it like this so that it was visually more clear, but I'm not too sure if it has any actual impact on performance.

maiden wadi
#

That's for #graphics. It's the Material editor. But you do actually need all of those, they aren't the same value going into them it doesn't look like. It's probable that there's a minor performance impact with more. But the factor of it would likely be so small that I doubt it's worth caring.

vital ingot
#

Thank you! And I was also wondering the same thing for general blueprint code too. I did a grid awhile back where I reused the same nodes multiple times, and wasn't too sure if that was a bad thing to do or not.

#

I wont mind it in the future then!

maiden wadi
#

Mostly, that will only effect editor performance. In the underlying game code, it'll all perform the same.

stiff gulch
#

@stiff gulch You should have an abstract representation of the playfield. IDK what you're asking though, it's as simple as only moving to multiples of your tile distance.

@faint pasture I'm making a game like Ludo if you know it, and i draw the playfield using tiles
so i should make an abstract class and implement a method to get tiles locations and store it in an array of vectors when the game starts?

rotund laurel
#

im trying to get an array of all the child actors of a certain class that exist within the game files, any idea of how to do that?

tender sierra
#

@harsh night

To my question

will they (actions, like walk etc) work without you defining anything under Project settings > Input?

you replied

Yes they will. Input mapping adds some convenience like being able to link multiple hardware inputs to a single action. That would make targeting multiple platforms much easier since you could define the ways “jump” can be triggered: spacebar on PC, X on PS4 etc and just call that Jump action mapping . But the whole thing is not needed. If you define actions based on specific hardware triggers in the pawn or the character controller, those are going to be called as you would expect when the player presses that particular button

Thank you for an answer that gave me more perspective (same action different mapping depending on hardware, I actually need this 😄 ).

I just need to make sure regarding "yes they will", if you refer to "If you define actions based on specific hardware triggers in the pawn or the character controller, those are going to be called as you would expect when the player presses that particular button". And if yes, if you refer to eg Input > Keyboard events > for example "Space bar"?
Or can an InputAxis ever work without an Input Mapping in Project settings?

unique finch
#

guys how do i add a footstep thing in my game

rustic steppe
#

what bp setup do I need to make object move forward?

#

I got axis input and add movement input

#

but how can I make it move forward

#

or do I need to use action input

tired latch
#

Hey, I have a problem with box extents and actor rotation. I'm scattering random points inside bounding box and I want the bounding box rotation to match the actor rotation. For floor this works alright, but for a wall the points cluster to a very narrow area in 90-degree rotation. What can I do to fix this?

#

I would like to have the points like in the latter image in all actor rotations.

faint pasture
#

@dense tinsel For huge numbers of projectiles I suggest centralizing them as data and having a system that updates them all at once.

harsh night
#

@tender sierra My understanding is that Project Settings Input Mapping associates a custom event (using the name you defined) with the hardware triggers you select. It does not create any of these triggers. They already exist and you can see this is the case by going to any actor's event graph and searching for them, they're all there.

dense tinsel
#

Yes. That's what I'm doing @faint pasture

#

Just need to find a way to calculate volocity loss over time

faint pasture
#

@stiff gulch It depends on how in-depth you need your tile mechanic to be but, for example, in my game I represent the gamefield as an array of enums, which is read to spawn the tiles later. I use procedural generation tho so it's better to generate the whole map THEN spawn it.

#

@dense tinsel On update, velocity = velocity - Timestep x SomeNumber

#

@dense tinsel More realisticly it'd be Velocity = Velocity x (1-(Timestep*SomeNumber))

dense tinsel
#

Allright thank you!

faint pasture
#

Or if you have gravity, Acceleration = Gravity - Velocity*SomeNumber

#

Velocity = Velocity + Acceleration*Timestep

#

Position = Position + Velocity*Timestep

#

the SomeNumber would be your air drag

dense tinsel
#

Yeah

faint pasture
#

I then do a raycast from Position to NextPosition and handle it like that

dense tinsel
#

Yeah

tender sierra
#

@harsh night

My understanding is that Project Settings Input Mapping associates a custom event (using the name you defined) with the hardware triggers you select. It does not create any of these triggers. They already exist and you can see this is the case by going to any actor's event graph and searching for them, they're all there.
@harsh night
true

but then it seems they need to co-exist. You know of no way that the blueprint would work by itself, that eg "inputAxis MoveForward" might work without the Input Mapping, do you?

harsh night
#

@tender sierra Create a custom event called “inputAxis MoveForward” - or whatever other name - and have the trigger events all call that same event.

tender sierra
#

Can you please elaborate "have the trigger events all call that same event"?

harsh night
#

I recommend reading up on events, custom events and how they work if you’re not certain how to do this

maiden wadi
#

You're not likely to get that kind of easy to implement thing without moving it to tick and making the WASD keys set a float to -1 to 1 in the blueprint itself.

tender sierra
maiden wadi
#

Right. Have them set the usual axis values to 1 or -1 on pressed and 0 on released. Then do the movement in tick. All broken down, that's basically how the axis mappings work anyhow.

tender sierra
#

ok!
But there is one thing that I still dont get. I need to know whether it is a Yes or No to this question
@harsh night explained that nothing under Project setting > Input can be generated automatically. Is it there, then it came from somewhere. Thanks, check.
**Whats left for me to know is: **if nothing is defined under Settings > Input, can the blueprint itself, with InputAxis nodes, still work?

#

In my experience: no
But I want to make sure if its me who is doing it wrong, or if this is the way it is supposed to be

rustic steppe
proven mason
#

Hey @maiden wadi I believe I got the correct timings for the analog input

rustic steppe
#

or do I need to add something else?

proven mason
#

instead of two macro functions I've condensed it into one.

maiden wadi
#

@tender sierra It seems to still work. In fact the warning event that doesn't have a mapping still actually fires, it just won't receive any axis mapping besides 0.0. All other events are working fine.

#

@proven mason Nice. It all works?

proven mason
#

the only problem now is in the event graph connecting both MoveForward and MoveRight to the macro function yeilds awkward results; I have to only connect either

harsh night
#

It doesn’t help with the initial question - bringing project settings over with blueprint - but it’s an interesting option to make things flexible and portable

maiden wadi
#

Only part I'd pick at is the bottom left. If for some reason you need input to go above 1 or below -1, for like a mouse maybe, it's safer to set your parameters to accept that. Instead of asking if it's near 1 or -1, I'd probably just ask if it's not in the range of -0.95 to 0.95.

proven mason
#

what I was expecting when both nodes are connected is that when I tilt the stick to full then back to neutral in the Y direction I get the total time in purple

#

and if I tilt the stick the same but in the X direction I should expect the total time in green.

#

but it's giving neither

gritty elm
tired latch
#

The solution to my problem above was to use GetUnscaledBoxExtent instead of GetComponentBounds.

rotund laurel
#

@gritty elm doesnt work, im not trying to get child actors from the world
im trying to get the ones in the content folder and load them

gritty elm
unique basin
#

Struggling to wrap my head around this atm, I'd like to have an integer "overflow" past its range, so it's intended to be from 0 to 3 (inclusive), and if the input were to be 5, I'd like it to turn that into 2, or if the input is -1, I'd want it to turn into 3. Any suggestions?

cinder dirge
#

@unique basin The mod (%) operator will be your friend

unique basin
#

That's what I had in mind, but then I got terribly confused and now I'm lost

#

(Not really in programming headspace atm sadly)

rotund laurel
#

i tried using some of the rama stuff earlier to no avail, i dont think construct object from class will work
im probably going to have to write a cpp function annoyingly, thanks for the resources in that regard g33k

cinder dirge
#

@unique basin Ok so 5 % 3 is 2, so you're good on that front

#

Where did you come unstuck?

#

Negative numbers?

unique basin
#

That

#

And 3%3 being zero

#

But it needs to be three :v

cinder dirge
#

I see. Both of these can be solved in the same way, actually 🙂

#

Start with n % 3. If the result of that is < 1, add 3 to it

unique basin
#

But 0%3 is zero, and I need that to be zero

cinder dirge
#

So you want (mapping from -1 0 1 2 3 4): 3 0 1 2 3 0?

unique basin
#

Correct

cinder dirge
#

In that case you're going to need n % 4 rather than n % 3

#

Then it will "wrap" back to 0 at 4

#

0 1 2 3 0 ...

unique basin
#

Right

#

Yeah you're right that's actually all I need

#

🙃

cinder dirge
#

Cool 👍

#

I'm not certain you can have that and 5 => 2, though. If we expand out the previous series, we get (mapping from -1 0 1 2 3 4 5): 3 0 1 2 3 0 1. So 5 maps to 1, not 2. But anything else would be inconsistent, and that might be where you were struggling

unique basin
#

Right yeah my 5->2 was a stupid error

#

My head said 5->2nd entry

#

But second entry is 1

cinder dirge
#

Ah, off by 1 error. They catch us all from time to time!

trim matrix
#

i wana roll a ball and control it. how do i do that

sick galleon
#

Just a quick check. Trying to make a blueprint to use as a prefab.
I want two pathnodes in that blueprint to have the other pathnode in their list of "forced connection".
Is that the right way to set up those connexions in the BP script ?

(well apart from the obvious missing action connexion, sry)

trim matrix
#

why do you think i came to this server, it was because i couldn't find anything to help me 😮

earnest tangle
#

you can make a sphere and apply a force to it

#

or you can move it

maiden wadi
#

Isn't there a template that does exactly that when you open up UE4?

earnest tangle
#

plenty of ways to do that

#

@sick galleon if that works then it seems like the right way to do it :)

past girder
#

Hi, i have been working on trying to make the character speed change with a slider but i dont seem to make it work

sick galleon
#

@rapid acorn sorry for the passive aggressive response, but the first results are literally what you ask for, with videos on how to do it. Sure its an easy question to answer here, but a video shows you everything in great detail. Also, figuring out stuff and finding information are critical skills in development, at some point you might need someone's help, but most of the information is already online and you'll get faster answers that way and you'll learn just as well.

#

@earnest tangle well I cant say I agree with that statement :D You can have something work with a terrible code and a lot on unnecessary steps. I wanted to make sure that what ive come with is the most efficient way to do it.

earnest tangle
#

lol :)

sick galleon
#

First time I actually try to use child actors

earnest tangle
#

I mean that's how I'd go about doing it if I was trying to do the same thing

#

Whether that's the best optimal way ™️ I'm not quite sure :P

past girder
#

brb

sick galleon
#

Hmm ... you cant access a child actor from PIE / editor details ?
My child actor component apparently did spawn the wanted actors, but I cant check their values as I cant select them (it selects the bp root instead)

#

I suppose its by design.

rapid acorn
#

Uh I think someone pinged me by mistake

#

Also on a side note discord notifications have massive lag on my phone

sick galleon
#

I pinged Fruit Juice :|

#

would it ping you too ?

rapid acorn
#

Idk but my phone has the message highlighted like you pinged me and it shows @rapid acorn at the start lol

tender sierra
#

How do I create a variable, like this?

In my particular case, I want to create a variable to control Jump Z Velocity

sick galleon
#

@rapid acorn oh yeah my bad. I got it right on the first message but definitely pinged you the second time. sry.

trim matrix
#

@sick galleon can you show me that video that explains it in such great detail?

#

...

tender sierra
#

@sick galleon thanks! How do I add a target input.. thing for the variable?

#

(and do tell me the proper term, I try to learn them 😄 )

proud hull
#

@tender sierra The target means it is coming from another blueprint. Walk speed should be coming from character movement component.

#

@harsh night @tender sierra You most definitely can change input settings during runtime. I recently just finished creating that for my options menu.

edgy glen
#

Hello, I have a box collider in my character BP and it doesn't generate hit events, can you not have additional colliders to generate hits other than the inherited capsule component?
I have simulate generation hits enabled, and the collision is set up the same way my capsule collider works but it just doesn't fire the hit events unless simulate physics is on but I need it to not fall to the ground lol, the capsule collider does fire the events but was hoping to have a bit more control with an additional collider

sick galleon
#

@mighty meteor Do you want the box to actually (physically) hit objects, or just know when something is inside ?

edgy glen
#

@sick galleon For more context I'm doing wallrunning and it works flawlessly with the capsule collider setup using hits, so I would need the box to notify when it hits another collider, I want to use a box so I can limit the rotation on the wall so you can't do 360's along the wall lol

sick galleon
#

@mighty meteor not sure I understand that, but I think what you want isnt "hit" but "overlap" events

#

its in the collision part of your box collider details

#

then you have to make sure it uses the right collision preset (as thats what will define what it can overlap with -> generate events)

edgy glen
#

Overlap doesn't work with my wallrunning I have setup

#

If I had the box just have the ability to detect a hit everything would work perfectly

harsh night
#

@proud hull Yes, the MW video I posted a little earlier explains how to do that. Very useful. A earlier question that was posed concerned specifically migrating Project Setting Input maps from one project’s setting to another. I couldn’t come up with an answer to that question apart from defining them in BP or manually c/p the editor settings file.

proud hull
#

Export the settings

#

Then import

trim matrix
#

@sick galleon where's the video? Is there not a video explaining it?

#

So you lied

proud hull
#

In project settings, when you go to input, there are buttons at the top-right to export and import.

tender sierra
#

@tender sierra The target means it is coming from another blueprint. Walk speed should be coming from character movement component.
@proud hull I cant connect the Character Movement output to those newly created variables.

proud hull
#

@tender sierra drag from character movement, then type in "set max" and you will see its variables for max walk speed and such.

sick galleon
#

@trim matrix Holy fuck dude lol. You got mad at me for using "let me google that for you" and now you want me to google it for you ? wasnt what you asked for literally the first result of the link I gave you ?

#

also do you mean you've just sat here all that time waiting for me to feed you and didnt search it yourself ?

#

@mighty meteor im not an expert with collisions (only finally figured out recently how to properly use the channels and preset) but im surprised you cant have your box overlap with walls or other objects, can you provide a screenshot of the collision preset of your box ?

trim matrix
edgy glen
#

@sick galleon I got the overlaps to work but it doesn't work at all with my wallrun code

#

Because it requires a hit with impact normal result

sick galleon
#

@trim matrix The link I gave you had the first video answering your question, but you're clearly more interested in having a fight than finding a solution to your problem, so I guess ill just let you be.

#

@mighty meteor Oh. I thought it was something like "if anything gets close to the player while he wallruns, stop the wallrun stuff"

#

I think I need more details on what you're actually trying to do

edgy glen
#

Well my wallrunning is perfect that's why I don't want to rewrite it for overlaps, the only thing I'm trying to do is get a box to fire the "On Component Hit"
Essentiall the hit will stick the player to the wall like an on switch

trim matrix
#

What video? You didn't send me any video lol @sick galleon

sick galleon
#

@mighty meteor so the box is what is supposed to turn the wallrun on, right ?

edgy glen
#

Yep

sick galleon
#

then going for hit events might not be the best way to do it, because afaik two objects able to hit means they're not supposed to be able to overlap (might be wrong on that)

#

let me think

edgy glen
#

This whole system works with the capsule collider perfectly though

trim matrix
#

Ah not gonna respond. Seems like I got you

edgy glen
#

The only reason I want to use the box is so people don't spin 360 degrees on the wall or start wallrunning face to face with the wall

sick galleon
#

at that point im gonna need a drawing xD Im picturing TitanFall wallrunning style so im a little confused

edgy glen
#

Yeah I have essentially the same wallrun as titanfall

#

Though I don't remember if you can still wallrun while looking at the wall lol

round basin
#

how do I disable a button on blueprint please ?

sick galleon
#

oh so you dont want the player to look at the wall or behind him while wall running ?

maiden wadi
#

@trim matrix What you're looking for is literally a Template when you first open up the Engine and select Games.

edgy glen
#

@sick galleon Yeah, the cube was a rectangle through the player so only if that hits canwallrun, but it might just be easier to keep what I have and have a raytrace shooting out the camera and if it touches the wall your on call EndWallrun or something

sick galleon
#

what about just locking the view of the player relative to the normal of the wall you're running on ?

#

with some leeway to look around of course

#

casting a ray will come with its share of problems : what if you're near the top of a wall and you can look over the building ? and so on ...

#

your rule is "you cant look that way or that way while wallrunning" so I would go with a code based on the direction the player is looking rather than casts or overlaps

edgy glen
#

I tried clamping the camera before but I felt it didn't feel quite right, I have a function where if a branch is true it makes the player fall off so I figured that would be the easiest way to go about it

Yeah exactly that's why I wanted to do collider, but I could have the raytrace come from empty scene object a few units above the feet

opaque forum
#

Any idea how can i do this? I want to use IK only when requireIK is set to true.

sick galleon
#

@mighty meteor now that I think of it, wouldnt it feel better to let the player look all around as he likes, but link the wallrunning to his velocity ? like he can shoot behind him while wallrunnning, be if he tries to change direction he loses velocity, and when you lose too much velocity relative to the wall you stop the wall running ?

#

anyways at that points its game design decisions. back to the box hit event, I cant help you much more as im not entirely sure if using boxes hit is possible here. casts could work as long as its near the feet as you said

edgy glen
#

I have a set speed for wallrun to keep everything fast paced and moving fluidly, I didn't want to slow the player down, if the player looks away from the wall they drop off, so it's just the front that's the issue

jovial elm
#

Is there a blueprint node to track the position of a characters skeletal mesh relative to its capsule?

unique finch
#

guys how do i disable the arrow keys for my third person player controller?

earnest tangle
#

The arrow keys are probably set up from the project settings in the input section

round basin
#

is there any way to randomly pick a path?

#

(I'm very new)

earnest tangle
#

you can use a branch node, and connect the condition to a "get random bool" node

round basin
#

I don't find "get a random bool"
Oh yes, my bad

hushed flame
#

Is there a way to use Draw Material To Render Target without clearing the previous content on the render texture? Using Additive material also is not an option.

earnest tangle
#

I wonder if you could modify the material to take a texture as a parameter, and use the RT as that texture?

#

that way you could blend it the way you want in the material itself

#

No idea if that's a really good way of going about it, but at least it's an option :)

golden kite
#

is there no ways to get the highest and lowest values in an array?

earnest tangle
#

there's "max of float array" and "min of float array" at least

frigid thicket
#

anyone know how to make this happen? i want to make when the character jump, the overrideZ is true. and when falling, overrideZ is false.

round basin
#

there's "max of float array" and "min of float array" at least
@earnest tangle Now how do I connect the two from the same point?

earnest tangle
#

@frigid thicket you could probably compare the current Z velocity to decide whether the character is falling or not?

#

@round basin there's a node called Sequence which should help

round basin
#

Oh, thanks very much

frigid thicket
#

you could probably compare the current Z velocity to decide whether the character is falling or not?
@earnest tangle i've tried with "is falling" thingy, but it doesnt work. sorry im new

earnest tangle
#

yeah so you could try comparing Z velocity then

#

if you're falling it should be negative, otherwise it's either 0 or positive

golden kite
#

ohh didnt know those nodes existed, thank you so much, its really helpful

frigid thicket
#

yeah so you could try comparing Z velocity then
@earnest tangle hmm, i know what you mean, but i dont know the node 😦

earnest tangle
#

get velocity should give you a vector for velocity

#

you can then do a break vector, and get the Z value from that

frigid thicket
#

you can then do a break vector, and get the Z value from that
@earnest tangle ahh i see. thx very much

round basin
#

@earnest tangle I don't think it work, I've tried it a few times, but always the same thing loads.

earnest tangle
#

this has a 50-50 chance to either execute the True branch or False branch

round basin
#

So it's better like that ?

earnest tangle
#

I'm confused about what you're trying to achieve

sick galleon
#

xD

#

remove "sequence"

earnest tangle
#

Do you want to randomly chosoe between spawning a Interface 3 widget, or Interface 2 widget?

round basin
#

I try to randomly make widget 2 or widget 3 appear (I will then add more widget 3,4...)

earnest tangle
#

Okay, so you need to connect one of them into the True branch, and connect the other one into the False branch

#

because it will choose between True and False at random

round basin
earnest tangle
#

yep

round basin
#

But if I want more than 2 widgets, how do I do ?

earnest tangle
#

you could probably make an array of the possible widgets, and choose a random value from the array

#

(or you can keep chaining branches with get random bool)

round basin
#

I'll try that

#

Thanks it work !

maiden wadi
#

You can also switch on int.

jovial elm
#

Is there a way to compensate for the lack of root motion for a character animation where they do a lunge or leap into the air?

#

Was thinking of setting the location of the capsule after the animation to the mesh's location but I'm not sure how to do that

maiden wadi
#

Mesh doesn't move during animations. Stuff like this should be gameplay based. The capsule should be doing your leap or lunge. Animblueprint or montages should just be afterthought detail.

jovial elm
#

How does the character do his motions on the screen then? Isn't that the mesh

maiden wadi
#

Animations should usually be "in place". The third person jump animation for example. It looks dumb when viewed normally. Play it with a moving mesh and it looks normal. The character moves, the animblueprint polls every frame to get the variables it needs to switch to the correct animation to play.

#

It's possible to do what you want. But you would need to hardcode movement values for the capsule after the animation plays and do a lot of extra checking to make sure you don't go through walls. Do checks to make sure your animation doesn't play though walls, etc.

unique finch
#

guys how would i make a tube light?

#

oops sorry wrong place

gritty elm
#

@frigid thicket you can check from this function if your character is in air or falling / jumping

hybrid dawn
#

Hi guys, I'm currently trying to draw a line on the screen that points in the direction of a velocity vector that is drawn from the player as they are moving and the way I'm trying to set it up is to find the angle between the velocity vector and forward vector of the player. The issue being that the only way I found to do this is by normalizing each vector and finding their dot product but this always returns positive and I need it to return negative for when the player is moving left or backwards. I'm not sure how to do this.

spare wyvern
#

when i play my level map multiple music files are playing. Is there a way to track where they are all coming from?

tight schooner
#

Maybe find the music asset in the browser, right click, reference viewer

#

then you'll see all BP classes that reference that asset

#

(though probably not if used in publicly editable variables... In that case it'll probably tell you the level that references it)

torpid thistle
#

Help! I accidentally deleted the default player controls and I have no idea how to get them back :/

maiden wadi
#

@hybrid dawn So, you're just looking for the angle of the velocty vs the forward vector? What is your use case for it?

hybrid dawn
#

I'm currently trying to mimic how the movement works in Source and Quake and this involves finding the projection of velocity on acceleration so I have vectors for both of those and I would like to, for debug purposes, be able to draw the direction and scale of each of these vectors on screen but when finding the angle of either of these vectors between any other vector using the dot product it only returns a positive angle between 0 and 180. So with the line I have drawn on screen currently it will point at a 45 degree angle regardless of if I'm moving left or right diagonally

maiden wadi
#

If you already have the math good for getting the correct angle, it's just always in abs. You could check if you're moving left or right by checking the dot product of the right vector. Based on whether it's positive or negative, you could change the angle to the negative side by multiplying it by -1.

hybrid dawn
#

I was thinking something like that. The dot product seems to always return as positive though. My issue with this is now I think I'd have to check the direction the player is moving in x and y but this changes based off of the direction the player is facing.

maiden wadi
#

It shouldn't return positive if you're moving left, and you're checking the dotproduct of the right vector and the velocity direction.

hybrid dawn
#

I'll look into and get back to you. I honestly think I'm going to have to revamp the way I set up movement anyways as it's very unorganized and isn't working properly.

low lava
#

Sup so I need a little help. I am VERY new to c++ and blueprints however, I have a screen or 2 in a room that I want to play media on (I have this part working and was fairly easy.) Now that I have the video on, I want to screen to light up the room as it plays these videos. I am more than happy to read up on any links people post or whatever, but in short . Screen on lights room based on colours on screen.

faint pasture
#

@hybrid dawn You need to get very familiar with the dot and cross product

hybrid dawn
#

yeah I'm definitely trying to get more familiar with vectors through this and it has certainly helped

#

not good at vectors which is ironic considering I'm a physics major lol

mortal wharf
#

Is there a node to make a hud invisible / remove it?

winter kettle
#

how do I attach an actor to a skeleton socket in a character blueprint?

#

found out how

#

there is no "auto activate" option on box collision components? do I have to deactivate it in begin play?

trim matrix
#

Hey could anyone help me with something? I have an AI that will chase you after a certain period of time (40 Seconds) and he will go straight for you no matter where you are, So basically once the AI does his routine of going for you, he wont do it again, Only does it once and never again, Any help? will send screenshots of my event graph in a sec

#

Its meant to be 3 secs for testing purposes, in case you ask my why its so quick lol

#

So i basically want it to do that for the rest of the game, not stop doing it,

#

im new to UE4 so it may be obvious and i apologize if it is :)

cerulean plaza
#

Hey Alastor, it probably only does it once because it’s plugged in to begin play so it will only run once the game starts. If you use tick instead it should do what you want

frigid thicket
#

@trim matrix i think u can use this node and put the number to 1

trim matrix
#

Aight ty guys lemme try that

#

It worked!

#

thanks!

#

And now for the next part lol

#

So, now, (again im bad at UE4 so sorry if its obvious)

marble tusk
#

There's also a Do Once node

#

Basically just Do N without the number option

trim matrix
#

I have a AI that chases the player once it saw the player, i want it to stop chasing the player once the player is not in its sight anymore

#

will send event graph in a sec

mortal wharf
autumn surge
#

hey guys, I have a string var in my player bp which is saved and on begin play I print string it and its says the value I want but if I do the same in the level blueprint, cast and then print this value, its empty. why is that?

blissful geyser
#

It is quiet in here today, Mentatz. Can you give us a little more info? Is the value of that string variable hard-coded, or are you getting it from something else at run time?

autumn surge
#

hey man, I tried with a int which I set on begin play in the player bp and it gives always out the default when I do the cast in lvl bp

#

I have to figure out another way. I try set transform of my player when I load a map based of the map the Im comming from

blissful geyser
#

OK. (Big "if" coming:) If I'm understanding you correctly, you're trying to print some value on begin play, you don't hard-code the value, so you want to try to get it from something else in the game and then print it in begin play. Problem is Begin Play happens at different times for the various actors (well.. I've read it happens "at the same time" for all the children in a game world, but also read these, too: https://answers.unrealengine.com/questions/245399/begin-play-events-launch-in-different-order-in-a-p.html and then also race condition type stuff I'd guess is a factor, if it's switching? Just guessing really.)

But the real thing you're trying to do is.. say.. come from Level A, and because you came from there, put your player in some other scene / map area - that right? (Simple example in my head right now is like... exiting an inside area and putting the player in an outside area..)

I don't know the "best" way to do this. We did it in the past with a save slot we updated prior to the load.

I hope I understood, and that this is helpful! If I'm entirely off base and wrong, I hope others jump in so we can both learn a thing or two. ;-D

autumn surge
#

thats correct, what I try to do, but it addition I have an overview map which makes it all even more complicated. I get what you mean, I dont really understand how and when stuff gets loaded.

trim matrix
#

hi does anyone know how i can get a refrence to the TwinStickPawn so the ai move to knows that is what it is suppose to do

autumn surge
#

I have travelpoint bps and I try to do it with that instead. thank you very much though.

hushed flame
#

Is there a way to use Draw Material To Render Target without clearing the previous content on the render texture? Using Additive material is not an option.

rustic steppe
#

how can I make it so whenever I touch an object I teleport to specific location

trim matrix
#

i have not tried this but i assume on begin overlap then you need to set the actor location to a specific vector point

rustic steppe
tardy hollow
#

Everytime I play in the editor, I have Profiling with AI logging on and Profiling with GC verify on, anyone knows how to disable then? I'm on UE 4.25, porting an old 4.18 project if that matters

rustic steppe
#

Does anybody know how to make a static mesh move?

frigid thicket
#

Does anybody know how to make a static mesh move?
@rustic steppe i think you need to simulate physics on the mesh

simple lantern
#

@rustic steppe Many ways. What kind of movement do you mean?

frigid thicket
#

Many ways. What kind of movement do you mean?
true, need to be more spesific in that regards

rustic steppe
#

Oi

#

Sorry for no response earlier

#

My plan is to make it move when I hold W

#

Flying of course

#

Zero gravity

#

Space

#

@frigid thicket

floral egret
#

Hey guys does anyone have a working tutorial for gerstner waves

rustic steppe
#

@simple lantern Yo sorry to disturb

trim matrix
rustic steppe
#

But You said there are multiple ways

#

How come?

trim matrix
#

If I add a component at runtime, then set reference and use that reference to call a run on server event in the component, the game crashes.

#

If I have a component that is added before runtime though and use that as reference, it works just fine?

#

also some of that code is unnecessary but ignore that

simple lantern
#

@rustic steppe By multiple ways, I meant that you could have character controlled motion (like what you're asking), physics based motion (like what @frigid thicket mentioned), or a baked animation (like some sort of idle or passive motion, blowing in the wind or a robotic arm moving around on it's own), or reactive BP based motion (like something that reaches out when you get close to it), or a particle based thing, or many more. So my follow up about what you are looking for specifically is necessary, given the broad nature of your original question. Unreal has a lot to offer

rustic steppe
#

Oof

#

Damn

simple lantern
#

So you want a controllable object that moves forward when you hold W? Are you pivoting or changing direction when you turn the mouse?

rustic steppe
#

That is the original plan yes

#

Like it curves around to follow the direction of the mouse

#

Well that is anothef thing

#

But right now I just want it to move

#

Like on flyinv example

#

You press w, it starts movin

simple lantern
#

What gamemode is your project based off of?

rustic steppe
#

What?

#

Do I need to setup a gamemode for that?

#

I like only know how to set a default pawn nothing more xd

#

Do I need to setup some rules or something?

tribal axle
#

I'm trying to rotate my camera, but the viewport stays the same

#

How can i fix this?

lyric grail
#

Hey all, I am having an audio issue. Based on this blueprint, when the sound plays, it should be 3d and playing panned when the actor is off screen, correct?

#

But the sound is playing in mono

simple lantern
#

@rustic steppe did you still need help with this?

#

@tribal axle are you piloting a fixed camera? if so in the top left of the viewport there is an eject button. otherwise try restarting UE

tribal axle
#

No, I mean in the player character. I miss spoke, when I turn the player's camera, the camera ingame isn't rotated.

#

When i rotate on the x axis

simple lantern
#

@lyric grail 3D audio is based on attenuation settings, to enable it with a spawned sound try this

#

@tribal axle How is your InputAxis and Controller Yaw Input set up?

reef sierra
#

idk what happen but mouse input don't work more, if i move mouse to left/right or up/down the character don't follow the mouse moves, why?

tribal axle
#

When I press a key, the camera rotates, and it shows the camera rotating on the x axis. But when you're playing the game, the camera doesn't seem like it's rotating, even though it is...

#

I'm using the basic FPS template

simple lantern
#

lol double camera problems

tribal axle
#

I can send a video

simple lantern
#

@reef sierra check your inputs in the project settings, and check your inputs on your character BP

#

make sure InputAxis's are correctly hooked up to your Yaw and Pitch

#

@tribal axle How is your camera motion set up in BP? can you send a screencap

reef sierra
tribal axle
#

Oh wait

reef sierra
#

but it's so strange, last time i was working on this project the mouse was ok

tribal axle
#

Basically when i rotate the camera, even just manually in the actor, nothing changes, but this only happens on the x axis

simple lantern
#

It's possible UE needs a restart

tribal axle
reef sierra
#

It's possible UE needs a restart
@simple lantern Look like input in BP are gone lol

lyric grail
#

@simple lantern no dice. Didn't make a difference. Still playing in the middle. I have another sound linked to the animation of the actor and that pans fine

simple lantern
#

@tribal axle Oh I see what you're getting at. Try deactivating "Use Pawn Control Rotation" on your camera component

#

Look like input in BP are gone lol
@reef sierra Well there's yer problem

tribal axle
#

Yep that worked, Thanks!

reef sierra
#

can't add manually cause can't find "turn" event on bp ffs

simple lantern
reef sierra
#

nvm fixed

tribal axle
#

Welp, @simple lantern it worked, but the pawn control rotation disabled my ability to look up and down...

#

That was to be expected

low venture
#

How to make "composite curve tables"? I need them for gameplay abilities but there is zero documentation about them.

chrome orchid
#

how would i make it so if one team overlaps a certain actor it would do something but if the other team does it will do nothing. I already have a team system implemented

faint pasture
#

@chrome orchid In actor, on overlap, check overlapping actor's Team

tight schooner
#

@scenic scroll ask in graphics or VFX. The material node graph isn't blueprint

scenic scroll
#

right, sorry, i'll delete

harsh night
#

Ganeplay tags would be one way, an interface another. Bunch of options.

ocean island
#

So ive been having an issue with the start camera fade function. It does not do anything for me. I debuged it and know 100% that it is being called on. Any ideas....?

#

I do want to avoid working around and using a widget if possible

faint pasture
#

@ocean island Have you tried firing it off from an event?

ocean island
#

It is getting fired when I press a button

faint pasture
#

I mean have you tried it without it being inside a function?

#

Try button -> fade for now

#

latent actions don't work inside functions so if this fade is tagged as one it might not work inside a func

ocean island
#

😭

still trellis
#

how many components is too many components on one actor? and does replication change that answer?

ocean island
#

I do not think there may be a "too many" on components. Maybe there's a way to simplify it

#

@faint pasture I had the game paused and It wont do it when its paused 😂

#

It works nested

simple lantern
#

How would I check if an actor Implements Interface, then if true cast to whatever the actor is?

#

I've got the interface checking part, but don't know how to cast to a nondefined actor (if that's even a thing)

icy saddle
#

I've been looking at this use of FInterpTo in one of Paragon's Animation BP.
When I print the value of Lean Intensity Scaling (what's fed into Target) it prints out zero.
The value of Yaw Delta (what's fed into Current) has a default value of zero too and the only place it is set is on the return of FInterpTo as you can see.

But after I start moving the character around, the return value of FInterpTo becomes non-zero.
How is FInterpTo retuning non-zero when the Current and Target are both supposed to be zero?

#

(In the image below, as I move around, the Current value changes even though target still says zero)

#

I'm using ToText(float) to print the float that's fed into Target to make sure it's actually zero and not just a very small float

#

is there a better way to check if this float is actually zero or if if it's just a very small float which prints as zero even though it's not zero?

ember dawn
#

Can you just use a Branch to check if it's zero? Or will it return as true even if its a decimal?

icy saddle
#

@ember dawn thanks for the suggestion, do you mean checking target != 0?
I just tried the following but it always returns false, so the value of Target seems to be considered zero.

#

maybe the "does not equal" node takes into account floating point errors and will consider a very small float number to be zero for ease of use?

#

if I manually set the current and target of FInterpTo to zero, then it just returns zero, as it should

ember dawn
#

Alas I'm not sure else to suggest beyond the direct True/False check. I'm rather new to all this.

icy saddle
#

I see, thanks anyway, I'm new to BP too >_<

grim lantern
#

I can change the a variables value type to an array/string/map, can i change it to array of arrays or map of maps?

still trellis
#

Not by default but you can make a struct containing an array and do an array of those structs or a struct with a map and then map a key to each map struct.

modern cove
grim lantern
#

@still trellis that sounds like an overkill. is there a way to chain containers ? I have multiple single maps created (string, integer) and I want to iterate over a multiple of them. I've tried to stick them into an array but it complains,cannot make a container with an input of a container

still trellis
#

You can not without using a struct as far as I know.

maiden wadi
#

The only way to have 2d arrays by default is an array of structs.

#

What is your actual use case? What are you doing?

modern cove
#

I'm trying to have a little side text that shows the Name of the button currently being pressed. It works for the original Widget, but for any other widgets where I designate the original as the Parent Widget class, it fails. Why is that?

maiden wadi
#

If you're actually reparenting a widget class, keep in mind that none of the UI will be functional or follow. The only thing you get from parenting widget classes is the parent's functions and inherited variables.

simple lantern
#

At around 5:10 of this video the creator says to "cast to characterBP, as you always do", but I'm confused as to why? The tutorial has to do with getting IK targets from actors in the world, which I am able to do entirely within my animBP with an interface and don't need my characterBP for. Could someone help me understand what he means? https://youtu.be/FGtEsZ3_JgE?t=305

A short example of how to setup Hand IK for adjusting animations to push a button at varying positions.

This video uses assets within the Content Example to demonstrate the logic and setup required.

▶ Play video
maiden wadi
#

The difference is that you're pushing values into your animbp, he's pulling them from the character.

simple lantern
#

I guess i'm worried there's a proper way to do things that I should switch to, if he says "as you always do".

maiden wadi
#

Hmm. I do admit the idea of using an interface that often on animations might be a bit much. It's common practice never to drive the animbp, but to let it reflect your gameplay. Set your variables and such in your objects and let your animbp get them itself to drive itself.

simple lantern
#

Ah interesting. I was kind of operating under the idea that interfaces were more efficient or something than direct casting?

#

Or at least that you should avoid casting in general

modern cove
#

Thing is though: The parent class's buttons are still there, I can move about them and press them, and they work, they just won't return a True on Has Focus

maiden wadi
#

I did a test a while back on that. Interfaces are generally about 33% slower than an isvalid cast. Pure casting has no performance impact, Isvalidcasting does, but it's less impact than if you have the wrong or a nullptr object. The 25% slower from isvalid casting is much better than the 1100% slowdown from a null object.

simple lantern
#

What do you mean slowdown from a null object?

maiden wadi
#

Trying to call functions and get variables from an invalid pointer will greatly kill performance in blueprint. It'll actually crash in C++. That's why normal casts don't just cast, they check if the object that your pointer is pointing to is valid as well.

simple lantern
#

ah got it, good to know

maiden wadi
#

As for AnimBP performance, there is a nice trick to getting the best performance.

#

Validated Gets are quite a bit faster than IsValid casting, and about 17% faster than doing the exact same thing with an IsValid node.

simple lantern
#

honestly I didn't know the difference between validated gets and isvalid. always learning

maiden wadi
#

In practice, there is no difference. These do the exact same thing. Just that the top one is noticeably faster.

simple lantern
#

cool that's helpful, thanks

#

I'm trying to think how to restructure this without the use of interfaces, but maybe this is just a good use case for them. But instead of sending the interface into the animBP I should send it into the characterBP and then cast to the characterBP to grab the variables? It seems like that adds an unnecessary step to me

maiden wadi
#

Where are you getting the variables from in the first place? What class is sending the animation blueprint these variables?

simple lantern
#

actors placed around my world to trigger the IK

#

which then, as I posted above, is fed into the animBP through interface events and those variables are brought into anim graph

#

I'm just now realizing that I don't need an event timer, I only need to feed in a vector then I can find the proximity in the Event Blueprint Update Animation node?

#

Honestly I have very little idea about what I'm doing this entire project is meant to be a crash course for me🤷‍♂️

maiden wadi
#

Ah, I see what you're doing now. Initially I'd say move half of this into the character. You could simplify this by just making the overlaps ask if the player is currently overlapping this actor when they fire(both of them). Call an event in the player character blueprint that passes in either "self" or the location of this actor. Then you could also call this event from other actors besides just this one if you wanted later for other hand ik movements. But more importantly, you can have your player character set it's own variables that it's animbp can get and it can update itself rather than relying on a third party.

simple lantern
#

superb

#

So the player character is sending 'self' into the (let's call it) IKTriggerActor?

#

Oh wait the player is calling the event from the IKTriggerActor to get it's location (or self)...?

#

and then with that location/self it can drive whatever it needs

maiden wadi
#

Have the actor with the overlap trigger call an event in the player. The target would be the player character, and have an input of an actor class that you can fill with a self reference from the actor with the overlap.

#

Ignore my terrible naming conventions, but like this.

simple lantern
#

right

#

on the trigger actor end. It seems I don't need to pass in the variables individually, just a reference to the actor and I can do the calculations I need on the charBP end

simple lantern
#

@maiden wadi At any rate thanks for your attention I appreciate the input as always

maiden wadi
#

Anytime. Always willing to be a know-it-all.

wise raven
#

i have something weird going on, I have one zombie skeletal mesh with a physical material called "Flesh" placed in each of its materials, similarly I have put the same physical material in my human base male skel mesh's materials, but the thing is when i shoot the zombie skel mesh, it prints out the hit physical material "flesh" and spawns the blood splatter emitter, but when I shoot the human skel mesh, it prints out the default physical material, spawning a concrete blast emitter ( which is set as the default phys material emitter )
I am using a projectile based bullet.

#

and my character mesh is from Character Creator 3

round basin
#

Hello, I'd like to make sure that when I click on a doughnut four times, the game changes page, so I made a system so that each time I click on a doughnut a value increases and when I get to 4 the game page changes, but it doesn't work, can you help me?

earnest tangle
#

Are you sure the "set is enabled" node isn't the problem there?

#

If you click Donut 1, then disable it, that seems like it would prevent further clicks from registering

round basin
#

I want to be able to click the donut only once

earnest tangle
#

Oh you have four separate donuts?

simple lantern
#

...You could simplify this by just making the overlaps ask if the player is currently overlapping this actor when they fire(both of them)...
@maiden wadi Summoning you once more - what did you mean by having "both of them" ask whether the player is currently overlapping? Wouldn't I only need one overlap or the other?

round basin
#

Oh you have four separate donuts?
@earnest tangle Yes

earnest tangle
#

You'd need to have a click event on each of them instead of just Donut 1

simple lantern
#

cool art

round basin
#

like this ?

earnest tangle
#

Yeah, although you could connect them into the same ++ node

#

Or use a function or custom event.. That way you won't need to copypaste the graph every time :)

maiden wadi
#

When dealing with overlaps, I usually always check the full array in both directions. Less chance of any hiccups.

round basin
#

It work !

#

Thank you !

simple lantern
#

@maiden wadi Thank you mr

gritty elm
#

how to remove index/element from map in blueprints?

#

i don't want to clear map, but i want to remove specific element from map

#

?

earnest tangle
#

isn't there a Remove node for it?

#

it's usually a good idea to drag from the pin, and then just try typing in stuff into the box :)

#

you'll often find what you wanted exists

gritty elm
#

remove not working

earnest tangle
#

oh? define not working

gritty elm
#

when i clear, it works, but remove not works

maiden wadi
#

You can't remove by Index for Maps in blueprint I don't think. But if you have the key, you can remove via that.

gritty elm
#

should set array elem?

earnest tangle
#

if it's a Map, remove should definitely remove the matching item from the Map

#

if nothing is getting removed then it seems the item you're trying to remove is different from the items in the map

gritty elm
earnest tangle
#

oh, yeah because you're trying to remove from the values array

gritty elm
earnest tangle
#

so when you do Values, it generates a new array of all the values in the map

#

you have to remove from the map itself, not from the values array

simple lantern
#

that's a gnarly way to organize your nodes

maiden wadi
#

TO THE COMPACTOR WITH THESE NODES!

nova crypt
#

try and keep your variable node flow below the execution flow. Blueprint isn't like Tetris (although it is addictive to neaten everything)

simple lantern
#

I mean if they can make sense of it more power to 'em

maiden wadi
#

But yeah, like Zomg said, getting the Values array creates a copy of it. You're creating a copy and then removing things from that, so the original map is never affected.

simple lantern
#

where's that gif meme of confused Travolta looking around a confusing BP

nova crypt
#

From my experience to remove an index from a map you had to break out the keys and values > remove the index you wanted from both > reconstruct it into the map variable. This was a while ago. Does BP now support just removing an index?

earnest tangle
#

you can remove by key

#

I don't think maps have indexes in the sense as arrays do

maiden wadi
#

In theory, you could make a simple remove by index by getting the keys array, get the key at index, and remove from the map via that key. Since no two keys are the same.

earnest tangle
#

yeah that would kind of emulate it I guess

#

but in general it's probably not a good idea to treat them as indexes since I don't think maps guarantee ordering

#

unlike arrays

nova crypt
rustic steppe
#

how do you make a pawn follow the direction of a cursor

simple lantern
rustic steppe
#

I see

#

what is setactorlocation on this?

untold anchor
#

I have a trigger that changes a variable within the actor, works fine with the one actor, duplicating the actor in the scene, it now only works for the one actor. My guess is that the "get actor of class" only pulls the first one, so i used "get all actors of class" to give me an array of all the actors of that class within the scene. Now, I'm guessing I need to use a for each loop to change the variable, however when drawing off the array element spot, i don't get my variable as an option. How do i get access to the variable from this array element output from the for each loop?

pearl rose
#

@untold anchor I really wonder if you need a get all actor of class, usually you don't. It's more or less to prototype or do an action that will be perform once at loading or when the game close

#

But to answer your question, usually you simply get the variable from the "array element" from your "for each loop" and then you are good to access the actor in question

untold anchor
#

i have 8 fires around an arena, and during a character's "super" the fire changes color to that characters theme color

#

i think that's appropriate for get all actors of that class?

#

and when i drag a pin off of array element, i don't see my variables there

#

@pearl rose

pearl rose
#

it's not the appropriate way, but it's definitely possible like this. Get all actor of class is a very slow operation, what you actually want to do it's to store each fire inside your own array

#

specifically if you do it often!

untold anchor
#

gotcha, hmmm

pearl rose
#

But still, if you want to show me your for each I'll tell you if I spot something

untold anchor
#

so on begin play, get all actors of a class, then store that in it's own array?

#

the variable i'm looking for is call purple fire, and it's a boolean, but it's inside the brazier BP

pearl rose
#

I'm sure why

untold anchor
#

if i use "get actor of class"

#

it works perfectly

pearl rose
#

your Brazier array is a actor array 🙂

#

convert it to a an array of your own blueprint

untold anchor
#

i'm not sure i quite understand

pearl rose
#

You want to do a quick sharescreen and we do it together?

untold anchor
#

sure

fair magnet
#

How do I "cast" to a level blueprint ? I have some information in there I need for my User interface

earnest tangle
#

I'm not sure if you can. You probably should consider storing the information somewhere else

fair magnet
#

that's not possible apparently since it's the "time of day" variable.

earnest tangle
#

So you're setting that value in the level BP?

fair magnet
#

yes

earnest tangle
#

Right, so just change your logic that sets the value in the level BP to set it somewhere else

fair magnet
#

cause I have to update Sun position and Skybox

earnest tangle
#

For example you could save it into game state

#

game state can be easily accessed from anywhere

fair magnet
#

but I cannot use the DirectionalLight/Skybox in there

earnest tangle
#

Why would you need to do that?

fair magnet
#

To make my day night cycle

#

that's why the variable is in the level blueprint

earnest tangle
#

Right - so you're saving the time into a variable in the level BP, and reading the variable in your level BP as well?

fair magnet
#

yes

earnest tangle
#

Yes, so what I'm saying is, create a variable in game state

#

Save it into the variable in game state, and read it from the variable in game state - you can do all this in the level BP

simple lantern
#

I have my day/night cycle built into an actor class that i've placed in the world. You can put that stuff anywhere

earnest tangle
#

^ yeah same for me

simple lantern
#

high five

earnest tangle
#

lol

stone zephyr
#

is it normal that I cant pass structures through my drag and drop operation? I made a lot of different variables and all work except for structures

simple lantern
#

what do you mean drag and drop operation?

maiden wadi
#

Structs work fine in drag and drop operations.

stone zephyr
#

I made a drag an drop operation blueprint to hold some data

maiden wadi
#

I'll be honest, I don't care for using the operations for data. I use the payload object in all of mine.

stone zephyr
#

and when I get it here on the drop operation the card hasnt been set

fair magnet
#

So in my actor... how can I reference other actors who're placed in the level

simple lantern
#

woof

fair magnet
#

I mean it's not really an actor

#

I need to get the directional light

#

and the skybox

simple lantern
#

The easiest would probably just make a variable and make it public, then drag an actor from the world into it as reference

#

I realize the video doesn't exactly address what you're asking, still a good video though 👍

fair magnet
simple lantern
#

once you place the actor in the world, select the directional light you want in the details panel of the actor

fair magnet
#

Alright

#

Thanks o:

#

Guess I have it now

simple lantern
fair magnet
#

Yea I got it

round basin
#

Hi, how can I read a blueprint from another one?

simple lantern
#

casting/interface/eventdispatcher

#

what are you trying to do?

fair magnet
#

Hmmm

round basin
#

I want to open a page randomly (a blueprint is made to randomly choose a page and display it) but I want to access this blueprint from another one.

wicked vale
#

i am creating a minigame where if you stand still for a certain amount of time you die except i dont know how to tell unreal engine that if you stand in one location for lets say 5 secs that it needs to respawn again

simple lantern
#

@fair magnet can you post your BP setup

fair magnet
#

I already fixed it

simple lantern
#

nice

#

@wicked vale I would probably make a custom event in my char bp that would fire when I'm not moving (either by checking for inputs, or checking the players location vector if there are other level-based things that move the character around), then compare with a Get Game Time in Seconds node (If GameTimeinSeconds >= 5, respawn)

wicked vale
#

look im new to this so i dont exactly get the lingo

simple lantern
#

scratch that last part, it wouldn't work since the get game time node counts up from game begin

fair magnet
#

InputAxis MoveForward & InputAxis MoveRight
Branch = Both Axis Values equal 0 Set timer 5 seconds

#

@wicked vale

wicked vale
#

hm

#

yea

#

um

#

Look im hopeless

#

scratch that idea

fair magnet
#

sec

simple lantern
#

lol

fair magnet
wicked vale
#

omg thx so much

#

i rlly needed that

fair magnet
#

you can probably make it a bit more slim by deleting the "not" nodes and plugin the timer in true

round basin
#

casting/interface/eventdispatcher
@simple lantern I think I didn't understand, (error)

wicked vale
#

k

simple lantern
#

I want to open a page randomly (a blueprint is made to randomly choose a page and display it) but I want to access this blueprint from another one.
@round basin I guess the question is why are you trying to access it, what's the use case

round basin
#

I have different pages similar to this, and once they are "finished" I want to choose another one randomly.

simple lantern
#

the easiest way would be to just cast to the blueprint, and pull out whatever values you need

round basin
#

Okay I'll try that, got to go

#

thanks

fair magnet
#

@simple lantern I need one more tip for my casting in my Widget bluepritn :(

simple lantern
#

hit me

fair magnet
simple lantern
#

try get owner

restive dagger
#

@fair magnet show the node you plugged the execute to

fair magnet
wicked vale
restive dagger
#

idk what are u doing but plug the pco ref to object and see if it works

wicked vale
#

um you see my lingo is not that good

fair magnet
#

pro... I can't just plug in my controller into my actor wtf

simple lantern
#

@wicked vale you're missing a bunch of stuff

wicked vale
#

ah

#

ah

#

oh

#

not good

simple lantern
#

you need an execution pin going into your branch up top

#

just go with "event tick" for now

fair magnet
#

for Get Owner i need a target

restive dagger
#

are u casting to a pawn or a character?

#

or an actor...

#

it really depends

wicked vale
#

character

fair magnet
#

my bp is an actor

restive dagger
#

not you :c

fair magnet
#

Pco is a controller

#

but the controller has nothing to do with the actor

#

i could delete it and it would still work

restive dagger
#

yep

fair magnet
#

but I need it later

restive dagger
#

if u don't need it why do u put it into your code, I mean its not gonna fade away or something, you can cast to it when u need to use it later

fair magnet
#

because I just were about to do it

#

but then I ran into my problem

simple lantern
#

lol

#

try get all actors of class

#

specify the class you want in the dropdown

fair magnet
#

then I get an array of object

#

*actors

simple lantern
#

hmm, where is the object supposed to go from there?

#

in your BP i mean

fair magnet
#

I need the cast to make a variable to get the Time of day so I can show the current time on my Hud

simple lantern
#

I think what you need to do is make a variable of type class that you're casting too

fair magnet
#

that's why I asked all this cast to level blueprint shid earlier

simple lantern
#

so make a new variable of type "BP_DayNight"

#

get the variable, plug it into the target node

fair magnet
#

yea but I can't change it

simple lantern
#

what do ya mean

fair magnet
#

because the good old "editing this value in a default class is not allowed"

#

I tried with a variable already

#

oh wait

#

why can I edit it now ?

#

well I have a class variable now o:

restive dagger
#

btw I just joined here

#

Is there a channel for resources/tutorials?

simple lantern
#

I usually just go to google/youtube for whatever

restive dagger
#

Thanks 👀

wicked vale
simple lantern
#

@wicked vale Seems based on the way you set up your AI behavior tree

wicked vale
simple lantern
#

don't know too much about how AI scripting works unfortunately, but I think the issue is with the MoveTo. It needs to be driven by an offset of your character somehow, but idk

#

make sure physics is enabled for your cubes tho

wicked vale
#

but then they just fall over and dont move

fair magnet
#

You gotta tell him where he's got to move to

wicked vale
#

yea

fair magnet
#

just check a video for ai movement

#

Also chrits... I don't like to tell you but it's not working :c

simple lantern
#

Honestly for AI behavior that simple you're probably better off doing it in BP

wicked vale
#

srry guys but i gotta go

simple lantern
#

@fair magnet what's the issue?

fair magnet
#

the clock just stays at 0

round basin
#

What do I do now ?

simple lantern
#

@fair magnet Did the direct casting with the BP_DayNight variable as the target not work?

fair magnet
#

Well it's a class and I cant put a class into an object

#

and If I use an object I can't determine the class

#

:I

#

because "not allowed to edit in class defaults"

simple lantern
#

try this, just make a variable of type BP_DayNight and get it in your BP, then drag off and get whatever values you need. forget casting

fair magnet
#

ok I found it

#

so for some reason my "date time" is just keeping it being 0... it works fine with a timespan

round basin
fair magnet
#

what exactly is "changer_map"

#

an actor ?

round basin
#

it's a plueprint that randomly chooses a page

#

like this

fair magnet
#

that's not helpful

#

if you hover your mouse over it

#

what does it say

#

Parent Class:

round basin
fair magnet
#

what's the parent class mate

round basin
fair magnet
#

hmm

#

I never worked with scene components yet

simple lantern
#

@round basin can you post your entire BP setup?

#

for the BP that selects random pages

round basin
simple lantern
#

and the BP of the cast that isn't working?

#

either way, basically it needs a reference to what you're trying to cast to

round basin
#

I think I shouldn't have used the scene components

simple lantern
#

what are you trying to do with changer-map once you cast to it?

round basin
#

I just want to randomly choose a page, I want to run the bluescript "changer map" to get a random page

simple lantern
#

you need to trigger the chain in your select random page BP