#blueprint
402296 messages Β· Page 590 of 403
Ah, I see.
50 will be mapped to 0.5
The unclamped version also maps 150 to 1.5
The clamped version maps 150 to 1
Very handy, I use it a lot in my vehicle physics
Where's the fun in that? I want to know how it works.
Geometrically?
yes
2D?
yes 2D
No.
Right.
Right.
now if you also divide the range 0 - 1 in 100 parts, each part has a length of...
0.01
Yeah. I threw out your results because I thought they were wrong.
means each "step" of 0.5 in the range 50 - 100 corresponds to a step of 0.01 in the range 0 - 1
With that you can build the mapping rule. I can spell out the equation for you if you are interested
But probably you can do it yourself at this point
Yes that works to map to 0 - 1
The Unreal version maps to any other range, but that is easy because once you have mapped to 0 - 1 you can just multiply and shift to map to any other range
For example to map to -0.5 to 0.5 just subtract 0.5
To map to -2 - +2 just subtract 0.5 and multiply by 4
It might be a bit of a dumb question but I really can't find any information on this. Does anyone know how to get this node? It doesn't show up for me, I updated to the newest version and it's still not here https://docs.unrealengine.com/en-US/BlueprintAPI/Sequence/GetMarkedFrames/index.html
I am trying to use it for my level sequence
I did actually, I restarted UE and I still can't seem to be able to get it
Even if you uncheck Context Sensitive from the right click menu?
4.26?
Yes
let me check
You have dragged from execution pin. don't do that
simply right click without dragging from any pin.
@hot jolt yep it doesn't show up for some reasons
this deserves more investigation
Is it possible that it's not implemented for blueprint(yet?) and only for like python or something?
The SequencerScripting plugin has a dependency on the Python Scripting one for sure
Let me check the source code
@hot jolt no, doesn't want to show up even if probably it should. It may be a bug of some sort.
Dang, well I guess I'll gave to report it
Thank you for your help though! It's nice to know it's probably not something I'm doing
what would be the best workaround for a float precision problem? im trying to make a looping counter (delay set on 0,1) and every second it makes a ticking noise. problem is when i get up to 2.7 it goes into 7+ decimals and ruins the counter
@radiant rapids can't you use a looping timer with 1 sec duration?
ruins the counter? you mean the sound duration or your show the number in a clock or something?
Its for cooking a grenade, so the amount of time held is sent to the grenade that sets the "time for detonation" - "held time" having it counting whole seconds would end up with it being off, atm ive made it so it changes the float value into a substring with 3 characters so it only shows 1 decimal, it works but "2.7" shows up twice but set the switch on 2.9 instead so it looks dumb but works and since its only behind the scenes i guess thats alright for now
@radiant rapids Sounds pretty complicated. You can have a looping timer set to 0.1 resolution, at each timer tick you add 1 to an int, then convert to float and divide by 10 to show it.
this, or you can multiply it and truncate it as int.. but marcos methode is more solid
Cant believe i did not think about that... my brain just doesnt cope well with math, Cheers @atomic salmon and @fossil linden
floats for precision don't work well.
yeah, realised that... actually dissapointed in myself that my brain couldnt clock i could just use a damn int instead and just count it differently
even converting your int back to a float and then dividing it by 10, you can end up with some odd numbers. i.e. 55 / 10 = 5.4888789
wierdness like that.
round doesn't always work good either because of that.
im just gonna use an int and keep it at that, without conversion. since the counter isnt shown visually only by audio so its alright
why's your timer set to 0.1 instead of just 1.0?
it takes 4 seconds for the grenade to explode and i dont want it to so you could hold it for 3.9 seconds, then throw it and it would take another second for it to explode
so why not just have the timer handle the explosion as well? counts to 4 if int =>4 explode, kill timer?
Thats what it does atm, it might be a weird setup, but the time held is counted on the player BP and then when you throw it sends the information to the spawned grenade and sets the detonation time to (4) - (held time)
couldn't you just use a notify on the spawned grenade? or access the grenade via a reference to trigger the explosion from the players timer?
@radiant rapids Why not simply set a timer of 4 seconds when the grenade is spawned? is the grenade is spawned when player holds some input or is it spawned when player throws the grenade?
note that you can cancel the timer when ever you want (using the timer handle given when it was created)
Works like this, i press a button, the grenade is spawned in my hand but only as a mesh. i hold right click the characters does the animation to get ready to throw and aim the grenade. When the animation is halfway through, it pauses and if i left click the pin is pulled and the grenade is active (this is when the counter starts), then when i release left click the grenade is spawned and the time held is sent to the grenade bp
I want my camera to tilt upwards so i can see my player when Iβm walking on a sloped terrain , instead of going through the terrain and blocking the player
Cool. You might want to stick with your solution if you don't want to change a whole lot. But I would move the whole grenade related things into it's own class. So player holds the actual grenade that is going to be exploded (not just a mesh). pulling the pin activates the 4 second timer in grenade blueprint. if throwing the grenade is cancelled, just destroy the grenade actor.
i used game time in seconds for putting hp regen on one second cd
but it doesn't seem to add hp at all
What's wrong in my graph
@stray island is your camera connected through a Spring Arm?
max hp is 250 atm and 1second variable is set to 0 by default, hp regen is 4
it should be adding 4 hp every 1 second
but doesn't work
Ya it is
Yeah, i realised i might have to change it into that later because the character BP is getting cluttered. For now i just want it to work. Thanks for your input and help.
so the Spring Arm should take care of the collision with the terrain. Strange it doesn't do it. In any case you can sense the slope of the terrain under your character and, if needed, adjust the Spring Arm accordingly.
Check that the collision sensing is enabled on your Spring Arm before trying any other solution.
you can always move parts of your character bp into components, i.e. i have a component for handling stats, and one for handling the inventory, just to keep the majority of that separate from the master bp and make it easier for me to track through to see what may be causing a issue in a particular section.
on your spring arm, make sure this is checked, should keep camera from clipping through the landscape:
Hey folks i am looking for a more reliable BP checker:
I have a ship and its sailors can stay and leave the ship. If the ship moves i want to move the sailors too. If the sailors leave the ship i want to move only the ship itself with all the sailors left on it. I could manage to do so but i think it might be a bad solution. Does anyone has something else to suggest?
you can attach sailors to ship. that way when you move the ship, sailors will be automatically moved with it.
@swift pewter typically using a Line Trace. On Hit you can show the widget, otherwise hide it.
The line trace can go from the camera along the direction of sight or from the center of the player body along its forward vector. It depends on your setup.
@swift pewter yes or if you want to optimize you can also do it on a lower frequency timer. It depends on which level and speed of interaction you expect.
show some code
You don't want to be creating a widget every tick, and you can't take the pins from one execution path to the other.
@worthy tendon hey thank you, i just managed to do so. works like a charm π
Store it in a variable from the overlap.
@swift pewter you create the widget in the actor but do not show it, then when the actor is hit by the line trace you ask the actor to show its widget. In this way it becomes very dynamic.
So each other can have its own widget and set of functions to interact with.
So create a function or custom event in the actor to show or hide the widget and call it from the line trace when that actor is hit.
Is there a way to compare a vector with another vector? i want to scale a model with a timeline and i want to destory the actor when the vector is basicly 0x 0z and 0y. but i can't find => or <= only =! and == *sadface
well > and < doesnt really makes sense
you can know if the Size is < or > tho
so Vector1.Size < Vecto2.Size
yea just when i typed it i realized i could use branch and ask if == is true or not
but these scale thingys are confusing :/
Have another difficult question:
I have 5 Tiles. The pawn is currently on the center tile. According to the type of tile below it will move the pawn to the next tile. Issue is the main Tile with the arrow can be Rotatet. If not rotatet, it will always move the pawn to "Target1". If once Rotatet it should move the pawn to "Target2" and so on. How can i calculate according to the tiles rotation where the pawn has to move to?
Note: I work also with custom coordinates. Each tile has a intvector coordinates which i would need to update on the pawn too. But possibly just adding a box collision to next tile with its coordinates to update should be enought
This set up is still creating a new widget every tick. You want some logic in there that prevents the creation if it already exists (store the widget reference in a variable and do a validated get / isvalid check before the creation). You should also notify the actor that the player is no longer looking at the object so it can remove the widget.
In my own game I did something similar by storing the hit actor reference on the player controller, and did a check to see if the current hit actor is == stored actor, and if so, do nothing. If the stored actor != hit actor, then notify the stored actor they are no longer being looked at.
im making a fighting game
and i want to make a fighter bio menu
and the info changes based on the selected fighter
Do i make a Structure For Each fighter, and if i do how do i get it to switch between structures
im still new to UE4 π
I'd go with either a Data Table or a Map variable with key Name
Then look it up by some sort of internal name like "fighter1"
Hi ue4 people, just joined the server. if i have a question do I post it just here? Or somewhere else ? Kinda new to discord
it depends on what your problem relates too
if you have problems or questions with blueprints you post here in #blueprint
if you have problems with paper 2d, youd post questions in #paper-2d
im pretty sure thats how it works
The row name you pick is totally up to you, make a convention
got it !
You can iterate all rows from either a map or data table
So i dont make it the fighter names
You can name the row whatever you want, but that will be the reference to the row when you do something like "Get Data Table Row" - so it's best to name the rows based on a convention that you should create and follow.
is this a bad name convention?
should i use Fighter 1 instead?
this is what my datatable consists of
Im sure this is an easy answer but cant find anything that helps me out there. I have created a flickering spot light and would like it to start flickering at a certain frame in my sequence. How can i achieve this ? Thanks in advance for any help !
Connect Begin Play's execution path to the "Play" path on your timeline.
I have tried this but it only plays the flicker when i play the level, not when i play my sequence, is ther a way to start the event in the sequence ?
Sorry read that wrong
Looks like you can create an "Event" track on the sequencer, then you can add a key where you want and then double click it to get into a blueprint editor. From there I imagine you'd need to get a reference to your light to call the custom event.
From what I see just mucking about with it, you won't see the effect until you actually render the cinematic, as changes to light intensity does not appear to be previewable in the sequencer.
how can i add to an array of bp classes to all of them a certain variable?
Wow 4.26 is amazing. Blueprint structs and animation retargeting are both much more stable. As a matter of fact I haven't had any crashes yet with animation retargeting or modifying blueprint structs.
I β€οΈ UE
Would need to be before the cast otherwise it may fail to execute.
This is how I had mine set up
Hello everyone, I have a question, how do I disable a keyboard input only if another keyboard is pressed? (I donβt want to be able to run if I am crouching )
Electronic Nodes
You need to, no pun intended, set a Boolean when you're crouching and then check to see if it is set before allowing the player to run.
Ok thx
The branch you have right now is essentially comparing a reference of an object (hit actor) to itself (hit actor casted to BP_BaseItem) which means it would always return true since they are still the same actor. You need to set a variable with the actor being looked at after the cast succeeds, and then compare that variable with the hit actor before the cast. In mine, I'm checking to see if the "Viewing Actor" is defined, and if it is, then I check if it's the same actor or not.
Hello there. I have a question regarding custom movement modes in Blueprints. When switching to my custom mode, the collision of the Capsule is gone. Am I supposed to implement my own logic to detect collision?
Hey not sure if anyone can help, I'm having trouble with a material instance on my procedural mesh. It doesn't seem to work at all and just shows the default material.
You need to assign the material to the mesh after creating it.
How do I do that
nvm, I was thinking of something else, your code should already cover that
Better but you need to set the New Var 0 as the hit actor.
Ye I'm not sure what is wrong. That code is on my beginplay so maybe I do have to reassign it anyway?
Begin Play should be fine.
Hi i'm super newb here and in ue4, i just created a ball with floating physics inside a closed room (1 person shooter, i added a roof). i want it to do something every time it touches a wall. i tried to use overlap and test print but i get a message only in the first hit
what do i do from here?
new var 0 is not being defined anywhere. it needs to be set to the "hit actor" value after you've told the value stored in "new var 0" that the player is not looking at it.
Hello all, anyone know of a solution to having a character (In my case a ball) turn based on the rotation of the camera? Example: Holding W to move forward, rotate camera 180 to look behind, ball slows and starts going in the direction your now facing?
Thanks in advance
You can't do this.
You're trying to reference something that you haven't gotten a reference of yet.
Hi everyone, I'm trying to do an Ue4 version of a boardgame. I'm struggling with cards, shuffle & deal. As anyone a link or tutorial to help me? So far, all my cards are Blueprints from differents class, so it's difficult to make random or spawn. Thks!
I'm gunna assume you have the camera movement set up already... This should work.
@dawn gazelle I do, it's the basic Mouse Y > Add controller Pitch Input
and vice versa
I'll give that a go now1
If it's the wrong direction like forward is moving right, then swap the "Get Forward Vector" and "Get Right Vector" nodes.
does anyone have a solution to my procedural mesh material problem?
@dawn gazelle What is the X node that the Axis value is going into?
I am a noob sorry
float * float or float * vector
Okay thank you!
Hello everyone, any advice on doing some arcade hover vehicle movement ? Any video or tutorial on this topic would be welcomed.
I'm thinking of saying arcade as I don't want it to be too expensive on the simulation part. I've found some tutorials that use 4 line traces and are pure physics based but if can be done without physics then awesome.
@dawn gazelle Works perfectly, thank you!
Good stuff π
I knew it had something to do wit hthe Vectors, just had no idea how to impliment it xD
any idea why UE4 would return 0-1 = 1 ?
What type of variable?
Getting -1 on my end. Got some example code where it's happening?
i was too but for some reason now im getting 1
its not rocket science.... but... ug....
even reversed the inputs, still getting 1.
chokes ue4
why is my sprinting system not working?
Did you print out the value coming out of that subtraction?
pressed only fires once
i set a boolean with my shift key for running, so if its true, the character runs while shift hasn't been released, if shift is released it toggles the boolean back to false and they stop running.
Not a very clear way of doing it. You should set a boolean variable when your character is crouching, called say, "IsCrouching". This can be set whenever you press the crouch button, and unset when you release it. Then in your left shift call, instead of checking if the key is down, just check IsCrouching == False.
on a totally unrelated note - Alien Isolation is todays free game. I wanted to try that one but never bought it.
@dawn gazelle something hickuped in the engine, restarted it and now its returning -1 again.
though its still not removing the item from the array, its at least getting the count right now lol...
index 0 is the first array element right?
is there a way to print out a arrays content wihout a loop like dumping the array to screen?
yes, 0 is the first element.
Is it possible to setup data structures such as binary trees using BP?
Hi. I am trying to create modular widget text by using the editable text value from one of my blueprints however i keep getting an access none error in the widget blueprints and im not entirely sure what the solution to resolve this is.
Can you provide the exact error message?
You have to expose your var on spawn for the widget
Then edit it when you create it
i am a bit confused what you mean by exposing the variable? are you meaning i have to make it public?
This variable is not being set
If you set it to "expose on spawn", you can feed in a reference to "self" on this node:
you may think the constructor argument in meaning of expose on spawn
i've ran into a intresting problem.... items with physic properties 'placed' into the world aren't using their weight, but items spawned into the world are, any ideas what would cause that?
@orchid garden How do you setup the new actor location? Are you enabling Sweep or Teleport parameter?
for the things dropped?
still, the object placed in the world and the one spawned are one in the same, but while one has the 20kg weight (Spawned) the other (placed) doesn't as shown in the video
where do you setup the properties? in the world editor or class defaults?
in the object class defaults.
Hello all again, can someone briefly explain why this doesn't work? I just want my ball to jump up when it hits the overlap box, but it doesnt
what is your placed method? isn't that are you spawning a new object while you placing things?
i mean if you want to place somethings you shouldn't need to destroy it you can basically change the actor's location anyway
okay can you check the simulate physics property in world editor?
okay can you increase the z value of mesh and see if it's falls or not? that is very strange problem....
yep they fall, bounce about, (just like shown in video), but only the dropped ones (spawned) have the 20kg weight and can't be moved by the player bumping into them.
may you can the collision handle overriding
the red sphere interacts with the player only, the object itself interacts with all world objects.
happens with default collision as well.
I mean this one, it should always spawn, also can you change different of spawn locations(increased Z Value) to test it out? may your character is blocking while your spawning it at the same location
also i remind that you are using the sphere's collision, not the static mesh's one
its being spawned 50 units infront of the player then a random impulse being added to it from 3000-5000
the spawned object is getting the weight added for the physics. its the placed ones that seem to be ignoring it.
can you check the simulating physics node in the tick for spawned actors? https://docs.unrealengine.com/en-US/BlueprintAPI/Physics/IsSimulatingPhysics/index.html
Is Simulating Physics
i watched the video right now and i think the spawned objects is not simulating physics anyway, just spawns though it
do spwaned actors falling to the ground?
also you may check pressing F8 to unpossess from the character in PIE and check spawned objects
state of collisions etc...
just did some fiddling and they have physics, its just ignoring the player.
can you write a simple print stringon the event that red sphere things overlapped?
i mean let's test that out as simple
do they blocking each other? or player? we need to know that...
F8 is useful key if you want to see the properties of spawned actors in playing on PIE
its the sphere causing the issue.
the sphere was to keep the random physics bug of launching the character into the sky from happening... but on spawning the object the sphere stops the player from being able to move the object.
so i litterally have 2 physics bugs. physics weight either isn't being applied or isn't being applied properly (seriously lower value then 20kg) and the sphere.
cause 20kg should be around 53.58lbs, something someone shouldn't be able to move just bumping into it.
you don't need to use sphere as a extra collision if you want to move the object though static mesh
.<
There is a physics bug that when running into a physics object it can randomly launch your character into the air, and not just a littlebit, like he just got a rocket shot up his butt.
the collision sphere was to stop that bug.
works fine with NON-Spawned objects.
you should overlap the character for spawned actors, therefore you don't need it...
and you set up the proper values for the applying impulse and mass
if your spawned actor overlaps your pawn collision channel you can still generate overlap events
what happens when you set it to overlap:
check your collision settings under collision presets @orchid garden
π
can you show your collision presets for static mesh component?
its on default right now. Been testing the different presets.
if i set it to any overlap preset i get the above error.
are you expanded the menu?
yes.
is there a way to get the state machine type functionality from a animbp but not in an animbp? I am wanting to manage the characters speed based on multiple things and keeping track of bools seems like the wrong way lol. i got crouching, walking (default), sprinting, and dashing (super speed). and they should all be exclusive and only certain ones can transition into another. I cant figure out a away without creating spaghetti code
@minor lynx spaghetti code?
Trying to do an fps spectator mode using target with blend. When player dies and observes an alive player it jitters on yaw turns and pitches. Anyone how to resolve this?
yeah now add 2 more levels to that for crouch speed and super speed π @orchid garden it gets messy. its 100% doable i just feel like some kind of state machine would make things so much cleaner
yeah but you also have to determine if you can enter those states even
my crouch speed is the same as walk so no issue there.
could always use a int to track the current speed, 0 walk, 1 jog, 2 run, 3 superspeed.
or even a enum
@dawn gazelle @zealous moth Finally sorted my problem after researching the things you brought up earlier thanks very much for your help
@minor lynx I would make a macro that outputs a pin for each possible state, and trigger it every time the state is modified
You can create base object, call it movement state. then make sub classes like walk state and run state. You will need a few functions, (enter, handle input and maybe an exit) function. then override them in sub classes. you then call handle input function for the current state. when ever you change the current state you will have to call enter and exit functions accordingly.
basically create the state machine yourself π
How can i change texte with blueprint?
@abstract summit in the details panel, with the text object selected, check off "Is Variable". Then in the BP you can drag it into the graph and set it's text.
@minor lynx this is a quick example of something I do:
here, make sure it's a variable, you can also give it a more meaningful name
i think i got an idea 1min
is variable case must be uncheck?
must be checked.
When it is checked, you can refer to it, and modify its properties in the bp
i got this but upon doing this i realize my problem is not quite with this lol
@minor lynx the important bit is getting a clean way to switch on state without rewriting a bunch of branches and what not each time. It's not the worst thing in the world if there's a lot of crazy branches under the hood.
This pic you've shown seems to be a very roundabout way of saying "If new state != current state then set current state = new state"
so im quickly coming to the conclusion unreal engine can't properly handle physics for small objects.
yeah thats why i said this isnt going to solve my problem hehe i think i got some thinking to do thanks
im having issues with small physics objects when i player 'walks' onto them, they like to make the player bounce around or launch into the air..... imagine stepping on a lego and having it do that to you instead of just making your foot hurt....
seems anything thats under the 'step' height is prone to that unless it has 60kg weight or higher.
imagine a coffee cup weighing 150lbs....
characters kinda do their own thing when it comes to physics
what is the correct forumla for making the character move to a point directly behind them. +/- on that float doesnt seem to make a difference
@karmic pebble Add it's current location to the vector you get after the Vector*Float
also helps when you use the damn actor and not the mesh thats rotated 90 degrees. I knew i was missing something.
Thank you @maiden wadi, been sick the last few days and my head is not on still. π
i had a problem where my camera goes through the slopped terrains when , now i fixed it but not the way i want , now it just zooms to the player when the player is in slope , i want the camera to tilt upward instead without zoomings
Hello, would anyone know how to use "Export fbx" in blueprints? The above code generates a "true" return value, but i dont see the actual fbx file anywhere. I found find the documentation for it on unreals website but its still confusing haha. Thanks for any help!
perhaps this screenshots better lol
Can any1 point me in the direction of creating a timeline that I can dynamically set the length of (based on an input var)?
Could always make your own. Timelines are just actor components.
I have a primarydataAsset, who seem to need to be recompiled/saved every time i start the editor. (it contain a simple list). is there something special to do to "save" it definitively ?
@autumn hawk I don't think it is possible simply because of how they work. They appear as single nodes but they are set as complex functions.
@stray island what you are looking for is a physics based camera. I made one sometime ago and I am pushing it in the epic store. Your only other alternative is to have a separated camera with an offset calculation much like Matthew Wadstein's 2d sidescroller video.
Assasins creed does it too when i go down from terrain
Alright i will try out , and u can direct me if u put one in store
Okay so hear me out... Would it be better that I store player's cash balance in the player state or the game state. Because both can be accessed by all clients and the server. Players would be able to spend their balance and increase it and that would be reflected to wherever it's stored. Is there any major difference or downsides to using one or the other?
Thanks Zanet and Authaer, I did find one solution where I set a static timeline to 1s then use Set Play Rate to dynamically adjust length.
Is there any major differences between player state and game state other than the fact that one is owned by the player
GameState holds match information, PlayerState holds information of the player that holds it
Just use them how they make sense
If i want a current match score or all connected players i would store that in GameState
If i want player ID, Name... i would store that in PlayerState
So store player balance in the game state?
or store balance, health and other stuff in the player state because it belongs to the player
@dreamy ice PlayerState would be for currency that belongs to one player. You'd only put that in GameState if it was a currency that all players could use. Realistically it doesn't matter. But Gamestate is often meant to be game wide replicated variables. PlayerStates are things very specific to that one player. It's largely organizational.
That makes a ton of sense. Thanks.
Don't store Health variables in PlayerState
Imagine PlayerState for variables that are always common to yourself, even if you change Character
If my Character dies, my ID is still gonna be the same, same with my Name
What if I need the other players to know my health?
You could then yeah, but in this case of course you would want it reset when you respawn or so for example
Yeah so everytime my health is updated update it in the playerstate.
I don't know if i would use playerstate for that personally tho
What would you do?
It would work with Widget Components, you could just pass the reference of the character that created the Widget on the server and use its values on the Health Bar
Health variable and Max Health would be replicated in this case
So the servers knows who owns the widget you're looking at and has their references stored, when the Health gets modifies for example it will modify the Widget too since it's linked to that Character's Health
But honestly
oooh. okay. Didn't think about doing things that way.
You could store stats in Player State too
Nothing wrong with that
It really depends on how you find yourself better with things
There are multiple ways to do things, like always
Another one you may wanna consider is Game Instance
If you change level, Variables will remain the same
You can also get a reference to the Pawn from the PlayerState as well. Makes it easy to get replicated variables on any machine to the correlating pawn.
Really depends on your design.
Alrighty. There are a good few things I'll need showing for other players so I may just do the widget components with the character references. Seems itll keep things a bit cleaner.
my stats are stored in a actor component, and the widget is updated via the component.
i do have a question that maybe you know the answer to @maiden wadi , i need to store the static mesh of a object, then replace that mesh with another for a period of time, then restore the original, would using a reference of the original mesh work for that or would it be overwritten when i replace the mesh?
If you make an empty StaticMesh pointer, and get the original mesh to save in that pointer, then change that component's mesh, you can set it back to the original from that pointer.
i have actors that consist of multiple body parts, head, chest, arms, legs, feet. and sometimes the body part needs replaced with another for equipment.
so im trying to figure out the best way to handle that... considering there is a male and female that will be using the same master character
something like?
The two different ways I could see are probably storing static mesh pointers to each mesh in the master class and populating them in the base classes for the different types. So if you equip something, it'll use that equip thing there, but upon unequipping, it can use that pointer to change it back to the 'default'. Alternatively. Depending on how you're doing equipment you could specify different meshes for defaults in datatables where your equipment stuff is, if you're doing it that way.
You'd probably want this one, if you're just swapping meshes inside of an already existing component.
using this to swap the meshes:
Ah. Same thing, just this one instead.
okay i'll give that a go, i can populate them during construction in the child blueprints.
ty @maiden wadi
I am so insanely shocked at how much performance sweeping movement takes. :/
im finding some things no matter how hard you try to optimize just like to take a bite out of performance.
but could be because im doing everything with blueprints and no c++
500 simple actors using VInterpToConstant with a simple capsule collision and sweeping movement? 55FPS. Disable collision on the capsule? At 55 FPS, that same 500 number goes to 2300. Same object, just no collision event from the sweep.
damn
and here im happy with 50 little guys walking about in a single scene with good fps lol...
i think i spend more time putting in reroute nodes then working on the code ... lol
so... if Characters can properly effect physic objects, why do physics objects effect characters? you'd think that would of been something with physics that the unreal team would of thought about, but i guess not, went hunting for a answer to my problem and found it... just can't use the physics in the game... have to code my own to make it work with the character... seems to be what everyones doing... i was hoping to rather use the internal physics but... its not looking like its possible.
which is odd to say the least as i can have physics on the character clothing and it works properly with the character... just not world objects...
i.e. i can litterally stand on top of a coffee cup and ride it across the map due to the physics not reacting the the character properly.
it sees the character as zero weight. is why the character launches off into the sky sometimes too like he has a rocket strapped to his back lol.
That's odd, like the physics object is able to be stood on and the character gets carried along with it?
yep
simple test - make a third person project, make a small physics item that is smaller then the character step height, throw a few of them in the little demo scene, and walk up on them.
i've been launched into the air, rode them, been totally turned around by bumping into them... all kinda of wierdness.
can even have the same thing happen in the first person shooter test scene, only difference i found was i didn't get spun by them in it.
Hmm. I wonder if you could maybe test the event hits from the character capsule, get the kg count and apply sideways impulse on the object if it's too small? Like someone jumping on something and it slipping out from under them.
yeah thats what people are doing that i could find to resolve it, overlaps and bumps.
found posts back to 2016 so its been around for awhile.
i wanted to get a nice effect like in fallout, where a bunch of stuff can be dumped out on the floor infront of you and it moves the stuff around like if your wading through them.
only other thing i could think of doing is making some physics balls and attaching them to the joints of the player, have them not visible in game, and see if that would do the trick.
lol just noticed there is a physics channel here.
Who knows, maybe Chaos will solve some of that. I really want to use 4.26.. but that interface bug is really messed up.
yeah im gonna give them time to get the main bugs out of it before i try 4.26
How would one do a headbob in 4.26+? They deprecated Camera Shake
It's just Start and Stop camera shake now and start camera shake doesn't work as Client Play Camera Shake did
Not even sure about that before 4.26. I do all of my camera effects with actual camera movements so as to affect aiming and such as well.
Well can you tell me how to do headbob please for first person?
Okay so how would one go about creating an automatic rifle without creating an infinite loop. For some reason im struggling
I've just created a very simple actor BP (a platform) that when my character collide with it, the actor BP is moving. Though I'd like when the platform reaches the end, then it reverses.
I can have a loop if I click on "Loop" in the timeline but the platform reaches the end then instantly teleport at the beginning. I'd like a reverse.
maybe just make a custom event you call when finished that just plugs into reverse?
There's a Reverse node for a reason
or loop it in to itself^
How expensive are linetraces?
How so ? I just see a simple loop setting in the timeline :
( that is what I've used but it jumps directly from the end to the start )
well what i mean is that take the "Finished" execution pin and just wrap it into the "Reverse"
or as I said, make a custom event that plugs into the reverse and then call that function when the timeline is finished
so maybe something like this
doesn't work π¦
I did this :
I tried to plug on Reverse on the second timeline, below
I also inverted the value in the beginning and in the end of the timeline
but it doesn't work
my platform moves then is just stuck
that is not at all
what i mean
take the reverse custom even
and plug it into the timeline even which you already have
event*
cause you already have a functioning timeline you can just use that instead of attempting to make a new timeline
that's just wasteful
I'm not sure to understand. Like this ?
almost there!
now on your original timeline
call the reverse custom event
off of the 'Finished"
Mh, there is something weird. The plaforms moves : https://gyazo.com/9bf26564125e78c1c70190d224297cde
but then, it is stuck, he comes back a bit then move again, stuck, etc, etc : https://gyazo.com/06ece8b6ba87f8387d2b180b2520d09d
can you show me your blueprint again so i can see if it's right?
can you attempt to get out of the collision box and record what happens?
Well, if I delete it, it just happens nothin
hm im going to assume you dont have an "On Component End Overlap" event?
well, i wanna see what happens; click on "Box" under components and make an "On Component End Overlap"
and off the execution pin just call the reverse custom event
It is approximately as weird, lol : https://gyazo.com/8fe742c3ff05824f175b73a75fcfb20f
it seems to snap into place interestingly enough
and yeah what i think the cause of that is
in the 2nd video
it attempts to reverse but since you're in the box it goes back up
i assume the way you're doing it is to place an actor in the level that has the stuff
you could possibly the code in the level blueprint
put the code***
I made it super big, just ike this, just to be sure it works... but it collapse from too high so then comes back, I think
yeah cause it's parented to the box so it moves with it
well the mesh is the parent of the collision box
should i say
so it'll attempt to come back down but then just hit the player and play it again
ill make something really quick and show you what im talking about having it in the level blueprint
I made a more accurate box. Now it does this : https://gyazo.com/ca63a094828c7ff33086a99251f9c1ca
( I deleted the Event EndOverlap )
And then :
that's really odd hm
so it does reverse which is obviously what you're going for i guess?
but then it does jump straight back to the beginning
this is it
and it doesn't reverse immediatly when he reaches the end of the course, also...
does it stay stuck in the air after it bouncing back up?
ohhhhhh
wait wait
i was looking back
and change the reverse node to not connect to the "Reverse From End" but just the "Reverse"
try that and see what happens maybe?
Actually, it rises, it stuck for 2-3 sec, it goes down, until under the ground, then teleport up above, stuck 2-3 sec, the goes down, etc, etc
ok, I try
not bad at all :
I just don't know why it stops a bit once up above but, well...
apart from this, it works just like I want π
I must leave
If you know why it stops, tell me
but it's pretty good
thank you for the help
your timeline is probably longer in length and it has to go through the entire timeline before it reverses
Hi. How do you force the editor to update during the execution of the blueprint to get the latest infomation?
what do you mean? see blueprint values or rerun the script
you need to use the construction script graph in BP for it to run code in the editor, not during runtime
I'm making an Editor Utility Widget
My goal is to record the world location of an actor frame by frame in a sequencer
Like this: Set it to frame 1 -> record the location -> set it to frame 2 -> record the location.... and so on
Somehow, all the location recorded is the one at the first frame
Edit: It's the first frame
Because you're not storing the saved locations?
I don't think so. Even just print it out wont change the result
My bad, it's the first frame. Not the last
Hi there, I've got a general blueprints questions (or even a global coding one, but I'm asking there for blueprints purpose) : I've got a custom event with a delay in it. Another event calls this event, and some functions after that. However all of the functions are called in a blink, but I'd like to wait the delay of the first event is finished before calling next functions (I hope it's clear enough to understand my question).
So to resume : is there a way to wait for an event is "finished" before calling next functions ? Or is this the normal way this works and I have to set up a delay manually ?
A screenshot to clarify : On CloseMenu call, I'd like to wait until close sub submenu has finished before playing the animation. But Close SubSubmenu has two delays in it, and their length can vary.
(oh and in case it's important, I'm in a widgetBP event graph)
How do I get the direction of flight of a projectile?
Is it just projectile->get velocity?
If you're waiting for widget animations to complete, you may want to use this node instead as it gives you an execution path for when it finishes.
Not exactly, the event uses an animation, spawns a sound, removes a widget from parent, sets some variables, calls another function and then is finished.
(also I tried with this node but for any reason I encountered limitations in my setup)
You need to use asynchronous functions like the one above to achieve something like that as you need something to do some kind of call that it's finished. What is it that you're wanting to wait to finish?
And my events use a delay, that's why I don't use functions
Actually I've got a menu, with potentials submenu and sub-submenu. When I call "close menu" event (I want the whole menu to be close), I want to wait until subsubmenu and submenu are closed (if they exist) before to close the main menu.
Please note that I actually found a workaround, manually setting another delay in the close menu event, but I'm asking is there would be another more "conventional" way to achieve this. Perhaps not π
The conventional way is to not use delays, instead use async tasks, or perhaps bind events to things happening if they support it. Without knowing specifically what type of blueprint nodes you're trying to use I can't be much help. As an example, the below could be used to determine when an animation is finished rather than arbitrarily setting a delay waiting for it to complete.
Oh that's great ! I didn't mind such node even exist π Thanks a lot. Here is what the Close SubMenu event looks like.
Yeah so the example above would help you eliminate the delay node you're using as you can plug in your "opening sub menu" animation variable into it. You can also unbind events to the same event delegate if you're no longer needing to listen to animation happening (just in case you reuse certain animations for different things)
Yep that definitely could help me clarify the thing. Thanks a lot !
Also subsidiary question on the same blueprint : I've got 4 event made the same way : Close submenu, close subsubmenu, open submenu, open subsubmenu, but for some reason open submenu is considered as a function, not a simple event. Those 4 events are interface functions and have no difference in the interface setup (but their inputs)
When I try to edit Open SubMenu, it opens in a new function tab, not in the main event graph
That would give you the speed of the projectile (can return really big numbers in x y and z). Get forward vector is useful if you're looking specifically for the forward direction of the actor (returns values between -1 and 1 on x y and z)
Event Graph
More specifically this node.
Specific function graph
Guys maybe somebody know how to put this white ball to the side of the door like on the next photo
I forgot how i made
No, no return node
Did you add a socket on your static mesh ?
Simply a relative location of the static mesh ? The white ball represents the defaultsceneroot
I have to admit I don't see many things with your only 2 screenshots. The second door looks scaled along X
how to scaled it along x&
I think you may have changed the return value after first implementing it into your blueprint. Copy out everything in the function into your event graph, then right click on the interface on the left menu and select convert function to event then hook up what you copied out to it.
Set relative scale to something different than 1 in X @hardy sphinx
I just can't :/
Create a new temporary interface and implement it, copy what code you want hooked up to it. Delete old one. Rename new one same as old.
Yeah that could be efficient. For now I'll let the setup as is since it works. I'll clean this before releasing. Thanks for your advice !
(also I noticed Open SubMenu is the only one of the 4 that can be duplicated, the other functions cannot)
Anyone know how to get object references of the objects spawned by the sequencer into level?
https://i.imgur.com/cFMdF9i.png
Is something like this possible? I want to feed a value forward based on a condition without going into a branch
Select?
@dawn gazelle ayyy. Perfect, thanks!
Hey everyone, I'm new to unreal and I'm working on my first project (chess)
So far, I have an array index to spread out the tiles, color them correctly and place the pieces however ive got no mechanics at all.
I'm trying to figure out how exactly i should go about giving each piece movement rules and stuff.
I seem to be a little stuck with my grid. When I am clicking i should see numbers related to which square of the board i clicked however the numbers are weird and range into negatives and stuff. Can anyone give me any general advice as to keep my workflow non destructive and stuff, because now I just feel overwhelemed and like I should give up. But I don't want to.
Also if anyone could take any time to try help me get back on track i'd be really thankful.
does anyone know how i would go about making an online leaderboard or scoreboard? i just want to send some info strings (username, score) to a webside and recieve the top player score( username, score)
There is a specific way to do this using steam, but there are many plugins available on the epic market
sadness
Providing some screenshots could help us to help you π
ive tried looking up plugins, but don't see any, could you point me in the right direction lol
I would but I didn't want to spam up the discord :p gimme a sec
I never made one myself, but look for "leaderboard" in the market
Honestly I can only suggest you to look for plugins and/or tutorials.
sounds like asking to buy a car without saying what for a car π
So i use this sytem and when i output the index i click on i get weird ass numbers
pardon my comment names, not edited them yet
Where do you search for the index ? And how do you call them ?
I made a click function that gets the last index selected and just prints it to the screen but I removed it because it wasn't working properly and I didn't wanna break anything else. Hold on I'll grab it back up.
If you're wanting to reference the tiles like that, wouldn't it be better to have them as their own Actor rather than just static meshes added to your board? If you had them as their own actor, you could populate them with data as well, such as its co-ordinate on the board (useful for calculating valid moves), if the space is occupied, etc.
First of all, make functions. that way you don't get lost when you want to fix something or change something. believe me, It will help you to stay focused.
You could do the same with the pieces, so that you can define the possible moves, mesh and material of each piece added
how does one trigger an event that plays a looping timeline on a bp using sequencer so that it can be recorded without entering playmode?
I have a light flicker BP actor that has a timeline but when adding a event key and calling my function that calls Play on the timeline it does nothing
it works fine if I press simulate in the Play Options but not in the playback of Sequencer
From what I've seen mucking about with the sequencer, you won't see the effect until you actually render the cinematic, as changes to light intensity does not appear to be previewable while using the sequencer
How do you get objects reference of the object spawned by sequencer in level?
If you're spawning from an event, you can set the reference in a variable. Any future events should be able to reference it.
I mean the object that I set as spawnables in sequencer
I'm not following. Could you provide a screenshot of what it is you're doing to spawn an actor?
Hi, any idea how i would create a game pause while holding a key down? Kinda like in Dishonored or other immersive sims where you can choose a weapon/equipment while the time is stopped.
My initial approach is this and it seems the moment I pause the game it suddenly stops reading inputs, is there a way to change/get around that?
You can use Global time Dilation (set to 0.001) and custom time dilation to inverse (1000) on the actors you don't want to be affected (ie your pawn and widget)
What exactly would that do? Slow down time for everything but not for the player? Would not that make player for example fall while everything else is stopped?
Exactly, global time dilation sets the rate of the elapsing time (should be >0 ), and custom time dilation allows you to set the dilation by actor.
But i don't want the actor to move at different time speed then the rest of the environment, would then just setting the inventory/menu widget to normal time dilation?
Sorry if that sounds dumb, but unreal node documentation tells me basically nothing >.>
Shows how you can use Sequencer to Spawn Actors in your scenes regardless of level.
I was following that tut to spawn objects in level
That's true the documentation is evasive... I guess the cursor is not affected by the time dilation. How are your widgets spawned ?
I have not yet gotten to that part, started from the pause mechanic
But probably the same way any pause menu would be spawned, not sure yet tho
There's an option you can set on the input axis. Same goes for any other inputs you may want to use on the player controller or character.
This could help you though. Actors have the ability to tick even when game is paused.
I can confirm cursor is not affected by pause
The thing is it consumes that input but the next tick it does not register the input so it unpauses it as if the key is not being held down
Yeah, the camera does not seem to be affected by time dilation either for some reason
You want to use "Execute when Paused"
can you show your click/release setup ?
This is the click/release, i just mapped the button(s) to an axis mapping and whenever the axis val is not 0 it should keep the game paused
Which axis do yo use ?
Imo prefer using an input event (button) pressed/released
I am trying to recreate dishonoreds radial menu basically
Yeah that's not the good way imo. Use Action Mapping with Q or E. This will create an event with "pressed" and "released" exec outputs.
Even still what you were doing would work. You just need to set the input to "Executes while paused" and it would work.
Yeah, but I am gonna use the time dilation because it just looks cooler x)
(Harder to setup too !)
Eh, difficulty won't stop me from at least trying
Good mentality there ^^
I wonder... would it be faster to set a variable for a reference or is it "faster" to just to try get pawn owner and then do its stuff ?
Create your event in the sequencer, add an actor (or character) parameter as an input.
Then right click on your event go to properties, and you can specify the actor/character to the event.
Hey, not sure if this is right channel to put this in, so hopefully someone could direct me. I have Widget component spawned on a NPC, but the character seems to have an outline which masks the text. any idea why would this be happening ?https://gyazo.com/b19e563fd907b22f4cc7c8592c8e735b
Thank you , but are there any other ways? Since I'll have to revisit all the cutscene I've made
Any depth/customdepth issue ?
Not sure, I've never used the sequencer myself.
Custom depth used on the NPC for the outline
seems to be the issue origin
Try deactivate custom depth and check again
Thanks anyway. I'll dig a little more.
problem still persists
what about disabling your post process volume ?
Havent got one in the level yet
where is your post process outline material set up ?
could you deactivate/remove it to check ?
The outline is another mesh that is set to the objects mesh and set to an outline material ( I didn't make it, It was part of another project)
Does the problem persist if you remove or hide this another mesh ? I guess something is wrong with the outline material vs the widget rendering
Try tweaking ZOrder on your widget (some positive value)
anyone know how to do the eff in pokemon when u hit the pokemon there is a white flashlight indicates that u hit the pokemon
I would say particle effect, yes
if the outline mesh isn't being used i'd hide it while not in use if its persistent on the character.
Ok but does it mess up with the text widget even if hidden ?
oops my bad you were trying to help @lusty escarp i meant that for him, if the mesh is hidden it shouldn't render in the scene so it shouldn't effect the widget.
yeah found the reason, Thanks guys
Oh I though that was @lusty escarp writing, my bad π
wonky Tuesdays
what was your final solution?
Yeah I'm curious too
There was a customDepth Pass on the Main Character which has been enabled by previous developer for some reason, The character never used an outline for themselves, so odd
Glad you found out though !
yeah some do that
watched a little 'sword and shield' pokemon, and the fight stuff in it is all particles
battle of hoenn seems to use the same thing
particle effects
i'd tell ya more but i haven't used particles yet.
there was a free set of them... donno if there is anything that shows how to use them though in it...
which free set ?
please help someone?
what was ur question
i want that the player can take a box to the inventory and than replace it in another place
and i dont know how to make this system
He means place it back down in the world.
like minecraft
@shadow saddle in the learn tab of the epic launcher, scroll down to Legacy Samples, and there is a project in there on particle effects
@frank elk I recommend giving this a serious watch and follow for the UI part at least.https://www.youtube.com/watch?v=wyC5vl64V9k
Sr Training Content Creator Wes Bunn shows you how to add drag and drop elements to your UI using UMG. This stream is a must see if your game uses an inventory system and you want a fancy interface for managing it!
do you already have a inventory built?
not realy
i want to place it in the game not in another inventory
is 2D game
Many of you have requested a way to leave me a tip so I've created a PayPal and a Patreon.
PayPal: https://paypal.me/reidschannel?locale.x=en_US Patreon: https://www.patreon.com/reidtreharne
Discord: https://discord.gg/PdvudWx
Hello! In this video I'll be showing you how to create the basics for a drag and drop inventory system. If you have any ...
so you just want to click on something and have it picked up and follow the curosr, then place in the new spot the player clicks?
i think
this is wahat u want
drag from bag
and put in world
ignore the thumnail
yes
click the video and see urself
your going to need drag and drop events setup for interaction, watch that video welhang gave you it'll give you the basics of drag and drop functionality.
thanks i will comeback soon for questions after the video
What's the difference between Macro and function?
Macto seems to be able to have more than one exec output, is that just that?
one major difference is a macro can only have one output node, where a function can have multiple return nodes.
Functions can also return multiple execution pins but its not very possible in blueprint
o.O
Other major difference is you could have be able to use latent functions inside the macro, but personally never tried
Functions cannot use delay and time nodes, macro can
Ah I see, MAcro doesnt really have to have exec output/input so i can put just some maths bs into it
Pure functions also can return variables only
there is also a difference since macro act just as a big collapsed graph, function is called from another point
well... to wrap it up in a nutshell.... a macro is basically a collapsed node you can use inside other functions.
hehe @lapis path we both decided to do the quick n' dirty explanation π
That's how I learned that π
Hey i'm back, How would I bind the PlayerCharacter in a Sequence ? at the moment it is just a SkeletalMeshComponent
How exactly are the notify Begin and End pins used on Play Montage? Is it triggered every time you hit a notify, allowing you to run something custom that isn't the predefined notify event?
Like an anonymous function or something?
hello, how do i make the actor fall, but when touches the ground is destroys itself?
and when player touches it it adds a point
and also destroys itself
If the object is simulating physics, gravity will make it fall. No need to add a force.
it doesn't have any physics
Then adding a force won't do anything.
or how do i add physics?
Well, first choose. If it's something that should fall realistically, it wants physics. If it's something that falls gradually at a constant rate you choose, you don't use physics.
A timeline could do the trick
i want to spawn the actor here
i made spawning
and the question is, how to make it fall?
Ok, and should it float down at a constant rate or should it fall like a real world object
float down
at the same speed all time
ok, then you do not want to use physics
for now I would just throw something onto event tick. that says set actor location to be the actor's location + a vector down * speed * delta time
what do i need to add here?
What you're doing there is spawning a fruit every tick (every frame). That's a lot of fruit.
hi, working on a slide system, how can i go about doing this. Can i just add force and play an animation?
@shell rivet the snippet I showed should go inside the fruit's bp because this is something each fruit does.
@shell rivet And in the timeline set a proportional float function
@past girder Add force won't work if it's a character. Characters do their own thing. You want to use character movement -> launch
That way it lets you call something when movement is ended
like this?
I don't think that's a good solution personally, xystrol. It won't work if, for example, the expected end location changes because something that should block the fruit appears underneath it, or whatever surface as originally used to calculate the end location disappears.
That's right, it's for a specific and standardized (?) use
@shell rivet That's (Almost) right, except it's probably in the wrong place. What BP is this?
However end location can be set up dynamically
~~world blueprint ~~
Yeah, so spawn the fruit as you're doing in the world blueprint, and put the movement stuff into the candy blueprint.
Also, again I'm going to warn you that you're going to spawn an enormous amount of fruit if you spawn one every frame haha.
That'll make a big fruit salad
nope
But, how can i check if the player is in a slope?
Is it somehow possible to select an (Abstract) GenericClass als an Actor in this node?
then i can check the value and add speed
@shell rivet I wouldn't mess with the tick settings. You can make a loop like this instead:
@past girder trigonometry. get the arcCos of the dot product of the normal vector of the ground below and the upvector
ok, thanks
Any idea why "Play Animation with Finished Event" never fires ?
When hovered it never fires the anim and stops at "DoOnce" node
(the variable "fondu new game" has no place there, imagine the output "animation" from button struct as input)
updated setup
can you show lower down what's happening? I'm curious where the pins are coming from that are going into your loop and get statements
oh there are old events for other buttons
And tests
Note that if this setup works, it won't with gamepad focus (what I'm trying to do, actually)
@covert delta should it look like this?
@dawn gazelle On tick, the anim runs on loop, not only once
So that I tried with a for each loop node
But with the "play anim with finished event" it only goes one time forward and keep stuck in that state
@shell rivet That looks like the same as what you had before? Is this the candy BP?
Well... Your foreach loop is firing every tick, which means the animation would be trying to play every tick, which means the finish probably never gets to fire.
even with the "do once" thing ?
yes
yes, because the loop is starting over again, so it starts fresh
@shell rivet The candy should not be spawning other candies. That part you can put back where it was before.
but if "finished" is never called, so is the "reset" input from the doonce
.
as far as I know, "doonce" should only be called once after each "reset", no ?
But not if the loop starts fresh every tick.
even on tick
haaa I see π
well
how could I set up such a system so that on any button hover the event is triggered ?
There's events for hovering and stopping hovering over buttons.
yes but I'd set up one event for each button, and it won't take gamepad focusing as hovering
i moved it, now what do i need to do?
add event tick. Drag delta seconds into the float input of your float * float node; and drag the exec thread from tick into the set actor location.
well the setup is working on tick with some changes but it won't detect gamepad focusing either
@shell rivet Make sure you've set a default value for fall speed.
click it in the variables section, then in the details pane, scroll down to default value. Make it something bigger than 0.
i know i know
yay!
it's working
thanks for help
(and sorry for my bad english - i'm from poland)
ur english is fine @shell rivet
cool. For your other stuff. You're going to want to use Event Actor Begin Overlap, to figure out when you're colliding with a player or the floor or what not.
i know that (i guess)
scroll right. Can't see the whole error
looks like your ui text is doing something weird
i didn't changed the castto from character to candy
@covert delta i can't get the text from candy
You would want the points on the character
It's better if you get the reference on construct btw
And pass the reference with an exposed variable or use Get Owning Player
so...
When a player drag and drops a certain item I want to pop up a 'confirm drop' box, then continue with the drop request... but i need to pass several variables from the drag drop event for the 'yes' click, what do you think would be the best way do handle that?
- store the vars as variables in the confirm widget
- store the vars in the main widget and complete the action on confirm
here?
i mean will it work?
i want to make something like this:
when it touches ground, it destroys itself
when it touches player, it adds a point and destroys itself
You could just use an Increment if you just want it + 1
your 'points' var is grey'ed out in the picture, meaning it can't find it in the object your casting to
And at that point it should handle itself being destroyed
If it overlaps with anything it destroys itself
If your chatacter overlaps it, you get 1 point
And handles its own destruction
@shell rivet the code wont' do anything unless something threads into it (the white execution pins). So for that code you have about setting the points and destroying the candy to do anything, it needs to be triggered by an event. In your case, you want Actor Begin Overlap,
how do i need to make this?
right click, add event actor begin overlap
i really need it
in candy or in character
either is fine. I guess I would do it in character.
i am late to the party, @shell rivet can you paste what was the original issue?
You could have in both
One for adding points in character
The other in candy for destroying itself
done, what's next?
am i the only one who's noticed points is greyed out?
i repaired it
Probs didn't have the points in the character at the time
still getting point error?
no
next?
that should be it. If this doesn't seem to do anything, its probable that your collisions aren't set up and the overlap event isn't being recognized. Add a print statement after Destroy Actor to just say "Hello" so you can tell if the event is happening or not.
should it look like this?
Yeah that's fine
Both your character, and your candy's colliders need to have the checkbox "Generate Overlap Events" ticked.
always a good idea to untick 'log' on the printstring for objects in ticks.
i flooded the log once and made unreal crash with a tick printstring lol...
one more thing, when it touches the ground, it needs to destroy yourself, how do i do this (sorry for taking everyone's time - i'm bad in UE)
@covert delta can you help me? again
was looking at a game "building survival game set in the steampunk era where humans and technology meat."
er... i hope not lol π
always check your spelling both in the game, as well as for descriptions π
so back to my question, would it be optimal to pass the vars and store them to the 'confirm box' then have it execute a event to handle the 'yes' click after?
-how do i do it?
go to your candy and make sure "Simulation Generate Hit Events" is ticked.
Then add Event Hit
Drag "Other" out and try to cast it to your character. Drag the Cast Failed pin out to Destroy Actor.
This goes on your candy BP, and is basically saying if it hits anything besides the player, destroy it.
is this in your candy bp
and did you check "Simulation Generate Hit Events" for your candy collider?
is using an actor projectile as a bullet the best method of creating guns or should I do line traces?
If I do line traces I can't add gravity to the traces
Anyone know why this doesn't find any lights in the map?
I fed the variables into my confirm window for something and on clicking OK it performs the needed action with those variables and it works well enough. One could argue that you could build a more modular UI where you could make a confirm widget and let the main UI that the item was dragged on to handle it, but ... eh.
When printing the length, always reports 0 items in array
It was working before, not sure why isn't now though.
Thanks in advance
Are you searching the level or the actor that the code is being run in. It looks like its being run in the actor to me.
It's being run from a child class of the parent Actor yes.
It's a light switch, that toggles all found lights basically.
Would I need to make the array from the level bp and then toggle all those collected lights on interact from the switch?
I would create the array from the level blueprint, yes. Just as a personal preference.
I will try that, thanks!
@covert delta so what?
set the collision preset to overlap only pawn
Prints the first print string, but doesn't print the length from the levelbp
still nothing
@trim matrix that implies it's not finding anything. ARe you sure your level has spotlights?
For sure yes lol
that exist when begin play is called?
I'd make a light switch blueprint that takes in an array light references that it should control, then loop through them to turn them off/on.
I had this working before from the actor, and on restart, doesn't seem to be broken.
And yep, they're existing before begin play.
That's what I was going with initially, but Nash said I should generate the array within the levelbp, though, I don't know how to iterate the levelbp array from the Actor, as afaik, you shouldn't try to cast the levelbp?
When doing it from the actor, it still reports 0 spotlight components found.
:s
@shell rivet add a print statement to it. does it print anything?
add it to the event hit directly. forget the other code
Could this be an issue with the latest version of the engine? 4.26 (release)
@trim matrix you're aware you're looking for spotlights on the actor that's calling this right?
I'm getting different solutions here, haha.
Okay, so when it was with the switch actor before, the lights were just placed components, they weren't children of the switch, and it was working.
Since then, I was told to generate the array from the levelbp.
I will change that back to the actor, and add the spotlights as the children, and see if that works. :)
it doesn't prints anything
@trim matrix I haven't read the full conversation, but the reason that doesn't find lights in the map, is because when you add a light to the map, it's actually an actor of a specific type with a light in it that has the component, the component isn't added directly to the map. So you need to use GetAllActorsOfClass and look for SpotLight actor class.
You can't use "Get component by class" as that is looking for components attached to the specific actor. So unless those lights are attached to the actor the code is running in, it won't get a reference to them.
Using a light switch actor gives you fine control of specific lights you want to turn off and on, and can fairly easily be changed in the editor.
If you wanted to control all lights of a specific class in the scene, then you should be doing a light switch actor anyway, and then have it get all actors of class. You can do this multiple times to build up an array that you control. Though this can work in the level bp as well.
Im having trouble getting my enemy to replay an animation montage as long as it is colliding with a box collision
Okay, I will try it, thank you both Authaer and Datura.
I see the difference between them now :)
I dont see what the problem is, I set a boolean to check if the enemy is in the box collision, but for some reason the montage only plays once
@covert delta so?
ehhhh. idk. Let's doing overlaps again I guess.
Go to your candy. Set the collision preset to overlap all dynamic. In your code, rather than doing Event Hit, do Actor Begin Overlap again.
on box or on mesh
Using the component as class, and adding lights as a child component, finds the lights fine, but doesn't provide any access to the visibility function.
Using the get actors by class, doesn't find any spotlights at all, including those as children or placed as placed lights within the map
Have you tried to print string on the fail path you have on your branch there? or even try printing a string after your delay?
Mebbe your montage is longer than you expect as well? Check the float value coming out of the montage play node.
Actor Class
No lights found.
I really appreciate all of you taking your time to help us, thanks again.
You have spot lights in the level?
Yep
Your level outliner shows it up like this?
That's...odd.
4.26 may be the first version I don't dive headfirst into. :/
it works....kinda
because when overlaps the player it prints the string
could hurt tho
Yes, I already had issues with splines vanishing, the world outliner not finding any actors at all, random freezes and other issues, which I have sent reports for when it crashes etc. :')
and when i close the preview is sends errors
I shouldn't have been so eager to upgrade the version :')
Has it always been like that?
I was thinking of doing more stuff with C++, since blueprints seem overcomplicated vs. programming (which I have done for a few years as is).
I wanted to try using bps, as I thought it would be a faster way to prototype ideas.. haha
and that doesn't trigger when it hits the floor?
it triggers, but it sends a error too
drag out Other actor and try to cast to the character. If the cast fails, destroy the candy.
I think the problem is both the character and the candy are trying to destroy the candy.
@trim matrix Blueprint is definitely better for prototyping beyond a doubt. At least in most cases. I don't know what they were trying to do with 4.26 that messed UInterfaces up, but hopefully they get it sorted, because I really want Chaos and the water stuff. But as for the interfaces, This.
like this?
white pin needs to go to cast to sidescroller
I see, how weird, do you know if a report was sent to UEDevs?
Note that they still work, you just can't use the class like that to check if something implements the interface. I had to write a custom function for specific interfaces to test against rather than one function. Decided to go back to 4.25.4
from the event
I bug reported it. We'll see. π€·ββοΈ
?
Smart idea with the function actually, but yeah, kinda odd, afaik, there was no changes with interfaces or the outliner, so not sure how they broke that.
yeah
now it works perfectly, thanks again mate
np
Can someone point me in the direction of resources regarding playback of audio from the PS5 DualSense controller from UE4 audio?
@dawn gazelle The print string works fine, you were right about the montage length. However now the problem is that only some of the AI's attack multiple times, even though they all have the same BP
It doesn't print a false string when they attack only once so im kinda stuck
are they using different montages?
No, its all the same, I just duplicated the AI's into the map
Strange, now I noticed it prints false enough though the AI is still in the box collision
It prints it only after one attack
Hi, I'm trying to spawn an actor attached to another actor component from a client trough replication using a "Run on server" function, I can't understand why it spawns only on server, if I use multicast it spawns only on client
Can someone help me?
make sure your actor has "replicated" checked off. Otherwise when the server spawns it, it won't try to do so on the client.
Run on server is the correct choice. Not multicast.
Thank you so much, In fact I've noticed I wasn't replicating the newly spawned actor, so it would exist only on server or client, thanks a lot
Hello guys, I'm trying to update animation on my skeletal mesh but the problem is if I try to read the socket location & rotation in the same tick, the new animation is not updated and my item goes to the wrong place... is it possible to fix this problem or I had to update the location after a delay somehow...
is 4.26 officially out?
Yes
Why is the max float number I can store in a BP 17,283,256,262,359,777,280?
That's not even close to the max float value
lol
Hey, fellas has anyone merged successfully Horror mechacnis with ALS system?
If you're trying to store a number like that in a float, you're not understanding how floats work. Try entering in 20000.01 and see what happens.


