#blueprint

402296 messages ยท Page 459 of 403

deft ingot
#

@hollow cape Idk. I got fed up and left Discord on my PC. Still logged in on my phone.

#

I don't think so either yet I'm new, so idk. Hence the question.

hollow cape
#

I would think this is a pretty simple one to solve honestly

#

My guess is you have an actor with a static/skeletal mesh component, and you are trying to see if that static/skeletal mesh is simulating physics

#

to do that, you need to drag off the "actor" pin, and cast to "mycustomclass", then drag off that cast and get myComponent, THEN call is simulating physics

deft ingot
#

That's not the problem.

#

I have that handled already. I'm trying to scale the actors as they get closer to the center of the Black Hole Actor.

hallow helm
#

@deft ingot it is bed time for me but I see some issue already... On what BP do you have these nodes?

deft ingot
#

The check for simulating physics is just to make sure it only sucks up those that are, then applies the Radial Force to them (-2000) and Destroys them when they get to the Inner Sphere Component.

#

@hallow helm it's on the Black Hole Actor.

hallow helm
#

Where are you setting Other Actor Refs

#

And what variable type is Other Actors Ref? It looks to me like you are taking a single actor, putting it in an array at index 0, then seeing if the Outer Sphere Component overlaps it

deft ingot
#

I made the Variable inside the Black Hole Actor. It's just an Actor Object Reference. I know it's working because if I change anything it stops sucking things into itself.

#

Hold on. I can make a video showing it working.

hallow helm
#

Well either way, using distance to node will give you a larger value than 1. Alpha is between 0 and 1, so if it is above 1 you get B until the DISTANCE is less than 1.

deft ingot
#

I'm doing it for all Other Actors Simulating Physics.

hallow helm
#

I recommend use the Print node to print these variable to better understand what values you are getting

#

I would see what float value you get from the distance to node once the object starts being pulled in, then FInterp the alpha based off that divide by whatever number you need for it to be between 1 and 0. I'm getting tired so I cant put all my mental ability to use right now lol. But I will be on tomorrow and can help more if needed

deft ingot
#

Well for both Distance To and the Return Value for the Lerp I'm getting 0 with Print String hooked up to Tick.

hallow helm
#

Jeep in mind you are setting Other Actors Ref into an array at index 0. So only one object is in the array

deft ingot
#

So do I need to make an Array of the Index as well?

hallow helm
#

Try it without that array crap... Is Other Actors Ref already an array?

deft ingot
#

Nope. Facepalm Don't worry about it. I appreciate the help. Get some sleep.

hallow helm
#

Lol just relax. I would suggest getting rid of the array crap for now and test with one object first... Idk how you are getting the Other Actors Ref, but if you are saying it already works with getting the objects to have towards the black hole you must have the right object.. So just plug in the ref to the nodes instead of the array crap

deft ingot
#

I got rid of the Array. The most of this is set up in C++, as demonstrated by an online course I am taking.

hallow helm
#

If you are getting 0 on the distance to node, that probably means you aren't getting the right actor ref

deft ingot
#

Ok.

hallow helm
#

But I head to bed now. I will catch up with you in the morning, probably 10 hours from now

deft ingot
#

Yeah, when I'm asleep. Thanks anyway. Sleep well.

hallow helm
#

This may help. Try printing the object ref you get to make sure it is the correct ref

deft ingot
#

Got it. Had to add every box as an array element after making the Other Actor Array Variable Instance Editable. sigh

hallow helm
#

There ya go man! Good job

deft ingot
#

Now I'm tweaking values. It...works...kinda derpy looking. I think may have to set it to Apply Linear Force instead of Radial Force. That might....I repeat might, work better....?

verbal narwhal
#

In ue4 I added a react animation of player nd I was gave a condition at branch when ai enemy attacks player nd player'S health>0 . เฅค and I set a death animation using condition at branch when player's health<=0 but when I am playing the react animation is workind but the death animation doesn't works

#

How to solve this problem please

plain flame
#

Heyy, I'm new to Unreal Engine, I was wondering how do you stop AI rotation?

#

AI dies, stop moving but still keeps rotating

#

rotating based on player's location

crude onyx
plain flame
#

nvm, it was stop movement immediately

distant sun
#

Next Spawn point is set to 0,0,0

#

yet it doesnt spawn at 0,0,0

#

when the game starts

hollow cape
#

so it doesn't spawn at all?

distant sun
#

yup

hollow cape
#

change the collision handling override to always spawn, ignore collision

distant sun
#

hmmm

#

still not spawning for some reason

hollow cape
#

wait is that logic in the game mode?

distant sun
#

yup

hollow cape
#

I don't think game mode can spawn an actor

distant sun
#

weird

#

I'm just following a tutorial made by unreal

#

for an endless runner

#

but it's pretty old so maybe they changed it?

#

ohhh wait one sec

#

it works now

#

what the tutorial doesn't tell you is to set your default gamemode to your new gamemode

hollow cape
#

I lied, it can

#

lol...

#

Well yeah

distant sun
#

maybe before you didn't need to set it or something, anyway thanks @hollow cape

hollow cape
#

No you absolutely need to set your custom game mode for it to work

distant sun
#

huh, weird that they didn't tell us to do that

#

they probably cut past it and just forgot, found the solution in the comments section.

hollow cape
#

Yeah, that's a somewhat high level step, and they may not have remembered to mention it. If you are ever curious if a BP is even firing, just put a printstring on Begin Play, and that will at least tell you if that BP is firing that event at all

#

print strings are your friend, very simple debug

distant sun
#

cool thanks, I will make sure to do that when I run into problems!

verbal narwhal
#

Heyy, I'm new to Unreal Engine, I was wondering how do you stop AI rotation?
@plain flame use 'destroy actor'

hollow cape
#

is that....a real answer?

#

I hope that's a sarcastic answer

trim matrix
#

Is there a Blueprint where i can check multiple booleans and minimum one needs to be true?

#

Such as: if(bool1 or bool2)

wintry wigeon
#

isnt that what OR does?

#

Also I have a but thinking about implementation problem.
How would one go to make TPS character slide down steep slopes, in unity I did it by first raycasting in 4 directions and down to check the slope, player migh be on if higher than certain amount I switched to the sliding mode(thats not a problem I can do something similiar in BP) but the next part I though of as spawning a physics sphere without renderer that rolled and player was just set location to its point, also I am sure this would work in MP, any ideas?

trim matrix
#

omg okay, thank you, completly missed that ๐Ÿ˜„

#

Is there an Equal to Unity Fixed Tick Method? So i have Event Tick but want there an Animation but its always different for each client so unity has a "Fixed Tick" Event where only 60x called per second. Or something equals to that, that i can call every 50 milli seconds an Action?

frozen spear
#

@trim matrix you can set the tick intervals yourself on an actors class default...

trim matrix
#

Ah great! Thanks ๐Ÿ™‚

oak timber
#

anyone here have steam working on 4.25?

late flame
#

how do I instantiate a UObject class inside a blueprint? I'm already specificing UCLASS(BlueprintType, Blueprintable), also exposing properties and functions to blueprint with UPROPERTY. Basically I want a struct with functions so I thought UObject would do the trick

errant sage
#

Hey there. I need a little bit of help. How to map a range in blueprint from 0 to 1 so that from 0 to 0.5 goes up and from 0.5 to 1 goes down ?

cinder dirge
#

@errant sage Can you define what you mean by "up" and "down"? You could use 1 - (2 * Abs(Input - 0.5)) which will give you a number in the range 0..1 for input between 0 and 0.5 and then a number in the range 1..0 for input between 0.5 and 1. Is that what you were looking for, or did you want negative numbers output for input from 0.5 to 1?

abstract socket
#

Let's say I'm in LevelA and want to get to LevelB momentarily and get back to LevelA once I'm done in LevelB but leaving LevelA as it was before teleporting to LevelB and thus without resetting it, how would I do that?

errant sage
#

