#blueprint

402296 messages Β· Page 800 of 403

gentle urchin
#

which makes this even more questionable

brazen merlin
#

@timber knoll you're looking particularly formal this year πŸ˜›

timber knoll
#

πŸ˜‚ it was a random thing from yesterday with friends

#

A very formal voice channel haha

brazen merlin
#

formal != discord

timber knoll
#

What do you mean by this btw?

steady thicket
#

I initialized the size to 4 because I thought that the BP would get an error if they access the specific indices like 0,1,2,3 when setting the actors I placed.

timber knoll
#

With copy I mean you would still lose the previous size

#

But it wouldn’t do a resize operation is what I’m thinking

timber knoll
steady thicket
#

I don't think there's an Actor array in BP

timber knoll
#

There is

steady thicket
#

where can I access that? XD

eternal reef
#

Just create an actor variable in your level blueprint and in the details pannel switch it to array

timber knoll
#

Wouldn’t it just be TArray<AActor*> exposed to blueprint

#

Been a while since I worked with UE C++ tho so πŸ˜“

steady thicket
timber knoll
#

Yeah but you’re setting the values on BeginPlay

brazen merlin
timber knoll
#

Not in the parameter itself

gentle urchin
timber knoll
brazen merlin
gentle urchin
#

I was talking more figuratively as the array will get resized from the copy, not the actual Resize() operation

timber knoll
brazen merlin
#

id be happy to help btw, instead of just spit out quips, but thats a long read to figure out whats wrong πŸ˜‚

eternal reef
timber knoll
#

πŸ™ˆ I’m not procrastinating, I study game dev haha

eternal reef
#

Should have picked a games related topic for my thesis, oh well πŸ˜…

#

Check the variables you are feeding into the array, are they static meshes?

proper umbra
#

In my editor game, I have actors that cast to the player character. However, in the packaged game, the logs seem to say that the player is pending kill. ANyone know a workaround?

timber knoll
#

I think you should just check if the references are valid, before casting

#

I got you abaddon πŸ˜‚

eternal reef
#

I like your little addition youve made there

worthy rock
#

Is there some sort of goto BP command just to clean the wires up a bit when you're jumping from one group of commands to another?

#

Always hire a qualified elechicken to do your wiring for you.

timber knoll
#

You’ve got me very confused haha

proper umbra
worthy rock
#

More like so you don't have to have a wire stretching across stuff like that.

#

But I suppose I could jump move the top block of code to the right.

brazen merlin
#

Some of that cant be avoided - functions can help in certain cases - but for this, because theres an event, you can CreateEvent

timber knoll
#

Well blueprints is supposed to be from left to right

#

you already have all those things on top

eternal reef
#

Not so formal anymore it seems

timber knoll
#

Back to happy peepo!

eternal reef
#

In the end you have to find your own "style"
There are many ways of structuring your Code like using functions, macros, custom events, etc.

timber knoll
#

It's really weird, with blueprints I always work with functions and events
only do that in code when necessary πŸ™ˆ

brazen merlin
#

Uhh.. blueprints execute left to right bcuz thats the exec flow....

#

Event begin play is the first thing to fire for this graph

eternal reef
#

Well "technically" you could go from right to left kappa

timber knoll
#

I will come knock on your door personally if you do that πŸ˜‚

icy dragon
feral ice
#

There is a node called get velocity whats the name for the node set velocity

timber knoll
#

Set Physics Linear Velocity

#

If we are talking physics based at least

dusky harbor
#

Hey,
I am trying to make a blueprint, who randomize only the numbers in this variables.
No Max Value and no Min Value only one of the number between the variables
Does anybody know, how can i do it?

timber knoll
#

you want to basically have one of the three?

#

make a random number being 1, 2 or 3

#

1 = A
2 = B
3 = C

#

an array would probably be easier to use (random index between 0 and size-1)

whole girder
#

Hi Community!
Simple question: What might be the best approach to interact with objects in the world?
Using sphere trace by channel(or smth similar) or create for each interactable object its own collision to detect overlapping when the player hit it?

timber knoll
#

Really depends on some factors

#

is it 3rd/1st person, then you might want the player to look at objects
topdown/2D you could do sphere trace

#

own collision in case you want more flexible approach and different hitboxes depend on use case of the interactable

eternal reef
#

If you have many objects that can be next to each other overlapping can be annoying, especially when they are swappable like Weapon Pickups

brazen merlin
eternal reef
#

I prefer to do manual pickups for things that are important like weapons for example
While potions are just automatically picked up with an overlap
But I guess it really depends on what you are doing

timber knoll
gentle urchin
#

New one I think ^^

onyx token
#

would it be doable to not inherit the character controller that comes with ue4 - but make your own in blueprints?

faint pasture
onyx token
#

hmm i guess so...
Well although for my needs it'd actually be fine to still use the character movement component but just have my own skeleton mesh rooThink1

gentle urchin
#

I dont think you easily get around atleast using their base cpp controller as a parent

onyx token
#

because my problem is-
For some reason - when you add a character, the skeletal mesh is rotated by -90Β°

faint pasture
#

I think he's speaking Unity, where a character controller does what our CMC does.

gentle urchin
#

Oh, my bad then ^^

onyx token
#

and i'm trying to rotate spine bones based on where the camera looks, so i need the character rotation & the camera boom rotation

#

but if the character mesh rotation is -90Β° - it doesn't work well

faint pasture
#

CMC has nothing to do with the mesh being rotated.

onyx token
#

well if you go and add a character actor, it gets inherited right

timber knoll
#

rotate it in your import settings

faint pasture
#

Is it facing x axis?

timber knoll
#

then you can have it without rotation inside the blueprint

onyx token
#

well it's just a-

#

problem is

#

if you want to have the Y axis the front one

#

you need to rotate it by -90Β°

faint pasture
onyx token
#

but why is the arrow on +Y then? rooCry1

faint pasture
#

Thing.forward is x axis.

#

That's local y

faint pasture
#

Because that mesh is imported facing y

#

Just spin it in the bp

onyx token
#

yea, by 270Β° right?

steep tartan
#

Hey, can someone help me? When I try to open some specific blueprint classes I get this error. Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000040 from UE4Editor_Kismet. Yesterday it all worked fine, nothing was changed since then...

faint pasture
#

Don't rely on the mannequin, it's been facing y since forever. No clue why it does tho, just a relic if the past

onyx token
#

here's my issue:

#

i'm using these couple of nodes

#

to rotate the spine

#

so my characters head always looks in the direction of the camera

#

but if the mesh is perpetually rotated by -90Β°

#

i'm screwed

faint pasture
#

Your character or the ue4 mannequin?

onyx token
#

mesh mannequin, sry

#

not the character, i'm using the mesh as a base, because the character has the whole "rotate based on movement" thing going on - which i could disable - but then the legs wouldn't rotate, which i want

#

this is stupid to explain, hang on

hybrid ether
#

Why this prints only 0 everytime?

faint pasture
#

If you're not using a mesh which is aligned correctly on import then you're wasting your time. Do that first.

#

Or build your whole system assuming a charmesh facing Y, however you want to do it.

onyx token
#

the idea is - the feet rotate like normal with WASD - and i'm using the standard character controller for those-

#

But i cancel the rotation out with the spine bones

