#blueprint

402296 messages ยท Page 822 of 403

maiden wadi
#

So do the same thing in your listview widget.

faint pasture
#

in all 3 cases, ItemData should be the EXACT SAME STRUCT

agile ermine
#

exactly

#

Data Table shares SAME INFO for every object inside

faint pasture
#

Struct ItemData can hold the class for the world actor

#

so given a struct, you can spawn the actor (dropping and item)

#

and given the actor, you can get the struct (it's just a field on the actor, that's for storing an item)

#

You can use data tables as the master list but it's all the same.

#

So then for the world list view, when you overlap a world actor

Overlap -> Get ItemData -> Add ItemData to NearbyItemDataList -> Update UMG
End Overlap -> Get ItemData -> Remove ItemData from NearbyItemDataList -> Update UMG

agile ermine
#

pretty simplified but correct ๐Ÿ˜„

rigid fractal
#

actually, there are two collision box, one on the object and another on the character, the collision box that is on the player is the one i use to detect when an item is nearby, so i get the name of this object (item) that was collide and i execute this function, where "item" is the name of that item

drowsy ridge
#

Tried the bool method, didn't work too

faint pasture
#

And for when you overlap an InventoryActor

Overlap -> Get InventoryActor -> ForEach ItemData in ItemDataArray -> Add ItemData to NearbyItemDataList -> Update UMG
End Overlap -> Get InventoryActor -> ForEach ItemData in ItemDataArray -> Remove ItemData from NearbyItemDataList -> Update UMG

agile ermine
rigid fractal
#

i know, is that i preferred to create another box where i can have greater control of the area where the items will appear

agile ermine
#

this is how you can make sure only specified Component is able to trigger an event

agile ermine
#

but math is your friend in UE4 / programming overall

#

more components = more things to update all the time, check their overlap etc.

#

so you just use more of your RAM

#

sometimes you also don't necessarily need a component persisting all the time - you can Add Components on runtime

#

and then destroy them once they done their job

#

as an example:

You have a rocket that should deal Area Damage:
It hits ground, spawns Collision Sphere (with size o f.ex. 1), then resize it to your desired size (you have to do it that way, it will not detect Actors inside of it if you spawn it with already desired size) and then perform code of applying damage

Afterwards everything gets destroyed

drowsy ridge
#

Figured it out mate! I'm a knobhead for using do once in the receivenotifytick @agile ermine

#

Worst programming habit

agile ermine
#

haha, didn't realize that as well

#

it's almost like placing delays in the Loop iterations XD

#

they won't work as we may think ๐Ÿ˜›

rigid fractal
#

a lot of things to change, hard ๐Ÿ˜”

agile ermine
#

yup, hate that as well

#

changing and re-adapting the code again so it works with the project together

rigid fractal
#

worse than i spent all night last night doing this and thinking of a way to solve the problems, thinking it was good ๐Ÿ˜…

maiden wadi
#

Technically didn't need to change much. For the containers you could have used a different list view.

rigid fractal
#

i cant think straight, i couldnt understand much, but i will think of a solution

maiden wadi
#

But I feel you. Currently in the middle of ditching Prefabricator. Not nearly as nice as I was hoping. I can't even change an instance's collision without affecting every other prefab spawned after it. ๐Ÿ˜ฆ

gentle urchin
#

Rip !

viscid barn
#

Alternatively, you could create a new type of collision channel and make it so your component can only interact with components of that channel, negating the need for that check

odd ember
fast escarp
#

they have some posts on their discord for setting it up to use BP as well you can take a look at

dusk ember
odd ember
fast escarp
#

Yeah if you need specifically wallrunning you'd need to either fiddle with the C++ or restructure it some so you could expose some parameters to BP. Personally I'd avoid networking if I couldn't write C++ but maybe thats a hot take.

odd ember
#

nah generally multiplayer is better made with cpp. I wouldn't consider multiplayer for early projects either as you're squaring the complexity of your project

dusk ember
#

hmm, ok

#

i'm trying to make a multiplayer fps game that uses parkour, but for now i can just do singleplayer

dusk ember
#

this is the error that is spamming and this is where its happening

maiden wadi
#

<@&213101288538374145>

torn kettleBOT
#

:no_entry_sign: samosa#3563 was banned.

hexed glade
#

Hoping to get some insight here. I'm building a topdown rpg with a single shared inventory. Considering the main character is always static, would it be better to attach the inventory component to the main character or the player controller?

maiden wadi
maiden wadi
#

Realistically, some of the best inventories are just ActorComponents, so it won't matter where you choose to put it in the end. But if it is meant as a party wide inventory, or a multiplayer game where everyone can access it, it should probably live on the GameState.

hexed glade
#

Can you directly influence the character from the game state, such as equipping and using items on them?

viscid barn
viscid barn
#

that said I would put the equipment references on the character directly, to reduce the amount of times you need to interact with the gamestate

tacit parrot
#

How can i get the Index from the Actor that i hit here? Is this even possible? Sorry when this is a dumb question.

dusk ember
#

also, i added projectile trails but they only appear in the client net mode not standalone. anyone know a fix?

viscid barn
#

check if you don't have another event managing your control rotation, if there is, add a rule to negate it while your wallrun check is valid

dusk ember
#

mk

viscid barn
#

I'm afraid I've yet to touch networking on UE so for that I can't help

#

alternatively, it could be that the way you set up your wallrun makes it so every actor of the same class try to perform the designated task while it's not valid for them, thus giving you errors

dusk ember
#

so should it be set so that it only runs on the client?

viscid barn
#

what, no

odd ember
viscid barn
#

Just look for something that could cause interferences

maiden wadi
viscid barn
#

to give you a more concrete example;

the latest case of that I encountered was because I had set an stat update event to trigger three events in succession: first to update the base attributes of a character, the second to update the attributes of its equipment and finally one to take the result of the previous two and combine it to get the final attribute.

The problem was that the equipment was on a separate bp component which caused an issue as the first needed more time to perform all of its math, leading to an error when attempting to trigger the second.
adding a simple delay between the two events gave it enough time to calculate everything before finally attempting to update the equipment

#

tl;dr: it was attempting to run both events at the same time despite the first not being done yet, making it impossible for the second to run

jolly island
#

Hello, I implemented an interface in my widget but now the widget won't compile and I get error messages saying "overriden function is not compatible with the parent function check flags exec, final, static" and "cannot order parameters in function" Does anyone know what's wrong?

dusk ember
# viscid barn what, no

well i thought what you were trying to say was that it was running across the entire server so that when one player tries to wallrun it also checks for all other players. so, i thought that you only want it to check the one client.

maiden wadi
viscid barn
#

I mean, you can run your function client side only but then you might end up with a discrepancy between what players see

#