@cinder dirge Thanks for helping. I have a day night cycle bp with time in range from 0 to 1. At 0.5 ( when the sun is at it's highest) I want to set the indirect lighting intensity to full 1. At both 0 and 1 ( during night time I want to change the indirect light intensity to a min value like 0.1).

toxic salmon
#

Having a problem with the game working in editor but not in standalone. I'm seeing this warning in the log that seems related:
LogClass: Warning: Property Dialogue Sequence of Dialogue Sequence has a struct type mismatch
Any ideas what causes this and how to fix? A quick google resulted in recompiling the blueprints that use the struct, but that didn't help...

cinder dirge
#

@errant sage It sounds like you want a sine curve (sin function)

#

With a clamp at some minimum value

gleaming hatch
#

Is there a way to set a unicast delegate from blueprints?

#

Google only finds info on multicast ones

errant sage
cinder dirge
#

@errant sage Nice! ๐Ÿ‘

trim matrix
#

Hi all i have issue with multiplayer setup, I have got it working kind of of to a point however when i run in standalone instead of main menu showing each time it opens the options menu shows everythime ?? Anyone maybe know what i'm doing wrong I can shar snaps of blueprints etc for you to gather more idea

#

also when i run the standalone with steam in background and set internet as play method and luanch into lobby it closes shortly after to menu

stuck hedge
#

What's the best way to save a relationship between two actors for a save game? For example: I have a cover system for AI. Various pieces of the environment have "cover spots" attached to them, and when an AI unit claims that, other units can't because there isn't space. When the game is saved, I can save where that piece of the environment is, and the unit itself, but I can't save the instance of of the Unit that is saved as a reference in the environment piece. So when I load the game, I can't directly tell Coverspot A that Unit B was the one who had claimed that because that instance was unique the last time the game ran.

Is there any kind of standard way of handling this? Should I generate a unique number for the cover spot and make that part of the save data and tell the unit that it's cover spot is the one with that unique number? I could attempt to check overlaps on begin play (the cover spot is a capsule collision), but then I have to make sure the cover spots are all spawned and set up before the units are placed as part of the load game, but that could cause race condition issues as the game mode offloads load/saving to various manager actors in the game and simply collects a master struct.

#

I could use overlaps with a failsafe. The coverspot could check it's overlap on spawn and if it finds nothing, the unit could also check it's overlap on spawn as a backup. That way regardless of which one spawned first, one of them would detect they're sharing a space and register the unit as the one using that bit of cover.

trim matrix
#

is it possible to make an entire game using only blueprint?

#

especially and fps

#

or is c++ necessery

stuck hedge
#

you can do basically everything in blueprint that you can do in c++ with few exceptions and mostly it's just longer in blueprint.

frozen spear
#

@trim matrix there are games released that are completely done in bp

#

@stuck hedge consider using structures for that.."map---unit and cover location"...and yes if it's data that needs to persist you want to give the cover areas unique identification so you can save that in the struct

stuck hedge
#

I have a map for it, but those reference instanced versions of the actors.

#

that's what I was wondering.

#

if I should consider using an ID or something else.

frozen spear
#

Are the appropriate variables for the units being saved? You could come up with a way to identify them... I don't think you can just slap a reference in the save game... More like rebuild the character to the point it was when you saved... I might be wrong there might be some way to save the entire ref as a var...but i dont know of one

stuck hedge
#

The ref is a unique instance, there isn't any way to save that. I'll probably either do an ID or just check the double overlaps on begin play to see which cover area they're closest to

frozen spear
#

Like unique unit 124 hp 100 weapon 17...

#

Location 87

stuck hedge
#

Yeah i have their full stats, position, rotation, class etc all part of their save struct

frozen spear
#

Then seems like all you need is unique identification for the cover locations

#

So you can "assign" them to the unit on load

stuck hedge
#

that's probably the easiest solution. I'll just have the unit look for a cover area with that ID and loop until it finds it in case the unit loads first

frozen spear
#

Exactly ๐Ÿ˜‹ ... they shouldnt be seeking cover immediately tho...you might want to make sure everyone who already has an assigned location had a chance to claim thier area before any nonassign unit is even allowed to look for a spot @stuck hedge

stuck hedge
#

Seeking cover is part of their behaviour tree. If they're not in cover they're always looking for an open cover spot to move to. I'm still working out the AI for what to do when the player generates more units than cover spots.

frozen spear
#

Sounds like your making an rts

stuck hedge
#

actually no.

frozen spear
#

With worker placements

stuck hedge
#

third person squad management.

frozen spear
#

The concept would be the same...if you needed sources to cross reference for code solutions

stuck hedge
#

this part of the game is a kind of defense part.

#

player will research and build defensive structures, many of which include a certain number of cover spots, and then also recruit and deploy units to defend an area. When they're deployed, they look for any available cover spots and if one is open they run to it and take cover to shoot from. But if none are available, they'll just move to wherever the player has pointed them to and mostly stand there for now and return fire from there.

frozen spear
#

Patrol routes consider splined patrol routes

#

Using the cover areas as spline point locations

stuck hedge
#

no patrolling. This is more of a meat grinder scenario.

#

I'm debating making the cover areas destructible and if the enemy AI destroys them, the friendly AI units may want to look for other defensive areas to move to

frozen spear
#

Imo, i love rts games...but when my units just stand there not moving to any given location and only idling it kills the immersion...but thats another topic :)

stuck hedge
#

Their behaviour tree is fairly simple: Am I cover? Is there cover available? Do I have a target? If I have a target, shoot at them. Do I need to reload? if I'm too hurt, duck and try first aid or wait for a medic unit.

frozen spear
#

Even most survivor worker placement games like frost punk always has a fall back for units so they dont just idle

stuck hedge
#

Not really survivor worker, its' more xcom world defense + rogue like dungeon crawling.

frozen spear
#

Since the logic is baked into you ai youll need to halt all of it until "game is loaded" since your trying to add saving mid battles....most of these turn based games only allow saving before and after matchs

#

Youll never even feel it

stuck hedge
#

Yeah, it's real time. I'll bind a function in the game mode for when the load is complete to start the AI.

frozen spear
#

But it will prevent you a million and one edge case headaches

#

Other than that it sounds like you got it figured out :)

stuck hedge
#

Yeah I've been working on it for a few months, as I refactor some things, I sometimes get curious if there is a "standard" way for handling certain kinds of scenarios which is what I mostly pop in here to ask about .

frozen spear
#

You are on a great course so far it sounds...its probably nice to hear from others that your idea on how to handle something isnt crazy

stuck hedge
#

I'm about 90% of the way to my early access release, probably the biggest hurdle is making a trailer which isn't my forte.

frozen spear
#

The biggest issue i think youll face is the one you mentioned earlier..
What should they do if you make more units than cover.... you could give the locations ungrades that allow them more units...and only allow as many units as you got cover space for...that would fall right in line with games like starcraft

stuck hedge
#

They have a mix of units here, medics, engineers, soldiers, scientists. The scientists are totally separate because they operate in the ship doing research. The other 3 operate outside as part of the defense crew.

frozen spear
#

Or send them out as kamikazi units

stuck hedge
#

idea being that when the ship is landed, these units and the defenses you set up keep it safe until you're ready to move again.

frozen spear
#

That sounds awesome

stuck hedge
#

The losing part of the game is if your defense fails.

#

while landed you can do research, craft items, launch the rogue like missions that help you gather resources and take over areas and stuff like that.

frozen spear
#

Have you played frostpunk by chance?

stuck hedge
#

Yeah, not really my cup of tea, but I've given it a go.

frozen spear
#

Its similar except you dont fight aliens or other creatures...you fight the elements

stuck hedge
#

I modeled this more after xcom, but I wanted to make it real time third person.

frozen spear
#

Its not so much the game itself why im referencing it...but how they handled some of their unit management

#

They have the builders, hunters, and scientists... then there version of losing is if the population of nonunit workers dies

#

You can convert nonunit workers into actual workers

stuck hedge
#

Yeah in this case you'll recruit people in specialties, and they'll be trained. They'll get XP and you'll be able to give them better weapons, gear, train them.

ancient heath
#

hey everyone. I thought I solved this but I'm still getting this spam in message log:

#

thing is, it stays there until I change literally anything (even move a node) and save the animBP

#

and then it doesn't print those errors anymore

#

and I have no idea what could be causing it

wise raven
#

I just started experimenting with HLOD ( Hierarchical LOD) so can anyone guide me on this, I have a huge city and I want to generate the HLOD in small groups so that my engine doesnt crash

rancid ridge
#

how can I check if "stat fps" is already executed to avoid disabling it?

plain flame
#

Hey, i just reopened my blueprint and all tabs are missing, how can i restore to default? It's looking like this

devout tide
#

does OnMouseButtonDown on widgets has a delay before calling that function again?

dusky hatch
#

I'm trying to make something I coded in c++ appear as a widget. In this case I have a timer that is counting down. Does anyone have an idea?

thin rapids
#

I'm trying to make something I coded in c++ appear as a widget. In this case I have a timer that is counting down. Does anyone have an idea?
@dusky hatch what do you mean? isn't it working?

dusky hatch
#

So I have the text linked to a text box on a widget. But it just stays at 0 and doesn't do what its supposed to. As the timer goes down its supposed to update but im not sure why it isnt working. heres the function

#

both seconds and minutes are UPROPERTY(Blueprintreadonly)

thin rapids
#

