#blueprint

402296 messages ยท Page 615 of 403

feral ice
#

zombiegame

#

with enum?

dawn gazelle
#

Yep. You change your variable type to map and set the secondary item to an integer...

feral ice
#

wow thats usefu

dawn gazelle
#

I'd also recommend initializing the map with the defaults all set to 0, just so you have them there ready to access, even if there is no ammo available.

feral ice
#

ohh so if i have ammo ak i can change it with this new

orchid garden
#

current ammo - current ammo = 0, spare ammo - 0 = current ammo

#

order of execution

#

set spare ammo, then current ammo

tight schooner
#

keep in mind that getters (and pure functions) always get the most current value every time a node uses them

#

Every executed node also re-executes the getters & functions attached to them, effectively re-doing the math from scratch

spark robin
#

Would it make sense to create a temporary array wildcard in a macro that runs several times every tick or would it be a better idea to create an array in the blueprint holding the macro to avoid memory allocating and being freed constantly. Or does this probably like not matter?
Please ping on reply ๐Ÿ™‚

proud hull
#

Really you just need to remove one of those subtract nodes, the first one

orchid garden
tight schooner
#

@spark robin idk but you can try benchmarking it by making it run 10K times in one frame and then manually calling Garbage Collection slightly afterward and see what those two frametime spikes look like ("stat raw" in the console helps)

spark robin
#

So you think it would affect frame time? @tight schooner

orchid garden
#

ticks are linked to framerate

tight schooner
#

I assume you're asking about performance and doing tests is kind of the only way to answer esoteric BP performance questions

solemn parcel
#

So my projectile needs to slow down the AI character it is hitting. I use the GamestateBP to process the slowing effect. The characters are slowed like expected, but after the delay it does not apply the backward operation : Slowed down to normal speed. Though it does exec after the delay.

spark robin
#

Yeah Idk I were thinking maybe it puts some unnecessary stress on the memory buzz. But Idk anything about how different pc components communicate so ๐Ÿคทโ€โ™‚๏ธ

Might do a test

I will just finish my program first and see if it can be optimized later if necessary

tight schooner
#

@spark robin generally speaking reusing stuff (e.g. pooling actors) rather than spawning and destroying things is lighter on performance and the way that UE4 manages memory via "garbage collection" but I can't say with any certainty that, if you do this test, what results you'll get

proud hull
spark robin
#

Okay ๐Ÿ™‚

tight schooner
#

But also... generally speaking... one should aim to get it working first and then optimize later if performance profiling indicates a problem

proud hull
# solemn parcel

If you want a true slow motion effect, you can also look into using CustomTimeDilation instead too.

solemn parcel
#

@proud hull Tried it, forgot I had this. Still not working

proud hull
solemn parcel
#

Look, the execution until the end is working

proud hull
#

Is this logic inside the projectile? Maybe make the projectile call an event on the actor to have it manage it's own speed.

#

I'm guessing your projectile destroys itself and that might be causing the issue.

solemn parcel
#

That's why I'm actually managing the slowing effect from an external BP, to avoid the issue of the projectile being destroyed.

#

But, it actually works, when only 1 projectile hit the ennemy, after 1 sec he find back his initial speed

proud hull
#

It's the delay that causes that.

solemn parcel
#

but when 2 or more projectiles hits the ennemy while under slow effect, it will only trigger the last max speed

proud hull
#

That a retriggerable delay?

solemn parcel
#

I think I got it, while or after a second slow effect, it will Set Max Walk Speed -1 from the first slow effect

proud hull
#

Ah, I see why you did the math after the delay. You want a stacking effect?

solemn parcel
#

yeah ! ๐Ÿ™‚

proud hull
#

Gotcha, that makes sense

solemn parcel
#

MaxWalkSpeed=400 Original, on hit -40%=240, after 1 sec, come back to 400. But if -40% while MaxWalkSpeed=240 then it just sets the MaxWalkSpeed to 240

#

If i'm clear enough

proud hull
#

Base all your math on initial speed and only set it once in construct.

#

If you re-set it each time movement changes, it will never know what was the actual original speed

#

Then you can use it in the formula without any numbers changing between hits

solemn parcel
#

So having another variable from the character BP himself, something like 'Initial Max Walk Speed', that won't get edited

proud hull
#

Oh wait, so not stacking?

#

You just want each hit to reset the timer?

#

That would be retriggerable delay

solemn parcel
#

Well, I think the more smooth way would be each hit will add a -X set value of slow effect, and Y time after each one of this hits, it add +X on the walk speed.

proud hull
#

Ok so stacking, hehe

#

Your original code was closest

#

You just need to save initial speed in construct or begin play.

solemn parcel
#

You're right, i'mma try this right now !

maiden wadi
#

Are you planning on having different slowing amounts for the character at any point?

proud hull
#

40% reduction each hit it seems, right?

#

For 1 sec

#

So actually get rid of initial altogether

#

Your 2nd math is off since it is based on the new max speed value

solemn parcel
#

@maiden wadi Yeah*

maiden wadi
#

Was just going to make the point that if you're planning on having different slowing effects, like one effect does 40%, another does 20%, etc. It'd be best to use an array. Have each index be a slow multiplier and a duration. On effect, update the array, then apply the largest slow effect to the player until it wears off, then check for lesser effects.

proud hull
#

Max speed * 0.4 for first part. After delay, Max speed / 0.4, make sure to round/clamp.

#

No need for array, this will work multiple stacks in

#

For instance, speed of 100 would be 40 after one stack, then 16 with 2 stacks, then return to 40 when one stack is done and then 100 when both are done.

orchid garden
#

your using the current ammo after the set, not current ammo before the set.

solemn parcel
#

@maiden wadi Yeah when I'll need it's a good idea to implement it that way. But i'm already struggling for a basic stacking effect, so i'll keep it clear and simple for now, and when i'll move on different slows, i'll do by arrays.

proud hull
#

CurrentSpareAmmo - CurrentAmmo is all you need for setting CurrentSpareAmmo at the end.

solemn parcel
#

@proud hull Wait i'm trying to understand what you said !

proud hull
#

Set max speed = max speed * 0.4 >>> delay node >>> set max speed = max speed / 0.4

#

Easy as pie, well easier, let's see you calculate pi

sonic cipher
solemn parcel
#

Wait, If MaxSpeed=100 then 100*0.4=40, meaning I would set the max speed to 40% , and not 60%

proud hull
#

Then multiply by 0.6

tight schooner
#

@sonic cipher look into the save game system if you want to save variables to disk

proud hull
tight schooner
sonic cipher
solemn parcel
#

@proud hull so it works def easier that way, you are right, thing is the main problem is still here, the stacking set the MaxWalkSpeed to the precedent one.

#

I might miss something easy here

proud hull
#

Using math should do it, no matter how many stacks are on.

solemn parcel
prime moss
#

Pls tell me

proud hull
solemn parcel
#

@prime moss just in case, are you tiping the good inputs ? Check in ProjectSettings

#

StatusIce is the the event from the slow effect BP.

#

It apply that effect to any character overlapping the projectile

#

Once on this case

proud hull
#

Your references in RoundState will keep switching to whatever last called the event.

#

You are better off making an event in the character/pawn itself and have that event simply change the max speed and do the delay.

