#blueprint
402296 messages ยท Page 790 of 403
So at 1-29 its +3
30-50 its +5
This event only fires off when the character level increases
Thats new info , and your method doesnt solve that
It seems to be though
At level 14 you get 13*3 (39) extra stats from the base of 30
Level up to 40 and check.
This literally subtracts 0 at the end ๐
Yeah XD I forgot to put the 3 under the int * int on the far right XD
I had it pulling from a variable and moved it
So, it worked at lvl 40?
Give me one sec while I set the rest of it up
I only messed with 1-29
29* 3 +11* 5 = 261 + 55
how to make a char move in a circle??
By using an angle as movement
Then you can calculate the actual movement with a radius of the circle
tried it not working
Can you show us?
30+(28 x 3)+(12 x 5)
Level 1 is +30
2-29 is 28 levels of +3 (Total of +84)
29-40 is 12 levels of +5 (Total of +55)
Total should be 169 for 40
And I broke it XD doesn't work for the 2nd stat tier
Is that skillpoints per level?
Yeah
If you save the used SPs you can just do level-1 and level -30
Clamp first to 0-28 second to 0-10
(clamp((cLvl - 1), 0, 28) * 3) + 3
And then multiply, subtract used from total
use a setter as Squize suggests
though with changes in the general formula, it may best to use a data table or data curve
Well I am trying to get it as dynamic as possible in case the player chooses a race that has a different starting stat curve
you can have a data curve to use for each race if you want
Agree then you donโt have to do any calculations
And can change it for any race at any point
On the off chance I'm missing something obvious can anyone take a quick look?
Trying to make an inventory system where items are stackable, if the items the player is trying to pick up (when added to the existing stack) exceed the max amount allowed in one slot then a new stack should be created... However on the fourth pickup it will consistently fail to create a new stack. Looking at my blueprint here it seems like it doesn't realise that it would exceed and is just trying to fill the existing stack. Anyone know why this might be the case?
My Bp for circular movement. Doesnt work. can any1 help
you are asking on event "whats ma location? yo, set that to ma location!"
thats basicly telling the capsule "dude. did you know that 1 = 1?"
oh wait
no thats other actor
that was Z
๐
then you need to show more of the part where you calculate & tell what is not working. stuttering, not working at all?
I might got it lets see 40
For circular movement you want circle center + sin,cos * radius
it just puts me in space right now
And also isnโt Y up in UE?
Z is up
Aaah okay good
at least if you not changed it
Ayy it worked
@visual vigil do you really want to change X and Y axis for the same amount?
isnt x and y calcualted from sin angle??
No
Cos is horizontal Sin is vertical movement
And you shouldnโt be multiplying it by your current values, only multiply the result of the cos and sin by your radius
Add the multiplied value to the circle center for correct position
not sure about the circle calculation part, i guess eezeh did not draw the cool "S" during math.
but right now you are rotating left and rotate the exact same amount forward towards the ground (and beyond).
That makes no sense to me hahaha
Iโm talkig horizontal vertical based on whatever perspective you want to move
nooooo! its not!
it is perfectly fine, i tried to say that my math is shit because all i did is draw this crap all over my stuff
Lol ๐
the gizmo thing is trying to explain what he is currently doing at the same time
with the X+Y movement
nice drawings tho ๐
doesnt work๐ฉ
what do you want to do? just turn the character around?
move along a circle
how often to you call that event?
in tick
its going diagonally now
isnt the character supposed to rotate?
since you're avoiding rotation input
which is odd, at best by the sounds of it
Just for testing, if you add 1 to Z rotation on tick, the char will run in a circle.
if you want it to follow a circle, adjusting the rotation accordingly would do the trick
yes it does
How about using spring arms?
this litteraly just runs in a circle
'run' without animation that is. Slide is more like it
Unless I wrongly imagining flying companion, that is
probably dont need * 2 in float either,
i got confused by my actual pawn moving forward aswell
๐
Yes.
I swear I answered that question before...
Im always surprised when the bringer of context asks for context to what the answer was contextually given to
"Someone else's opinion"
Weird mindset but okay.
Because I know full well even different (source) builds will trigger .uproject changes and rebuilding every time
Updating hotfix version won't cause you any issue, except if you're building the engine from source code
If you're updating hotfix in launcher, no loss whatsoever.
and if for some reason there is a problem between hotfixes, the hotfix is not the cause but super fragile code ๐
code that barely worked in the first place
I mean, for fuck's sake, I managed to get FSR working on my custom 4.27.0 even though they said it has to be 4.27.1+
The only real problem with different hotfix version is that you have to rebuild your project if any of you comitted changes to the .uproject file, due to hotfix versions from the launcher have different build ID association
That's not an opinion, that's a fact
I accidentally kept 4.26.0 and 4.26.1 together a while ago, and assets still work, but because it's a "testbed" C++ project, it has to go through rebuilding the project
i still using 4.26.1 even make my UMG widget ๐
๐๏ธ high five, 4.26.1!
once i finish this game, im thinking ue5 will be stable enough
If only backporting Oodle and Bink didn't snowball ๐ซ
At least I got to implement FSR as a plugin, now that I'm in 4.27
why does casting from my animBP to my char fails during 1st couple of frames???
first few frames? like its done on update instead of begin play?
its on begin play
that is weird then
it should only fire once, there's not other things that might call the same thing?
or multiples of the same character in scene?
oh boy, i did a test of that awhile and i dont recall anymore
but i cast in both abp and character bp
i am talking about event graph in animbp
yep, i do a cast there
and i do a cast in my character bp
so they both know of each other
try get pawn owner > cast > set reference
then my update anim event gets that reference
I am getting none referenc error for rider
hmmm, i dont actually reference the cast character in any of the anim graph, so maybe try setting the enum or bool as a variable on construct or in update
Hey ! I have a problem with Simple Move to Location function. I've done as any tutorial video says, in a 3rd person template with starter content, and nothing happens. Here is the part of the character blueprint. Am i doing something wrong ?
(My goal is to move main character, not any AI pawn)
there is no goal vector supplied. do you have a navmesh in level and build navigation? If you want a click to move functionality try the top down template instead of the 3rd person
Not a click to move, just a "B press" to move
And when i split the vector, it shows the default 0;0;0 which is fine for me in this level
and that also work in tutorial videos :c
do we need a navmesh even if its not an AI pawn ?
yes
alright i prolly need to step up on this, thx
It works now ๐ Do you know if there is a better method to obtain same result (asset moving, not teleporting), but with precise goal location ? I see that the character stops before the goal
there's acceptance radius in the move to node
internally
depending on what you want you can either decrese it by using the node that allows you to specify this,
or you can move differently. Lerped movement is one option
You should really check out the top down template. Its a good study for you
I'll try, it's just that i saw that it is click to move by default
It does have that input method but the function of how to move is what you are doing
Sounds like you already checked it out though
What i suggest is to look at other tenplate projects to see how functions work, how they are setup. Youll learn a lot by observing how things work even if certain parts are different from your goals
using "set acceptable radius ?" It wants me to give a Pawn Action Move Object Reference, which i dont have, i want to move player controller
true, i'll go for this ofc
Seems this is available for "move to", which is AI-only.
yep, this means i will have to set up AI pawn that will become player's (real) character
but thx ๐
so we're back to the lerp ? ๐
searching for it ^^
i'm deeply studying 'lerp + timeline" solution :p
yeah but i'm working on a chesslike grid, so movements needs to be precise
lerp is solid then
there's a lerp component
making a float going from 0 to 1, and connecting it to "alpha"
thats one crazy lerp
so I'm building a showcase map for an asset pack,which i spawned in as a grid using this blueprint
I now want to place a text with the name of the asset next to each placed asset, anyone has some tips?
Never used this comp before, but this seem to be in the right direction
200 would be your desired movement speed
if you're adding multiple points, you'll need to set the entire duration of it, so you'd need the distance between each control point and divide that by the speed
i'll check that , thx so much
Ok, so I attempted to follow a tutorial to get a generalized gist of how to make a widget toggle-able visibility
I did everything they did but when it comes to actually use the Widget function, I can't call/cast it to ThirdPersonCharacter
Its just not even an option under the Hud Variable
I didn't make the 2nd half where you make it disappear as well, cause I didn't get it to show once I got this far
where did you create this?
link to the tutorial maybe?
did you enable "context" when dragging of that third person character cast?
In this video I explain how to best setup a heads up display widget with toggle windows. For example, how to push a button to open a character sheet widget making it visible, and then push the same button to close the same widget and make it hidden. I also include how to update the widget when it has been toggled to be visible.
Support me on Pa...
did you notice that your "get player character" node is different from his?
Yes I did, and I tried a bunch of stuff to change it to work with ThirdPersonCharacter
But I just keep reverting it when it fails XD
he is using third person character template too, or am i mistaken?
He is not
what is he using then?
Helps if I linked the correct video -.-
He uses MyController I think he set his up for a First Person game
๐
I had the correct video pulled up and linked the other one I was currently watching to try and figure stuff out XD
would you mind sending me your project? im really wondering where you did get that node from lol ๐
or what do you want to create. maybe i can show you a "shorter" way than a 20 minute video
just hide one widget?
Basically I press C and it shows/hides the widget
third person template, right?
press c: first time you press C you create that widget (it becomes visible)
press C again, you hide the widget (collapse it)
press C again, you make it visible again
no need to do anything within the widget to set this up
you can, if you want to set up something within the widget of course. for testing i added a progress bar over the middle of the screen
@split orbit
I have a BasicHud widget that contains the other Widget inside it
Gonna mess with it your way real quick
Ayy looks like it worked
๐
how do i attach a cable start to player socket hand
sorry I'm a bit confused: how am I supposed to pass an event to an event parameter in a function outside of an event graph?
Why not do the Set Timer on Event on Begin Play?
because it has to work in edit mode
It won't.
why? ๐ค
Because Timers mainly runs in runtime (in-game), which is different than editor mode.
Setting a float on BP tick isn't that bad tbh, barely making a dent in practical use
no i was just starting
i need the thig to hide when it's too close to an unique object and show otherwise
so it's a 3d distance check for each instance of the thing
and we need as good fps in edit mode as possible
can i get the actual variable name in blueprints? for example if i want my variable thats called "Random Number of Kthulu" to print with printnode (not the actual value ofc, the name of the variable)
spoiler: the name you see in blueprints is not the actual name of the variable
i was wonderin how my blue prints accepted names like "Random Number (of Kthulu!)"
you mean functions that accept stuff by name?
generally you can't unless they are objects
or functions
so this is not possible,r ight?
blueprints don't support reflection
thats kinda sad, would be nice for bugfixing and printing stuff
nor does c++
full runtime reflection is interpreted languages land afaik
and blueprints compile to c++ so...
cpp supports reflection
Unreal's c++, partially
still far from being java's levels of reflection
there are yet non accepted proposals
C++/CLI is not C++
cli is just a compiler lol
it's a non standard language extension, as is clang reflect
sure but to say CPP doesn't support reflection is false
.
anyway BPs have some degree of reflection exposed in some functions, but you can't write your own reflection in BP
Set Timer by Function Name and the Create Event node
really? O.o
oh
somehow I assumed they compiled to c++ like gml in game maker
well that's what the debug mode / release mod distinction is there for
if it's all turned into bytecode it's weird that there isn't full runtime reflection in bp though
"add method"
"add field"
"get value by field name"
not sure about C#, Java certainly does
it's like the only thing i like about java ๐
I'm kinda curious what possible use would you have for "add method" at runtime ๐ค
Unless you're making "blueprint programmer the videogame"
technical debt is a myth you guise
I had a case in java where an entire program had tons of instances of a type, and only in one cases each instance needed additional fields that would have been a waste of memory in every other case. We added the field dynamically at runtime through black magic
uh?
and how would you add and remove each instance in memory of the thing to that map?
How much memory did you save with this black magic anyway?
it was a preexisting project
it's not like you can always freely choose what to work with
there are n instances constructed around the program in various points
Yeah so that doesn't really mean it was actually a good idea, or a necessary thing to do to save memory
you either modify the constructor, which we couldn't
It is an example of what you could do, but the question is should you do that to begin with
Or a subclass with the extra field I guess
and how were we supposed to make instances magically appear in that map every time a new one was constructed?
when?
well most this channel operates on the idea of easy fixes, so I can't imagine anyone reflecting on their code
There are quite a lot of other ways this could be done without weird reflection tricks tbh
but weird reflection tricks are cool and edgy
tbh i don't see how any of the alternatives given here would have achieved the same result.
You could quite easily have made a lookup table that's stored somewhere where the values can be looked up from
dm?
I dunno I was mostly curious if there was some legitimate reason for the peculiar reflection usage... and frankly it sounds to me it was just a case of "we were stuck with a poor codebase" :)
which I guess is a legitimate reason to do weird things you wouldn't necessarily otherwise want to do lol
i'm genuinely curious, I just don't want to clutter the blueprint channel with blueprint unrelated and ue unrelated stuff ๐
well if you want to talk about it sure, but I have to admit I don't know if I have the full picture of what you were doing, so my idea might not really work the way yours did
When you save a game, can you save actors etc in the state they are in? Example if a player actor has a few actors assigned to it via variables and you save that actor, will those variables and their states save or does each object have to be saved separately?
From what I understand, you cannot save objects as the references we work with are only pointers to said objects. You can save information about said objects and reconstruct their state when loading them.
you wouldn't do BP saving in a large game
You have to save your state somewhere, and I can see having to account for every object, item, state of everything that needs saved being a pain in the ass to keep track of and manage.
Example persistent levels throughout saves. I suppose a separate save could be saved/loaded for each level to keep track of that though.
I could see why you wouldn't want to save an entire bp/object though that save file would be huge
you serialize the data into a binary format in C++
it's reasonably straightforward to do save stuff if you have that set up
reconstructing object refs is not quite as simple but it's possible to do as well
But as an example, if an enemy is supposed to be dead after save, you have to recreate that enemy in the exact state that marks them dead on load, correct?
Yeah
You would probably set it up so that you have for example a boolean flag or a state enum
which you would set up and then in your enemy initialization logic you check it
Yeah that may be a bad example but similarly for anything you want to persist you have to do it per item across all levels and possibilties. I can image that's a nightmare. Is it possible to make per level saves that handle saving/loading on level open behind the scenes?
I'm not quite sure what you mean "per item across all levels and possibilities"
Saving shouldn't really care about levels or possibilities in this way
You save the position and other variables, and your initialization logic just handles whatever you need it to do
It's a bit simpler than that I think. Each actor has an ID. You get all actors, and create a map variable where that ID is the key and the value can be your save structure and you save that. When loading, you loop through the map, and feed in the values to the associated actor.
Yeah but are you saving an actor object, or just variables? If for example an enemy dies and drops ammo, and you come back and want the ammo to still be there, how would you tell the level to load it? I could see when its predetermined actors but if you aren't storing an actual actor does it have a way to point to an asset in the project and save it so you can reference and load it later?
You need to store the actor class
Or maybe you save the class and spawn one in on load
Just variables. and yea, you can store Actor Class so you can respawn things that are dynamic.
basically the save data you store contains actor class, actor name, and actor data
you can of course store some other bits too but those are usually a good start at least
Okay I think I get it. Then you can just get all objects in the level, store their class and data, save that to a slot and reverse it on load
Yeah
Is it possible to save a save state? So you have a conventional save/load menu that also ties to separate individual level loads?
Sure
Well I mean can you have individual level save files associated with a single save game file, so you can have multiple play throughs going at once? Or do they typically put the level saves inside that game save file?
you would probably just save them into different slots if you have multiple playthroughts
I save them in profiles
I basically have nested save structs
But I wrote a CPP save system. I could never get the BP one to work properly
doing a complex save thing in BP seems like a pain, because you'd need a gazillion structs and so much glue code to move data between those structs and your actual actors :P
Yeah I was thinking of saving each level into its own save file that is only saved/used under the selected main save slot. Like they can have 5 save slots that make different main save files, but each slot has multiple level saves behind the scenes.
FArchive base
levels aren't exposed to BP in great detail so I don't know how you'd get any info from just having the level itself
It would be a save that has a collection of all the actors in it, saved by level
sounds like at the bare minimum you would need a custom level script actor for that
and again not sure how that would work with level loading in BP
really a subsystem is what you would want
So I guess instead of one large save file, there would be a bunch of different save files saved within a single main slot. Was thinking when you hit level end, it goes through each actor in the scene, saves it to a level specify save file, then saves the main slot with that levels save. On level load, load the main slot, load the level save, loop through and recreate all actors.
but that's not something you can write in BP
first thing would be to check if you can create and setup your own level script actor to add in the functionality per actor
Yeah I don't plan to stay on bp forever, and don't need an advanced saving system yet, but wanted to know it's limitations.
otherwise you will write repeat logic for every level
I'd also create a save system Interface
just to keep track of what to save
Trying to replicate with a data table system for my "cases" . Ccase = current case . NCase = Next Case. Forget the "set CCase", bottom right, its for later, when ill update CCase. I would like it to work for a start ...
hi, a stupid question but...
How can i take the object from other actor and use it in the current BP?
This also allows you to create custom pre save/post load logic
i don't know... maybe i am doing something wrong.
"Cylinder1" is the static mesh, that i want to use in other Blueprint and take its location.
What i have to connect to target?
๐คฆโโ๏ธ
You can't directly access it in another blueprint. You need to pass it as a reference.
you could make the current blueprint a child of the BP you want to use, create a new one and inherit it from the blueprint you want to use
I agree , content examples, unreal online learning ๐
the fact that this works makes me wonder: how is lifetime managed? Are items referred to in a graph nodes like shared pointers?
I thought remove child would have deleted the instance
@spice smelt Remove child doesn't delete the object. It just removes it from it's hierarchy parent. Assuming that you have no other pointers pointing to it anywhere, it will be garbage collected within around 60 seconds.
[Material Editor]
The editor freaks out about my Texture2DArray parameter because I don't specify any. But I don't want to specify any, because it's fed from the cpp code when the instance is created. How can make sure it understands that?
You need to specify a default. If you're creating a dynamic material instance, you'll need to set that parameter.
I indeed always set the parameter of the dynamic instance with SetTextureParameterValue(MyName, TheArray).
But here it's a level above, in the Material itself. It feels weird to set a non-None default in material for something I'll anyway provide at instance creation.
What would I even set? If I quickly try to create a Texture2D array (with one texture inside) I get a different, cryptic error ([SM5] (Node TextureSampleParameter2DArray) Coercion failed: MaterialFloat2(Local2,0.00000000): float2 -> float3) Something expects two floats instead of three, but I have a hard time finding what.
That means whatever you're filling into the UVs isn't a vector 3. I imagine that since this is a 2D Array, you need X, Y and the index.
Aaaah alright, indeed it was the UVs. Thanks a lot!
You need to get a reference to the specific TestSpieler you want to get the cylinder of.
I wanna Resimulate foliage from a blueprint. Why is Simulate node not working? https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/ProceduralFoliageSimulation/Simulate/
Simulate
iv'e got a pretty simple program, but I'm having a weird hicup with generating random integers.
I have a map of integer keys and string vlaues, and I am using a random integer to pick a random key from dict and output that keys value.
There are 2 prints in the code, one for the random integer itself, and one for the value of the randomly picked key (along with the boolean output).
Only problem is that the two prints are not synced.
Key 1, should only return "Book one" but yet when I output to screen, sometimes one print will say 2, but the other print will say "True Book one".
It's almost like both prints are using different renditions of the random integer.
Anyone know what is going wrong?
@compact vapor Your issue is pure nodes. You're actually running the random integer function twice.
Every time something accesses a pure node in blueprint, it'll run that function. So if two nodes with execution are connected to one pure node, that node will still run twice, potentially giving different return values.
what constitutes a "pure node"?
Is that just a node that rerturns but also one built into UE by default?
Pure nodes are nodes without white execution lines.
To give you an idea, I numbered your logical order.
Thanks @maiden wadi @trim matrix.
That Helps out a ton.
Just tested it out and I totally see what you mean.
As soon as I noticed that each call of a pure node recall's the node, I set it to a variable.
Then each time the other nodes needed it, I just drew from the container.
is this how it would usually be done / more what you guys were thinking?
Quite likely. Also consider dropping this into a function to use local variables instead of polluting your main class's variable list.
Sounds good, Thanks for the help
What the error?
Don't create widgets in Game Mode.
Widgets are mainly client side, and Game Mode is server side.
Adding control point position to my interp to movement : It adds the right vector (800;800;20), but i end up seeing my object going (-800;800;20), what the hell happening with "x" value ?
Where should I spawn it then ?
Do it in Player Controller.
Show the code.
I assigned a parent class to a BP, because I want to have the same beginplay functions working on it, how do I add this node manually:
.
If go to my map from my main menu my zombie AI dont go to me if i in his range
and if i go from my normal map its working
Right click on the Event BeginPlay node and there should be a "add call to parent" option on it.
Thank you!
Can you edit that Main Hud widget? It seems that the Create Widget failed to return anything
Are you perhaps missing some navigation bounds in your map?
this is my main hud
Try disconnecting the return value and connecting it to the Add Viewport node again.
Try creating a new widget BP, and bring over the stuff you made there
I did ask him to move functions from Game Mode to Player Controller, so it might not it, but I might forgetting that pasted BPs are not refreshed
@trim matrix Are you testing with multiplayer settings?
Hey, I am learning/messing with a project which recreates God of War's Axe throw
Ah shit, so it's MP
and am having trouble understanding what is happening here...
In this first episode of Let's Make, we look at how God of War's Leviathon Axe Throw was designed, and have a go at recreating it using UE4. (Final Result at 8:55)
This is my first time making and recording a video, so I hope you all enjoy. It turned out a bit longer than I would have liked and thereโs a lot of things I could have done better w...
Can anyone explain ?
I have no idea with MP stuff, sorry
But theoretically it should still just works
@trim matrix Widgets aren't created on Dedicated servers. So it'll never be valid.
Not sure which node in particular you need some explanation
Why we are multiplying throwDirectionVector with 250
why we are adding cameraLocation to it
and why we are subtracting pivotPoint's relative location from it
If you're running on "Run as Client" multiplayer, BeginPlay fires on both the client and on the server version of the player controller. This means when your player controller starts on the server, it is trying create a widget on the server which the server cannot do. If you put a "Has Auhtority" node before the widget creation and connect to the "remote" pin, then it'll only exec on the client side, which should then prevent the error.
Shouldn't the tutorial supposed to explain what the algo is doing?
I haven't checked it yet, so I don't know how the pivot point is located, but the gist of it is that you set the location with offset from the camera. Throw dir should be the forward vector, which is the forward location of a rotation vector.
let's say I want to have multiple damage types from the same event. do I use Apply Damage multiple times while changing the damage type class?
You could if thats how you want your damage system to work
Dont have it check world dynamic
Then your character cant have anything world dynamic on it
Otherwise you might just be able to hack in a doonce and worry about it later
So does this sphere grow?
My Ai dont want to move to me if i start my game from my main menu
Is it changing size in a timeline or something? How long is it changing for?
Thatd be easiest
are you spawning it from the level blueprints?
I made a projectile with a sphere collision. It sometimes gets collided with objects having collision and works the way it is supposed to. But sometimes with higher speeds it just passes through the same object...
How could I fix that?
heres the projectile bp
and heres the sphere collision's collision settings
Better you utilize projectile movement component instead of actual physics
what should I use as the object when casting to a class?
Sorry what?
So ya know when you cast to another class?
Casting always requires a reference
Yeah, but as of recently Ive been just using get actor of class
which doesnt work well
So I was wondering if theres a better way of doing it
No it doesnt. You should be storing references in your code. Ie, setting variables for thing you want to reference elsewhere
Blueprint interfaces are a great method for when bps need to talk to others, but the concept and execution might be tough to grasp
Dispatchers can still require casting
Interfaces do not
Interfaces is more "one for all" solution
Depends on what you are trying to do
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
Aside from getting them to work, you canT really go wrong with bpi
Basically any classes that uses the interface can know what to do with it
Oh boy.. The interfaces and casting discussion again.
What have i done
Welcome to hell
Hehehe
And the usual recommended video on the three ๐
Wouldn't it be nice if BPs have phones or walkie talkies ๐ซ
YES!
At least them BPs can play Diablo Immortal when they're not in their working shift
I would like to have such a layer of abstraction that debuggin is more cryptic than usual
beat me to it
Anyways you need a reference for your cast
And I should use interfaces for that?
But then how do i do that?
But these vague questions will only have vague answers
Here lemme screenshot what im trying to do
Spawn box trigger is getting a reference to the box trigger class
or at least I hope it is
And I'm trying to figure out what to use as the object
I would imagine you want thia class to know about its reference on begin play
And you would bind to this event on begin play also
It already is
No its not
The event in the image?
Ill give you a mockup, on phone atm
k thx
hii, i am wondering why my BP communication doesn't work.
Right now i have 2 BP. One BP "Stones" where i have as Static Mesh Component Stones and one second BP with Box Collision.
I am trying, when i come over the Box (On Component Begin Overlap) to change the scale values of the stones, but it doesn't work.
Somebody with any idea why?
which conversion?
Right. so Trigger class has the collider which, if the player overlaps, will fire its event dispatcher. The Reciever class has its binding to the event called by Trigger ED, which is linked to a a custom event in Reciever, and the fires the logic you want to do. The tricky bit..... TriggerActor is a blank actor variable that is exposed - in your level, you would hook up the Trigger class to the Reciever's TriggerActor variable so the cast can succeed (as it is of the type it is casting to, therefore able to find the ED of the Trigger and bind it)
Thank you so much!
you are not checking for the player to activate this overlap event, you are checking if a Stones actor overlaps it, and then you set its scale. And i would also guess your Stones never "trigger" this overlap because they are already in the overlap area and/or do not register the collision channel
the ai?
oh, sit tight, ima show you bpi
K
i changed my skeletal to other skeletal, now it's animation blueprint does showing the skeletal mesh
how i can again assign skeletal mesh to that animation blueprint?
as you can see, there is no skeletal mesh showing
Same concept as the dispatcher. But there is no casting. Trigger class calls the trigger event. Receiver class (the MyTarget reference) calls its code. The 3rd picture is the BP interface which holds the function that the other two class know about (both classes have this interface hooked up in their Class Settings). You still need to do hook up the trigger/receiver in the level to specify what it the trigger should call on
that is what you will find in the video posted early about blueprint communication
if you get lost, watch that video, Zac explains it all very well, these are dense concepts
Does anyone know why this cast would fail or where i should look to fix it? the passenger is a character reference
does it always fail?
yea, i tried watching it, and it gets the correct character but returns none for the get controller
is passenger a pawn or character class?
character
then thats the wrong node ๐
Get Controller (Target is Pawn)
yes, The stones overlaps in their BP when the player steps over. But how could i check this, what you told me.
Thank you for the answer
@brazen merlin that was too obvious ๐ do you by any chance know what would be correct way to do it?
Get Controller as Character lol
#blueprint message the answer is actually in this picture up here. Check for Character on overlap then do your logic. Sounds like the stones of the overlap also matter, but its better to specify the target (at lease from what i assume you want). Read all that stuff up there on dispatchers and interfaces. You want to learn those and it will help you here and with other communication between bp problems. There's also a vid link that you should watch
hi, how can i get a character movement components orient rotation to movement to work with set velocity
the object is moving but not rotating towards the movement
rotation rate on all axis is 180
object is using flying
Do you mean in the level blueprint?
@brazen merlin sorry to bother you again, but im not getting any nodes from that and im not been able to find help on google, how would is that supposed to look like?
This wouldn't matter. Character inherits from pawn so the Get Controller (target is Pawn) is valid to use with Characters as well.
@vague dome by chance are you possessing a different pawn/character like a vehicle or something?
or is this by chance something multiplayer?
Thank you, man!
Look here, when i am moving my actor into the Box , it seems that everything works, but the scale values of the stones don't change
i never mean in level bp
Casting is not a means of getting a reference to something. It is a way to make a less specific reference more specific to allow you to access the variables and functions that the more specific reference has.
"Other Actor" in this case is the thing actually overlapping with your box collission and it returns an "Actor" reference which is the lowest level class of an object that can exist in your game world.
If your "Other Actor" is your character and your character is overlapping with the box, then when you're casting to "TestSpieler" you're basically asking "Is the Other Actor of class TestSpieler" and if so, the cast succeeds, allowing you to access the variables and functions from the "As Test Spieler" pin on the cast.
"Other Actor" cannot both be a "TestSpieler" and a "Stones" object at the same time. Only one trigger of the overlap will occur at a time and return the appropriate "Other Actor" that caused that particular trigger of the overlap.
What you need is either:
A) A reference to the actual "Stones" object that you want to change.
B) Have your "Stones" object actually trigger an overlap, then you could cast "Other Actor" to "Stones" (which I'm guessing is not really what you want to do)
@brazen merlin Didnt sound like you lol
come to think of it, character extends pawn so i guess that should work, you can try this one though (lol just read what you put Datura!)
Then come to think of it, what do you mean by level?
world outliner and details panel i guess
Ok
you have the trigger and the actor in the level. so they need to know of each other specifically
I have an inventory menu ui that I can get it to open. I can't get it to close. any one have some ideas.
when you expose the variable, it shows up in the details of the class that has that variable, then you just plug in the other one (drag and drop, or dropdown menu, or w/e)
I don't see an option for expose variable
its the eye icon in the bp (check dem pictures up there)
Yea ok
Big Thanks for your explaining answer !!! ๐ ๐
Umm... Where can I find the class details panel? Do you mean the details panel from the actor of the class currently in the scene?
whatever you have selected will show up in the details window
Ok thats the details panel I was thing of
Does anyone know why this is happening? I'm trying to debug my BP to find out where the problem is, but it shows it stops at the do once, even they it still did the print string after the do once
so it did the action once and then isnt doing it again?
it loaded the instance of the get level streaming
but there is alot more stuff after this so I'm trying to find out where it stops, that's why I'm so confused why it shows it stops here
I have no idea how to find out where the problem is
you can try break points after the string to see if it does reach there, or maybe more strings that are a bit more descriptive of the execution sequence
How would you do this method with multiple actors?
which are you doing dispatcher or interface?
By how to do it I mostly mean the variable
for the actor
the trigger actor dispatches the event to the receivers
so the same trigger can activate multiple receivers
just plug in that same trigger to each receiver you want
so you want multiple triggers to activate the same reciever?
so the way I have it there are 3 recievers but one is randomly chosen
ohh, randomness
but the variable for the chosen one didnt work
this would be better as a bpi then, since the trigger can have an array of the receivers, and you can have the logic there to choose at random
Ok
for now I'll stick to what I have
but when the rest is working i'll get to work on that
hey guys, any idea what am I doing wrong here? the goal is just to sort the PartsList array into a new SortedParts array, based on the Z location of each part:
as an alternate, for dispatchers, the receiver class can have a Int variable called ID. set the value for each of the receivers to be the target of the dispatched event (0,1,2) and in your trigger, choose a random number between min and max. A little harder to keep track of, but the trigger can then call the even on the receivers and only the one with the matching ID will get called. You can add inputs to EDs, but you'll need to remake or update your custom events in the receivers to include this Int value to be passed along. ๐
But in that case I'd have to rewrite even more :/
what part is wrong?
lol, exactly, but if you did not know of interfaces, you may end up inventing a solution that interfaces are meant to handle!
Yep
it doesn't seem to be adding all parts, and it also doesn't seem to be adding them in the expected order
I'm confused because to me the logic looks right
try some breakpoints and watch your array variables
Might be because of this bit having the "include all descendants" checked. You're getting the relative location which if you have child objects can sometimes be 0.
for context, this is the Build event that timer is calling at the end:
I removed some redundancies but still no luck
How would I make my camera follow the rotation of a bone?
via code
I don't wanna switch this hierarchy
at all
either
i tried this
but it doesnt work
I solved my issue. The problem was I wasn't removing the "used" indexes from PartsList, so every time I reordered it it would get the wrong part instead of the "next" in line.
this is what it does in case anyone is curious
why when i set my camera Z to 0 it goes above the ground? Im trying to set my camera (eye height) to a specific amoutn so my assets are scaled correctly
Check the locations of everything that the camera is a child of - one is probably shifted up.
I got it parented to a spring arm which is parented to nothing, both on 0
But I think itโs cuz my character is at -90 and itโs snapping to the grid which is considered 0
Rookie mistake
So anything I set in x would be the half height of the camera
Looks cool share that on #work-in-progress
Will do!
i want to make different playable "heros" with different abilities, do i make a character base class and every new hero would be a subclass of it where i change how abilities function ?
Sure, you could structure that way. Not sure if you did, but it should become clear if you mockup every character on paper to see where uniqueness happens. Maybe its just stat numbers or different animations...depends on a number of factors
Component based methods may also work which may allow some mix and matching
i had the idea to share the base function of attacking having health etc their only difference is the ability
Oh i get that, theres a little more than that when it comes to making it all. Perhaps you could work with a parent and one child to realize the first character before making the rest
But it woukd help to know, as best as you can document, the operations of the character and the different abilities
also for the ability do i make a function in the parent class like Spell1 which fires when pressing button x and override the functionality in the sub class ?
if thats possible at all
You can override function so you could do it that way
Hello everyone, how do I transfer all control from the keyboard to touch control? I did everything according to the video tutorial, but it wasn't shown how to set up the game for the phone, the only thing I can't configure in the control is that my character always moves forward, also moves to the left and to the right, but does not turn, I need him to turn 90 degrees when he reaches the turn
Hello everyone, sorry if it doesn't make sense but I am wondering if I can somehow change the directx version via button and blueprints? thanks for help
Im guessing you mean for settings?
See if you can find some obscure documentation or posts on it
Its functionality could be bound to c++
yes
well, I tried but can't find it anywhere on internet
Did you try the 3rd page of google?
If so, then idk
especially if there's no documentation on it
Hello. Help me, how to make an easy check. If the light is on, then ignore it, if it is off, then turn it on.
You can link to an example.
It should be very simple, but I can't figure out how to build the logic. Because, I use the set in visible function.
I asked the very same thing yesterday.
The reasoning behind only set on launch was to not accidentally use unsupported graphics API and potentially stop the game from running at all without going through .ini files.
Though that's ambershee's point brought to me yesterday, which makes sense to me.
So in other words, you have to do that in your game's launcher, or just use the commandline option
Hello everyone, do you know any good source to read to get overall understanding of code patterns using blueprints? Like how to create object manager to spawn/track or maybe pool the objects? Or how to create singleton type managers so all info will not be stored in a game mode bp any other implementation of the common design patterns in bp? Do I need to enhance event system with some dispatchers/ topics/ queues ? I just need the best practices to design the code structure in UE. Thank you in advance!!
check out the epic live training yt videos, take notes on the techniques and pay attention to patterns of methods between videos
I'm trying to make a sprite look at the camera at all times, would there be a material method of doing this?
Material billboard is a component that does this for you already
Interesting ty
New here looking for some assistance with some blueprints and help with understanding how to do a few things with picking up objects as well as fixing some level issues if someone could?
@sly ibex https://www.youtube.com/c/MattAspland
Hi, my name is Matt Aspland, on this channel I'm going to be doing tutorials to help YOU create your own games primarily in Unreal Engine 4 (Ue4) and Blender. I provide very quick and easy to follow videos to teach you how to make great games.
But who am I?
I'm a young aspiring games developer and graphics designer. I enjoy 3D modelling in Ble...
try that series of videos. He will teach you just about everything you need to know
Thank you
this is a good one
and in general googling specific issues on google or youtube can help tons
in my experience
I just have tried SO many tips on youtube and it seems that all of them just dont work, and when they do its small things like making lights flicker
Ive been doing and remaking the code for picking up items and it just never works, or the videos are 5 years old
try his videos. He can and will help you
Matt is some what hard to reach. If you have any issues. post here. Some one will help when they can
Will do!
HEY! How do I get the angle of the Slope that my player is on. Like for terrain???
So I copied Matts pick up code so i can have object be interactable and it works, although i uh.. cant put the object down, no matter how many times i press the button
Not only that but when you look down the object makes you fly across the map with collision
make sure to follow the steps exactly so that it matches his example code
and another useful thing is using print strings to find out the cause of any errors, it can help pinpoint the exact location sometimes
I've made a blueprint which makes an actor spawn in different locations and respawn after being destroyed. But I'm getting errors although it's working fine.
This is the blueprint
how do i dynamically add buttons to a scroll box?
By adding one to whatever container you put in the scroll box.
Be it Vertical Box, Horizontal Box, Grid Panel, etc.
Get the reference to the vertical box and add children with create widget
and then add the box to scroll box?
Ignore the scroll box part, it'll do things on its own based on the vertical box.
Do it on the Horiz. Box
Wait
Why you're creating another horiz. box?
playerArtifacts has the image name which is used to load the texture2d asset and then assigned to button upon construction
That horiz. box goes nowhere
huh? can you explain
default horizontal box is a widget bp which has a horizontal box
This goes nowhere
And you don't need to create another widget again replacing the horizontal box in BP, just replace it with your user widget in the designer
In the Designer hierarchy, replace the Horizontal Box with your User Widget, that you said already have its own Horizontal Box
Yes
so i need to go through the loop adding the Dyn_Horizontal_Box to scroll box?
...you said earlier that this user widget has its own Horizontal Box...
Anyway, gotta move this to #umg
ok
By having them seperate in your material
They should both still be executing
But currently you are just letting one overwrite the other
Yep
What would cause a FoliageInstancedStaticMeshComponent child to become invisible when setting a custom data float?
thanks man works
*it works
but now it isn't making other physics objects fall
for some reason idk
only if physics on the sphere collision is enabled it works
Post your error messages. I have a feeling it is because of this though as you're feeding in the SpawnActor return value at the far right into the bind at the top left which means that the bind is trying to read a value that does not yet exist until the first respawn happens.
What you probably want to do is create a "Spawn" event and hook up your first bit of code as you have, right up to the respawn event, to which you call the "Spawn" event after your delay.
@dawn gazelle
These are the error messages I'm receiving
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_FinishSpawningActor_ReturnValue_1". Blueprint: ThirdPersonExampleMap Function: Execute Ubergraph Third Person Example Map Graph: EventGraph Node: Bind Event to On Destroyed
Blueprint Runtime Error: "Attempted to access Reaper_Test_BP_C_0 via property CallFunc_FinishSpawningActor_ReturnValue, but Reaper_Test_BP_C_0 is pending kill". Blueprint: ThirdPersonExampleMap Function: Execute Ubergraph Third Person Example Map Graph: EventGraph Node: Bind Event to On Destroyed
May I know how do I create a spawn event?
can someone give me a brief overview of how to copy the player settings from UT editor to Unreal editor? im trying to setup the same movements from UT editor to normal Unreal editor
what does this letter icon mean
does anyone have a tutorial on using timelines to move something along the z axis in a blueprint?
actually nvm ill just try and get an actual animation to work instead
Yep, so the error is exactly what I said it was. All you need to do is create a custom event and name it "Spawn". Disconnect what you have on BeginPlay and connect it to this Spawn node. On BeginPlay you can call "Spawn" as well.
Okay let me try
I believe that icon indicates that it is capable of continuing logic to other blueprints (ie. sending a message to another blueprint)
thanks
@dawn gazelle Yooo I got it thank you very much!!!
Does anybody know what calculations might be required to rotate an array of vertices around a pivot point?
I have an array of vertices, I want to rotate them around a pivot and then create a mesh using them
But I can't quite make out the maths behind it
hi, i have a character wich is linked to default physic asset of unreal, i'm trying to use the ragdoll on her but look like its'nt working
Did not know such a node existed already
i have seen that in here i dont have physic assets file linked, i need to associate it?
ok i have just tested a begin play and set ragdoll, now it's working
but this logic bp not working if i cast the hit to the object i want
When i use normal car it works but when i use chaos it does this can someone help me
You cant cast something to what you want, but to what it really is
A car wont be a plane no matter how you cast it
I am semi new coming to unreal 4.27 from blender (and ue5 sometimes) I have managed to get 2 separate animation blueprints to work individually on cc3 characters. One blueprint is livelink face, the other is my perception neuron live body mocap. What can I google to figure out how to combine the 2 anim blueprints to work at the same time on a single character? Overall goal is to get face and body live at the same time. Thank you in advance!
incredible! Truly appreciate your guidance. I will research combined blueprint now. Thank you so much. I will move further questions to #animation
thats been my method the issue i have been struggling with is what nodes connect them lol
in the event graph what node connects 2 evaluate live link frames ?
i think this is my only missing component now
ok understandable
thank you!
Anyone knows what happens if you try to Async Load an asset that's already been loaded? Does it just return completed immediately, or does it try to reload it each time?
so im currently having an issue with the UMG Widget blueprint architecture. I have a master UI widget that containts other widgets that makes up some of my scene controls (im making a scenario editor so theres a list of objects you can drag in and camera rotation buttons) but the issue is for camera panning which uses the mmb to drag around, I need a transparent image so that the mmb can be captured. The issue is now as im developing a world space widget that will hover over a selected object so you can move it on a grid, this world space widget cant see any mouse events as theyre being captured by this screen space widget
is there a good work around or should I try and move the camera panning to c++ with action/axis mapping?
like, instantly?
you'd be surprised with this engine xd
I'm just nervous it will end up loading many of the same assets into memory
it doesn't specifically say it checks if there is one already loaded
it just says it loads one
Hahahaha thanks for the reassurance. And yeah I'm actually in the documents right now trying to make out what it's actually doing
:p
I'm wondering how I can set actor transform using quaternions
I don't think BP supports this directly but can I just use my BP with quaternions and at the end send the values to a C++ script that sets the transform?
not sure how to jump from BP to C++ I never used C++
how could I copy bone transforms to a timeline?
I have a bone meant for camera movement in Blender
you can see the way the camera moves
but I can't copy the transforms from the camera bone onto the camera
I tried this yesterday and it didnt work
thanks
I actually got what I wanted with euler angles but now I'm facing a different issue.. if I send my data to a blueprint class actor.. I get the desired results.. but when I control the Player, it doesn't match
depends on orientation actually
i don't think so.. why would it work with a normal actor but not on the player?
they get the same data.. I matched both with the same mesh inside so I can compare check this out
this is my player: yes I know it's odd to look up like this.
I have an actor with exactly the same mesh.. same position.. they are controlled by the same source
and this is my viewport.. coming from the player camera.. see how it matches initially.. (i can see the mesh camera from the actor)
and then.. they offset
it looks like an order of operation thing..
i'm using a player because I'm using a split screen to output two systems to two displays.. but maybe I should give nDisplays a shot instead.
or maybe I can use splitscreen and select any cameras to use as point of view?
those things are kind of hard to find tutorials for
Hey, so ive got an issue. Im using widget blueprints for a scenario editor, to control a list of assets that can be dragged into the scene and placed in grid spaces. The issue is i want to be able to left click, select an object and have a world space widget with arrows and other options come up that the user can use to move these items around. The screen space UI has a transparent image that listens out for the On Drop of the drag drop operation for the asset buttons, but this obviously blocks mouse events from reaching the world space ui. Any solutions or work arounds?
im fairly new to unreal as i got put on a project at work with it and had no previous expeirence with it until 2/3 months ago, so im struggling a lot with the differences from unity
Projectile movement component should not need physics for your components.
Use the debugging tools to see if its loaded
This week Christian Allen will provide an overview of Hard & Soft Object references in Blueprints, why the differences are important to know about, and how you can utilize Soft Object references in your project to help with memory management.
Watch Inside Unreal live at twitch.tv/unrealengine, Thursdays @ 2PM ET
DISCUSSION THREAD
https://forum...
They go over it in this video
Hard to know exactly what you're trying to do, but if you want your mouse to ignore UI elements and only interface with the game, you can set your input mode to game only
I want to move the camera component that is within my character but I want to do this from another BP
i know how to target an actor this way but I can't figure out how to access the camera within a specific character player index
I run into this a lot, usually I solve it by getting a reference to the camera object in the level BP and store it in the GameInstance
If it's already in the character though, there should be a way to reference it
I also need a way to specify player index because I'm going to have two players (split screen)
i'm just not comfortable with fetching components.. it's a bit different than using paths
Yeah I see what you're saying
What's the best way to show FPS in game consistently? I've got this on BeginPlay in my controller, but stupidly it toggles the FPS counter, so it's only there every other time I run the game
I have a simple hud text
Ideally you make your own FPS counter
Or get fps of scene and print string with really short duration
what, just have a tick function that grabs the delta time and divides 1s by that?
There is literally a get fps node
oh nice
Though ideally you want to do the update on C++ tick, as to make it less disruptive
I've been racking my brain trying to figure out why my foliage is invisible when setting PerInstanceCustomData. Any ideas?
^ Translucent material with a default opacity value of 1
^ function to change PerInstanceCustomData at runtime
^ foliage is always invisible
I'll try there too
Ack, I'm making a third person character from scratch and I'm having a little issue with the character. I want to make it where when the character is walking, they'll walk in the direction of the camera. It just won't work, what can I do? :/
QQ. Where is typically thought of as the best place to store/save Player info like current quest/mission/whatever? Player character, game state, etc... ? My first inclination is the player character, however, I figured I'd bounce the idea first just in case there are potential problems.
Just a singleplayer game?
At minimum it needs to be stored in game instance if you want it to persist between levels. You will need to copy it in and out of there between levels to transfer your character data.
Game Instance is the best solution, at least for a single player game.
@trim matrix Thanks Sounds good to me.
Yerp. just gonna use game instance as the others have said. At least for now.
Lolllsss someone help please? :']
What are you doing that isn't working
Game instance sounds like a terrible place to store that. Sounds like a fantastic place to never save the state of quests and lose it when a game crash happens.
Quite frankly, no gameplay data of any kind should ever be stored in the GameInstance for any reason. Save it before, and reload it after level transition.
I've tried the use controller rotation thing and some other options I've forgot :/
@velvet daggerAs in pressing W makes the character walk in the direction the camera is facing?
Yesss
And then it'll rotate the character to that direction :)
Rotating the character is probs a whole different thing
Sec. Don't have the engine open. First the rotation needs to have Use Control Rotation Yaw disabled on the character, and Orient Rotation To Movement or whatever it's called turned on.
Alright, did that :)))
That'll solve your rotation issue. As for actual movement, you can rely on the camera manager. It'll keep you from having to get a reference to the actual camera.
Are you still using MoveForward, MoveRight axis events?
I'm pretty sureee
And also, does having the camera in the spring arm cause any issues with this?
No. Doing this through the camera manager will make it so that it will never matter if you're in the middle of a camera animation, or which camera you're using where, or anything will matter. Camera manager always keeps a reference to the camera your game viewport is using and allows you to easily get it's rotation values with ease.
I managed to get this all set up and it works, how do i delay the foot steps so they are slower in between steps, and how do i lower the overall volume of them
Ackkk, I've never even heard of the camera manager, I'm a little new to Unreal stilll : (
Is it placed inside the character by default or do I have to manually do it?
Is it even INSIDE the character? x d
Player Camera Manager lives on the PlayerController.
It has a global accessor though.
Is there a blueprint node to round a Float to a specific number of decimal places?
I know about Round but that just makes it an int
Is this for numerical, or text display?
not quite, but some math can do it
floats do have some innacuracy, so i hope you're not doing something super precise
Nah I've done my time debugging fucked up float bugs before. This is just for pretty UI numbers ๐
format text
ToText
And then just do substring?
Nah I'm gonna write the tricky math bullshit it'll be fun
I just wanted to make sure i wasn't wasting my time doing something already included
ToText(Float) has two parameters that allows you to specify the amount of fractional digits to allow.
lol, your right, i have both, but im using toText
oh wait, either work, i just decided to not include the text
but yeah, toText has the math in for you
oh, sweet, thanks!
all credit to Authaer
I have a C++ function that does the same call as ToText(Float). Just does a MOD equation on the float by 1 and compares if the return value of that is > 0.05. If yes use 1 fractional digit, if no use none.
Allows very easy cleaning of floats for UI use.
sounds less cumbersome than shifting the decimal around
always like seeing and using % when possible
FText UTarrionUILibrary::FormatFloatToText(float Value)
{
FNumberFormattingOptions NumberFormatOptions;
NumberFormatOptions.AlwaysSign = false;
NumberFormatOptions.UseGrouping = true;
NumberFormatOptions.RoundingMode = HalfToEven;
NumberFormatOptions.MinimumIntegralDigits = 1;
NumberFormatOptions.MaximumIntegralDigits = 324;
NumberFormatOptions.MinimumFractionalDigits = 0;
NumberFormatOptions.MaximumFractionalDigits = (FMath::Fmod(FMath::Abs(Value), 1.f) > 0.05) ? 1 : 0;
return FText::AsNumber(Value, &NumberFormatOptions);
}
More or less if it's not close enough to a whole number, it allows a single decimal point. If it's within 0.05 of a whole number, it cuts the decimal off entirely for the display.
yeah i getcha
Is someone able to assist me with the my code? I am really lost here.
Man, the modulo node makes life so much easier
It was quite tricky to get my head around
Its a good compliment to division
Theres a division(whole and remainder) node, which is this 2 in 1 really
Im using it so I dont have to set a int to 0 again after using it in a loop
I finally got to try this code out and it kind offf works, I wish I had some software to send a clip of what's happening
Might be something else causing my issue so I'm gonna look into that :)
Unexpected usecase ๐
Well fancy that !
Basically if I want this to fire 60 times before the branch is true, I set the lower int to 60
Makes sense
so every time the remainder is 0 it fires off
This could also just be a forloop tho
Yeah I got it from an unreal learning video
But yes. Or if you were doing rows or smth
Rows and columns. It could swap row per x length using a modulo
Hello everyone! I have a basic blueprint that gives me a rudamentary day night cycle. However for some reason my brain cant wrap around how to make the sun rotate the opposite direction. How would i go about this? thank you! here is the blueprint Hopefully it can be read from the screenshot distance. otherwise ill zoom in wherever needed. thank you!
Dont know what that is lol
So many nodes
Loops from first index to last index
Helpfull in cases like this
Theres also while loops
But they are easy to mess up
In a while loop for your setup it would be "While(tracesPerformed<LengthOfTimer)"
NVM i figured it out
Ah nice
Thanks
Would it work the same here though because I am looping it in a timer
What its meant to do is when the timer event has ran 60 times I want to stop it
But still now I know of the for loop so its still a win
A potentially slow one
For loop and while loop (and other loop macros) are 'instant'
They do it n times right after each other
unless you put a delay in the loop ๐
Well what I am trying to do is have a sphere trace expand, over a second (or more) from a the character to a larger area
so over a second I want to perform 60 sphere traces each gradually bigger
So I figured I do it on a timer instead of a tick
and then when its done 60 I clear the timer
That i've done quite a few times but dont tell anyone ๐ค
heh, purely for testing and previs, nothing to ship with
sounds like a good way to control it
It helped bigtime when proc generating big landscapes with bp only mode enabled
as Squize says, thats for a latent check, that is over time
Yeaah I think I made my first spaghetti code tho
yep, the first case for why i needed one too
Also avoided the 10 min editor freeze ๐
sweep it into a function, box that spaghetti
i recall this conversation before ๐ค
What do you mean with this?
Sorry, Im a bit confused with all the terms ๐
Deja vu for sure.
just means that the check you're performing is over a period of time (1 second) rather than 60 times of those varying sizes at that moment
Latent == not instant
I suppose
This can be cleaned up more^ ๐
But its a start
How would you clean it up more?
I am trying to write clean code from the beginning
I find it quite relaxing making everything neat too lol
Since a lot of people call it boring
that suppose to fire?
anyways, i like to promote timer handles to variables if im going to clear them later. Create Event is also nice so you can move your event away from the timer
I promoted the handle to a variable since the blue line was bugging me lol
Ill look up the create event node
cheers!
You dont need a do once,
No reset
No sequence
No macro for times per sec(but i guess some prefer it. Its litteraly just 1/timespersec)
Save the origin location on keypress before timer is setup
Along with reseting current index to 0
After trace highlight into branch to clear timer when enough traces are done
just rewrite the damn bp graph then Squize
Some great tips
That's what I use modulo for so I don't need to reset
But saving the origin on keypress will clean it up a bunch
Not at pc :( but yeah its a start
So I need to have a map from all my physical materials to which bullet decal they should use. What's the cleanest way to store that map? Standalone struct?
if multiple actors need it, struct sounds right
doing an enum|phys mat map or something?
yeah pretty much
Decals are just material AFAIK
so, bullet hits phys mat, that tells it which decal to spawn?
Like this? Doesnt seem to fire off the event
it should ๐
This is what I've got right now, though I need to look into how this bullet decal system wants to work
Might need to reorganize its materials
should do so then, just reference directly until you see which pair are always together
Ah I see what they've done, they use a limited set of master materials and then made instances for each individual bullet hole
master vs instance dont have any performance diff afaik, just convenience of similar logic
print string after the event?
Yeah Im looking at the BP while I play and the set timer is fired off but nothing is fired off from the event (tried print string as well)
https://gyazo.com/d1597fd54655231b64640a63fc088a34
Is anyone able to show me where or how i can delay the sound between steps so its not so fast
thats a new int var # Of Traces Per Second, its a number? or 0?
its 60
cant show you, but i can recommend to use anim notifies for the feet contacts so they sync up
I dont have a model for my character, so does that mean id need a model to be able to create an anim for sound syncs?
oh...
Thats why i used a blueprint sound cue, since i didnt have a model
could try to check last location and measure distance to know that enough has been travelled to play a sound
Double foot trace with do once until treshold for rising foot is reached
true, traces could work
scrap the create event then, i dunno what to say
i see that you have a timer (to space out the sounds right?) and if you store the output handle as a var, you can check to see if it active in your branch check to decide if a sound should play
you can also use absolute value for the velocity checks so you not checking - and +
For some reason the #per second was always 0 even though I dont set it anywhere in the BP and its value was 60
I recreated the variable and it works again
now the create event works as well
super
slick
Are DOONCE nodes unreliable?
I had a few and they were working fine and then suddenly when I added many they bombed out and none of them worked.
Is it perhaps because they are all instances of the same function in the Engine or something?