@dusky hatch isn't it because you're making that text into the seconds and the seconds are higher than 60 (making it so it's 0)

dusky hatch
#

That would be the case but even if the seconds start at a lower value, the widget still displays 0

frozen spear
#

Are the minutes shown and updating correctly

dusky hatch
#

timeleft is a float and if i set it to like 20 the widget still displays 0

#

no neither seconds nor minutes are updating. both stay at 0 on the widget

frozen spear
#

Where else are you calling set time, on a timer somewhere?

thin rapids
#

could it be because the setTime() isn't being called?

dusky hatch
frozen spear
#

Can you show us the code where you start a timer that calls this function on a loop?

dusky hatch
#

This is the timer and and the end a debug message pops up and that works fine

trail rampart
#

why is UPROPERTY inside the function?

dusky hatch
#

oh that was just me trying to figure out how UPROPERTY works

#

i just forgot to remove it

trail rampart
#

why is that an actor also?

dusky hatch
#

Is that not right? I wanted to add it to certain levels but not all

frozen spear
#

Also the timer binding looks a little off...where are you calling set time

#

That's what needs a timer

#

Unless timeleft is the function that calls set time

#

Show us timeleft lol...this is getting to bread crumby for me i think im tapping out

dusky hatch
#

I'm not sure I understand sorry. Im quite new to c++ in general

#

oh ok ill show

frozen spear
#

The timer should be calling settime function....all that timer is doing is calling ontimerend

#

Rather it's bindings are on timerend...im not seeing anywhere where you actually call settime to update the mins and secs

dusky hatch
frozen spear
#

You can have that timer binding as long as timeleft is set at the beginning and not the actual one that is changing... cause then there's no telling when that timer is supposed to happen

#

You should do the check for if time ran out elsewhere tho cause you really dont need it to have a timer...call it after you set the time on settime...then make sure to add an if statement to determine if you ran out of time on the timer end

dusky hatch
#

Ah ok that makes sense

ornate rain
#

Could someone help me? I havfe an exposed array but it wont let me change it in the editor and its doing my head int

frozen spear
#

You also should be setting the time it triggers to 1 if your using seconds

#

Not a variable

#

In the timer delegate

#

And looping should be true

#

Cause it should happen every second

dusky hatch
#

Oh alright yeah that makes more sense

#

Thank you for helping ^^

maiden wadi
#

@ornate rain Your array is set to Instance Editable = True?

ornate rain
#

yup @maiden wadi

maiden wadi
#

Not sure then. You should see it in the Details panel in the editor under Default if you click on an instance of the actor the array is in.

ornate rain
#

becasue the aim is to have each floor its own array element which is an enum and it selects the window style

#

right now i have this its set to round by default just so i can see if they are getting placed correctly

maiden wadi
#

Oh, I didn't consider that. You're using the construction script, so anytime you change anything, it's probably just overwritting it.

#

@ornate rain Also, be careful adding things to arrays in the construction script. If you don't clear the array at the beginning of the construction script, you can end up with empty array elements often.

ornate rain
#

@maiden wadi so from what u said i checked the beginning of my script and i remembered my friend told me to put the clear at the beginning and a generate button, but with the clear essentially every time i change something it reconstructs it and then clears it and sets it to default

maiden wadi
#

I'd probably consider redoing your construction script based on the array instead of setting the array in the script. For each element in the array, generate a wall of that type.

#

Then you'd just go into the editor and add an element to that array for each floor you need and change them at will.

ornate rain
#

i have to remake the script entirely?

maiden wadi
#

I dunno. Just depends on what you want to do with it. Just saying that I think the reason that your changes aren't staying is because they're being overwritten by the script.

abstract socket
#

How do I get a reference to an object of my level into the level's BP? Can't seem to find a way to

drifting sigil
#

drag and drop?

vast lion
#

Is there some sort of delay to spline updates?

pearl kindle
#

@abstract socket with the actor selected in level, right click the blueprint graph and choose 'create reference of <actor name>'

noble cape
#

does anyone know if there is a node similar to GetRangePct but for rotators?

halcyon latch
#

hi, is there a room that's best to ask questions regarding performance? my game is running slow on older machines but i can't find the right place to ask about it ๐Ÿ™‚

thin rapids
#

hi, is there a room that's best to ask questions regarding performance? my game is running slow on older machines but i can't find the right place to ask about it ๐Ÿ™‚
@halcyon latch #ue4-general is for general stuff about unreal engine, i think you should ask that there

abstract socket
#

@pearl kindle That did it, thank you!

halcyon latch
#

@thin rapids Thank you ๐Ÿ™‚

clear palm
#

Hey I have a couple questions about the possess node because mine is not working at all

maiden wadi
#

@clear palm You should just need to call it with a player controller as the target and a pawn/character as the InPawn

clear palm
#

@maiden wadi I have done that, it only works in the level blueprint though, which is not ideal

maiden wadi
#

Where else are you trying to use it?

clear palm
#

The a playercontroller and character blueprint

#

Tried both, neither worked

maiden wadi
#

Single player?

clear palm
#

yeah

maiden wadi
#

How are you getting the pawn reference in the player controller?

clear palm
#

can I show you a picture?

maiden wadi
#

Go for it

clear palm
#

This is within playercontroller

maiden wadi
#

Looks good, but where are you setting those two references?

clear palm
thin rapids
#

@thin rapids Thank you ๐Ÿ™‚
@halcyon latch you're welcome

maiden wadi
#

@clear palm What you're doing there isn't setting a reference. You're creating a spot where a specific type of reference can go. For example, if you put an isvalid node to the left of your possess nodes and plug your references in, they'll show up not valid cause nothing is in them.

clear palm
#

oh ok

maiden wadi
#

To get an actual reference for those empty slots, you need to do things like LineTrace, Shapetrace, SphereOverlap, Collision, Overlaps, Saving references to things when they're created and placing them in a global place to be taken, or the very worst resort which should only ever be used for testing purposes usually is GetAllActorsOfClass.

clear palm
#

How would I "save a reference to things when they are created"?

#

That sounds like a good choice for me

latent junco
#

Hey, is it possible to add a null component to an actor? Basically just a child node that only has a location that I can query?

#

Like, would a collision component with all collision turned off accomplish that? Or is there a dedicated component for it?

sonic gale
#

@latent junco I'm still a noob, but I think GetWorldLocation is all you need. You can use it on most things inside of an actor BP.

frank wolf
#

Hey folks I completely forgot the name of a node! Perhaps ya'll can help me out

#

I'm looking for the node that can give me different results based on "Every" X integer

#

Like every 8'th, output a different result

frozen spear
#

@clear palm if the reference is going to be the pawn that is possessed..

There is actually an event node for "on possessed"

sonic gale
#

Anyway, I was popping into this channel for the first time to see if anyone can point out what I'm doing wrong here. I'm trying to set a "Stagger" state by comparing floats of two overlapping actors of the same class. The problem is, this always returns false. When both actor classes overlap, I can see they have different values. So, one actor should return true, and the other false, right?

frozen spear
#

You can set it at that point

#

@sonic gale are you purposely using class default here?

sonic gale
#

Yes?? I'm not sure if that's the proper way to do it.

frozen spear
#

That will be the defualt set on the bp not any adjusted number you put on the instanced one

sonic gale
#

But, when I print the values of the overlapping items, I'm getting different readings.

frozen spear
#

Just drag off the as weapon and "get" ....youre printing the value set on this bp

#

Not the one youre overlapping...print that value your comparing

#

And see

maiden wadi
#

@clear palm Was in a game. Generally you just save the reference where ever you're spawning that pawn. Or just call the possess where you're spawning it. But since you can use the level blueprint, I assume that your pawn is already in the level at game start. So you don't have a spawn node for it.

frozen spear
#

Also cast to weaponbp...not class

gleaming hatch
#

I have a player avatar blueprint and a c++ player state class. The player state has a component, which has a delegeate, to which I want to bind stuff in the avatar blueprint. Is this possible?

frozen spear
#

But as weaponbp you can drag off that pip and type get swing strength

#

No need to recast if your using the correct "cast to'

sonic gale
#

@frozen spear Thank you so much! That worked!

frozen spear
#

Your welcome

gleaming hatch
#

I have a player avatar blueprint and a c++ player state class. The player state has a component, which has a delegeate, to which I want to bind stuff in the avatar blueprint. Is this possible?
pls halp I cannot into blueprints

trim matrix
#

Hey guys, I'm trying to call the function Activate from my TriggerBox QuestNorthMens but it write this error : "The type of Object is undetermined. Connect something to Cast To QuestNorthMens to imply a specific type."
I know it's a simple trick I may have forget but don't really know what^^

frozen spear
#

@latent junco add a billboard or arrow component

#

Thats what theyre for

#

Youre missing your object baptiste

#

Are you casting this actor to that?

#

See the object node on the left side of the cast...you need to tell it what exactly were casting here

#

Like a ref to the actor youre trying to activate on

#

Do you have a questnorthemn or whatever that you're casting activate on?

#

It goes plugged in there

trim matrix
#

Oh I see, but then when i connect to self 'Quest North Mens' does not inherit from 'BP QUEST' ( Cast To QuestNorthMens would always fail).

frozen spear
#

Ok so drag off the ref

trim matrix
#

Thanks you so much for your concern tho, this is awesome

#

Ok

frozen spear
#

And type cast to questblah

hot wedge
#

How can i position my particlesytem on opposide of my velocity?

frozen spear
#

And select the version that keeps the ref connected to the object pip

#

Theres multiple versions of cast

trim matrix
#

Oh ok, there is ? Didn't know that !

frozen spear
#

But wait your casting it to activate?

#

It already knows about activate without casting

#

Are you just trying to make sure its valid before activating?

trim matrix
#

Yeah i'm casting it to call his function "Activate" ;:)

frozen spear
#

So remove the cast

trim matrix
#

Just that

#

ok

frozen spear
#

And just use activate

#

If it owns that function you dont need a cast ๐Ÿ™‚

#

But

#

Activate before destroy

#

@trim matrix

#

You dont want it destroyed before it did its activation

trim matrix
#

Ohhhhh okay !

#

I must activate before destroy

frozen spear
#

Connect self to that

trim matrix
#

It's not compatible

#

Sorry ๐Ÿ˜ฆ

frozen spear
#

Is this a fresh activate node?

#

Drag off self and type activate

#

To get the correct one

#

Unless you have that target set in the function as the wrong type...

#

This is bpquest...are we in the right blueprint?

trim matrix
#

I'm in BP_QUEST, which is a Cube Blueprint, and once the player get into that cube, I want it to call the Function Activate in a TriggerBox named QUestNorthmens

#

Complicated I know^^

frozen spear
#

Ok so youre setting up a blueprint interface?

trim matrix
#

That's why i was making a cast to :))

frozen spear
#

Or do you have a reference to bluequestmen

#

But this would never cast itself as a different bp

trim matrix
#

Ah Oh :(

But this would never cast itself as a different bp
@frozen spear

frozen spear
#

You either need a blueprint interface or a reference to questnorthmen

trim matrix
#

Or do you have a reference to bluequestmen
@frozen spear Don't have a reference to, how to make one ?

frozen spear
#

Depends on how you have the quest thing set up...

#

Is it in a level bp...is it an object...

trim matrix
#

It just a simple Trigger Box with events and placed in the level

frozen spear
#

Ok so an actor

trim matrix
#

Yeah that's it ! ๐Ÿ˜„

frozen spear
#

When does the other bp come into effect

trim matrix
#

When the player enter into

frozen spear
#

If they are both actors you need a blueprint interface to talk between them

trim matrix
#

Ok ! Gonna watch

frozen spear
#

Its a 5 min tut...takes like 30 secs to set up once you learn it

gleaming hatch
#

Am I correct in assuming that you cannot generally work with delegates from blueprints? TMulticastDelegate is not a U-thing...

frozen spear
#

They have binding in blueprint

#

Not sure if they have a multicast but they do have bind delegates

gleaming hatch
#

When I try to make a function that returns a reference to a delegate blueprintable, UHT flips me off

#

:\

frozen spear
#

Did you meta it correctly

clear palm
#

@maiden wadi Ok, how could I make a variable reference global?

#

If I am spawning it in through the level blueprint for example

frozen spear
#

Putting it in gameinstance(sorry) or gamemode

#

Or even an actor...

clear palm
#

are you replying to my question @frozen spear ?

frozen spear
#

Yes sir

clear palm
#

ok

pine trellis
#

hey I have a false gravity plugin that I am trying to use in my game on 4.24 but the plugin is for 4.20, I try to load project but it says it cant and to rebuld from source

#

how do I rebuild the plugin from source? I know I use visual studio

#

but its not working

#

I open up virtual studio click rebuild and get this error

trim matrix
#

@frozen spear I found a way shorter, using get Actor of Class was perfectly working ๐Ÿ™‚ thanks you for your help !

frozen spear
#

As long as its the only one that will ever exist in a level

#

@trim matrix

trim matrix
#

Oh yeah, you're right, but for me it work well, quests are unique ๐Ÿ™‚

loud cipher
#

How can i go back to an older save of my project??

#

I fucked everything up

#

please help

zealous moth
#

unless you got ssource control or backups, this is not possible

loud cipher
#

can i not revert to when i last closed the project or did a saveall?

zealous moth
#

hm not that i know of

frozen spear
#

theres a way

#

with auto saves

loud cipher
#

Really

frozen spear
#

someone did it the other day

loud cipher
#

How can i do it with autosaves

frozen spear
#

i dont know personally, they found a guide somewhere on google

#

restoring from an autosave

#

and it worked for them

#

i was trying to help them find a way to recover a umap that became corrupt when they found that

loud cipher
#

I just deleted my content and dragged the auto savew

#

I think i fucked it up forever.

#

Nvm

#

Im trying to get an older save of my map

#

The new one is broken

#

When i use the auto save map

#

and put it in

#

it wont open in unreal engine

#

the older save3

trim matrix
#

I'm trying to save a boolean variable but it's not showing in the menu. I already saved a rotator variable that worked without problems

slim blade
#

What happens if you drag it from the left Components list to graph?

#

can't tell if you saved bp yet

trim matrix
#

without the save object pin

mortal heart
#

is it possible to make the player camera's children follow it when it shakes?

thorn fiber
#

anyway to get length from wildcard array?

keen arrow
#

is it possible to change postprocessvolume variables with player input?

#

in the first person template

#

there is a post process volume under lighting, but i don't know how to access it in blueprint

green crypt
#

(this gets texture from internet and loads it as a texture)

gloomy anvil
#

wuz hoping for some Blueprint help in 4.24 I had a simple level blueprint that on event play went to a looping sequencer that had a camera in it - it played once then went ot another looping sequencer that played forever with no camera or cuttrack - this let me in VR ride with the camera for 1 loop then after that everything would keep animating but i could fly around free - now in 4.25 its not letting me fly around after first loop- if i disconnect the level blueprint i can fly around fine -?????

thorn fiber
sand shore
#

literally impossible to give you a specific answer without seeing all the places you use that loop from or the error message....

#

But if I had to guess, you need to actually connect an input array to the macro

#

A secondary reason might be a const array? I doubt that one.

thorn fiber
#

that's the default FoorLoop from Standard Macros @sand shore

#

It is wanting me to use a specific type

#

But it itself doesn't use one?

#

Idea would be Specfic Type To CustomMacro Wild Card to ForLoop from Standard Macro

sand shore
#

Okay, you shouldn't be hitting that problem at all

#

Show me the actual for node in your actual graph.

thorn fiber
#

I'll move up the next

#

to show you the whole picture

sand shore
#

Well, error messaging would be a slight improvement, yeah.

sand shore
#

Oh so you're nesting macros?

thorn fiber
#

yeah

sand shore
#

That's your problem, I think.

thorn fiber
#

well

#

its a problem

#

but even if I fix that

#

by lets say taking the guts for the For loop

#

and putting into one Macro

#

The other macro up still has the same error with the Wildcard

sand shore
#

Try it out?

#

Because without error output I can't give any other suggestions

thorn fiber
#

Well I can DC the for loop

#

and still have the issue

#

One moment

#

I'll get you error message

dapper siren
#

If I dont have my BP nodes attached to any tick, theyre just sitting in space because i may want to reuse that code one day, will that affect performance in any way?

sand shore
thorn fiber
#

is it not visible?

#

I can type it out

sand shore
#

It's fucking obtuse

thorn fiber
#

if it isn't

sand shore
#

is what it is

thorn fiber
#

why?

sand shore
#

Because it's an expectation around here, and in fact most online communities where you get some kind of tech support for development issues, to give suitable context.

thorn fiber
#

"The type of target array generated from expanding ShuffleWith Seed is undetermined. Connect something to Length Generated from expanding Shuffle with seed to imply a specific type.

sand shore
#

The entire time, each of these windows has had an output window at the bottom of the screen with a full list of all the errors.

thorn fiber
#

I gave this context waay earlier

#

I told you the error already

sand shore
#

Well. Great.

thorn fiber
#

just not the entire text

#

and then I shared it (the entire text)

sand shore
#

Y'know what. It's the nested macro. The error is just offset to the next node.

#

๐Ÿ‘‹

thorn fiber
#

it isn't nested macro

#

oh

#

wait

#

it is

#

lol

#

why go off on this whole tangent

#

thanks

#

It compiled at least this time

#

but my macro still throws the error

#

which is what threw me off

#

let me hit play and see if it actually runs

#

it does

#

Guess I'll gut the for loop too

#

Looks like an old issue

sand shore
#

why go off on this whole tangent
@thorn fiber Because it shouldn't be 20 questions and then some gif with a tooltip

#

Anyway, yeah, the nested macro thing is super annoying.

#

It's something that I was considering fixing around a year ago

thorn fiber
#

with as many votes as the issue has

#

surprised it hasn't been taken care of

lucid granite
#

I renamed my project and I need to re-set my blueprint parent classes

but it can't see any of my project classes
why is that and how do I fix this?
thx for help

it can't even see just a plain actor
forget pawn or custom pawns or anything like that, any ideas to what is broken?

thorn fiber
#

since Oct 2, 2015

sand shore
#

I'm not. It's not very surprising to me at all

thorn fiber
#

wow

sand shore
#

I've been around the code responsible for that.

thorn fiber
#

tricky?

sand shore
#

Very much

thorn fiber
#

Ah

#

lame

#

too much recursive BS?

sand shore
#

Not so much, no, but my solution to it started crashing the editor when they wanted me to not use members on pins

#

ยฏ_(ใƒ„)_/ยฏ

thorn fiber
#

Might look into it

#

Or maybe I'll just make a C++ function that does what I want

#

lol

#

Hence why it never gets fixed

sand shore
#

Yup

thorn fiber
#

Poor BP only folks

sand shore
#

Making a generic array function to shuffle with seed should be cakewalk (and a good PR)

thorn fiber
#

Oh to add to the Engine?

sand shore
#

make it in your game, then port that to the engine and submit a PR, sure.

#

If you want.

thorn fiber
#

aight

#

Thanks again

fathom cobalt
#

I gave my character person an interface bp, but the "interfaces" tab under the "my blueprints" thing isn't showing up

sand shore
#

give it a compile, possibly?

peak plaza
#

I see a failed there though.

sand shore
#

I renamed my project and I need to re-set my blueprint parent classes

but it can't see any of my project classes
why is that and how do I fix this?
thx for help

it can't even see just a plain actor
forget pawn or custom pawns or anything like that, any ideas to what is broken?
@lucid granite If you renamed your project and loaded up the editor before doing redirectors, the class is going to be essentially irrecoverable

fathom cobalt
#

that was part of a different tutorial

#

also I did compile it and even removed the other one for safe measure. neither of them worked

trim matrix
#

Hello, had a question for bp users. In an effort to hold good habits i'm always trying to optimize along the way inside my character bp. My question is about a bp I made recently, and whether what I did to enable it on and off is actually helping with optimization or not really doing anything:

#

So I had a bp function that is attached to my tick chain which line traces from the player camera to some meters in front of them to check for items, and returns a true state bool if an item is being aimed at. In an effort to make it more efficient and less costly, I have a seperate functions using the on component overlap event trigger for a component I attached to the player character (a vicinity collision sphere that extends about 400 units from the payer in size). If the component overlap is called, im getting the overlapped actors parent class and returning a bool on a branch if its == to the class "Item" I set up for child items I spawn in the world. On begin overlap the bool for CanStartItemSearch is set on, and on end ovelap is set off. There is a branch to the entrance to the line trace function checking the state of this bool before continuing the tick through.

#

Im pretty sure this is some sort of optimization but wanted to know for sure if this actually will help or if it has no effect since the bp is still checking for on component overlap/end overlap.

fallow magnet
#

Hi, yesterday I've started my making of Cubers: Arena, the game I'm working on for last 4 years. It's 90% made in blueprints, So You can find many interesting solutions on this channel. 1st video is about projectiles on spline (fake :P)

steep dome
#

Hi guys,

absolute beginner here having a quick question about blueprints & timers. Anyone willing to help me out really quick?

#

I'm working on an OnCharacterMovementUpdated event blueprint (i suppose this is the right one for my request, please correct me if I'm wrong).
I want to gradually increase the value of an variable based on how long my character has been in "moving" state. And on the other hand decrease that value twice as fast as soon as the character stops moving.

Thank you in advance!

maiden wadi
#

@trim matrix Honestly, traces are very cheap, a lot cheaper than collision stuff. I don't think you're doing yourself any favors by adding the extra complication for what is going to be an incredibly negligible increase in performance. If you really want to improve your performance on stuff like that, I recommend just dropping the line trace amount. I find that 20 times a second, or an interval of 0.05 works perfectly fine for most circumstances to see what the player is looking at. I used to do mine on an event timer in the characterBP but these days I just use a separate actor scene component that has it's tick interval set to 0.05 so that I can do the trace on tick in the component itself at only 20 times a second. Only other real way to drop processing time on that is to reduce your stuff you're doing every frame. For example, not calling an interface message on the same object over and over.

deep ferry
#

hi guys, beginner here.

anyone here know how to or have a tutorial to integrate ALSV4 with SGK ?

#

Thanks

steep dome
#

Quick update regarding my question - I can also provide my current blueprint, if that helps

frozen spear
#

@trim matrix @maiden wadi nailed it...what you did is absolutely fine...but the difference that dropping tick intervals from every frame to 10 ticks a sec is extreme...and remembering to disable tick functions on all actors thay dont use tick also helps

lyric marsh
#

Hey guys anyone ever run into this error after a crash before Assertion failed: !MixerBuffer [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSource.cpp] [Line: 437]

vast lion
#

Why would one component not attach to another?

#

Log won't tell me why. I see the node for attachment getting called, but the components clearly don't move together.

#

Guess a difference in mobility could cause that?

maiden wadi
#

@steep dome Hard to say without knowing exactly what it is you want to increase over time. In my head when I read that, I get that you want to change a float from like 1 to 3 over five seconds, and then when not moving slowly change it back to 1. If that's the case, I'd recommend just going with a clamped float on tick with some math. Is it just a single float you're trying to gradually increase? If so, what time frames were you looking for?

steep dome
#

@maiden wadi Thanks for getting back to me!

So maybe it helps if I try to explain a bit further - again - I'm really a rookie & started a few days ago.
I'm currently experimenting with a Sidescroller and I want my character to build up a variable called "Charge" while moving (and only while moving, it should decrease as soon as movement stops).

So I'm currently using OnCharacterMovementUpdated to check, if my character is moving (that seems to be the wrong event actually, because my debug string gets printed like 10 times a second without even moving)

So let's say my character starts moving, i grab velocity from that to see if it's larger than 0 and add +2 to the Charge variable per second moving and subtract 2 for every second that my character is not moving

#

Is there a way to export my blueprint as screenshot or anything like that? Maybe that would help

maiden wadi
#

WindowKey+Shift+S is how I take easy screenshots. Looking for that event because I'm not familiar with it.

tight schooner
#

@trim matrix To add to what others have said, updating BP components and checking for overlaps has its own cost. I wouldn't worry too much about optimizing your player pawn unless you're managing replication in #multiplayer... It's not going to kill performance if you have a handful of ticking actors in the world. If you're spawning hundreds of a certain actor class though, I'd direct your efforts there. But otherwise BP is more performant than it's often made out to be. (If you want to see exact per-BP performance, try the Unreal Insights profiling tool.)

maiden wadi
#

@steep dome I mean. It comes down to how precise you want it to be. If you always want exactly two up or down for every second moving or not moving(Meaning also that there would be no change if the player moved and stopped moving every half second.) Then all you need to do is start a looping timer at the beginning of movement and the beginning of the stop that'll loop every second and increase or decrease your charge.

steep dome
#

@maiden wadi Well, maybe the count needs to be more precise than 1 second, but for starters it would be great if i get it to work like that, I've attached my blueprint (hopefully the quality is sufficient), basically the whole Charge being multiplied by vectorLength needs to be changed to "Charge" being multiplied by the seconds my character is moving

vast lion
#

I'm confused, does the construction script for an actor not get called when you play in PIE?

maiden wadi
#

@vast lion It should get called once in PIE.

ocean radish
#

@vast lion Don't use conscription for gameplay related tasks, its mainly for stuff that needs to be calculated Before gameplay.

#

construction^

maiden wadi
#

@steep dome I realized why I'm not familiar with that event, I didn't realize that it was supposed to be for the level blueprint. Can I ask if there's a reason you're using the level blueprint over the character class?

ocean radish
#

@vast lion construction scripts for pre placed objects are ran in the editor as you place/update the object, in a built game they are run in the cooking process, and for dynamically placed they are ran when created, but be wary not to intertwine construction and begin play together, can cause some issues if they rely on each other, or one to finish first etc

steep dome
#

@maiden wadi I really didn't know better. I just thought the level blueprint is the place where the nodes etc. go

dim kiln
#

Anyone know why my VInterp To is not working? I want to rotate an object smoothly and not SNAPPYily. I have tried it 2 different ways and it always snaps.... any help would be appreciated โค๏ธ

maiden wadi
#

@steep dome Level blueprints are generally for one time only things that relate directly to that level. It's really hard to come up with an example that can't be also done inside of a class. Mostly this should be used for simple level design features. Lets say you have a whole game that's about running around and hacky slashing, and one single level that's just some cave where you can open it and unlock it. You might handle this in the level blueprint instead of creating some classes for this because you're only using it once and it's not being repeated in any other level. But for general gameplay designs, I strongly recommend learning to use the class blueprints themselves for stuff like this. In this specific case, create a blueprint class that has the sidescroller character as a parent. It'll be the same thing and you can add code and modify it as you want.

#

@dim kiln What is the value of DeltaSeconds?

dim kiln
steep dome
#

@maiden wadi Okay, so use class blueprints for all the general stuff, and only use level blueprint if something differs from my general settings and behaviours, right?
Could you help me with a basic blueprint that increments a variable by 1 for each second the Sidescroller character is actually moving?

untold fossil
#

Is there a way to get a string from a key structure?

#

Key structure as in keybinds

#

I'd like to get a string version of the actual key to display in an actionbar which keybind is set to which action

atomic prairie
#

hey, can we control all the sounds with blueprint? As we could control it with the sound mixing of windows?

mortal heart
#

is it possible to make the player camera's children follow it when it shakes?

untold fossil
#

found it

frozen spear
#

@untold fossil you can see all the vars in it by breaking key btw

#

Drag off and break

#

Or right click and split

#

@steep dome if you absolutely need some logic that doesnt make sense to put in something like character that needs to persist between levels you can look into using GameInstance instead..level bps are destroyed when the level unloads

steep dome
#

@frozen spear Okay, gotcha - thank you!

ocean radish
#

@dim kiln I like to use timelines to set smooth rotation, lets you use a curve too which is nice to give a custom feel

vast lion
#

Should I be using FColor or FLinearColor?

#

They seem pretty similar to me

merry ridge
#

Hey guys, there is a neat BP node "construct object from class" which allows me to spawn a OBJECT(not actor) class without physicly creating it in a scene
for example: i need to access variables of a spell blueprint such as texture2d or skeletal mesh. Get class defaults doesn't allow me to get these types of variable, only basic ones
so i use "construct object from class" and get only info i require.
But the problem is that OBJECT class doesn't have all these neat features of Actor.
And i really wish to have all the variable data and functions data in the same BP class.
When i try to plug ACTOR class in this node, the "instigator" input appears and nothing that i try to plug it in works

#

is there any way to make it work?

#

or maby a similar node to get actor variables without spawning it in scene?

dim kiln
#

@dim kiln I like to use timelines to set smooth rotation, lets you use a curve too which is nice to give a custom feel
@ocean radish you cant have a timeline in a function ๐Ÿ˜ฆ

ocean radish
#

@dim kiln nope just make it a collasped event graph if you want to tidy it

viscid valve
#

Is it possible to change actor properties before physically spawning it? Things such as collision, gravity and physics toggles

#

I thought perhaps I could "construct" an actor and then consequently "spawn" it, but it looks like construct and spawn nodes are the same thing, except spawn has a transform

#

I keep finding myself wanting to alter these properties after an object has already been created, but it seems like the engine dislikes this - I'll try and change those properties and oftentimes they don't change as I expect them to

distant sedge
#

You could make custom vars exposed on spawn and set them on the spawn node you call, then immediately change actor properties on BeginPlay based on them.

viscid valve
#

ahhhhhh this sounds good

#

I shall give this a try - I forgot about the expose on spawn option!

#

Though spawn actor doesn't seem to give me the vars despite exposing them on spawn

#

Ah... it's probably because the spawn I am doing pulls the class out of a variable from a data asset

#

If I don't explicitly specify the exact asset I will spawn, I lose the ability to change properties on spawn by the looks of it

#

The assets that will be spawned are all children of the same parent class, not sure if that helps

hoary phoenix
#

1 writes a variable
2 she is still there
3 cannot access her,
does not perform a function
what to do ?

quartz field
#

Hello, when 2 actors overlap with each other, I want to spawn a fx on the impact point, I thought it would be fairly easy, but I'm struggling with it since 3h urf. I first tried to get the "sweet result impact point" from the "on component begin overlap" function, but it always return 0,0,0 for some reason. Then I tried to create a "Sphere trace by channel" that is basically following my actor but the "out hit impact point" always return the center of the sphere (instead of the.. impact point) Any idea of to fix it ?

hollow flame
#

@quartz field please show code

quartz field
hollow flame
#

what is Zaq variable, is this character or something else object

quartz field
#

it is the character that is moving yes

#

A is the character, B is the obstacle, 1 is where the fx spawns, and 2 is where I would expect the Fx to spawn

#

you can see sphere trace debug

#

so I assume that when the spere trace detects the collision with the obstacle, it spawns th Fx at the center of the sphere insted of on the collision point between the obstacle and the sphere trace

strange turtle
#

I'm trying to add a spotlight via Add Spot Light Component on BP. Is there any way I can take properties from another available spotlight component?

#

@quartz field What happens when you decrease the radius?

spark steppe
#

when passing a struct reference to a BP function and setting members on the reference i get a warning that the struct ref is readonly, but the members are still changed

#

so is that expected behavior and the warning is wrong, or is it a bug?

#

(i'm reading the changed values outside of the function)

quartz field
#

@strange turtle same :/

visual canopy
#

Hi everyone,

I have a question, maybe a strange one but here it goes:
I am trying to make the decal NOT project on more axis than one. I want it to only project on the surface where it is pointing and not on all surfaces encomppased with the whole volume. Does anyone know how to achieve this? Thanks a lot.

strange turtle
#

@quartz field Wild idea but why didn't you go with collision detection and chose tracing instead?

#

@visual canopy Can you mark where you want the pivot?

visual canopy
#

@strange turtle i want the pivot there (like on the picture) but i dont want it to project on side surfaces of the box, only on the floor

quartz field
#

@strange turtle Both my obstacles and my character have collisions set to "overlap all" and in the "on component overlap" node and from I understood the only way to get the impact point from an overlap event is to break the sweep results, but I do so, the impact point return 0,0,0 for some reason

strange turtle
#

Hmm, well it seems like its colliding with itself?

#

Try increasing the radius then

hollow flame
#

@quartz field you need event hit node in both actors. also you cast to other actor to make sure it only spawn fx when they overlap

upbeat sinew
#

Anyone know how to grab percents of true Booleans within a struct?
For example: if 50% of boleans are true, Do This or 75% Do That

quartz field
#

@hollow flame I also tried that but the hit event wasn't firing even after I ticked the "trigger hit events" for my obstacles and my character, could it because my collisions are set on "overlap all" ?

strange turtle
#

@upbeat sinew Foreach loop the struct, on a temporary variable add 1 for true values, after the loop is complete, multiply the value with 100 and divide the value with "struct length"

#

Should do the job ๐Ÿ˜„

#

@quartz field It would really help if we can see the debug lines

spark steppe
#

@upbeat sinew that really looks like something you should use a Map instead of a struct for

#

then you can iterate over said map as suggested above

visual canopy
#

@strange turtle have you ever tried to tackle the decal projection thing? I am trying for 2 days now with no luck ๐Ÿ˜ฆ

quartz field
#

Does "simulate physic" need to be enabled to trigger hit events ?

strange turtle
#

From UE4 Documentation: For collisions during physics simulation to generate hit events, 'Simulation Generates Hit Events' must be enabled. Note: When receiving a hit from another object's movement (bSelfMoved is false), the directions of 'Hit.Normal' and 'Hit.ImpactNormal' will be adjusted to indicate force from the other object against this object. Note: NormalImpulse will be filled in for physics-simulating bodies, but will be zero for swept-component blocking collisions.

quartz field
#

ah thanks

#

The debug lines of the sphere trace channel are visible on my first screen, which others would help ?

hollow flame
#

set collision preset to block and check "simulate generate hit event" in component @quartz field

strange turtle
#

@visual canopy I did

visual canopy
#

@strange turtle nice! would you share please? ๐Ÿ™‚

strange turtle
#

If you dont want specific meshes to receive decals

#

You can use "Receives Decals" variable to disable it

visual canopy
#

but thats not the thing that I want. I want the decal to project only along some axes

#

I want it to project on mesh A but on sides facing up, but on the sides facing other direction i dont want to project

#

all as a part of one mesh

hollow flame
#

@upbeat sinew

strange turtle
#

So you want the same mesh but only on lets say X axis?

visual canopy
#

yes

upbeat sinew
#

?

#

@upbeat sinew that really looks like something you should use a Map instead of a struct for
@spark steppe That's True, Just gotta move everything into maps tho ๐Ÿ˜ฆ

strange turtle
#

@upbeat sinew Your division looks a bit incorrect

#

You should divide by the number of total items

rancid ridge
#

My ai character is not moving from point a to point b. Im using the AIMoveTo Node, NavMesh looks correct any idea where the problem is?

#

I also have a delay at the beginning befor calling AIMoveTo just in case

strange turtle
#

@rancid ridge Can we see your bp?

upbeat sinew
rancid ridge
#

@strange turtle I created a new project and there it does work. I will try to create a new ai in my current project and if this does not work I can send a screenshot

unique falcon
#

Afternoon, when making a really accurate timer, is there a generally agreed-upon best practice?

#

I've been checking out the below tutorial but it suggests using Timelines which seems like an odd choice

https://www.youtube.com/watch?v=KS6In6yJerM&list=PLZlv_N0_O1gYdhCvvMKGpCF6LCgBz9XeS&index=8

In this video we work on the functionality to display and keep track of the race and lap times and test them through debug code. We also create and use a macro to convert the float value used in our race to a timer-style format in text format.
(00:05) - Intro
(00:34) - Timer &...

โ–ถ Play video
#

World Delta Seconds and Event Tick seem tempting also, but maybe that's not smart for optimisation either

rancid ridge
#

@strange turtle I found the problem. If I change the Agent Radius in the RacastNavMesh Default Actor from 35 to 32 is stopps working. Changing it back to 35 and it does work again but why? This value should only make it stop working if I increase it or do I misunderstood something?

strange turtle
#

@visual canopy I was experimenting with materials but couldn't find a solution. Decals are really hard to work with in advanced manner. I would suggest using mesh decals but that would get really frustrating if you have hundreds of different decals. I would be interested to hear if you find any solution

#

@rancid ridge Your "move to" point might be too far when you decrease the radius

rancid ridge
#

@strange turtle But decreasing the radius does not mean less navmesh surface. It increases the surface and is more accurate so this would make no sense ๐Ÿ˜ฆ

tight schooner
#

@unique falcon you could also save Get Time Seconds into a variable (call it "start time" or whatever) and then you can get the elapsed time by subtracting the saved variable from the current Get Time Seconds on-demand.

Basically Get Time Seconds is your game clock, and the only piece of information you really need is when the race or lap or whatever began. The timeline method in the video (which tbh I only glanced at) should work as well. The performance differences between the two approaches should be negligible so try whatever you want.

#

Timelines have a lot of extra functionality/potential but I'm not sure how one could use that for simply timekeeping.

#

Sometimes people like to use timelines as a self-contained pseudo-tick

unique falcon
#

Yeah that's what I thought as well, I assume there's no issue with doing this and I couldn't really see the benefit of using a timeline with a linear float value in it just to track time

trim matrix
#

Well @maiden wadi and others, thanks so much for the tips/ insight. Maybe just dropping the check to 20 a second or around that as well as taking a look at how my item text is appearing will be the best approach

ocean radish
#

@rancid ridge when you say that it stops working, do you mean its no longer being updated? or your ai is no longer working on it?

rancid ridge
#

The nav mesh is being updated and it looks fine but the ai is not moving. Same in a new project (4.25) so maybe you can reproduce it if you want

ocean radish
#

your ai collider is prob too big then

#

set there radius smaller

#

If i remember the navesh actor size needs to be larger than your ai that use it

#

@rancid ridge

rancid ridge
#

ok but how can I get a more accurate nav mesh then?

ocean radish
#

cell sizes

rancid ridge
#

is at 1

ocean radish
#

let me load up ue and i'll tell you cant remember exactly all the settings

#

mm i think i might be wrong, with the radius, it should be the other way round

#

how come you need it to be that accurate down to 1 cell width

rancid ridge
#

I want the ai to use the whole path

ocean radish
#

setting it in project settings seems to work

#

@rancid ridge nope still not working with that, it rebuilt nav mesh when I set it so thought it changed it didn;t change the one in the level :/

rancid ridge
#

For me it ignore the agent radius in the project settings (I have deleted the RacastNavmesh Actor)

#

saw your answer to late ๐Ÿ˜„

#

Looks like a bug to me

ocean radish
brave nexus
#

does anyone know what could be causing this. Looking online doesn't help me very much. This only happens when a bullet hits another player and I think it is slowing my project down.

twilit heath
#

means the whatever you hit is not net addressable

#

well, bullets aren't net addressable

#

which means you spawn them locally

#

which in turn means you can't send a reference to them via RPC

maiden wadi
#

That error is in a few popular games. Seems like an odd thing for seasoned people to miss.

twilit heath
#

thats FPackageNetGUID i think

#

one you're thinking about

#

that happens when you say, spawn a component on BeginPlay on a replicated Actor

rancid ridge
#

@ocean radish I had an other game with an AI and it does not work with 4.24 and obove (dont know which version worked last) so I dont think that this is how it should work.

abstract socket
#

While launching the game, none of my actors appear in the newly loaded stream level, neither those spawned in the editor nor those spawned in BP.
It works fine in PIE, what could be causing this?
They're simple Actors that only contain Sprite and GameplaySystem components, their Simulate Physics is unticked and I'm also printing their position, it doesn't change at all, so I doubt they're falling off the world.

tough ore
#

Hey! I Dont know if this belongs here but, how can i make it so when you are chrouching you could still fall?

#

And yes I'm a beginner

hot wedge
#

how can i prevent my floor creating hit events?

#

It is turned off but I don't know how it generates them

lucid granite
#

I am very happy, now with 4.25 I can hot-reload after calling createDefaultSubobject and not have any transform issues.

#

nice fix ๐Ÿ‘

versed sun
#

@tough ore i think there is a "can walk off Ledges when crouched" in the character movement

#

if that's what you are asking

lucid granite
#

Any way to make node strands light up when you click on a node?

#

by default without actively pressing a button

versed sun
tough ore
#

@lucid granite Thanks! I got it working now ๐Ÿ™‚

lucid granite
#

Awesome ๐Ÿ‘

worthy pendant
#

I got a MAD stupid math question for y'all
What would be the easiest way to set up an inverse ratio between two floats

If float A = 1 , I want float B = 0
And if float A = 0 , I want float B = 1

I'm seriously blanking rn

worthy pendant
#

Not like that, haha
Not literally those values

#

I essentially want an effectiveness multiplier

If the effectiveness is 1 (100%) I want the output to be 0
If the effectiveness is 0 (0%) I want the output to be 1
If the effectiveness is 0.5 (50%) I want the output to be 0.5

versed sun
#

ok, a lerp ?

worthy pendant
#

Yea, thats what I've just figured out, lol

jade cape
#

hey anyone able to make me a simple walking loop for a model i will dm you

sand shore
jade cape
#

oh ok

#

how do i post in looking for talent

sand shore
#

Read the description or pinned post

jade cape
#

ok

rough wing
#

It was going all well until I realized they don't overlap.

#

Is there any way I can get which child component was hit?

devout condor
#

any one know if its posible to have a pawn as a componet in another pawn?

#

for example a turret for a vehicle?

lucid granite
#

I am getting an "Infinite while loop detected" when using a while loop that checks a reference. Is there a way to over-ride this security protocol?

plush ridge
#

@lucid granite No, infinite loops are not allowed. Your loops will attempt to complete in a single frame but can potentially take an infinite amount of time to do so and this would break your game, so the engine won't let you attempt it. Either:
a) make sure the loop has a guaranteed way to exit, or
b) delay your checks to not pressure the engine to exit successfully in one frame