#

Then have RoundState call that event for the actor

#

For instance, I hit NPC1, they slow down, but then I hit NPC2, they slow down, but now the delay uses character movement variable for NPC1's delay, but character movement variable has NPC2's character movement saved in it.

solemn parcel
#

you are right

#

was scared of this

#

but even then

proud hull
#

Just move your logic into the character. And all is good.

#

Just the max speed stuff.

#

You got all your references already, the hard part is taken care of.

solemn parcel
#

before thinking about multiple targets, the max speed doesn't come to the inital one with that code, on a single target

proud hull
#

It should... 100 * 0.6 = 60, then 60 / 0.6 = 100

solemn parcel
#

I wanted to centralize these effects on one BP, simply because I have different types of 'ennemis characters' that are all parents

proud hull
#

Seems to me like you made yourself a middleman that isn't really necessary, hehe

#

Honestly, you could have projectile hit directly trigger the slow movement event inside the pawn/character if the logic was moved there.

#

Otherwise, if you want to use a "manager" actor, you cannot save references like that. Would have to be its own function and set local variables.

#

Which is another option really, turn that into a function within RoundState, and you can use local variables.

sonic cipher
solemn parcel
#

Look this is what is happening. I'm using 0.6 as reference of slowing effect. MaxSpeed=400. Character gets hit once, MaxSpeed=240, Then delay 1.0 sec, then MaxSpeed=400.

proud hull
#

Isn't that supposed to happen?

solemn parcel
#

When Character gets hit 2 times before the delay is passed, it MaxSpeed=240 on first hit, then =144 on second hit, then delay, then MaxSpeed=240

#

The second text isn't supposed to happen, the first part, first hit yeah

proud hull
#

Initial speed = 400
Hit 1 = 240 (0.25 seconds passed)
Hit 2 = 144 (0.75 seconds passed)
1 second passed = 240
1.75 seconds passed = 400

#

That is the current setup

solemn parcel
#

yeah, and it does not happen that way fully. The '1.75 seconds passed = 400' part doesn't happen

proud hull
#

I dunno then. I suspect it is the delay messing everything up which is why I avoid them like Corona.

#

Delay node = worst node ever created

#

And everyone uses it way too much

solemn parcel
#

Any hit after the delay is starting to be executed until the end of it's execution, will only apply the negative formula, and once the delay is executed, the positive formula will be applied once.

#

it is definitively the delay that fucks this up

proud hull
#

I'm fairly certain this would solve itself if that logic was inside the pawn/character and your RoundState simply called that event for the pawn/character.

#

That way each pawn can manage their own speed, but have the RoundState manage their event calls.

solemn parcel
#

I'll go for this way anyways, seems like the most safe one. Thanks for your time, a lot !

proud hull
solemn parcel
#

I'll make a try of copying everything on the AIcharBP after my cig and I tell you ๐Ÿ˜‰

proud hull
#

Smoke break, good idea.

orchid garden
orchid garden
proud hull
gritty lintel
west sky
#

Can't

gritty lintel
#

I need it for an auto landscape material

orchid garden
#

right click and convert to parameter? is that what you mean?

gritty lintel
orchid garden
#

still not understanding what you want... you need to be a little more clear.... maybe....

gritty lintel
#

i got the vertexnormalWS which i have to multiply with a vector that has 1 on all the three axis

orchid garden
#

points to previous pic

west sky
#

High benefit of watching a beginner tutorial for materials

gritty lintel
#

Guys i made it

#

It was a Constant 3 vector

orchid garden
primal smelt
#

So I'm having a play about with adding force to objects. You can't add a force to an actor itself, you have to add it to a mesh component. This is fine and I'm getting the desired effect but one thing I noticed is that doing a getactorlocation on event tick (just to see) does not update the coordinates of the actor's location. It seems like the mesh is moving around but the actor is still in the starting location it was placed. Is this anything to be concerned about or is this behaving as expected?

solemn parcel
#

@proud hull So i've didn't made the copy still, but I was thinking that I would have the same problem anyways, concerning the delay. Simply because once a delay starts it dosn't get any more input until finished, except retriggerable delays, but that isn't what I want !

#

Is there a way to make a timer or delay to be executed multiple times ?

primal smelt
proud hull
#

Like same timeline node, play it two times at the same time

primal smelt
#

You can have multiple tracks running at the same time, they can either execute on an update, execute on finish or with an event track execute whenever you want

proud hull
#

Just tested, it doesnt

primal smelt
#

So if you had two things you wanted to execute after, say, 5 seconds - wait - and execute another 5 seconds later are up you can set the length of the timeline to 10 seconds, add 2 event tracks with 2 keyframes each at 5 and 10 second mark, they will have their separate execute pins and will fire off concurrently

proud hull
#

Best solution we came up with before was limiting the number of stacks and make a separate timer for each stack.

#

You premake these timers in begin play, save their reference, then you can use them over and over for anything with a delay.

proud hull
proud hull
#

Wait, how do I run them concurrently, not seeing any extra exec pins when adding more tracks.

primal smelt
#

So I'm having a play about with adding force to objects. You can't add a force to an actor itself, you have to add it to a mesh component. This is fine and I'm getting the desired effect but one thing I noticed is that doing a getactorlocation on event tick (just to see) does not update the coordinates of the actor's location. It seems like the mesh is moving around but the actor is still in the starting location it was placed. Is this anything to be concerned about or is this behaving as expected?

#

Anyone able to answer this please?

primal smelt
proud hull
#

Ah, I was using float, my go to when messing with timelines. Never really messed with the other options, haha.

primal smelt
#

I've played about with them quite a bit, they're pretty versatile. You can also swap out tracks on the fly in blueprints using external curves - if anything makes it a bit neater than having a ton of tracks on one timeline!

proud hull
#

This executes all of the event tracks every play.... Need them concurrent, but activated one at a time.

primal smelt
#

Are you using the 'update' pin?

dawn gazelle
# proud hull Bam! So simple, hehe.

This would not work. You would effectively be giving your player ammo that they may not have as you're adding ammo into your current ammo without checking your spare ammo.

primal smelt
#

If so you don't want to be using that

#

Use the indivdual exec pins from the event tracks

proud hull
#

Adding the difference of magazine - ammo

#

So if you reload when not empty.

solemn parcel
#

Thanks for your time guys, i'll read this again after my little lunch. So at the end there is a way with either delays, timers or timelines to make each one of them execute multiple times on the same exec ?

dawn gazelle
# proud hull Nah it works, tested already.

