#blueprint
1 messages Β· Page 113 of 1
you would also need active objects to reassign their bucket or bin every physics tick if you wanted full 2D coordinate wrapping solution
pros and cons to each method
It might actually make the most sense to dupe the player and do the force add haha
that just sounds like an issue waiting to happen to me though
That doesn't solve the fundamental issue
You will be jumping on 2d coordinates and not in 3d
also lining up the shader could be a hassle without using high floating point precision
I've become partial to the full 3d solution, and then just squared distance checks for things like enemy aggro, it sounds a little redundant, but it will almost certainly be less work on the developer and CPU in the end than a bunch of conditional coordinate wrapping imo
dont even need the sqrt here in basically every case
and when you do, since he is using the Unreal Physics for collisions thats all internal anyway
And youd reduce load by only moving relevant objects during the rotate
Some section abive and below the player
Smoke and mirrors
no point in updating the world transforms or any object transforms, the full 3d solution with a custom coordinate mapping just for the character and active object placement, updating what should otherwise be static positions comes at a heavy cost that is difficult to overcome unless you've done some insane prebatching
Feels like it'd be an easier feat than the alternativez but ive never tried any of them
Ive seen amazing things happen in the shader so
This is my door frame
And my code to mirror flip it
However, when flipped, it became like this
But when the structure was saved and reloaded, it looked fine
What could be causing this issue?
@floral totem Im pretty sure this is what you're looking for
and then depending on how you want the input and movement handled, if you do them indepedently of the physics tick you will also need to reapply the location but not velocity
this is also assuming your velocity has been either frame delta or tick adjusted
hi, i have a camera system that periodically spawns cameras in different locations around the player and switches between them after a small period of time. this acts as a cinematic camera mode that provides the player with different angles to view the player from.
however, i'm having an issue where after a while, the player's character controls get reversed, so instead of forward moving the character forward, they move it backward. the same issue happens with right and left as well.
i'm using the default controls from the 5.3 third person template.
how do i make it so the character always turns left when the left button is pressed, and always moves forward when the forward button is pressed, etc? thanks
Could the control direction be flipped?
it seems like that is what's happening
I'm unable to access it via a Blueprint node in the same way you can change the Light Intensity property, etc of a Directional Light's Light Component, C++ isn't an option here unfortunately
We use a dynamic Directional Light, it still lets me adjust the Shadow Amount manually in the level's DirectionalLight, but I would like to access it via Blueprint also to emulate overcast/cloudy lighting for use together with weather effects
If there's absolutely no way bar C++ I'll just look into other methods I could emulate this effect
"Set Intensity"
You can access set shadow amount in 5.3.2 atleast
Takes a directional light component as target
This isn't the effect I'm looking to achieve as I still need the lighting from the sunlight π
I found a way to do it by just adding the DirectionalLight as a component directly into the same actor I handle the weather system in, rather than accessing a DirectionalLight in the level, this lets me set the Shadow Amount as a Blueprint node.
No clue why it doesn't let me do it the other method, but this method is more streamlined anyways with what we're doing
I have built a respawn trigger here that only works as soon as my player comes into the trigger area. It should be noted that this only happens once
But what I want is that as long as the player is in this trigger area, the opponents come every 2 seconds
Waht have i made wrong?
you'd need to get the component from the directional light actor
It never gave me the option to access the Shadow Amount even if I did
We avoid using casts in this system
But I figured out a solution regardless, thanks for the help π
Casts are haunting projects left and right i guess
Tutorials have made the myth a truth
Over using BP Interfaces isn't a replacement for casting. I say that as I see a lot of people that have been told not to cast and use interfaces instead.
Just casting to a DirectionalLightComponent would be better than any other solution in this case.
Create a delegate in the daytime system that sets shadowamount ,
Subclass directionallight (or your own actor) and register to this delegate
Win winn
Add an additional gameplaytag to the delegate, and you can now filter them aswell π
You still got to cast to be able to bind to the event dispatcher.
You could interface it, but yes. Just cast
Odds are the daytime system always exist
(Interfacing it doesnt make sense)
Yea, people forget the overhead for using an interface.
Alright so im trying to make a gun system for my game, I want there to be around 10 - 15 guns, how would I make the gun base and the children attached to that?
Gun base would have the functionality / events, but zero asset references , the subclasses would overriding the necessary events (if any) and providing the assets and actual config for the gun
Bullet to use, spread rules, projevtile speed, mag size, reload speed, animations related to this (?)
damn, you'd think id know more of what you're saying, it has been 3 weeks since I last worked on my project and Ive managed to forget so much, currently im doing a yandere dev solution for the prototype. ill try and figure that out though for the actual game
Hi, why my door works normally only from second time i open it? To the right is door with the same code, but it does work from first opening
its the animation, more specifically the close one
I had this issue before as well, ive forgotten specifics
should be the time to play the animation, might be causing it to bug out on first open/close
show code π
ik thats the weirder part, ive never seen that specific issue
xD
first door starts in the wrong state
so it think it's open, while its actually closed
Also, you should consider "play" and "reverse" and not play from start / reverse from end
rip xD
Hahahhahahah
this is such a mess
My variables are the same
like what the actual f*
reverse from end is being played
(but no wonder there's no control here π )
I played some satisfactory
Do yourself a favor, and start being more organized, from this very moment
Clean up this mess
Yeah, i actually do organize from there
yandere dev code π
Yeah, i know about my "pro skills in bp"
if then = if then = if then = if then
switch on int
wdym?
embrace it
embrace the switch
Is it the problem?
instead of
if
else if
else if
else if
is there actually a switch?
It's hard to say, because it's so messy
that would clean it up a bit, most of the ints are for ammo calculation but the top set current gun and get current gun should look better
but Im not sure why your BP is doing ammo calc for a bunch of different weapons
ammo count would be in the gun
yandere dev, all the guns are in the player rn
they go visible when active
def good for performance
I cry a little
but alright
Switch on int atleast
and wrap in functions
"HasAmmo()"
"ConsumeAmmo()"
looks far cleaner, and is actually readable at a glance
okey
ill remember because I gotta go to school, thanks for the minor tips
for yandere dev unreal engine experience
because im so good at script communication and defenently have a grip on reality
its a pure function
huh
point was, do yourself a favor and try to keep it readable, and easy to understand whats doing what
its crazy how much I forgot
fair
makes it so much easier when you get back in a year
trying to fix some bug or whatever
thats crazy
Im hoping in a year im better at putting thing together in code
and not doing yandere dev code 24/7
Separate the functionality into it's own steps.
Yeah, i know how to organize, but i think i will spend more time organizing then solving the problem
It seems like obvious thing
But i don't really see it
Could it be that my door is mirrored?
its easier to see when organized
thats the entire point π
Yeah, i know)
Sec, i will try my best to make it easier to read)
Does anyone know why this doesn't work?
I want the platforms not to be displayed in the game as long as the opponent has 100% life (not dead).
Is it triggered at all?
i tested with print one sec.
yes but this time with an error
So the variable is null
are you setting it to an instance at any point ?
a variable is just a cointainer to something. In this case its a container for a reference to an instance of the BP_Platform Grass Hidden
I realized that I didn't build the whole thing into the platform, but rather into the character that has to be defeated
if you mean this with instance
ok so i need to try it with an variable right?
you need to set the variable
with an actual reference to the thing you're trying to hide
ok thanks let me go for it π
So you can either:
- Hardcode the value in the editor
- Somehow trace/collide for it (if it makes sense, probably not )
- Operate through some common actor / event manager of sorts , where all platforms could register themself to it
- Use the 'hacky' GetActorOfClass , altho this returns an unknown instance, if there are several
thanks a lot Squize!!!!
xD
I did my best
xD
But what should i say xD
If that's all there is to say, then nothing
DoorClosed = Direction==Backward
Otherwise you're missing an update
I'm trying to use a Sphere Overlap Actors function. I've set Object types to "Pawn".
It is not finding anything. The Actor I'm trying to have it find has a parent class of "Actor". Could that be why?
As opposed to parent being "Character"?
gotta check the collision settings,
but usually, only pawns or subclasses of pawns would be of the object type pawn
I'm trying to find my "towers" in a TD. What is the best option then?
WorldStatic/WorldDynamic?
Dynamic i guess ?
Or is the correct approach to change the type of my towers instead?
It is not a Character moving around though.
WorldDynamic works. Guess that is better than Static then. I would think Static means it is also checking all kinds of, well, static items π
I really can't see the issue
It does work fine
I am so fk stupid
I've had my door inside my actor at 90 rotation
and it fk all up in my lerp
Sorry for this :/
hello everyone, I'm trying to store a reference to a widget in a savegame object. what I want to do in the end is store which of these widgets is currently solo'd. however when I load my savegame object, the stored reference to the widget is None. I assume it's because the widget is temporary and the object ID changes everytime it gets created (or similar?)
how are you setting the savegame in blueprint?
why does the Interp To Constant node becomes faster if the interp speed value is lower than 1?
Yeah, sorry for this...
you can't save a Ref of an actual widget, but you can save info on how to re-make it
like this, I've got a few structs that I mirror to the savegame object and then save it to a slot
I see, that's what I suspected... is it because they're pointers or sth, do you know what the reason for that is?
i think thats it , it would be looking for the EXACT widget
Yea it's because they're like pointers and that object no longer exists after you've closed out and restarted. This is why the reference becomes null.
You can technically get it to work but it's unreliable so there's not much point exploring it. Much easier to recreate the object from saved data.
How can I make a FinterpTo's Interp Speed match a Timeline's Time? For instance, when I set a new length for the Timeline I want the interp to take that into consideration, but with a fixed value of Interp Speed it'll get the value per Update to it's target too fast. I might be doing something wrong, but would love some advice on this
I'm setting a Niagara's User Parameter "Size" with the Finterp, and the Size is supposed to be at it's max value when the Timeline ends.
What even is this?
Can anyone point me in the right direction? It's a new day and opening Unreal Engine 5, the blueprint contents of my projectile are gone and yet when i run the game, it still fires and does what it's supposed to. What's going on here?
make sure you don't have 2 BP_Projectile blueprints
I don't D:
This?
you could have duplicated it accidently
It's got to be somewhere. When i run the game, it does what it was blueprinted to do π
: s
But searching for projectile, that's all that's there in the entire content folder
go to whatever spawns the projectile and click the magnify glass
it will take you to the blueprint you are useing
Uhmmm. I'm following a lecture and the spawn was in the BP. It was a spacebar event, does that sound right?
Yeah, looking at his now, space bar > spawnactor BP_Projectile > add impulse (plus get play pawn, actor location, control rotation, actor foward vector and static mesh component)
All of that was in the BP of the projectile that's no longer there but somehow still runs
You know what, last night i changed these two things so my tester map opened first, is this maybe the issue?
it seems like you have all of the logic in player pawn lol
If that's in reference to me, i don't know. I'm following a beginner lecture.
That being said, my BP_projectile isn't in any other map, so i can't see how me changing what map opens when unreal launches would do anything but somehow, it's still calling it from somewhere
Hello, guys. What filter can you write in the content browser to get assets without references?
you took out some code and it still runs ?
that makes almost no sense
whats in construction script ?
so did you put code in there and it disappeared ? or you just didn't put anything in there yet ?
show the code after spawnactor in ur character
You can see the ones with blueprints. The crates are empty and there's only one projectile. I can't show you blueprints/code because it was in the projectile and i'm saying it's empty...
The crates don't have any blueprint stuff inside of thme, so ignore them*
so you put code in the projectile, it still works, but it's gone now ?
that sounds f'd
do you have multiple projectiles ? you sure your looking at the correct one ?
The lecture had us put the blueprint code in the projectile, now whether that's what you would normally do as an experienced coder or not, idk. Maybe they're dumbing down the content to not overload us, but that's where it was and when i open it, nothing was there (except the 3 red default events like uhh what was it... game tick, game start up etc?)
Says there's only 1
hmm, i wouldn't be surprised if it's a bug, i seen a couple while on here
you didnt save it then
what the projectile in the level has to do with anything anyway
So why does the code work then lol
It spawns on spacebar, fires, shoots foward, has garvity, etc etc
Just reopened the project, this is what i'm met with:
But it still runs all the code from the blueprint i did yesterday lol
whats in the function?
there's a 99,9% you fucked up somewhere π
Shoots and bounces around lol
you have a function there
scroll up slightly, its nothing
make a copy of it, does it have the code ?
What i assume is the base construtcion script node that's always there beacus ei never made it
this?
It also doesn't have the code, weird
but what does a projectile do with no code anyway ?
yes
it'll still move right ?
It blocks me from screenshotting his blueprint but this is what his looks like and what mine did too
space bar > spawnactor BP_Projectile > add impulse (plus get play pawn, actor location, control rotation, actor foward vector and static mesh component)
that code would be on the character
most likely
or the player controller, usually the keys are not on a random bp like that
I double clicked the function but it just drops and opens the functions list, doubleclicking the constriction script shows me the screenshot i referenced before
you probably wrote the code in the player
It's the earliest parts of a lecture so i assume they were keepign it basic, we haven't gotten to actually "making" anything properly yet
wdym function list
Look in your or my screenshot, the word "functions" appear about "construction list"
Maybe i'm confused, what specifically did you want me to check/open
Hey guys,
Is there a way to get something that ressembles the old Play Montage node?
I need to execute some actions based on a notify in my montage but atm I cannot find how to access the notifies like we used to...
i mean you can use on notify begin and check the notify name, but can't youo put the events actually on the animation or something ?
I can redo it all, help me remember and practice it anyway but idk where it's still calling the code from lol
you probably did it in the character not the projectile
you'll probably see where it does spacebar, add impulse
There is no character
hmm, did you check the controller ?
On the right, in the outliner you can see what has blueprints.
If there's an event on the Animation Sequence, it'll still be there in the montage?
i've only used notify a couple times, so i can't be of much help
This used to be a really simple thing with the previous Play Montage node that provided all the exec outputs needed. The current Montage Play (guess switching the name order changes everything π ) there's close to nothing... It only returns eighter the length of the montage or it's duration
How do you access it? I've turned off "context sensitive" search and it doesn't pop up
play montage
I should note that I'm not trying to play the montage on a Character's mesh though... so I'm not even sure that the 'old' node will do the trick...
doesn't show on my end
what blueprint type is that
actor
play anim montage ?
This one targets a character, which my skeletal mesh comp is not part of
ya still doesn't have it
Guys, i clearly didn't get enough sleep. I didn't realise that it was in the event graph of the level itself. I went back through the lecture to see what he opened it from and it was just the levle blueprint button which i forgot was there because i'm still new and dont remember where everything is. I figure from you reaction this code wouldn'tnormally be inside the projectile so i was confused too. Sorry for the issues guys!
but i thought you can put the notify events on the animation @tired whale
or the montage
I can put notifies, yes. But I can't find a way to know when they fire...
Just to gain a basic understanding. I know we'll move on to doing something more concrete and tell us where things normally go.
I understand keeping things simple for new people and it's ok to teach like this sometimes, i get it.
my first tutorial i used the level bp as well
but so far i have not had a good use for it
- be aware it exists
- never use it again unless you know why
My brain is the worst, too. If i don't understand something ENTIRELY like, a sphere, seeing all sides, one missing jigsaw piece and it won't click for me. So when i don't understand the entirety of a blueprint for example, it doesn't click. I need to know exactly everything i can do with one piece first before I can understand it. Great when i know, bad when i don't lol
I'll explain in a lengthier way what i'm aiming to do.
I have a widget setting the visibility of a skeletal mesh actor to true via a "middle man" BP actor. The BP actor, called Manager, has references to all my skeletal actors.
The widget communicates the manager which one of the skeletal actors to set to visible, and to start playing a corresponding Montage. Also, some skeletals have a static mesh attached to one of their bones (character holding a glass for instance).
Now, on a specific mesh, with a specific montage, I want the attached static mesh to be visible during a period of the montage and hidden during the rest, qnd I figured using notify would be an easy way to do so.
it would be
idk why you cant get that node
have you tried in other bps just to make sure?
its shows up to me even in widget bps
Yup, I did so in one extended from Character, just to be sure it wasn't because the other actor is a not a character
dammit, it does show up in the parent class tho, in the character, but not in the child...
But I can't access it anywhere else
I could make my skeletal actor characters, but I really don't need anything more from them than to be visible or nat, and play a looping montage...
Play anim montage, at the bottom there?
Still no
#blueprint message
in some places its even the opposite for me
5.2.1 actually
Grab a skeleton and try
Wdym?
whats the parent class of ur bp where you trying to find it
hey guys, I'm following a paid multiplayer game course, and at event "Multicast Fire" it makes me set the player pawn not equal to owner at player index 0.
But doesn't that mean it will only work for those with player index 0?
If yes, how can I make that it changes the index based on the player?
actor, it's my so called manager
it's an empty BP, holding only the variables containing all Skeletal Mesh Actors for Player 1 to 4 in seperate arrays, and another 4 arrays containing the corresponding Anim Montages to play on these skeletal mesh actors
idk i just created an empty actor and there it is
π‘ I'm in a function, and that's why it wasn't showing up
sorry guys...
Hi guys
can someone explain me this,
I have a replicated actor that cant fire a server event "has authority " is showing that it is a client, and still cant fire any kind of server event. What is the option to make this replicated actor able to start a server event ? π€ thanks
Latent nodes (such as play montage and delay nodes) can only be placed on the main event graph.
and custom events, which kinda sucks
Yeah, that makes sense... But I guess I wasn't paying attention to this type of stuff... Thanks anyways guys !!
maybe #multiplayer ?
The index is only applicable if you're doing local multiplayer. (split screen type of stuff)
so on networked multiplayer the index doesn't matter?
No, as that node only gets the local controlled pawn of which there would only be one.
perfect, thank you very much for the information!!
is it also the same for this case? I have implemented a simple recoil system myself outside the course
https://youtu.be/oDKcDr6yN7U?list=PL8_QdDwbYqgSC8b3iiCuEGCkFmxl5jkOi
I don't know if anyone has any experience with this series or a general idea of what my issue could be but I've followed every step over three times now in this video and i cannot find out why i can only use the first slot of my ability inventory.
All the other systems work perfectly i can use all 10 hotbar slots and move abilities around and i can transfer abilities between the inventory and my hotbar but for some reason i can only use the first inventory slot and i cannot figure out why.
My best guess would be an issue with the array where its only letting me use position 0 but as i said I've done everything as he has from what i can see.
In this episode we set up drag and drop ability icon functionality first within our ability hotbar. Then we set up an ability inventory, where the player can drag and drop abilities from the hotbar to the ability inventory and back into the hotbar.
By the end of this episode, you will have a fully functional UI hotbar capable of activating a...
Well, Play Montage doesn't do anything... π₯² I don't know why, but my montage will only play if I do Play Animation. Therefore I'm back to square one and cannot know when my notify begins
I think you can also bind to animbp's on montage completed etc
Or animinstance, cant recall which of em
Thing is, I need to set the held static mesh visibility during the montage, not at the end...
Anim notify?
yup
does the animation play?
there's this, but I have no idea what this target is
Play Anim : π
Play Montage : β
doesnt play the montage?
nope
do you have animBP allocated?
the skeletal doesn't even get in position of the first frame
to skel meshes
I don't have any ABP on these
u need to have it for montages to work
even if blank, or does it need the slot node?
makes sense
Hey.. I have a video playing in a widget.. How can i make it fullscreen during play by pressing a button?
no.. i have tried scaling the image where the video is put on but nothing.. it doesn't have size options or scale for that
set position 0 0 then size to viewport
you have to get the slot
wrap the image with canvas or smt
Hi, is there someone that knows what capsule colors means in PHAT editor?
I came from UE4 and there's not different colors
There are green, dark green, yellow, orange
ok will try that..thanks!
so if i have a timer by event
is a timer frame rate independant ?
do i need delta ?
Hello there, does anyone know what could be the reason for "Widget Switcher" to be just nonexistent from the widget palette ? nether from panel tab or search
Yes
It's a modified 5.1, forgot to precise it
Doubt it, we hadnt modified anything Widget sided in the engine
but you have some custom stuff in there ?
some stuff thats not normally in it ?
or i have 5.3.2 so it's different anyway
It may come from my widget directly, I am subclassing it from UCommonUserWidget
Or just an engine bug......
my blueprint graph just disappeared in my gameplay ability blueprint :
You have to reopen the proper window (in the top left menu)
I don't get it
Now double click on EventGraph
Ah it's a different person
That's strange, you don't have a warning saying that you are seeing your blueprint as data only? And you need to click on that message to get the full view?
I do
but even when I click on it, does not work
Try reset layout in the main unreal window ? maybe your blueprint graph window is out of screen?
Oh god they do what??
all sorts of bugs. their implementation is insanely broken
I've had them create null actors in the outliner leading to an engine crash, all sorts
Is there anywhere I can read up on all that? I'm trying to look it up myself but haven't had much luck
Is it possbile to change the Camera sensor width/height in runtime? maybe with a slider widget? UE 4.27
Camera sensor?
these
Guess ypu gotta chevknifkits exposed
Search for related nodes
Set filmback / sensor something
Hi! Where do these arrows come from? This blueprint class inherits from a C++ class, but I haven't define them on it. Thanks!
Thank you ππ
Not really, most people are unaware, and Epic really like to pretend a lot of things aren't broken
Ah rip. Thanks though.
Wow thanks for sharing, Iβve been listening to math videos all day at work trying to get what I need lol
Thanks for sharing! I will look into this!
If using a square grid in a 1000x1000 . Will increasing square size or reducing the square size have any performance issues? Lets say each square is an actor
I'm trying to get a bunch of actors with "Get all actors of class" and check if they are disabled.
I could do this with a simple Boolean, but then I have to cast to every single one on every frame.
Is it cheaper to do an "Actor Has Tag" node and then a branch based on that instead?
at what level are they disabled?
what does disabled mean
It means nothing code-wise at the moment. Just need a way in the game to check if they have already been "eliminated" and are therefore disabled (gameplay-wise)
I'd maybe first check if there's some sort of bool in Actor you can piggyback on
Otherwise I'd use a tag yeah, unless there's a very obvious base class that a bool can live in.
Not sure what you mean. Different from my own code you mean?
Right now I just set a Bool like this, but I have to do casts to check it from another actor.
wdym you have to cast to every single one, you probably want to avoid get all actors of class on tick, will they be changing ? because you could cache them on something like begin play
I'm basically trying to avoid too much casting. Don't know if Tag check is actually cheaper though.
Hmm, good point. They will be changing but I could update the Actor calling them in that case.
since casting can be heavy, i have not heard that actor has tag is like that, so i would probably go with has tag if you can
Still need to get each one to do some math though.
It's a tower defense, so trying to get all towers and define the closest target to shoot at.
All towers sounds like a base class
if you get actors of class TowerBase then you can just get the thing, no casting
They all share a template yes.
casting is basically free but it does imply the class being loaded, and seeing a ton of casts as checks all over the place is indicitive of a bad design
children of it
K so get that class and put the functionality in that class
What's the rule? A given tower shoots at.... what?
so your looping through the targets, but why not just use location instead of casting ?
Not sure what you mean. There might be 10 towers, but 3 of them disabled (don't know which pre-gameplay)
What is the actual mechanic? You're trying to have the enemy choose the tower to shoot at or what?
i would go wit has tag if you can
Because I don't want to set my Actor to shoot at the tower if it is already Disabled.
Or do I misunderstand?
Correct
ya that makes sense your check in the loop if it's disabled ?
Timer -> get actors of class BaseTowerClass -> select closest where BaseTower.bDisabled = false
No casting involved
what if you made the variable a reference to the tower so you didn't even have to cast
i'm guessing now it's an actor or something ?
or there will be other actors of different types in what your looping ?
Although if you have a lot of enemies or towers around it'll be way more efficient to have some other query mechanism eventually
Thought a sphere trace would be more expensive because it had to calculate geometry. Might be a bad assumption though.
Is there a select closest function, or do you just mean I write my own?
I thought there was a sphere trace by class but there isn't. Get actors of class is fine if there's not a billion of them
Guessing 50-100 tops in actual gameplay.
Not sure what you mean. Both enemy and tower is an Actor yes.
No other actors, but I have a function pretty much identical for tower vs. enemy instead.
i mean what your casting to, what is the array full of, it's towers right ?
Get actors of class YourBaseTowerClass, that'll be a simple lookup
you don't have to cast, you'll know it's a YourBaseTowerClass.
You'd only have to cast if you got actors of class Actor
Yes
and the towers will always be the same or you will have many different ones that you may need to cast to ?
if they are the same just set the variable to be that class instead of actor
Already do. This is what you mean right?
Actually use sphere overlap lol. Thought it was an All Actors Of Class node π
oh ok, so you couldn't do what i was thinking because of the way your getting the towers
That wont return an array of that type I don't think, what type does it return?
But I need to cast to know if that Boolean "Disabled?" is true or false right? Or can I check some other way?
if you get actors of class YourBaseClass you won't need to cast
you'll have access to everything in YourBaseClass
Not sure if this is what you mean? WorldDynamic?
ignore the trace, do get actors of class for now
hey guys, i am having a very basic graphic settings setup, and during our playtest for our game, some testers reported crashes when changing from low to high or the other way around. these are the settings, as you can tell the very basic setup:
We are running ue 5.3.2, any idea why the game could crash?
are you just trying to get the closest one ? a trace probably not the way to do that
the bug report is not really helpful either, just some random render thread error
Think I still need a cast to get the Boolean
Yes
Sorry no.
Only in this case.
what type is that OutActors?
Have different targeting methods. Highest health, Furthest along path etc. But I switch on an Enum earlier and have a separate execution path for those.
maybe remake the for each
it's probably still the other type
drag out from out actors and do foreach
might fix it
Bingo ^^
So you guys would guess this is the cheaper way instead of the Sphere overlap to search in it's X radius?
Considering we are talking 50-100 ish Actors?
oh i c you did a sphere, that would probably be much cheaper i would guess
blueprints is horrible at looping
Sphere required a cast though. Unless a Tag check does not need such.
i feel like if you can get away with just checking the tag then that might be the most efficient
considering you use a range with that sphere so your looping through a lot less which is a big difference
from what i've learned when looping in bp you want to keep it low as possible
especially if you added even more say 1000
then it would be bad because bp wants to do these in one tick and has issues with it
Then I'm back to the original line of though, and I forgot how to add a simple Tag π
Is this the right node? And I would have to create a container?
(not for checking the tag, but for adding the actual tag on the tower)
idk i have not used tags yet
Alright.
thats why i said if you can do it i'm not even sure if it would work, but it makes sense you just check the actor has a tag as far as under the hood i bet it's not much going on
Depends
The more spread out they are relative to the sphere radius, the more efficient the sphere trace is. But then you'll need to do the casting etc. It's probably faster to just get all of class up to some number.
I'll learn Unreal Insights later I guess π
Is there any way to get this into here?
Not really, but you can iterate over that map in the construction script
Damn. I'll see what I can do.
i cant figure out why my gun isnt going to my mesh my character, everything seems to be going correctly except no gun apears in my hand.
so what does it print ?
You're destroying it immedietly
When i overlap it casts to my character, and when i interact with it it destroys actor, and sayd its supposed to work
It goes to your hand, then deletes self from existance
even if i remove my destory actor, it does nothing
put breakpoints in, where does it fail?
hey
how can i clamp so the valu cannot be -20 = +20
so min wouyld be -70-20 and max +20-+70
i'm not understanding what your trying to do
Any way to reorder these?
@lofty rapids
the problem im having is when im walking backwards the direction is not 0
uh
what
what are you actually trying to calculate?
what do -20 and -70 mean
scratch that
my laster question is the objective
when i walk backwards i dont get 0 in direction
This?
this is how im getting the cdirection
it looks like you get positive going forward, negative going backward ?
you want it to be zero going backward ?
just clamp it 0 to max
the problem is when im walking backwards i still want -70/+70 in direction since u walk in that direction backwards
but when im only walking straight back i want it to be 0
now its choosing whatever is closest
what is cdirection?
Direction*
yeah
so why are you clamping to 70
change your blendspace to map right to 90
your blendspace should go like this
Back Left Forward Right Back
-180 -90 0 90 180
yeah thats fine, but still when walking back im getting 180/-180
yeah thats the problem
well yeah, that's what it is
set up your blend space to just accept the actual angles, that's easy
sorry im still new to this, had to figure out how to use breakpoints
put a breakpoint on the node it should be hitting
if it doesnt hit, move it up
until it does hit
the node you care about, presumably the attachment
it looks like the nodes firing
This might be a silly question, but :: I have MyPlayerController_Child and MyPlayerController_Parent BP classes. Naturally the Child uses the Parent as parent class. Now is it possible to get a variable from the Child in the Parent class?
I'm trying to get my BP components in a specific order but they keep spontaneously reordering themselves???? What the hell.
Why is the order of the components important? (I'm just curious)
Hey, more of a math question here.
So ive got this segmented bar system (like the HP in Overwatch). It spawns a bunch of progress bars in a horizontal box and changes the values of each progress bar for the total health value.
And with these values it works 100% perfectly to the correct pixel of health. But if i change how much is in 1 segment (automatically reducing the amount of segments), it all just breaks. Some segments just copying others, some just not working etc.
Red numbers are the numbers inside the nodes.
I am mapping them to the name of the socket they need to use, so I need to have them in the same order as the keys in the map. I can't preload them into the map either unfortunately.
Can't you map them by class or by name instead of possitional index?
I'm fetching the components into an array, I just want that to slide into the map I have instead of having a second map or a bunch of ifs to figure out where they go. This wouldn't be difficult if it would just let me reorder them!
Or better yet let me preload them into the map
Gotcha - I mean it makes sense - but I think the components list is an unordered list and just gets sorted for display purposes.
Sorted dumbly, that's for sure. No rhyme or reason to it.
Also my editor randomly froze so that's fun
wow yeah this is fucking dumb. Idk what I'll do here but I'll figure it out later lmao
hi! is there any way to set initial value of my camera to black (alpha 1)
in blueprints
because i have an issue when connecting to remote server, there is a period where the camera is transparent (alpha 0)
it seems like this default camera is initialized before everything else
I've been trying to set up my actor class to be queried by the asset registry without much luck. I have the asset manager set up and the asset is viewable in the asset audit. The manager is successfully retrieving the assets. I am intending to set this up with a library in C++ and noticed the issue in testing the function I created.
I thought that if things are correctly set up with the asset manager then surely the asset registry should be able to retrieve them.
I'm not really sure where this could go wrong if the asset registry can't return the assets, but this is working
Having a weird issue with saving Project Settings; whenever I reload my project, the Action Tags in my Common UI Input Settings are set to None. The rest of the settings are still there, it's just the tags that are gone
hey so i want to throw a granade right, the granade is a projectile movment, but the i cant figure out how to make it so that liner velocity poits in the direstion where me character is facing twords, any help?
You could instead set the rotation of the projectile to face the velocity direction of itself on the tick event.
how?
Wait do you mean the rotation of the projectile or fire in the right direction?
I cannot figure out event dispatchers to save my life. Separately these two blueprints work but I just can't seem to get them to communicate with each other no matter how many guides I watch.
i want the projectile to shoot in the direction of me camera
so i want me velocity to face the way me camera is facing
is the cast succeeding ? and is counter the image on the left ?
Yes, counter is the image on the left. How would I know it's succeeding?
print string out of succeed and fail, see which one it shows
When the projectile is spawned though your weapon or on the input key, just spawn it with the correct angle to face forward. You can do that like this:
If I put "Confettipop" into a print string nothing happens
At the end of the bind that is
like this I'm assuming?
see how cast has two paths ?
succeeded out the top, cast failed just below it
oh
put a print string out of of cast failed i'm guessing it's failing
Okay yeah it's failing
well every time I try to look up anything about casting it only ever uses default blueprints and object is usually "get player character" but counter is just an actor blueprint, so I made an actor variable and slapped it in
which I'm guessing is wrong
Something I wish I did earlier on was enable the feature break on exception. This forces you to handle access nones if you have them and it allows you to see why something may not work way faster. Sometimes it can be a pain though and it can simply be turned on/off whenever.
so i got this and nope it doesnt work
well it's have right, but since your doing it on begin play you could probably do get actor of class. I'm guessing you made the variable but didn't actually set the value.
your begin play for the projectile needs a velocity in the relative rotation of x not y
nope still the same
ya so when you do that, it's just an empty variable you have to actually set it to something
the projectile movement component should be doing this for you and not a velocity
I'm assuming I did it wrong again, but this also did not work. Is there an example of something I should be setting it too? Should I be grabbing something from my counter blueprint?
see where it says actor class ? click the dopdown and pick the counter class your trying to cast to, then get rid of the cast and set the variable to the return value of get actor of class
what do you mean?
when i remove the vlocity it stil does not work
it worked, thank you so, so much
Hey all, pretty new to working with unreal BPs here, trying to recreate a LUA mod I made in BPs. I'm a little lost on how structs work in unreal and was hoping I could get some pointers.
Effectively what I'm trying to do is watch for a new item container to spawn and when it does, compare the item inside with all other item containers, given that every container has exactly one item inside. I was able to make this work using an array of containers, but I was hoping to speed the process up by adopting the same approach I took in LUA - making a map of item type:container so that when I get a new item, I iterate through only containers with the same kind of item inside rather than wasting time iterating over all containers that exist.
I made a struct that holds an array of containers, and a map of item type:struct, but for some reason I can't seem to add a new container to the array - once it's made, it's made
I have yet another question. Let's say that I have a game that sends the player from the first gameplay map to another just for a dialogue cutscene. Then, the player is sent back to the first map after the cutscene is over, but I want to send both the player character and the FollowCamera to a different location once the map is loaded and a Boolean that has been turned on causes the map to load at that different location instead of its default starting point. How would I go about doing this while ensuring the camera is focused on the player and not outside and somewhere in the skybox?
I get the array using map -> find -> break struct, then add to it using the array add function. When that didn't work, I figured maybe it's passing me a copy of the array rather than the array itself, so I tried array add -> make struct -> map add but that doesn't seem to work either
can i use a Pawn that has inputs to be controlled by the AI?
Or its best if the pawn has no inputs at all if its an AI pawn?
Asking in case there is some underlying issue...
So far it seems the inputs are disabled
these inputs
i dont want them
its just that the pawn logic and functions is the same as for the human player
so im using the same pawn class
and see no reason why i need a different one
should i create a different one?
the only difference for now is just these 3 inputs that are not enabled it seems
so isnt it ok?
i don't know whats right or wrong, i would imagine as long as its not duplicating the input presses you'll be fine
exactly
though ur not sure?
no i'm still learning, but just logically you should be ok
Whats good fam
Yes you can use the same pawn without issue. What is the issue you're having with the pawn?
Could anyone please explain to me how i could make the green spots that i have on the texture more opaque? i mean kinda transparent? I can decide how much green spots i want from the noise, but not the opacity
there is also #materials
oh sorry, tought since its blueprint i'm right here. i'll try that thanks for mentioning
is there a way to duplicate an already existing actor through blueprints ? I've made 2 enemies and so now I want to make an actor which handles spawning them
for now none. just asking in case in the future i get a surprise
thanks
you want to spawn actor ?
Duplicate an already existing one in the world
A common misconception :P
Blueprints aren't materials. Blueprints are strictly the nodes you use in things like actors.
The material graph follows a completely different set of logic, and way of thinking. Even though it's still using nodes that look similar, it's wildly different
you can just grab the relevant properties and apply them to the newly spawned actor, it's probably not that many
is the duplication some sort of game mechanic
Idk about βduplicatingβ but you can get class and spawn another
hey all, something about the factory first person blueprint eludes me.
it has IA_Move, IA_Look etc, thus uses advanced input action mappings, but the blueprint graph makes no reference to loading it? this seems more elegant, i'd like to know how this is being assigned the IMC without having it in the node graph:
oh nvm, just found it, for reference for others, its attached via game mode blueprint, 'BP_FirstPersonPlayerController' has the Enhanced Input Local Player Subsystem code within that
for the record, that is what the player controller is for and if you had a more complex setup you'd have your input actions in the controller and pass them to the character as appropriate
Quick question, i wanted to make that the player gets a random item from this array every 10 levels. The "unused" stands for "unlocked" and basicly it should unlock an item that isnt unlocked, if it gets an unlocked one, it should try to get another, i have many instances where i just get no item at all, any ideas?
its pretty simple code i just have massive brain lag i think
it worked for a while then randomly stopped giving me items on lv 20 for some reason and now its completly fked
Does anyone know how to add a stamina system where everytime I dash it takes a chunk out of my stamina and when I dont dash Aka just walking and running around it recharges this is my Dash BP
Could you perhaps make a seperate array to track what can still be chosen every 10 lvls?
Well you could just make it so that you regain stamina every tick and remove stamina after a dash
Could you explain how to do it?
Ok well have an Event tick node that adds an amount to a integer Stamina variable. Make sure to multiply that amount by delta time, so that the regeneration doesn't depend on framerate. Then at the end of that dash code you have just remove a certain amount from the Stamina variable.
Might anyone have a clue?
Does Blueprint support condition break for debugging?
What would be the best way to, say, teleport the player when a level is reloaded? More specifically, I move the player back and forth between two maps. But, after setting a Boolean variable to "true" on the second map after a cutscene is over, I want to reload the first level and place the player character in an alternate location, using a trigger box that moves during a level sequence and works when the GameMode's Boolean is True. Like so:
So, what is the best way to send the player to a different location when the level is reloaded and under special condition(s)?
Anyone know where I should put my stamina in there I already have an Increase and decrease stamina I just dont know where to I put it I also want it where you have 0 stamina you cant dash animation
does it happen only in editor or also in shipping build?
I have a blueprint with a editor callable function that just adds a Instanced Static Mesh Component to the actor and adds some instances. Really simple. Whenever I drag the actor and the constructor runs, it deletes the instanced static mesh component and clears out all the meshes. Is there a way to run this in the editor and stop it from deleting the Instanced Static Mesh component?
uhh not really, you have to save the stuff u want to keep
Is the only way to do this to convert this to a mesh or something?
It's literally just a blueprint that's intended to throw junk on the floor and dirty up spaces
create a save object and load data from there on construct
Boy. Okay. I don't love that but I guess I can do that easy enough
Havenβt tried shipping build
normally lighting bugs like that only happen in editor
I think itβs not just lighting, but the door itself is flat
But Iβll test out shipping build
Do you know how to do this
Anyone know where I should put my stamina in there I already have an Increase and decrease stamina I just dont know where to I put it I also want it where you have 0 stamina you cant dash animation
why are u changing the actor scale instead of just moving it?
do i look like chatGPT who teaches basics of coding???
Move? I need to mirror it, wouldnβt reversing the scale be the correct way to do it?
i dont think thats how u mirror stuff in unreal, there should be a mirror option for that
need some help, I currently have a feature in my game to be able to zoom in like a camera, it's working but now the problem is players can spam the zoom button and it will zoom in and out when ever it is pressed, I want the the player to be able too zoom again when it's finished zooming out or in
I donβt find such a function for runtime
yeah cant find one either, guess the issue is just shaders not updating properly in editor
add a branch with a bool at start of your code, set the bool to true at start and false when your timer finished
and make your code run only when bool is false
hmm I don't really get it, can you explain it more detail please ?
i literally cant
Given I have the projected screen coords of the yellow reticle. Is it possible (and if so how can I achieve it) to define some kind of mask on the screen such that any pixel inside of the grey reticle return true and the ones outside false.
I want to define zone in the hud and reason about them for the gameplay and they might have intricate shapes more complex than a simple circle
Essentially trying to answer the question: Is the projected screenspace position of a given target inside one of those zones
I have no problem getting the actor screen position. The issue is trying to define complex regions (through some sort of masking I guess)
yeah u will probably want to set up a system with custom widgets based off that
maybe this helps
https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/FGeomTools2D/IsPointInPolygon/
Can anyone help me with this, please?
ahhh it took me multiple hours to figure this out the other day, where was this when I needed it
you can use GameInstance, it persists when loading new level
either game instance, or you use the save system
I forgot all about GameInstance! I'll give that a shot.
Does anyone know how to fix messy lighting? This is a new map with all new directional light, sky light, etc, and yet if i set directional light to .1, it just slowly goes from dark to light over a couple seconds. Im just trying to make a night map and have watched videos, etc, yet dont see anyone else with this problem. Any help?
Oh right. I forgot.
https://blueprintue.com/blueprint/fo7ojtu2/
I did try using breakpoints here, but the program just stopped at "Set Target" for MyGameInstance and didn't go any further.
Probably #lighting people
you need to add a post process volume and change the exposure settings
Thanks, there wasnt any in the map, so that probably explains it. any suggestions on exposure settings, or just mess around with it till it works?
you can just set it to manual and change the exposure compensation
It might be a good idea to play around with the intensity and the radius, too, maybe.
As well as color if you want, say, a full moon light.
you can also add a slightly blue tint in the PPV for nighttime scenes
And, of course, you can try looking for a night sky skybox. There are some free ones, out there. Just to make the illusion more convincing, anyway. That's just a suggestion.
You could also play around with the different types of lights UE has to offer.
and add volumetric fog
I think a Directional Light would work best, if you want an outdoor ambient light.
ill be looking into all of that, thanks for mentioning it. Im trying to go for an abandoned town fogged up, getting attacked by monsters from the thing. I have some lighting on the indoor portions of the map, but i just wanted something a lil freaky going on when the player steps outside
Good luck!
Can anyone explain why the program seems to stop at the variable setting node?
probably because ur cast fails?
Which is odd because I didn't get any notices of cast failures.
just add a print on cast failed
You mean, like, a print string before and after the Set Boolean node?
Oh! So this is in case the cast fails?
I always wondered what that connecting point was for.
its sometimes useful
Its very usefull to get in the habbit of adding prints where things can silently fail
It also helps to be descriptive in the printn
Often including class/event name aswell
Show code
Cast failed means the incoming reference is not of the underlying type you're trying to cast to
Cast fails means you cant access the reference provided by the cast
When I try to connect the usual way like in the above code, the program just stops at the Set Boolean node. Which is why I changed that to Cast Failed on a suggestion I was given.
^
That's odd. I did declare a variable. I thought the GameInstance never reset its settings.
The suggestion wasnt to execute logic on the failed cast reference
But to add a print string
Which is something completely different
Oh. Sorry. It's late at night over here.
So should I just put in a Print String before and after the casting?
No need as we know the issue
Atleast, you dont shownthat you've updated the variable , and the cast fails
So
A variable is , as you might know, just a container for something
you must set the gameinstance variable in that particular bp
Which would be a level BP, in this case.
A reference variable can hold a reference to something, but is by default nothing
Or use GetGameInstance as the input to the cast
Hm...as opposed to promoting to a variable which I did?
when?:)
Like if I did this?
ye thats good
I just tested, but I get the same error after test-running it and stopping it.
There must be something else I need to do before this.
call it BP_MyGameInstance for better readability
Okay.
Very peculiar.
https://blueprintue.com/blueprint/8253h91v/
Here, the game is supposed to teleport the player once a cutscene has ended and the Boolean is set to "True." But for some reason, it acts as though the Boolean under MyGameInstance is still False.
did you check with print string that it goes all the way to false?
thats some strange code right there
why do this
Oh right. It was originally because of a TriggerBox that would move when cued. I just forgot to remove that.
So I've set alternate Print Strings based on the Boolean when the level is loaded, and the Boolean is false.
But...I need to get some sleep. I'll work more on this tomorrow. Thanks for the help so far. Good night for now.
should i avoid saving cast references, and just do interfaces most of the time ?
ure not supposed to link it to that node
avoid saving them yes
startup times wise
but i found out if you save them in their parent class variable, then just cast again everytime when you need it, it works
never bothered using interfaces
whats being cast and why should be some fundamental questions before answering
Casting is fine in many cases
saving a cast reference or not doesnt matter much as the cast already creates a hard pointer to the thing you're casting to
well for example
in my player state, i am updating UI
so on BeginPlay I wanted to update the UI, by getting the HUD class (widgets are saved there) and save it
i finally made a interface, because this event could be later on called outside of the playerstate
Why is the playerstate updating the UI would be my first question
well, where should i put it ?
UI should update itself based on data from the thing they represent
typically one gets that done through event delegates
- the gamestate updates player data
- player state is changed
- UI needs to be updated (and rn its updated from the player state, because it seemds more logic than doing this in the game state)
i am using delegates
- the gamestate doing stuff, calls delagate
- the HUD class has a ref from the game state, and assigned events from those delegates
- the delegates call specific widget functions
there is just this example where its not the same, maybe i should do the same architecture
Let the objects handle them self , as much as possible
letting other classes update an unrelated class becomes messy very fast
bind to them, yeah
i first wanted to put in it HUD so i can have 1 place to store the game state ref
instead of having this game state ref in each widget
Hi I have a question:
I have an enemy actor bp. Now if this actor is hit by a line trace the next level gets streamed in.
In the next levels i have multiple copies of this enemy bp in my levels. i have already gave them tags.
How do i make the level load once all of the enemies were hit and not only if any of them was hit?
you'd probably want some manager that checks this, and listens for delegates from the enemy actors
so what kind of message does my enemy need to call?
depends
are you waiting for their deaths?
or is this a ray of light just aiming at them ?
hmm not quite sure, basically just if they get hit by the line trace thats enough for me to send a message "i was hit"
right
now i need them to count themselves somehow
so you'd want some custom event dispatcher
with a bool
RelayHit(bool bWasHit)
then you just call that whenever you're hit / not hit
so from my event dispatcher that is coming from the linetrace bp i need also a condition
but how do i make them count if all of the enmies were hit or not to trigger
thats the manager part
in my prototype i made the manager spawn in the enemies
this is how i make sure that only the enemy that was hit adds up to the score
the enemies in my case are actually obstacles that are there from the beginning of the level
specificly listening for a delegate (RelayHit would be yours)
Well the manager can just "GetAllActorsOfClass"
then this manager deals with the "completed" condition aswell
I'd say this is a bit hacky, but it shouldnt cause any trouble really
Tested on shipping build, apparently same issue
Hiaz
would this work ?
im trying to find another way to reference events
sometimes i got a "unbind" that is somewhere else in the graph, and i have a red line crossing half of the graph
does it change performance ?
Possibly my favourite node in unreal
No, you don't worry about perf at that level in BP anyway
in what case do you use this for functions ?
curious
You gain orders of magnitude more performance by using C++, so not a worry
The same case as above, if you didn't want it on the event graph. Or if you wanted to bind an overriden function.
I mostly use it on a set timer by event though, as you're unlikely to need latent actions in the callback on those
I got it fix by using Do once node, thx
hey all i wanna ask is there a way to target a specific collision of my enemy (testing dummy)
GetComponentWithTag ?
How does the editor infinite loop detection work? I know it can be nested loops. But could it also be a series of manual calls on a function with a loop?
Basically, if iterations in the frame in a single function is over X amount, throw error
I just love yandere dev spaghetti code V2
theres only going to be 2 recoil patterns but up to ~10 guns
so either the spaghetti code will largen, or I will have to figure out how to properly implement guns, im dumb and dont know how to follow instructions so its a wee bit hard
Okay so if a function containing a loop is called multiple times (not from another loop) and that's the reason it exceeds the limit, it would not throw an error?
It shouldn't, no
But who knows, it could be total iterations per frame.
I don't believe it is though
Either way, keep heavy iteration out of blueprints, it's incredibly bad at it
So a loop of 100 with 3 function calls is 300+
Along with the internal in the loop macro
It hits the limit far sooner than actual iterations
Woohoo! Go BPVM!
Frameslicing is a trick if you really need it in BP
With it you can go quite high... it just takes time. Lots of time
"Sorry we know it's been 3 hours and the game hasn't loaded, but we needed to frameslice the BP only quantum computing"
In all seriousness though, frame slicing is amazing for some things.
really? how do you know this?
thanks for the tutorial
Another infinite loop question: When the log says "see log for stack trace", does it mean some other log I'm unaware of? As this is stated in the output log
log file seems to contain the same stuff
can the message log be seen as a text file?
window > output log
Hello.
I want to play a cinematic and then set a bunch of variables when it finishes across various blueprints (visibility, actor locations) - should I do this in a particular BP? Level BP maybe?
No
The message log is what gives you your "accessed none" errors on ending pkay
It also normally lets you jump to where your infinite loop is
deffinitly not level bp
bind the sequencer End Event, you can do your business there
okay what im doing wrong here?
since I'm hitting myself π
the collision settings is of the sword blueprint that is child of player
Try adding self to actor to ignore
i did still the same
Try adding Get Player Character to Ignore
Looks like the event is not being updated, your only firing the event once
So it only account for the initial location? Could be wrong
still the same :/
even gets fired everytime i press mouse input
but its tracing only once
add a ref to whatever BP has the character mesh to the ignore
Print display name of hit
Hit actor and hit component
question about pure nodes: seems like they get executed regardless of whether its return value is tied to the true branch? Do they just get executed always regardless of the execution flow?
Example?
Add the sword to the ignore list
ah wait I think I've found the culprit, it's a select node probably
Yes
They execute all connected logic
π
Regardless of the select value
yep that works now i just need it not to ignore other enemy pawns xD
but i can do that myself thank you π
fixed it yay
Is there a simple and easy way to do this?
I'm new, so just for clarification is this two different ways to achieve the same thing? π Both look very reasonable and i'll have a play with them. The top one looks interesting, is "list of set classes" a thing or is that a variable or something you've named and I need to make that node myself first? π
I had wondered if an array would be used for it. Something I haven't touched on yet.
With the option at the bottom, the one that is easy to read and grasp to me, is there a way I can make one of the options have a lower chance to occur or do we complicate the selection process and I won't touch that kind of cutomization for now?
if there is only 2 options , you can use Random Bool with Weight
If i wanted more than 2?
I appreciate the help you've provided btw. Definitely cool to know that there's an option I understand that will change up what i'm doing just a bit to add a little bit of flavor π
you can chain them together
or , in the array , add more of 1 item fro more %chance to pick that one
I see!
yah
So if it were 1.0, it basically wouldn't work because it'd always be selected right
It wouldn't make any sense to use it in that way, basically
yes , 1 is True, 0 is false, anything between is %chance
AH
Ok, that clicks. Gotcha
Ohhh yes, right i get it, random bool with weight. Right right right, that makes sense.
most things like that have a tooltip
Very helpful to know.I've got to know the node exists and does something like what i'm after but that'll certainly help me remember in future when i look at the nodes again.
I may have bitten off more than i could chew haha. It was a cool idea that i'll probably be able ot get into later. I guess I didn't fully understand what the static mesh part was doing so I don't know how to problem solve this one.
either all classes have to inherit the same base class which provides a static mesh component
or you have to use get component by class on the resulting actor, and eventually have checks in place since it may not exist
im having a hard time to find a perfect "formula" to make my directional light rotate (and make it fit the time) to make a day/night cycle
in my game state i am counting a fake time (hours & minutes)
- i would like my directional light to have X rotation at 22:00 (start of "night")
- and have a Y rotation at 6:00 (start of "day")
- then rotate back to X
- and so on
so the first problem is : finding the good way to rotate it to lerp correctly between X and Y
the second problem is, the solution of the first problem needs to have a implementation of "speed", because if all players sleep at night, the count of the fake timer is faster (so the directional light has to move faster)
X and Y are just numbers, not related to the X and Y axis
the system doesn't
you need a time system which is able to skip/fastforward time
then it doesn't matter what queries the time (and you often don't need specific implementations for fastforward)
Not sure if that's a possibility for you, but in my case using a Sequencer to control it provided much more flexibility, light angles, colors, shadows, actual rotation, and i can just set the sequencer speed to fast forward
Hey all, Im trying to make a bit of code that creates an array 1/4th of length of another array. So if ArrayX has 8 elements, ArrayY has to be set to 2 elements. Not sure how to do that
I can determine what the length needs to be but I dont think I can use something like make array to set the amount of array elements
use a loop and add elements to the array in the loop
start at index 1, goto index whatever the 1/4 length is
so your loop would loop the amount of elements you needed to add, and you add them in the loop body to the array