(like how in early MH games, monster location was done client side which resulted in players seeing monsters in different place and thus it'd look like your friends were fighting the ambient oxygen ๐Ÿ˜‚)

gentle urchin
#

Lool ! Howd that pass any qa

maiden wadi
#

You'd be surprised how bad QA can be.

gentle urchin
#

And the follow up

#

๐Ÿ˜…

dusk ember
maiden wadi
#

I mean. Cyberpunk 2077 exists. That passed QA somehow despite all of it's hype.

viscid barn
jolly island
viscid barn
viscid barn
#

adding something to your function that makes it so only the character you're currently controlling is affected

#

but before you do that, I'd use a debug print to make sure that it is indeed an issue of several characters attempting to wallrun even if there's no wall to run

gentle urchin
#

I suppose one can alwats find things that are worse

#

And i get that theres a budget and time constraint

#

So more important issues comes first

viscid barn
gentle urchin
#

Yeah i wouldnt push the deadline for it

#

I would patch it tho

viscid barn
#

remember that we're talking ps2/WiiU/3DS era netcode, overall stability is more important than immersion

#

god I'm so tired I keep making weird english mistakes lmao

dusk ember
#

so it seems that the Camera Tick function which is what causes the Camera Tilt happens on Event Tick. could this be the issue or is that how it should be?

viscid barn
#

what do you use for your camera tick?

gentle urchin
#

Like.. no option to patch it, so the release had to be like 99.91%

viscid barn
#

๐Ÿ˜‚

dusk ember
#

these are all the functions in order

viscid barn
#

there's a reason why exploits are so prevalent in speedruns. You can't have a bugfree game, it's just a matter of priorities and bug severity

maiden wadi
#

To be fair. It had to be better. Updates were kinda hard. There were no day two patches, or first month DLC release with major game fixes.

viscid barn
#

it's called so frequently that it can cause a lot of problems

gentle urchin
#

^ True. Nowadays you can get away with super buggy game as long as you do a day2 patch

dusk ember
viscid barn
gentle urchin
#

Unless you are SimCity and dont expect fanbase to flood the servers for 2 weeks

#

Yeah, personally i hate it.

#

If its not ready to be shipped, dont ship it..

viscid barn
gentle urchin
#

I dislike early access aswell

viscid barn
#

then you can decide how frequently you want that timer to loop

gentle urchin
#

Not because of it being early access, but because of the abuse of it

#

And the amount of cashgrabs that just doesnt commit to it.

frail pilot
#

what's the name of the node that has the tooltip above?

maiden wadi
#

Part of that is publishers though too. You'd be surprised how little control you really have over your own game when you sell your soul to a publisher.

gentle urchin
#

And just ditch it once they make some promises

viscid barn
#

personally my camera is set on a 0.1s tick, it's fast enough to feel smooth without taxing the system too much

viscid barn
dusk ember
viscid barn
#

timelines are also a nice way to set ticks but they're not available on all types of graphs

viscid barn
#

the settimerbyevent is activated by beginplay

#

if it's not clear enough tell me and I'll try to summarize what's going on

dusk ember
#

so in yours you have a custom event connected to the SetTimerByEvent, but there isnt a custom event in mine. its calling a function i believe.

#

actually

#

wait

#

let me see something

viscid barn
#

You need to create an event first

#

have that event trigger the function

#

the connect that event to the timer so that the timer runs that event every x seconds

#

for example in mine:
-my attack input event checks if the attack button's buffer is active, if it is, it tells the character to attack
-my attack input event is linked to the timer, set to be ran every frame (on a 60fps basis)
-Said timer is enabled by the event begin play

#

(btw you don't have to type that big ass number for 60fps, just type "1/60" then enter and it'll do the math on its own, this is valid on all nodes afaik)

dusk ember
#

so it works but i have to set the time to 0.01 or else the camera tilt gets really weird

viscid barn
#

can you record a quick video of that tilt?

gentle urchin
#

I wonfer why its ran on tick?

#

Wonder*

#

Wouldnt it just be event driven?

#

Some catch when wallrun starts and ends?

viscid barn
#

changing the type of tick shouldn't cause ticks normally

gentle urchin
#

True, its just wasted i suppose

#

Event sets the offset

#

Tick checks if current rot != offset

#

And RInterp or whatever if they differ

dusk ember
viscid barn
#

that's cause your tilt adjustment is too slow

#

can you show my your tilt bp? it's probably a lack of RInterp as Squize said, or it's update value being too low

dusk ember
#

i think its the interp speed

#

lemme check

gentle urchin
#

Rinterp eases aswell.

#

While rinterpconst dont

dusk ember
#

it was the interp speed

viscid barn
#

๐Ÿ˜„

dusk ember
#

lemme find a good value for it

viscid barn
#

0.01 is even lower than delta tick if I remember correctly so yeah, best not use that

gentle urchin
#

Yepp

#

Better to just use tick then

viscid barn
#

calling on a 100fps for something as constant as a camera is a good way to mess things up if you add too many ๐Ÿ˜‚

gentle urchin
#

As its ment to be used

viscid barn
#

UE4's event tick is actually rarely used, it's usually kept for very specific things as it's quite ressource heavy

dusk ember
#

its a bit stuttery when i jump on/off and i think thats because its at 0.1

gentle urchin
#

Well youd use c++ tick if you can/know how to

viscid barn
#

unfortunately a lot of youtube tutorials don't really take that into account and it works fine for them because each is set in their own project

gentle urchin
#

I use tick for lots of things

#

Only when necessary tho

viscid barn
#

ah yeah but that's two different kinda ticks hahaha

gentle urchin
#

For dure

dusk ember
#

the most i know in C++ is a print statement lmao

gentle urchin
#

Magnitudes of difference

#

You know more than me

viscid barn
#

not to mention c++ is a lot less consuming than bp so even if it was as frequent as event tick, it'd even out

gentle urchin
#

But got a few hundred lines in there by now

viscid barn
dusk ember
#

well in the viewport theres a follow camera and a camera boom attached to the mesh

viscid barn
#

hmmmm

#

if its attached the the character it shouldn't normally stutter when it moves

gentle urchin
#

Unless code is trying to override its location

#

๐Ÿ˜„

dusk ember
#

i'll record it

viscid barn
gentle urchin
#

But stuttering probably is more noticable at higher speeds aswell

dusk ember
gentle urchin
#

Increasing the interp speed

#

Looks like to high speed imo

#

Whats it at?

#

If you go 0 to 100 in one frame, the i terp is wasted ๐Ÿ˜…

viscid barn
#

Yeah I think your camera is updating too fast lol

dusk ember
#

its at 85

viscid barn
#

try halving it

dusk ember
#

its still stuttery it just takes longer

#

this is the camera tick event btw

gentle urchin
#

.1?

#

Rip

dusk ember
viscid barn
#

I meant the camera's bp

dawn gazelle
#

If you're adjusting something that moves, you should probably just use tick instead of a timer.

gentle urchin
#

Interps are made to be driven on tick

viscid barn
#

OH wait

#

you're using ALS's?

dusk ember
#

?

#

no?

viscid barn
#

Oh

#

hmm, weird

dusk ember
#

heres the camera tilt

#

then this is the camera tick

viscid barn
gentle urchin
#

I'd still consider using pure tick instead but oh well

#

Camera handling, movement, interps

#

All belong to tick

#

Easily gated

viscid barn
#

Well, so long as you don't overuse tick it's fine to have the camera on it

gentle urchin
#

Exactly

viscid barn
#

though I must admit I'm not sure why yours is behaving like this

gentle urchin
#

To keep things clean you can do it in the cameramanager

dusk ember
#

the whole problem i had was that i was getting an error spewing out repeatedly when i went into multiplayer

viscid barn
#

do you still get the error after swapping to event based?

gentle urchin
#

Multiplayer..

#

Always

#

Makes me cringe

dusk ember
viscid barn
#

Also, took a while to register in my brain but yeah, it's your interp speed, because you're no longer on a 0.13s update base

#

ofc an interp speed of 80 will result in instant

gentle urchin
#

Update brain freq pls

#

Jk ๐Ÿ˜…

dawn gazelle
#

Where are your running this code? In the character or the controller?

viscid barn
#

try an interp speed of 5

dusk ember
#

a component

dawn gazelle
#

That is on the character?

viscid barn
#

your camera updates a hundred time slower so ofc you need the interp speed to scale

dusk ember
viscid barn
#

(assuming the event based tick fixed your error)

dawn gazelle
#

Ok, then the error is most likely being caused because this is also running on other clients. The other clients are setting the character reference, but other clients do not get other client's player controllers.

viscid barn
#

otherwise you can go back to the regular tick

dawn gazelle
#

The player controller only exists on the local client and on the server.

viscid barn
dusk ember
#

and no matter what the interp speed is it still stutters

trim matrix
#

Is there any way to sort an array in BPs easily from integers?

dawn gazelle
#

Probably put an isvalid check on the GetController output, only proceeding when it's valid. Ideally the camera code would only ever run on the owning player's character.

dusk ember
#

Ideally the camera code would only ever run on the owning player's character.
thats what i was trying to figure out but i didnt know how

viscid barn
#

so naturally if you don't specify which player's camera you want to update, it'll try to update them all

gentle urchin
#

Not sure if multiplayer is the best project at this point if im being honest

dusk ember
#

i'll wait until i understand it better

dawn gazelle
#

And special moves like a wall run is a bit more complicated in multiplayer too. You'll never get it working 100% through blueprints - it may seem like it'll work, but introduce any latency and it'll end up failing.

viscid barn
#

in all fairness, if you don't have the infrastructure to host the online side of your game, it's not going to serve much purpose beside getting some practice for the future

gentle urchin
#

Its just a commonly underestimated complex thing to setup and run properly

dusk ember
trim matrix
viscid barn
gentle urchin
#

It's not rocket science really, but there's a ton of things to consider

dusk ember
# dawn gazelle

where do i put this? i tried searching for it but it doesnt pop up

gentle urchin
dawn gazelle
trim matrix
viscid barn
#

grab the component's owner first, then pull it from there

trim matrix
#

Lmao if I knew how to do that, I wouldn't be asking ๐Ÿ˜‚

dusk ember
viscid barn
#

any interaction with controllers from a component require you to call back to the component's owner first

#

if you're going to use component, I highly suggest promoting the owner to a variable so that you can use related functions more easily

dawn gazelle
dusk ember
#

ngl im not too sure where to put it

gentle urchin
#

๐Ÿ˜… had it laying around from earlier

viscid barn
#

hahaha

#

I mean, I use a similar ForLoop setup for enemy detection

#

and soft targeting

dusk ember
#

where do i use the IsLocallyControlled?

mossy mist
#

Greetings I have a sphere component that generates overlap events and overlaps all dynamic. This is used to register melee hits from the character. The problem is that enemies who use overlapping detection to register hits can hit this sphere component to register damage onto the player. This is not good as I only want them to hit the player, not its melee range. How can I fix this?

gentle urchin
#

If you dont wanna adjust the collision response

#

You can always add a tag to it

viscid barn
#

I'd use custom collision channels but yeah, a tag would also work

#

then in the overlap tell it to ignore components containing said tag

mossy mist
#

If those are the only two options then ill use a custom collision channel because tags means I have to add a tag check to every single enemy

#

ty

viscid barn
#

cheerio

#

Must say though, that is one big ass hitbox ๐Ÿ˜‚

dusk ember
dawn gazelle
dusk ember
#

would i use it here?

viscid barn
dawn gazelle
viscid barn
#

yeah

dusk ember
viscid barn
#

the earlier the better

tulip mason
mossy mist
#

wait thats actually a good diea

#

*idea

#

ill try that ty

viscid barn
#

woops ignore that lol

dusk ember
#

it worked! tysm!!

viscid barn
dusk ember
#

the locally controlled fixed it

viscid barn
#

I copied the nodes instead of taking a screenshot lmao, didn't mean to do that

dusk ember
#

i'll figure out the stuttering thing later, but the error constantly outputting is gone and thats enough for me today ๐Ÿ˜‚

viscid barn
#

I mean, as I said before, if it's only your camera you use the tick on, that's fine. You can go back to it.
it's just keep in mind that in general practice, bp event tick will quickly hit your game's perf if you rely too much on it

gentle urchin
#

Even c++ tick does!

viscid barn
#

yeah

gentle urchin
#

Im using like 8ms on 4k agents

#

Sad

viscid barn
#

but bp tick has the added deficit of bp being a major ms killer by default ๐Ÿคฃ

gentle urchin
#

True !

#

I gained 8x performance going from bp to c++

#

Litteraly the same code

viscid barn
#

๐Ÿ˜‚

#

it's insane how bp can make your ms go from 40 to 600 ๐Ÿ˜‚

gentle urchin
#

Yes !

#

๐Ÿ˜‚ i was amazed

faint pasture
mild ibex
#

Is there a way to make the door open smoothly in Editor instead of snapping into place?
Im using a custom event to open and close the door but it snaps into place rather than just opening like it otherwise would on runtime

gentle urchin
#

Dont think you can do timelines on editor events

#

This sort of prooves it

mild ibex
#

i figured, is there a better solution? Or any solution to this LOL

gentle urchin
#

May i ask why you need it

mild ibex
#

simple curiosity

gentle urchin
#

Then no , there is none

mild ibex
#

fair enough

supple bane
#

is there a way to spawn a plane by getting the locations for each corner?

devout latch
#

in the timeline

#

(I'm assuming you have a curve because that's the way you would do it)

mild ibex
#

rn this is it

#

it was at 0 to -90

#

im testing some math stuff to constanlty add rotation until a value, so that it opens

supple bane
devout latch
#

It looks like it is going to 1 which will look like 0

mild ibex
dawn gazelle
faint pasture
mild ibex
supple bane
dawn gazelle
mild ibex
#

yes

faint pasture
#

Just spawn a plane static mesh (I think the default one is 1m x 1m).
Its scale X will be Height
Its scale Y will be (B-A).Length
Its rotation will be (B-A).RotationFromYVector

mild ibex
#

might be hard to see in the video, but in the outliner, its pivot then SM_Door

dawn gazelle
#

OH you're doing it as an editor utility widget...

#

I don't think timelines work in editor.

mild ibex
#

ye, it works on play, i just want to see if i can get it working in editor

tranquil abyss
#

Ok so

#

the top picture is in my player character

#

but the problem is on M1 press

#

The ai that have the same animation Blueprint

#

also attack when I hit M1

#

I not sure how to design around this

faint pasture
tranquil abyss
glass stump
#

I have a BluePrint for a patrolling enemy, he goes to 'location 1' then to 'location 2'.
I'd like to have multiple of these enemies in my game though. Do I just duplicate the BP and change the locations or is there a better way of doing it?

tranquil abyss
dawn gazelle
# glass stump I have a BluePrint for a patrolling enemy, he goes to 'location 1' then to 'loca...

Duplication is not the answer. You'd be better off making a "PatrolPath" actor that's specifically for setting up patrol paths that contains a vector array that is exposed on spawn and instance editable, and set"3D Widget" to true. This will allow you to place a patrol path actor, and add vectors to it and place them around the level where you want the thing to patrol.

Then on your AI, you can have them set up with an exposed variable of the "PatrolPath" type. When you place your enemies in your level, you can then select which patrol path they should follow - your AI should instead read from the patrol path they were assigned (if it's valid of course).

If you have an actor for spawning AIs, you can have them set up with a patrol path variable as well which you can have them feed into the spawn node.

You can make the patrol path actor a bit more advanced by having options for looping or going back and forth and wait times for each point.

maiden wadi
#

Kismet libraries have functions to draw shapes.

#

In 3D I mean.

#

DrawDebugBox, DrawDebugText, DrawDebug etc

#

Ah, yeah. In that case, simple shapes and materials or Niagara emitters work well.

dawn gazelle
# tranquil abyss

If the AI have the same animation blueprint, then you don't want them casting to your get your player character to get the values - change the input to the cast to "Try Get Pawn Owner" - this returns the character that the animBP is tied to.

keen wedge
#

Hi all, does anyone have any "good" tutorials on rendering a 3D object in the game world (outside of the main playspace) into UMG? At game over, I want to display three skeletal meshes, they'll be animating. I do actually have it working, following this tutorial:
https://www.youtube.com/watch?v=BnLHBJMX0cE

...but there's a minor problem in that the colours after a bit washed out - and I cannot for the life of me work out why, nor do I really know enough about materials in UE4 to fully understand everything thats going on in the tutorial.

How to render a live actor to your UI in UE4 using render texture targets and the scene depth captured from your camera to mask it out to whatever background you desire.

โ–ถ Play video
glass stump
keen wedge
maiden wadi
#

I don't see why not. For basic shapes they're pretty easy to manipulate. Sphere, Box, Pyramid, etc are already in engine if you use content examples. And Sphere and box are easy to scale since they're at 100uu size.

#

Isn't much different if you make your own. Just have them at a default size that you can scale. Alternatively there is a plugin that allows you to create meshes procedurally. Little bit overkill in this sense though I think.

mossy mist
#

Hi I have a server rpc that calls a multicast to run a attack animation montage

#

that montage then has a trigger which calls a server rpc

#

that server rpc then applies damage to things

#

when the server uses it the damage is correct

#

but when the client uses it the damage is doubled

#

the animation runs smoothly on everyone

#

but the damage is doubled when used by clients

#

how can I fix this?

rough warren
#

Hi, I've got a bit of a question. I would like to see if one of the objects my object is colliding with is my spawn_zone which is a blueprint that is spawned. I'm trying to figure what actually goes in my array

keen wedge
# rough warren

Try using the class of the object instead... Loop through your array of overlapping actors, then for each item in the array, compare the class to the class you are looking for. Might work.

maiden wadi
#

You're also looking for the Contains node.

dawn gazelle
slow matrix
#

does anybody know how to detect if the players health (a float variable) is below 20 health? im trying to make it so a blood vignette appears when they're below 20 health

mossy mist
#

was able to fix it anyway the solution was to not run an rpc to do damage

dawn gazelle
slow matrix
#

thanks

faint pasture
#

@tranquil abyssFound your problem. Instead of using Get Player Character, use Get Owner or whatever

#

You want the anim bp to get the actor it's on, not the Player's character

keen wedge
#

Yeah... although you might want to use a For Each Loop with Break - that way, if you find it, you can jump out of the loop, rather than cycling all the way through - assumes you're only interested in "one" etc...

Also, try what Authaer suggested also, regarding the "Contains" node, you might be able to just pass in a reference to your Spawn object instead...

#

Depending what you're trying to do, it might be easier to tackle the issue from the other side... e.g. have the spawn_zone detect the collision and then respond accordingly...

rough warren
keen wedge
tranquil abyss
#

Does anyone have general tip for hit detection- when I swing my weapon I can hit the same enemy 2 or 3 times

#

I have tried Do Once and resetting

#

but that never seems to work

#

this is my damage logic

#

in my ai that is

keen wedge
# tranquil abyss I have tried Do Once and resetting

Might not the best way, but you could try creating a boolean variable (not a local one), perhaps called "IsProcessingHit"... within the logic for dealing with the hit, place a branch to check that boolean first. Only proceed if its not already processing... then, at the end of your processing logic, reset the boolean so that it could be hit/processed again..

tranquil abyss
#

oh lol

#

thats an easy solution

#

idk I didnt think of that

keen wedge
# tranquil abyss thats an easy solution

As I say, may not be the best... but might move you forward...

You might want to also consider resetting it in the OnComponentEndOverlap event too... maybe...

empty needle
#

Anybody have any suggestions n why this is happening?

#

Iโ€™ve stripped the project back to nothing, and have this standalone. Itโ€™s when both UMG are hidden, and then when I bring them back they bug one of them?

keen wedge
#

It looks like its a "focus" issue... e.g. after you'd hidden both panels, you clicked on the top button but it didn't do anything, as if it was focusing the main ui widget, first... then the second click hit the button

empty needle
#

I'm not using any form of focus, it's running an animation.

keen wedge
#

Cant open that with my current version of UE4... the map file doesn't appear, all I get are a couple of enums...

#

Sorry..

empty needle
#

Which version of UE do you have?

keen wedge
#

4.26.2

empty needle
#

Ah, itโ€™s in 4.27

keen wedge
#

Sorry. It looks like a focus issue though... I'd check the UI widget you have for buttons and check that you are setting it to be focused etc...

#

Easy way to test the theory... run that exact test you did in the video, but before you click on the top button to bring one of them back (after both being hidden) - click anywhere on the screen (not on a button) - then click the top button...

empty needle
#

trying now

#

i'll make a 4.26 version

#

Hi @keen wedge , tried that. Still having the same issue. I click someone on the screen prior to clicking any of the buttons for it to return.

keen wedge
#

So you click anywhere, then you click on a button and it appears, yes?

empty needle
#

Nope

keen wedge
#

What, the button still needs two clicks?

empty needle
#

il'l record what's happening

fickle nebula
#

I'm spliting screen with the Create Player node on Begin Play of the** level BP** and saving that reference in game instance when I open a new level and check the game instance the variable returns None in Begin play on level BP ... Any ideia?

empty needle
#

It's actually causing the issue to happen immediately.

umbral galleon
#

I'm spawning an AI actor during runtime, but when they spawn they are not assigned an AI controller. How does one assign an AI controller to an actor?

keen wedge
#

If you can create a 4.26 build I dont mind having a quick look..

empty needle
frozen spear
#

@fickle nebula are you using absolute travel? That will dump the current instance and start fresh

umbral galleon
empty needle
empty needle
#

This is how I'm telling it to identify the type of animation to play.

#

And this is the blueprint that plays the actual animation for the UMG side.

odd ember
#

absolute has to do with the path, not functionality

umbral galleon
odd ember
#

levels are always flushed

#

which is probably why your reference is null

#

because it doesn't exist

fickle nebula
#

should I save in a file?

empty needle
odd ember
#

in the game mode you might have an option for a "seamless travel" actor list

#

these are the actors that are carried over between levels

#

I can't remember if it's exposed

fickle nebula
#

oh ok

odd ember
#

by default player character, controller and game mode should be in that list

fickle nebula
#

I checked that

odd ember
#

but if you have multiple players then that may be different

fickle nebula
odd ember
#

yes but you have to use the list as well

fickle nebula
#

I'm mirroring tha character

odd ember
#

I don't know what you mean by that

fickle nebula
odd ember
#

right but it's still a separate character that you need to add to the list

#

with, probably, its own controller

umbral galleon
fickle nebula
#

In the level blueprint

empty needle
fickle nebula
#

If I create player again on the next level is going to be 3 screens, so I thought I could just posses again that one I first created

odd ember
empty needle
fickle nebula
#

the next level

odd ember
#

like I said

fickle nebula
odd ember
#

your reference doesn't exist

umbral galleon
odd ember
#

because the level is flushed

fickle nebula
#

the reference of the character?

odd ember
#

yes

fickle nebula
#

event if I just placed it there?

odd ember
#

then it will be another character

#

not one from a previous level

umbral galleon
odd ember
#

if you want the same character to persist through levels, you need to use the seamless actor list

empty needle
fickle nebula
#

yeah it ok, I just want the camera to posses the new one

odd ember
#

that is the only way

umbral galleon
fickle nebula
#

isnt it weird not executing something in the begin play?

odd ember
#

not sure what you mean by that?

#

that it doesn't find it at begin play?

fickle nebula
#

if I use a breakpoint on the cast to game instance, it wont stop

odd ember
#

I'm really not following

fickle nebula
#

ok with this node it worked

#

but now I need to delete stuff from the previous level

#

nvm, I'll try to work with a persistent level

umbral galleon
#

navigation raycast??

dawn gazelle
#

I came up with this...

rough warren
keen wedge
rough warren
#

Alright, so I threw in a print statement and it shows nothing.

keen wedge
#

So, either nothing in your array has that class... or, maybe there's nothing in the array...

#

you can use a LENGTH node to get the size of the array, try printing that out before you loop through... see what you have..

mystic bough
keen wedge
keen wedge
rough warren
#

outputs 0

#

so it's not detecting any collisions

rough warren
#

in the collision tab right?

keen wedge
#

okey... so everything is set to "block"... not overlap..

rough warren
#

should I use custom or one of the presets

keen wedge
#

you could test with one of the presets first, but then you may want to create a custom one later, along with perhaps an object channel... try changing to OverlapAllDynamic and see what happens

#

you might get something in the PRINT

rough warren
#

right, changed both collisions and there is still a 0

keen wedge
#

did you set the GetOverlappingActors node to have a collision volume reference going into it, instead of Self?

#

e.g. the collision component

rough warren
#

I changed it to

keen wedge
#

Is this code running "inside" of the cube?

#

e.g. its the blueprint for that cube

rough warren
#

yeah

keen wedge
#

Is there a specific collision volume component on that cube?

rough warren
#

dont think so, I just added a component cube

keen wedge
#

Does it have "Generate Overlap Events" ticked on it?

rough warren
#

yup

keen wedge
#

...and what about whatever you're trying to collide with it?

#

is that set up the same?

rough warren
#

Yup

keen wedge
#

So BeginOverlap and GetOverlappingActors are not doing anything at all for you?

rough warren
#

Yeah

keen wedge
#

can you zip up the project? what version is it?

#

I'm running 4.26.2, will have a look if its quick...

rough warren
#

Wait, you said "BeginOverlap"

#

How do you mean by that

#

And the version is UE5 EA2

keen wedge
#

Yeah, there are events that you can add also... OnActorBeginOverlap and OnComponentBeginOverlap... its kinda hard to do this blind without knowing what you've got set up, how its set up, and whats going on...

I dont have that version installed I'm afraid..

rough warren
#

Yeah that's all good. I'll take a look at these

#

Do I need to set this object as a trigger or is that not a thing in Unreal Egnine

keen wedge
#

Unity background?

rough warren
#

Yeah.

#

I like Unity, I understand it but I feel like Unreal is better for what I want to do.

keen wedge
#

From memory, there were triggers and colliders weren't there? UE has overlap/hit...

rough warren
#

Yeah triggers and colliders

keen wedge
#

so the triggers are your overlaps..

#

the colliders are the hit caused by something being blocked

rough warren
#

so I just tried this out, and it's not outputting. Something is wrong with my colliders and I'm gonna just delete them and work from scratch on em

keen wedge
#

I would try adding a specific collision volume to your blueprint... and then test against that specific componet...
I'm gunna have to call it a night now... its 03:43 here and I'm exhausted..

rough warren
#

Yikes, all good

keen wedge
#

...and then the How To takes you through in small steps ๐Ÿ™‚

rough warren
#

Sounds good, thanks for the help!

keen wedge
#

No problem, sorry we didn't get it sorted for you... gotta go... good luck ๐Ÿ™‚

rough warren
#

Thanks! Bye

trim matrix
#

how come in gamestate it's not letting me do the reference with the dropper thing? if I put this in the level BP it will let me.

dark crow
#

Cause Level BP has access to Actors in the Level

trim matrix
#

ok

#

anyway I can create a reference in gamestate?

dark crow
#

Depends what you need

trim matrix
#

I need access to an actor in the level

dark crow
#

Is there only one of that type or many?

trim matrix
#

one

#

should I get actors of class?

dark crow
#

Get Actor Of Class would be the easiest way

trim matrix
#

aiight

#

thank you

dark crow
#

There's a version that only returns the first Actor which sounds like your case

trim matrix
#

gotcha

#

thank you again man

#

it worked

#

this has been bothering me for a bit but you helped bunches. I appreciate it a lot. Thank you very much!!!!

faint pasture
#

Is it bad form to extend static mesh component? I have a gameplay-related scene component that is always combod with a static mesh. Is extending static mesh fine for this (basically making a mesh + gameplay functionality) or does that smell?

#

Like say you were making a WingComponent for aerodynamics. Would it be bad form to have the parent class of WingComponent be StaticMeshComponent?

brazen merlin
faint pasture
#

I mean does it feel gross? It kinda feels gross.

#

I'm already 3 layers deep into my modular vehicle system tho, I don't wanna make a PowerPort an actor

#

It'd be Vehicle has Engine has Powerport (has power port component?)

#

It's stuff like this that makes me wish we had Godot style scenes

brazen merlin
#

well we extend actor class and have visuals + code

#

would do the same for actor component... so then if staticmeshcomp has everything you want anyways...

rough cedar
#

Just wondering if anyone has a good system to swap weapons and play a specific character animation and weapon animation but both of them are triggered from a single montage. Is this possible? Right now Iโ€™m just playing both animations simultaneously but that kinda messes up my combat system. Any help or link to a good tutorial is much appreciated!

wild seal
#

how can i implement the intarface in bp?

#

i inherited it right click the function implement

#

event appeared i did print and nothing happens when i call the function

faint pasture
wild seal
#

did it only in c++ so far

#

thought it should be working ๐Ÿคทโ€โ™€๏ธ

#

sooo any insights? why this could happen?

brazen merlin
wild seal
#

rhis is the class settings

#

keeping it simple as possible

brazen merlin
# wild seal

from a bp standpoint, there's a caller and receiver, I see above that the event call is for the receiver, if the code below that is for the caller then it should fire and be received. Regarding the caller (at least for bp setup) the call to the bpi needs the target as a reference (the receiver)

wild seal
#

ok so the thing is

#

this is how i call it

#

and the cast is not working i assume because i add the interface in BP

#

:/

brazen merlin
# wild seal

as mentioned, i dont do cpp, but i dont see any reference to the target - casting to the interface is not a target, it should be some actor

#

like talking between the player and a light switch or something

verbal current
#

Trying to figure out how to pass along a variable (location vector) from a blueprint that contains an actor, that spawns another actor from a blueprint.

To give an example. Think a house that is spawning an npc. I want that NPC to be able to know the location of the house that spawned it. I was thinking I could maybe link the two by using the Owner tag in SpawnActor to then somehow reference the owner in the blueprint of the spawned actor. But after some googling I'm not sure that's what that does. Could anyone point me in a good direction to look/read?

I'd like to be able to reference the "Villager Spawn location" from inside the villager NPC blueprint.

wild seal
#

the target is the act, i assume

brazen merlin
brazen merlin
wild seal
#

yeah works in cpp, but apparently have to work differently when i wanna use bps

brazen merlin
#

i only do bp so i can help there, but im lost with the hybrid use of the two

verbal current
# brazen merlin you need to have a variable for this location to exist on the class you are spaw...

Thank you! So I did have that, what I was struggling with is figuring out how to set the variable in the class that i'm using as the spawn target. I was thinking maybe the getOwner function but it returns an object and I wasn't sure how to get the variable out of it.

And yes you're right I could use the current location at spawn as well. But I'm hoping to make this a generic villager class I can attach to many different things that spawn it. I figured it would be smarter to "attach" it to the BP that spawns it.

brazen merlin
faint pasture
#

it'll have a ref to the villager and its spawn location by definition

verbal current
# faint pasture After spawning the villager, have the spawner set VillagerSpawnLocation

I believe I've already done that before even actually spawning it, that's the SET that then pipes into the spawn transform location. What I'm trying to get is the spawned actor to pull a variable from the actor that spawned it.

BUT as @brazen merlin said, I think if I just pulled it's current location right as it spawns it shouldn't really matter... I think I was just overthinking it.

faint pasture
verbal current
#

The return value of the spawn actor node last bit I don't quite understand though. But I figure in the future it would be good to know how to get info from the spawning BP anyways.

faint pasture
#

Spawn Villager -> Set MySpawner on the villager that just spawned to Self

faint pasture
verbal current
#

like this. Cuz i'm getting the spawned object as a return value like @brazen merlin said, I have a link and that'll fill the value at the other end. That totally makes sense. Thank you both!

rough warren
#

I'm still unable to figure out why my "spawn_zone" bp cannot detect these "building_gen" points. It can detect a player but it's unable to detect the small little cubes. (the big cube is my spawn zone and all the small cubes are my building gens

verbal current
#

hmmn, wait shit. I just tried that, and while it picked up the variable "spawn location" that exists in the villager blueprint in the set function at the end, when I tried to compile I get this error because that variable doesn't exist in the spawnning bp/actor. (which in this case is the well)

faint pasture
faint pasture
#

does Villager have a variable SpawnLocation?

verbal current
#

I'll try remaking it.

rough warren
#

(this is spawn_zone)

#

(this is building_gen)

verbal current
faint pasture
#

why are you storing VillagerSpawnLocation tho

brazen merlin
verbal current
#

Gotcha. In any case that helps me understand that a lot better. Thank you again.

I want to set a patrol from it's spawn point to a central "village hall" actor on the map.

So I wanted to have the starting and ending vectors to make it walk back and forth.

verbal current
brazen merlin
#

nvm, it says it could not not find it in Well_BP, so its the wrong set node

verbal current
#

It's been years since I did any real CS. can't believe I didn't catch that return value. Makes total sense now.

faint pasture
#

Then it's dummy proof, don't gotta remember to set it

verbal current
#

I want to have several different classes spawning the same villager class. and they all remember their individual spawn locations is why. But yeah no reason they just can't check at spawn time.

rough warren
rough warren
#

Does anyone know a way around this?

#

Nvm, all good did something and fixed it

dusk dust
#

Yet again asking for someone to try and help me understand this

#

Please let me know if I need to elaborate

rough cedar
#

anyone know of an easy way to set visibility of a mesh on a certain frame of a montage.

rough cedar
#

Ok cool thats what I was thinking

gentle urchin
#

I shared a snippet for that yesterday

gentle urchin
blissful meadow
#

<@&213101288538374145>

torn kettleBOT
#

:no_entry_sign: Slygear#8224 was banned.

hardy sphinx
#

i need object to move to a player, but it goes to falls locations and idk why. maybe smb understand why?

zealous fog
#

Is there a reason you aren't using the ai move to node?

hardy sphinx
#

but its a static mesh

zealous fog
#

No idea what yoy are trying to do, right now you're only storing a reference to the class

dusk dust
#

I really don't know why this isn't working

#

I've tested it without procedural mesh component and it works fine

#

I've also just called the create grid function once without a forloop and built the mesh, and I was able to move it around

fiery swallow
#

@zealous fog love the pfp

rough cedar
#

Is there a way to create a timer within an anim notify blueprint?

quaint nova
#

Hey. I have the 2d paper template and I would like some help on the character moving to a direction when the level loads and I couldn't find any tutorials

zealous fog
#

You'll all have to give some more explanation about your problem, what you've tried to do to solve it, what you are trying to do exactly and preferably show the BPs

zealous fog
quaint nova
zealous fog
#

You dont need the branches

#

Or you need to know what side he is moving for another function?

#

You are moving btw just really slowly

#

Try increasing world direction

#

Scale only goes from -1 to 1

#

You dont need the second branch at all anyways

#

You can just plug it into the set bool

quaint nova
#

i figured it out myself

gentle urchin
#

Not the first one either

quaint nova
#

somehow

zealous fog
gentle urchin
#

Not really

#

Bool == axis > 0

#

No branching needed

worthy carbon
#

Hi! I created an inventory but when i pick up the weapon it doesnโ€™t attach to the playerโ€ฆ someone help me

gentle urchin
#

Branchless logic ๐Ÿ˜„

zealous fog
gentle urchin
#

Set the bool directly based on the condition

#

Just ditch the branch and plug the condition result into the bool

zealous fog
#

Oh yeah that's true

#

Does it matter much? Besides looking prettier

#

Performance wise

gentle urchin
#

Not anything you'll notice

#

But branching is error prone

#

Theres always an extra possibility for mistakes when you branch

zealous fog
#

Fair point

zealous fog
worthy carbon
jolly island
#

Hello, does anyone know why Simple Move To Actor works for moving my player character but Ai Move To doesn't? The Ai node would be more useful.

zealous fog
worthy carbon
#

๐Ÿ‘๐Ÿป

zealous fog
jolly island
zealous fog
#

Show the BPs

jolly island
#

There's a Set AiController Class node, mayb that would work? Never used it myself.

zealous fog
#

Class defaults or class settings

zealous fog
# jolly island

It has an ai controller in the setting, but I assume you posses it during play? Because then it has player controller I believe

jolly island
zealous fog
#

Not if its possessed by the player I think

#

What are you trying to make

jolly island
zealous fog
#

Top down game? You can just have the "player" be an AI if you wanna do AI stuff with it

#

But maybe you can just get the distance between the 2 and then stop the character from moving when too close?

#

Yes, you're asking if the directions are equal however that's a really small margin

#

You should instead get the direction and add a margin to it, and ask if the rotations are within that margin

#

You're asking the thing on the left

#

One really specific rotation

#

You should ask on the right, if my rotation within this range

#

0 is one rotation, x is another, find out if y degrees is between 0 and x

#

And this is 2d btw

#

So depending on what you wanna do, you also have to solve for the z axis, or you can decided to break the rotation and only use the x and y axis

#

No scrap that

#

Brain fairt

#

This is just for one axus

#

The z axis

#

If you wanna do it in 3d you'd have to solve for 2 or 3 axis

#

So I would keep it to the z axis for simplicity

#

Have you googled it

jolly island
#

Or would it be possible to turn the player into an AI temporarily?

cursive path
#

Hi i have problem with world composition when loading and unloading tge level there is little lag is there any fix for it??

zealous fog
#

You'd have to look it up

#

I dont know how but I imagine it should be a pretty normal feature for an engine

trim matrix
#

Hey there, I have this delegate here (which took me a long time to figure out cus I did it in c++), what do I do now to broadcast this to my animbp?

odd ember
#

and maybe.... why?

#

delegates broadcast to their subscribers, so your animBP needs to subscribe to your delegate

trim matrix
#

Ah okay

#

Sorry but do you have any idea how?

odd ember
#

well if you know how to make a delegate, how do you not know how they work?!

#

event dispatcher is the name used in BP

#

the functionality for adding subscriptions is Assign or Bind

mortal wharf
#

I have this USTRUCT:

 USTRUCT(BlueprintType)
struct GAME_API FSSPInventory
{
    GENERATED_BODY()

     UPROPERTY(EditAnywhere, BlueprintReadWrite)
    TArray<AEquipment*> Equipments;
};

But in blueprint, I can't access the Equipments TArray. How come?

mortal wharf
#

You want me to post in #cpp ? Alright ๐Ÿ™‚

odd ember
#

yes it's nothing to do with BP

lost crow
#

Hello guys, I added mobile input to the screen, but when it is damaged by AI, all touch is gone. Anyone know the reason for this?

lost crow
#

oh sorry. My bad, im new on here

devout dove
#

I'm trying to open a level but it won't, so I have created a Menu that opens a "Town" level when pressed on "play" and then in that "Town" i have a button saying "Fly" so if pressed another level should open but it doesn't. It weirdly moves me into some random place in town.

#

Here is the town

#

When i click on Fly i see this

#

Found the issue, "BlockAll" collision caused this problem.

sinful moth
#

Can anyone explain what the delegate means in the last block?

earnest tangle
#

It's an event that gets called when the ai is spawned

#

The node is perhaps asynchronous

#

Hard to say for sure because that doesn't look like a default UE node but rather from some plugin

primal smelt
subtle isle
#

Oh I feel like I was asking my questions in the wrong place so I'll repost it here and delete it from where I just wrote it

#

Hey, I'm trying to figure out how to make it so if a player presses a key while in a specific area (trigger zone) it transports him elsewhere but I am unable to call the inputaction to the BP where my triggerzone is
I have this set up as my interact event right now for testing

#

and nothing shows up when I look it up through my reference

hexed glade
#

Is there a better way to retrieve variables from a character than using cast to? I ran in to problems with using cast to when switching characters.

sinful moth
last abyss
hexed glade
#

Ah, yeah that would work.

primal smelt
subtle isle
#

I wont be using the launch character node, it was more for testing purposes so I suppose i can switch it to a print node instead

primal smelt
#

You'd need to return false to the value when the character is no longer overlapping

subtle isle
#

Ill give that a go real quick

#

Lets see if I can pull that off without my brain exploding this late at night, thank you!

odd ember
# subtle isle

you should be using the OtherActor pin instead of trying to get player character

subtle isle
#

otheractor?

#

ahh

odd ember
#

you have two separate problems essentially: registering that the player is in a specific place, and whether a player has pressed a specific button

subtle isle
#

like so?

odd ember
#

yes

#

so that will check all actors that pass through

#

but only if they are of the class you are casting to they will pass through

#

how you do the next part is a bit more finicky

#

if you have interaction in your game across the board, I recommend thinking of system for interaction where objects/actors in the world register themselves to the player, and based on some conditions that you can set up, the player interacts with what you want

subtle isle
#

to be very honest I don't have many systems right now, its a pretty empty project
I am doing this for a class project and we don't have to make a whole game just a working level

odd ember
#

in that case

subtle isle
odd ember
#

you can make it so you just register a single actor at a time

subtle isle
#

I would be doing this in my Character blueprint or my object blueprint?

odd ember
#

ideally in the controller, but character in your case will do

subtle isle
#

this is the triggerzone i was talking about

odd ember
#

yeah that's fine

#

it doesn't matter

#

basically your registration code is what matters

#

and that's in the character

subtle isle
#

alright

odd ember
#

for simplicity's sake, it's worth implementing an interface for this

subtle isle
#

yesss! An interface, I was trying to get that to work

primal smelt
#

The quick and dirty approach (what I mostly know) would be that branch method. From the cast BP you could pull off the As BP Skjorn (presuming that's the player character) to set the bool. You need to create the bool variable and compile it in your character bp first though

odd ember
#

then create a variable of that interface inside your player character

subtle isle
#

I have one called Enter

odd ember
#

okay what you want is an interaction interface that has a Use function

#

have you setup inputs in your project for a Use key?

subtle isle
#

Im assuming this

odd ember
#

perfect

#

yeah so do you have event setup in your player character BP?

subtle isle
#

nope, thats where I got lost

#

I made a BPI_Interact

#

and added the interface to my character BP

odd ember
#

you don't need to add it to you character

#

you add it to the objects you want to interact with

subtle isle
#

right

#

I had also added it to the cave from earlier

odd ember
#

so look for InputAction inside your player character

#

you should have one for Interact

subtle isle
#

oh right

odd ember
#

bingo

#

next, create a variable for your BPI_Interact inside your character

#

just a variable

subtle isle
#

can I call it interact?

odd ember
#

call it something like CurrentInteraction

subtle isle
#

like this ?

odd ember
#

yep

subtle isle
#

never made a bpi var b4

odd ember
#

crazy innit

subtle isle
#

yea crazy xD

odd ember
#

so now off of your Interact action, get the variable of your BPI_Interact and drag out a pin to the Use function

vernal path
#

Hi all, in a chess example... if i want to change the piece colour to yellow (selected) and later (after deselction) back to default colour. Function Vs Custom Event, which one to prefer and why?

odd ember
#

events can do whatever you want, including delayed/timed functionality, but cannot have return values

subtle isle
#

is this what you mean by getting the BPI_Interact variable?

#

feel like im setting it rn

odd ember
#

create a function called Use

subtle isle
#

ooh

vernal path
#

right.. i read that... like in this case, anything will work right.. should i prefer function or event?

odd ember
subtle isle
#

like this ey?

odd ember
subtle isle
#

awesome

odd ember
#

now

#

go back into your object

#

that you want to interact with

#

add the interact interface if you haven't already

subtle isle
#

donezo

odd ember
#

then where we were with the cast node

subtle isle
#

(also making it show some text)

odd ember
#

you want to pull the character BP's pin and use it to Set CurrentInteraction to Self

subtle isle
#

self as in the cave's triggerzone?

odd ember
#

yes

subtle isle
odd ember
#

get a reference to self

#

type self or this inside the context menu

#

add it to the yellow pin

subtle isle
#

ah got it

odd ember
#

cast it

subtle isle
#

like this?

odd ember
#

correct

subtle isle
#

am i casting it to the right thing xD?

odd ember
#

well

#

probably not?

#

you need to cast it to the interface

subtle isle
#

ohh there ya go

odd ember
#

yes

#

and connect it

#

so now there's two things left to do

subtle isle
odd ember
#
  1. Implement the Use function on the object itself
gentle urchin
#

Isnt this over the top? ๐Ÿ˜…

#

Couldnt it just be an actor reference ?

odd ember
#
  1. Make sure that when the player leaves the object's area it zero's out the interaction
gentle urchin
#

Instead of bpi reference?

odd ember
#

no it couldn't

gentle urchin
#

How so

odd ember
#

because you don't know what the object needs to be that you want to interact with

subtle isle
#

i have the node ready

odd ember
#

you only want it to happen if it's the player character

subtle isle
odd ember
#

null it out

#

as in, set it to nothing

gentle urchin
#

Object in this context would always have to be an actor, wouldnt it ? Placed in the world..

odd ember
#

not all actors can be interacted with

subtle isle
#

how do ya set it to nothing?

odd ember
#

leave the pin empty

gentle urchin
#

No, but those wouldnt set themself to the interactable actor

subtle isle
#

oh

#

so the way it is now?

gentle urchin
#

And even if they did , it wouldnt react to the interface message due to no implementation

odd ember
#

so yes, the interface is necessary

#

is this the most optimal way of doing things? probably not. but it's a quick and dirty way to get it working well

gentle urchin
#

Guess theres something im not seeing in this scenario then

#

True

subtle isle
#

am i to remove the target?

#

like that?

odd ember
odd ember
subtle isle
#

oh right right

odd ember
#

Target should be your player character

subtle isle
#

should be good now

odd ember
#

yes

#

it's not super clean but it'll do

#

next

#

implement the Use function

subtle isle
#

that's all we need brother

odd ember
#

and just do whatever you want to do on that function basically

subtle isle
#

message?

odd ember
#

no

#

in the panel do you have a Use function?

subtle isle
#

under functions?

odd ember
#

yes

#

double click it

#

that's where your interaction logic goes

subtle isle
#

oh boy

#

one second

odd ember
#

did you implement the interface?

subtle isle
#

just did now :X

odd ember
#

yep

subtle isle
odd ember
#

no

subtle isle
#

aight

odd ember
#

that would imply using it as soon as you enter it

#

implement it as an event or function

subtle isle
#

that clears things up

odd ember
#

and add the logic you want to have happen onto it

subtle isle
#

i get it from here i reckon

odd ember
#

just right click on the Use function

#

and click Implement

subtle isle
odd ember
#

๐Ÿ‘

#

this is where your interaction logic goes

#

whatever you want

subtle isle
#

and here I would put in what would happen

#

wonderful

#

and its only being called because of this part right?

odd ember
#

because that's where the player is

#

it's not perfect

#

it doesn't account for a lot of cases

#

but for a simple project it'll do fine

#

you can do the same type of logic for any number of actors or objects and they'll work all the same, as long as they implement the interface and add themselves as a current interaction

subtle isle
#

it workeeeed

odd ember
#

well duh

subtle isle
#

genius

#

this anything i should worry about?

odd ember
#

yes

#

put an IsValid before the Use call to the CurrentInteraction in your character BP

subtle isle
odd ember
#

๐Ÿ‘

#

wait no

gentle urchin
#

Mesh?

#

Nah

odd ember
#

the current interaction

#

is what you're checking for

subtle isle
#

oh

#

reference to self?

gentle urchin
#

Intefaces dont throw errors for nullpts afaik

odd ember
#

no

#

it will since it's a variable

gentle urchin
#

Mine doesnt ๐Ÿคทโ€โ™‚๏ธ

odd ember
#

a call won't trigger a nullptr

#

but if you have a pointer to an object, then that pointer can be null, whether it implements an interface or not

subtle isle
#

what does reference to self call in the bp for the character?

odd ember
#

forget reference to self

subtle isle
#

aight