Current Ammo 8
Magazine Size 12 (Wouldn't change)
Spare Ammo 2

(Magazine Size - Current Ammo = 4) + (Current Ammo 8) = 12. You've given them 4 Ammo.
Spare Ammo 2 - (Magazine Size - Current Ammo = 4) MAX 0 = You've removed 2 ammo from spare.

proud hull
#

Oh, you are right, I didn't test to empty spare ammo, my bad, can clamp that easily

#

Now convert to C++ and you got yourself one really efficient reload function.

left carbon
#

Did anyone had issues with DataAssets, where they are NULL in packaged builds?

Everything works fine in editor, but all the references are None in build..

worthy frost
#

did they get cooked out?

proud hull
left carbon
#

Well, that's a good point, but it works in Windows build but does not work on Android..

But in other project I had the same issue with Windows build.

proud hull
sonic cipher
#

if someone can help me with a savegame please, i can't make it work

sonic cipher
#

problem is that if i close the game, 2nd map is locked again (hidden button)

proud hull
#

So you are trying to save that progress.

#

Have you made a save game blueprint yet?

sonic cipher
#

i show you the save game bp

proud hull
#

Can I see what is further left too?

sonic cipher
#

i hope you can see good

proud hull
#

Looks like you are saving correctly. Where do you load from that save slot to then populate your variables?

west beacon
#

Hi, I'm trying to add instance of my dirt block. But blocks are spawning on my head (acc on my camera). How can I solve this?

proud hull
#

Unless you are reading directly from the save game for everything now.

sonic cipher
dawn gazelle
# proud hull Now convert to C++ and you got yourself one really efficient reload function.

I think this is right @_@

void AFunctionLibrary::Reload(const int CurrentAmmo, const int MagazineSize, const int SpareAmmo, int& NewCurrentAmmo, int& NewSpareAmmo)
{
    int DesiredAmmo = MagazineSize - CurrentAmmo;
    NewCurrentAmmo = CurrentAmmo + (FMath::Min(DesiredAmmo, FMath::Max(SpareAmmo - DesiredAmmo, 0)));
    NewSpareAmmo = FMath::Max(SpareAmmo - (MagazineSize - CurrentAmmo), 0);
}
solemn parcel
#

@proud hull Just to say thanks for your time, even tho I will stack only on substract and not on addition. Design wise will be better ๐Ÿ˜‰

proud hull
proud hull
sonic cipher
viscid shard
#

if my player_BP collides with WayPoint_BP how can i get Which collision sphere was collided, i have 2 one largeone for discovering the waypoint and one inner one for using waypnt

proud hull
sonic cipher
#

It is not my blueprint i'mm trying to edit it to save this variable :v

proud hull
west beacon
#

Hi, I'm trying to add instance of my dirt block. But blocks are spawning on my head (acc on my camera). How can I solve this?

proud hull
sonic cipher
west beacon
proud hull
sonic cipher
west beacon
#

Camera or something?

sonic cipher
proud hull
sonic cipher
proud hull
#

Dirt block, player character unless this is in player character bp and you have ignore self checked.

west beacon
proud hull
sonic cipher
west beacon
proud hull
sonic cipher
proud hull
sonic cipher
west beacon
#

In PART of 1 of the next few videos, we'll discuss adding TWO different types of blocks to our game by clicking the left mouse button like in minecraft :)
SOON after we'll learn how to delete those blocks as well.
CHECK IT!!!

PLEASE SUBSCRIBE!!!!
and check out "DepriveD" Final Alpha EP
on BAND CAMP!!
https://deprived2018.bandcamp.com/releases...

โ–ถ Play video
west beacon
#

I want to solve this pls ๐Ÿ˜ฆ

proud hull
#

The cylinder in the screenshot is your player character?

west beacon
#

I made cylinder for seeing the player. Normally its transparent charactrer.

#

That object doesnt affect anything

proud hull
#

You sure? One of your first screenshots it looked like the trace hit that character.

west beacon
#

Wait a sec

proud hull
#

That tutorial series was for first person view, so no character should get in the way of the trace.

#

Or at least I only saw first person view in that particular video.

sonic cipher
sonic cipher
proud hull
west beacon
solemn parcel
#

This would cast to all actors of EntityCharBP right ? Not the Other actor from input only ? If so, how can I launch the event on THAT specific actor ?

proud hull
proud hull
proud hull
solemn parcel
#

@proud hull So after copying everything on the charBP, it seem to work

#

Ty !

proud hull
#

Save Game function: Get variables from Game Instance and set them in Save Game BP
Load Game function: Get variables from Save Game BP and set them in Game Instance

sonic cipher
#

Okay i will try to do this thanks you ๐Ÿ™‚ not an easy task this BP xd

proud hull
proud hull
#

BP_SplinePath = WayPoint_BP

#

Make a new project with ALSv4 and check out what they did.

sonic cipher
#

https://www.youtube.com/watch?v=DOU5gvSlfPE i think this is what you want

In this video, I'll show you how to switch between default Third Person template control player rotation system to character rotation based on camera rotation. This is the most used for Third Person video games nowadays.

Support me on Ko-Fi for my current indie game development at Loish Games
https://ko-fi.com/loish

#ue4 #tutorial #gamedev

โ–ถ Play video
proud hull
#

Advanced Locomotion System did this already so should be a good example and you can probably copy/paste most of the stuff right into your project, or import the whole ALS project in and work out of one project to copy it over.

west beacon
#

@proud hull Sorry for ping, I do all of the things. Now I can place block, but I have a one problem. Trace doesnt work for block sides. I can only place block when look other block's mid point. How can I solve this?

sonic cipher
sonic cipher
west beacon
west beacon
hard sequoia
#

Hello, is there a way to add any type of gizmo (Like a player start icon gizmo) to a scene component in the blueprint editor window. I have a few scene components which moves every time any property is changed. It would be nice if I could visualize where those components end up, hence the gizmos.

west beacon
sonic cipher
west beacon
proud hull
#

Hmmm, size is a good point though.

west beacon
#

I call them from code and spawn them

sonic cipher
#

maybe when you spawn a cube then the size is not set good

proud hull
#

Does your tile size match the size of your blocks?

west beacon
#

Hey all are 1, 1, 1

proud hull
#

Oh, nvm, you have multiple placed, so it should

west beacon
#

yeah I have a terrain tile size is 100

proud hull
#

Which trace are you running now? You can set back to by channel if you are running by object.

west beacon
#

I tried for objects too

proud hull
#

Ignore self is usually checked in most cases.

west beacon
proud hull
#

You running this from a level blueprint or something?

west beacon
#

No, this is normal actor class

#

Like I said before, I followed tutorial

proud hull
#

And the actor is the same as the cubes the trace is now passing through?

#

So I'm placing a cube and that cube has the logic for the line trace? Seems so odd....

#

Ignore self means to ignore the actor executing the line trace. That line trace should be done in your player character.

west beacon
#

And its have construction script

#

It holds whole terrain

proud hull
#

Move the line trace stuff to your character, you are doing it backwards.

#

The terrain shouldn't handle what the player does, hehe

west beacon
proud hull
#

Hit Actor

#

You get the reference there in the line trace

#

If you hit your terrain with line trace, you will be able to cast that to MC

west beacon
proud hull
#

Keep the add instance part in your terrain blueprint, make it a separate event/function.

west beacon
proud hull
west beacon
#

same issue ๐Ÿ˜ฆ

proud hull
#

Trace is done in character now?

west beacon
#

Yeah

#

Same traces

proud hull
#

There is something wrong with your collision settings then.

west beacon
#

Where can I look or change?

proud hull
west beacon
sonic cipher
#

i have a compiler error after trying to cook the game, just because i edited a structure, even after removing what i added, still error ...

unique harness
#

what is the error

sonic cipher
#

error structure everywhere, i checked on the non-edited project and it has the same things but without errors

unique harness
#

what version are you using?

sonic cipher
#

4.26

#

i had no errors before, now that i edited i can't remove this

unique harness
#

This used to be a big problem in like 4.15-4.19 but they've said it has been fixed

#

I ran into this issue before and ended up having to remake all my structs

sonic cipher
#

aaaaaa uff x) big problem really :v