#

that way the character always looks in the direction of the camera

#

which works - if only there wasn't those -90Β°

faint pasture
#

Turn on your capsule visualization so you can tell what's animating and what's just rotating with the actor and things will be more clear.

onyx token
#

capsule visulalisation? rooThink1

timber knoll
onyx token
#

oh you mean if i rotate the character with like a bunch of blendspace animations?

#

dw, that's not happening, i'm purposefully doing it this way to avoid blendspaces

timber knoll
#

think it's just to make sure the problem isn't with the capsule rotation

#

but i suppose the capsule is following your movement direction anyway

onyx token
#

yeah

#

it's just the standard third person character

#

press D - capsule turns right. Press A - it turns left

#

that's why the feet rotate that way

dusky harbor
#

Anyone with an idea how could I do it.
It depends on random value which number for X and Y I receive 🧐

gentle urchin
#

pick two random, get their X and Y ?

#

Result.X = Get(rand()).X
Result.Y = Get(rand()).Y

spark steppe
#

oO

#

does he really want x/y from a different array element?

#

sounds like he just wants get random item from the array (if his UE version has that node), or random int in range 0 - last array index as input for the array get node

feral ice
#

What am i doing wrong? I am just trying to get the location between two points and its all messed up.

gentle urchin
spark steppe
#

@feral ice plug both locations in a vector lerp node and set the alpha to 0.5

gentle urchin
#

you'd only have to add world pos if you were working in local space

gentle urchin
spark steppe
#

yea but only since 4.27(?)

gentle urchin
#

true

#

I guess that's not always given

willow phoenix
#

there is also "random in range", but i love to shuffle. feels like casino-card-mixing, but i guess its based of the computing time so its not really random when you get a random number in ue4 :3

spark steppe
#

also shuffle is way more cpu "intense"

hexed glade
#

Hi everyone. I'm having a problem with this equipment system using child components. Whenever I run the function it tries to equip the base component despite the print string retrieving the child component name. Anyone got an idea what is going on?

zealous fog
#

OK this is my issue. I have a projectile BP that can be spawned by enemies or my player character. When they spawn it the send in a few variables. How do I prevent the enemy bullets from hitting the enemies, and my characters projectiles from hitting my character?

timber knoll
#

If you're using collision, I would just set a collision preset

gentle urchin
#

correct collision setting, check for tag etc

zealous fog
#

But they spawn the same projectible blueprint

#

Would I need to make 1 for enemies and 1 for myself?

gentle urchin
#

nah, but you have an instigator,

#

you could attatch a team tag to the bullet

#

or use the instigators tag

timber knoll
#

you could also have a function that you call right after creating

zealous fog
#

Cheers I'll try it out

timber knoll
#

to swap these things around at runtime whenever you want

icy dragon
#

<@&213101288538374145>

dusky harbor
#

Thank you for the answers!
I think, that i am trying to do something other and i didn't explain it right.
Here a photo what i wanna do.
If the random number is 1 . I want to reset the coordinates to new location of X = 150, Y=-200, Z=27.
If the random number is 2 , then X=350, Y=-100, Z=27
...
How can i connect each of them to "New location" if is it possible.

The final goal is, that i want to reset the location of my target only at certain coordinates

timber knoll
#

so you have an array of 3 vectors

#

then get the random index, and just pass the value from the array

#

which also solves connecting each since there will be just one pin πŸ™‚

snow sand
#

recently I started exploring collab viewer template. i am trying to run build for windows 64.i am able to connect with other users on same LAN network but could not connect with users on internet. KINDLY GUIDE

steady apex
#

I've got a blueprint derived from UStaticMeshComponent which I'm creating in my actor, but when I call DestroyComponent on it in the actor blueprint, the component doesn't actually get destroyed. Any idea what might be causing this?

timber knoll
#

where do you destroy it and how does the actor look like?

steady apex
#

I think I solved it

#

I just moved the destroy call into the component blueprint itself and now it works

blissful widget
#

Am I missing something, or can actors components not have timelines in them? Kinda rules out a lot of possibilities for components πŸ€”

trim matrix
#

Whoops wrong channel

willow phoenix
#

@dusky harbor draw out from one of your vectors and use "select", maybe that will help

hexed glade
#

Did some more testing with the equipment system and I noticed in the world outliner that the weapon appears to attach to the character, yet it still stays put on the ground.

blissful widget
#

I have a scene component on each socket, and switch them between the components... seems to work

rose elbow
#

anyone able to give me and indication of how I would make the character look towards the mouse cursor as well as shoot towards the cursors location? trying to do it for a 2.5d side scroller but I can't find anything online to help

odd ember
#

get hit location under cursor, break vector, use depth of character

gentle urchin
odd ember
#

timeline is a component

blissful widget
rose elbow
#

so I have this code in now to change the rotation but the mouse cursor isn't actually moving for some reason

languid hemlock
#