lucid granite
#

Ok, so I am trying to follow a tutorial (with an older version of ue4) and I need to ensure that the game mode blueprint has been initialized before calling "beginPlay" on an actor. What is the best way to do that?
I tried using event tick and I noticed that the timing is the problem.

#

I'm thinking I may just go back to using C++.
The only issue is that if I don't first do it in blueprint like the tutorial, then if I do something wrong it will be harder to backtrace.
However, it is looking like my blueprint is going to be so much different, it probably wouldn't matter which way I do it.

worthy pendant
#

@rough wing The "Hit Component" output on the hit event

plush ridge
#

@lucid granite In the gamemode, when initialized, set a boolean to True (false by default). In other BPs that rely on the gamemode being active, simply check if the boolean is true, and if it's false, delay 0.1s and check again. Unless your logic absolutely requires same-frame recognition, the above workaround is fine.

lucid granite
#

interesting, I didn't think about trying to loop-back, i'll give that a shot

#

I don't seem to have it

#

the 2nd picture is not from my project

#

setdelay I think is it now

plush ridge
#

You can just run a regular 'delay' node with a 0.1s time

#

@lucid granite

lucid granite
#

do you know the tree structure for that?

plush ridge
#

not sure what you mean by 'tree structure' but

#

here's what it would look like