unique harness
#

unfortunately the BP structs kind of suck

sonic cipher
#

hum yeah i should report that to epic

unique harness
#

we ended up converting all the structs to c++

sonic cipher
#

noo i can't code in c++ lol

#

what if i reimport ?

sonic cipher
#

thanks you i hope i can fix

orchid garden
#

hrm... i have a door issue..... wondering if someone can give some advice...

#

if the player stops in the doors path the door stops moving, i need it to either push the player out of the way or squishy them ๐Ÿ˜„

unique harness
#

why not keep the door open while the player is there?

orchid garden
#

its a timed door

weary jackal
#

Capsule is blocking

#

Add force

orchid garden
#

add force when?

weary jackal
#

On hit

#

Or you can teleport player with timeline from current position to forward

sonic cipher
orchid garden
sonic cipher
#

even if it is closed

#

you should maybe add a variable "is closing" when the door close then if it is closing on component hit give impulse ?

unique harness
#

I think there's an easier way

orchid garden
#

nah i can check to see the doors state (closing, opening, dorment)

unique harness
#

there should be a physics setting on the door

#

because even if the door is closing and the player just runs into the door, it will still fire

orchid garden
solemn parcel
unique harness
weary jackal
#

For crushing you can add bool isClosing. And on hit simulate physics. Also let capsule ignore door collisions and mesh should block it
For 2nd one. Teleport

unique harness
#

drag off the array and type foreach

solemn parcel
#

oh for each loop

#

nvm ALWAYS forgetting about this

#

thanks

orchid garden
weary jackal
#

@solemn parcel are you making interaction?

solemn parcel
#

?

weary jackal
#

Interact with an object

solemn parcel
#

yeah

#

But the ForEachLoop was pretty much it

weary jackal
#

Nah for now you are checking with class. What you can do is add interface to all actors that are interactive

unique harness
# solemn parcel yeah

you can avoid the class check you're doing by using the ActorClassFilter on the SphereOverlapActors

orchid garden
#

guess i could just add a blocking volume thats active when the door is opening & closing...

weary jackal
#

There's a node 'Get overlapping actors' with target as self and you'll get an array

solemn parcel
unique harness
#

To use that you will need some sort of sphere/box/etc collision though

weary jackal
#

No

primal smelt
#

Ok been a while since I messed with blueprint interfaces and I've already forgot a ton of stuff. Left (new project) / Right (old project). As far as I can tell I have created a bpi and function on left in the exact same way as I have on right however the target pin is incompatible with the 'other' pin in the new project. Can anybody think why this would be different? Also, whats with the envelope icon in the node of the right string? Can't remember what that signifies.

weary jackal
#

Just implement interface in what items you want to check.

unique harness
weary jackal
#

@primal smelt it is interface message

primal smelt
weary jackal
#

No you don't have to cast

primal smelt
weary jackal
#

If you create an inter face function, let's say function1. Then there will be function1 (message) in your bpi.

#

The reason is maybe the interface is missing

unique harness
primal smelt
unique harness
primal smelt
west beacon
#

Hi, I'm trying to place blocks (voxel's) and they are instanced static meshes. But I only place it when I look middle of the block. If I look 1 pixel up it will be place the block on the top of my head. But I want to if I look this side it will be place next to this side. How can I do that?

primal smelt
#

Does anybody know if an event hit will pick up a line trace? So Dude01 fires line trace that hits Dude02. Does all the code need to be in Dude01's blueprint or could an event hit in Dude02's blueprint also detect the line trace?

unique harness
#

no a trace does not trigger event hit

primal smelt
#

Ok cool thanks, good to know

crimson swan
#

Can someone help me debug why my while loop is crashing my game constantly...

unique harness
#

sure post some screen shots

unique harness
#

and what crash are you getting?

#

iteration count i'm guessing

crimson swan
#

infinite loop

#

which is why i'm confused af

unique harness
#

it doesn't look like you're actually rotating in the loop body

crimson swan
#

im setting the rotation speed for the rotation component

#

i know the character rotating part works but eitherway it for some reason doesn't change the bool

unique harness
#

ah I see it now

crimson swan
#

or it does but still considers it an infinite loop?

unique harness
#

honestly this seems like the wrong way to go about this

orchid garden
unique harness
#

and do it in event tick, not a while loop

orchid garden
#

it pushes the actor out of the way properly now :

#

๐Ÿ™‚

crimson swan
#

yeah sleeper i know, but i'm trying to do it in a function

#

also for the record here's a cleaner screen cap

unique harness
#

well that's not really how while loops work

crimson swan
#

i mean i'm getting a bool, while that bool is true do the loop (set the rotation speed)

unique harness
#

they're a bit different in BP because of how they need to work to function

crimson swan
#

inside the loop check for the bool again

unique harness
#

but you should think of a while loop executing everything in 1 tick

crimson swan
#

oh.. so you're saying it's just dumping the values before it has time to finish?

orchid garden
#

is setting a actors scale a okay method to increasing their overall size? or does that cause issues? know some static meshes have issues with their collision when they are scaled.

worthy frost
#

you need to interp over tick

crimson swan
#

it's acting like an interrupt?

worthy frost
#

for smooth rotation

crimson swan
#

ukaos i'm just setting the rotation components rotation rate

unique harness
#

if it was functioning correctly, your character would turn instantly

crimson swan
#

i'm not actually moving my character X degrees

worthy frost
#

yeah but why use the while loop? i don't see what that is doing?

crimson swan
#

i want it to keep checking

#

i don't know any other way to check when to stop it

worthy frost
#

but you can check if your facing target, in tick, and then stop the interp

#

no need for this extra stuff

crimson swan
#

i need to look up how to use the interp stuff

#

never touched it yet

#

ok but the issue with checking it in tick is that this function is ran from a custom event

#

and i only want to run it once

unique harness
#

you can't have a function that

#

"runs once"

#

and rotate smoothly

worthy frost
#

but that while loop will lock your game thread

crimson swan
#

yeah i know hence my issue

worthy frost
#

whilst its running

#

or chuck you out with inf loop from the Kismet VM

crimson swan
#

yeah i was getting inf loops. Ok so i guess i need to rethink this entirely

worthy frost
#

i mean, its pretty easy to do tbh

#

you have a function, like you have now

crimson swan
#

to give you context im doing a top down game right, so when i right click it plays a montage and i want the character who is facing somewhere to rotate towards where i clicked while playing that montage

worthy frost
#

but it does a simple check to make sure you are not already facing that location, if you are not, it sets a bool (bEnableRotationTick) for example, and caches the location to face, your tick will check if that bool is true, then it will check if you have reached that location, and turn that bool off again

#

i assume rotating movement moves it

#

but that is all you need to do

crimson swan
#

ok but that would mean i need to put a bool checker in ontick that sets rotation to 0 if bool is false right?

crimson swan
#

so even if nothing is happening it's still checking that bool and setting a rotation constantly

weary jackal
#

There's a node 'find look at rotation'

worthy frost
crimson swan
#