i wanted to ask something about blueprints basically i wanna make a mario kart styled item box and wanted to ask how i could make one as all resources i can find are well closed source :(

blissful widget
languid hemlock
blissful widget
#

That would be attaching a component to your player character, to a specific socket maybe

#

Basically the same deal as equipping a sword isn't it?

languid hemlock
#

and also the item giving part where its like doesnt give ebverytime a different items tho i just got 3 implemented rn into my game

languid hemlock
#

its just the item part where im rn struggling with if i could fix that than a huge rock would be lifted :P

blissful widget
#

The above still applies, it's not particularly different conceptually to equipping a sword for example is it?

languid hemlock
#

ye i guess

#

is there a tutorial youd recomenned for equiping stuff?

blissful widget
#

BP sets are allegedly immutable, but adding/ deleting nodes in them works still... UE docs πŸ€”

earnest tangle
#

Yeah I just checked the source out of curiosity, they most definitely are not immutable lol

smoky marsh
#

I'm guessing by that they mean the items in a set can't be changed, so you could remove something, edit it, and put it back, but you couldn't get a reference, do something to it and expect it fixed the original item

#

Its very poorly worded don't get me wrong, but that's my hunch anyways

languid hemlock
#

btw uh may i ask would yall say to use a item database just for 3 items? >.>

smoky marsh
#

Scalability

earnest tangle
#

@smoky marsh I don't think that would work because it would suggest that for example if you were to store actors in it, it would end up duplicating them every time you tried to access them

smoky marsh
earnest tangle
#

It doesn't work like that in C++ so I'm not sure why they would change it to work like that in BP's πŸ€”

smoky marsh
#

The note about it currently being immutable in BP might be why

#

I'm guessing the set is actually just a set of pointers and not actually the container

#

So they set it like this for idk, safety I guess, bp limitations, someone else might have a better clue

earnest tangle
#

Well I'm looking at the C++ implementation of it and it doesn't really do anything like that so it looks like just a goof in the docs tbh :D

smoky marsh
#

Lemme give it a one over as well, I'm curious now

earnest tangle
#

It's in Containers/Set and BlueprintSetLibrary

smoky marsh
#

Looks like pointers to these eyes

earnest tangle
#

Yeah, and the set library just takes refs as parameters with void return which does suggest it's definitely mutating the input

rose elbow
#

I'm not sure how to properly describe my issue but pretty much I've now made it that the mouse cursor is visible at all times as it is currently a crosshair and when the player left clicks it shoots towards the cursor/crosshair. But for some reason when I left click the cursor will disappear and it won't shoot, it will only shoot if I double click.

#

its got something to do with unreal when you hold left click it just hides the cursor?

toxic trout
#

i'm copying this blueprint from unreal's official fluid surface tutorial, and my project doesn't like the "static mesh component" nodes. i can't make them from within my own editor, and copy-pasting them in from the website throws errors. following the tutorial, i have a "static mesh" type variable but no "static mesh component" type. is there a way i can work around this?

spark steppe
#

you get them by adding a static mesh component to your blueprint

#

which is not done by adding a variable, but above that on the blueprint hierarchy is an add button, search for static mesh component

#

if you now hold ctrl while selecting the component and drag it to the blueprint graph, it would give you the variable reference

toxic trout
#

thank you! they really ought to be more clear on stuff like this in official tutorials

languid hemlock
#

may i ask uh so basically my object needs the e key to get picked up but i would like if it it immidially could get collected without having to press e

blissful widget
#

Give the object a collider and pick it up on overlap with player

languid hemlock
#

uuuh how do i add an collider? >.>

blissful widget
#

Is that something Google may have an answer for maybe?

#

The UE Learning Centre definitely covers it in the intro to BP as well, IIRC, which should be required completion before joining here πŸ˜…

languid hemlock
#

oooh oki

#

ye i mostly work with godot or SFML but we had to use Unreal for the School Project without any prior knowledge

slender idol
#

Hey whats the go to solution for handling camera bobbing and movement? I find timelines to be a bit unwieldly and the camera shake component seems a bit too random for an attack camera animation for example.

languid hemlock
#

tho im fucking stupid i finnaly found out how to add an collider

earnest tangle
#

gotta start from somewhere

#

doesn't mean you're stupid if you don't know everything lol

blissful widget
#

Stupid is a strong word, but we're all clueless when it comes to things we are inexperienced in.

chrome fractal
#

spring arm probe collision not working when I change the target arm length of spring. Anyone knows please help

south merlin
#

I've got a gun that has standard vars, like magazine size, rate of fire, damage. Stuff you would expect. I add these to the gun in the construction script. If I have a modifier that lives on the player (+1 to magazine size). Can I grab that var from the player and add it to the magazine size in the construction script? Or should I do that in event begin play for the gun? I'm not sure the order things execute.

rose elbow
#

right so I have this code for a full auto rifle, the sequence is connected to left mouse button and when its first pressed it works fine, but after the first time doing it the code doesn't work unless I double click the left mouse button. Anyone got any idea why this is?

vapid flume
#

are blueprints bad?
any Games Created 100% Fully with Blueprints?
||
don't misunderstand it 🀐 ||

earnest tangle
#

Bad no, 100% bp's yes, afaik for example Epic's Robo Recall is BP's only

#

But more complex games will usually benefit from using C++ alongside BP's as it can offer advantages, and not all engine features are available in BP's

blissful widget
#

I think Mortal Shell is close to BP only, as they ran into issues with nativization for example. It's a soulslike

I'm sure there's lots more examples too

tight schooner
#

For complex projects that need C++, Epic still intends you to use BP and C++ together

icy dragon
vapid flume
icy dragon
#

In reality it's a balancing act and more importantly getting shit done.

vapid flume
odd ember
#

because blueprints are easier

#

and it allows people to shortcut certain rules programming has setup

#

so you can make rapid prototyping at the cost of well established architecture

tight schooner
#

Yeah the article seems to suggest sphere masks, which is a material graph node iirc. Whatever technique you use depends on what you need the effect to look like (is it like a wound or does the whole body part glow?) and how long it needs to persist (does it need to track with character animation?)
Maybe ask #graphics or #visual-fx for ideas. I've never dealt with exactly this thing before.

onyx token
#

is there a node that lets me point an object to this lil cube that i have (it's a child of my camera object) ? rooThink1

#

like always just point to it

pine hatch
#

Hi everybody.. i have a problem regarding my Blueprint . It is a water volume so i added a plain with water texture and a box collision below... i tagged the box collision to water, than for my camera controllers on begin overlap event i add the post process if it collide with something with the water tag .. in the editor it works perfectly but as soon i built it the event doesn't run anymore .. i added print string nodes to find out and it prints in editor but not in the build. Ps : i builded as development so i can still see the prints in the build.. i wonder if anybody had the same issue or have some idea how could i fix it.

dark crow
#

Or i think you can lock the camera to it?

onyx token
#

look at rotation rooThink1

#

well- what i want to do

#

is point the head of my character to that little cube

#

problem is, the head of my character (the bone) runs on relative rotation

#

and my character rotates using WASD and rotates based on camera rotation

#

so i need some way to either basically make the head bone rotation world rotation

Or just skip all of it and use a lookat

dark crow
#

Look at gets the starting location and end location and calculates the rotation needed to look at it

It can be done multiple ways, even with an aim offset or you indeed just rotate the head bone

onyx token
#

hmm that does sound exactly like what i'm looking for OhIPanda

#

it takes a vector tho

#

and all i got is a rotation

#

can i just convert it? rooThink1

dark crow
#

WorldLocation of your Character and WorldLocation of the Cube i think then use the Rotator to SetRotation or such

#

Gotta see what fits the Start the best in this case

onyx token
#

ooh i need a location

#

ok that makes more sense

#

is that node expensive? I'd need to run it every tick rooThink1

dark crow
#

Should be fine

eternal reef
#

Custom Loop that updates just every 0.1 seconds or so? Might be less expensive then running on tick

onyx token
#

god damnit, never mind it still doesn't work rooSuffer1

#

because the bone is on a relative rotation

timber knoll
#

for look at to work it, forward = x axis

#

you could just save the relative rotation at start and use that to decide the actual rotation after look at

dark crow
onyx token
#

yeah

dark crow
#

Pretty sure there's an option to use World Space

dark crow
#

If you click on the Node and dig into the details

onyx token
#

i'm basically modifying the bone rotation of a bunch of spine bones

dark crow
#

Ye, click one

#

Rotation Space

#

World Space

onyx token
#

hmmm ok i felt stupid, and put it to world space, but it didn't change anything rooHmm

eternal reef
native ferry
#

hey i have an anim montage and i want to it to loop it a certain number of times, is it possible?

dark crow
#

Actually Unreal :p

odd ember
onyx token
odd ember
#

then performance wise tick isn't an issue

onyx token
#

it's so when i'm in combat mode, my character always looks towards where my third person camera is looking

#

well-

#

it doesn't seem to work anywho so...

odd ember
#

plus all your nodes have lightning bolts, which means they run on the animation thread instead of the game thread

feral ice
#

is there a node that take in two vectors and spits out an angle

odd ember
#

atan2?

#

not the cheapest way to do it but eh

feral ice
#

that takes in two floats

coarse forge
#

for random playing of the loop each play in the timer.. ks that Time, Initial Start Delay, or Initial Start Delay Variance and would it calc a new range each time the timer fires or no?

odd ember
maiden wadi
# vapid flume some says visual scripting is bad! what do u tell about it?

Blueprint Cons: (Avoiding people's personal preference issues here like not liking node based design)

β€’Blueprints are slower to execute the same logic that C++ would and this causes problems with heavier code. This is immensely true for any sort of math equations as you have to copy the values around a lot instead of being able to reuse them and each node has to recalculate the things it's using every time something pulls a value from it. Sorting is another major flaw here. You have to write slow executing, complex blueprint functions to redo what is a single line of C++ code using a predicate to sort an array.

β€’Blueprints are designed on top of a complex framework of C++, this means that they only have access to what that C++ allows them to. This makes changing game framework extremely difficult without simply redoing the entire system from start. There are thousands of virtual functions in C++ that are not blueprint exposed that are extremely helpful.

β€’Blueprint structs are extremely unstable. One bad compile change can corrupt blueprints using those structs. Possibly a fault with the generation code. This has been less of an issue in recent releases, but it still happens. It makes altering structs in BP very dangerous. In C++, this is not an issue as long as you do not rename variables.

β€’Blueprints are not text based. They are binary files and this makes diffing them in source control mostly impossible. This causes strong problems with people working on the same code base. When most logic is in C++ this is less of an issue because most of the changes are there and there may be minor BP overlap that can be easily corrected with a second source control commit.

#

Blueprint Pros:

β€’Blueprints are extremely fast to iterate in. You can change logical order and test it much faster than in C++. This is due to BP compiling much faster. Even livecoding can't really match this. This makes Blueprints extremely nice to prototype in. You can get a good idea of what you want your logic flow to be in a very efficient manner and then translate that to C++ and optimize it there if necessary.

β€’Blueprints require less to learn. An example of this. Lets do the steps of starting a new project and creating an actor that prints on beginplay. You download the engine, you start a new project, you are in the content browser. To create a new blueprint actor, you simply right click on the content browser, drag off of the beginplay and type PrintString, add the node and you're done. In C++, you have to first close the editor, download an IDE like Visual Studio. Create a new C++ .h and .cpp file. In those files you have to set up your includes, write your UCLASS(Which means knowing class naming conventions, what specifiers you'll use, knowing to add GeneratedBody macro, a default constructor, etc), add your virtual void BeginPlay() override function, implement that in the cpp file, then you can write your print code after adding the kismet library include. Now you can compile and restart the UE4 editor and use your actor.

β€’The next is the biggest pro to me. But it is also a severe problem with allowing designers access to assets and code without them understanding how pointers work. That is that Blueprints have access to everything easily. Need an image in a widget or a static mesh in an actor? Just search for it by name. you don't need to know a source path to the asset or anything. This is fantasic because it allows very easy access to your whole project without having to hard code asset locations like you would in C++.

feral ice
#

forgot the name

maiden wadi
#

@feral ice

feral ice
#

yes exactly thanks @maiden wadi

coarse forge
#

lol can i repost my question then "essay"

coarse forge
#

hmm

eternal reef
#

If I remember correctly it checks the input everytime

#

Well atleast the Time Input, im pretty certain on that one

quasi kayak
coarse forge
#

lol

eternal reef
#

Sorry about that one lol

maiden wadi
#

@coarse forgeThat only calculates when that node is ran.

coarse forge
#

in this case.. once because begin play

maiden wadi
#

Looping timers will remain the same. If you need a changing timer, you have to have a timer that doesn't loop and will call the set timer each time.

coarse forge
#

hmm

odd ember
#

calling timers to set timers

#

that's next level

#

calling timers to set timers on tick

#

now you're thinking

coarse forge
#

trying to see if i can do this without timers hahah

#

and not sure I want that much on tick

#

these are playing sounds

odd ember
crude dew
#

Hi not sure if this is the place but if you had a "MasterItem Blueprint" which then made children say for example a Sword (Melee weapon), Grenade (Ranged Weapon) and a Healing Potion (Obv) would you

These children would have various functions Sword - Attack , Grenade - Throw, and HealingPotion - Heal X person who collects it.

Would you have the functions of Attack on the Sword or the Player who collected the sword? same with the Grenade and healing potion ?

Hope this makes sense, I will try to upload an example blueprint. πŸ™‚

odd ember
#

player calls the function on the weapon

#

or player calls the function on the item

crude dew
#

So it would be something like "Player X collects the sword", "Then player X hits the mouse button and then get cast to sword -> attack ?

odd ember
#

you can probably abstract it to be a Use() function

crude dew
#

in laymans terms xD

odd ember
#

you don't need a cast

#

you just call the function

#

the sword Use() could be an attack

#

but the healing potion Use() could be healing

#

the grenade Use() would be a throw

#

etc.

crude dew
#

Ahh yes i never thought about that.

#

as i had a MasterItem which had a Blueprint interface which had functions of Throw(Grenade), and Attack (Melee Weapons) and UseItem(HealingPotions) so they would all inherit these functions from the master ?

odd ember
#

you dont need an interface

#

and you dont need separate functions

crude dew
#

so just make them inside the masteritem blueprint?

rain moss
#

Anyone know how I would go about getting more information about a node in blueprint? For example how can I know what As VRPawn is doing?

odd ember
#

in your master/base blueprint, create a Use or UseItem function and leave it blank (or returning a bool or something)

crude dew
#

have a Use inside the master and then every child you create you make a use function for each individual item ?

odd ember
#

you can then make inheritance hierarchies that increasingly add functionality

crude dew
#

Ahh thank you that makes sense! πŸ™‚

odd ember
#

so the base weapon blueprint would start using UseItem as an attack

#

but still keep it generic

maiden wadi
#

@rain mossThat is a variable. It's type is a pointer to an object. Pretty sure you just have to spend time in the engine and learn the environment.

rain moss
#

Yeah for sure I am very new thank you for you help! @maiden wadi

maiden wadi
#

Feel free to ask questions here as well.

crude dew
#

i thought i would try to use an interface but maybe thats overcomplicating things when it doesnt need to be. I,ve not really used interfaces yet so not too sure how they differentiate to functions.

odd ember
#

interfaces are if you have multiple hierarchies that need to share functionality

#

so maybe you want Use() to be a thing for NPCs too

#

NPCs obviously aren't items

#

but with an interface you could have the same functionality

coarse forge
#

is this on the right track?

odd ember
#

so Use() for NPCs maybe calls their TalkTo() functionality

#

whereas on items it calls UseItem()

crude dew
#

Sorry im really new to interfaces how would it differentiate like if the NPC walked into the sword weapon and then you had a behaviour if npc close enough to player Use() weapon?

odd ember
crude dew
#

I,ve seen videos and tutorials on them but its a lot of "do this and do that" oh look you have a workiung interface but doesnt quite tell you why

coarse forge
odd ember
#

most people use interfaces wrong

#

more often than not, you don't need interfaces

coarse forge
crude dew
#

I think i need to do a lot more reading on when and how to use interfaces xD but im only about 7mths into UE

odd ember
#

they are very abstract, which is why they don't allow for functionality implementation

#

forget about interfaces

#

really

crude dew
#

Ok πŸ˜‰

#

thank you for the help!

maiden wadi
#

@crude dew Good example of interface versus inheritance. You have a button press that line traces to interact with something.

You want to open a trade menu when used on other players, you want to open an interaction menu when using it on ally AI, you want to cause ally AI to attack. These can all inherit from your pawn class and be the same function override in each child class or instance difference.

But then you want to line trace and pick up an object. Now you need an interface. But instead of interfacing to every single class, still consider the hierarchies. You can make a single class of AInteractableActor that has the interface and then other classes of that which can handle that interaction through inheritance.

Like say, ADoor, and then APickupable. These need to do different things but can inherit from AInteractableActor.

The only classes in this scenario that use the actual interface is the PawnBase, and AInteractableActor. But now you can have wildly different use cases for everything without repetition.

odd ember
#

interfaces are generally not accomplishing something that can't be done better by using event dispatchers (which people seem completely oblivious to), or just plain inheritance

crude dew
#

@maiden wadi Thank you for that explanation!

odd ember
#

only really in the instance of multiple hierarchies do they do what they are made for

maiden wadi
#

In a perfect code base, interfaces are useless. You'd just put the virtual function higher in the tree. But when you can't change basic architecture, it's your only decent option.

odd ember
#

perfect code base

#

the dream

#

0 entropy

odd ember
#

0 tech debt

maiden wadi
#

The unicorn.

coarse forge
#

tech debt is job security

maiden wadi
#

Only if you work for someone who doesn't know better.

coarse forge
#

They all work for me.. soo... πŸ™‚

maiden wadi
#

There's always something else to be made.

coarse forge
#

If product can't get me feature stories.. we do tech debt

#

my engineers always have something to work on

#

different work though.. not game related

maiden wadi
#

I don't think my personality would let me do that. Too much of a stickler for doing it the correct way. Mostly because I'm lazy. Correct means me not fixing it later.

coarse forge
#

so.. you can't call a function from a function ...

#

hmm

maiden wadi
#

Wut?

coarse forge
#

well i have an idea to ditch the timer

#

and just play my function with a delay during tick with a am i playing flag

#

but.. delay node isn't available in a function

#

no exist

native ferry
#

sorry for asking again but is it possible to loop an animation a certain number of times?

odd ember
#

why do I feel like #audio has a better solution to your timer issue?

coarse forge
#

because its not an audio issue

native ferry
#

well

#

yeah probably

#

but how

odd ember
#

magic, presumably

native ferry
#

i'm doing it in a blueprint

coarse forge
native ferry
#

i mean not an anim bp

coarse forge
#

this one is in hud...

odd ember
native ferry
#

i'll see thanks

maiden wadi
#

@coarse forge Loopable timer with variable differences.

native ferry
#

i don't think i'm gonna get any response

inland stone
#

I need help, i have a simple blueprint that allows me aim around the mesh when i press a button and when not press it will return to its original point, the problem is that if the mesh strafe and rolls when aiming the spring arm controlling the camera returns tilted is there a node that resets its rotatiion

odd ember
native ferry
#

my bad

coarse forge
maiden wadi
#

With what I posted, you'd run the stuff in TimerFinishedLogic. It calls that before checking if the timer should rerun.

trim matrix
#

idk how to get help but my stamina doesnt increase or decrease

dreamy musk
#

I've been using UE4 for a few months, but somehow I still can't figure out casting at all. I have a simple blueprint in the world that spawns enemies. I want the gamemode to cast to it (for the sake of being able to change difficulty) but I don't know what to put in the wildcard. Every single suggestion I've found for this either looks convoluted and not something I understand, or is in reference to a type of BP that's got an obvious inheritance.
This is just a regular actor blueprint that sits in the level, and I have no idea what it inherits from.

maiden wadi
smoky marsh
#

Casting basically helps you with nothing, it's a way to check if something is of a type and then to access all it's data and simultaneously bind it if it's a hard reference, what it won't help you is with actually getting the reference

zealous fog
#

much easier

gentle urchin
#

Sweet

zealous fog
#

Set it up like this

gentle urchin
#

Exactly

gentle urchin
chrome fractal
dreamy musk
#

it's set to 4, but that means each one spawns 4, I want 4 to be the max ingame, period

gentle urchin
#

Theres a global static get gamemode node

#

There is no global static get "myCustomActor" node

maiden wadi
#

There is if you make it. πŸ˜„

gentle urchin
#

True^^

odd ember
#

GetGameMode

gentle urchin
#

All can be, if made so

gentle urchin
smoky marsh
#

❀️

odd ember
#

well gamemode is an actor

#

so it requires world

#

and anything that queries it would have to have an excuse for finding a world

#

hence why objects don't have it

coarse forge
#

you could also make an enemies subsystem to hold and manage all that logic

gentle urchin
#

Which would work perfectly in this case

astral epoch
#

I think I got more async shenanigans breaking certain variables.

gentle urchin
#

But may be way out of scope :p

odd ember
#

subsystems are the best

gentle urchin
#

Cant wait to start with async. Need to up my trace performance

odd ember
#

async trace?

gentle urchin
#

Ye

odd ember
#

πŸ‘€

coarse forge
#

It could hold your max enemies, and your spawning of enemies, and when one dies, etc you want to spawn another one.. accessable from everywhere

gentle urchin
#

Purely for path tracing

astral epoch
#

I'm using a macro to load character data and then spawn them in. Needs an input int for setting array stuff. Currently the macros are being called like this

smoky marsh
#

Did I read async trace?

astral epoch
#

However they all seem to use the last int value passed.

smoky marsh
#

I'm interested

astral epoch
#

Can I not have multiple instances I guess of the same macro running at once?

maiden wadi
#

What macro? Those are functions.

astral epoch
#

Oh yeah; I had to make an event that calls the macro because the macro exists in the parent class.

maiden wadi
#

Those are inside of the macro?

astral epoch
tribal kernel
astral epoch
#

That's in the parent class.

tribal kernel
#

hey how do i change the starting character

#

to a normal character

gentle urchin
#

Gamemode^

tribal kernel
#

instead of the ball?

astral epoch
#

Gamemode

smoky marsh
#

What does your macro look like

maiden wadi
#

@astral epoch And I assume you have some form of latent nodes in the macro?

astral epoch
#

Yes. Async Load Class Asset.

#

It reads that input soft reference.

#

Hence spawning different characters with one thing.

astral epoch
#

Load, cast, spawn

#

Takes the newly spawned character and sets them as the pointer for an array that holds all characters for this squad

#

That index for the Set Array Elem is the int being passed in.

#

Which should be 0, 1, 2, 3, etc.

smoky marsh
#

Looks like you're calling em before finishing the load

astral epoch
#

And with a delay after each it works fine. Without, they all end up with the final int value.

smoky marsh
#

Due to your out going into the next instantly

#

Without just waiting for the complete

maiden wadi
#

Yeah, you're calling the macro multiple times. By the time the async runs, the macro has been ran multiple times so when the async callback runs your variable is set to the last thing.

astral epoch
#

I figured that's the case. But wouldn't macros have multiple instances firing anyways?

chrome fractal
#

Spring arm collision not working if I change arm length at runtime please help on this

smoky marsh
#

Right but your int is being set instantly to the last one

maiden wadi
#

No, a macro is not instanced every time it's ran, it's "instanced" when it's placed in the graph.

smoky marsh
#

It doesn't have time to do it's thing

#

How come it's macro anyways

astral epoch
#

Cleanliness. It looked a lot worse before and was taking up a lot of space in the graph.

smoky marsh
#

Just chuck it into a function

astral epoch
#

Can't do function. Has latent operations.

smoky marsh
#

Just chuck it into a separate graph

astral epoch
#

Unless we're talking custom events and not actual programming functions?

smoky marsh
#

Right, should've been more clear on that

maiden wadi
#

Logically you need to separate your call and the action.

astral epoch
#

(legit forgot you can make multiple graphs)

smoky marsh
#

Good heavens your poor blueprints

astral epoch
#

Just a bit

#

Not the worst I've worked with though. Had to pick up the work of someone who put everything on the on tick.

#

I mean everything.

smoky marsh
#

Ah, a stress test we call those

astral epoch
#

No wonder the game ran terribly on my phone.

smoky marsh
#

And not for your pc

#

But for you picking it up

astral epoch
#

But yeah, move macro to a graph of its own and calling a custom event instead of a macro should work here?

maiden wadi
#

Not really.

astral epoch
#

Also seems kinda weird that macros aren't inherited by children.

smoky marsh
#

Probably not anyways, just like wait for the async to do its asyncness

#

I doubt it's slow enough to worry about it

astral epoch
#

I can try that but I don't think it helped?

#

Since it was calling through the event anyways, it was firing that then letting it run while it ran onto the next character.

maiden wadi
#

Async is always at least a frame behind in most cases. If you want to do it that way, change it to blocking. Otherwise you need to create a system where your calls input data, and the system spawns them from that data and removes it.

astral epoch
#

Delays helped but I don't really want delays everywhere just to fix order of operations.

smoky marsh
#

Have it fire an event when it's finished letting you queue up your next action

#

With idk a timer trying to fire off the call while waiting

#

This is just an off the top of my head thing from looking at your setup

coarse forge
smoky marsh
#

Dunno if I'd necessarily do it this way

#

Couldn't you just increase your current index every time you run the function, that way you wouldn't need to set it to 1 then 2 then
..

coarse forge
#

i haven't done any multi player, but maybe spawn them all, send events to a subsystem that holds that info on is the squad full, then fire event on full to start game

astral epoch
#

To be fair the way I had it before worked... it just looked messy.

#

But basically instead of using the macro I just had its code copy-pasted for each character spawning.

#

Which got the arrays correct.

maiden wadi
#

@astral epoch What is ArrayPos? Is that the index that you need to add the spawned actor into an array?

smoky marsh
#

Never be afraid of your shit looking bad, this is just hiding it instead of showing it

astral epoch
#

Yes Authaer, exactly.

smoky marsh
#

Better to clean it than put it under a rug

maiden wadi
#

Sec

balmy mesa
#

So I have two blueprints that are copies of each other, though they aren't children. They both have tick events in them, but when I save and compile one, the other stops firing. Whichever one I compile works but the other just doesn't. Does anybody know what the issue might be?

odd ember
#

copies how?

balmy mesa
#

I copied and pasted one blueprint to make the other, then renamed it

astral epoch
#

Did you copy the Event Tick part too?

balmy mesa
#

yes

astral epoch
#

Could be wrong but I found copying the event things to be janky at best.

balmy mesa
#

So what do you recommend?

astral epoch
#

Its copied into another blueprint right?

balmy mesa
#

yes

odd ember
#

my question is

#

why did you copy it

astral epoch
#

Then put in a new event tick. Right now what its doing is creating a custom event that has nothing calling it.

#

And hook it up to the event tick.

balmy mesa
odd ember
#

yeah but that aside there's no point to having 2 blueprints with the exact same functionality, unless they are in a hierarchy

#

and in that case you don't need to copy anything

#

I swear blueprints will cause the fall of our civilization at some point

astral epoch
#

They will

#

The inefficiency uprising is coming sooner than you think.

balmy mesa
#

I'm just gonna see if I can figure out parent stuff and get that to work

odd ember
#

delete the code from one of them

#

parent the non code one to the parent

#

spawn the non parent

#

done

balmy mesa
#

yes but I want the non parent one to output a different value than the parent

odd ember
#

so... make that a variable in the parent and set it to a variable, then change that variable in the inherited class to something else?

#

if you're ever finding yourself repeating code

#

you're doing something wrong

balmy mesa
#

All of that just flew over my head

astral epoch
#

looks at my macros

#

indeed.

balmy mesa
#

I understood nothing

odd ember
#

until you get the basics

#

if you continue as you are you'll only dig yourself into a hole

astral epoch
#

You got that on speed-dial?

#

ah

odd ember
#

there's also a bunch of pins in this channel

#

true

toxic trout
brazen merlin
maiden wadi
#

@astral epoch This should help. This is a simple spawning system that allows you to ask the system to spawn a soft object class and place it into the spawner's array of spawned actors at an index. Added some prints for logical order explanation.

#

The whole of beginplay is unnecessary and just for show.

toxic trout
#

does anybody know what this error means?

zealous moth
#

is there a way to always make a sprite appear in front of everything else?

coarse forge
toxic trout
coarse forge
#

looks like you are using a plugin

toxic trout
#

at least, i don't think i'm using a plugin

coarse forge
#

yeah where is the thing that holds that funciton?

#

can you show the BP you made?

#

access none is a null pointer

#

which means it can't find the thing you are calling

toxic trout
#

i've fixed that error (i just didn't specify a render target at one point)

#

now i'm not getting any errors but my entire effect just isn't rendering?

#

it's completely invisible

coarse forge
#

whats the material like?

#

i'd check that next

toxic trout
#

it's using a couple different materials

#

(love your url btw)

coarse forge
#

my url?

fluid rover
#

Sorry, something came up yesterday - so when you specify Casting here, I have access to the FadeIn variable, what am I casting to, node-specific? "Cast to Widget"? "Cast to WidgetComponent"?

toxic trout
coarse forge
#

oh thx

#

its my company name

toxic trout
#

that's brilliant

#

what about my material/s do you think i should be checking?

#

i copied them all from the tutorial

coarse forge
#

um.. well its been a year, but with water there is tranlucency

#

they'd be able to help with that much better than i

toxic trout
#

alright i'll ask there, cheers

brazen merlin
fluid rover
#

Like this?

#

oh, hang on, might be flubbing it

brazen merlin
#

not CastToWidget

#

Cast to whatever that widget class was

#

i cant recall, it was so long ago πŸ˜›

fluid rover
#

Hahaha, ancient history

brazen merlin
#

whatever you plugged into the component

#

Door or something right?

fluid rover
#

Yeah let me check, looking now

#

"TeleportMenu"

brazen merlin
#

lol way off

#

Cast to that

inland stone
#

is there a way to reset the spring arm to its original position and rotation?

brazen merlin
#

should be something that calls it to go back to the behind view of the character

fluid rover
#

Hmm, might be an additional step, but we're on the right track: "TeleportMenu does not inherit from Widget Component"

terse elm
#

whats a good way to disable player collision so you could do a roll or a dash that passes through an opposing actor/enemy? been trying a number of things to no avail. just want to allow them to pass through any other player when rolling/dashing, then enable it when finished

brazen merlin
terse elm
#

i am? or i want to?

brazen merlin
brazen merlin
inland stone
#

@brazen merlin Thank you

terse elm
#

yea basically. its just a side by side fighting scenario. and i want the roll to pass through the opponent and other actors. like fireballs and all that sorta thing

#

so really its like "dont collide with anything except mesh"

#

well

#

not mesh

brazen merlin
terse elm
#

basically anything that isnt an actor i suppose

brazen merlin
#

WorldStatic seems like the best minimum so they dont fall through the floor

terse elm
#

then again if i have hitscan dmg coming in hmm

#

interesting

brazen merlin
#

you've got trace and object responses

terse elm
#

i saw mention of that in my googling just need to figure out how to set it up

brazen merlin
#

so decide which to turn off and then back on

terse elm
#

ill go watch a vid on collision channels

brazen merlin
#

or even better, make yourself two collision response presets and then simply set the profile by name

terse elm
#

ty

#

readin up on it now thanks

#

interesting, so i could set up a preset or whatever that says... overlap, so i could still get overlap events, but still allow you to pass through

#

like if you passed through at a certain time. perfect dodge so to speak

#

ill watch some vids on it as well. appreciate it

brazen merlin
#

i only allow damage and other events to register if my player has a certain tag πŸ˜‰

terse elm
#

but what is the tag setting?

brazen merlin
#

the point is that i check to see if that tag exists

#

still, you do need collision control, just wanted to mention it is all πŸ™‚

terse elm
#

i thought about setting it in an notify state event so i could just drag the window out, make that section pass through, and also generate special overlap events while active

brazen merlin
#

you'd still need to called SetCollisionProfile and set them from one then back

terse elm
#

yea thats pretty cool. ok ill give it a try

zealous fog
#

Can I set a single value in a struct without resetting the other values?

brazen merlin
brazen merlin
fluid rover
#

Actually @gentle urchin may be right - having added a get user widget object to the mix, I can see specific components now:

gentle urchin
#

FadeIn is a widget component according to the warning

brazen merlin
gentle urchin
#

What is AICBHealthbar

#

In your case

#

Type/class?

#

Userwidget?

brazen merlin
#

that my thing yeah

fluid rover
#

As a comparison, FadeIn is a WidgetComponent

brazen merlin
#

and is therefore WidgetComp

gentle urchin
#

Yeah but its a userwidget ref, correct?

brazen merlin
#

but i can cast it and its fine πŸ˜›

#

so your all on crack

gentle urchin
#

Widgetcomp is afaik != userwidget...

zealous fog
brazen merlin
#

to be clear, casting my WidgetComp to my WidgetClass to then get my vars

#

w/e if that works then it works

#

no sense arguing πŸ˜†

gentle urchin
#

Sorry, it wasnt clear what type yours was :p

#

I prefer making the widgets, saving them, and setting the component to my widget

#

But thats me

#

Dunno how you do it πŸ˜„

brazen merlin
#

honestly just referring to this one situation where i am using a widget component and this was setup awhile ago so i dunno this sort of thing that well

#

if you can tell, its for a health bar to appear above the specific enemy

gentle urchin
#

I see^^

#

Im used to atleast having to get the widget object from the component before casting ^^

#

In my little head it just works as a container for a widget

brazen merlin
gentle urchin
#

Phew, sense restored! Jk

terse elm
#

conrad i must be missing something. as a basic test i just tried to set collision response to channel to pawn/ignore. still collides hmm. also tried world dynamic

odd ember
terse elm
#

the other pawn / character

odd ember
terse elm
#

so on action, the collision response of my char ref > mesh > set collision response is channel pawn / ignore

odd ember
#

oh

#

it probably collide with capsule

terse elm
#

so basically while active

#

should i just disable capsule while dashing/rolling?

hexed loom
#

One message removed from a suspended account.

odd ember
terse elm
#

basically character 1 does a roll/dash. idea is that its fully invuln and can pass through/cross to other side of the other player

odd ember
hexed loom
odd ember
terse elm
#

let me try

odd ember
odd ember
hexed loom
#

One message removed from a suspended account.

terse elm
#

hrm interesting. according to vid i watched they said it was priority order, so if one had ignore, it prioritized the others block

odd ember
#

nope

#

both have to be the same

#

or it won't work

hexed loom
odd ember
hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

odd ember
#

not sure what you mean then

terse elm
#

hm having trouble even turning off the collision volume. i have a ref to my char from other bp.

hexed loom
#

One message removed from a suspended account.

hexed loom
odd ember
hexed loom
#

One message removed from a suspended account.

odd ember
#

and that can't be on character because?

hexed loom
#

One message removed from a suspended account.

odd ember
#

when you pickup a coin, set a variable on your player character

hexed loom
#

One message removed from a suspended account.

odd ember
#

well you need them to communicate

terse elm
#

ok got it. got my ref, got capsule coppnent. set collision response to channel pawn > ignore. now i can pass through

#

set to overlap (which is what i wanted) and it works. i was prob using wrong nodes. guess i didnt need custom chan at all

flat coral
terse elm
#

appreciate the help CE

flat coral
#

either directly expose the variable, or expose a boolean "hasCoins" function that returns true if there's any remaining. Something like that

odd ember
terse elm
#

i suppose i can turn this on/off with an anim state now. ill try

flat coral
hexed loom
#

One message removed from a suspended account.

odd ember
terse elm
#

indeed lol

odd ember
terse elm
#

i had some issues with them earlier

odd ember
#

literally pinned

#

to the channel

brazen merlin
odd ember
#

all code is hard to grasp

flat coral
hexed loom
#

One message removed from a suspended account.

odd ember
#

people think so much is implied somehow

#

but there is no magic

odd ember
#

computers are dumb, but they are fast dumb

hexed loom
#

One message removed from a suspended account.

flat coral
odd ember
#

you have to tell them everything you want to do, exactly how you want to do it

flat coral
hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

odd ember
#

anyway take it or leave it

brazen merlin
odd ember
#

the code isn't going to change

#

so I suggest you do it

hexed loom
#

One message removed from a suspended account.

odd ember
#

I gave you that tutorial

flat coral
#

If all variables were global, can you imagine the global variable space in a game like RDR2? It would be a nightmare. Literally millions of them, you'd never be able to find anything and the computer would struggle to hold it all in memory

hexed loom
#

One message removed from a suspended account.

odd ember
#

it'll help

#

it showcases exactly what you need to do

hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

odd ember
#

do you want to learn or do you want to complain?

hexed loom
#

One message removed from a suspended account.

odd ember
#

I suggest finding someone who cares then

hexed loom
#

One message removed from a suspended account.

flat coral
#

Do you know how to code btw?

#

In any other language?

hexed loom
#

One message removed from a suspended account.

flat coral
#

You wouldn't use global variables in JS either, it's object oriented just like BPs are

spark steppe
#

only half way true xD

hexed loom
#

One message removed from a suspended account.

flat coral
#

Ok JS is a trash fire but you see my point still πŸ˜›

odd ember
#

javascript allows for weird BS, not a language to measure against for any good principles really

flat coral
#

A variable in a global scope is still associated with a specific class or "file" at least in the JS world

#

You can have global-scope variables in BPs, they just have to be associated with a specific BP

odd ember
#

JS is the reason there are people fixing the internet non stop around the world just to keep it from failing

#

well, one of the reasons anyway

flat coral
odd ember
#

good beginner languages should be strongly typed

odd ember
flat coral
#

ANYWAYS ZIP I HOPE THIS IS HELPFUL πŸ˜›

hexed loom
#

One message removed from a suspended account.

brazen merlin
hexed loom
#

One message removed from a suspended account.

flat coral
hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

odd ember
#

it's VM based

#

so there's an upper limit of how "fast" it can be

hexed loom
#

One message removed from a suspended account.

maiden wadi
flat coral
hexed loom
#

One message removed from a suspended account.

flat coral
#

This shouldn't surprise you btw. JS is a high level language, C++ is midlevel.

maiden wadi
#

Not really sure a C++ versus JS versus BP is really relevant. You don't use JS in UE4. You use BP and C++, and those also have different uses in UE4

#

If you want to use UE4, those are the tools.

hexed loom
#

One message removed from a suspended account.

dawn gazelle
odd ember
hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat coral
#

Plus just think about it, with Javascript you lose efficiency with dynamic typing, lose efficiency for JIT compilation, lose efficiency because it's VM based. What aspect of C++ should make it slower than JS?

hexed loom
#

One message removed from a suspended account.

maiden wadi
odd ember
flat coral
dawn gazelle
#

Make Discord bots in UE.

odd ember
#

all it takes for evil to prevail is for good men to do nothing

#

-gabe newell

hexed loom
dawn gazelle
#

Anything is possible.

odd ember
#

ninja'd

brazen merlin
#

can we move this to lounge or something?

dawn gazelle
#

except going faster than the speed of light. Don't think we've figured that one out yet.

hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

brazen merlin
#

you've all already answered the question which is to use blueprint communication

hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

odd ember
#

in your player

#

it's almost like the default setup is there to help you

hexed loom
#

One message removed from a suspended account.

hexed loom
odd ember
#

OnComponentBeginOverlap

#

depending on how you want it done you can have the coin register itself to the player

flat coral
#

All the collision methods return an output for what collider / actor you hit. Check if that's the coin

odd ember
#

or have the player just pickup the coin

flat coral
#

Or vice versa, yeah

hexed loom
#

One message removed from a suspended account.

odd ember
#

you dont need to bind it

flat coral
#

You dont need to bind an event, it's already an event

odd ember
#

you need a collision to work with

flat coral
#

the engine will call onComponentBeginOverlap for you when appropriate (if your collision is set up correctly)

hexed loom
flat coral
#

I mean you need the red one, not the blue one .

hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

odd ember
#

you need a collision component

#

look

#

if you watch the video

hexed loom
#

One message removed from a suspended account.

odd ember
#

it tells you how to set this up

#

yes

hexed loom
#

One message removed from a suspended account.

flat coral
#

generally you select the collider in your Viewport and hit one of these

hexed loom
#

One message removed from a suspended account.

flat coral
#

so select it here, then press the green OnComponentBeginOverlap button on the right

hexed loom
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat coral
#

indeed. That will create the correct event WITH the collider already associated with it

terse elm
#

is there a simple method for determining if the player is on your right or left side? or should i just make a clockwise detector

flat coral
terse elm
#

sorry i forgot something lol. in relation to "the other player" lol

#

in a 2p game

hexed loom
#

One message removed from a suspended account.

flat coral
#

So I have bad news: "Left" and "Right" don't exist, they're made up concept s

hexed loom
#

One message removed from a suspended account.

icy dragon
odd ember
#

you can do dot product from the player 1 camera to the player 2 character location, normalized

terse elm
#

so basically their relationship to eachother. so i can flip their facing AND their scale (so i can make their right hand become their left hand etc. so their chest is always facing the player.. as opposed to turning their back to you on one side while facing the opponent)

odd ember
#

or actually, cross that

terse elm
#

hrm my cam is part of the level actually. not attached to player but hmm

flat coral
#

So... you don't need left and right

odd ember
#

find look at rotation, convert to unit vector, compare between that and camera forward vector

flat coral
#

^

terse elm
#

so its facing, but also changing their scale on the Y from 1.0 to -1.0 depending on which side they are on. so they always appear the same way

flat coral
#

Left and Right are relative to orientation, so you need to find the direction and the orientation

odd ember
#

so that's going to give you 1 no matter which side you are on, and -1 if they are behind you

terse elm
#

true yea hmm

odd ember
#

BUT

hexed loom
odd ember
#

actually use the camera right vector

terse elm
#

ahh gotcha ok

odd ember
#

and you get exactly what you want

brazen merlin
odd ember
#

1 means right side, -1 means left side

terse elm
#

thats cool way to do it. so even tho cam isnt connected to player it still has a right, and since im looking at them from the side, right is always right basically

flat coral
terse elm
#

hmm interesting

umbral ginkgo
#

Any ideas to why is this branch failing (False) when it shouldn't?

hexed loom
odd ember
terse elm
#

ok. im gonna make some notes then experiment

flat coral
brazen merlin
hexed loom
brazen merlin
odd ember
umbral ginkgo
#

To player character?

odd ember
#

yes

hexed loom
#

One message removed from a suspended account.

odd ember
#

finally

umbral ginkgo
# odd ember yes

I thought this would just be quicker. Do you think it could be problematic?

odd ember
#

problematic how

umbral ginkgo
#

Idk in general

odd ember
#

if you can't think of a reason

#

then it's of no concern

umbral ginkgo
#

yes...

tawdry surge
#

Casting to the player character isn't ever an issue because it's always loaded anyway

umbral ginkgo
#

Yeah

brazen merlin
#

before we tangent..... the issue is on an overlap misfire

umbral ginkgo
#

Yes

brazen merlin
#

please check that before getting distracted

umbral ginkgo
#

I tried with the print string and yes one fire is false

odd ember
umbral ginkgo
#

I dont think the cast is the problem

odd ember
#

well ok

#

you know more than I do then

brazen merlin
tawdry surge
#

It is..
You're checking a character reference against and actor reference

#

If you cast the actor to a character it will pass

flat coral
#

I'd print out what you're actually colliding with to make SURE it's what you expect.

brazen merlin
#

figured. @umbral ginkgo did you do a print string literally after the event fires?

umbral ginkgo
#

Yep

odd ember
#

I was considering this as well

flat coral
#

But failing that, look I'm not sure exactly how UE handles it but in most languages object equality is a tricky thing

odd ember
#

with the cast we'll know for sure πŸ˜”

#

!(T*) == !(T*)

maiden wadi
#

Instance equality isn't tricky. If you get two different pointers to the same instance, it's going to return true, regardless of what pointer level they're cast to.

umbral ginkgo
#

I'll try the cast anyways

odd ember
umbral ginkgo
#

Umm

#

so it seems casting has fixed the problem

odd ember
#

welp

flat coral
umbral ginkgo
flat coral
#

wait why even bother with the equality then?

odd ember
#

no need for the equal

#

well no, it was fixed

umbral ginkgo
#

I have juest realized that

odd ember
#

because the cast goes through

brazen merlin
#

i think you can see how well this works with just event > cast > string

tawdry surge
#

The more dynamic fix would be to save the return from "get player character" to an actor variable and check if that is equal to the "other actor"

odd ember
#

still think it wasnt the correct answer @brazen merlin

flat coral
#

Also some languages typecheck before running a deeper equality. In that case I wouldn't be surprised if the wildcard object from GetPlayerCharacter doesn't match the specific character class you've got