#

this still has the possibility of running False forever, you just need to make sure the gamemode boolean can be True

devout condor
#

@plush ridge how do you get your node paths to apear that way?

solid gyro
#

I have a quick question! I'm using Random Sequence Player to randomize the death animation but I can't figure out how to stop the animation loop after the player dies. Any ideas?

plush ridge
#

if it's never ture, the problem is elsewhere

#

@devout condor It's a plugin called Electronic Nodes (highly recommend!)

devout condor
#

oh

lucid granite
#

audio > effects > delay?

plush ridge
#

oh

#

are you pulling from something that is not a standard execution pin?

#

either pull from an exec pin and try, or right click in a blank spot and do it

#

delay is not inherently linked to any specific variable type

zealous moth
#

@solid gyro use montages

lucid granite
#

@plush ridge I'm coming right off of Branch > false same as you

#

I checked several times, I don't see it

plush ridge
#

Flow control is where it is

#

Very strange if you don't have it, it's one of the most basic native nodes in Unreal .. ;/

lucid granite
#

don't have it ๐Ÿ˜ฆ

solid gyro
#

Thanks for the advice. I will have to look up how to use it! ๐Ÿป @zealous moth

zealous moth
#

you cannot always delay, where are you trying to delay?

#

Ok, so I am trying to follow a tutorial (with an older version of ue4) and I need to ensure that the game mode blueprint has been initialized before calling "beginPlay" on an actor. What is the best way to do that?
I tried using event tick and I noticed that the timing is the problem.
@lucid granite you can make your gamemode or controller call to spawn your actor; either way why do you need this check for?