i guess that's one way of doing it dirt. So in my function i would just define the variables and let tick handle it?

unique harness
#

yes

worthy frost
#

if you want to use rotating component

crimson swan
#

i mean i'm not fixed on anything i just assumed a rotating component would be easier i didn't know there's a node that rotates over a fixed time from an angle to another angle

worthy frost
#

interp is better

#

less components

crimson swan
#

i guess it solves the issue of which angle is quickest to get from point a to point b

#

which i was gonna do later anyways

weary jackal
crimson swan
#

will do, thanks guys

#

i'll be back if i run into other issues

worthy frost
#

@crimson swan you could do something like this

#

also

#

not tested and is simple AF

little cosmos
unique harness
#

Is your city one giant mesh?

little cosmos
little cosmos
unique harness
#

is the ground (sidewalk, roads, etc) one large mesh?

little cosmos
#

Some are yes

#

but this never happened before

unique harness
#

my immediate guess would be some occlusion/visibility culling issue

#

do they reappear when you move around/change camera direction?

#

or if they're gone, they're gone?

little cosmos
#

Some of the objects that disappear are small meshes too. not only those large ones tho

#

no, if they're gone they're gona,

#

as if I deleted them completely

#

Sometimes this happens and sometimes everything's fine. no pattern that I could detect

unique harness
#

Have you tried restarting the editor?

little cosmos
#

yeah sure

#

this has been around for days now

unique harness
#

ah when you said it's never happened before I thought you meant just now

little cosmos
#

oh no, I meant in my UE4 experience of a few years

unique harness
#

Does it happen when playing in editor viewport or only separate window?

little cosmos
#

mostly in editor viewport

#

but when PIE

#

only when play

unique harness
#

so if you play in editor viewport and pause are you able to select the disappeared object?

little cosmos
#

No

#

It's like it's hidden but it isn't

#

Nothing in output log either

unique harness
#

can you find it in the world outliner?

little cosmos
#

I need to have a look. Trying to reproduce this now.

#

yes I can

#

and if I hide and unhide it, it's back

empty canyon
#

Maybe you're using level streaming and forgot to load the level

little cosmos
#

All sub-levels are always streamed

#

In fact, this issue only happens sometimes with no distinct pattern to iut

#

also check out all the images, sometimes everything goes crazy

#

Sometimes things just vanish, sometimes they go like this

trim matrix
#

some of the city-wide meshes try turning off "use for occlusion"

little cosmos
#

didn't help

#

This is the weirdest bug man

empty canyon
#

Then try rebuilding the level

#

By clicking build on the toolbar

little cosmos
#

I will

#

lighting is all dynamic btw

empty canyon
#

Or try to play the game in spectator mode and check if the road collision is enabled or no

#

That may help

trim matrix
#

If you run PIE then press alt+s to eject from the pawn, does that change anything?

little cosmos
#

Nope, tried that before..

#

it is as if some of my sub levels don't show up

trim matrix
#

a temporary solution might be to cover the city block with a volume and parent all your disappearing meshes to the volume, then turn on "use parent bounds".

It's not exactly efficient tho

little cosmos
#

Ok i'll try that. More interested in the root cause though

#

it's been killing me

trim matrix
#

had a college assignment that had us import all of Vegas into ue4 from a provided sketchUp mesh. It had a lot of the same issues. What fixed it was separating all the buildings to individual meshes, breaking up the sidewalks, replacing roads and grass with landscape.

#

I think what the main issue was, the origin point of the meshes were falling behind other large geometry

little cosmos
#

It's indeed a giant datasmith exterior, most of it. but this problem didn't happen until recently

weary jackal
little cosmos
#

Also how do you explain the random occasions when this happens?

trim matrix
#

I can't, I can only assume that the z order is having a hell of a time

little cosmos
#

Ok I see. thanks

trim matrix
#

another thing to try. Create a new, empty sublevel; make the sublevel the active sublevel, then make the sublevel hidden. Select any large meshes in the scene and migrate (ctrl+m) them into the hidden sublevel. Run PIE after every move to see if it changes anything.

#

Can I make a custom event like ''event begin play'' or ''event tick'' from a behaviour tree task?

astral fiber
#

There is a blueprint Node called "Find look at Rotation" which finds the rotation to let an object look at a specific position. This is for the X axis, is there also a node for the Z and Y axis?

solemn parcel
#

Can someone tell me why the sweep pins from Overlapping events returns false randomly ? Having the sweep/hit locations from BreakHitResults works randomly, and the 'FromSweep' Pin returns true/false randomly

#

And I kinda need that Impact Point Location

true kiln
#

Hello guys,
I need to get the closest point on the collision but the problem is, the existing function only works when that point is outside of the collision, is it possible to get closest point from inside the collision?

short bramble
#

Hello! I'm having an issue using the GASshooter template of Reuben.
Reuben splits the logic fire between client and server, and waits for validation.
I'm trying to branch in the final step when the GE/FX is applied to the target, based on the current health of my target. However, health in the client is always one step backwards so is not reliable (for example I need one extra shot to trigger the wanted FX if the target reaches XXX)
Anyone knows any node or way of saying inside a GA how to declare the server has authority over an attribute? I can't find a correct function to override client data. I want to declare server has authority, and update client data from server BEFORE applying the GE.
UPDATE: Reuben made a "wait one frame" function that gives initial good results. However, this is me playing around and I think is not reliable at all. Another GAS function tested is the waitSync (client or server) but looks like not working / bypassing.

trim matrix
#

@solemn parcel I believe the bSweep only returns true when the volume is being updated by blueprints. If it's not moving, and another actor overlaps the volume, then it would return false.
Instead, try using a branch that returns true if the impact point is not equal to 0

trim matrix
#

with the makeRotFromZX node and other similar makeRot nodes, keep in mind that the first direction is a priority direction and the second helps establish a twist along the priority.

#

So in this case, the actor will always orient its Z axis up in world space, but will twist to point the X axis towards the target actor

#

@solemn parcel I made a mistake. The overlap node doesn't typically return a impact point at all.

sonic cipher
#

Hey, i was asking myself about save games
If i save for exemple players controls in "save" slot, then i load it on start game
Then i save the position of the player in the same "save" slot, will it erase the controls that are saved and remplace them by the position of the player or does it merge in it ?

trim matrix
#

So the player's controls can be saved to a slot named controls and you could use index 0 and never worry about it overlapping with other savegames

#

different saveGame classes will still occupy the same namespace when saving. So if your controls were saved under "save"/Index 0, and your character positions were saved under "save"/Index 0, then they would overwrite eachother

west beacon
trim matrix
west beacon
dull tree
trim matrix
west beacon
west beacon
trim matrix
#

the node is a "constant". Hotkey is hold 1 and left click

west beacon
#

Okay thanks

trim matrix
#

@dull tree This is best asked in #multiplayer . I've tooled with a lot of multiplayer stuff but I definitely don't know what standard looks like.

west beacon
#

(Selected block is normal correct textured block)

trim matrix
#

Best guess to what happened is the wrong block has some goofy UVs

west beacon
solemn parcel
#

@trim matrix What does it return then ?

trim matrix
#

How would I set it up so I can find the location of either the closest 3 objects or a random object from a chosen list?

trim matrix
west beacon
trim matrix
#

