#blueprint
1 messages ยท Page 107 of 1
ah crap, true actually
so I cant make it attach the neck, I can make it attach to right hand
but there's a "location/rotation" rule which allows you to keep/set origin
Quick question, does the "Get (a copy)" node still function the way this description says it does?
It seems to function like "Get (a ref)" where the changes made to the "copy" are propagated to the array, I keep seeing this node in old tutorials but can't find in Unreal 5.
Was it removed and now "Get (a copy)" actually does get you a reference to the array element?
I literally had the same doubts earlier today
found a post somewhere in the forums that it's a lie and it returns a ref, but I didn't manage to validate that
that being said, it's surprising that there isnt a way to get by ref with blueprints, like at all, unless you do a loop
This node seems to get the ref you need, I'm using it all over my code and it gets the job done.
Big oversight on Epic's part honestly.
I assume it would make sense to return a value when having an array of primitive types or strings, but I dont see a reason why and how it would copy an array of, say, objects
I created blueprint from class character, but i cannot edit properties using UI why ?
It is c++ project, but i want to edit properties using UI.
I agree, it doesn't seem to do that anymore though, at least with non-primitive types, haven't tested it with primitive type arrays yet.
Hopefully they make it more clear in the future.
Thank you for confirming.
you should be able to test it one way or another
Yeah it shouldn't be hard to do so.
Will do that at some point.
Alright now I also have a question:
Im experimenting with a physics-based VR project. Im currently trying to get a gun to work as a handheld item.
The handgun itself is a blueprint, but it's got a custom WeaponPartSlot component for the slide. The slide itself is yet another actor blueprint. The gun spawns the slide actor and attaches it to itself with a physics constraint with disabled collisions between each other.
The problem now arises when I try to attach the gun to the character (also using a physics constraint between the player's hand and the gun, so that the collision of the gun also impacts the hand position). Because the slide is a separate actor, it collides with the players hand while the rest of the gun doesn't, causing this weird issue.
Is there a way to fix this and prevent the slide from colliding with the player's character and related objects, while preserving physics? Or is my thinking completely wrong and is there a better way to do all this?
Hello is there a way to add a socket to a mesh via the editor widget ultility and save it to file? I just found this node but I cant figure out what to put in this "Static Mesh Socket Object Reference"
this adds an object to an existing socket
yeah well then its seams the node has noting to do with what Im tying to do
editing sockets is really editor only afaik
Using OR node causes "accessed to none" error if none of the ORs happen. What should I do?
sadge, but thanks still thanks for informing me
you can only really work with offsets when attaching
honestly it's difficult to see whats going on here
where are you getting accessed none ?
I check for 3 things to break hit result, If I didnt hit one of that 3 actors, my branch giving a "accesed to none" error
Construct a new object of type Static Mesh socket
branch and print string, as they are connected to output of or
so OR node is causing an accesed to none error if none of its conditions met.
weird
Isnt it supposed to give a false result instead of accesed to none?
when you click on it what node does it take you to ? on the error
well, what is it failing to access and are you sure it is valid?
branch, and print string(I added print string to check for OR Bool result, it gives nothing as a result so I thats the reason I got accesed to none)
Or boolean giving an empty result instead of failed, if none of its requiriments happen.
presumably because it's supposed to check something that is not valid
I suspect the issue is lack of a validated get for whatever you are checking for conditions before the branch
Putting an Is Valid? before branch solved the problem, thanks
I tried is valid before tho but I guess I messed something when I first did that
I connected is valid to break hit result actor
yea the issue was just that the branch was testing something about a hit result that didn't exist, though in many cases code will still work fine despite such an issue
it is still an important error nonetheless
use validation when you expect it to be invalid sometimes
do not use it to make sure you get an error otherwise
that way you know something's wrong
maybe install the source engine in c++
what do you mean ?
Let me try it first, wait.
is the details panel completely blank?
Hi, i try to calculate aim offset for left and right movement for the character using my current position and target position. Im using lyra as a base and i dont seem to get it to work. So i have the aimoffset layer where i pass the pitch and yaw like on lyra. The up and down movement kinda works when i just used substract (i think i should use better way though as its not so great either) but left and right movement i cannot get to work at all, i've tried many things but always to character aims somewhere else. Does anyone have a clue how should i do it? Thanks for any help
what i need to click on to see if it is blank? there are items if i click on something
then what do you mean you can't edit the properties
if you can see things in the details panel, you've got properties to edit
i cannot delete mesh and other things it says edit in c++, but that file is core file...
well yes of course you can't
they're inherited
you can't delete inherited components
you dont add custom collision to a character like that
you use the capsule or you don't
as for setting the mesh you click the mesh component and set a mesh on it
in the details panel
what about CharMoveComp? i want use this class to make AI
ok? what there is stopping you from doing that?
maybe i should not use ACharacter ?
It comes when you create a character class
Anyone knew how to make it appears? In the tutorial I watched, it has this and in my UE I don't see any.
I'll try to access it and let you know
"target is button" <-- maybe drag out from the button
Maybe because you try to access this function from another place then a widget class?
Yeah code is working in PIE but wouldnt it crash the game in release version?
@lofty rapids @sudden spear Alright, thanks for the help. I'll try both of your advice.
I tried accessing this function as well and it doesn't appear with context sensitive search, which probably means that it is a special function for some element in the user widget class palette. What is it that you're trying to do?
At first I accidentaly set this Button In variable type to Button Style which is Structure instead of Button Object Type. So I delete it and drag it again, and it worked.
..oh I see... It's a function for a button...
Yeah, trying to make hover button
Ok
Does it work now?
Yep, it's work. I just had to change the Variable Type and drag it again
Maybe i should use APawn instead ACharacter
Yes I guess that also works. I don't know what is the parent of the Character Class.
If you click on the "character" class, it will open this window in VC. Maybe you can find what you're looking for.
i don't want to touch source ๐
Think of it as a copy of a pointer to an actor.
The description specifically says it's NOT that, as that was ref's job.
That's what was confusing me.
if you're copying a reference to a specific actor, and then you change that actor, you have two distinct refrerences to the same changed actor.
whereas if you're copying a value and then you change the copied value, the original one is unchanged
Oh, that makes perfect sense.
I only used it for arrays of actor references so far.
I'm not sure if there's any way to really utilize pass by ref on arrays in blueprints. Maybe it would be possible to pass by ref and set it to look at a different actor, but that's niche and gross imo.
ยฏ_(ใ)_/ยฏ
I'll probably use C++ for my next project, might give me more control, but my current game is simple so no biggie.
@tiny silo
#blueprint message
You can ADD components to a class. You cannot DELETE inherited components. Using the character movement component (which is the only particular benefit of a Character) REQUIRES the capsule collider. If you need something to leverage the character movement component then use a Character. If you do not, then use a pawn.
Character
so character is both for AI and player ?
a character is a pawn with a CharacterMovementComponent (and a capsule collider + skeletal mesh)
a pawn is just an actor that receives inputs from a player or ai controller
so what you need is a pawn and more specifically a character if you want to use the CMC
if you want to use moveto nodes you need one of the native movement components
it can be the floating movement component
or you can implement that into your own
hi ๐ Im trying to set up an ability system in BP. Im having a hard time wrapping my head around the logic to structure the communication of the abilities. I have 3 different classes so I wanted to try to create a scalable system. Im struggling to figure out how to get the switch from the enum to pull data table information. Can anyone help?
thanks
you can do this. You almost certainly should not do it. Learn to use the provided toolset before you go off implementing your own
the only way to query the tables is to pass it a name. so you'll have to create some sort of mapping of the enum values to names.
Is there a better way to do this then? Should I just use data tables and then have an individual function for each ability? Im struggling with the optimal way to make this work efficiently
Or do I just not use a data table and have each abilities functionality fire off of the enum?
ehhh, I use data tables for defining the unit load outs. So the game instance remembers the unit loadouts with each skill slot having the name of an ability. Later, when the battle map is loaded, I will setup the abilities by loading the necessary data from a table using those names.
If you want to do it light weight, you could do something like bind the event "Use Lightning Strike" to the event dispatcher "Skill Slot 2". Then just have pressing 2 call "Skill Slot 2"
If you wanted something more comprehensive you could look at the gameplay ability system
This sounds like a very good solution and Ill try to make that one make more sense to me and work tyvm
Yeah Ive looked into it a lot but not doing MP + also C++ is a bit out of my wheelhouse atm
Based on where you're at, you probably should just ignore the tables for now.
- give each unit with skills a list of skill names, or maybe a dedicated Skill 1 Name var, Skill 2 Name var, etc.
- On Begin Play, Do something like a switch statement on the name to figure out which event you should bind to.
You're going to have a headache making it clean because you can't easily pass around references to the events
But this is what I do with GAS
but you won't be able to pass around class references to an ability class. Because yours will probably just be events on the actor. So you might need to just suck it up and write "If skill == a: bind A, else if skill == B: bind B; else if..."
You cannot delete the mesh of a Character class
But you can set the mesh value to null(None) so it dosen't show anything
If theoretically can make a Custom class with a removable mesh but that would break other things
Gotcha. That is very insightful and helpful. Thank you. Will try to keep it simpler for now.
Thanks.
I have a keybind set up to destroy a set of static mesh components from an array using a for each loop, but for some reason it's only actually destroying every other component. i was wondering if there was a workaround to this? it works if i call the loop multiple times but i feel like there is definitely a better way to do it (before and after attached)
this is all the code is, it has worked in the case where i only need to remove one component at a time but it seems to be working differently here
when you destroy the actor, you're changing the array mid loop
item 1 becomes item 0, but the loop then looks at item 1, which was previously your item 2
so would a reverse for each loop work better here? assuming im right about what i think a reverse for each loop does
yeah
yep that worked
thanks
while im here, i should ask if there's a better way to lock the cursor to the center of the screen that this? it works fine but it takes over my cursor even when i tab out of unreal, making it very difficult to take screenshots or really do much at all while the game is running
if not i take it a line trace component wouldnt be too bad as a replacement for on cursor over events
Hey, i got the tracing part to work im pretty sure with sphere overlap and i also tried multi sphere trace, im just not exactly sure how to get it to only use the closest actor to the player, and also only work if its in the general direction im looking
Hello, quick question.
Is there a blueprint node that only gives one execute signal in a certain time periode, Like this:
Maybe I should use this, but I perhaps there is a node for this
question, if trying to simulate a wii remotes pointing at a screen but instead in this case jsut the mouse, would using ray tracing be a good idea?
SetTimerByEvent
does anyone have any suggestions on why a character movement component would cause severe rubberbanding even in a low latency environment. its predicting and correcting just fine server side. smooth as butter. However this is resulting in the client to rubberband every step... at least I think that's what's causing it. adjusting the character movement networking settings in various ways reaps the same results or worse results as far as I can tell.
do i need to implement some sortof authority in the movement blueprint?
Anyone know how i can get this to only do the output i want which is to set the visibility of the widget to true only if it is the cloest detection point to the player within the trace
That's just the reality of blueprints. There's no client prediction and to implement it you'd need to delve into cpp. So unless you plan on doing that I'd recommend enabling client authoritative movement. There is a quite pricey movement component pack on the marketplace if you need server authoritative movement but don't want to delve into cpp
Given a collider that's already overlapping geometry, is there a way to find the closest position where it doesn't overlap?
my only issue with enabling is then it rubberbands on the server, and still seems to fight with the server just a tad over who has authority. whats the marketplace asset? ill at least look into it.
General movement component. This video goes into a decent bit explaining the issues you'll have using the cmc and hoe this asset really helped https://youtu.be/YB_ew3j_HFw?si=tvhhd158n4jsRNSE
Wishlist our game Spanky! https://store.steampowered.com/app/1732420/Spanky/
GMC: https://www.unrealengine.com/marketplace/en-US/product/general-movement-component?sessionInvalidated=true
Smooth Sync: https://www.unrealengine.com/marketplace/en-US/product/smooth-sync
In this video we address the topic of multiplayer games made with unreal engi...
Keep in mind that 5.4 starts shipping Mover 2.0 by default
Which is meant to replace the CMC (for free) and should be more blueprint accessible in the end
thankyou for you time
thanks for the heads up
Also "you need this if you want to make a mp game" is such as shitty click bait title
...
Is there like an inverse trace function, which starts off overlapping and returns the first NON-hit location?
ive been losing my mind for like an hour over this so hopefully someone can help me here, i have a system that sets the cursor to the center of the viewport every tick, but it continues to do so when i tab out of the game or editor window. i can find just about nothing online about how i'm supposed to use the "application has entered foreground/background" delegates. i just need to fire an event when the game is unfocused, and then another when the game is refocused. any help appreciated, i feel like this wouldnt be a hard thing to implement but here we are
i could also avoid this if there were a way to use a crosshair widget i have set in the center of the screen as a begin/end cursor over event, and the actual cursor would remain hidden and move freely whenever
Should I replicate character movement in a multiplayer game?
Hello! I am making a melee-combat game. Currently my characters are testing overlaps against enemy capsule colliders. I have a much larger enemy and I want to be able to hit arms, legs, tail, etc. What's the best way to do so?
It's there any other easier way to check for X Level and do code?
i wan't to do smth like,.
Branch > Wpn lvl 4 = true > Spawn 4 Knifes,
Branch > Wpn Lvl 8 = true > Spawn 8 Knifes.
just use the integer and spawn that many knife ?
you want to either increase the abilities per level according to an algorithm so you can determine what to do from there or have a table or other way to provide data for each level
uSing data tables, mhm
Do you want a unique reaction for every possible number or do you have some kind of equation?
the only time you really need new unique logic per level is when the level changes how the ability works, adds some completely new aspect to it
How many possible branches are there? Because this seems reasonable for 3.
is there an easy way to save a level actor that I have modified the properties of as a child blueprint?
That type of Thing, i wanna do, to create X Lines of Light, per lever. And to put them in correct position for each lvl
if lvl = 4, just 4 lines, in 4 directions
etc.
Ahh okay. So you'll want a math solution.
yhep
example: I have a BP_BaseItem class and I modified the item properties on an instance of it in the map. It's a BP_BaseItem but I want to save a BP_Shield with the relevant property changes
That's easy. First calculate the quantity, then determine the angle after.
@velvet pendant Do you want one beam per level exactly?
yea so you have 360 degrees and divide it by the amount of lines
yep
Oh, shit yea
for a damn hour i was thinking, how i can create a Function per each line, so i can add for each lvl
lul
ty
haha
U guys rockin, ty
As for angle you can do this: IncrementAngle = 360 / QuantityOfBeams. Then a For Loop: Spawn beam at Increment Angle * LoopCount.
Why is weapon level a float?
I put them in a rush, just so i can use Numbers, i know it's should be integer.
But thnak you also for reminding me
๐ฎ
though just for the record, they're both 4 bytes, the only advantage for an integer here is that it forces you to use, well, integer numbers
+1
it's reason enough, just wanted to mention it because I saw someone use an integer just to save memory haha
lul, that deep he goes for saving memory
I'm not that good at this, i started with smth simple, i'm still thinkin' of @hardy merlin solution
Oh yeah. Not a memory concern, just that Float introduces errors that can be avoided by just using Integers.
just following up on this, i cant really make my game without a solution to this to even like a lead on where i can start or a redirect to someone that would be able to help me here would be very much appreciated
Can i please, get a showcase, for idiots?
360 divided by amount of beams is your angle to increment by
for loop for amount of beams
spawn and add rotation for each one which is equal to the current index multiplied by the angle to increment
you probably want to add rotation along the z axis
Does anybody understand this hitch/lag spike in the profiler? It's clearly related to my player character and some sort of raycast?
man I hate this node stacking with a passion haha
Do you prefer Over?
Tell that to GAS
Floats all the way
Haha. I use GAS and I understand why they made float the default.
Hi everyone,
I've encountered a small issue with my AI Blueprint. It's designed to navigate through all the orbs in my level and pick them up. However, if one of the orbs is placed outside the NavMesh Bounds, the AI stops and doesn't continue to the others. Could someone please assist me with this code?
I just align them horizontally
Makes it too hard to see everything on one screen
ah I guess I'm privileged with an ultrawide yea
I think there is a "Is within nav bounds" function you can test.
Also use, the 'Create Event' node instead of directly connecting a Timer to a Event.
when the nodes don't fit on my screen that means it's time to start cleaning up
@hardy merlin Just did, as you said, But the Rotation, it's still 0. The Axes, didin't change the Z rotation
Are you using a top-down view?
Which way is the upper part of your screen?
Yes
Can you use DrawDebugArrow to see precisely what you're getting?
i would love to know how to connect it
thanks I will look for that.
I'd just print out the float instead of spawning anything
see if you get correct values
then use an arrow as grug suggested
Which axis is "Up" for your game?
looks good
some issue with your actor
Yeah, the script is correct. Probably some issue with the spawned actor?
modulo can also be usefull
Knifes = 4 * (Level / 4)
i just have to make space between char and blades
sorry, division
StartVector = ActorLoc + ActorForward*30INCH
Unreal uses Centimeters.
oh, CM to be then :))
Ah, the wondrous time of every gamedev's life when they start to play with vector math.
LMAO
yy
ty
That will make the ray start matching the player facing, as opposed to being locked to world-north.
@gentle urchin / @hardy merlin Tysm
There are many Draw Debug nodes. Very helpful if you want to visualize how rotators work.
:v
@gentle urchin Hmm, what i should do now? :))
they seems to not update for each one
Still up @hardy merlin ?
I'm here. What do you need?
Look at the photo i sented
.
Dunno how exactly to move the sword Y vector
as i did with arrows
Show me your spawn code?
Typically, Unreal Engine uses "X" to mean "Forward".
X : Forward. Y : Right. Z : Up.
You're setting the Roll value of the knives so they won't point in different directions.
how do i make it so they gonna point in dif dirrection
Try using "Make Rot From X" and use the entire rotator.
instead of just one axis.
Why did my blueprint grid lines get so thick? How do I fix this
Ah there's the problem. You're using the position as a direction, so the knives will always point away from the center of the world.
TRy connecting these pins.
Make sure you understand why that was happening.
Yep, i'm doing my best to re-evaluate the entire code, and make separate sections to learn it
Is there some nodes to get ALL INDEXES not only one?
Cause what I'm trying to do is teleport all players that are in the array
so a for each node?
no problem!
Are there any nodes similar to onleftmousebuttomdown/up?
it's a bug in 5.x only workaround is to disable type promotion...
This appears to be a bug with type promotion, just search โtype promotionโ in Editor Preferences and uncheck it and it appears to work after that.
however this will disable type promotion for all types, so it will bring back the old math nodes with fixed types
solution #2 is to make your own custom C++ node just for that
Okay so, I have nearly zero experience with for each loop and can you tell me what is wrong here?
I want all actors(players) from array to teleport but it only gets one player. (The player who has entered the collision box first)
also when players enter the collision box, index increases so I think it get players correctly but something is wrong with for each loop
Why are you making a new array while iterating over the array?
Delete that make array and the get, drag from the element directly into the set actor location, done.
Oh, thanks but it still teleports one player :/
Do I have to add/change something in here?
Are these actors being spawned onto that volume/actor youโre checking for overlap ?
They have to walk to it
If you print the array (with a for each loop) does it show more than one actor?
Only one
Try using get overlapping actors on tick or on a timer or when a certain event is called
any way to clean this up ๐
I need a good amount of the data from the hit so setting variables or using macros isn't all too great
sucks you cannot collapse these
Like this? If yes then it still only gets one player
But I'm doing it wrong probably
Is there a simple pattern to achieve atomic replication of multiple blueprint variables that doesn't require making a C++ struct ?
@light flower #multiplayer
What event did you put it on?
And are all of those actors bp third person?
Does anyone know the difference between these 2 outputs?
Direction is normalized
Always
So its a vector of length 1 that describes the direction this is in
In this case its probably a direction relative to the viewport center...
Not sure how that works exactly
@gentle urchin how to convert a vector to a direction?
i can't wrap my head around it. Didn't study in high school
normalize it
usually you take a vector difference, e.g. ActorA Position - ActorB Postion, then you normalize the result to get a directional vector
to my understanding normalize is like converting the vector to a length of 1 unit right
how does that translate to FRotator?
I will try this later ๐
guess the engine has helper methods to convert directions to rotations
the problem with directional vectors is that you will always only be able to calculate 2 rotation values, yaw and pitch, roll isn't known
If thats a problem^^
If I'm going to generate aspects of or entire levels from blueprint, where would be the place to have this logic? The level Blueprint? I feel like the Game Mode is not right, nor Game State..
For example generating a dungeon or a maze, like a mine or catacombs
I did implement this functionality within the Game Mode before, but I heard people saying its not entirely right
GameMode or GameState can be fine
I'd do procgen based on stuff from GameState probably
in minecraft the seed would be in GameState
Using the newest version of Unreal Engine! how can i make the head of the UE mannequin fall off? (by pressing "Z" button)
i have tried to follow some examples online but it requires to set simulate physics and to my understanding you cannot set simulate physics to a specific bone? or am i wrong?
using BP btw
got a wierd issue where one blueproint works in one level but wont work in any other level, the code looks like this, any help?
debug with breakpoint and see where it failed to execute intended nodes
ok so i know it registers the input couse it playes the 2d sound , it also goes to the interact function as intendend but the rotation its self is not happening
i added a print string to see if it registers the rotation and it does this
does anyone know how to rotate a rotator?
Like literally just rotate an already rotating thing
I want thefacing rotation to rotate the lerp
nevrmind this doent matter this also happends in the level that it works in so its not the issue
@pastel skiff hard to guess but with the way it's setup atm, it might help to check the rotation of the scene component
if they are placed on 90 degrees or 180 degrees it will produce different result if I can guess what happend from here
hard to tell w/o the project
ok i changed the rotation to the same that is in the working one and its still nto working
Combine Rotators
@pastel skiff check if it's moveable?
then check the output value instead printing hello
Combine rotator
how do i do that?
what do you mean the actor in the blue print or the actor in the level?
select your door component and see it's mobbility
both
for sanity check
how can i do a tool?
also do you get any error after exiting pie?
i have this:
๐ ๏ธ
ok thanks
im talking about what your code does
which makes it useless
I believe your intention is to attach the Weapon Component to the player
if that's the case, you want to get a ref to the player and attach the weapon to the player
mobilyty in blue print is right but i cant see it in the scene
course you can, just select the door in the editor
then look at the detail tab
then look and select the door component
Do you get any error when exiting pie?
i get no errors and one sec
ok sorry for the wait had to do something, and ye it is movable
if it wasent it wuldnt be working in the other level
and i get no errors
When i point at a specific point
it keeps printing 3 different values
it glitches between these values
This is by using combine rotators
camera rotation is ran through an input action using A and D while camera drag runs through tick and using the mouse
how can i do an if a component is enabled
components do not generally have an enabled / disabled state
Dont they? Activated/Deactivated?
Never checked it but i assumed one could control that
is it possible to do something like this in blueprint? In cpp i can make a delegate that has an input when exposed to blueprint. It would be really handy if it could be done when making a dispatcher from blueprints, for blueprint use as well
no its an idea i picked up from a tom looman unreal stream a long time ago, extremely helpful, cleaned up my logic a lot
i was refactoring a bp only marketplace system i made and thought about including a similar delegate that fires on subcribers only if the input tag matches, but seems that it can only be set up in cpp, as far as i can tell
i think there is similar stuff with attributes in GAS as well
So how does it work? Does the owner of the delegate have some tag map that it uses for dispatching?
Yeah i gotta check into that tbh
Seems very handy
yeah exactly
theres plenty of examples, lyra also has a gameplay message subsystem that uses a similar function + wildcard. I think they use it for all their ui updates
Wildcard, oh the power surge
hehe
i wish the power was exposed to bp though, would make my life a lot easier today
i guess i will have to turn the bp only project into a plug in ;/
Well its not the end of the world if you can just enable a plugin for it
Project still stays bp only , if thats a desire
Currently i have to filter the broadcasts *after * i recieve them since i dont have this neat input
Not the worst, But it looks messy for no reason
On the other hand a "hidden" filter can be troublesome to debug
And doesnt read well in a bp only project
exactly - if you have to filter the broadcasts after you receive them, you have all your delegates checking, which can get out of hand pretty fast
but i guess it depends how many you have. i literally use this for everything , so i have to filter in advance
Thats what i wanted out of gameplaymessagerouter ๐
A global, dynamicly filtered delegate i could use to push data innall sorts of ways
Like a communication bus really
Just connect whatever to it, and let known your desires
you should paste the messagesubsystem from lyra into your project plugins then, it might just do that
a delgate is basically an event ?
Oh yeah, Ive got it in there !
A broadcast event. Like a twitter account
Anyone can subscribe to it
In this case the subscriber can say we only wanna know about posts that has this #
math expressions don't allow to get .x or .y from vectors ?
GridOrigin - (OriginCentered ? Vector(gridHalf.x, gridHalf.y, 0.f) : Vector(0,0,0))
Soooo.... when I put play sound at location and I want to stop it while it's playing, what do I use?
what does the node look like for play sound ?
possibly an output that you can use as a reference
ya it doesn't have an output
Messages just dissapairs in front of ma dayum face
๐ฎ
didin't have the pleasure to hear that kiddo how's he cryin'
Hey guys, im having a weird problem with variables in blueprints. For example the Ghost interp speed is set to 1 but its working as if 0 and if i try to print it it also says 0. Same problem with a variable i have for delay. Any idea of what could be wrong?
nothings wrong with the FInterp node that's for sure
add some print string, append the numbers, whatch what happens
tried to print both the output and the values. It works as if the value is 0 (when is set to 1) and the output result is as if it was 0. The weird thing i was trying now is that if i hardcode the value it works just as expected.
This works, if i promote to variable it doesnt
sounds like the variable is 0.0
yeah but im setting the default to 1 and i can see it, but its printing 0 for some reason.
its the only reference i can find
its unique, im pretty sure. gonna try a pc restart as well.
i think i figured it out of what is going on, as soon as i promote the variable i usually change name before setting anything and then i compile change the value. This created the problem for me and i can reproduce it. If i promote compile and then change name and value it works fine
Hi, im having trouble communicating between 2 actors. I made a variable as an object reference of the other actor (OT) however its says accessed none when trying to read it, any ideas?
the screenshot isn't useful, your error is that there is no valid reference
you should be looking at the place where you are setting the reference
I'm trying to figure out what the best way to have an "inventory" or a list of required resources is. Essentially just saying 10 of one object and 2 of another for instance. Is that what a map is for?
how can i get a valid reference from another actor then?
check the pins for a video on blueprint communication
getting a reference is not something you have to worry about 90% of the time because communication between actors usually also involves some kind of process that gives you a reference to work with
Eh
If you know what youโre doing and how bp comms and interaction systems work, yeah
however you want
how does the 1st actor know about the 2nd?
what is the "rule"?
For example, a bullet knows what actor to damage because it's the actor it hit
Another idea. Make a struct with that resource struct and an integer of weight, and make an array out of that?
can you pass variables from level blueprints to actors?
i don't think you can access stuff inside the level bp
ah yes, one of the deadly sins of unreal engine
im making a puzzle in the level but dont know where else i could do it
I know it's the most intuitive approach starting out, but you should pretty much not use the level blueprint all with very rare and small exceptions
maybe put the variable on the character instead
you can access the player from the level bp ?
your character optimally shouldn't even know about the puzzle except for generic interactions or inventory
it depends on the kind of puzzle
there's pretty much 3 situations:
you have one actor for the whole puzzle,
you have one actor for each part of the puzzle and each one does its part of the logic,
you have actors for each part of the puzzle and an additional manager that keeps track of everything
essentially, the 4 hanging light bulbs light up in an order. this is currently happening through the level blueprint as they are all separate actors, you have to light them up in order
Quick Question
okay, you'd start by implementing the logic to light them up
ive done that, but in level blueprint, should it just be one actor?
yes
ah ok
with the exception of an interaction system that should entirely happen in the lightbulb
yeh, but to light them back up you have to stand underneath them and active them with a button press
i made a logic to spawn box collisions around the procedural grid to stop the player from going too far away but when i press on the button to move for too long it passes thought the box collision
how can i fix it?
guessing that would be inside the character
it should be, you should look into making a generic interaction first so you can use that for all your stuff
i can do that with an interface right?
yea, for a simple system you can either use overlap or a linetrace from the camera and then send off the interface call to the resulting references
for the order I'd give every lightbulb bp a public integer variable
so when you drop in the bulb you can set its number in the details panel
then you'd have either a manager act as a middleman or directly communicate to whatever you are activating
the main point is that you'd append the integer to a string
so when the player clicks on bulb 1, then bulb 3 it results in a string of 13 which is compared against a string in the manager or target
thanks, its already alot easier just working with one actor
You really shouldn't use the level bp
Yes but don't use level BP
You still haven't said in plain English how actor A and B are linked
i used the level blueprint in a tutorial first thing
then i never used it again
but it makes sense if you think "i need something specific for this level"
Can I spawn a pawn from my Controller BP? I am trying but it just says it's pending kill
you can. that error doesn't mean you can't spawn it. it means you're trying to access something after you destroyed it
click on the magnifying glass to go to where the problem actually is
I see, but I never told it to destroy X_X
click on the magnifying glass in that line. Where does it take you?
even without the warning - the pawn just never appears, I paused and ejected, and did simulate
Was using spawn actor from class
if you want help show the rest of that error msg, and show the code where it points you to.
Error ws pointing here... saying it couldn't set static mesh because it was destroyed
But at no point do I destroy it, it just never seemed to spawn in the first place
is your Spawn Actor from Class Collision Handling Override set to spawn anyway?
and is 3dExam Pawn cached directly from the return value of the spawn node or how are you setting it?
if your main menu and your primary level use diff GMs (and PCs), where do you put the saveGame functionality ?
ah ๐คฆโโ๏ธ ofc
yesssh?
It's sooo worth it thooooo
ik, I want to learn about them too, but rn I'm just prototyping to learn the SaveGame object stuff
I need to get into subsystems asap, but from what I've seen they're super straightforward
They sounded so intimidating haha
They are. It's literally just subclass your subsystem of choice and the engine handles it's lifetime and setup
you just do your logic and have nice globally accessible functionality
Then you just get your subsystem from it's lifetime manager
I.e. UGameInstance::GetSubsystem or UWorld::GetSubsystem
so global funcs basically?
More like singletons I think
global funcs, variables whatever
but tied to a lifetime of your choice
for example you can get one from initialization, one only in the editor, one tied to the game instance, one tied to the local player, or one tied to the world
it's neato
Crazy question, but I have the string from a custom struct I created by copying the variable from a blueprint and pasting it into notepad. Lots of parenthesis and commas to separate the variables and nested structs within it. Is there any easy way to be able to create a blueprint function to convert this raw string back into the struct?
I don't have access to C++ in this case.
The resulting string is obviously a mess. I can create a new variable and paste it back onto it and the new variable gets all of the information, but I need this to happen from within a game, getting the string that is normally a result of a variable copy, and then parsing it back into the struct. Its being done as a way to transfer the data between the game and various addons, and unfortunately I don't have any other way to do it.
Any idea why control rotation isn't working for this pawn? Print strings show both Relative Rotation Z and Control Rotation Z are what I would expect them to be, but when moving forward the pawn always moves with control rotation z = 0. I have it set up so that Mouse 2D adjust spring arm rotation (3rd person character)
does anyone know why get overlapping actors gets only one player (BP_thirdpersonchar)? What did I do wrong
It should print all players and teleport them but it works only for player who has overlapped first
multiplayer ?
Yes
@frigid goblet full code
E_Pressed is called inside a bp_thirdpersoncharacter after clicking the E keyboard button
Can someone help me? What do I put into the "Object" pin for casting to a widget?
What do you need mc for?
Let server move the players
Casting is just a type check. You need to provide an instance of the widget
that code finds where my target reticle is, i need to make sure when an animation plays the character faces the rotation, but then when the rotation sets it goes back to normal.
anyone got any advice ? if i just set the meshes rotation then my wasd movement is messed up
Like this?
Yeah but it looks like the instance already ha s type of selection ui. If you want to validate if it exists right click and convert to validated get
Also u need to set the variable
U need to get the actual widget u created in the world
So where ever you create the widget. Promote it to variable
Then use that variable to access it
I created the widget in my level blueprint, so I promoted it to a variable... and now how do I access it from my other blueprint?
For a start abandon level blueprint
It's almost always the wrong place as communication goes one way
U can't get a ref to level bp in blueprint world
2nd. Watch blueprint communication video by matthew
If u don't know how to get ref and communicate between bp
Depending on what you are doing, if the widget belong to a player. Normally you can create it in your hud.
Where ever you are in other bp. You can get the hud with get Hud node, cast it to your hud and get the widget
Thank you! I got it working by instead firing an event from the widget itself, where the actor could take that event!
Is there such a blueprint that say: you have a class with a name and age. so you make a variable based on that class. Is there a node that can create that object that would have the variables in it on the left as inputs? instead of like "Set Name" then "Set Age" nodes? (just wondering if i can simplify my tree that way)
If you mean spawning the blueprint as an actor, then yes, you can check off the boxes for "instance editable" and "expose on spawn" and they will appear when the class is selected for Spawn Actor nodes
how do you make a thing rotate around the projected world to screen?
Like the projected world to screen is the center
I may be misinterpreting what your saying, but i am hoping for a node that breaks out all its attributes, like this (professional sketch)
so i can just plug stuff in and not call a set for each variable. if possible.
Well your example shows a Get node for an actor that already exists. If you want to be able to set the values when you're creating the actor for the first time, you should mark them as Expose on Spawn. If you want to be able to set them in bulk later, you should just create an event called "Update Data" or something.
for an object, it holds many different variables, inherited from its parent class, so it would get messy if its allowed to get/set all of its variable at once.
however, instead of holding different variables and type on the object, you can always place the variables that you want to edit at once, in a struct, the object would have a variable of the struct, then you can set all/some of the variables.
It looks like you're probably just unpacking the struct and setting each value ont he actor, so make the event take the struct as an input to make it nice and clean.
i get all the proper ways to do it, was just curious if unreal had a node like that. thats all. thanks
what are you trying to do exactly? This node gets a position in your world and tells you where on your 2D screen it is. You can't conceptually rotate a 3D actor around it because they're not in the same space.
If you want some 2D UI thing rotating around a point on the screen you should make a widget that rotates around that point on the screen.
sorry
Simply put I want an object to rotate around where the point is on the screen
ok but actors exist in 3D game world space and your screen is 2d
I'm aware
Do you want a UI widget rotating around where that point is? Or do you want an actor rotating around where that point is
An actor
The idea is that the object will rotate around the point where it is on the screen
But i've got no idea how to properly do that
How u mean
You're saying "on the screen" which is a 2D plane. But you want to rotate a 3D actor in 3D space. So what does that even mean? Do you mean the object should be flying in a circle a fixed distance away from the camera?
or should it be moving in a circle around the object along the ground?
if the orange dot is on the blue plane, where should the rotating object be in 3d space?
I guess i should be more specific
The object in question that i want to rotate is the camera and i want it to rotate around the arrow (the red thing) based on where it is on the screen
You feel me
Like if the arrow is on the bottom right side of the screen the camera will rotate around that point instead
rotating the camera around an object as a function of where the object is rendered on the screen? No I don't think that will ever work. do this instead.
- parent the camera to an object on the red arrow.
- rotate that object which will cause the camera to swivel around the red arrow
- determine your rotation with some other scheme than "where it is on the screen"
Well thanks anyway
so are you able to return outputs back from them? i.e. in my case, I need the widget to call an event in the GI (has async in it, so I can't make it a func), then return a bool or other vars to the widget so I can call a diff function in there? rn, I'm stuck calling into the GI and casting back into the widget for this, which is fine ig, but seems silly
and doesn't look like you can call macros from outside the origin bp
tbh I don't even know if that would work since this involves latent actions. I imagine even subsystems need to run within one tick
you kinda need to make blueprint async task for these, like UAbilityAsync for example.
the other less c++ but more hacky way is to pass a delegate through the function, bind event, and call that in the GI later. this can only really work when there is only a single instance of function call going at the same time.
yeah, I don't want to make it more hacky than it already is, I'm gonna read up on this UAbilityAsync
oh wow it's just global eh
yeah, its more like "function library" kind of static, but each call will create a different instance of the task
the classical way for me to handle this is to get GI, bind something, call the function that will later call this delegate, callback from delegate, continue
something like these
Delegate seem reasonable
Right but for the save functionality that wouldnโt really work right?
Cause I have to wait for stuff to finish happening in the GI and get values from there once thatโs done
Why wouldnt it work?
- WBP Initiate Save and bind to SaveCompleted in GI
- GI Start latent save
- GI calls save completed delegate
- WBP recieves the broadcast and mives on
Wbp dont cRe if this takes 2 seconds or 2 mimutes
Ah right that makes sense
Saves me from doing an extra call back by subscribing to it, thatโs fair
Maybe you just wanna stay subscribed to this callback
anyone know why there could be inconsistency when using a stationary actor's world rotation to align player character's rotation?
not a consistent mistake/offset from what i'd want, but an actual completely random offset
it's set up to repeat the align every half a second, it's supposed to align the player character to the connecting lines (tried using both an arrow component's world rotation and find look at rotation, you can see blue and yellow debug line to represent both, the math seems correct every time)
character movement "disable movement" is called at this point, no input should be registering (except after finishing the conversation)
the only way to actually make it align i've found is to use the movement to rotate the character around and sometimes it'll work, sometimes not (as you can see in the video)
which also happens if i fire this only in conversation, it's just there to repeat it quickly so i can debug more quickly
Tried flushing the input buffer?
So you dont have a remaining rotation waiting to be applied next frame
Also, wouldnt you just disable movement input during convo?
...
i wouldn't be here if the obvious hadn't been tried :D
flush input i have not tho
lemme try
nope, the flush was already set :\
Its not.obvious to 90% who asks questions here, so forgive me for making sure
Also why are you setting the location?
so it's set at a consistent place for cinematics
You definetly wanna disable movement input for this then
But ur setting rotation based on something thats st your exact locatiln
How do you expect that to work
But you are
Youre asking it to find the direction from 0,0,0 to 0,0,0
arrow -> ai location look at rotation
or
arrow world rotation
and you can see the 2 debug lines stay consistent
same result
Anything else updating rot?
Logic seems fine
Im sure if i add this in a project itll work
the locomotion component is anything i can think of, but movement is disabled
it's a root motion based ABP
but in the end this is all that the component is doing
same result even if im not moving when i start conversation
it's atleast consistent in the sense that certain pre-dialogue rotation ends in a consistent post rotation set rotation
Easy to test with a new actor
That will verify the logic, isolated
The set loc/rot part of it
yeah, on a simple third person character it works just fine...
So that part is solid
found it, the locomotion is doing some root motion offset thing that i have to disable in addition to character movement disable movement
Well atleast you found it!
how do I get the index of the last spline point?
get the number of spline points -1
do I like get the number of spline po----
x)
dont ask to ask, just ask
why the hitbox dont goes up even if u but the orintation value higher
bad picture one sec.
i go now for trainig in 60 minuts i come back i hope somebody can help me until im back
Thanks in advance to anyone who tries to solve this
THANKS
ok, this is soo weird
if I attempt to execute a Draw Debug node, the game still runs, but the render is completely frozen
if I go into simulation mode, I can see the axis at the bottom left corner rotating and leaving permanent debug lines
ue 5.3.2
it seems when the draw debug node is active, everything is frozen
when the duration has ran out, everything goes back to normal
huh
so
it seems to be a bug related to MSAA
I changed the anti-aliasing to TAA and the draw debug nodes run properly now
Orientation is just the rotation of the box and doesn't affect the direction the trace is performed. You would need to modify the end point to be higher than the starting point if you want it to end higher.
Does stuff like Create HUD / add to viewport go in "character" or "player controller" ?
watched a video, and now i am conflicted
Anything widget related -> HUD class
Depending on what you're doing it doesn't matter too much but there is a hud class.
saw a framework video, and in their explanation they had this in playercontroller
yes it needs to be higher but how can i do that
Playercontroller is fine, but HUD isnt going to be doing anything else so why not use that as the container for all things widgets ๐
Thats my reasoning
i mean where can i modify the "end point"
well, i was just making sure because, if i added it to playercontroller then the hud would spawn in main menu, and not when character spawns in,
that way i would have to make two seperate player controllers
On the trace node, modify what you plug into the end input to be higher.
you mean this right?
Correct. Using hud tho. You dont ๐
But youd need 2 hud classes ๐คฃ
Yeah i figured xD
Am I being dumb, using VR template with VR hands to try trigger an overlap event with collision box and it isn't triggering, both set to simulate overlap events, any ideas?
also stupid question
what is the HUD class running on.. as in
server only / server & clients / client only
thanks i got it with an get actor up vector + modify the values
Client side only I believe.
okay thanks
Hello ๐
I have made a portal that I want later spawn in. I use niagara particles but i also do have a cylinder mesh within the niagara particles.
Right now I spawn the portal with F. The particles fade in nicely but my cylinder mesh comes in instantly. how should i approach this problem to make it also fade in slowly like the particles at spawn?
They all are in side an blueprint actor i spawn.
I made my "player controller" to be the new one, but now my character wont move or anything ?
i am bit confused as its a child of the parent "player controller"
"my character only moves if am using the BASE Player controller"
Are you overriding whats making it move?
Player input is in the CharacterBP
and the my player controller is "mostly empty"
I just did this, and it works?
the one on the right is the one that doesnt work
and on left is the one i just made and works
no idea why it doesn't work, but i will just use the new one that works
can you start it with the cylinder mesh's scale at 0,0,0 , and increase it to 1,1,1 over time? making the portal grow from the center
Hey all, anyone know why my transform gizmo is transparent?
my character animation freez in his block animation after i press the "Handy button" for block why?
I want that he only blocks when the button is pressed in that case he blocks all the time after i press it ones and than i can not stopp the blocking any more he freeeeeezzzzeee in blocking mode like the button is always pressed
(Until i press the block key on my keyboard)
I have another stupid question ๐
I am transforming my niagara particles now with event tick on x axis. each time a tick happens it looks like the particles are reset for a tiny amount of time. is that a problem of the tick or the way my niagara particles are set up?
maybe the lifetime?
You need an unrelease event that makes him unblock.
I have a interface that gets executed in "an actor" then that goes through BPI_Interface and should end in HUD, but it doesnt
thanks again patty it works!
Make sure to have a target hooked up to that Remove From Screen interface message/function call
Ideally this should be the class that needs to fire that event
but that then means i would need to cast, which means the interface is pointless
No, you just need a reference to that widget class
How would i get a reference of a HUD class
That depends on how this actor of yours is set up.
Here is an example of an interface call in one of my pickup classes (different purpose obviously^^) but that hopefully clears things up a little ๐
...an interface call always needs the desired class (which should fire the event) as a target
I'm not really sure how your project is set up or how what that actor of yours does, but it needs a reference to that widget
Where is it that you create the widget in the first place?
Guys, how can I extract the angle between 2 rotations in blueprint. Would it be done with the delta rotator?
The only way i can get a reference is by doing a cast, but that then makes the interface uselles as i could just use custom event
You dont need the cast
Get hud
Returns a reference
Of the parent type, but that doesnt matter
yeah i think my fault was that i didn't find GET HUD because it doesnt show up unless u untick "context sensitive"
so i got confused on how i should get a reference
So the HUD_Player class is the place that needs to fire the event that you mentioned earlier?
Im not really sure why this is an interface call anyways but oh well
Add to screen happens in a ACTOR
and the EVENT happens in HUD_PLAYER
because i dont want to cast
dont hate the cast
use it when it makes sense
Adding to screen is very class specific operation
you're not gonna have 10 very different classes reacting to that
and your hud class is always loaded
so there's virtually no penalty for casting to ti
good point ๐ก
Well now that you mention that, it does make sense
interface is an abstract concept
ment for communicating with a bunch of classes that dont easily fit in a common hieriarchy
(as many others, I prefer component over interfaces due to statefulness and pre-coded functionality)
You should probably use the two forward vectors and their dot products.
Have you tried that?
Yes in the end I did it with the dot and harassment between 2 vectors. Because it's the only way I can think of
I would like to know if between 2 rotations the angle between both can be extracted. I understand that with the delta rotator function it returns the difference between both rotations but it does not return it to me in angles.
Then use this -> ๐
In the end I solved it, this is to make it so that if my character's angles between the inputs are greater than 120 degrees, he turns me completely with a timeLine
I changed to using cast for that situation because at the end of the day I needed a value to be updated, and even tho i could of probably just did it in interface i still just changed it.
but atleast i now know how to get interface to work...
Progress attleast ๐
Alright.
Just to clean things up a little:
For "1.": You could just use the actor location, followed by GetForwardVector, no need to normalize a forward vector.
...your costum function "Get Velocity Movent(?)" I'm not sure what the return value is...
...but if it works, that's good ๐ ๐
What my get velocity vector function does is the sum of the forward and right vectors plus the last input vector I pressed. I do this so I know what direction my character is going to take.
This is necessary for the character to rotate on both axes, both forward and to the right.
I see! ๐ ๐
I will make a gift so you can see the result, it gives a very good movement and very similar to RPG games
Sure!
I guess it's top-down then?
right
Hi Guys, a question, I'm trying to make the "Remote Control API" plugin work but when I click in the Unreal cmd "WebControl.StartServer" it doesn't do anything. How can I solve it?
Cool!
Thanks for sharing ๐
(dont mind the spelling on the actors and variables) hey was wandering why when i add the pork mince (green block )then the tomato mince (orange block)to the blender area, it dosent delete the pork mince. (video showing what i mean https://www.youtube.com/watch?v=ayudwdXaRY8)
i als get this error when i close the game
Blueprint Runtime Error: "Accessed None trying to read property K2Node_DynamicCast_AsPork_Mince". Node: Destroy Actor Graph: EventGraph Function: Execute Ubergraph Blender 1 Blueprint: Blender1
That's what I suspected^^
That means that the pork mince is no longer valid at the time you wan't to destroy it, probably because it takes the target from the first overlap box event
To solve this issue you could try to store it in a variable and then call DestroyActor from that variable instead of from the overlap event
something like this?
Hi, im make a simple elevator with a spline, and i have a mechanic to push blocks, I want to push my block on the elevator and when I activate It to move the block Up/Down, thats the code i got right now to attach the block but when the block overlaps the transform change and gets bug dont know If someone can help me. and can show him more
Yeah exactly ๐
i tryed it and not it dosent want to delete nether the pork mince or the tomato
Blueprint Runtime Error: "Accessed None trying to read property As Pork Mince". Node: Destroy Actor Graph: EventGraph Function: Execute Ubergraph Blender 1 Blueprint: Blender1
hmm... okay...
Make those saved variables a "validated get" and try to figure out why they're no longer saved.
You can set break points on blueprint nodes with F9
I could imagine that the cast fails by the time the box overlap event gets fired again
so i may not know how to use these brake points however it seems to be broken from the start for both of them
Put a print on the cast failed pin
it diddint print, just took me straight to this
when stopping there, you can use F10 to jump to the next node.
...also use mouse over at those pins to get their debug value
ok ๐ ๐
...maybe try to debug it anyway to really understand whats going on ๐
well ty anyway, if it comes again ill try to hunt it down, this was like in school when the it guy comes over to see the problem the problem just goes away
Theoretically yes^^
...what could also be the case is that the values are just assigned too fast. Maybe using a delay node with one frame delay (duration 0,0) would lead to the same result
ill keep this in mind ty
happy to help!
Does anyone know why this aint working? I have a setup when the player clicks a state the event fires, gets the location of StateLocationOrb and then sets the Offset of the SpringArm to the same value (with my own z value set with the target arm length). The intention is to have the camera zoom in on the specific State clicked, but the camera is instead going way far up and to the right.
The printed string reads the correct value i need and the State offset from each other is correct so im at a loss here...
Only thing i can think of is because the State bps are scaled 4.5 times but i think with the print string giving me the correct values that shouldnt actually matter.
I want to teleport the platform actor with pawns and other actors standing on top of it to new location whilst maintaining their relative position on the platfrom. What would be the best way of doing this? To have a platform recieve a teleport loaction and then save relative transforms of other actors somehow and send them out commands to change their location?
attach, teleport, detach
Attach to "component slots" inside the actor?
Sounds like a good idea but I'm not sure about the number of possible number of actors on the platform
no idea what you mean by component slots, just attach to the actor so the change to the root transform gets inherited for you
if performance is a concern you can calculate the new location pretty easily too
just detemine the offset of the actor to platform, and add it to the new platform location
though the attachment approach should be really cheap, I cannot say for sure without profiling
hi guys how to make widget not move with the camera in unreal
It's in the same window, In the pic it's not there - My thought was that I could just swap the OnComponent to the Input action i've made.
@dark drum sorry about the tag, man. Help me check this. Thanks
#animation message
maybe a 3d widget instead ?
Can I override or bind one event to tick? or something that will make it simpler and reduce if/switch in it ? It will bind only on creation, so easier to maintain simpler blueprints
Seems a bit like a complicated approach to "bind" those costum tick events.
You could rather use the same approach as above, with an enum switch (in case only one of those have to fire of course)
I actually am, but since I asked maybe it is possible :D, one switch for rts can be beneficial ๐ค
?
I see ๐ (even though I can't ๐
)
...what you could do for better overview is to call those custom events from the main tick event...
...but other then that... I think it's okay how you're doing it.
Basically like this:
Is there a reliable and simple way to tell whether the mouse is currently over a widget regardless of whether a mouse button is held down?
IsHovered? returns false so long as a button is held down. Mouse enter and Mouse leave events don't trigger either, so a custom hover boolean using those also doesn't work...
I'm trying to implement a drag and drop item interface, so i need to know when an item is released whether the mouse is over a valid slot for the item to go into. I would just manually check coordinates myself but I can't even figure out a reliable way to get the relevant widget's position on screen to check against the raw mouse coordinates.....
The enum is an example of course ๐
I guess the right function to override was called OnMouseEnter
that event also does not trigger when a mouse button is already held down
Sry, just realized that you've already tried that^^ ๐
this is what i use for drag/drop
what sort of function is this in/where does "Mouse Event" come from?
Just tested it.
The event does fire when one mouse button is held down.
...there must be something wrong with your code I guess
Maybe you're calling it from the wrong place?
the same thing happens whether On Mouse enter is an event on the event graph or is converted to a function. executes when no button is held, doesn't otherwise. It'll execute after the button is released if the cursor is hovered.
I'm gonna recreate this in a fresh widget, sec
I am trying to work a shotgun style bullet spread however the rounds keep firing upwards and I am unsure how to correct this. Any ideas?
It's in my on mouse down function
then i've got the events for on drag enter/leave, etc. but It works for me when I hover even if im holding a button down already, so I would double check your code
okay that makes sense cuz the down event is triggering all the while, i was unaware of the detect drag node existing at all
how do i actually use it though? like how do i tell if the mouse actually dragged over the widget from the Event Reply output?
You mean like that? With the drag enter/leave events?
they have mouse on enter/leave events to
this is a fresh widget bp demonstrating the On Mouse Enter doesn't fire when the button is held down. Ignore all the stuff in the vid besides the pink square and the debug output
That is so weird ๐ค
For me it works ๐คทโโ๏ธ
i didn't know about this event. just put another test in this dummy widget from the above video. On Drag Enter doesn't seem to fire whether I'm holding the mouse button when i hover it or not
...maybe it's because I'm testing it with a button while you did it perhaps with a border element?
I did do it with a border. hoooolllll up
You could call them all in your master bp blocked by a boolean for activation
Sounds like youll be running tick anyways
Otherwise you can set timer by event
nah I replaced the border with a button, same behavior. This is 5.3 btw
i don't see why that would affect things anyway
Hi! I'm looking into creating a custom player spawn system, and I'm wondering if anyone has any tips in regards to making that? I was first thinking of just having a bunch of "player spawner actors" with separate IDs corresponding to their locations, and then teleport the player to these locations when they are spawned in / loaded in, but this seems clunky somehow. Is there a better way?
I'm on 5.3 as well.
Yeah that's true, it shouldn't make a difference I guess.
Maybe it's my setup then. I'm overriding the MouseEnter event in a widget BP that has a canvas which fills the entire screen.
...though my string message appears only when I'm hovering the buttons...
#umg is best for UI related questions
And #enhanced-input-system if youโre using that system
(after the little pause I hold down the mouse button)
Oh, My apologies.
Thank you Neo
https://gyazo.com/81abd8bc2ab758381b48c5134fbf841d Hey folks so I'm trying to make it so that the Camera rotates around the arrow but with a distance instead of being in the same position as the Arrow itself, is there a way to do so?
I can do the same thing (use mouse enter in the big UI that contains these widgets) and the same happens ๐ฉ It works w/o mouse button held (and as you said only triggers on actual elements within the big canvas) but still doesn't trigger when the mouse is held down.
This is genuinely flabbergasting to me. How is there someone whose UE just works this way? I have even seen forum posts where ppl say "that's just how Mouse Enter works it's meant to be w/o button held down" lmaooo
Here's the code so far
put the camera on a spring arm from the arrow position and just rotate the spring arm on the desired axis?
How does spring arm work?
it's a component that maintains a set distance from its origin point. It's common for character cameras to use a spring arm to manage distance from the player etc
About this Vector Snapped to Grid, is it possible to modify the rotation of the grid?
For now the grid face the Y axis, but I would like to have the option to modify that value and add a certain degree
just make your camera a child of the spring arm
I guess this is what you want?
...just look at the hierarchy in the details panel on the right
Thatโs how the engine already does it using Player Start Location actors. You can also give them tags then use GetAllActorsWithTag during the event begin play of the GameMode class to store a reference array of them which you can then pick one at random to use itโs world location when spawning in a character.
or if you donโt want to use getallactors you can make a new bp called spawn manager and have a public variable array of all the player starts and pick them manually in the details panel
what would be a way to make custom graphs like this without cpp ?
Isnt there a flow graph pluging
That allows you to make customized graphs, without cpp
let me check
Or perhaps https://github.com/jinyuliao/GenericGraph
hi guys why is my is my world map rotate like this
i havent done anything i just presed wasd
Hi , I have this weapon and Im trying to rotate a bone about 120 degrees each time an even dispatcher is called, but its playing up and doubling back on itself what should I do here .
When i press play, this appears.. Not sure why and how to get rid op it
Anyone an idea?
Am I doing this correctly? The platform does travel to the 0,0,0 testing coordinates, but objects do not. When I choose Keep World option pawns get left behind, When I choose snap to target everything travels, but pawns fly away some different direction and objects fall through the platform lower
you are setting the location of the platform inside the loop
'keep relative' is correct
Is that problematic in any way?
well you want to attach all the overlapping actors and then teleport, right?
you are attaching an actor, then teleporting the platform
then moving on to the next actor
when the platform is already at 0 0 0 because you moved it there
Like this? Still same results
I will try couple more variations. Thanks for clarifying
ah I was wrong, keep relative is wrong
it should be set to keep world
this works perfectly for me
you'd need to make another for loop to detach
it'll work without detaching, but I think it's necessary to not mess up garbage collection
This is an option to profile using named events (more details). You can disable it by clicking here:
Ooh nice
Thanks a lot! Hopefully it will work well
Also your nodes look really cool
making a sound effect that "ticks" as a plane (grid) moves in my scene.
the moves is done with a tween.
I'm using a timer to trigger the "tick" sound. it gets enabled as the plane position changes. I want the timer freq to be shorter if the plane moves faster.. any ideas of a workflow for this?
show how the move is done
timeline or tick?
1s let me boot up UE
it's part of my global interp system that you've helped me with already but i'll share nodes
1st screenshot is in my camera BP
2nd screenshot happens in the plane BP
they are split because camera auto focus tracking tracks an actor in map.. haven't found a way for it to target a mesh.
(and it's a mesh because I want it to be visible sometimes)
Midi Note here is what triggers the sound.. (handled externally, for now)
Time 0.05 is what I'm trying to set based on velocity perhaps?
Guys please I need help. So I am using timeline (0 to 1) times 90 for the rotation of a door. Yes I used collision begin/end but there is a problem that doesn't make any sense, so if I am moving around the collision box the door goes randomly, it even goes over the limit of 90 degrees. I even used print string but its perfectly normal 0 to 90, but why is the rotation of the door always off. Why does it do that? I have done exactly like the tutorials, should I reinstall UE4?
if you're ticking anyway somewhere I'd just keep that same energy
tick -> accumulate distance -> if > TriggerDistance -> play sound
so you'd set the material from within the camera BP instead of bounce the stuff around?
I've never been a fan of distance accumulation
You want to play a sound whenever something moves X distance right?
ahh so no timer.. just play sound whenever it's far enough from previous position
If that's the rule, yes
and how sensitive it is defines how fast it will retrigger
well yeah but i didn't think of it this way haha
if you're already ticking to move the thing that's the obvious place to do stuff based on movement
coming from a music approach (but I don't want to rely on bpm) I was thinking of setting a frequency
i'll give it a shot and see how it sounds thx
What's the desired end result?
is this like moving a slider and haveing it tick tick tick based on distance moved?
i'm creating a weird audio visual instruments.. using unreal as my sequence for various sounds
i want it to tick when it moves basically
and I figured it could be interesting to have it change how fast it ticks based on the intensity of the focus adjustment
I'd really have to see it in action but yeah that's how I'd do it. You already have the structure to update values and trigger things based on those values so just work in that framework
may I get some help too? :/
makes sense.. thanks.. I gotta adapt to this mindset.. for instance my instinct would have been to add branches to avoid running the tween if time is 0 but it might be part of the tween plugin already..
Show code
yeah code is easier to read than words haha
show code