Hi Guys! I am making a VR Game with the Oculus Quest 3 controller grip button as my input action. Currently, when I press the grip button, it activates all of my dialogue at the same time. I suspect the button is very sensitive and triggers each iteration really fast. How can I make each step wait half a second before accepting another input/iteration?
#blueprint
1 messages · Page 127 of 1
Triggered on the IA will trigger most ticks. You might need to use Started which would make it only trigger once. Alternatively, you can look at the different trigger modifers you can add to an input action in the input context mapping.
sorry, im new, whats Started?
@dark drum
click the little down arrow on your input action event node
cache your array before plugging it into the foreach, after you get the actors promote to variable and plug the variable in instead. much better on performance.
how do i do that lol
it does do it really fast, perhaps a delay on the talk, or even a timer
That is the reason I haven't really dipped into it either.
you might want to change the trigger mode to pressed instead, if you want it to only trigger once
on overlapping actors comming out of get overlapping actors, right click and do promote to variable, name it something, then plug it into the execution (white lines) before the foreach, then drag from that into the foreach instead of using get overlapping actors directly
because foreach element that will run so it's a pain in the ass
it doesn't fix your problem, it's just something i learned that really helps with looping
i mean it does have some benefits like the integrated cooldowns etc even in a bp only project
this fixed it
@dark drum How do I make it so the user input isn't valid until the talk audio has finished playing
but on the other hand, it also makes things more complicated to set up
You could remove the ICM that has the talk input action in it when the conversation starts and then add it back after the conversaion has finished.
Why Epic do this to me. 😭
sorry, how do i do that?
im very new
i use booleans all over the place for stuff like that
@dark drum @lofty rapids this is my attempt, but it doesnt seem to work
i can still spam the input button and it will replay the dialogue audio
so your calling talk on all overlapping actors that implement that interface ?
your enabling it right after you call the talk which is most likely not after the dialogue is complete
theres me, VRPawn, and the NPC Jameson
how do I get the Dialogue Completion state
how do you play the audio ?
@lofty rapids
like this
i also need to figure out how to only play the audio at the NPCs location
i can walk around far and still hear it
i have not done enough with sound to be of much help there
but somehow you want to have an event for when the audio is done
it will if u didnt set the auttenuation setting
that's what define how far a sound can travel etc
You would need to use an audio component and update the sound it plays. This will also give you events for when its finished. The play sound at location is a fire and forget type of event.
spawn sound at locaiton
then you get the component as a return, then you can bind finished event
i added a component for it, and changed the "Play Sound at Location" to an activate component
testing rn
i just added that to the component
perfect!
just gotta figure out how to only play the audio at the NPC's location, and make it quieter the further i walk away
attenuation is what you are looking for
and remember the "ears" are at the camera location by default, you can change it if you need
Here's my attempt to make the following Blueprint from the following C++ code:
void ValidateTime(unsigned short& hour, unsigned short& minute, bool& isAM)
{
unsigned short totalMinutes = ((hour % 12) + (isAM ? 0 : 12)) * 60 + minute;
totalMinutes %= 1440;
const unsigned short VALIDATED_HOUR = (totalMinutes / 60) % 12;
const unsigned short VALIDATED_MINUTE = totalMinutes % 60;
hour = (VALIDATED_HOUR == 0) ? 12 : VALIDATED_HOUR;
minute = VALIDATED_MINUTE;
isAM = totalMinutes < 720;
}
Can any of you skilled guys tell me if I did this correctly?
Because my blueprint isn't acting accurately as the native code is…
the Attenuation Setting asset, or override and set manually
ok i see with override i can set the distance myself
FUCK EVERYTHING WORKS
LETS FUCKING GO
big thanks @dark drum @remote meteor @lofty rapids @frosty heron
isAM is an output and your using it in totalMinutes calculation ? will it always be false ?
you mean initially?
nvm, it's a regular function not a blueprintcallable
the isAM is a bool in the native code I want to copy from but in the Blueprint it's an enum
is this ok to do? is there a better alternative?
it looks fairly similar but why didn't you just use a boolean ?
to make it 1 to 1
fyi, engine already has a FDateTime/FTimeSpan types..
Oh
ty sm for this info I'll try to see if I can utilize it
I like the enum structure better but when I try to make an equivalent, the blueprint doesn't act according
When I add 1 min to the time for debugging, the AM and PM completely changes
For debugging, this is how I'm adding the 1 min
Why is it doing this?
This is the bug, video wise
i would imagine for some reason total minutes is < 720 ?
print string total minutes
or it's flip flopping
it looks like the enum is flipping each time so i would look at the input output of that
I think so as well, that's why I was wondering if I made the blueprint accurately to the native code example
if im exactly redoing the code in blueprint, this would be it https://blueprintue.com/blueprint/sksjfz8u/
i mean you used an enum instead of a boolean
so "accurate" idk
ig 😔
I'll try to see if ur's is more accurate rn
it is these node in the end
and passes by reference
idk why it is like that, but accurate to that code function
validated minute looks incorrect
Modulo💝
Homemade?
yea
homemade, unreal one doesnt work well with negatives
~~Iybgot ~~they got an abs there iirc
this will also have to be used different because your not using pointers anymore, so i take it thats what your trying to output ?
so you can use it on the next go ?
I'll try
Hello! Does anyone know how to remove duplicates from an array. (Fairly New to working in Blueprints)
dont use a TArray in the first place, use a TSet
when you add them to the array, you can use AddUnique
Well it might help if I explain kinda what I'm trying to accomplish. I'm parsing through and xml file to pull some data out to make into variables and the array is coming from a for each loop that is obtaining the attributes value. So I guess I'm struggling understanding how to properly setup the Add Unique function. I'll screen shot what I have right now. It's crude but it seems to be getting the job done.
hey guys
i finally fixed it kind of by not fixing it at all
it automatically fixed it itself
and whats the problem, your getting duplicate attribute values ?
i want to enable complex collision for these 7 objects,how can i make it?i tried matrix but there is no option like this and if it is the one i showed what do i select there?
index is the unique identifier? In that case, probably just have an array of already processed index and skip them if they are encountered the second time.
or is it in importing settings?i disabled the simple collision when imported so i can enable the complex
this will get slow pretty quickly i think
Ohhh for sure but luckily I only need to run this once
That's just it. It's coming from an XML file. Soo I can't really process it beforehand.
This is my example xml if this helps.
<block lx="-0.5" ly="-0.499999881" lz="0.5" ux="0.5" uy="0.499999881" uz="1.5" index="121" material="5" look="1" up="3" color="ffbfada3"/>
</item>
<item parent="1" index="2">
<block lx="-0.5" ly="-0.499999881" lz="1.5" ux="0.5" uy="0.499999881" uz="2.5" index="121" material="5" look="1" up="3" color="ffbfada3"/>
</item>
<item parent="2" index="3">
<block lx="-0.5" ly="-0.499999881" lz="2.5" ux="0.5" uy="0.499999881" uz="3.5" index="121" material="5" look="1" up="3" color="ffbfada3"/>
</item>```
So you can see the index is a block identifier for what block is being used. But I don't need the duplicates. I just need the 1 value.
But when making the array it comes out with a ton of duplicates.
So when I make the array here it contains a ton of duplicates. I'm trying to figure out how to do the add unique that you were talking about.
Hopefully that helps.
why are you make array with one item ?
you probably want an array variable
if your wanting to group them
hmmm
maybe idk if that would work. it might. I just need the block index to use to make procedural meshes. Then I plan on getting the lx,ly,lz variables for the sizing of the meshes.
i did it,now another quescion,how do i enable the custom collision preset
oh,the same
i just couldnt find it
now i did
if I make it an array variable does it remove the duplicates or does it contain them all.
you have a variable, you would add each one into an array, but you need to know which is what to reference the proper data
you would add unique like suggested and you would have an array of the values
but how to know which is what ? maybe put that on the the thing you spawn so it knows ?
yeah that's why I wanted to make the variables so I was going to use some sort of if statement. Like if index = 121 then spawn said proceedural mesh. ETC
are you getting any invalid ?
No nothing invalid. Which makes me think that it doesn't matter that I have duplicates.
well if you have duplicate values of that attribute
that doesn't mean necessarily that you have duplicate elements
see you have multiple index with same value, colors as well, but it's a different element
No no duplicate elements as those are different blocks.
idk, maybe I'm going about this the wrong way...ugh...
In this scenario, do you only want the first one?
i mean it doesn't look like a very efficient way and a lot of loops and stuff
Lol basically I'm trying to take the ship saves from Avorion (the game) and use blueprints to build procedural meshes in unreal. Hense turning Avorion into a 3d modeling tool. It's ambitious but could be kinda cool.
I mean if there is a more efficient way to handle it I would be all for it.
are you just storing a list you can render ?
like a list of objects basically that you want to render with certain properties ?
xml is older tech, modern stuff is json
but it could work either way
<root>
<object index x y z />
<object index x y z />
</root>
yeah so the save files contain the index (Block Type) being used and then the x,y,z cord information for where each block is placed. So my idea was to create a blueprint that would convert the ship save files to useable data to then create procedural meshes. I'm no programmer so needless to say this has been a whole thing.
cant i see who got damaged with eventanydamage?
well i feel like you don't need to go so deep with it if your just storing a list of stuff to spawn
jus use the root and check all children, then go through each one and spawn it
Thank you so much, now it works without flaw @remote meteor @lofty rapids
🙏 ♥️
this would work if all the blocks were the same right? Or wouldn't I need some other thing to say that like index 1 is block, index 2 is slope, index 3 is sphere etc.
you could just set an attribute
type="block"
type="sphere"
etc...
Ugh can I just borrow your brain for a night. I promise I'll give it back.
The only other thing I just thought of is that the grid for Avorion might be different than that of Unreal. So I might have to deal with that at some point.
as far as the data goes, that's the simplest way to do it, you won't need so many nested loops
it'll be faster
also cache the array before you loop it
Hello just had a quick question, I'm working on my first game that I think would be pretty simple, its just a game within a PC (similar to kinito pet) I have a computer model im using but I'd like to know the easiest way to get my computer animations like chat boxes and such on to the modeled computer, I thought about mking each frame a texture but I feel like theres gotta be an easier way
How do you cache it?
when you get all child nodes, right click on the out nodes and see if you can promote to variable
if you can, do that, and then plug the variable into the foreach
it won't run the get for nodes each time the foreach runs
if you use one big array you may want to watch out for memory of a huge list
maybe break it up into chunks if you can
<root>
<section id="1" />
<object x y z />
</section>
<section id="2" />
<object x y z />
</section>
</root>
a little more code but if your xml was large you could split it into chunks to load stuff only within a certain area, or however you wanted ig
I've got a math problem that is a little beyond me.
How would I go about determining if a Ray is within a Cone, and if it is not, not clamping it into that cone?
the origin of the vector will necessarily be the tip of the cone
can you right click and make get children nodes unpure ?
that might actually be better than duplicating the array but yes like that is better
right clicking on the root node?
the get children nodes node
see if you can make it not pure
so you don't have to duplicate the array
Doesn't look like I can.
ok then thats fine
it should run better like that
but a huge xml you may want to split it up for memory sake
memory vs performance, if it's too much just use the node itself
Thanks man. Much appreciated.
on something large i've never done it but you may want to look into reading files as a stream
i would use c++ for large stuff like that you might get some problems with array size and bp shutting down
if you make a blueprint function library, and do some code in a function, it will greatly reduce the time it takes and it won't fail but freeze the game if not in one tick, so you can load really large stuff
ブループリントとC++のパフォーマンスの比較をしてみました。ブループリントのネイティブ化をした結果も動画の後半に載せています。
I tried to compare the performance of blueprint and C++. Blueprint Nativization is posted in the latter half of the movie.
so if you have > 500 or somewhere around 1000 in bp your kind of f'd
Not really accurate but
well i had the problem myself when looping
around the same amount
it does depend on what exactly your doing but a large array in general and it breaks
normally in programming 1000 things is nothing
Depends on what exactly you're doing, if you need it done in one frame, and how you're doing it
Frame slicing is an option
But yeah larger iterations usually benefit greatly from c++
Its one of the bigger isolated payoffs
in editor blueprints, AI controllers doesnt exist on play ?
player controller are accessible
So the lesson is a bit of C++ just boosts BP tremendously?
when it comes to loops for sure
I thought that was common knowledge. But it's neat to see a more clear example
I still need to get some better C++ knowledege
mixing the two is really powerful
with a Blueprint Function Library you can off load all sorts of stuff
i know a bit about programming so for me it's not too difficult
but i use bp for whatever i can
UATHelper: Packaging (Linux): LogInit: Display: LogBlueprint: Warning: FMemberReference::ResolveMember (K2_EndAbility) bSelfContext == true, but no scope supplied!
Any chance this could happen when EndAbility is called via a macro?
I moved just my math for a field of view system to C++ and went from 8ms/frame to 0.05
it was a lot of math, and big loops
I'm currently trying to follow along this tutorial to make a scalable/modular system for handling gameplay tags and adding listeners. The problem with the tutorial's approach is that it isn't too scalable cause it seems I need to keep adding separate event dispatchers on top of adding their bind/call events for every gameplay tags handled through a switch on gameplay tags. Is there any way around this, or should I just not bother trying to handle bind/calls inside this BPC_GameplayTags.
This is the series to watch if you want to create a role playing game in Unreal engine with rich, deep RPG systems and advanced functionality.
In this episode we describe the aim of the course a bit more in detail and start preparing our project for the upcoming episodes.
Beginner tutorial series: https://www.youtube.com/playlist?list=PLNBX4kI...
A blueprint function library using C++ functions?
What's the stuff you moved there? Would love to see an example to show where that massive improvement happens
Sure 8ms isn't much but that's less than 1% the original time, that's just.... WAY too good not to implement.
8ms is huge, that's half or more of your frame budget
I had a line of sight system that shot traces from the viewpoint towards corners, and did math to figure out if the corner was blocked on the left or right, and did some triangle ordering stuff
Ah interesting. All I have for Line of Sight is a collision based system that makes dynamic collision meshes...
It's not as fancy but doubles for making the visibility
I have 30 float variables and I need to have a separate timer for each variable. Is there a way to create 1 component that will have all the functions for a given variable and this component can be used in another component?
yes, you can then place the functions anywhere you want
I just have to update these 30 variables all the time and each of these values will be different
I feel I could use that for some systems I have...
maybe there is a good way...
They are very simplistic but overall important for my game
I talked about it to you before engage
Though at this stage, performance and efficiency may not be the best focus.
Although I've gone away from that system and now just do a bunch of traces without aiming at corners in particular
Dang, it even has partial model rendering! This is some good stuff.
thats just masking
Yeah but I couldn't figure out how to attach masking to that
So it's impressive for me.
This is the current system which more "shotguns" traces so it doesn't rely on corners and fancy math
Can you maybe write down the logic of how exactly this would work? I feel this is a struct + component thing but I'm not too sure...
is there something in the unreal engine that allows me to create 1 variable with all the functionality in one place, and then use it in a component in which I will duplicate this functionality x30, assigning a unique name, etc.
So just the classic line array with amount and distance based on parameters...
30 exactly or a varying amount but on the order of 30?
something like Macro, Function library, but with replicated variables
I've never seen the dots though
Yup, but all in C++ so it's fast. thousands of traces is no problem
dots are just to visualize the trace endpoints
Ah fair.
and a bit of math to make it equal distance between them instead of equal angle
Hm but if I do the traces part and relevant logic only ins C++ and most of the rest on BPs I assume it would still be a massive improvement.
yeah the rendering on my end is still BP
i'll link the plugin so you can poke around, it's dead simple
the C++ code spits out an array of triangles to be drawn to a render target, which is then used in post process for visualization and in materials for masking
Oh thanks. I personally don't have much to do for visibility... BUT cone shaped attacks are one of the banes of my life
I really wanna implement them but they are this unsung, strange thing...
as much as I add, it will be something like components, e.g. if I add 1 component to a character with this, I will have 1 variable with all the functionality, when I add the same component again I will have 2 etc. but it will be about something else
cone shaped attacks should just be a sphere trace + dot product test
I even thought about modelling a cone shaped custom collision! I got that desperate.
and I need something like I described here
I mean a cone with a flat top.
And bottom
Less flamethrower, more like swinging a blade
Maybe I'll create 1 component that will be a base with functionality up to 1 variable, and then create another component that will create 30 of these base components?
and will attach them to the character
is it good idea?
someone can help?
I just want to create something like: I have 1 base component with all the functionality, replicated variables, etc. and I want to use it in another component that will be attached to the character.
\
is there simply no other option than to create 30 variables connected to separate timers?
floats
because you might be able to use an array
but you want a component in a component ?
but I want each variable to have a different frequency of change
something like it
but it doesn't necessarily have to be this if there is a better solution
I was thinking about creating 1 base component with functionality and then duplicating it and attaching it to the character with another component that will manage all the other components
You can have functions set up that can manipulate variables "by-ref".
As far as timers go, if you you can work a little C++ in, you could create objects that have a world reference and you could spawn them to keep track of the timer for a specific variable as needed.
any solution in BP?
Using an actor
actor with 30 components and making a parent actor out of it?
You should only need a single component.
but I need a separate timer for each variable with all the rest of the functionality
e.g. I want to track the health of each bone in a character
Does anyone know if there is any way to detect a Mouse Up event in a Construction script?
I have a Actor Blueprint containing a PCG graph and Spline to control the bounds. Lets call this BP_Parent
The PCG graph elements are all themselves Actor Blueprints being driven via Editor tick.
Whenever I modfiy the PCG graph via the Spline, I also need to manually also do a PCG > Cleanup followed by a PCG > Generate.
If I could somehow capture a MouseUp event (the end of my Mouse drag and Spline manipulation) in the BP_Parent construction script, I could simply get a reference to the PCG>Cleanup and PCG>Generate methods.
The component would handle that.
When you want to manipulate an attribute, your functions can take reference to the variable holding the attribute value and manipulate it "by-ref".
When you want to create a timer for an attribute, you'd spawn an actor that contains the timer logic that calls back to the component that spawned it, as well as a means of referencing to the attribute so that the timer logic can call to the component to manipulate the attribute. When whatever logic is done with the timer, you can destroy the actor.
and this will be optimal?
Optimal would be to use C++ so you can make objects that have a world reference rather than using actors for the timers. You don't want to have 30 components on an actor that all do the same thing just with one variable being different.
ok, thanks
Consider something like this just as an example - you'd define what attributes you need before hand, you can create an enumerator that matches up with the attributes. You can use that enumerator to make select statements to then drive things within the component.
pretty neat
I'd make it more generic with some array/map of the data, but yeah 😄
enums are often more clear cut i guess
Unfortunately for timers, they bind to the specific delegate, so if you have a single delegate defined on any single component or actor, the timer system will only bind to that delegate once - this makes it impossible to use a single event to trigger logic for multiple things at different times. The concept of using an object or actor is that each of them is then treated as their own unique entry by the timer system.
"Scer2 — Today at 9:39 PM
but I want each variable to have a different frequency of change"
tick (or highest suitable interval timer), manual tracking of last refresh
The only issue with Map is that it doesn't replicate, but if this is entirely single player it would be a fine solution.
Multiplayer could use an array but would require you to loop through it each time you want to make a change to any particular value in order to get or change the value which isn't very efficient.
you can combine those
if you want to
map for fast lookup to the correct index, if the array was of notable size
doesn't need to be replicated, just needs to be identical server/client
Yeah true
It's what im doing for my equipment comp rn 😕 feels dirty as hell since it's so tiny
15 elements, not worth the lookup optimization xD
I use SetFocus function to keep ai looking to player. It looks, but rifle doesnt because rifle is at right part of pawn and it doesnt look to character correctly. Where could i do wrong? Or how can i fix that?
Line Trace is forward from muzzle
can you add a rotation if he's in firing mode ?
either that or change the animation maybe ?
I can, but how many rotation? It would be manuel solution, I wouldnt like to change offset if i change animation or something
I thought maybe there was a function to synchronise the rotation of the two actor
is there better way to get variables from a class because holy
damn i really need to learn c++ xD
afaik your alternatives are limited because you get class from name, best alternative looks like using async load class asset and construct object from it, cast it to your asset then getting variables, so you dont see unnecessary ones
here is the bp
can someone help like i made a character switch system i'm just using the paragon characters for now but it works so far but when i switch to the character on the back for some reason the material get mixed up any one know how to fix this
Hey guys -- any ideas for this one? I'm trying to create a simple physics setup where the door stopper on this screen door sort of behaves like a rotating piston. In my head, it should be easy enough, but I've wasted an afternoon trying every physics config I can think of, nothing has come close to working. How would you approach this? The door itself is setup, I just want the piston arm to follow the door when it open (point A rotates and to follow point B when the door opens).
You're only changing the mesh asset that the skeletal mesh component is using and not updating the materials
I would just animate it
Is there a trick to making homing projectiles more reliable? I'm finding that if the target actor moves, the projectile will sometimes over-shoot and end up orbiting the target.
wait so it doesn't auto update the materials
Meshes are separate from Materials
oh i thought it like in the editor when you switch the mesh on the component it auto populates the materials
I'm working on a VR game and I've figured out how to get in and out of my car, but the camera keeps spawning in the middle instead of where the camera is. Any ideas?
Unreal is Saying I'm Hard referencing a class, but I've used a soft class reference only?? what do I doo??
thanks so much yeah i had to manually update the materials thanks abunch
I think it's a hard reference to the asset, not the class.
Eg. How can you reference a class without knowing something about the asset that contains the class?
The definition of the soft reference variable is essentially a reference to the asset.
So even if it's a soft reference class variable, it's still referencing the asset?
But in that case why isnt it showing it as a Soft class reference in the reference viewer?
Like this
I'm trying to Reduce my sizemap on my game Instance
It won't show as a soft reference because you have a hard reference to the asset.
But how, I don't reference it at all?
You do, simply by having a soft reference in your blueprint.
But then
Change the soft reference to "Actor" then it would no longer need to load your asset.
Okay nevermind checks out
Code won't work without the specific reference, I'll give up on reducing the size map and look elsewhere
If you need that specific reference, then that likely means you don't need a soft reference anyway.
I think it'd be more optimised to use a soft one and Load it once the speficif reference has been selected,
or let me try make it hard and see what happens
because I think it normally loads all the child classes, or atleast the selected child class into memory
If you are going to show the sequence in that level regardless anyway, might as well let load it in the loading screen or when the map is open
or or or, maybe I'm wrong about it needing to be specific
I'll try making it generic
One way to think of it better is looking at things like Textures or Sound Effects.
If you use those as "Soft References" then you don't necessarily need to load the specifc texture or sound effect until you need to use them - the engine will natively always have "Texture2D" and "Sound Wave" loaded which are the "class" of the object, so these are hard referenced.
By specifying your "BP_FighterParentClass" as the soft reference type, that means you are referencing the "BP_FighterParentClass" as a hard reference to that asset because you've defined it in the game instance. If you were able to use "Actor" as the soft class reference type then it wouldn't appear in the size map at all, but could still contain a reference to your BP_FighterParentClass without requiring it to be loaded.
You wer right good sire 🙏, I will note this for the future
This is my old code, is it safe to say this is a bad use of a Struct
Should I have had it as individual variables instead?
use re-route node for sanity!
Yeah I'm getting to that too 💀
Gonna recode this whole thing
this is 3 years old I think
i have changed a bunch of input variables on some public bp functions, and now some of the assets that implemented those functions will no longer open, resulting in a crash.
in my specific case its functions on a control rig library, used in control rigs. maybe the crash is caused by the autocompile functionality.
Does anyone know if there is a way to rescue the assets that implemented the old functions? I am happy to edit some text files, look into the source code or anything else. I just dont really know where to look atm :/
@hallow compass do you use source control?
its just a day's work, nothing submitted. since this happens more often than not with control rig when changing functions would be ideal to have a system to fix it directly
There's no saving corrupted bp from my experience
But anytime it happend to me now, i just discard changed in the source control
Happend to me for my animation stuff too
Mainly physich assets
yeah i thought that was the case :/ but literally any time i add an inpput to a global function, all previous control rigs will crash
i tried to disable compile/autocompile from the control rig source code, but it still compiles somehow on launch. maybe editing source files from the general plug in library doesnt work as id expect or idk
Maybe Run on debugger and see what the crash is about
so it fails to check that cause it doesnt exist. but if i could open the rig before it checks for that stuff like a normal bp i would be able to refresh the nodes
at least thats my hopeful interpretation'
I assumed "global" function is of your own making?
Just came across what I consider to be novel, maybe just boils down to me being dumb, but I have a BP and a C++ component attached. The BP seems to be calling the component Constructor/BeginPlay on state change ( I have a bool property I use to trigger it to move ). I'm trying to achieve like a portcullis that closes/opens, but I'm finding it challenging to do that without being able to say determine it's original location
its just a public function, made in control rig. so i just chagned the box from private to public
constructor/beginplay. calls both or you interpret them as the same thing?
It calls both. I mean realistically if I could even find a way to get the original location I could work it out. LIke i have a BP object that i want to move from it's originating location to a target location. Then when triggered again I want those to swap so it goes back. This is trivial if I can keep state
The component works on a static mesh, there is some extra business going on with BP
cant you just store start location on begin play of the component. store final location when you move it, and then revert?
That's what I had. In begin play i do startlocation = GetOwner->GetActorLocation() and then targetlocation = startlocation + transform
and I'm triggering, in PIE via a bool property toggle
but when it flip the bool, begin play is called again and so I lose the original location
Something bizarre is happening to one of my widgets. This one is designed to let the player move from one spot in a vent maze to another. (Image #1) Every time a button is clicked and there is a path ahead, the player moves forward. Normally, when any of these buttons are clicked, the arrow buttons are supposed to disappear then reappear after a five-second timer delay. But now, when a button is clicked, they stay on the screen. I have a Timer delay (Image #2), but it seems the program just skips it. What could be the problem?
how could begin play get called twice? it should only be called when the game begins
Man ... I been asking myself that question all day. Never-the-less it seems true. BP->Component , I click BeginPlay is called ... I toggle bool, beginPlay is called again ( this doesn't impair things because it's in original state and the current location is the start location ). I toggle again to start reverse, and begin play is called again
To be clear ... it's BeginPlay on the component
begin play cannot get called twice, unless you are doing some obscure stuff. I would double check what you are doing in the construction script, but its kinda hard to give advice without seeing
When I attach same component to a StaticMesh for example ... works fine
BP has nothing in construction .. I basically convered a static mesh to a blueprint class
no event graph, bupkis
somehow on a state change, it's re-calling begin play in the components
Can anyone help me with this, please?
Normally #umg but if I recall BDC_Patrick said setting vis by enum has issues and you should use the actual visibility. Otherwise maybe you can remove from viewport
I could, although that would reset the floating number which determines where the player is and which level sequence to play in the vent maze.
Is there a Visible checkbox on the widget panel?
Are you talking about the Set Visibility node or the Visibility element of any of the widget's buttons?
Well the set visibility node only lets you use enum right?
As in enumerator?
Yeah
Regardless, if that same code worked before but not now check if that code is actually firing and if that branch is actually true
Actually, I did put in breakpoints and I removed certain nodes and can confirm the icons do normally disappear when set. The problem is that the code seems to ignore the Timer which delays by five seconds and goes right to making the buttons Visible again.
Add an initial time
See if that does it
What might cause my "Play Montage" node to immediately be interrupted?
Which of these, then? The bottom one?
First one
The variance is how much it can vary
Make sure FuncLongDelay isn’t being called elsewhere
Nope, looks like this is the only one.
Ctrl+Shift+S , Alt+F4 for sanity’s sake
I just remembered something. Let me try it.
I don’t rly see where that event is calling the stuff in the second screenshot either
That's because I didn't do what I should have before.
wth is that delay for
This occurs during a level sequence in which the camera moves down one path in a vent maze. While the three navigating buttons are Collapsed, the Delay keeps the arrows from reappearing until the sequence has finished.
It and the Timer are included to force the program to take the pause when needed.
but why are you making them visible twice
Doesn’t look right
And normally the timer waits the first 5s before firing the event, so something else is wrong
I'm not quite sure of what you mean. But first, here is the first of the "North Button" branch. The three buttons are set to Collapsed. Normally, they would be Visible after the custom event which we just looked at, but the program just skips the Timer delay for some reason.
Because of this, the arrows are on the screen during the level sequence when they are not supposed to e.
*be
This is how it was before.
I've removed the Delay from this custom event. Now the arrows are still on-screen when they aren't supposed to be. I feel like this custom event is missing something.
so you aren't setting them to visible at all?
yea you are calling an event that starts the timer, then immediately afterwards setting them to visible
the timer is not doing anything here, it's just going to call the FuncLongDelay event after 5 seconds
Oh. What would be the best way to set this up, then?
move set visibility to this
Okay, I'll try that.
unless a node has this symbol, everything afterwards will still be executed in the same frame
That did it.
If it's for level sequencer then drop it in level sequence
Add the actor into the sequence then set the property there
Delay/timer doesn't really go along with level sequence
They r played frame by frame
If u do something outside of it, things may happend if u alt tab for example, the calls would be desync
yep, just a simple delay instead of timer should've been sufficient in this case, timers give you control and are good for repeating things though
At best you can call trigger event from the level sequence
coldsummer makes a good point, but I'd suggest binding to the OnStop event of the level sequence instead
Well y not use the level sequence to hide or unhide
The widget calls upon a set of short level sequences for navigating through a maze by clicking on buttons, and which sequence is played depends on the floating number.
So that the program can keep track of where the player is.
U can have something initiate the sequence
But the "cinematic" part should be inside the sequence. Eg the vissibility of the object of interest
OnStop? Hm...I might have some thought. Anyway, @frosty heron, here is an example of when sequences are called. There are seven ones that involve moving straight ahead and some that turn in a direction, either before proceeding or before you find you can't go in some direction.
As for using the level sequence to hide or unhide, you mean to say I could have a Level Sequence even hide a widget when needed?
ah yes, the ancient technique of nested if-statements
Hold on for a second while I do some capturing.
I'll share a Drive link in a second once the footage is uploaded.
https://drive.google.com/file/d/1HNFC0NNsfbAsvLqHfdJCcD696lw-aAaU/view?usp=drive_link
@undone bluff @frosty heron
Here's what I mean.
drive has an embed player
that said, this is a really bad usecase of levelsequences
There we go.
I'm sure there are better ways. This was just the only method I knew of.
all you'd have to do is make the left and right arrows rotate the pawn 90 degrees, then for moving forward there's a variety of ways, but I'd probably just do a quick trace forward to check if you aren't looking at a wall
What is the delay for?
To keep the arrows collapsed until each sequence finishes.
Initially, until I learned about Timers.
Bind on event complet, set arrow vissibility
Well timer or delay has no place for something like this
U only have to run it after the sequence is finished
So binding lets you put in some command that occurs when the event within a clickable button finishes?
I can tell, u gonna get bug relying on delay using sequencer. Player can alt tab, and u will get undesired hiccups
In Event Complete's case.
Bind om sequence complete
At the end of the sequence it will run an event that you bind.
for the event delegate (red wire) do the same thing as with the timer
connect it to a custom event and it'll be called when the sequence is finished
So, in this case, I would make one function which would Bind Event on Finished, and then attach the red Event to a custom event that would then make the three buttoms become Visible again?
well, do not put this in a function, this is asynchronous
Then one custom event and link it to another?
it doesn't really matter, what matters is you bind the event that sets the visibility with the level sequence as target right after you play it
play level sequence > bind event
It worked! There is more than one level sequence, though, so would I need to combine them into some variable or will I need to make a custom event for each sequence? Each sequence consists of either turning 90 degrees or moving forward from Point A to Point B.
just bind to whatever sequence you are playing
Okay. This looks a lot more useful, too. I'll have to remember not to use delays with sequences for future reference. Thanks for the tips, once again!
Is there a way to change InterpToMovement to use cubic or quadratic interpolation between points instead of constant? Seems like there should be but I can't figure it out.
Ideally use them almost never
Can’t compute, try #game-math 😅
Anyone know how to shoot something that is attached to player? I used attach/detach/add force/simulate physics/enable collision, but add force didn't work, the actor just fell off from player.
Can someone help me figure out this problem?
I'm using a "2-player" system where I assign each player a character; possessing the characters with WASD to move the first character and arrow keys to move the second character. I'm possessing Character #1 with the normal "Get Player Controller," and for Character #2 I'm using a second controller to possess it. When I tested P1, it worked and I could move the character freely, but when I tested P2, my string prompted the "ENHANCED INPUT LOCAL PLAYER SYSTEM" was invalid and I could not move my character even though it was possessed. The Enhanced input system is only valid when I possess my character using the "Get Player Controller", but not when I'm possessing it using my Second Player Controller. How do I fix the "ENHANCED INPUT LOCAL PLAYER SYSTEM" being invalid when using the Second Player Controller?
1st image is the input system being set up in the Character BP
2nd image is the Second Controller Possessing in the Level BP
3rd image is the Second Controller Spawning and Setting the variable in the Level BP
4th image is the First Controller Possessing in the Level BP
force is intended to be added continuously, you should add an impulse instead
#multiplayer is alot more complex and you can’t use get player controller for it
This isn't how you add a controller. Use "Create Local Player" if you're doing something local.
Didnt know this existed ^
not sure if this is the right section, but I am having an issue.. I set up a fight cam and when i did it now throws the character movement off by 90degrees.. I have looked all over and I cannot seem to find anything
The character is facing toward the forward which in this case is along the y-axis.. when i put in the new camera movement switches to x-axis.. very strange
Is it possible to have the value of a float track from one timeline follow the value of a different timeline? Lets say a timeline A goes from 0 to 1 over five seconds when a key is held down. When the key is released, timeline B starts at the current value of timeline A, and brings it back to 0 in two seconds. (Using timeline's Reverse exec will not be right for the project, I want to do a different timeline animation rather than just the reverse of Timeline A)
Oh that would be great, is it possible to make the 2nd track's initial value start at whatever point the 1st track is currently at?
Looks like I have much to research about timelines, not quite sure how to do that - thanks for pointing me in the right direction though!
Hi, I'm building a teleport system and I want to spawn Niagara, which gets triggered when the character teleports, but it doesn't work. Can anyone tell me how to fix it?
hi guys how to make the player follow the rail without using splines the splines are too hard for me to place its just not for me is there other method to make player follow this rai
Not really. What are you finding difficult about placing the splines?
i spent half an hour placing them and its not even placed correctly
What do you mean by not placed correctly?
Not really, it looks like the top point isn't in the right spot. Additionally, if you right click on a point you can change the anchors to be weighted as opposed to auto. This means the handles can be different lengths.
Hi
How do I set the widget to a random location after I click it?
That would depend how the widget is added to the screen. If it's in a canvas panel, you can just use the set positon node.
what should i choose
Thanks, I couldn't find any location nodes 🥲
Nvm that just made the whole screen small in the top left corner 💀
it fixed now thank you so much and i turned of snap to grid also and that fixed it
I am trying to create an procedural generation spawn for the map of my game, but i have one problem, I observe that its never going on the last condition of the select, basically its not spawning a room tile into my -Y coord, do you have any ideea why, or how could i solve this problem, it spawns tiles only for +X / -X and +Y , but not for -Y, how can i fix this 😦
is it going to index 3 ? @latent venture
what do you mean by that
?
your selects are selecting based on an index
looks like you have -y hooked up to index 3
is that index being reached for that variable ?
yeah
i mean if i putt them in other order, it will take -y
do you have any other ideea on how could i do this part of the generation?
How can i make an actor to make the mouse events pass trough? Like, in this scenario, i want Actor 1 to not stop the mouse projection, so that both of them can call "On Mouse Begin Overlap"
https://media.discordapp.net/attachments/375019046128713729/1223597290556493834/image.png?ex=661a6ec7&is=6607f9c7&hm=1266d9f9fd766c0ead2c6a9768e41b41094d5fd08f4d9e5c6e0b54cbcfda1e45&=&format=webp&quality=lossless
i made a template anim bp that has an anim layer interface implemented. however, the children of the animbp dont seem to have access to the interface. why? this means i have to add the interface manually on each child and edit the values, as opposed to just having it ready because it was set up in the parent
maybe try On Mouse Begin Overlap triggers a MultiLine Trace from Camera to Past your cursor position
Something like this:
how do I prevent the character controller from moving the "Mesh" relative location when crouching? For crouching I simply enable "Can Crouch" in the "Character Movement" and use "Request Crouch". Capsule half height did change properly as intended
how did you get your connection lines to look like that?
its beautiful
organised 😱
Electronic Nodes Plugin
Thanks!
A widget thats in the world , not just on your HUD
a widget that is in the world like an actor. Usefull if you want cool menus like this:
its a little harder to code in tho... but not impossible
Thanks. I thought it is an actor with a widget.
i might have thought of a better solution for my specific situation... If i have an actor that is a horizontal plane at cord Z=0, how would this actor know the cordinates [X, Y, 0] where the cursor is pointing?
well... your technically right... 3d widget is an actor component...
so for a 3d widget you have to make a special actor
that has that component
Thank you.
you can give the plane a unique Collision Channel , and then only look for that channel
thats what i did
Hey guys i need to tie together multiple variable to one variable actor but when i try this with a map on my actor variable and i put a structure, the structure seem to be overwriten and i think its because the structure instance is tied to the variable it self so i can't have a different instance of structure tied to different key of the actor.
Any idea on how to tie multiple variable to an actor variable ?
hi guys how do i tell unreal to ignore specfic spline point rotation
maybe a Select node?
hi folks.
TLDR: is there a way to assign a variable of Actor Component with another component from same BluePrint where both are attached?
Long Story
There's a variable Zone of type ShapeComponent reference on one component.
This component is attached to a BluePrint. Also that BluePrint has Sphere Collision (which inherits ShapeComponent).
But the dropdown selection for Zone variable is empty and there's no way to drag n' drop anything into it.
I know this can be done dynamically, but the point is to provide a designer with easy setup without tinkering with Event Graph.
ok thannk you
Hello, I'm having an issue with something very specific to how BPs work.
That's the code that I have, and it works as intended (screenshoot 1 and 2). SetupFoeGroups is always called prior to DoWaveSpawning_Implementation. SetupFoeGroups might be called multiple times, whereas DoWaveSpawning_Implementation is called only once, but always after at least one call of the SetupFoeGroups. It's a multiplayer game, and it works perfectly when the code is executed with any amount of players. The problem occurs only if a new player joins after the code is executed. However, the thing is that this code is never executed after there is a late joiner (which is correct, I want to execute it only when players decide to start the game), but the thing is that all the instances of StartSpawningFoes except the last one in the chain (i.e. the last iteration of the foreach) break - they don't exist anymore. If I call 5 of them, I'll have only one if there is a late joiner.
I have tried to rewrite the code in a dumb way (third screenshoot), and now it works correctly: all the StartSpawningFoes exist regardless of when players join or leave.
Does anyone know why it might be a thing? I have only tested that in PIE and Standalone Mode, but in both cases the first version works incorrectly.
Hi ! Why code work in Level Blueprint but don't work in separately Blueprint ?
what code ?
If I was to take a guess, I would say it's because you're pulling variables from functions on a different execution path. (Big no no in my opinion) There's no guarantee the variables your pulling will have any data in them.
You know... the code.
I actually have tried to save it in a variable, and it doesn't work regardless. I have tried to unwrap the whole function, and put the actual code in the event itself, yet it didn't work out
You'll need to show what code your referring to.
didnt work basically im trying to set the rotation of the charcter to face forward but cant
set control rotation ?
ok ill try it
idk if that will help but did you rotate something ?
how do i set control rotation
is your character rotated normally in the bp itself ?
because you set the rotation back to 0,0,0
is this the code that you ran that did that ?
yea in the charcter blueprint i didnt play with rotation just in spline blueprint
yes
It creates a separate window and I can't move my character. How would I keep it in one single window?
Even if I use simple combination like this, its work in Level Blueprint, but dont work if I create it in Blueprint separately in my project folders.
you need a pawn or character and possess it most likely
if i set relative location only it face also wrong direction
in the BP's Class Defaults , set to Player 0
i would think you want it to be always rotated forward
your character should be facing forward and then you move it
looks like your using the ue character, did you change some stuff ?
ill look into it
i can see you are moving forward, but you shouldn't have to rotate your character
i didnt find anylogic that does this maybe its because of the spline
Its work! Thank you !
why
so this is auto walking on a spline or something ?
this in the CMC ?
yea and playing run montage
are you set actor location ?
that would make sense then you are actually facing forward
yes
ok ill try it you mean use get actor location and target get location along the spline right ?
yep
yea the set actor location dont work in splines
so wdym i thought thats what your using
you can use lookat and move forward possibly
im using set relative istead of set actor
so i think what is actually happening is your moving but your forward is staying the same
lookat rotation may fix forward
i tried set relative rotation and set actor rotation both didnt work
so is it wrong with the location
yea to look at i set it
didn't rotate it ?
yea
hmm
i would get the point, get lookat, rotate the actor, and move it forward
but idk much about control rotation and how you would have to set that
i know you can use control rotation to change your forward
ok ill try this
Erm I fixed an error in my level blueprint, but when I try to play the game it keeps opening autosaves of the level blueprint (that still have that error) and says it can't compile the game cause of the autosaves... What's the issue? The error is no longer in the level blueprint, why are weird autosaves coming up?
look into control rotation i think thats your forward
I tried fixing it in the autosave and all it did was open ANOTHER autosave with the same error
so ue is just opening up autosaves ?
idk is that an option ? or you have to press something for that
when I press play to test my game, it says game couldnt be compiled cos of an error, when I click that error it opens up that autosave
This is my compiled level blueprint, clearly says compiled
but when I play the game, this appears
i think the main proplem here is that it doesnt face the spline rotation
errr I just fixed it in like 5 autosaves and it started working suddenly
don't play in editor
check the errors
hit cancel
check the error in the file
since it's compilation error, click compile and check the errors
yea i did, i checked the error in the autosave, then compiled, and then pressed play to have another autosave with error appear
but going back in autosaves works as well
it just kept coming up with autosaves until i fixed all but
why is my ue being weird like this
the game doesnt do anythign with the autosaves does it
Yep it came up with a different autosave everytime i fixed the other
had to fix like 6 in a row and then it started working
other than that, do you have any idea why when I change levels in-game, it kinda breaks the game? when I open each level by itself, it works properly how its intended
wdym "breaks" ?
but when i launch the game, go through the menu and start the game (so open a level), half of the stuff doesn't work - like using my mouse to zoom in/out and rotate etc
same happens when I launch the level my "playthrough" is on and then using pause menu I go back to the main menu, there's a mesh that doesn't show up
Earth is supposed to be here in the menu
but it doesnt appear when I change levels
someone told me it's possibly caused by gamemodes but idk what that means, what's wrong with gamemodes
is the globe in the main menu level placed in or spawned ?
placed in i guess
i just put it there in the viewport and made the camera to face it
if you place something else does it disappear also ?
press f8 and look around, do you see the globe anywhere ?
i tried and tried but it dont just work is this because of my splines
try to do what you were doing but set control rotation
set it to like 90, or 180
see what happens to the character
maybe you can use the lookat to set control rotation
so your character looks in the direction of the next point
ok it fixed it kind of but its always the two last points are the proplem
Yes anything else disappears aswell
f8 doesn't seem to work
menu is in ui input mode only so thats why maybe
well i was thinking you camera is just rotated or something, so to pop out and see if thats the case
are you possessing something with a camera ?
camera is fine, i'm telling you this only happens when I change the levels
otherwise its doing what it should when i play every level by tiself
Nope not in the menu
is it a seperate level ?
Yes
what sort of camera are you using ?
hmm, and anything in begin play of the level bp ?
Here's something thats getting me confused recently
In ue when you have an actor that inherits from another actor you say that actor is a child.
but the same term is used when an actor has components inside it that are also child
is there a better term for this
it seems the former is the correct one
and the second is different though the same term is used for it
can you not set the ui only mode and see if you can move the camera around ?
and you don't have a playerstart ?
how does it auto possess the camera ?
i'm thinking your not actually using that camera
erm i removed the ui only mode and camera appeared inside earth
the earth is is the scene and what is the stars ?
and you can move it around ?
yep
right so your not actually using that camera in your main menu most likely
how do I do that
i usually possess a pawn with a camera attached
idk how to just use a seperate camera yet
you could set a game mode override, create a default pawn with a camera, set the pawn in world settings, and it will possess it when you start the level at player start
thats how i would do it
it would start in the same spot every time
move the camera on the character either way
then you can set the mode back if you want to ui only
and it should be fine
when you don't actually have a possessed character or camera then you get that free flying one
There is also always the option to make a PlayerCameraManager child class and use that to define what the camera should do. Might not be as straight forward for beginners, but would be a better way than having a Pawn that is only there for camera reasons fwiw.
But ultimately, no one cares I guess as long as it works 😅
ok so here is how i finally fixed it
Erm it doesn't possess it for some reason
still appears to be inside the earth
do you have a player start ?
and also can you move around now ?
considering i dont know what that is i'd say no
cant move around now
but when i open my game it finally works
its just the menu camera now
PlayerStart is the thing you can place into the Scene that UE by default uses to figure out where to spawn your DefaultPawn
there child of lots of things
in programming it's common for anything created from or in another to be called a child
like directories, you got your parent and all the children same thing
I'm using a single level for the main gameplay, but I need to make it spawn specific biomes on specific plays but I'm not sure how to input variables into a level as it plays, any help there?
For the first time the level is played it would receive the biome variable as 0, then it would spawn the biome linked with the 0, for the second time the level is played it would start with a 1, etc
I guess not?
are you actually re loading the level ?
Yes, it switches to a different level in between
hi do you know why nither set timer by event and function and delay dont work on event tick why it canel everything that delay
you definately don't want to set timer on tick that makes little sense tbh
what are you trying to do ?
stop anim montage after it complete its spline thinge and add movement input
so you are actually loading another level each time ? and you just need to track an integer like 1, 2, 3, ?
Yes
i would use the game instance, it persists throughout the whole game across levels
create a variable that is an integer that stores your biome mode
Alright, I'll check that out thanks
also even the bool dont work after everything is done on event tick why it cancel even the bool
Can I use the game instance to save progress or should that be done elsewhere?
i don't know what your saying because i can't see any code, wdym "cancel"
there is a built in save system i have not used it, but you can store stuff across levels in the game instance
so normally when you load a level, almost everything resets to defaults
except for game instance
Ok thanks
basically like this and even if i set the bool to false and stop the montage from the charcter when it false it doesnt detect it
you could also have an array of integers where the index is the level you are on 1,2,3 and in the array at that index is the number for the biome setup for that level
thats what i mean by cancel
Guys quick question i only want to set certain member of a struct so naturaly i use set member but from a logical perspective it look like u have to feed the set with a struct ref wich is logical, but as show on the screenshot u can take from an input a set member and set the struct member without a ref structure ( i ask cause when u take it from the input pin it recommend set member naturaly wich should not happen if it was'nt possible) ?
Im also asking cause it would permit to not have to feed a variable and have to constantly manipulate it
the only boolean i see is looping and the one on the left i don't see anything in your code
ok ok ill change it
are you setting it true somewhere ?
Yes - there is a built in diff which you can access from the asset browser. You select 2 files you want to diff, right-click and then select diff to activate the tool. See https://dev.epicgames.com/documentation/en-us/unreal-engine/ue-diff-tool-in-unreal-engine?application_version=5.3 for more.
yes in the beggining of event tick
well then your just resetting it to true on tick
so setting it to false basically does nothing
because you set it to true right at the start of the next tick
chances are slim that your other code runs in that timeframe
oh ok than how do i fix it
Just to update you on diff - you can use it without version control. Select the 2 BP files from content browser and right-click and select diff. See https://dev.epicgames.com/documentation/en-us/unreal-engine/ue-diff-tool-in-unreal-engine?application_version=5.3 or https://youtu.be/XYZsvouytVQ for more.
you want it to stop after your done ?
you need to find out the end of your spline, can you check the index maybe ?
then turn it off, or when you hit the end of the spline turn it off
how are you looping through your points ?
and i would set it true elsewhere other than on begin of tick
set it true when you start
and false when your done
thats a cool feature, ty for sharing
ok how do i check if its the end of spline
ok ill show you the full code
just the loop or how your traveling down this spline
i dont know where it is here is the full code
so is this starts right when you begin play ?
yes
because its event tick obviosuly
ya so i would start by doing a branch off the tick that only runs if that boolean is true
are you running this at begin play as an intro ?
its not an intro its just i have player start in my endless runner and i placed the spline there and i will change it later because this is not my main enviroment
so you definately want that branch at the beginning
and then switch it when you get to it or something
ok i will do a branch in the beginning and should i set it to false right after the spline movement finishes right
unfortunately it looks like you set it false on tick, and that would just shut the whole thing off
just switch it on and leave it on for now
you need to figure out how to know your at the end
maybe by using your x, y coords
Is it possible to attach something at a socket position rather than its root location? Not the item it's attaching to, I know you can pick an attach socket. But the actual item. For example if a player is picking up a gun, it attaches to the hand socket already. But how could I make the gun not attach at the root, but a specified socket on the gun as well?
ok
so that will switch it on and off with the branch
i would maybe check you location is at the end of the spline somehow
maybe with bounds
or use a collision box if you can
at the end, just when you hit it shut it off
and the same for start when you hit it turn it on
might work
you could also use a timer but then you would have to match it perfect and if you changed the thing you would then have to go in an find that magic number again
and probably with delta it would never be dead on
ok i will use overlap box
ya one at the beginning, one at the end, and then just switch the bool
basically i used event tick because the overlap box and the begin play didnt work so i had to use event tick
i mean it makes sense to have it on tick, you just want to be able to turn it on and off
and i also put the box in end and it didnt do anything unfortunatly
i set it here and on begin overlap i print the strin but still
should i make it in other actor
nothing printed ?
yes
hmm, so do you have collision set on your character properly, you bump into things ?
yea
hmm
is the Game state created after or before the level load ?
ok ill change it to other actor see if it works
something with your collision settings if it's not firing i would think
seems like this event tick cancel everything wtf
so it shuts off but you do other stuff on it as well ?
why are you using the spline tick for anything else ?
how do I zero out vector's up and down axis (specifically camera's forward vector)
or maybe the boolean is used for other stuff and you shut if off now it might mean more than it describes
i doutt my collision do anything to this because its the default one
Don't confuse a child class and a child actor component.
One is a definition of what something can be. The other is something that is attached to an actor.
wdym "zero out" these are by nature not 0
i need to make a trace in front of me even if my camera is pointing at the ground
should i use a mesh's forward vector
so trace from your character not the camera
yea it shut off only the animation still looping
but then i have to rotate it 90 degrees cause its off
its just for one thing
so how are you running, with play montage ?
yes
what does your anim bp look like ?
default one
but also #animation might know more about it
i don't use play montage very much i use a state machine for most of it so far i'm still learning
can you still move or are you supposed to be still moving ?
like is it supposed to auto move ?
Nvm, I used the mesh instead of the capsule
i dont think this is related it this because even if its still looping it cancel everything i dont think that
its auto move but i can still move using left ad right
so the collision never happened so it's still looping ?
or that works now ?
because if you don't shut it off it will still do what it was doing which is stick at the end
yea the animation still looping because i set it to loop again im sure that doesnt shut things off
so where do you actually move your character forward ?
if the collision works and the boolean is set then your probably using the boolean to move forward in general ?
which i would make another one for that seperate if so
i move it only using play montage i was using add movement input but it doesnt work with splines unfortunatly
here where you add movement is this the only place you do that ?
yea because if there is else the charcter wont move right
well you want to move the character forward even if your not on the spline right ?
it should auto move
so the spline stuff being switched off
that boolean is all you use to move forward
you want to do that all the time to keep moving
i would use a boolean on the character like isrunning or something
here is what play it
thats fun you want it to loop right ?
because you should be always running
yes
so think about it
your still running but not actually moving
you want to keep moving
that spot where you use that boolean get rid of it
just move the character
i would use a seperate variable for that to turn it on / off
will this pure function be called x times or only once ?
ok i will use seprate variable
like, does UE cache the result
i think it's called for every connection
part of what makes it kind of a performance hit sometimes
okay ty
oh i forgot i already used this seprate variable in te charcter blueprint and that didnt work
its just shut everything off even the overlap
the proplem is there is no alternative to event tick
timer by event
if you don't want to do it on tick
this way you can also just clear and invalidate the timer
np all done it won't run
ok ill try it
make an event that create the timer and runs a custom event, do the movement on the custom event, then on overlap of the end run a custom event that clears and invalidates timer by handle
so you just call the events to turn it on/off
but i still need delta seconds
well you don't need it, but you can get world delta seconds or something like that if you really want to
ok
but with a timer i think your fine its independent of the frame rate i think
if that shuts a lot of stuff off then that boolean is in the wrong place, you may want to call it gamerunning or something lol
or paused
as i thought it dont want to go over the spline the event tick is the only solution
sorry i i made you tired but i dont think there is a way out of this
you can do the same thing with a timer that you do on tick
and you just need some booleans in the right place
as far as "no way out of this" if you want to use tick go ahead
shutting it off should work fine
you just aren't moving your character like you want
if you want to keep him moving forward you need that programmed in it won't just happen
you'll also need to make sure the rotation is correct
so you head down the correct path
yea i want him to keep moving forward but i dont know how because event tick still shut things off
its correct
yea i used branch and boolean at the beggining of event tick
i c so you have it set to false add movement input and thats not working ?
yea
and also print string
so you didn't switch the boolean
if the print string doesn't show then it's still true when that code runs
you need to make sure the collision at the end happened and the proper boolean was switched to false
also instead of doing all the gets on tick, you can do the gets on begin play and cache them to variables
then just use the variables
unless your spawning them
in that case you would need to keep getting
i used also this on event begin play and splines dont work i dont really know why
you need either tick or timer for your code to work
yea i did tis before and still
hmm
if no print string then that boolean is true
so you didn't set it false
so somethings wrong
yea but the proplem is everything execpt the event tick wont make the charcter move along splines
and it works tho
so whats the actual problem ?
your not stopping at the end and keep running
I think mouse sytem uses Visibility channel
Try just not blocking that
the proplem is that it stuck in it place at the end of spline cuz i set it to the set relative location along the spline
because it reached the end
i dont also know why
it should work fine, i use it all the time
maybe you did something wrong but like i said before i wouldn't use relative anyway
as far as moving the character goes
you want the character to just move
yes
after it reached the end i want it to move freely
hmm
Then do that.
Event Reached End -> change some stuff to make movement free now
i'm still not sure if your overlaps events fired
yea it didnt
so theres the problem
the variable is still true
and your still ticking down the spline but your at the end
idk why your collision wouldn't work
I updated from 5.0 -> 5.3 when I try to build now I get this error
Error MSB3073 The command ""D:\Program Files\Epic Games\UE_5.3\Engine\Build\BatchFiles\Build.bat" VFX_Vault_5_0Editor Win64 Development -Project="E:\Users\user\Perforce\GTL\UE\GTL5_0\VFX_Vault_5_0.uproject" -WaitMutex -FromMsBuild" exited with code 6. VFX_Vault_5_0 C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44
any ideas?
cause im stumped, I've tried deleting all the intermediate files an such
maybe because of this event tick

the tick on the spline seems to work fine
you have a boolean that is a branch that runs on tick
did you do that ?
set it to false as default
yes
and see what happens
i did that
and what happens ?
nothing changes
the tick still runs ?
that makes no sense thats not how it works
what does your branch look like ?
or maybe you set it true somewhere in code
@frigid summitExplain from the top what you're trying to do. You have a character, and you want them to slide down a spline then hop off and get back to walking, right?
thats hard really to explain
ok so theres your problem
your setting it to true
then checking it
hmm
you are missing fundamentals
you don't want to set
you want to get
and plug that into the branch
you just set it true and checked if it was true
so do that and then set the default to false
and see what happens
you should hopefully run into it and turn it on, get to the end turn it off
but idk how collision will work with relative
you should be just fine with using world location
just set actor transform or something
Explain it anyway.
What game mechanic are you trying to make?
I'm guessing you want to have a character that can walk around, it touches spline, it gets yeeted down spline like on a track, and it pops off on the end and gets back to walking, is that right?
ok ok im trying to move the charcter along the spline and play anim montage and rotate if it reaches certain distance but the proplem is at the end it shut every single event off
this is the whole blueprint
i tried and still
are you still setting it to true on tick ?
What do you want to have happen at the end?
print string or anything but it doesnt even the box overlap
no
first make sure the overlap even works, just walk into the box and see if it triggers
but you shouldn't need a box, you can just check the distance along spline after moving too
The general form shoudl be like this, don't use a bool for state, use a character reference
yea i already did this
ya the length of the spline nice
the proplem here is im doing this on event tick
i feel like thats not a problem
thats not a problem