example I got 3 food sources in my scene, I want to find the location of the closest food source

trim matrix
#

I tested with two saveGame objects (using different created classes) that store a print value. The last one saved in a sequence is what is loaded.

west beacon
trim matrix
#

what software is your cube imported from

west beacon
#

I get the texture, and added to static mesh

#

Texture is 16x16

trim matrix
#

yes but the cube geometry. Is that just in engine or did you create it in blender or 3dsmax etc?

west beacon
#

No, only engine.

trim matrix
#

the issue with the texture is the cube's UV map

#

ok one sec

west beacon
#

Should I send texture?

trim matrix
#

this one should work for your use-case

west beacon
trim matrix
#

if you created your project with default settings in the launcher, you will have starter content (I believe)

west beacon
#

I can't use Shape_Cube, I must use different

#

Okey I solved I think

sonic cipher
west beacon
west beacon
#

Because for now, everything is perfect.

trim matrix
#

if you created a default cube from blender, The UVs will appear stretched because of this layout

solemn parcel
#

can I get the Impact Point of an Overlapping actor by somewhere else than by breaking the sweep result ?

trim matrix
trim matrix
trim matrix
# west beacon ?

hey if that content cube works for you, don't sweat the blender cube

solemn parcel
#

So how to find that Collision Point ?

west beacon
west beacon
trim matrix
trim matrix
west beacon
solemn parcel
#

@trim matrix I can't tho, I need to use only overlapping for that detection, hit is being used for World Static

trim matrix
solemn parcel
#

I want to spawn an emitter on the overlapping point*

trim matrix
#

Since your object is a sphere, you can use a sphereTraceForObjects or sphereTraceByChannel to get a impact point

#

is* your sphere sliding along a path or are you teleporting it somewhere

#

nvm I see your projectile movement component so i'll assume this sphere is a projectile

unborn maple
#

any idea why set actor location will not work anymore. any time i hit restart game and it go back to play stay the ball sit at same location and just rolls from them

solemn parcel
#

Its a projectile yeah

unborn maple
trim matrix
#

@solemn parcel

solemn parcel
#

well im working on the trace right now, I just wanted to avoid this to keep it as light as possible

trim matrix
#

something like this should do it

solemn parcel
#

So overlapping being useless ?

trim matrix
#

Overlapping will not get you impact point. But sphere trace definitely will.

#

if you didn't need impact point, only the object location, overlapping would be just fine.

#

but if impact point is a must-have. This is the way to go

solemn parcel
#

Thank you !

#

๐Ÿ™‚

trim matrix
# unborn maple

if the ball is on the ground, sweep will actually not move

#

the tickbox on setActorLocation node

crimson swan
#

interesting question for all of you here. Does toggling collisions trigger an overlap event every time?

unborn maple
#

it doesnt move when i uncheck sweep

#

it break the ball movement

trim matrix
trim matrix
unborn maple
#

i fix it when i move the z locatin it move

crimson swan
#

yeah that's what i was about to suggest

#

your issue is it can't actually fit where you want it to go

#

when you spawn an actor you have a setting that checks if it can fit and gives you options based on that. Same thing here except you don't have that option so i'm guessing it's just returning an error or something

unborn maple
#

gotcha. i move it up 70 to fit the other actor and it started setting it location after i hit restart

trim matrix
crimson swan
#

this is the code i'm running, kinda zoomed out but you get the gist of it. So the enemy has this setup

#

it only executes on the first collision, my guess is because the player is already in the overlap when it's being toggled so it doesn't technically overlap again?

trim matrix
#

is it overlapping itself or is the player a separate actor?

crimson swan
#

player is separate

trim matrix
#

I've set up the reverse, where the player is attacking an enemy and had the same issue happen

#

I made the player helicopter attack with the same collider and it would only hit once. But if I alt+S during the attack so that I'm in spectator mode, then the attack seems to hit as expected

#

I never figured it out

crimson swan
#

alright, time to find a ghetto solution then

trim matrix
#

it did not seem to be linked to framerate either

#

yeah sorry lol

#

I still have that project somewhere, I'll try to find it and post a gif.

#

location will be 0,0,0

#

trying to find closest food location

#

trace results work I suppose?

crimson swan
#

yeah i know what your bug is, i spent a day tracking it down for myself

#

gimme a sec

#

do this

#

controller -> blackboard

#

if you do the key method it just picks the first item in the blackboard enum

trim matrix
#

@crimson swan is that aiming towards me?

crimson swan
#

yes

trim matrix
#

Ah okay, I dont understand tho haha

crimson swan
#

i'll draw it out gimme a sec

trim matrix
#

idk if its the same bug, but it defaults to the plane every time

crimson swan
#

yeah it's 100% the same issue i was having

trim matrix
#

thats reassuring

crimson swan
trim matrix
#

hm nope

#

cant read

#

something

crimson swan
#

show me your blackboard if you don't mind

#

and your modified blueprint

trim matrix
crimson swan
#

@trim matrix oh no worries lol

trim matrix
#

i think its an array issue

#

like it cant find the vector or something

#

sorry its messy

crimson swan
#

and the printout of the value for closest food is 0,0,0 right?

trim matrix
#

im following this, I guess its easier to understand that way

#

yea its always 0.0.0

crimson swan
#

where are you setting closest food

trim matrix
#

Probably the cube its walking on

crimson swan
#

my guess is it's taking the default value for that variable

#

set the default to like 100,100,100 and you'll be printing 100 100 100

#

or rather no sorry that makes no sense XD

#

it's an actor right? so try printing the actor(closestfood)

#

it's gonna tell you what type it is

trim matrix
#

didnt print anything lol

#

blank space?

crimson swan
#

so it's null

#

your actor isn't valid

#

where are you setting it

worthy frost
#

@trim matrix is that tick inside a BT Task?

#

if so why?

#

tasks are to do one job, if you don't find food, end the task and try something else

trim matrix
#

yea the task is to find the closest food

#

next task to is to move to the location

worthy frost
#

yeah but you don't need to use tick, using Execute AI is fine

trim matrix
#

not using tick

worthy frost
trim matrix
#

its an example

#

its not mine

worthy frost
#

oh

trim matrix
#

its what I used to find closest

worthy frost
#

that was not made clear

trim matrix
#

my bad

worthy frost
#

more relevant there

unique harness
# trim matrix https://forums.unrealengine.com/filedata/fetch?id=1050626&d=1400094754

Keep doing you but I noticed three things you should probably address eventually.

  1. SphereTrace is pretty expensive. You can probably get a way with doing a SphereOverlapActors.
  2. I'm not sure why you're doing this on tick(maybe for testing which is fine) but you can probably use a SphereCollider and utilize the BeginOverlap/EndOverlap functionality instead of the SphereOverlapActors
  3. You can consolidate the "store noticed victims" and "find closest" to 1 ForEach instead of 2 improving this function's speed.
trim matrix
#

@unique harness Thats the example im working off ๐Ÿ˜„

crimson swan
#

@trim matrix i'm not 100% sure on this but i think your closest food is always gonna be null because closest distance is always gonna be its initial value which is always gonna be less than any other element

unique harness
worthy frost
#

its ok i am helping him in the correct channel

trim matrix
#

@unique harness haha I was just looking for ideas on how to do it