lucid granite
#

the game mode spawns my characters.
The camera (world asset) needs references to those characters (created by the game mode)

zealous moth
#

then why not make your characters tell the camera

lucid granite
#

Sounds like a good way of doing it, I was hoping I wouldn't have to veer too far off of what the tutorial is doing though. valid method though

zealous moth
#

i noticed many people are used to "Getting" data but forget you can always "tell" or "set" it inversely

#

๐Ÿ™‚

lucid granite
#

another method could be to create a "bool initialized" and on tick, check for the characters that have been created, once they have been created, then go through with everything and set bool to false to not get called again

#

but your way is better because less would be in the tick

zealous moth
#

nah, don't tick it; make a timer and run it at beginplay and if you succeed, disable it

lucid granite
#

even if it is just a bool check

zealous moth
#

tick would mean every frame, so between 30 fps (0.03s) to 60 fps (0.016s); that is way faster than needed in real time; if you make a timer, you can check every 0.1 to 0.2s which is not perceptible by humans

lucid granite
#

well I won't be putting it in tick anyway now, but thanks for the input

#

the tick method was more for a hot-patch to get something up and running, but I am going to re-write it

zealous moth
#

in my experience, the only thing tick is good for are animations or followings; otherwise everything can be set on timers below human perception threshold

lucid granite
#

