#blueprint
402296 messages ยท Page 404 of 403
ah didnt know, new to ue and all that stuff
Ill remember for next time and thanks for the replying o/
most people here are just acquainted with bp, not the cpp side
is it possible to destroy my projectile before this part plays and still have it play that part after the projectile is destroyed?
yes although not sure if the delay would still function
destroy actor doesn't immediately kill the code. it just calls the actor to be killed and calls the rest of the code.
DestroyActor should always be the last thing you call.
Not sure what happens if whatever you call afterwards checks pending kill on it
that would make sense because the delay is a few ticks later
but code called in the same tick as destory, should still function
Destroy it after the delay
what didnt work
are you using the default projectile from template? that already has a destroy or lifespawn/kill time set
it does but the projectile just stays there for .5 seconds then disappears
and no
and what i want is the projectile to destroy/disappear and for the mat to change
Then hide the projectile before delay, then destroy after delay
Is there a way I could make my AI choose a random reachable point in a box?
I know of GetRandomReachablePointInRadius but my area is not a circle, but instead a box
Hey Gallonmate

Do you have any video suggestions for making a slide animation possible?
I have the actual animation
I've parted it into start, loop, and end
but as for putting it all together in the state machine and what not, jeez.. thats tricky
this one uses a montage
and might require root motion, which may not be what you want
I mean, montage works too xD
has anyone had issues with SetTimerByEvent not firing on CreateEvent functions?
I have not tried that
I actually do use force root lock
Gallon
Small issue
My attack animation uses the default group called upperbody so that it blends with running and attack etc
This guy wants me to add the default group default slot, which makes my attack animation not work after I slide.
and me being a noob, have no idea how to fix that
i dunno i dont do much animation work
the slot overrides the animation thats playing
if theres no animation playing in that "defaultslot", it will use the previous logic
So it will just use the upperbody then
depends, its must be playing some anim in upperbody
my character feels slow and hard to control when I press the slide button
So its doing something
Any suggestions?
whats is the problem?
So I'm trying to utilize this slide animation
but it calls for the default pose
meanwhile my attack animation needs upperbody
so if I slide
I cant attack anymore
Could someone help me troubleshoot why my interface isn't sending my PrimaryFire input to my PlayerWeapon Actor, which should be firing a projectile on my Fire event?
Both BPs have the interface, and the weapon fires when I do a direct Cast To, but I would prefer to use an interface for a bit more flexibility..
its selected the right group in montage?
Hmm, where do you see that?
click in the slot, at anim graph
Ah, let me try
Sadly not
I think
It's my do once breaking
It was set to reset after the montage completed, the attack montage
I took my do once out and now I can attack at will
on completed maybe isnt called if you call another montage to play before it ends
Crap
But then you could spam the slide
to reset
I am implementing a couple global systems, and I'm pretty sure SubSystems are going to be the way to go in the future. In the meantime, does each system being a component on Gamestate seem reasonable?
crypto
use a delay
and gate
instead do once
so ur mechanic insnt dependent of animation times
gate?
or in anim instance you have that node that returns the time for the montage
Gate looks interesting
@faint pasture depends of ur component necessity
usually components that only belongs to server wont be even spawned to client
Surikate how would I use a gate and delay?
Why would I need a sequence?
to easier ur life
instead plug things from kilometers away, you know the sequence will execute the code
@trim matrix I'm pretty sure gamestate exists everywhere
yes, but ur components depends
any component on the CDO of a replicated/pre-placed actor, as well as any replicated component on a replicated/pre-placed actor spawned in runtime exists on all machines
What's the CDO?
class default object
if you're using BP only think visible on the component panel in the BP
I have a particle system that spawns on a line trace impact point but it seems to fight with the surface to see which is shown, what can i do
raise it by 1 UU
I thought the impact point was just above in the surface, DrawDebugPoint didn't behave like the particles
DrawDebugPoint has some thiccccccness to it i think.
I've got a flashlight (just a simple spot light attached to a spring arm) for my character - is there any way to lower the brightness on things close by and increase it on things further away? For the light to be bright enough to show things at a distance, I have to have the intensity pretty high, but that makes it utterly blinding up close.
@unkempt granite Increasing attenuation should do that, if you haven't set that already
Is there a way to line trace multiple targets without having to use the LineTraceByChannel multiple times?
maybe an array not sure?
How would I check if a location is on a spline path?
depends what your goal is
there is a node that checks distance from spline
and some other related nodes
that does stuff
related to splines
I want to make an AI follow a spline path, and then be able to leave it it if needs to then hop back on the path
I found a way to get the closest point on a spline path from the actor
I just want to find a way to check if it is on the path
And I think I could be able to do the rest
yes and if you check distance from path, and the distance is 0 or some other low number
then it's on path
Okay, whats the node for that?
Hey all i'm print a float and I just wanna round to the second decimal place.
by default it shows 1.111f for example, but i just want 1.11f or 1.1f. Any easy way in bp?
this is print through a widget text object
can i do that with text or do i need to convert to string?
string has more options
ultimately SetText() in widget BP wants text. Lots of conversion nodes hehe
it's already spaghettis soup
well the only way to do it with maths is multiply and then modulo then divide
so always gonna be bunch of nodes
i think there is a c++ node though
that just lets you specifiy how many places you want to round to or truncate to or something
ya, arg i'm stupid for using bp on this widget ui
i dunno, i was told people who willingly do ui in c++ are masochists
so i heard ya
I'm making some experiments with a Third Person game, and I want to hide the mesh of the character when the camera is too close to it (for example, when the character is close to a wall and the player rotates the camera). I added a SphereCollider to the part of the camera the will probably collide with the character's CapsuleCollider and set the collision presets to overlap every dynamic object in the game. I also changed the preset of the CapsuleComponent to overlap with the camera instead of blocking. Then I added OnComponentBeginOverlap to the spherecollider, but there's no overlapping event at all with the Capsule. Other colliders in the game generate overlap events with the sphere. I even tried to test the overlap between the two colliders in EventTick with the Function IsOverlappingComponent(), but still no overlapping event. Any idea what I'm not doing correctly here?
@plucky dawn For some reason I thought this is all that's needed. I don't tinker much with blueprints, so I may be wrong
So if you have a savegame object which has a map of Names and Structs, then it cannot be modified.
the map cannot be modified.
@trim matrix thank you for your answer. I checked the SpringArm and my setup is the same as the image you posted. I did some other tests and when the Character is moving, the overlap is actually detected. This doesn't happen with other no-moving objects. I will keep trying to understand what is going on with this collision detection. If anyone else has any other suggestion, please. Thanks again
Does anyone know how I could make my camera not rotate with a ball. The ball has physics on and I want it to roll.
check the rotation properties on the character, camera and controller (write "rot" in search)
@plucky dawn Not sure I fully understand your situation, but know that collision events aren't generated if they are collided on creation (rather, on spawn)
@patent crow if you haven't figured this out already... Your player character is calling the "fire" function on itself, rather than sending an interface message to the PlayerWeapon. In the most basic sense, you're using the wrong "Fire" node on the PlayerCharacter end. You need to find one that has a mail envelope icon on it, and set the PlayerGun as the target.
If it simplifies things, only the recipient BP needs to implement that interface. All BP classes will have the ability to send all available BPI functions even if they don't implement any of those interfaces.
Quick q, is there a way to have my collisions be the same exact size as the object/actor etc?
there's a "get bounds" node IIRC... I don't have UE4 open rn, but that'd be a way to get the in-world size of a particular component.
Thanks, will look around for it
Alright, so I have a player character, it was made out of blueprints, and I paid for it. It changes the character movement... and whenever I add anything to the character, it works like half the time as a client. Half the time I will be able to move around, the other half well... all I can do is jump and look around and (unrelated: get the leg break sound from "falling" even though the character is not falling.)
Is the blueprint broken or something?
not enough context to be able to say anything
ok ill look into it more
the character movement as in the blueprint code within the character bp, right?
not an actually replacement of the CMC (Character Movement Component) in C++
not actual replacement of the movement C++ code, within character
going through everything again, I guess ill be bound to find the issue eventually even though itll take forever
@trim matrix You are telling us almost nothing, you need to spell out what your specific problem is.
Hello guys so i have this problem in the 3'rd person character template, wen you activate cursor, the camera rotator is still active, and once you click on the screen the rotator disable itself (and is posible to rotate by Click and drag on the screen) As a solution i want to simulate a Click wen i make the transaction from the 3'rd person controller to mouse, or I'am open to any suggestion. ๐
There should be a way to turn off movement for it
i can force it to stop rotate, but i like the "Click and drag on the screen" to make rotation wen you have the cursor
Right - so in that case you would probably want to stop the rotation, but enable it when the user is holding the mouse button down
Jezz dude ๐ tnx ๐ Gonna try this now
Hello, I have a Character with an CapsuleComponent(root) and AIController(both inherited) and when I call Move AI Task, it works perfectly. When I set Simulate Physics to true on the CapsuleComponent the Move AI stops working, it does nothing. My goal is for the movement to ignore the physics (I still want physics because it allows me to spawn a lot of characters in the same place and they make room by pushing each other). Any ideas?
You can't have character+physics, they are mutually incompatible
how will i spawn them? in a way that the characters wont overlap? right now im spawning with "try to adjust location, but always spawn", and after i spawn a few, it just spawns the character inside another one, which cant happen :/
not really sure if there's a good solution, you could try checking the spawn area and then moving the spawn location if there's something there
why can't I override an instanced property array?
the idea was to push the others away tho
afaik there's some kind of crowd sim in the AI stuff, maybe that would be able to push the others away
@verbal bolt default values are buggy as fuck
im gonna check it out
should I use something else?
ok, I though of doing so, but can there be some other way perhaps?
looks like you're using structs anyway, so I recommend using data tables
you'll have to load in the data from the data tables anyway
Thanks for the tip
@odd ember wow, found a strange thing. you CAN actually edit the array in child blueprints
you CAN'T edit them in a scene, but in child BPs you can
WEIRD
@verbal bolt you can probably edit them but there's no guarantee that they stay the values that you set
I had the same issue that I set up values for an array, but once I hit PIE, the values would reset every time
How do I go about activating a boolean of single copy of an actor in the same level?
Depends on how you interact with it
I'm just trying to lock doors so that when the player enters a room, the 2 doors for that room set to lock, and when the enemies in said room are killed they unlock
So you want them to be false by default?
Before even playing?
If you click on a variable in your blueprint and you check the details of that variable
You should find a thing calls Instance Editable
If you mark that true then you can change the value on each instance (copy) in the scene
I think I've seen this yesterday but I can't find it - I have a collision capsule on my pawn and I want to detect when it overlaps walls (static meshes). In order for it to work, all static meshes hit need generate overlap events true? is there another way around it? Like how the spring arm collision test works?
Hey guys, not sure if this is a concern for the design channel or this one, but I'm trying to work out a mechanic in Blueprint.
I have a third-person camera inside my player character, attached to a spring arm component. I have the socket offset to the right side of the character, and I want to swap shoulders like so.
My thoughts were that, for this to really be a useful mechanic, I would want the crosshair to remain on the point at which the player is aiming, but I don't know how I would go about doing this. My line of thinking so far is that I would need to somehow either rotate the camera towards the crosshair direction?
@hazy fulcrum check first person template in Unreal Engine already have a built basic aiming System. You find a idea how the aiming will set.
Use Aim OFFEST
https://docs.unrealengine.com/en-US/Engine/Animation/AnimHowTo/AimOffset/index.html
Using an Aim Offset, a character aims a weapon in the direction of your mouse or controller.
This is basic..
Another is aim assest for aiming System
@odd ember Hi man ๐
Afternoon guys! So our team are currently stuck on finding a universal way of making a character sit (to a snapped point) on key press and then stand and resume control again on key press. Now, I know there is a blueprint out there, I think it was from Git, where there is a chair and stamina system, we have tried that out and tried to adapt it but didn't work out for what we needed. We need a system where we can attach a point to any bench or moving seat (such as the smiler coaster attached) and the character will adapt that position and also move/rotate with the car. We did look at the approach of adding sockets to the train mesh and blueprinting the "attach to socket" thing but couldn't figure that out either...So, all you experts out there...what would be the best way to tackle this?
I tested a lot of things these past 2 days with my inventory system. I played with breakpoints, and I event tried a new system for my inventory to work but I still have that bug... (Im still loosing my reference to the item)... I was wondering if you could help me with that ๐. I am really starting to think that its just a bug because it really makes no sense at all to me. So I was thinking maybe I can send you the project and you could check it really quick if you can find if there's a problem or not. The project is not really big btw. I know its a looooot to ask so feel free to say no if you don't want to, its ok ๐ Thank you! @odd ember
I really don't wanna mess with your project tbh
@opaque elbow
I got my own projects to work with
but I honestly can't remember what your bug was
It's all good my friend ๐
so perhaps you can mention it again
ok
I had a copy of my text i sent
Sooo here's my problem: I have an inventory widget with 8 "slots widget" in it. Whenever I pickup an item, the inventory refreshes all 8 slots widget with some info like the image of the item and the actor reference itself (the type of actor). "look at the image" https://gyazo.com/c31e112a13e00ff912fedb93afcf4a62. When I select a slot in my inventory, it gets informations of that slot (like the item reference "type of item") and with that, i can click a drop button that will spawn an item based on the (item reference "type of item").https://gyazo.com/77d1b330056a88554d4d43747d7b9d93 And here's my problem... Everything works perfectly fine when I drop my item. The correct item is spawned and everything works fine but sometimes (RANDOMLY) its like if the (item reference"type of item") is NONE so when I drop an item, nothing spawns cause there is no item ref (so it doesn't know what to drop). But most of the time, everything works. Its just doing that randomly. Sometimes I can drop 20 items before I lose the item ref and sometimes I loose the item ref on the first item i drop... its really random...
I have no idea if this is a bug or what but i really need help with this... I have been trying to fix this issue for now 2 weeks and a half and I have looked at approximatively 50 videos and I still cant find what im looking for. (let me know if you need more picture or anymore informations "I will provide them")
Gyazo
Gyazo
@odd ember
both links are pictures
@final vigil I would say sockets is the way to go. If it's not adaptable enough for your purposes you might need some kind of component system that contains locators and snap to those instead, but as a general implementation i dont see why sockets wouldnt work.
ok so still cant figure out how to destroy this projectile and still have this part play
@opaque elbow when you refresh the inventory you replace all references with an empty array
@worthy dew i'll give it a second go, maybe i just missed something
@opaque elbow do you have a separation between your logic for acquiring the inventory items and the UI?
@final vigil I second sockets as the way to go forward
wait, is it possible to attach a character blueprint to a mesh with a socket that is also inside a blueprint?
@odd ember What do you mean by a separation?
or would you have to casttobp?
This is what happens when I pickup an object
this is in another blueprint
Its the master item. And every item in the game has a child class of this one
@odd ember
When i refresh the inventory it does replace every reference with an empty array but why is the array epmty? ... Its shouldn't be
sometimes it works and sometimes I loose the reference to the item as soon as i drop 1 object
but sometimes, I can drop 30 items before I loose the ref
@final vigil that should work if you have read access to the mesh
@opaque elbow where is the pickup event in your other graph?
@opaque elbow it is empty because you use Set Array before iterating over it
remove that node and that will go away
does that solve your problem?
Would i need to set the array when the game begins?
i have already tried it and its the same thing
My pickup event is fired correctly when a linetrace hits and you press "E"on a type of objects that are collectable.
yeah if you need to set the array to something set it at BeginPlay
yeah but what does the pickup event do
and how does it relate to what's happening in your widget
Someone knows easiest way to make mortar ?
why does the item have functionality to add it to the inventory? ๐ค
When you pickup the item, it adds it to an array of item in the inventory and it show it in UI
yeah, but thats bullshit design-wise
is it?
here's the pickup function. its just doing the little stuff when you pickup an object
You should invert it.
Instead of having a player ref in the item, the player should have "add item" function
@calm dock Ok I will check that after I fixed this problem ๐
your problem exists probably because of this
hmm probably. But I dont loose the item ref when I pickup an item tho. only when I drop it
maybe
you should have an underlying array of items that are the "real" items
ive never done an invenmtory before
and then on top of that you need an array of "visible items" that are present in your widget
@crude jewel I think you've misunderstood my issue, sorry. If you notice how the crosshair moves with the camera, I would like it to remain on the same spot that the player aims at regardless of whichever shoulder the camera is over.
so when you add an item, you tell the inventory component to add the item to itself, and the inventory component should communicate to a separate widget that an item has been added
then the widget knows how to handle the item based on the struct and shows it properly
you do the same for removal
so in terms of you dropping the item, what happens? the item doesn't exist anymore?
When I drop an item, sometimes it works and the item ref is ok, but sometimes when I drop an item the item ref is "NONE" so it doesn't know what to drop.
@odd ember
with the item ref
where does that come from
2 sec i'l show you ๐
ok
I want to understand how you are thinking about this
My master item has a struct in it wich contains an item ref that is automatically set to itself on event construct
it's really hard to read your code
what I can suggest is to rewrite the code for picking up and dropping items
when picking up the item, make sure the item you are picking up is valid
when dropping items, make sure the item you drop is valid as well
although it could be
when i pickup an item its "Always valid" But when I drop an item, sometimes its valid and sometimes its not...
is it always the item at the end that doesn't get dropped?
how do you check for validity?
When I drop the item, I check if the item in my inventory array with is valid. https://gyazo.com/36e921910d56aca60ac6b895709b5362
Sometimes its valid and sometimes its not
idk why tho...
@odd ember
have you checked through debug if it's always the last item that's not valid?
the last item in the inventory
no it is not
its random
dont mind tha graphics. there is nothing done yet https://gyazo.com/6e3b8a1b00d3e9510c944598e72fe194
it can be in the middle, the first one etc...
ohh do you mean in the array?
yes
yes
the first slot is 0
and not slot 1
yep
where do you map the two arrays to each other?
the array of the item in the inventory and the slots?
yes
because I think your error is there then
that's why it would be better to rewrite the function so that you are sure that both arrays are added at the same time
and I think that also includes not resetting the visible array every time
I think that is causing you issues first
and then something else goes wrong on top of that
generelly speaking, say i need to break and make a structure. whatever it may be, post process settings, stats for my player, or a brush lรถike in the picture.
is there a way to streamline this process? i dont want to connect all of the pins on those nodes if i only want to change 1
@blazing ridge use set members in var
that will keep all other pins as they are and only change the ones i expose?
thats great, thanks a lot!
so this right here would take the brush, change the image, set the brush and leave all unexposed pins as they were, right?
or can i delete the Set Brush node at the end?
https://gyazo.com/5170cb409b08c85748a31d135209e4fd every slots in the inventory, has a variable named "Slot" wich is set in the designer tab becasue the variable is editable. So the slot slected in the picture is curently the index 2 since its the 3rd one and the 4th one its index is 3, etc... After that, this "Slot variable is passed into the event dispatcher to my inventory (This is in my slot widget btw)https://gyazo.com/08e2875106b0ee6219c2d6c0ea9056d7 And then in my inventory, whenever I click a slot, it sets the inventory slot selected to the one I just clicked since I passed that "slot variable" and that I used a for each loop of every slots in my inventory. And this is how I know wich slot I have pressed. https://gyazo.com/adb7adb351ea8b750594c6e365ad65d1
@odd ember
@blazing ridge why don't you just call SetBrushFromTexture on the image reference there?
avoids the binding which are pricey even if they don't use a binding function
@opaque elbow you need to make sure that when an item is picked up both of your arrays are updated at the same time. I don't need to see more code
theres no such node to pull of from my image variable @twilit heath
also i was curious for all structure related sets
@odd ember wich array?
the inventory slot selected?
@odd ember they are matching correctly
Because when I click a slot in my inventory, im printing the name of the item and its the good one
I have just realized that even when I dont drop an item it looses its item ref. I think it looses its ref by time passing... Idk why...
When I pickup the item, i can select slots and it prints the right item name and everythings fine. But after waiting arround 30 to 60 seconds it looses the "item ref" for some unkown reasons... ๐
this is where u ask about help for blueprints right?
Yes, ask your question and if anyone can help they will ๐
so i was trying to use the template of the first person shooter to experiment a bit, and i was trying to make a bullet destroy another actor but its not working, why?
@zenith flame When explaining a problem (in general, not only in computers), try not to use statements like "not working". The more details the better:
1 - Is the bullet even colliding with the character? If you're not sure, you can either put a breakpoint in your event or add a Print String node.
2 - If so, print/check the other actor to see why the cast fails
@haughty ember where do i find the log?
@zenith flame you mean for print string node? you should see it on the screen. You can also see the output log: Window -> Developer Tools -> Output Log
@haughty ember So i don't think its even colliding, how do i fix that?
@zenith flame Collision settings. You should be familiar with them though, so you should probably read this first: https://docs.unrealengine.com/en-US/Engine/Physics/Collision/index.html
All about collision, collision responses, and collision presets.
@haughty ember Solved it, understood collision correctly. I just didn't realize i didn't have a collision box on the bullet. Thanks for the help!
Cool, glad to hear it was more simple than reading docs ๐
Hello , in my game i have a farming system where the player will press a button which will fire trace , if the trace hits an instanced mesh it will replace it with a blue print actor allowing it to be farmed , this approach gives me a bit of hiccups during playtime , can anyone help to better optimize this or find a better approach?
Things that could be slowing it down...
- "Get all actors of class"
- iterating through big lists/arrays
- Spawning an actor that has a ton of components or a heavy construction script
Hard to say what's slowing it down without getting into the weeds, so to speak.
Pooling actors is a strategy for cutting down on spawns/despawns. It means making an actor reusable -- having a "pool" of them and hiding them when not in use. Commonly used for projectiles e.g.
but you should first figure out exactly what's making it slow before trying any particular optimization
@odd ember I can now confirm that I loose the variable "item ref" after time
30 to 60 seconds after lauching the game
it is set to none
@void field ask in #packaging there's more chance people are gonna answer
@opaque elbow thanks, I'll move the question there
your welcome ๐ I hope someone answer your question ๐
@opaque elbow from experience I'm not counting on it ๐ฅ
... ๐
@haughty ember I have a third person template, i have a collider in the camera and I want to detect when this collider overlaps with the CapsuleCollider of the Character. They are defenitively not colliding on creation. The image shows the moment I want to detect the collision.
If they are not colliding on creation, it has to be the preset of the collision.
You can try to use a camera actor outside of the character actor, perhaps there's some issue with components in the same actor? but I'm pretty sure there isn't.
Hey. Can someone tell me how to get a Blueprint asset, through an Editor Utility Blueprint and be able to cast it to its parent type? I can't find a way to make the casting works.
Has anyone been having problems overriding Input Action events in 4.24? i am getting inconsistent results. sometimes firing the pressed of the parent and only the release of the child, etc, keeps switching and is inconsistent on what will fire if it fires at all. I have consume input unchecked in the child
Unless I'm missing something, children inherit from the parent. What are you trying to accomplish @fiery sage ?
I've not experienced that personally Juan.
Instead of having Input Actions in a whole hierarchy, just have it in the parent and the parent calls a function on press / release. Then the children can override it.
@distant sedge ya that's what i'm considering doing, but can't choose to consume input that way
i could have the virtual function have a return value to say if it should run the actual one i guess
just hate hacky shit
You can consume the function call, if you don't call to the parent function in a child.
@opaque elbow if you sit still in the game for 30-60 seconds without moving or anything do you still lose it?
Errr, I came to this realization that colliding with two boxes, if I leave one is in air is set to false. Any idea how I can fix this?
Meaning, if I got to a corner, where multiple box collisions can be then leave it, it runs the exit collision and thats no bueno
@odd ember well if I just start the game and dont move like that there's nothing in my inventory soo i can't lose anything since there nothing
I have to at least pickup an item
@opaque elbow well yeah pick it up and leave it
but let's say after picking up an item 30 to 60 sec after I loose the ref
yea
i loose it
do you have item decay in your game
whats that?
like do you have items like food that over time self destruct?
humm.. I have a hunger system
And i have apples that gives you hunger but nothing destroys over time
can you destroy items in any way?
by picking them up
This bug still exists in 4.24.1: https://issues.unrealengine.com/issue/UE-28811
Quick rundown of the bug: When the mouse cursor is shown, mouse x/y events don't fire properly unless the LMB is held down
Are there any good workarounds to this? I created a custom mouse widget that just gets set to the mouse position every tick, then set the playercontroller to not show the cursor anymore, but that feels laggy. Its possible the framerate of the PIE isn't great, but I'm curious if there are other, more reliable ways around this issue.
so if you're destroying them, and you're having a reference to them
that sounds like the issue
Im setting a varible in another blueprint before I destroy the item tho
that doesn't matter
so your inventory consists of an array of class types?
@odd ember When you have a chance can you help me with a small bug?
sure just ask
So I have an issue with this
I enter 2 box collisions
and leave 1
then I cant move
even tho I'm still in 1
It makes sense
Just curious how I can make this work as intended
what do you want to do?
This i just a check so the player cant move in the air
I'm not using a template so I can't call is falling
what does that have to do with overlaps?
Well my idea that when the ball overlaps a collision is that they're on the ground
But I didn't take everything into account
So do you have a suggestion to fix this or an idea for a better is in air system?
I have no idea about the context of what you're trying to do
like what is the game
what does being in the air mean in this
can you jump?
are you playing as a pawn?
Yup, as a pawn
Just a ball
So the player can't jump or move while in the air
Thats what I need to accomplish
I would recommend a character movement component
I honestly thought it was animBP
Just reparent your pawn to make it inherit from Character, it is defined as a pawn with movement capabilities. Checking if the Character is in the air should be at least easier than checking if a pawn is in the air
Characters already have an inherited movement component too
Alright, thank you guys
apologies for the copy/paste, but I have been looking everywhere for a solution to this and I've only found one, non-ideal solution to this (the one I'm using).
This bug still exists in 4.24.1: https://issues.unrealengine.com/issue/UE-28811
Quick rundown of the bug: When the mouse cursor is shown, mouse x/y events don't fire properly unless the LMB is held down
Are there any good workarounds to this? I created a custom mouse widget that just gets set to the mouse position every tick, then set the playercontroller to not show the cursor anymore, but that feels laggy. Its possible the framerate of the PIE isn't great, but I'm curious if there are other, more reliable ways around this issue.
This seems like a bug that would have more exposure, since its so easy to replicate (turn on show mouse cursor in a game that also captures mouse x/y events), but also such a common feature
I'm trying to create a twin-stick style hack and slash, kind of like battlerite if anyone is familiar. I need to be able to turn (mouse X event) as well as see my mouse for really precise movement and abilities
I think the other solution I have is to allow mouse to be shown, and handle character rotation per frame by setting them to face my mouse each tick instead of on mouse events, but that feels not ideal either because it is so much extra work each tick
OOOOMMMMMMMMMMMG
@odd ember
AFTer 4 fcin weeks
I fixed it
Bro like you dont understand how much time and effort I have put for that
so what was it
Thank you sooooooooooooooooooooooooo much for taking the time and helping me man ๐
you know when I told you my ref was the ref of a class? I actually forgot to do that when i did the code because I was testing some shits a long time ago and I forgot to get the class instead... ๐
Now im getting the class and everything works PERFECTLY
FINE
glad I could help
Thank you sooo much! Ur such a nice guy ๐
let me know if you need something ๐
So, i am using matinee to move a boulder for a death trap, but the boulder is not spining -90 degrees until it hit a wall. any ideas how i can fix this? i know it work when i do it on tick but there no way i can do tick if i want to use it as a trigger.
matinee still a thing? I thought sequencer was all the new rage
lol i am new so i am just using what i know
@odd ember So I cannot seem to get my movement to work at all with CharacterMovement (Inherited)
Actually its the is falling
The is falling always returns true
i guess i can look at tutorial on level sequence and see what that about
@twilit lily does your mesh have gravity enabled?
I just tested with the unreal mannequin and falling is set correctly
Okay, let me try something then
Yeah its just always returning true
Hmm, so I figured something out, not working but it will lead somewhere
Hey guys, in your whole history of using blueprints, have you ever come into a error from using the same ref (sprite) for multiple ref connections like below?
I don't think I have but just checking with you guys. Im about to make a bunch of connections so I wanna know if I need to make a GETer ever time
thats fine
every pin on nodes connected via exec wires updates when the exec runs through the node
Whether you copy it or not, it calls GetSprite only when it needs it so it makes no difference
and stays valid until the next time it does
Yeah that's what I was thinking too. All should be well. I never ran into a error or something messed up from calling a ref too many times
every node that is not connected via exec wire directly evaluates whenever the exec node its connected to is executed
How can i set a timer in my behavior tree or in my ai controller where if the enemy doesnt see the player, it generates a random time and then plays a sound?
Okay so the issue is that simulate physics has to be off on the Capsule Component, which I was fine with however if the sphere has simulate physics on it just rolls away from the parent.. and off the camera.
You can turn off physics on everything, but make sure that enable gravity is on your root component
@trim matrix does the Delay node work for what you need?
Well I suppose I could turn off the physics but how can I use the Character movement to accurately move this ball?
You can create a random time to delay for, then play your sound after it
I guess I'm not sure what you're trying to do. Why do you have a capsule component if you're just trying to control a ball, shouldn't you have a sphere collision component?
If you're trying to control it with like angular momentum or something, that might need another solution than charactermovement, or a subclass of it or something
@spark delta is there a way to determine if a blackboard entry is not active as ai perception?
but only way to get that is by creating a character
Is your movement scheme more complicated than "move left/right/up/down using wasd"? If so, I would first try to create a new blueprint of CharacterMovementComponent and implement the correct type of movement in there then add that manually to a pawn to be able to control it as well as get your isFalling feature
@trim matrix Unfortunately that is beyond my experience level, sorry :(
CMC supports falling just fine out of the box
and i think a custom CMC is a terrible idea if you're just starting
that class is ludicrously large
@spark delta It's really not, it's a 2.5d game with a bouncy ball lol. just need some semi-realistic physics.
guys my level blueprint is not going off on my build anyone know why?
I think CMC doesn't give him the kind of movement that he wants though- which I think is physics based ball rolling movement?
@lofty kernel We need way more info than that..
Did you set it to be the default?
Anything specific you can give us. picture of your blueprint, what you expect it to be doing, any error messages you're getting, etc.
^
What is telling your level to load tho?
Is that on a widget blueprint?
yes
Welcome to the first UE4 tutorial here at CodeViper!
Learn how to create a basic main menu setup in Unreal Engine 4.
Love computers and programming? Subscribe to my channel for awesome new tech videos every week!
"LIKE" us on facebook for daily tech news, coding ideas, p...
This is a really quick video, that covers all of that
thanks so much! ill check it out, sorry for interrupting zlo and Tim
is it possible instead of ai perception, i can use line trace to see if the raycast from my character hits me, then set a blackboard?
No problem
@twilit lily Just to not let your problem go away without a resolution- As zlo mentioned, I would highly recommend trying to make the movement work with a basic CMC. Its a pretty well formed class with most of what you need for movement in there somewhere (including moving with wasd, jumping, etc). If that doesn't work, you can create your own custom CMC, but you'll lose some of the features of the CMC by overriding how it handles movement
I've never tried that before, how can I create a basic cmc?
Its default on your Character lol :)
Its that inherited CharacterMovement Component on your new character
gl and may the force be with you
Haha, sure hope so
Hi. I'm trying to figure out what is modifying the position of my UE4 actor's camera boom. How would I go about debugging this?
@trim matrix how do you mean? the camera boom itself is a spring arm, so it'll act as a spring and retract when necessary
Hey, anyone have any idea how I would lock a character to a particular object while its moving?
Yeah I know that. I was talking about how I have something set to change the rotation of the camera boom when targeting, and for some reason, the camera is shaky, which is why I was wondering if there was a way to find out what modifies that value
hi, i'm having this issue rn
i'll keep setting the game mode and all that, then save and exit to try refresh the editor, and it just deselects everything
Hey @odd ember What can I call to move something if I'm using CMC?
Is there anything specific?
Or just add force?
@still salmon can you use the AttachTo node to attach the character's root component to the other actor? I haven't done it before personally (not sure if you would then be able to control the other actor, since there would be a CMC on that actor then, but worth a try
also @spark delta
I haven't tested brand new characters in a while... but I'm pretty sure movement is included out of the box. After you reparented your actor to be a character, you should just have movement abilities by default
iirc, anyway
I'll create a new test project to see if I can get more detailed information really quick
I'm sure that this question gets asked a lot, I'm new here and i've been trying to make an interact door to work without this glitch that i've been running into. If anyone can help that would be awesome! Here is my Blueprint and here is a gif to show the glitch i'm running into.
The first open always plays like it's in reverse but it shouldn't do that
Feels like the default value for DoorClosed doesn't match the initial state of the door to me
Is it from 0 to 90?
Try toggling the default state of DoorClosed
@limpid lotus yes 0 to 90 on the timeline
@spark delta toggling the state didn't change a thing.
what do you use for scale and direction?
do you have physics enabled?
Yeah
are you using force?
um
no?
I have no blueprints
The settings are kinda big so I'm looking through it see if something might cause that
why did you mess with the settings?
might had spawned it colliding
probably
I didnt really change any settings
Check this out @twilit lily https://docs.unrealengine.com/en-US/Engine/Animation/CharacterSetupOverview/index.html
A high-level overview of how to set up a basic character or Skeletal Mesh in Unreal Engine 4.
Character Class setup is exactly what you need to do for the most part
anyway @twilit lily reset the cmc, use add movement input for input
Yep, exactly what that guide walks you through ^
Alright, I'll follow this ๐
Hey! just a quick small question. Does anyone know a way I can hide the third person character template model? I made the camera zoom in so it's like first person but when I look down I can see feet. Any fixes?
But then it disables the animation in game for some reason? i connected it to the headbone so it has a breathing motion
but when it's hidden it disables it
for some reason
if anyone responds please tag me! :)
If anyone has any idea on how to help fix my issue let me know :)
https://discordapp.com/channels/187217643009212416/221798862938046464/673996134636716045
@jade widget you're probably confused about SetRelativeRotation. it does a rotation relative to it's parent, not to the current rotation. 0 probably means "open", so the first time it goes from 0 (snaps to open) then 1 (to closed).
Hi, Im trying to have a cube move based on mouse input axis, my camera stays on top and the cube should move left right based on mouse, but if I use InputAxis and feed it to "SetActorLocation" I see a LOT of flickering in the actor. Do you know why and how to fix it?
I have a SetActorLocation in" InputAxis Turn" event
@haughty ember So what should I change the node to?
you have various ways to solve it:
- Change the base rotation of the mesh. You can try to use scale and positioning. Probably not what you want
- Change the float in the track of the timeline to go from 1 to 0 rather than from 0 to 1.
- Use a "1-" (float-float) node from the "Door Open" value. This is probably the easiest/best way
@unborn lantern Does it move around or does it flicker in place?
@unborn lantern Define flickering? but I think you probably want to lerp the position rather than set it
@tight schooner it flickers in place, then when I move the mouse it flickers while moving and sometimes he goes back and forth
mmm. I found out something
it works on one axis only
I mean up/down
when I connect also left/right is where it starts to flicker
like if he is getting conflicting inputs
You might need to show us your graph. (That said I've never dealt with mouse inputs so IDK how helpful I'll be.)
my graph will be hard to show ๐
its inside a bunch of other stuff
but I can stream it
what if you used Add World Offset / Add Actor World Offset ?
instead of set location
my wild guess is the mouse input values are just -1 to +1 on each axis and you're just feeding those axes directly into a Set Location?
the arrow is the axis value of InputAxis
so im adding the axis value to the location
oh ok, you're doing your own sort of Add World Offset
where's the other mouse axis?
also wow Get All Actors of Class
its just a test
I will move that out
the actor is always the same
this is the other axis
so the first is setting Y, the second X
but this one setting X flickers like crazy
your graph is all kinds of scary, lol, but theoretically it would work. Maybe there's something about mouse inputs that I don't get.
or maybe your execution flow is weird
but try detaching what you have from execution and try... Event Tick --> Add Actor World Offset
with Get [name of your input axes] both plugged into the X and Y respectively
I fixed it
the problem was the "Negate" node I had in the first graph
was a copy paste of a SetRotation graph where I needed the Negate for other reasons
oh, lol
thanks anyway for your input @tight schooner , when you said it should work, made me focus and find the issue
@haughty ember What would I do with this? i'm sorry i'm new to blueprints
timeline hype
@jade widget other way around; 1.0f - the value. It has the same value as if you go into the track of the timeline and set the value from 1 to 0.
It's more math than blueprints, but yeah you need to get used it.
And you just plug it instead of using Door Open
@tight schooner and for good reason.
yeah, opening a door with a nice animation curve is a practical use for timelines
@odd ember
I've been messing with for a bit
Can't get the movement input to work at all
it does nothing
what are your values?
I've tried all sorts, low, negative, 100000000
50000
scale = 1000
scale = 1
The ball moves with force tho
you're using this node yes?
yup
Wait a sec
Hmm, I think I see an issue
So I have my CMC
I put it on my pawn
my pawn spawns by a player start
So I noticed that my InputAxis for A and D doesn't work on CMC
but it does on my pawn
@odd ember ^
that doesn't make sense
wait
are you using a cmc on a pawn?
and not on a character?
yeah but that's not how it works
you need a character
and I need the physics of a ball
Hey! just a quick small question. Does anyone know a way I can hide the third person character template model? I made the camera zoom in so it's like first person but when I look down I can see feet. Any fixes?
Please tag if responded! :) thanks x
anybody have a good trick to get smooth CoD/Battlefield/Mirrors Edge vaulting and climbing without using animations?
Best I can figure I should be grabbing the capsule component and just translate/rotate it with math and timelines?
timelines are probably your best options since you have direct access to a curve
Could someone possibly point me in the right direction?
I'm looking to spawn a small mesh at the end of a linetrace that occurs constantly when a weapon is equipped.
The question is this: How would I go about using the impact position of a linetrace as the spawn, or socket, of a mesh?
on hit location from the line trace
you probably dont want to spawn it every time, better to keep one around and move it where needed
break the hit result, get the location (if that's what you want) and promote it to a variable. set it to a name that makes sense, like "TraceObjectSpawn"
i think
sorry sorry, get hit point, not location
So spawnactorfromclass on weapon equip, save the hit location as a variable, and mark it as, per say, "lasersightlocation"
hit point, got it
"impact point" on that node I think
you can do a lot with line traces, but keep in mind that they can be HELL in replicated systems. Can be very very expensive depending on player count
Thank you. What kind of node should I use to tether the mesh's movement to the hitlocation? Also, I'm getting the impression I shouldn't use this on my weapon's event tick, so how should I go about having it change? I have a DoWhile(TrueOrFalse) Macro that I could probably implement, just not sure if it's feasible
Don't need any replication here, purely singleplayer.
I'd actually recommend doing this as a VFX trick, not game logic
I'd be open to that, I just have no particular knowledge about particle effects.
i just have a mesh which is two planes in an X pattern, with a translucent red mesh
As a diagetic version of a crosshair for most weapons
no problem!
Something in my blueprints is eating a mouse click event (but not a release event). Is there any way to follow a mouse click event from when it is generated in engine code through the code path it takes?
How could I make a speed limit, this is how I give the player speed. Which is just a ball.
@twilit lily clamp ?
is it possible to make particles behave like decal components (blend with the surface of objects
@trim matrix Clamp the return value of the vector?
After that last node, I would clamp its velocity.
Oh wait.. im dumb
lol
Rival I'm not using any character movement
It wont work with what I want
There's plenty of ways to overthink this, but I think in this case its just easier to just go with what the easiest solution is :)
Dang, that stinks. What was the problem with using a CMC?
Well, the simple fact its inherited to the character
and forces me to have capsule comp
so atm I'm using the ball template from unreal
with some minor changes
ah, gotcha. You could set the half height of the capsule to the radius of the ball and you'd have a sphere :)
but if that ball template is closer to what you want, definitely go with that
It is a bit easier to manipulate
plus the CMC has a lot that I dont need
let me give you an idea of what I'm trying to achieve
Oh, with that max speed thing- if you also want to clamp speed due to gravity, you'll need to clamp speed in tick instead of after adding the force
Hmm
Otherwise I could see some funny things happening where you're falling with no input, gaining crazy speed, then when you add input again suddenly your speed is limited and you come jerking down to a slower speed
oh wait- I think InputAxis calls every tick.. So its already ticking that lol
Never heard of it
Oh well, its more or less what I'm aiming to create
Red Ball 4 - Gameplay Walkthrough Part 7 - All Levels (iOS, Android)
Red Ball 4 Walkthrough Playlist - https://www.youtube.com/playlist?list=PLGtZwVE-T07tN_f33ARzcSXivxbFKkbFa
Subscribe - https://www.youtube.com/c/TapGameplay?sub_confirmation=1
Facebook - https://www.facebo...
like 2D gravity platformer or something? Can't watch the video atm
Yeah more or less
You just move a ball around
oh and inputaxis does tick
So I'm still unsure as to how I can clamp this exactly
physics was never my strong spot
Does anyone know how I can fix this error my project wont open any more
something like this should work @twilit lily
You could reuse that CharacterMovement pin if you like the look of that better too
Oh, you're not using character movement lol
give this a shot @twilit lily
That capsule component is just whatever your root component is
in my case I was already in a character, so it was a capsule
Works perfectly
Thanks @spark delta you've been a great help today
Let me know if you ever need any help ๐
That's my secret- I always need help 
Haha xD
That should clamp the magnitude but keep the direction
You can also clamp2D if you want to just worry about 2 dimensions
Hi guys, anyone work with level sequence?
Mine would play but it won't fire the events unless I went to sequence editor
@trim matrix maybe?
I will try that ๐ thx
@trim matrix where do you find that?
Also my event fires with no problem
but I had to bring the sequence to the editor
it will not fire any event when I open the project and just play the level
oh, I may just be wrong, I vaguely recall someone recently went through a similar problem, and that was their solution. It's basically your variables on your blueprint, if the sequencer should have or not access to said variables. But I may just send you on a wild goose chase, because I don't use blueprints only C++ actually...
ok ๐
Is it possible to throw an isvalid on pawn sensing to check to see if any pawns are in the blueprint's line of sight?
Hello everyone. I'm in the process of creating a leveling system for my game. What I am having difficulty with is adding a skill point after every other level without it adding 0.5 per level. What would be the best way to achieve this?
The simplest would be to use % modulo, right? ๐ If the level is divisible by two, do something, if it's not, skip something. You can also look into data tables, it may be overly complex unnecessarily, but depends on your design goals @potent citrus
I have a question, if i wanted to play a sound when my enemy is looking for my player, would i put it in the controller or behavior tree?
@trim matrix There should be a behavior tree task to play sound already available...
So I guess you can add it to the behavior tree
how would i stop it from overlapping?
Didn't try behaviour trees yet, but maybe a delay?
There are several different states for checking the status of our behavior tree node: start, in progress, failed, completed
is it possible to create a new task for playing a cue or should i just use the built in play sound?
ideally you would have a decorator that checks a condition, and play the sound only when start stage is about to kick in
it depends on the overall design, if it's a simple game, you can bypass behavior tree entirely
what do you mean bypass?
Don't use behavior tree at all
all it is is a robot chasing you around a house and you gotta escape before he kills you
but if you have an AI controller actively required for a proper flow of the game loop, then a behavior tree is an elegant solution
in its simplest form related to behavior trees, a decorator is a condition that if it's true allows a task to start running
if the decorator check doesn't pass, the task doesn't need to run and is skipped until the decorator check passes at some point later
You can use a decorator check for: is sound playing?
Or a decorator check for: did I start looking for the player, me the killer robot ๐
@trim matrix
Ok question
let's say i want to add in a stun gun to make the robot flee whenever it is hit
is that possible with behavior trees? Also #gameplay-ai please
Guys, newbie question. Why is my mouse still showing after I set mouse cursor to false?
Hmm seems like I have to set input to game/ui only and hide mouse on capture
How do I replace the inherited movement component in a character class?
I see, so the inherited movement component is just written in C++ and inherited in a C++ character, then you create a BP child class of the C++ character?
yes
Depending on what you want to do, you could set the movement component to "custom movement" which effectively disables most of its movement related logic
it doesn't but it would allow you to do movement logic yourself (again somewhat depending on what you're trying to do)
Hi, how do i make that a npc, only takes damage if the player its him in the head?
but only that npc
hey guys, in the pic attached Im trying to fill an array with vectors, then check each one of those to not be close to another (else replace it and check again)
after that spawn meshes for those vectors
somehow i have an error in there that i cant seem to identify, I guess its in the middle part
maybe someone sees it instantly =D
@trim matrix a sphere component around the NPC's head, query collision against it, if it collides with a weapon or a fist that belongs to the player, apply damage, maybe?
gonna try that
thank you
how do I make it so that i can move the crosshair freely independent of the camera
like an on rails shooter
@blazing ridge I'm having trouble seeing your execution lines in that screenshot, but what I am seeing is two foreach loops and then a, uh, manual loop. You may want to look into the "loop with break" nodes.
Doing manual loopbacks like that is hacky and not guaranteed.
hey whats up everyone ๐ I was trying to make my tree fall in the direction my player is looking with a timeline with a float value, but I cant get it to work... can someone help me? https://gyazo.com/e1dfa2214f34588b03e29df9bd3c0e14
usally i would do it like this but with this way, the tree only falls in the same direction every time
@opaque elbow you are using a fix variable, how do you expect it to magically falls into the direction of the player?
fix value*
what do you mean by fix value?
no
it will output what ever u have set in the timeline
can i look inside your timeline?
just not in the direction and I dont knwo how
yes
here 2 sec i'l take a screenshot ๐
let me guess tho, the tree falls into the same direction all the time, no?
yep
yes because it's only outputting the value on w/e u put in the timeline
for example X might be 0 - 100
so tree falls on 0 1 0 then 0 2 0 then 0 3 0 and so on until 0 100 0
@tight schooner yeah thanks, that helped. i changed it so im using a breakloop now. however I think i have another issue with the equal check im doing.
im not the best at vectormath or anything like that. but im trying to get it so the meshes i spawn are not so close to each other.
so what im doing is I check if the generated vector is equal to one thats already in an array. But i dont know if that check is really doing what i want.
my tolerance is set to 0,01 and i tried some different values but cant confirm that it works
I am not sure if you can dynamically change the value on timeline
I want my tree to fall in the direction the player is looking when he has cut the tree, but when it is falling the tree doesn't follow the player
ok
im not sure how to do that tho..
U have to do something with forward vector i suppose...
how do i get the look at rotation?
Find look at rotation
then since u just want to rotate in one axis
split the structure pink
and get either x y or z... im not sure which one untill u try
Start is the tree location
target is the Player location
nw fam let me know
Oh btw
Take one of the value (X, y or z) im not sure which one rotates
Then invert it
So multiply it by -1
ok ty ๐
if it's the direction the player looks in just take the pitch of the findlookat
you don't need the other values
so is there some way to animate the set material node so it changes between 2 materials smoothly
maybe blend with a timeline idk
@oblique gyro I am blending 2 textures for my cooking game later on
dunnoe about 2 materials, i mean most likely there is, but I am really newbie at these stuff
What are you trying to achieve anyway?
when a projectile hits a shield it changes the material to a red one then back to the default one
i want to make it smoother so it doesnt just snap
I don't know how you plan to do it but if I were you, I would make material instance where I can control the color
from there on, i can just smoothly change the color with timeline
yea
share the screen shoot
like of what
your material
the mat bp?
yes
sec
If it's as simple as overlaying color, deffinitly use parametre
Ahh yeah man
that's easy...
Right click on the blue color
Make it a parametre
Convert to parametre
U have to make material instance first
Rightclick on ur material and click create material instance
yea ik
of?
yup
btw can it be fix value?
as in
it will always be blue to red
then maybe red to blue
yeah
but not any other color
yeah
which
If u want it to change to other color, i think there is naother way.... but u cant use timeline unless it's a fix value
Make timeline in your bp
i dont know where u want to put it
on ur player/target/
Obviously on the event where it take damage
player
yea make the timeline where u see fit
i would say when player take damage
Right click add timeline
yea