crimson swan
#

@unique harness @worthy frost do you guys have any ideas how to cause an "onbeginoverlap" event to trigger when you toggle collision on and off?

unique harness
crimson swan
#

this is only triggering once (if the player is already in the zone that is)

#

it's on a timer, so it should be triggering every say 1.5 seconds, but it's not. it's just doing it once and that's it

unique harness
#

I don't understand your exact question, could you try again?

crimson swan
#

ok, i have an npc that chases the player and deals damage. This is ran from a behavior tree. It executes this code that i've shown

#

now the issue is the npc catches up to the player and triggers the collisionoverlap event but the player hasn't moved out of it. Therefore it will never trigger again

unique harness
#

yes begin overlap is only called when exactly that happens

crimson swan
#

i'm using the collisionenabled to toggle when the npc can or can not deal damage. So my question is how would i make it so that the npc enabling it after the first time would still cause damage without the player needed to leave and re-enter the collision area

unique harness
#

so you can grab that collision object and call GetOverlappingActors and handle the "beginOverlap" functionality

crimson swan
#

aah yeah that makes sense

unique harness
crimson swan
#

and i guess i would check it on tick or something

unique harness
#

no

#

just when you enable the collision

crimson swan
#

gotcha. thanks

unique harness
#

so you can convert your BeginOverlap functionality to a function that accepts an actor

#

then call that on BeginOverlap and when you enable collision using the above node and looping through

sharp lintel
#

This might be a bit of a silly question but how do I see if a condition is being met on a boolean between 2 blueprints?

crimson swan
#

i mainly do it through casting

unique harness
unique harness
crimson swan
#

@unique harness yeah that's what i had in mind, thanks a bunch

sharp lintel
unique harness
#

You probably don't want to store that in the level blueprint

#

You can't really access the level blueprint from any other classes

#

You'll probably want to store that in GameInstance/GameMode/GameState

#

You can still do the logic in your Level Blueprint if it's level specific but just store that variable somewhere else instead of the level BP

sharp lintel
#

I am destroying the actor within its own blueprint. So how would I make it in the level blueprint to know that the condition is true?

unique harness
#

You should aim to create event based logic rather than sticking stuff in event tick

#

but if you really want to do it this way, create a boolean in your game mode class and use that

sharp lintel
#

I had just used that to get it working

unique harness
#

but it seems like you could avoid this logic by just telling your deleted actor (or an actor that manages this deleted actor) to spawn the new actor

sharp lintel
#

I will try that. thanks.

#

That worked much better thank you. I forget you can split pins at times.

mighty fable
#

If I were to want to spawn an item in front my character using a console command but always have it spawn like 3 feet ahead of me how would it look?

mighty fable
trim matrix
#

@mighty fable might have to add actor location vector to the forward vector

unique harness
#

oh yea, that too lol

mighty fable
trim matrix
#

:)

#

i closed my editor so thanks lol

mighty fable
#

ok, lemme see!

#

It still didnt spawn the enemy, is 15 too small of a variable?

unique harness
#

yes the distance is in centimeters

mighty fable
#

so like 100

unique harness
#

so like 1000 will be ~3ft

#

er 100 yea

#

Did you set the actor class to spawn?

#

Also, are you sure the function is being called

mighty fable
#

yeah im typing it in

#

lemme put a print string at the end just to check

#

ok, so the string prints

unique harness
#

and what class is this code in?

mighty fable
#

sorry, what class?

unique harness
#

the code you sent the image of

#

what class is it in

mighty fable
#

the level bp

unique harness
mighty fable
#

Awesome it works!! Thanks guys! โค๏ธ

unique harness
#

You can load the same level again

latent finch
#

I'm not sure if this falls under blueprints or not. But I made a hud widget for my HP bar. Is there a way I can make a blueprint so when I pick up a specific item I gain a heart?
Not healing a heart, but making a health bar got from 4 hearts to 5

unique harness
latent finch
#

That's how I have it now. But I have it as a stand alone progress bar. If I make a pickup that add a heart and changes max health will that add a new heart image too? or is that something else I have to do

unique harness
#

You would have to add that logic

latent finch
#

Is that something I'd add to my widget or my characters event graph?

unique harness
#

widget

latent finch
#

ok

unique harness
#

so I would create a widget called BP_Heart

#

and have it be your heart image

#

then dynamically change the number of "BP_Heart" in your health bar

latent finch
#

Ok, I'll fiddle around with that and see if I can get it.
Thank you for the help

unique harness
#

HeartContainer is a HorizontalBox

#

but you're creating the BP_Heart dynamically, not like in the image

latent finch
#

And this is contained in my widget health bar binding?

dense tulip
#

Is it possible to change the origin of a mesh with UE4 ?

willow phoenix
#

bpi... i have 2 actors (dice and playstone, both have a BPI)
what the heck do i put into "target" to make this thing work? and why?

#

so i still need a reference to these playstones and call it 14 times. jesus, what is that BPI even good for?

dawn gazelle
stray island
#

Whats the difference between make rotator and split the transform rotation values

faint pasture
#

They are opposites

#

Or do you mean breaking out the rotation from the transform?

#

A transform is a location, a rotation, and a scale all combined.

smoky rivet
#

is it possible to aim down sights by modifying bones and making a socket on the ironsights go to the center of your screen?

stray island
#

I meant whats the difference between adding make rotator on the left , and just splitting the rotating transform like on right

dawn gazelle
#

They're the same thing.

stray island
#

Then why people always make rotators

#

Ok thanks

dawn gazelle
#

I'd fathom that not everyone knows about splitting structures.

stray island
#

Everytime i enter a tutorial the instructor would make rotator instead, so i thought i am doing something wrong , good to know they equal

dawn gazelle
stray island
#

Oh , for organizations makes sense

#

Does making structures instead of having the variables themself in bp , differ performance wise?

unique harness
#

if it does, it's not enough to matter

stray island
#

My bp Calling many structures say 20

unique harness
#

Structures are very light weight

stray island
#

Great

#

So i am able to set a range in editor for a float value

#

Is it possible for float value in a structure

unique harness
#

no

#

and I believe that range really only applies when changing the value in an editor interface, I think you can still force the value outside the given range by setting it manually

stray island
#

So i better bp it boloean if > value , set value to the same limit

unique harness
#

though it may complain when cooking

dawn gazelle
#

Just use a clamp

unique harness
#

^

stray island
#

Tbh idk what is clamp

dawn gazelle
stray island
#

But I will look it up

#

Oh

dawn gazelle
#

Restricts values to a minimum and maximum, so anything below or above the min and max will be set to the min or max.

stray island
#

Ok i will see its effect on structure

#

Oh it worked but in the editor but not visually with numbers , so i will bolean the number

unique harness
#

what do you mean "boolean the number"?

stray island
#

If its set above the limit the set it as the limit

#

So u cant increase

#

I didnt test that

unique harness
#

that's what clamp does

stray island
#

But clamp affected it in scene not in defaults

#

I mean not in exposed value

unique harness
#

I guess I don't understand how doing it with a bool would change what you're experiencing

stray island
#

Just to force not doing big numbers

#

And retain the limit

unique harness
#

yes I understand what you're trying to do.

#

I don't understand why bool will work but clamp will not