do agree

old prism
#

is there anyone who wouldn't mind hoping in a screen share chat in order to help me out with two topics

spare patio
#

trying to get this to work forward, left, right, and backward. i would like to hold w,a,s or d and press shift to move in the respective direction. any help is appreciated.

frozen spear
#

@spare patio shift is already a modifier you use when assigning inputs...you would create it like normal movement but in the action mapping put a checkmark in the 'shift' modifier..see if this would suit your need

#

Basically it would require both shift and a key to be held to move in that direction

#

Or are you trying to do impulse style movement like a rocket ship?

spare patio
#

@frozen spear i want to teleport my character 500 units in the direction i am running

frozen spear
#

Like a mage blinking in an RPG?

spare patio
#

yea. kind of

#

you see the image of my bps

neon remnant
#

@spare patio if i where tackling that problem i would make a vector varible
and whenever you press a key (w) then it will set it to the appropriate vector (0, 1, 0/ the forward vector)
then when you release that key it resets the vector
then you use that vector for your movement

#

the only thing about that is it introduces the problem that if you hold one key then hold another and release the first key it the vector will be default

spare patio
#

@neon remnant thats what i am using get actor forward vector for

#

did you guys even look at my bps

neon remnant
#

yes

#

im saying you change the vector you are using depending on what key you press

#

are you even looking at my awnser? ;)

frozen spear
#

I glanced at it but mostly just read the poor explanation without a actual example of an instance that might exist in the 1000s of games most of the people here have most likely played....youre recreating world of warcraft mage blink skill with the direction rune..

On that note goodnight all

neon remnant
#

goodnight

#

anyways ima bump my question

#

why is the "contains" node always returning false?
search in is "HitBox_lethality03"
and substring is "leathality03"

im trying to make it so that different hit boxes will do more damage when hit. if there is a simpler solution to this then having a list of different hit box types and finding what type the hit hitbox is please tell me.

spare patio
#

@neon remnant i am trying to figure out how to do what you said

#

i looked at your question and i duno how to help

neon remnant
#

i explained how you should
every time the user presses a key set a vector varible to the respective vector (w/forward or a/left)

#

then when they release the key reset the varible

spare patio
#

hmm

frozen spear
#

Danger your loop body not connected to anything on purpose?

neon remnant
#

oh yeah there was a print statment there to show off what was happening but i removed it

frozen spear
#

If you have like collision on multiple parts of your body, im not sure there would be an easier way to do it unless you took it to c++ instead

#

You would need to add custom tags to the different collisions

neon remnant
#

can i right just 1 blueprint in c++ i might have to do that

#

write*

#

why is my english so bad today

frozen spear
#

Well custom tags on the collision is what you would want...then you can use the tags to compare or find the components without going through all this

neon remnant
#

wait is there a tag system like unity?

#

that would be so easy

frozen spear
#

Also make sure your collisons are interacting with physic bodies if the components are being hit with physics actors

neon remnant
#

im simulating the colisions atm

frozen spear
#

And yeah there's a tag system in ue4 but not every component can have them unless you make custom versions of the class youre trying to use them on

neon remnant
#

alrighty

frozen spear
#

Check your collision setting make sure they generate hit events..
Make sure they interact with physics bodies

#

Set the main capsule of the character to ignore the physics bodies or it will consume your events before the body arms legs head whatever even has a chance to

neon remnant
#

ok

frozen spear
#

Or atleast overlap instead of block

worthy pendant
#

Character wont stop rotating towards direction of movement, even though this is disabled
Any help?

neon remnant
#

@worthy pendant can we get more context?

worthy pendant
#

Oh, this channel is active
sorry for the interruption

frozen spear
#

Check your camera setting

neon remnant
#

no its ok

frozen spear
#

The pawn and the camera both have settings that do that

worthy pendant
#

Uh, sure

I'm trying to make the character face the mouse cursor
Which currently works perfectly fine, when they aren't moving
Once the character starts moving though, they turn to face the direction of movement, even though it's disabled

#

im aware

frozen spear
#

You using 1d animbp for walking?

worthy pendant
#

No anims

#

I'm talking about the whole character

frozen spear
#

Trying to brainstorm what else would cause that

worthy pendant
#

It may have something to do with my update rotation there

I disabled it, and it's not rotating to movement anymore

neon remnant
#

i feel like something wacky is going on with the convert mouse location to world space thing

worthy pendant
#

Like
In my implementation of it, or in general?

#

aaaaand I got it working

#

Instead of using the location of the cursor, and a look at rotation, I used the direction output and a rotation from XVector

frozen spear
#

Awesome ๐Ÿ‘

spare patio
#

@neon remnant @frozen spear this is what i got. it seams to work as intended. thanks for the help

#

if anyone knows any ways to clean it up i would appreciate it.

neon remnant
#

you can do that a lot cleaner ill try and make an example rq

worthy pendant
neon remnant
#

lol thats the same with my current game

#

also i fixed a potential bug where if you where not looking forward your dash will be in the wrong direction

spare patio
#

my controls are forward facing

#

i honestly dont really understand that

#

lol

neon remnant
#

ah

tribal axle
#

I have a bool array, and I want to check if everyone item in that array is true, how?

old prism
#

Does anyone know how to automatically offset coordinates say I wanted to teleport the player +300x +300y away how could I take the coordinates of a character and add that amount to it instantly

deep elbow
#

get ref to your character, get actor location, drag out from pin and get vector + vector, enter 300 in x and y, drag out that pin and plug it into a teleport function

#

if you want to do the x and y in local space to the character - use forward vector and right vector, multiple those individually by 300, add the result back to the actor location, and plug that into teleport function

#

Question: probably bee asked thousands of times, but is it possible to get the transform of the editor viewport camera. google gives me results for "get level viewport camera" which would be suuuuper useful but that doesn't exist for me.

spare patio
#

@neon remnant i got your method working. I dont know how to make it work with my forward facing controls though.

old prism
#

oh im pretty sure I saw that when i was poking around in my problem let me see if i can find it

neon remnant
#

@spare patio replace add actor local offset with add actor world offset if your actor cant rotate

deep elbow
#

Ok, needed to enable the blueprint editor utilities plugin

spare patio
#

@neon remnant i really tried your way but its causing issues mine dosent so ima just use mine. if i jump and change the way im facing it will dash the direction i was facing when i jumped instead of my current facing direction. also 0ing the variable out on release dosent work well when spaming different directions. sometimes you press a new direction before letting go of the old one and then when you do it gets zeroed out.

#

but it was interesting to work threw

neon remnant
#

ah

hollow tusk
#

is it not possible to mark a BP Enum deprecated?

deep elbow
#

you could use an anim notify from the end of the attack animation, that sets a bool in wherever you are registering the attack input, and either buffer the new attac input or just don't allow a new attack until the current one is finished

#

Question: does anyone know a way with the blueprint utility nodes to rename an asset in the outliner. There is a way to rename the asset on disk but I'm after renaming the ID in the level, can;t seem to find anything useful

deep elbow
#

Answer: "Set Actor Label"

old prism
#

Hey I'm having trouble for whatever reason my character cannot look around vertically

deep elbow
#

first person? make sure your camera has "use pawn rotation" enabled, if thats not it then check your player controller and see what pitch min and max are set to, if tha'ts not it make sure you haven't unhooked any input events that set pitch in your charatcer blueprint. if none of that works need more specific info

old prism
#

awesome thanks it was pawn rotation

paper aurora
#

has no construction script? it seems to be failing to access some reference and not finishing the spawn for that reason

#

hmm

#

does it inherit from any class?

#

can you send a screenshot of the construction script?

#

or is it just totally empty

#

hmm

#

yeah im not sure whats wrong then

#

sorry

#

do you have any references to MainHandWeaponReference?

ocean radish
#

@unique flicker on the variables list, click the eye and show inherited vars, then look for that reference in question and see if it is defaulted to something it can't access or right click and find refs

#

@unique flicker

#

@unique flicker look at the spawn node for the item, is there an exposed pin with that name?

#

Its very hard to know whats going on without seeing where its getting stuff from especially from code your not sure on, my eyes would be looking for PackagingResults: Warning: Accessed None trying to read property MainHandWeaponReference

#

that

#

mainhandweapon is just a variable, it depends on how that is set, it wouldnt just not get set because its on a character unless its trying to set it to something it cant reference or just not getting set at all

glacial eagle
#

Looks like you're trying to spawn an actor in the construction script of another, which I'm pretty sure is unsafe

ocean radish
#

