#blueprint
402296 messages · Page 632 of 403
@faint pasture Hmm I guess I'm not understanding the core concept. Each one of these actor BPs are identical except for the duration of delay before the destroy actor node
You are saying I should only have 1 BP here
Yes absolutely
and the duration delays should be set via the class settings
no, it should be set by a variable inside the class 😉
It probably doesn't even need to be a variable, you can probably just set lifetime right after you spawn it.
What determines the duration?
Duration is 1 of 6 values (100ms to 600ms in 100ms increments, 100, 200, 300, ..., 600 )
I would do some sort of actor pooling but I wouldn't worry about that until you get your stuff sorted out. But is the duration random? Like when you spawn one, is randomly one of the six values?
If so, then after spawn, get random in in range of 1 to 6, multiply by 0.1, set lifetime.
No I have all my actors in an array and then shuffle them
They just put a bunch of floats in an array and shuffle that
I didn't want them to appear more than once but I wanted them to be randomized in order
The task is an object appears, all objects appear once at each of the 6 durations, and the player responds.
Yes so just shuffle an array of floats from 0.1 to 0.6, and then for each float, spawn the actor and give it the lifetime
Is there a way to avoid duplicates?
I think you are missing some core concepts about how to build this. It sounds like it can all fit very easy into one blueprint. You don't even need to spawn actors, you are probably okay with changing the static mesh value of a static mesh component x)
Oh I'm FOR SURE missing core concepts lol
except some of your objects are skeletal meshes or special in other ways 😄
Yeaaah some are.
Some are animated, the African Animals Pack from the UE Marketplace
okay, think about it. You just create an array of static mesh references. then you have your different objects all in that array.... then you add one static mesh component.
you can just use "Set Mesh" or "Set Static Mesh" (don't remember correctly) to set the static mesh to any of these objects. and this is what you do basically.
okay, if animated and static are mixed, this doesn't work, but you can still create an array of all the different classes you spawn. Or better. Create A Class named "MyObjects" and make all of them a childclass of this object to inherit some values you might need.
Do you know what documentation I should be looking at to explain this?
maybe search for something like a item spawner?
In this video we create an item spawner class that you can use to spawn an items you want. The principles here can be applied to anything you want to spawn, not just items, but things like AI, buildings, etc.
Also is there any negative impact of the way I'm currently doing it other than it takes a long time for me the manually enter things? I'm trying to get a working project to my boss ASAP, so I'm thinking I'll chug a pot of coffee and enter in all these models manually and use it for pilot testing while I figure out classes.
@frank rover ok thanks!
if it works, it works.. the negative impact will come later when you have to add something to your 10000 classes manually. <_<
Hey! I'm using the "View Target With Blend" node to jump to a sequence, but when it ends it jumps straight back to my player camera. Is there any way to make the sequence blend when it ends too?
yes, that's why you don't do it. <_>
hahaha yeaaaah...
I'll figure out how to work with classes, I'll manually upload my heap of models tonight. Get this off my desk so I can figure out how to work with classes.
sighs
No I will figure it out.
Because I'm going to have to build more complicated gameplay in the future
I just find it really difficult to grasp new concepts, it took me a week to sort out recording mic input.
It's like 6 nodes total... Took me a week...
yeah, it's pretty hard to get this in your head, I understand... the question is: why are you in a situation your boss demands something from you, you cannot deliver? :/
Post Doc
I literally get asked to do things I have no experience in on a daily basis lol, I just do my best. You'd be surprised at how many things in life you can accomplish through a combination of brute force and no sleep.
if all you're doing is attempting to spawn various things from a list, and doing so randomly from that list, I would highly suggest just creating a structure and a data table based on that structure, then you can have one blueprint with both a static mesh and skeletal mesh component that handles the display / removal of meshes. Then all you have to do is populate the table with the meshes & duration that you want, and in the one blueprint handle the behaviour of what happens.
Set up your actor like so.
Event Graph:https://blueprintue.com/blueprint/9bs-ml4v/
Display New Item Function: https://blueprintue.com/blueprint/0t5wkyj0/
Clear Meshes Function: https://blueprintue.com/blueprint/s_0eg-6a/
After creating your structure, you can create the table and populate it like so:
So it may still take some time to populate the table, but you don't have to constantly create blueprints and put them into your array.
Can I copy an actor in a blue print?
Do you mean spawn another actor that has the same variable values as an already spawned actor?
Yes.
No. It requires some C++ to do it.
Well, technically, you could in blueprints, but then there's lots of manual variable setting that has to be done 😛
Hmmm, I'll try to think of another work-around then XD
AActor* UGDBlueprintLibrary::CloneActor(AActor* InputActor, bool SpawnAtSpecifiedLocation, FVector SpawnLocation, AActor* Owner) // Note: put a U before the name of your library
{
UWorld* World = InputActor->GetWorld();
UE_LOG(LogTemp, Log, TEXT("Actor Duplication"));
FActorSpawnParameters params;
params.Template = InputActor;
UClass* ItemClass = InputActor->GetClass();
AActor* const SpawnedActor = World->SpawnActor<AActor>(ItemClass, params);
SpawnedActor->SetOwner(Owner);
if (SpawnAtSpecifiedLocation)
{
SpawnedActor->SetActorLocation(SpawnLocation);
}
return SpawnedActor;
}```
I had it in the project I'm working in and was easy to find 😄
be warned that Template has some weird quirks, might be fixed now, but it had issues with components before
May I vent for a second?
"I really really hate this god damn thinkaround20corners event discommunication hell"
..
Thanks..
No worries.. I am fine - i just try to understand Event Dispatchers for a week now
easy, just use something else
until you do
and then when u do, keep using something else lol
And not even the red haired Epic guy was able to explain it. Well yeah its horrible because - I somehow understand why all that BP communication exist.
But all docs, all and everything tutorial is about hey switch a light, open a door, pet a dog
But actually holding a key to make a progress bar fill till 100% to call another widget...
(think of the Cyberpunk main menu..like)
hold to start
I got totally lost on terminology where to actually say how to fill up that progress bar. I watched a tutorial with using a similar behavior for collecting something. I followed every step. But then, the guy fires up the game and everything works.. and mine is dropping a Accessed None trying to read property -
And yeah I have 30 tabs open about that error and I am aware that I have to reference the widget inside my player controller (which is not a character controller). Indeed I have an ticked everything on instance editable and expose on spawn etc
( this is when you see an pure artist going mad on blueprint stuff.. like a cow wants to play guitar )
--
In short terms (Main Menu Level):
step 1) on begin play in a level blueprint, I create a widget with a progress bar
step 2) inside the player controller, I have an "any key" with a boolean for "is held?" yes no on pressed and released
step 3) This is where I am stuck. Where do I tell the "any key" function to fill up the progress bar from 0 to 100
step 4) destroying the widget and creating another one - that works
@lavish rose sorry, I don't know.
I m just trying to attach an interface
but this seem to only be possible via teh class options ..
from the physics constraint component how do you call out the parameters from Swing Limits
So if you look on the right panel you see Stiffness @ 4000 and Damping @ 1
I want to call out these parameters especially the Damping Parameter.
is there some way to get the difference between two quaternions?
would multiplication of one with the inverse of the other work? 🤔
chiefs, does anyone of you know how i can have the same random object from an array on a sever?
Howdy fellers, I was curious. Is there a way to write async blueprint functions without C++?
I need that random to be the same on every client
@spark steppe wouldn't you subtract two quaternions?
no
well hence the keyword "difference"
yea, but quaternions dont work like rotators
just googled it, seems like multiplication with one inversed is the way to go
Hi! I'm curious about the subtlety being those three nodes. What the exact difference between them?
The first one is the most, and I'm guessing it's just testing if the object implements the interface then call the function on it.
I'm curious about the difference between the second and third one.
Especially since they can both be called directly on a reference to an interface of the right type
the second and third are just calling it on the different bases

the same function
one is the interface, the other is CH_AI_Base that implements that interface
but why does UE generate two of them? What doesn't it simply have the second one?
cause its part of that class
that is also how it works in C++
idea of interfaces is you don't need to cast (you don't care what the object type is)
Thank you for your answer. What I don't get is why wouldn't I be able to do without the third node? To my understanding I could always call the interface call and never the one that target Ch Base
its just the way BP generates the nodes
it's weird that this is working aha
Alright, thank you for your time. I was just curious about it
@unique shuttle marketplace plugins, but otherwise no
How could I get a player close to an effect / inside a particular vehicle in order to only apply a camera shake to it? i'm modding a game and, while i underestand more or less what i have to do I think, I'm at a loss of how to do it and could use some tips- current problem is that the camera shake is applied to any player, regardless of them being inside or close to the vehicle or not
thank you.
also what is this? i've googled it but couldn't find much
google shows loads of results for that
ye i found more stuff but it doesn't seem to have to do much with what i'm looking for
i'll keep trying but if anyone has any idea they'd be welcome
@trim matrix i just realized if im being annoying then just try to teach me to be more well less annoying 🙂
i mean it would help me out too
and i am only 15
and again sorry that i did
sorry if that sounded rude i actually mean it if u wanna help me out and help me become less annoying then sure
ill go for it
Why blueprint is limited when it comes to importing files from desktop
Like runtime import system
Anyone help me with a level streaming issue, player is falling below map, because the tiles are not loaded yet.
i wanna enable sliding
this is all i could get
:/
tutorials are a struggle cause they give me many like useless stuff
i wanna make it quick and short
i got crouch working
its just no video gives me a quick and easy capusle sliding
but with animations which im not trying to use
hmm?
Hi. If I have two vectors (my character location and the location of my mouse pointer), and I want to find a vector that is 1000 length away from my character but on that same line... how would I accomplish that. I hope that makes sense the way I explained it lol..
Hopefully picture provides clarity.
OMG I HATE THESE DUMB TUTORIALS
they give me long and not working or outdated stuff
i dont like this
- You'll probably want a bool being set called "IsSliding" which you should set to true when you press the key, and set to false on released.
- On your movement input, check for "IsSliding", and if set to false, only then allow it to continue with the movement input (basically blocking player movement input)
- After setting the speed, similar to how you set the Walk Speed, set the Braking Deceleration Walking on the Character movement to a low value, (maybe 512?)
I haven't done this myself, but I believe this will give you a slide effect where the player will continue moving in the direction they were moving, and gradually slow down, but prevent them from moving in any other directions.
Oh forgot #4) make sure to set the braking deceleration walking back to normal on the release.
alright thanks
i can do number 1
number 2 im confused with
is it alright if u can show me an example
im new and trying to add this XD
bruh
ok i see how it is
yeah but after that im supposed to do more
is this a right direction?
then i need to add a movement input add im guessing
he said movement input
i dont have the blueprint block of it
so i dont know which direction
what is it with people deleting their messages
xD
but its like htis guy gives a simple example of what something is and then like it still didnt really show what i have to do
then he deletes it
or something idk
might be cause its part of the rules not to share work ig?
k
and again with the deleting -_-
clearly someone is deleting messages
idk
will u not
xD
sorry i was having a different issue and then figured it out immediately. I just needed to use a timer by function
well if someone could help me with why i cant seem to create a slide blueprint then my dms are open
i have to head to bed now goodnight
Is it possible to pass an object variable through a blueprint interface?
I have a linetrace by channel set on my Character blueprint, it stores which object it hits in a object reference variable. I want that variable to be accessible in other blueprints ,for example, door blueprint, so if the cast object matches the linetrace that I can perform certain operations. I've looked up a bunch of interface tutorials, but they mostly seem to be used for events, not specific references or variables. Is there a different way to do this, or am I just missing something?
Yes, you can pass object references through interfaces. Normally what you would do when interact with a door is have a generic "Interact" interface that the door implements, and you'd have a line trace done to the object in front of you on your charater's "Interact" input. Then your line trace object result is the target for the interface. Then on the door, you'd make it perform whatever action it should.
Example:
On the door:
Variables are pretty much always available to any other blueprints (so long as not marked private in some way), and so long as you know how to get your reference to the object in question, and there's so many different ways to get what you may be looking for.
Oh my god I got it
Character Blueprint
Door Blueprint
Idk why it wasn't working before, lol
I swear I had it set up this exact way before 😛
(The blue Door Param) correctly updates as the object from the Character blueprint linetrace
Thank you!
Ah what the hell. It only works on the one original object. If I delete the door blueprint and place a new one, it totally breaks... AAaahhhhh
The question is, why do you need every door to know what the player is looking at?
Preferably I only want to send a message to the object I am looking at, which is what I thought the target node was for, but it's literally broken and I can't get it to work anymore, despite the exact same setup as earlier
Yes, that is what the target pin is for. You're passing a message to whatever object you pass into it.
And so long as it implements the relevant interface event/function then it'll do what you've told it to.
Do I need a unique blueprint for every single door? If I accidentally delete the door and replace it, everything breaks. It's almost like it only responds to one blueprint ID, no matter what the target is
It works if I duplicate the blueprint in the content browser so it's a unique asset. I just have to be careful to never delete the actor from the scene and replace it again
are you resetting your Object Looked At Variable when you delete the door? I'm assuming you're trying to pass in a reference to a door that no longer exists, but that shouldn't be happening if you're clearing/resetting your variable properly. Without knowing how it's set, it's hard to give the best approach to handling that.
Okay, good tip. I'll look at that
wondering if it is even possible to communicate with blueprints at tick-rate?
Try it
it crashes if I do
just was wondering if its possible with BPs
with some magic I don't know of
Not sure what you mean communicate with blueprints at tick-rate? Like, trying to call something on a different blueprint on the event tick?
yes. I'm currently sending data to the level, via an interface. Its generating a grid level, which would be nicer if I could speed up more. Currently I'm having to restrict tick (communication) speed, so it wouldn't bug out. However, I'm also considering to merge the two blueprints if nothing else.
So the thing is, you can communicate between two blueprints on Event Tick, but I guess it depends on how fast you have your tick set to. I tried a direct call to an event, an event dispatcher and an interface all on tick (set to 0.0) and it communicated just fine. I believe the problem you are probably facing is relating to what you're trying to do on tick.
hm
Yeah, in the abstract two BPs communicating on tick isn't going to destroy perf
But if you have a thousand actors all ticking and communicating then...
well, theoretically, only one pulse should go per tick to the level BP, as I'm sending it from the Controller. So its 1 to 1. But for some reason, when I increase the grid size, and coincidentally the length of the array (which I'm sending through one-by-one), it just straight up crashes (proclaiming that its an infinite loop). Been fighting this for weeks now.
ok, so why does that need to be done on tick?
Wait for what for 30 minutes to complete? I'll take a look if you share.
the bit I'm trying to solve, is to reduce the time for spawning the edge of the map (highlighted in red cells). which now takes the longest. Also, the way it is set up means that I've to manually copy a lot of variables, and thought to save some time (or for future applications)
This time, all effort went into making the code more optimal and efficient.
Precursor for turning this https://theaaronstory.itch.io/flod ARPG prototype into a full game! (if funded, which it might be the case?)
it starts around 1 minute
HI guys, I have a .csv table successfully imported and I've been trying to set text box values to the cells in one of the rows.
I am having a ridiculously hard time getting anywhere with it. I've been looking online and trying things for almost 2 hours now.
Can someone tell me what I'm forgetting here?
here is the table
I am trying to use the AttachToComponent to pick up a weapon but it has no effect - I tried to disable the physics after weapon pick up but it seemed to have no effect..
here is the Designer view for the widget...I want the headers in the left column and the values in the right column (for the character whose key is "100"):
And here's how far I got with the blueprint. Which is, nowhere:
(all the nodes on the right are just for the row values for the moment)
Still not really sure why that has to be done on tick. If you have something calculating data or you have data on the controller, pass it over directly. I don't think you need to rely on tick to do this at all.
and how would I go about that?
Well, I'm not sure how exactly everything is set up, but I imagine you have a reference on the Controller to the Generator, otherwise you wouldn't be making calls to it already. You want to do something similar but handing over the full array, and on the generator, have it do a for each loop to get each reference and then you'll have the individual elements you may be looking for - so then you'd call whatever function you were calling on tick previously in the for each loop instead.
You're on the right path. I take it TB Val## objects are widget text boxes?
yeah, it's gonna be something stupid I know it
I tried doing the binding thing but I can't make it work
pain for 24 values though
wish I could just do it right in the graph
\
You verified it gets called?
yep
the generation is happening in the Controller itself, so I'm not referencing anything else. There's some cell communication back and forth (with the controller), but that works fine. the issue comes when used with the level itself. Using interface comm would be nicer, as to using dispatchers (which would constantly update the entire chain in the level, tried it before)
I thought the SET node was my destination
but I needed to extrude the SetText(Text) node from it XD
@dawn gazelle thank you
Yeah it's tricky cuz the "Set" in this situation is setting a reference to a widget component (which is not what you want!) you want the text within the widget set 🙂
Maybe it can’t attach because it’s not the owner of the weapon actor
hmm what does that mean ?
I think it only matters in networking, ignore my bad guess
@lavish rose Does it not move at all, or does it get dropped after pick up? If the latter, disable physics before picking up, not after.
I was using vanilla meshes, I imported an external one and it seems to behaving a lot better
so I must have done something wrong with the meshes
probably
Ok, regardless of what does what where, again, I don't know how everything is set up, but you shouldn't specifically need to do something on tick unless it's something that specifically needs to update something on the frame tick (or at the specified tick time defined on the BP).... Like motion of something that you want to see move really smoothly. Data just being fed from one place to another shouldn't need to be done on tick. Give the thing the data it needs with one event, interface, or whatever when it is ready to be fed into the next system.
Is it doing something like below on tick, or passing over all the data on tick?
@lavish rose Meshes won't matter in that regard, they're just visuals. The only way that would make a difference is the collision difference. Usually you disable collision on the weapon at least against it's holder's collision type.
hmm I see
I found out that if I enabled physics ithe script stopped working - even if I disabled physics before I equip it
So, I take it somewhere after the "Save Walls" node you have, it calls the "Loop" event again?
yep
And the "Location Array for Duds" I'm guessing has array element 0 removed before the next iteration?
yes, at the end, it removes the one that it sent
reducing the array length
I also made sure that the interface is specifically used by the level, so that when I call for the get all actors with interface, will not lag the code (as the length of that array is 1)
It's bad. It still gets every single actor in the world and checks each to see if they have the interface.
aha! that's a bummer.
So if you do that repeatedly, it'll tank
yeah, thought so that something similar was happening, so I started to copy the code from the level while we were talking
so technically there's no good way of doing this
Does the location array for duds increase at all during the loop?
no, it stays static. only decreases. I've ran into that before (when first working with for loops)
Ok, then for sure that could be done as a foreach loop. The problem likely exists because of the get all actors with interface node.
hm. yeah, the reason why I didn't use a for loop, because that's also constantly crashes, when working with larger arrays
But then the question is... Do you need to get the level blueprint each loop? Can't you get it before the loop starts?
Also, just to make sure, the retriggerable delay isn't hooked up on the event tick line is it?
the reason why was set up like that had to do with the fact how it was initially made, using level streaming, and only modified the code where needed
Single player game, yeah?
no, it's not hooked to an event tick
so the main reason to use the level BP was to organize things, or I thought that it was a good idea
OK, so it looks like that moving the code to the Controller didn't fix the issue
This should potentially fix it.
it still crashes, if I remove the tick delay
just a moment, I'll try with reverting to loop with For each
just takes some time, I've a slow pc 😛
yep. still crashes. with an array length of ~2000
with no delay
Did you move the get all actors with interface out of the loop?
that is
yes, now it directly writes and reads in the controller
and it's not that I'm doing any heavy calculations with the array, that would trigger the infinite loop detection. But for some reason, Unreal hates large arrays.
I hate them too, lol
so its been a constant struggle
Large arrays work fine. Can you show the logic flow of the whole function loop as it sits now?
For instance. This runs fine.
😉
Tanks my FPS by about 40 from 55 to 15, but it runs fine.
just add an other zero to the max loop iteration count and see if it works... sometimes I encountered strange behaviours with for loops having a lot of stuff in them....
Interesting
@dawn gazelle I have my widget up and running but it isn't updating? Could the problem be that I don't have bindings?
Well, you don't have the get data table row hooked up anywhere.
Might want to put that on construct
please don't hook it not up on tick 😄
and you don't need all those set nodes in the middle. they're doing nothing
and I'm not sure why you use the Set node instead of the get node, and I'm not sure what happens if you set the text widget to nothing ^^
You want to get the reference to each of those things and plug them into the targets
usually if you see a BP like this, you should work with Arrays to make it more readable ^_^
I just tried using an On Construct event, feeding that into Get Table...and my computer almost crashed. Program froze
let me see
increasing it only works if the active actor count at any given moment doesn't exceed a few hundreds. otherwise it crashes. Tried it before tho'.
yeah, I get that all the time, which is frustraiting
anyways, not it works instantly
okay ... woow, that's a lot hooked up on that node...
had to 😦 that was the reason why I didn't want to merge the code
how large is the array?
so yeah, it works fine inside one blueprint, but not if I try to use interfaces
like you cannot spawn 1000 actors and do 1000 linetraces and call some interfaces in other objects that do stuff at the same time x_x
@dawn gazelle yeah, I got an infinite loop
you should maybe use a delayed for each loop (it's pretty easy to build) and only loop like 10 cycles at a time using modulo
depending on what you feed it. It can be a couple of hundreds, to whatever size you set it to (currently its set for 200 iterations, which results in around 2000 edge cases, but it varies from case to case, as the map can be smaller or larger, depending on generation)
used delayed custom loops, but got the same issue with interfaces
Not what I meant at all. Get rid of the sets.
@exotic shore why are you not plugging the Get nodes straight into the settext? 😉
anyway, thanks for helping, y'all! @dawn gazelle @frank rover @maiden wadi
So you did get it working? And its faster?
@teal spade what happens behind the interface function you are calling and on how many objects you are calling them?
I loaded 7600 star systems with a delayed foreachloop and populated a map with them....
now its almost instant, this loop that is
😄
I was targeting the persistent level, so had to use get all actors... which is slow ( @dawn gazelle just checked the source ; also tried dispatchers...
Better 😉
still stumped on those headers though
I can only reach them with a for loop it seems
Or rather, once I have them, I am forced to use a for loop?
couldn't find a way to feed those values to the other text boxes. Can I get another hint please? 😛
@teal spade why do you need all actors? I think you should use a subscription model to make every relevant actor subscribe to some system that manages them if you need to call it multiple times. This way actors that vanish can be removed from the subscriber list and not get updates from the system and new actors can subscribe themselfes anytime.
Should be similar to what you've done already. If you don't see the components as variables, go back to the designer and click the Is Variable checkbox
no, I've done that
I had, can make nodes the same as here
it's getting the headers though, it outputs different
from the table
It was a relic in attempting to get the level blueprint - he basically had an interface that only the level blueprint had and was getting all actors of class with interface, which we discovered still gets all actors and iterates over them to find the interface.
and that was within the loop
I've only seen it accessed with a for each loop:
i was following a tutorial online and whenever i try to compile, it gives this error
i made an interface with an input and added the interface to an animation blueprint
@dawn gazelle thank you for all your help so far
it pretty clearly tells you where the error is, doesn't it?
it does, i even redid the whole thing to make sure i did everything right
oh my god why is it working now
pain...
also known as the "Lava flow" anti-pattern 🙂
hey, is it possible to get the location of the player regardless of the character its controlling? like get which one player 0 is currently possessing and then get the location of that one
get player pawn - get world location? 😉
GetControlledPawn in PlayerController
@hardy bough subtract location from character location and normalise the vector you get, then multiply by 1000
nice spgetti
haha
hello someone is good at making local multiplayer inputs ? im trying to make a fighting game where you can control second player with controller but when i open my level blueprint and create player node , the second character doesnt move when i use controller..
managed to generate this layout in just about 01:10, each cell is about a feet in size, to give you some form of perspective (sadly, it ran out of grid space, hence the missing part on the right)
previously it took 4 minutes to do so
tho' loading is still iffy (with world comp), probably because I'm flying too fast around
hello someone is good at making local multiplayer inputs ? im trying to make a fighting game where you can control second player with controller but when i open my level blueprint and create player node , the second character doesnt move when i use controller.. @here
@fair sun Not exactly. The debug stuff is removed from the engine files when you cook for a released version. Usually for lines or whatever like that in the same manner as debug stuff, you'd create something like a Niagara particle system with a ribbon emitter. However, it is possible that you could maybe also use DrawLine in the HUD class by projecting world locations to screen space, but that line will be in front of everything like someone marking over a projector rather than like a laser pointer in mist.
Get player pawn return the current player pawn. Doesn't matter if you possess something else
How do you get the width of a widget before a function executes? I've tried ForceLayoutPrepass and delay, delay with a 0.2 delay works but that creates a lag between when the player clicks and something happens.. I've also tried getting the width on tick, but the function is executed before tick runs so all I get is 0.0 as the width. What is the correct way of doing this?
ue4 cant have 60 Or nodes?
😆 sure, maybe with some cascading gates - but perhaps we shouldn't
thanks, tho it was long done by then 😄
@trim matrix like this? Or am I doing something wrong. That doesn't seem to work, but I haven't wrapped my head around vector math yet so I'm probably not doing it right.
Is there a node for this? If not why, i need this so often? Just like „Wait until“...
@hardy bough what does your 'get mouse location' function represent? Can't remember the exact setup but i think top down uses some kind of 'cursor to world' functionality, you need to translate your screen cursor position to somewhere physically in your scene
@trim matrix yeah, thats what the function is doing
and that bit is definitely working well. Have done a lot of other stuff spawning and interacting with that mouse location, so I know that piece of it is solid
Hello guys I have problem with saving the coins that I collected
the code is in third person bp
I want to update them in the user widget
for example I run and collect 2 coins and I die, I want to be saved these 2 coins and then in future I will want to upgrade stuff
@upper adder People usually just use timers. Set timer to go off in DesiredTimeToGoOff - GetCurrentTime.
@trim matrix Where did you populate the Coins variable from? Initial glance it looks like you're saving HighestValue, then calling that function, which is setting CollectedCoins from Coins, but where is coins being set?
hmm good question
the coins variable are the current
the colected coins should be all the coins you collect every time you play the game
But that's in the save game you just created. So that's a default value.
but it saves only these that are from the last game 😦
the default value of the 2 variables are 0
lol
And your current problem is that when you load this save game from slot, the CollectedCoins value that you expect to be 2 is zero?
yep
exactly
idk how to fix it but I want to work
and I think that the system I did should work but 😦
Right. So what's happening is that you're creating a new object and populating it's variables from a text file. Then you directly set one variable, the HighestValue. Then you call that function that sets CollectedCoins from Coins. This object has just been created for the first time, so coins is zero, so now CollectedCoins is also zero because you set CollectedCoins from Coins. So you save that to slot. Now you load the game from slot for the second time around. Coins is still zero, CollectedCoins is still zero. You run the same function to set CollectedCoins from Coins. Coins is zero, so CollectedCoins will be set to zero. CollectedCoins will never be anything other than zero with that function unless you set Coins to be something else other than zero before making CollectedCoins pull from it. Alternatively, just set CollectedCoins the same way you did HighestValue.
aha
the coins bu defaul are 0
cus when you start to run you start collecting coins
it is normal to be 0
I tried to do it the same as I did for highest value but I confused
can you help me?
will be more than happy
sounds like you are declaring the variable, but never updating it with the new coin values
"CollectedCoins will never be anything other than zero with that function unless you set Coins to be something else other than zero before making CollectedCoins pull from it. Alternatively, just set CollectedCoins the same way you did HighestValue."
from what he said above
well another problem might be that (assuming that green line is connected to) collected coins can be less than the highest value variable, which would stop the code from running through. correct me if I'm wrong though, but shouldn't you add the collected coins to the highest value?
@trim matrix Where do you normally store the collected coins value?
I have variable in save game and in game mode
idk where to store
this isn't the same as setting the whole coins?
I won't add the coins to highest value, lol
it checks the current value and if it is higher than the current highest, it changes it
I would like to get some help trying to make a slide character movement
tutorials either didnt work or required some animation but im trying to use it on a capsule
right, it's a bit unclear since it's cut off from the picture so that was just my assumption
they were just trying to hide the beginning
and unerlined what they are asking about
wheres the origin of the actor location
from getactorlocation?
is it the defaultsceneroot?
yeah, sorry
the code is long
that's why I decided to screenshot the most important part
that's it
when i bind my widget text to a function, it works only when its pure. when i remove pure it does not even show up anymore in display
any idea why?
i want to change the text on runtime, and try to call the function when i need to update the player turn
it worked when it was pure..?
bindings only work with pure nodes or variable members
i saw there was an option where i could set as "variable right by the name"
is that the seciont "access"?
cant find it
dont think this is the right thing
ahhh
The Is Variable checkbox I believe is what they are talking about
ye
@trim matrix I got it. I wasn't adding the resulting vector back onto the actors location to get the final draw location. It's working well now. Thanks for the help
ty
Hello just a quick question. When I drag off of As BP Base Placeable and get a variable, will the variable given be the certain object the current item is referring to or the default variable set in the baseplaceable?
The current value from the object passed into the cast.
Ok cool. Thanks.
Does anyone know how to get widgets bottom right corner location? Or maybe just how to translate draw size to unreal units
I am trying to create an interaction system thats multiplayer and I am wanting to show/hide a hovering widget when a client looks at an item but only for that client but I am having trouble with replication. the show/hide seems to happen on every client when i only want it to happen on that single client. anyone know how i can only trigger the event for that single client? not for that client on every other client?
so i have a third person graplling hook using a cable component problem is my cable component is going in the wrong area i dont have a clue why
uncooked asset
best to use https://blueprintue.com and copy paste your BP graph into it
BlueprintUE.com is a tool for sharing, rendering and rating blueprints for Unreal Engine 4. UE4 is a game engine which use visual scripting called blueprint.
or screenshot
Please, can u help me?? My vignette intensity increase at each loss of stamina points but with that 'timeline function' i can't loss just 10 points when i jump, contrary my goal... I think the update output is the problem, can u explain me more about this output, thanks so !
And here is my function postProcess Vignette :
Hi guys, first time on this discord. Is this the right location to ask for some insight?
is ther eanybody that could walk through with me what I can do to make a slide movement with a capsule
i know i cant MAKE people do stuff with me but tutorials arent really working and im kinda needing some assistance with it if noone wants ot help then its ok
if theres a tutorial then i would gladly look through it
but its gotta not use animations
or have to work from a enumeration
just something simple
Ah yes, I've got a tutorial that might help. I to have wanted to incorporate this into my project as I'm starting off with blueprint.
Get the full UE4 Course:
https://devslopes.thinkific.com/courses/intro-to-unreal-engine
For Big Updates & Freebies:
https://www.instagram.com/devslopes/
In this tutorial you will learn how to move actors in your game. This is something you will do a lot in your 2D and 3D games. In this particular game we create blocks that open and close an...
yeah but will it show me how to make a slide movement
i have a simple crouch done wasd movement
jump
There was some content in this video that helped me understand some movement functions.
Oh okay. Let me think for sec.
yeah i still need to look at movement basics and stuff but i just moved a little off of my original tutorial or well udemy lesson just to make a little progress that it isnt telling me how to
You might want to do something like this. In the video they make mention of making a part move from its current position, and translate from that current point to whatever desired position from a given time. You could then make a on click event, take the current position of your character and translate it by breaking and then adding a value to whatever x,y,z axis to make a new vector?
The time setting in the move function could be the slide time, as its the time to complete the translation?
Hi. I have been working with the VRExpansion. I was told there was a simple way to highlight objects with a simple highlighting method like (inverse copy, or custom stencil). I have been trying and still can't seem to get it to work.
Does anyone know where I would link it in the blueprint? and how would I write something out to do the simple highlighting methods.
well all i got was to make my capsule height
half
but i dont know how i can make it slip a little
like from shift speed to like slower speed
practically a apexz type slide which i cant find to create
i have the general idea but i dont know how i can make it so you can start crouching and slipping from top speed (when shift running) to half capsule height
like if u continue to hold the key you are crouched or half capsule height and slip
pretty much
fuck it i can just try looking for a how to make your character slide
Hmm, I don't think I can help further as my knowledge of blueprints are quite minimal as I just started.
im pretty much new XD
but i got the general idea of where im going so im not dumb dumb
Yeah, Ive been just searching simple mechanics like that.
Thats good. Good luck dude.
any ideas why a teleport node could not be working?
yes it has a target, a destination, and a rotation
maybe its linked to a target that isnt what youre using
yes it is, im casting to my character to teleport it to my location
maybe an example can show whats wrong
and i thought i could help bu tnow its already out of my knowledge XD
hey mate atleast youre trying i already appreciate that
im not new but not good
😄
anyways the reason i dont understand this even a little bit is because it worked a few hours ago
K
-
You'll probably want a bool being set called "IsSliding" which you should set to true when you press the slide key, and set to false on released.
-
On your movement inputs (your WASD), put a branch on their inputs, with the "IsSliding" boolean connected to the condition pin, and on the false output, continue with the movement input that you have currently (basically blocking player movement input). Leave the true part of the branch empty.
-
After the bit where you had set the walking speed on the Slide key, and similar to how you set the Walk Speed, set "Braking Deceleration Walking" on the Character Movement to a low value, (maybe 200? you'll have to play with the value to get what you want)
-
On the release of the Slide key, set "Braking Deceleration Walking" back to the default value (I believe it's 2048)
So i am using a cable component grapling hook and my cable is going in the completley wrong place and i dont know why, third person btw
Is your player pawn of the Enemy1 class?
yes
there is a possess node further along the line and it works completely with the same reference
in fact every node works with this reference, except for teleport
So you're trying to teleport a Third Person Character actor to your player pawn?
yes
and that Third Person Character is already spawned?
yes
it goes like i spawn as third person character, then possess enemy1, and then i want to possess third person character again, and while im using enemy1 third person character is stored under the map
Does the character have something to land on under the map? Like, normally they would continue falling (unless you have no gravity of course)
and there's also a Kill-Z which destroys actors that touch it under the level
it doesnt but for some odd reason hes not falling
i can tell because when i possess after the teleport node fails i start falling as the third person character
which obviously wouldnt happen if kill z was a thing
i mean it is im just not interacting with it
right... hmm
right now im trying to set a variable in enemy1 and check if it is activated in third person character and if it is then third person character gets teleported there
Anyone?
UE and BP newbie here, trying to do something that respects the rules of “good programming”. Everything I’ve heard so far is “try to avoid running stuff off the tick” - what I need help with, is I need to check stuff on a regular basis (ex every hour build a list of stuff to do)- and then check at a higher frequency (ex every minute to do the stuff on my previously created list) I know I could set up a constant running “tick” check (using the Now function, return value minute) but that feels really wasteful. Any recommendations on how best to go about this?
Set timer by event.
That'll allow you to define a time when something should fire, you can loop it as well.
Tick is bad as it fires every frame, and you shouldn't need to check every frame if it's the right time to do something.
So two timers, one looping at 60 minutes, and the other looping every 60 seconds? Is the timer constantly running good or bad necessarily? Is there a way to “put it to sleep” and “wake it up” when I need to check stuff ? (Pause timer by handle?) or am I overthinking it?
okay, mission failed
gets teleported but unlike before, the rotation is completely different and the transition is janky
You could do just one timer. Add up the minutes in an integer and on the timer event check if the total minutes == 60 which means you've hit an hour.
sometimes you cant avoid using tick tho right?
Timers are fine. They're not constantly doing anything. And yes, you can pause timer, or clear and invalidate if you want to stop it entirely.
There are situations where you want to use tick, definitely.
Or at least, something that repeatedly fires fairly rapidly.
does a delay after a tick improve performance, id guess so right?
If you're using a delay on tick, you may as well use a timer.
fair enough 😛
i mean in the options of the actor bp you can set tick frequency so no need to use a delay either 😄
Yep
Have i missed a part of important info
also can i get some more help? no idea what to do at this point
From my test, the teleport didn't like to work if the actor was colliding. It also failed when I teleported the actor under the map first, after which it fell to its death as I suspected.
XD
@dawn gazelle thanks! Good call on adding up the minutes, i will give it a go. @weary dock thanks, I didn’t know about setting the tick!
im not sure i helped but sure no problem
why not just change the actors location? whats the point of the teleport node?
wait what there is another way to set their location?
nice
lamo
lmao
it works perfectly with that one
😂
now that this is resolved shall i bother everyone here with my other problems or not? 😂
oh hell yea
kinda the point of this discord tbf 😛
well then here i go
main problem is that after i possess a pawn, other pawns of that class cant damage me
this is the damage setup, and the collision gets turned off with anim notifies
maybe try phrasing differently: how would i fire an event only on the client that triggered the event? When i use an input action and check has authority and only call an event on remote it still fires the event on all clients.
i really only want this to fire on client 1 if client one presses the button
So i am using a cable component grapling hook and my cable is going in the completley wrong place and i dont know why, third person btw
BP:https://blueprintue.com/blueprint/mb970j9y/
Could anyone help?
is the line trace working? seems like that should use location not rotation for the end
do you have a video of this? there is a lot going on and my blueprint-fu is still pretty new sorry
line trace is fine
i think the movement of the component is messed up
dont cables have a part you move not the whole thing?
and a length
yeah
Interp speed is 0
k
k
ill show it if this dosent work
@summer bolt On a side note, getting and saving DeltaTime is extra effort. GetWorldDeltaSeconds will return the same thing.
@summer bolt Is the ComponentGrappleHookBP your cable component?
ok
Uhh kinda its an actor which crreates a component on a character and does other things too\
No. You have a literal GrappleHookBP. It's being created in that blueprint's Beginplay. Is that a component that inherits from CableComponent?
If so, you actually want to attach it to your mesh at a socket's location, and then in the timeline, Vector Lerp from the component's location to the hit location.
Or rather VLerp the local location of it's EndPoint.
I dont get it sorry
What class was GrappleHookBP created from?
actor
Hey, i have a newbie question.
I have couple of different action modes (i dont know what to call it) like object placement mode, building piece placement mode, and default walk / interact mode. Initially i started making them on character blueprint but it feels wrong and having a lot of variables for different modes in the same blueprint is annoying. Whats the normal way splitting these features, into their own things like blueprints?
oh
I think your grapple hook BP is an actor with a cable component.
You can put all the code in the grapple hook actor instead of your character
theres no code in my character other than default
im using the actor to make the cable in the character
what would I use to make it so that when my character runs into a hazard/enemy and dies they rotate 180 degrees? I'm trying to simulate super mario.
@summer bolt Try something more like this.
K
Iill try in a bit
Does anyone know... On an actor, are you able to read values from attached components during the construction script? Like, I have some settings being set on the actor component in the editor, and I want to display them on a text render in the editor.
In my attempts to, it appears to not work >_>
Seems like it works ok if you attach the component within the editor, and get component by class in the construction script, but not if it's a component that is native in the blueprint - it just returns the default values.
Not the solution I was hoping for as I wanted to construct a BP that I could just place and you just enter the values into the component -_- Not a huge deal either, was just supposed to help make things a bit more visible while building a level.
@stark trout I 'think' I understand what you're asking. If I do, I do the normal walk and interact stuff in the character. For building buildings, I have an invisible actor that is spawned for the character that gets input enabled. Because it's the latest actor on the client to get input enabled, it consumes all input of those key types. So mouse clicks and like F key play on it and not the character. Then I just disable input when I'm done using it.
hello everyone, I am new to Blueprint and I have a question. My blueprints are not running, I am just trying a simple print string. the weird thing is that I have some yellow lines on my nodes and if I go over it with the mouse I get the message that is on this print screen. Is it something easy to fix?
@paper skiff Those lines don't mean anything until you actually package a project for shipping. They'll still work when testing in the editor.
What events are you having trouble with?
ahh right. thanks for that, good to know
i am only trying to print a string, "hello world"
Ok, that input thing makes more sense. I was planning to do all the input stuff in player controller and call functions from there, but this makes more sene. I was actually asking if its ok to put features like building buildings in their own 'invisible' actors and enabling them from player character blueprint, and thats answered i guess
The input thing is nice once you know how it works. This picture illustrates the general flow of how input is consumed.
I am just trying to print a string, "hello world". Nothing shows up
Right, but from what event?
the BeginPlay
Of which blueprint?
@rancid topaz You could check the movement component's current movement type. If Movementtype == walking then do stuff.
so im having this weird issue with replication and widgets on actors. if anyone could help i made a video demonstrating whats happening and the blueprints i am using https://www.youtube.com/watch?v=Z5YfNjpXzY0
@paper skiff Right, but what class is this? Is this object placed in level? Is it a controller? A character spawned from game mode?
ahh right, sorry. It is just an empty level, I am doing this on an Actor class. I only have the "defaultSceneRoot"
@maiden wadi Did that now dis happens
@minor lynx I'm fairly certain that you don't mean to only do this on all clients that aren't the server, which is what you're doing with SwitchHasAuthority. I think you're trying to start that timer when the pawn IsLocallyControlled.
sure im not sure what that means lol but i only want it to run on the client itself and only show for the client that is activating it
would i use something like on posses or something?
OH i see!
nice its working now
IsLocallyControlled will get that pawn's controller, if it exists. If it doesn't exist it will return false. If it does exist, for instances where more than one controller exists like on the server, it will ask if that controller is a local controller, IE meant for that machine.
@summer bolt Can you show the Timeline code you're currently using?
i didnt know about this node, this helps with some other things i was struggling with too
thanks a lot!
@paper skiff Is there an instance of that actor placed in the level? If not, beginplay won't run for it since it doesn't exist.
i would create the widget on beginplay then just add to view port/remove from parent when you turn it on/off
yeah
im doing almost the exact same thing you are lol
no i didnt say add to view port, just create it and set it to a variable, then add to view port and remove as needed
you can probably set a variable to know its already added but do you have a point where it needs to be removed?
k
yes, I have it. it does not show my text on the screen.
this is my current method
TraceCheckInteraction is just a function that does the line trace like you are
yeah
@paper skiff Have you changed anything with GameMode or GameState? Or are you still using the default classes for those?
@maiden wadi
What about the SetEndLocation stuff that the timeline is updating?
I am using the default classes. do you think I should reset it to default in case something was changed accidentally?
so what i did is I added the widget to the actor and set visibility to none, added an interface for activate/deactivate, then in the character did the trace above to set unset the variable and call activate/deactivate when the trace hits or doesn't hit, which just sets visibility of the widget in the actor.
@paper skiff Generally the only two reasons why Beginplay won't run is either because GameMode isn't calling it, which it won't if you're using GameModeBase with GameState, or GameMode with GameStateBase. Or the actor isn't in the level. So if you have an instance of the actor in the level, the only other reason I can come up with would be a GameMode class problem. That or your actor is inheriting from a C++ actor and you forgot to call Super.
would you say that the problem is here, probably?
@paper skiff That looks fine. Can you show this?
this one?
umhhhh, my one look different
What about the outliner?
what do you think?
@paper skiff You don't have an instance of the actor placed in the level.
set play rate is not working in android
for mp4 video media player
it set play rate from 0 or 1, not floating values
here is the logs when i test in android
ahhhhhh, noob mistake. I thought I had it, still finding my away around it. Thanks for your help, appreciated
anyone know what would be the best way to add a sliding mechanic to locomotion v4, I am trying to include that and some other mechanics to my project but cant figure out which bp that would be added to
why floating values not work with set playbacks speed in android
only int values works
@gritty elm Preuming from the warning text, anything but 0 or 1 playback rate isn't supported in android. Possibly an operating system thing. Might ask in #mobile
so how i can set playback speed in android?
Is there a big brain method to open a struct / class from the Blueprint Variable type? Say you have a Map of <Name, MyStruct>. From the property, is there smth similar to "Navigate to Declaration" feature from Visual Studio?
find?
anyone know what this is called? cant remember lmao
Not equal (enumerator) @sweet osprey
Enumerator
@dawn gazelle and no, I mean from this panel
in VS/Rider you can just navigate to the declaration of the class/type on the spot
oh, like you want to be able to see the BP declaration of the Struct... Like how it's built?
Like take you to this view?
Let's say yes. Is there a feature to navigate from that panel to it without having to use the find in blueprints?
If what you're looking for is what I've posted above, then no. There's no means of being able to view/edit the definition of the struct from anywhere but the struct object.
how can i set it so only if 2 or more inputs are being pressed
then it starts to play line of nodes
I wanna make it so only 3 inputs are needed to be pressed in order for this node to start working
Use booleans and set and unset them on pressed and released. Then you can use a branch with AND or OR nodes to make the logic that you require to proceed as you need.
so custom booleans
when press the custom boolean is enabled
then it goes into a branch
and if its true
yeah but what if I want to enable a 3 input thing
Does anyone know if BlueprintImplementableEvents can be static?
You use ANDs and OR nodes to combine the booleans.
You can add more pins if needed to complete the logic you require.
In the Online Subsystem Blueprints on the marketplace they show such a node.
Does anyone know what this is? If I were to implement this in c++, what would it be?
Like it's an object that is passed to other blueprint functions, but I haven't seen such a node before
or am I just dumb and it's a normal variable? 😄
it probably is ... let me hide myself
Well for one, you don't have any execution path plugged into the branch. Any time you see this on a node and it's by itself, you need an execution path hooked into it (such as from your key inputs)
Also, you'd need separate booleans for each key, as you want to check to make sure they're all pressed down, not each one setting that the player should be sliding. Ie. if you were to hook up just the W key after the set to the branch, it would proceed as the AND is only checking the one value of "Is Sliding" which you've set to true on the W press.
So like, maybe use "SlideKey1" "SlideKey2" "SlideKey3" as your 3 booleans, one for each key.
Quick Question: Does anyone know how I can make it so the inbuilt pause function doesnt affect the users movement inputs?
then plug booleans into the AND you have. Also be sure to unset the booleans on the keys being released.
@rancid topaz You are not dumb. Sliding functions are an absolute pain
😭
i know but after this im finally able to work on weaponry
which im gonna get a break on
Hell yea!
and wall running
sounds fun!
Id offer to help and give advice but im in crunchmode rn for a college project
thats always a fun project
if not successfully for the public then itll be private for some friends
this is my first game
so i wanna yeah
Oooh nice!
Id be down to playtest and give pointers if you're ever interested (when Im not doing classwork ofc :3)
Try it? That should get you as far as registering 3 keys being pressed.
If you're willing to sit on working on the slide until the weekend, I can help out and show you how I implement it
YES
PLEASE
XD
actually it would be nice to be helped on a few other mechanics
to get it done with
Ill help with whatever I can
😄
I sent you a FR. VC on saturday?
cool beans'
Again, you need to set the booleans to false on released. It'll detect when all 3 are pressed. As you have it right now what you're doing is just setting them true and that means they're staying on, so any time you press one of those keys the branch will succeed if you've pushed them all already.
alright
and ideally, you wouldn't have the set connected to the branch. Use a get of the boolean. Example with two keys:
whats the best way to do this with a large set of numbers? Depending on the fill height of my liquid the rotation can be in X range. If rotation is only 10 but my fill height is .4 it shouldn't fire but if rotation is 25 and fill height is .4 then it should fire. I just dont know that I should use to do this!
you could potentially use a select and choose from ranges.
and possibly a combination with Map Range Clamped
Okay I will try that, Thank you! I thought a curve somehow would work but I dont know how to make something like that work haha
Yeah that would work too. Create two curves, one for min and max values.
the big blue node thats cut off is Launch Character
and the delay is the the short blue node
Programming subsystems
Hi does anyone know the wild card to get to the level bp? Im trying to initiated a event in the level bp from my player character
Hello! I'm having a problem idk how to tackle, I have this widget in a game i'm trying to mod via SDK, it's the HUD widget that controls most of the in-game HUD
this is the "deadinfo" child widget
I want to replace the deadinfo widget without editing either of the main files (I can add children to them and make copies and access them at will, but not chang ethem)
However I do not know how to do that, and outright replacing the main HUD one (parent) causes tons of issues
Not sure there is anything specific to get a reference to the level BP, but I did learn the other day you could tag your level BP and get it like this, but you can't really do much with the reference. You'd have to use an interface to communicate with it. This shouldn't be done on tick or anything though and better if you only got it once per level and saved the reference somewhere.
I just tried it and it didnt fire the event in the level bp 😦
oppps
wrong
message
still didnt work just going to move the audio compnet to my player character
Wonder if anyone can give me some insight on this, it's paper2d so i wasn't sure whether or not to post it there but it's blueprints nonetheless.
https://gyazo.com/a4081ad3c0c95ba05eb2441707c949e1
I'm trying to make a grapple/ropeswing and the way I've done it is by having the characters velocity replaced with the distance between the grapple object, or something or other. But I'm not great at programming so if anyone has any ideas on the better way to do this, that functions better also I'd greatly appreciate it!
it looks good already
so that box is what ima point out
im thinking maybe it could be where the player can grapple to
or it could be not boxes but like a hoop or something that the player can grapple to such as either pressing a single button when they are near it or having to click on it
such as those doughnuts can be something the player can grapple to or its something based on your choice
@trim matrix
thank you thank you @rancid topaz I was just using a square to demo it for the time being hah. But yeah those are great ideas thank you!
np : )
Hey hey. I'm trying to tick a boolean variable that a key has been picked up. I realized that after I destroyed the key actor, that the boolean in that key BP is no longer accessible. I was thinking of putting it in the level bp, but I'm unsure how to access that bool var in the lvl bp. Anyone know of how I could go about this boolean funky-ness?
Here's my level bp that I have so far.
I just tried making a custom event called KeyPickup and then it sets the isKeyPickedUp to true, then call that custom event in the keyBP before it's destroyed, but I can't seem to access that event? 🤔
Would the player only ever be able to pick up one key?
Yes @dawn gazelle
You could store the boolean in your player character.
I'll try that! Good call
or player state, if you intend on having a player that respawns but retains the key/the level doesn't reset somehow.
No this is a quick and dirty one and done level for a proof of concept atm, so no saving, respawning, etc. like a normal game
Hmm. I'm having trouble understanding how I'd go about this. So I have the bool in the player character bp, but do I do anything in that BP or do I have it set in the others? I tried it just now and it's throwing errors.
Blueprint Runtime Error: "Accessed None trying to read property Target_0". Blueprint: blockout Function: Execute Ubergraph Blockout Graph: EventGraph Node: Branch
This is the level BP for the trigger volume.
Where are you setting the reference to Target0?
That's not setting the reference. That's just the creation of the variable.
I just got the bool and promoted the target to a var
oh, sorry 😅 As you can tell, I'm not all that great at BP
ok, so I'm guessing on the overlaps you have - you're expecting just the character to be overlapping them, yeah?
ok, create a "cast to First Person Character" node between the start of the overlap and your branch
then plug in the "other actor" pin into the cast's input.
then you can drag the "As First Person Character" pin to the boolean target.
Then do the same on the end overlap.
Like this?
yep looks good. You may want a second "is key picked up" bar thingy for the end overlap, just to keep things clean
Hmm.. Still throwing an error. Blueprint Runtime Error: "Accessed None trying to read property Target_0". Blueprint: BP_key_pickup Function: Execute Ubergraph BP Key Pickup Graph: EventGraph Node: Set isKeyPickedUp
Do I go back to the key bp and cast as well?
I really need to understanding casting and inter-bp communication... 😅
so that error is in the "Key pickup" BP. You should only need the key pickup code in one place.
If your "Key pickup" is like the actor you're placing in the world, that should be able to handle the logic if you do it the same as what you've done in the blockout BP.
Hmm, but I'm not setting the isKeyPickedUp bool anywhere if I delete the set node in the key bp
oh wait sorry yeah...
in your key pickup bp you want to do the same kinda thing.... On overlapping you're setting the bool instead.
Do the same kind of casting and all, just setting the bool instead.
Okay, so should I delete the casting in the level bp?
mhm!
Well, the trigger is what's drawing the text. The trigger for the door is inside the door bp. I got the door from an asset pack and I cba to figure out how the door works since it's using a stupidly complex way of opening the door...
so I'm trying to do a workaround
So in the bp_key_pickup (the key bp), I cast to first person character you said?
yep, drag the "As first person character" to the target on the set node.
🤔
oh you don't have the overlap there.
I have to connect Target_0 otherwise it yells at me
you need a reference to the player. so just do a get player character and plug it in there
Target_0 is already a character
but he doesn't have the reference set.
but you need to set Tareget_0 to something
casting is not a magical set node 🙂
how are you detecting the player has the key?
the box?
uhhhhh, excellent question!
also binding inputs in the key, is not good, those should be on the character/controller
My logic is that I'd have a bool on the key bp, but after the player picks up the key on input, I have it destroy itself, so... it can't access that isKeyPickedUp bool, throwing errors obviously
This is what I had originally.
If you have the time, I'm in voice. 😅 Sorry for this strugglebus
Well what you could do is have a box overlap in front of the player, that detects objects of type "Pickup", then your player has the E key node. When the overlap detects a pickup, it sets OverlappedPickup to that pickup, when the E key is pressed, it grabs the key, and destroys it
hmm...
you really don't want lots of actors running overlaps
(especially for pickups)
you want just your character to detect any pickups (a lot cheaper game time wise)
Is there some kind of "AND" for events, or am I doing it right? The blueprint works, but I'm just curious 😛
you can use something like a gate.
But you should first fix your thoughts about how to use interfaces 😉
Because you don't want the interaction for the object you are interacting with in your player pawn or controller, but in the object (door) itself 😉
and you don't want any input events in your doors, so at least one of the cases is not elegant ^_^
What time point will UClass upload if I call creatWidget node in bp? Bros👀
Hello. I have a widget with webbrowser component. I want this to add an actor with widget component.
Every actor on the map should load different url, so i want to change the VideoLinkVariable. How can i do this from actors blueprint?
you activate this in the variable details panel
then if you place the actor in the world, you can find the variable editable in that actors details panel
of course you need this in the actor and the actor needs to communicate it to the widget.
so you better make a function or an event inside the widget PB that loads a url and on begin play you just call that function from the Actor with the editable URL you made editable in the actors ^-^
depends on what you are doing probably. What's the problem?
ah, so while you drag the ball with the cursor you don't want it to go through the wall?
Is it always the same setup or can the walls be different? else you could easily just limit the x or y location of the ball...
another option would be doing a sphere trace and checking if the ball is colliding with a wall and save the last ball location where it was not and place the ball there..
i cant go through this step, from Actor BP i cant modify the video link var.
try this 😉
because the widget is a WidgetComponent, which is a scene component, but you need to access the Widget Object behind that ^_^
so get "user widget object" should return the widget object. Not tested, but that is the valid output for your cast 🙂
because a WidgetComponent can never be a Widget
Thank you, this works. Now just need to load properly
and why are you using the Tags as the video link?
you should just use a editable string
like this in your actor.
because im dumb xdd, yeah, thank you. The tags working to, but this is simpler tbh.
The web widget for some reason dont load the url yet, but i'll check it
the variable will then be exposed in the level editor 🙂
maybe you need a small delay? I am not sure, but your old code had some 1 frame delay, right? 😄
or check if the cast fails ... if that is true, than my code would be wrong >_< 😦
Everything works now fine. Thank you very much:)
🙂
the cast was good from the beginning, for some reason the widget dont loaded the url, but that problem disappeared when i put initially url in web widget component. Idk why was the problem if its empty, but doesnt matter
does anyone know why i cant change the value of it
because the directional light actor i whats setting it
rotate your "light source" and it will change the value
any tip how should i do killfeed?
got it
what even is a killfeed? 😄 now I'm curious
okay so my problem is next 😄
its that i somehow need to find a way that when the begin overlap event fires and the actor that it hits is not the player character AND is possessed, then it should deal damage to it instead of the third person character
yes
like in cs:go
or any shooter i guess
yeah i tried branching but for some reason i still couldnt get it to deal the damage
so a killfeed is that small window that pops up and looks like PlayerX shot PlayerY? ^^
any ideas that pop in when you look at my deal damage setup?
yes i know
i tried to fit it on the screen
its not this ugly usually 😄
Ah, you might take a look at https://docs.unrealengine.com/en-US/TestingAndOptimization/ReplaySystem/index.html then
Overview of the Replay system for recording and playback of gameplay
yes thats for me dealing damage to them when i possess one
i mean i think if i was able to cast correctly and have it find the one that i need then it should work
im not
its just
spaghetti
the one going under is the one going into damaged actor
Is there any built in functionality for rotating Characters? There's "Add Movement Input" but I don't see something similar for rotations.
ill try to write it down so you can understand better than my spaghetti
I thought the controller yaw etc. was used for camera's
begin overlap -> check if SELF is possessed
yes -> (setup for making me damage others, not important here)
no -> if player character is = to other actor, then deal damage to player
if not, cast to enemy1, check if that other actor "enemy1" is possessed,
if it is, then deal damage to it
if not, dont do anything
can you understand it better than my spaghetti now? 😄
what?
So you alter the controller's rotation and there's an option to make the possessed pawn have the same rotation?
I didn't immediately find it. There don't seem to be analogue systems for rotations. I see examples just using SetActorRotation, but I wanted to use a speed for this. Which I can do with SetActorRotation, but I would think there's a built in system for this.
for the record this is not a player character, it's an AI character
oh okay, this can only be set in C++?
oh yea got it. Sorry sloppy work by me, I was looking on the controller and the character movement component, not on my character
thanks
it does state that it's supposed to be used with a player controller, not an ai controller https://i.imgur.com/uFqUdut.png
Yea sure, but then it doesn't use an angular velocity?
That blueprint is the door blueprint.
The player controller contains the Line Trace, but the door itself has the resulting interaction
Oh okay, so there is no in between? Then I'll use SetActorRotation incrementally based on an angular velocity
Hey guys have anyone done drag and drop operation? I manage to get my dragging work but the on Drop function never get called
Yea lol I'm aware of this. I just thought there would be a rotation rate as well as a velocity in a character movement
im trying to figure out why the on drop never get called
Yup that's what I did. I was just wondering if there was a built in way.
Then you should look at the code that's supposed to call it
not the code that doesn't get called
Okay that's fine, at least then I know I'm not reinventing the wheel
On drop is override function from the widget base class tho
you don't really call it manually
lol true enough!
i made kill feed but for player that is killed it stacks every child i add
but for person that is killer it works as it should be
does the sequence node work like it waits for the first pin to finish then the second one
where i add child with nickname for killer and player that died
for every player it works as it should be but not for player that died
Is is possible to get a mesh from a niagara particle system inside blueprints?
If I have an Image widget inside a widget blueprint, how can I change its "Image Size" values from the outside so that I can see the changes in the editor?
Or do I have to use a Named Slot and pass in the image from the outside?
you can expose the values and scale the image on preconstruction for example
Widget BP that has image inside needs to scale the image on PreConstruction event. The X and Y scale need to be exposed. Then you can place the widget on some other canvas and just play with the exposed values 🙂
Perfect, that was the event I was searching for earlier 🙂 Thanks!
how can i rotate the actor smoothly before enabling use controller rotation yaw? it just jumps to the control rotation
I am creating a Macro Library for actor macros and have come into an issue where the code, that works in a BP directly, doesn't work when put into a macro library
What types of things can Macro Libraries not do that typical Macros can?
yea, I came across this before but it wasn't too relevant so left it alone
From the reading I also saw is that the library can do calculations, but if you want to start doing fancy stuff (in my case make a spline mesh macro) you are spawning stuff based on reference, which it just doesn't like
is that with Object Macros or Actor Macros?
oh nvm
Odd that Actor Macros wouldn't support delays or other latent actions
This is my use case currently, its a Macro Actor Library