stray island
#

To avoid

#

Both was neeeded

unique harness
#

You can just skip the branch and set the value to the clamped value though

stray island
#

How

#

Is there another clamp node

#

When i remove the bolean id be able to increase the number infinitely

unique harness
stray island
#

Oh thats smarter , Thanks

#

What is switch on int , because i have options in enum and i also just bolean , false then enter the other option , or it shd be done in switch on int?

unique harness
#

screenshot?

stray island
#

Ok

fathom portal
worthy frost
#

that does not clamp in BP tho

#

only on defaults

unique harness
fathom portal
#

Oh, really? Well dang, I've been using that for ages

#

Dang, yeah, I just tried it out, it doesn't clamp it's value. Well that's a shame

stray island
#

Is this good way to fire event based on enum choices

fathom portal
#

Use a "Switch on choice" node instead

unique harness
#

That's where you'd use a switch statement

fathom portal
stray island
#

Oh

#

Alright thanks alot

#

I know how to specify rotation movement on a component , but is there a way to remove the movement from another component , so it ignores a specfic component

unique harness
stray island
#

Worked as i wanted Thanks

noble basin
#

how would i delete a specific instance of a blueprint, instead of deleting all blueprints of that class in the scene

#

i cant figure it out

unique harness
#

Could you try to explain the scenario which you need to do this?

noble basin
#

ok so i have a paint select, a few different colors they can come in, by switching the decal color of the object, when they hit the ground, they leave a mark, for my green paint, when i place a new one on the ground i want the old one to disappear, as to avoid confusion since they work as portals

unique harness
#

so when you spawn one, store it in a variable

#

before spawning the new one, check the variable to see if the object exists

#

if it does, destroy it

noble basin
#

i tried storing it in a variable, and then destroying that object, it didnt work, idk if i did something wrong

#

it just didnt delete anything

unique harness
#

Can you show how your spawning the new object?

mighty fable
#

Hey guys, how would I teleport from checkpoint to checkpoint via console command? I have nodes with the tag "Checkpoint" and want to put them in a list so if you input the command again it will move you to the next one, but I'm unsure how to do that.

unique harness
#

I feel like creating a widget to list the checkpoints as buttons would be more simple

mighty fable
#

I would rather have it through console commands. Do I use an array?

#

And a sequence?

unique harness
#

yes you can do GetAllActorsWithTag

#

and store your checkpoints in an array

#

then send an index with your console command

#

Is there a reason you'd rather have it in console commands?

mighty fable
#

just so its more of a debugging feature rather than allowing the player to skip around freely

unique harness
#

Do you plan on enabling the console for shipping builds?

mighty fable
#

yea

tight schooner
#

If you want it to skip to the next checkpoint with the same command you need some way to determine what the "next" checkpoint is. Idk anything about your game so maybe you can figure out some way to do that with some metrics. Otherwise you need a list (array) of checkpoints in order, and a variable that tracks the player's last checkpoint so that the function can select the next one.

mighty fable
#

so get all actors with tag then promote the array variable off of that node?

unique harness
#

yes

mighty fable
#

I'm not 100% sure on what it should look like

unique harness
#

Do you have a class for your checkpoints or how does it work?

crimson swan
#

Random quick question: Can you not play montage from inside a character blueprint?

#

does it have to be done on the player controller

unique harness
#

You should be able to do that

crimson swan
#

i can't seem to get the "play montage" node in the character. It just doesn't show up at all

#

i get montage play but that doesn't have access to the notifys

unique harness
#

It needs to be in the event graph

crimson swan
#

aah that explains it

#

thanks

mighty fable
#

yeah there is a class, as a blueprint

unique harness
#

So you can do GetAllActorsOfClass then

#

and I would use some member variable in that class to denote order

#

so you can sort the array

mighty fable
#

so getallactorsofclass, then promote variable

unique harness
#

yes

mighty fable
#

compile and add the list of checkpoints into the values list?

unique harness
#

should basically look like that

#

or if you're going to sort

mighty fable
#

yeah that's what I got so far

unique harness
mighty fable
#

so that second one is if we are going to teleport in order?

unique harness
#

yes

#

I added an Index variable to the checkpoint class

#

so you can't sort them correctly

mighty fable
#

ok, so that's what we want! Now does that include the warp and everything?

unique harness
#

no this is just storing them

fathom portal
#

So what is the difference between the top and bottom examples? I get they're both making lists/arrays, but wouldn't instantiating a variable for them make the variable list that size anyway?

mighty fable
#

idk im trying to understand this too

unique harness
#

the top one doesn't ensure the checkpoints are in order

fathom portal
#

Oh, it's casting them too

unique harness
#

note, I'm not testing any of this so it may need some tweaks

#

but the general gist of the logic is there

mighty fable
unique harness
#

Index is a member variable inside the checkpoint class

#

Checkpoints is a variable inside the level blueprint

mighty fable
unique harness
#

the index on the method will decide which to teleport to

mighty fable
#

so do I need your other 2 sequences of nodes then?

unique harness
#

the second method is the console command

#

the first can be executed on begin play or something

mighty fable
#

ok, so the console command one is the one with the get array?

unique harness
#

yes

mighty fable
crimson swan
#

hey guys me again

#

they never seem to want to trigger for me

covert delta
#

in the anim montage, you have to specify that it's a montage notify. You can't just make a new one.

crimson swan
#

ok but that works only for the begin, what about the end?

gritty plover
#

When setting the value of a vector, is there a way to define a max and min values for the vector?

gritty plover
#

Thank you!

worldly dew
#

Hello, I am having a bit of an issue. My character plays two montages at once, each with a different slot. However, when one animation plays, the other one stops. Any idea why?

trim matrix
#

Hi, I'm using UE4 version 4.26.0 and camera shake seems a bit more rough. Anyone know why?

#

IT also won't let me set it as an single instance

#

I'm using Matinee camera shake for headbob

viscid shard
#

how can i find out if a player collides with a collision volume thats inside another on? it aways returns the BP thats colliding

#

like i have a waypoint with a sphere thats large for discovering it. then one on the platform for using it

crimson swan
#

is there any way i can select more than 2 possible death animations?

#

using a select node doesn't seem to work

#

in anim BP that is

dawn gazelle
crimson swan
#

sure

#

gimme a sec

#

this is what i have

#

the issue is i can't plug that select node into anything

#

the random sequence player goes through all of them instead of stopping after picking one

#

if i do it in the characterBP it just loops the montage of the death animation forever. I litteraly have no idea where to go from here

#

actually i think i just got it, it's in animation montages

true valve
#

Can you apply material instance to tiled landscape via blueprint in-game?

unique harness
crimson swan
#

Sadly that one didn't work, it turned out i needed to create a montage section in my montage that would loop the final frame infinitely

#

and then add a montage notify window to allow for notifiy begin and notify end

trim matrix
#

crude way of me setting up a way to enable and disable the mouse cursor, problem is, when i click on something with the mouse enabled, whatever that is plugged into the action command for the left mouse button, fires in the background (the inputaction mouse is bound to tab to enable/disable the cursor). set input ui only doesn't seem to work for me as i can't call the widget for some reason

vast lion
#

Is there any sort of "one off" lerp node?

#

trying to animate a scale just once