take a screen of where the spawn node is

maiden wadi
#

Even Epic has stated that you're not supposed to spawn any items in the construction script. They never took out the ability to call functions from the Construction script, which can spawn actors, but there's a reason that the spawn actor from class node isn't available directly in the construction script.

ocean radish
#

well apart from procedural meshs and such

maiden wadi
#

Procedural mesh is a component, not an actor. Components are perfectly fine in the script most times.

ocean radish
#

you said spawn any items not actors ๐Ÿ˜„ my bad just making sure people were aware that certain are fine

maiden wadi
#

Where is MainHandWeaponReference?

devout tide
#

My editor crashes when trying to return an enum from a valid class, anyone knows how to fix this bug?

oak timber
#

@unique flicker Hey

#

yeah then randomly saw your name here lol

#

No i use my own but I know it well

#

your getting the issue with NPCs that spawn item actors yeah?

#

can you show me the code that spawns the actor?

#

and you get this error when trying to cook your project or all the time

#

do the NPCs spawn actors or just sets a mesh?

#

look in the NPC at the components it has

#

or if it has a controller look at the components on that also

#

yeah but is there a NPC controller ?

#

just move the code to event begin play

#

the load item node at the end

vagrant drum
#

I've just in to a strange problem, I added a loop that continuously kept updating all of my player info to see if it would fix a problem i previously had. However after deleting the blueprint for the loop it is still running. Have anyone here had a problem with deleted blueprints "ghosting"?

oak timber
#

then delete the other one as you don't need two

#

in the rifle whats in its construction script?

#

that message just means it can't find the compiled parent function

#

I wouldn't worry about it

#

np

sick solar
#

Is there anyway to make variables public based on context? For example I have an blueprint actor which has a Bool variable called "bEnableExtraOptions", which is always public and visible from the editor. When the user/designer enables this Boolean, I would like extra variables to be come visible, such as more Booleans, Strings, Ints, and Actor References.

#

Has anyone implemented such a feature before, and could provide implement tips?

frozen spear
#

@sick solar plugins or unrealengine would probably be a better place to ask that...plugins for sure cause thats all they do there is deal with the engine side of things ๐Ÿ™‚

sick solar
#

Alright, I'll shift over to #ue4-general then, as I'm not developing a plugin currently

rancid quartz
#

Hello. I'm looking for some general advice. How many times might a programmer need to get a variable from another class in Blueprint before it becomes more performant to promote it to a local variable instead?

frozen spear
#

it would be better to store the "other class" as a variable instead, i can imagine your casting that class every time to pull its variable

rancid quartz
#

Thanks for your response.

frozen spear
#

the expensive part is casting that class to "MywhateverBP" to drag off and get the variable

#

if you stored the REF instead, you can pull off it all day and it wouldnt hurt a thing

rancid quartz
#

I find myself very often doing that kind of casting in the construction script or on BeginPlay in order to get the game state/mode/instance. Then I pull off of that reference many more times in the script for its various variables. But I wonder if for instance, I'm constantly getting say, GameInstanceRef.S_PlayerInfo.Speed, is it more performant to just upgrade speed to a variable?

frozen spear
#

i dont think you would gain much from that...as MyObject--->speed ...is pretty much the same as Speed--->from MyObject from ref

#

it would maybe make your code easier to manage?

#

or nicer to read?

rancid quartz
#

But there's no lag communicating between two classes via reference?

coarse obsidian
#

HI there, I'm looking for a tutorial about gamemode that cover the basic of creation a team deatchmatch mode. Weirdly, I can't find a good one on Youtube, preferably in Blueprint as well. I'm currently using Advanced Session for the multiplayer. Anyone got this in a bookmark ?

frozen spear
#

as long as you already have the ref stored not really...its just pointers to memory, what i showed you above is exactly how the computer is going to read it

rancid quartz
#

Sorry, noon, I don't know a series on that one. But you could look at the Unreal Tournament project and see what they've done there.

frozen spear
#

myob->speed...speed->fromMyobj are the same thing

rancid quartz
#

Thanks, man, I appreciate your time.

frozen spear
#

its tough to put in it simple terms without going into a lot of detail about pointers and how they work

rancid quartz
#

No, no, I understand.

frozen spear
#

other than tell you as long as you have the Ref stored

#

its the same both ways

#

the "castTo" <---those are the ones that steal your milliseconds of compute ๐Ÿ™‚

coarse obsidian
#

yeah good idea @rancid quartz ๐Ÿ˜‰ thanks

rancid quartz
#

Even when working with larger datas like structs?

#

No problem, noon.

frozen spear
#

right...so long as your not doing "stuct of objs" pull off cast to otherThingBP--->speed...on everything in there

rancid quartz
#

Yeah, I understand. Cast only once, then promote.

frozen spear
#

if you are you might consider a different method

#

even then...as long as its not happening on a tick...or on functions that are constantly firing off...its ok if you need to do it from time to time

#

in something like for example...your switching into a map and loading your assets at a load screen

#

you cast everything and store variables

#

during the load

#

but if your doing "get all actors" then casting all actors for something like aiPerc...youll be doing TONs of casting unless they are nearly blind lol (2 ft vision cone)

rancid quartz
#

Yeah, I tend to only do it once on construction. But you know, because I tend to cast and store the same three things in so many classes, I always wonder if there were some better way to store them. In almost every class, I find I need access to the current Game state, mode, and instance.

#

I keep well and away from GetAllActors. That thing's got a warning right in its tooltip.

frozen spear
#

careful what you slap in construction...thats a compile time ref your storing...

#

not the instance that spawned

rancid quartz
#

Sorry, it's usually in BeginPlay.

frozen spear
#

^

#

if you ever notice variables on your stored refs are wrong..make sure to check where you store the ref

rancid quartz
#

Yeah, I'm currently going through that revelation right now actually. Apparently using SetMembers off of a map get node doesn't work well because I guess Get returns a copy. ๐Ÿ™„

#

Thanks for the tips.

frozen spear
#

๐Ÿ™‚ np at all

rancid quartz
#

Since I have your attention, do you know much about networking games?

#

Servers in particular?

frozen spear
#

not the best no unfortunately i only known enough to get myself out of a bind or what ive learned the hardway myself

maiden wadi
#

@frozen spear @rancid quartz Just a small clarification, actual casting costs pretty much nothing. The part of usual casts that cost are the isvalid checks. Pure casts are much better in this regard if you know your reference is valid.

rancid quartz
#

Oh, okay. I still appreciate you.

#

Really? Are pure casts more performant?

#

Cause I could make almost all of my casts pure. It's almost never a question.

frozen spear
#

also that casting creates objs in memory to compare the casted class that are not destroyed until garbage collection

#

it doesnt have a "charBP" laying around...it makes one...

rancid quartz
#

That makes sense, cool.

frozen spear
#

and it doesnt compare "this class is called charbp" it compares the whole thing...

rancid quartz
#

So the more complex the actor, the more expensive to cast?

frozen spear
#

lets also add that when we say expensive were talking about .00001 compute time lol

#

if youre having issues where youre getting FPS dips or stutters...its something in your games logic causing it

#

looking into the profiler can help track down the real culprit of your performance hits which usually for me is always draw calls

rancid quartz
#

Yeah, I have my eye on the profiler for when that day comes.

frozen spear
#

you gain more back in performance turning off "tick" on any actor that doesnt actually use it, and using merge mesh on a whatever staticmeshs you can then you would changing every single cast you ever did to pure cast

rancid quartz
#

Yep, I've got those habits worked into my practices.

frozen spear
#

and changing "tick interval" to less than every frame on any actor that doesnt absolutely need every frame updated gains you a nice chunk back

rancid quartz
#
maiden wadi
#

Here is a better explanation of the difference. All three are doing the exact same thing, with the exact same reference. The bottom one is already casted to the correct class. The top two are casting in the loop. Top one is a pure cast, middle one is an impure cast with the isvalid check.

rancid quartz
#

Wow, thanks for recording that.

frozen spear
#

that is an awesome example ๐Ÿ™‚

#

see it all in .000001 of compute...

#

so unless you are doing it on 1000 actors where it adds up visibly at the same time

#

the real problem you will have with the cast is the ram usage tho

#

not the compute

#

run around with 2gigs of garbage thats nothing but casted object until you close the game down(or unload level)

maiden wadi
#

Actually the one test that really surprised me was the Get functions on references. Validated Get is so much faster than getting and using an isvalid node. I expected a bit of a difference, but not 18-23 percent.

frozen spear
#

yeah but validated gets assume you know its there...if any part of it is invalid you just stright up crash

rancid quartz
#

What's validated get?

maiden wadi
#

Nah, it's just a different way to confirm if the reference is valid.

frozen spear
#

i must be thinking of a different function

maiden wadi
#

Right click on a blue reference and near the bottom you can convert to validated get.

frozen spear
#

i know i tried something everyone swore up and down was the best for performance that ended up getting me so many headaches i went back to the way it was

maiden wadi
frozen spear
#

the .02 of compute wasnt worth the headache

maiden wadi
#

What was it?

frozen spear
#

i cant remember, i thought it was validated gets

#

hey authaer you should profile that example and see what it dumps in your ram

#

or

#

share the code

#

i guess i could just recreate it myself

#

let me save this pic

maiden wadi
#

Which one?

frozen spear
#

the cast example

#

i can already see in which order theyre better but im wondering how much all 3 individually add to garbagecollection

#

18% tho

#

wow

#

hmmmm

devout condor
#

is posible to make a pawn a componet of another pawn?

#

for example a turret on a vehicle?

frozen spear
#

you click add component, and type the name of the otherbp and it should show up as a component you can add

#

@maiden wadi I cant seem to open the macro in engine or get vs to open the validated get function...im curious to see what its doing under the hood

devout condor
frozen spear
#

add it as its base class

#

or child actor then set its class

devout condor
#

@frozen spear what base class do you mean component?
how do I make a pawn base class also a component base class

frozen spear
#

but keep in mind doing this you cant modify variables on children classes in a LOT of cases

#

if there is a case where you absolutely need to do this which i cant think of too many cases where you cant find easier or more flexible solutions, your better off doing it in a custom c++ class where you would gain way better control over the child class variables

wise jewel
#

hey, i'm trying to randomize the flicke of a light per actor.

#

i want to use the actor id, or something equivalent, to set an offset to the noise function