#blueprint
402296 messages · Page 875 of 403
FYI you have one handful debugger that you can use in such case. The BP debugger(https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Debugging/) 🙂
Now just IK to the cursor hit location 😄
Can you make a c++ variable allow edit instance and edit defaults but not readable within blueprint so you can't touch the variables but you can set their initial values and have an overall default if the instance isn't modified. This would be a tmap so setting their defaults would be more ideal in blueprint not c++.
Yes
Just make it EditAnywhere or whatever edit modifier you want, and don't give it a BlueprintReadOnly or BlueprintReadWrite flag
You can even make it protected or such if you want, doesn't need to be public for Edit to work
Thanks Wizard!
https://cdn.discordapp.com/attachments/221798862938046464/961670741147918386/unknown.png
I assumed that this would print whatever is in
Content/StreamingAssets/PlayerData.json
But it gives me an emptry string aka {}. What am I missing here? 🙂
This is the PlayerData.json file:
{
"CharacterName":"TUGs",
"CharacterClass":0,
"Experience":0
}
is it possible to make a client specific event fire that isnt in any blueprint that is directly owned by the client?
namely i have this magical lute player that im trying to stream music through to other players and id like to use the lute BP itself to do all the logic for music playing. so the problem is if a new player enters the collision sphere how can i make a client only event fire only on that particualr client if the said event is inside the lute bp and not the player bp
When getting a substring, does Length specify the end digit pulled from the SourceString (i.e. if starting at zero, pull 0 & 1), or the overall count of the digits gotten (i.e. if starting at 0, pull 0)?
Most likely the overall count. If it was the other it would say end index. Easiest way is to just try it though
0, 1 will return 0 as the count is 1 starting at 0
so 0 is the 1st one
this should be a quick 30 second test to find out though, just print string with a word, and see what it outputs?
I recommend using breakpoints to step through the code https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Debugging/
That way you can find the check for sprinting that is failing
Thanks ! I will try this although new to UE4 tysm
Hey there! Is anyone having issues with loading and packaging Bluprint templates in ue5?
loading the FirstPerson Template I get this warning LogUObjectGlobals: Warning: Failed to find object 'Class None.Physics'
and I'm getting this error when trying to package the template on windows -
Have you tried doing what it says
did it prompt you to restart? and did you click that restart button? if so close the engine and relaunch it again
same results
will try again to double check but I tried restarting to apply cahnges and still the same issue
yup, same warning on project launch (#blueprint message) and same error and message when trying to package
@spark steppe
Thank you for the assist. You too @grand valve
i don't know of any solution then
i just had the same problem yesterday and a whole engine restart fixed it after updating the SDK
but that was on 5.1 and linux
hum, yeah
I also don't understand why there's that missing Physics class warning happends everytime the editor loads
did you migrate some old assets which had used physix?
nope, it happens literally everytime the editor runs
blank, projects, templates, etc
will try running a blank project without any starter content to see if the warning pops up still
hey there
anyone found a way to access Angular Rotation Offset?
yup, just loaded a blank project with no starter content and there is the class non.pyshics warning
also, this pop up also appears everytime a new project is opened, idk if it's a ue5 thing or just yet another issue -
I'm uninstalling all the Ue versions I have installed to try with just UE5 installed, IDK if that makes sense, but yeah, the packagin issues just make UE5 completely useless for me 😦
Hi. I need to copy the control rotation to my player, but I'm not sure how.
Control rotation goes like: 90, 0/360, 270. But player rotation is 90, 0, -90?
This setup currently works, but only between a very small range, so if I use my mouse extremely delicately to steer, it works great. But if I pitch up or down all the way, the player freaks out. How can I clamp the controller rotation to match up with the player? my brain is melting
Here is what it looks like. At the start I'm steering extremely delicately, then I move my mouse up and down to show the weirdness when you go outside that range that actually works
I just need to clamp/map range clamp it somehow but I dunno how.
Or limit the rotation of the player
Isnt this regular rotation issue ?
The transition between 0 and 359, picking the wrong way around etc?
Is the range 0-359?
For rots its 180 to -180 if im not mistaken
you are adding local rotation
every frame
so if your pitch is high
aka your mouse movements bigger
you start adding massive rotations per tick
thats why it works at small values but not at high
well first its worth asking if youve played around with the various settings on the pawn and movement components
you can use controller pitch and use controller yaw
that basically copies the pitch rotation of your controller to the pawn and therefore anything parented to the pawn like the capsule
Yep. I was previously using "use controller pitch". It worked perfectly, however it's way too missile-accurate and I want a bit of delay in my controls as the player is supposed to feel heavy. Is there a way to do that with "use controller pitch"?
That's why I was trying to do it with add local rotation
ah i understand, theres a ton of options in the pawn controllers etc, there might be something built in to handle that, what type of movement component u using here?
Like the movement mode?
like is this a character? or a pawn?
You could try using a scale to the inputaxis which lerps
Hey, so I had a BP class that wouldn't show the properties of a FloatingPawnMovement component (inherited) so I created a completely new class, which fixed it, but now editing any of the values doesn't change anything in-game... Ideas would be much appreciated
On and off.. would prob feel slow/sluggish
oh i see, yea it's a character
let me pop open unreal
these
use controller desired rotation is probably what you want, and then those xyz settings control how fast it can rotate every second
I tweaked around with those and they didn't seem to do anything, but I'll give it another shot
All you have to do is clamp the axis. There's a node for it if I'm not mistaken.
@red fossilMy bad. Wrong function. Normalize was the one I was after.
Ooh, where do I put that exactly?
To give background. Most functions process rotations as -180 to 180. Pitch is -90 to 90. But some getters can return in 0-360, specially after replication. These float axis are converted from floats, as 4 bytes to 1 or 2 bytes as uint8 or uint16, and then reconstructed back into a float after replication. This ends up leading to a rotation of -175 being set as 185. The idea is that if you rotate -175 or 185 on a 360 axis, you end up facing the same spot. So just clean the axis by normalizing it. This will convert your 355 into -5 for example.
I'm normalizing the input axis from the pitch controls?
Or the player controller rotation
Rotator itself should have a normalize function. Pretty sure it's BP exposed.
That kind of worked
It jitters a lot and it's inverted
😰
Am I supposed to do that while using Use Controller Pitch actually?
Oh Just looked at the function. Only read through the text. :D. This is also an issue with the rotation adding itself. Not sure you can do that directly off of control rotation unless you just want to lerp to the control rotation. Otherwise you'd need to delta each frame's control rotation change to get how much it changed this frame to add.
Deltaing the rotation basically means you would.. Create a Rotator. Delta the current control rotation from the cache value. Use that to add local rotation. Then set the cache value after that.
I might try what we were talking about earlier and just do 'use controller pitch'. I was trying something else because I want there to be input lag and not react instantly
So I'd need to delay that input somehow
did you try the settings i showed in the screenshot?
i think youll want to maybe turn off "usecontrollerpitch + yaw" in the pawn
and make sure you give the xyz values something greater than 0
or its instant i think
Is there a way to disable motion blur for specific material?
you'll want to ask in #graphics
Okay i have a weird bug right now...maybe somebody can help me out.
I am making a FPS atm and i can aim and everything.
Now i wanted to try out some stuff and duplicated my Character. Nearly everything works...but i cannot aim up and down while aiming. (right mouse button)
I did not change anything...just duplicated the BP-Class. I can aim up and down when not aiming. But while aiming i can only look left and right.
The Input of my mouse gets recognized and the InputAxis LookUp Event does give the right values.
I restarted the Engine, i copied the class again, but nothing works.
The old Char works as intended...Anybody here with an idea?
you probably need to set the new class up the project settings
but if I may ask, why duplicate?
I want to change some things in the code and try something out (new Inventory System). Creating a child worked, but i cannot remove inherited Components and overriding Functions would be a lot of hassle i guess.
Some weeks ago i could copy the Blueprint without issues to test some changes.
well the idea is that if you have a subclass (child blueprint) you decide which functionality you want to use, and which functionality that you don't want to use
Yeah i just wanted to change the "hard-coded" stuff like my Movementsystem and switch my InventoryComp.
But i found the issue...i have a cast node on my weapon BP....obviously that cast always failed.
Hey friends, Just posting my question here as well since its a bit more active than #virtual-reality . I am working on a pseudo VR project on iOS devices. I am trying to get an iPad to move my pawn as I physically walk around with the device as if it were a VR headset.
I have tried playing with the acceleration from the gyro to little success. I'm not really sure what my next steps are to try out.
@tame moat I worked on a project where we wanted to use an accelerometer to determine positional offsets, but was advised that this was basically impossible due to the noise it outputs. Not sure if an iPad is suitable for movement like that. I definitely can't say it's impossible, though
I know its somewhat possible thanks to the virtual camera plug in. But that is a remote camera example and on a completely different scale to what I am trying to do. Thanks anyhow, thats pretty much the same conclusion I am at right now.
I can find it. What kind of Blueprint are you in?
a pawn blueprint
Okay, just found it, you can't use inside functions
I was inside a function haha
oh ok cool
I'm trying to post my issue to the forums (dev community platform), but the form says I need to add the engine version tag. I don't see where to put that can anyone show me a printscreen on where to find the engine version tag to post in the forums questions?
Hey guys, so I'm using a GameInstance method of gathering a set variable from my Main Menu level, and bringing that into the game level itself. For my usecase I'm setting my weapon loadout. I'm just wondering, how can I do this in a more streamlined method, as in I add multiple weapons and wanna quickly bring them in. Can I use an enumerator, and if so how would I use that in this method? I.e the weapons are spawned based on the variable, and I can't set the same variable for all my loadout options, because they override eachother 😅
Hey, so I had a BP class that wouldn't show the properties of a FloatingPawnMovement component (inherited) so I created a completely new class, which fixed it, but now editing any of the values doesn't change anything in-game... Ideas would be much appreciated
correct, 4.27
Initially yes, but since then I've turned it off
All of them?
Even new ones I make?
I've restarted a bunch (not building from source code though)
I've deleted binaries, intermediate, etc. too
I was wondering if it was just a quirk of FloatingPawnMovement that BP edits just didn't override the cpp
But if I delete the file it should be good, right? Or is the project borked?
Much appreciated...
Separate issue, I have a camera component on a pawn that doesn't follow it until I select it in the world outliner and I don't know remotely why that would happen
How did you fix it?
Hello there, I think it's a dumb question but.. I have a BP that i want to instance, just like instanced static meshes (controlling the quantities, position etc), what should i use ?
I haven't yet... I think I just might edit the values in code. Are you seeing something similar?
No, I mean, you said you "fixed it" by creating a new class... I'm just wondering what exactly you did.
Oh! So before I wasn't able to see the properties of the component at all, and now I am after creating a new BP. But if I edit the properties nothing happens
Is there a way to return to another node so I can loop some parts of my blueprint? I tried googling it but I only receive things for the "return node" you use inside functions.
Oh so you literally just create a new BP class from the c++ class?
Yepp. A few times
Did you try adding your component to a UPROPERY?
UPROPERTY(VisibleAnywhere, BlueprintReadOnly) Something like that
Is there a way to check if a Sound Cue is set to Looping in Blueprints?
Can you give an example of what you're trying to accomplish?
Probably a long-shot, but does anyone here use the Blueprint Assist Plugin? If so, are you also having issues installing it to Unreal Engine 5? It just acts like nothing has happened when I do it. If I Install it to 4.27 it installs it as expected. 😐
can someone help? I cant seem to open up the console command using my keyboard
Editor Prefs > search console and edit the shortcut - my keyboard in my region doesn't allow to use the default ` as a shorcut as it's a combination
also you can go to Project prefs and edit the defaul console command for that project -> it allows you to launch everywhere even in dev builds of packaged projects with that last option
@sly heath I tried different keys and it wont work
I am using the source build of 4.27.2
tried it all it wont work
anyone knows a way to add custom versions of these "Sections"?
is that exposed to BPs? just a C++ thing? not doable?
Can't open the editor right now to check, but I think looping is a property of the Sound Wave asset, not the Sound Cue. So if that bool is accessible by BPs, you may have to do SoundCue->GetSound->bLooping
Can anyone help more?
Does anyone know if its possible to paint directly into terrain layers with construction script? Or is that only possible to overlay masks with a virtual texture? I'd like to avoid adding more virtual textures to the terrain material.
that's odd, I'm not sure then sorry :S
Hmm that doesn't seem to work either. I can't seem to get the sound wave from the cue even
```is what I'm currently doing
I have two problems. How do I get the Emitter to properly destroy itself when The character is done aiming? Also How do I get the Emitter to spawn faster instead of that wind up animation. I want it to spawn as soon as the hand is raised
This works! Didn't knew you could connect to earlier nodes.
I was trying to do sort of a Unity Coroutine, but I got it working :D
That's good to know, I'll search about it
They work normally with networking?
Yeah i'm trying to use construction script, but it's not clear wich node i should be using. Should i spawn child BP ?
ok will check
but i need every "spawn" to have an event graph
is this the right way around it ?
@trim matrix thanks for the answer btw 🙂
You can have a parent/generator BP with a construction script that loops calls to SpawnActor. You can set the spawned actor up there in your loop after you spawn it, or you can have the spawned BP set itself up in its BeginPlay event
Ok that's what i was looking for ! thanks !
What do Unreal devs have in common with casting directors?
...
...
...
We both hate child actors
I have an editable textbox on my start menu where the player enters a name for the character. How do I add restrictions such as letters only and a min/max number of characters?
I changed every icon setting for android. But game icon on android phone shows default icon
Where is that default icon at?
Sometimes being a fame in early age can led to some depressing evolution
Is it possible to return reference from blueprint macro?
See macaulay culkin.
lol discord scroll fail smh
I have an editable textbox on my start menu where the player enters a name for the character. How do I add restrictions such as letters only and a min/max number of characters? I was trying to add a >= length and then chop it from the left at a certain length, but it doesn't seem to allow that with an editable textbox. Is there another way?
Edit: Ok, I realised changing the textbox type fixed it!
I'm trying to replace the contents of a text box in a 3d widget in construction script, so I can see it in editor. I tried following this https://forums.unrealengine.com/t/how-to-cast-to-my-wbp-if-get-user-widget-object-is-no-longer-callable-from-construction-script/105738/6 but it doesn't seem to work, am I missing something? It seems to when I make a new blueprint and use the same widget class, but not when I try adding it to an existing blueprint
Hm during some tests it looks like my function is somehow calling, but it’s not redrawing the actual text on the screen
Im looking to Build a login system, right now im without a server im trying to save input string into a Datatable / CVS or file that can be read as json. My issue is that i understand that currently UE4.27 cannot Add rows by itself unless you do it in the editor. i want to be able to "create" by adding user / pass / email - save it for look up on a login pass. Im looking into VaRest. But im wondering if its possible to do inside Unreal?
So this also breaks in the new blueprint if I change the collision of the widget
Could someone point me out to a better third person walking system tutorial? I'm looking for something that could be more accurate kinda like the old Twinsen games.
My game is a thirdperson game but its ortographic so i need the movement to be very precise.
you have to do this first and then change the icon inside the engine
I already changed icon inside engine, what I do first? Clear it in the editor >> put in in the folder >> again change it on the editor?
Yes,First put your icon in the folder after that change icon in editor
In the editor, you also select the icon that you've just put in the folder.
Ok, will try now
Is there a better way to do a full auto weapon with line tracing instead of using handle event by timer? I'm doing it this way atm but if you just tap to fire nothing comes out due to the delay.
Not really. You just need to write a test at the button click. If Timer is Valid, just restart it with the current timer's remaining time. If no timer, then fire and start timer.
I'll give that a go then cheers
Hello, I'm attempting to implement a log sled like in the forest, but I'm having some difficulties attaching the sled to the player. Are there any suggestions?
sorry that this is so old, but how am i supposed to access things from each character?
If you make a character class, that derives from Character
And if you add specific variables to that class
If you want to access them, you need to cast to your specific subclass of character
so should i make a parent class for my characters?
no im assuming your characters already have their parent as "character"
need a bit of context, what are you trying to do?
basically the game allows you to select different characters but there is currently no parent class
so i basically can't cast anything to the character
have you built character blueprints?
yes
there's 2 separate blueprints that when the player presses a button in the UI, it will switch their character
Hmm, yea it is really helpful to have a proper class hierarchy
its common to have Character>YourCustomCharacter>YourSpecialCharacter1, 2, 3, etc
but what you probably want to do is
how can i access/make this?
switch character classes in this case
whenever you make a blueprint, you choose the parent. i would recommend making one blueprint from character
and then your next blueprints are made from that character you just made
so its like a tree
yeah i see
sorry for this 😄
when you say, "from character", do you mean the ThirdPersonBP?
mk
but if you want to change classes
you need to actually reference the class not the object
is there any difference with steam subsystem in 5.0 and the older versions or still same old method to get it working?
this is very basic code that would spawn a new character, and posses it
the purple pins in the spawn actor nodes are where you enter your specific subclass of character
so i've made 2 children of the parent character blueprint, can i use the method that you provided above?
yup
in the spawn actor nodes, you can use that purple drop down to find your 2 different blueprints
No, subclass Character itself. Or modify/rename ThirdPersonBP and make it your MyGameMasterCharacterClass
Either way the inheritence heirarchy for your final characters should go something like
Actor -> Pawn -> Character -> MyBaseCharacter -> MySniperCharacter
or whatever
Im running into an issue with my inputs. Currently I have my sprint bound to left shift and my flashlight toggle bound to F. The input action for flashlight toggle calls perfectly fine while not running (i.e. not holding left shift), but once i start running, the toggle flashlight input is never recieved. But inputs for jump, and crouch will call fine while holding the sprint key. And on further investigation this only happens while toggle flashlight is bound to F. I cant just change it to something else, because I need players to be able to adjust keybinds
hm must be something built into the engine because it wokrs fine as a standalone game
yea, might be in the same way that Escape doesnt work well because it exits your PIE, might be bound somewhere else
it seems to recieve the release part of the flashlight toggle input
just not the pressed
very odd
maybe you released shift before you released F
https://www.reddit.com/r/unrealengine/comments/p3jiaa/toggle_flashlight_not_working_when_crouched/ seems like an engine thing. Found a similar post
1 vote and 5 comments so far on Reddit
Get player camera manager, set max and min view pitch
Where would I set it?
i think if you are in the pawn or player controller
begin play?
you can just right click and get player camera manager
and then from ther
you pull out and type set max and min view pitch
but if the question is when, thats up to you
probably at begin play if you want it to always be like that
or if you change a view mode
yup
Hmm
Maybe my issue isn't how far you can look down but the animation
for ex:
When you look down it's fine
but if you jump
The head goes further back and you can see below
if you are trying to make a true fps style game, your camera should be parented to your head
so your blueprint hierarchy should be like> CharacterMesh>Camera (Specify head socket)
are you sure you want a camera boom?
and camera boom is definitely parented to the head socket?
not just to the mesh?
hmm not sure, it should move with the head so it should raise the camera
but setting the pitch of the player camera manager should help so you cant look directly into your own neck
maybe your camera needs a bit of an offset
like so its put right around where his eyes are
i cant imagine his eyes are that far back when hes jumping like that
he shouldnt be able to see behind him 😄
yea if you just changed it to that I think thats more realistic and will help mitigate that issue
i still think the set min pitch is helpful so he cant quite look down 90 degrees
Hey guys, just so I know about it, why would one create these little things?
makes you bp look more tidy
Oh so it is indeed to organize it better?
yeah, it doesnt have any functionality other then rerouting the lines
When programming (and especially in BPs), it's very important to have very tidy, organized and easy to read & understand code. So that a week later, when coming back to the project you can read what it does, or share with others. Those nodes do exactly that -> help organize the nodes flow. I use them to avoid crossing execution flow lines as well as when a single node output is used for multiple (try not to go over a couple) inputs on other nodes.
That's awesome to know! I was avoid using it to organize my BP's because I wasn't very sure about what it does. Thank you again, guys :D
no problem!
Rapidly going insane. Please tell me why am i getting this? But, also, the slider works and changes the morph target
Blueprint Runtime Error: "Accessed None trying to read property cccref2". Node: Apply Morph Target Graph: EventGraph Function: Execute Ubergraph Customize Character Morphs WB Blueprint: CustomizeCharacterMorphs_WB
Disregard the stray node in the lower corner
is the event at the top happening before the other one, for sure?
How would I go about making an enemy hit you, the player loses health, and then repeats itself whilst the player is still in the box collider, sort of like a loop with a delay per hit, this is what I have but it doesnt work
apparently the function Apply Morph target is trying to access the variable and it's empty. Make sure it gets assigned before the function that uses it gets called. you can always double check printing the value, and avoid the error by validating it before using it
have event that damages actor in the bounds
on end overlap, clear and invalidate the timer
Alrighty Ill give it a go
btw you can use the built in damage system
apply damage for the causer and event any damage for the recipient
AFAIK yes, since it is called when the widget is created (Unless i misunderstand the way that works)
I was under the assumption that I was assigning it at widget creation.. seems this is not the way to do it though
In this case, while testing, i am just calling the widget from a key set in the character BP itself. I was able to assign the variable cccref2 directly from the component that is part of the characterBP, there in the characterBP as i called/created the widget on screen. I am still trying to wrap my mind around how/why, but it works this way. I think this is the way it is intended, i just do not yet understand it.
@sly heath Thank you
I'm trying to follow a tutorial from unreals learn site about ai and the ai isn't working. Anyone know why?
the get random reachable point in radius doesn't seem to work and it's just spitting out the actors location
Okay I must be misunderstanding something about ChildActorComponents. It says the Trigger component doesn't inherit from TriggerDispatcher, but it's an instance of KillableTrigger which does inherit from TriggerDispatcher!
You need to do a "Get Child Actor" from "Trigger" then feed that into the Cast and it should work.
Aw heck, so it does
Siiiiiick this works great now, thank you!
Code could still be cleaner but that's a tomorrow problem
Lol, I cant find my camera setup I want no where it must either be overly complex or not possible
how do I use ResolvedView.StereoPassIndex
it keeps only rendering to one eye or not at all
basically just how do I render a scene capture but VR
Hmm. Does Advanced Session finder in Blueprint Require filters? Keep getting 0 results
Is there a way to tell when the player has landed on X aka Planar Surface? I cant use mesh/material detection - I cant use if player has hit sth. because he can potentially fly against obstacles midair. Not sure what do atm
*im using the launch character node
trying to add item to stack if the item already exist, the number prints out 2 from print string but when i set the array element it sets it to 3 then works as it should goes to 4 then 5 etc, so in short in the stacking it is skipping 2 any help would be greatly appreciated if you need more info just ask
@vestal acorn there is an OnLanded event
Perfect, I will take a look 🙂 That would be a blessing
yay it works perfectly
quick question, when making a function library, who do i make a function that automatically passes in a "self" reference?
like this?
versus this
UFUNCTION(meta=(DefaultToSelf)) I think this?
oh- i meant in blueprints
https://gyazo.com/67f6d3370095fc27e02bf49d3850891c Why does this return 0 always.. in 5.0 btw
appid is set to spacewars, and subsystem is setup
May want to tryin #online-subsystems
Or just using a bad search phrase
Or so unique that nobody has thought about it
hi. what the meaning of this "On" here
is there a blueprint node that allows me to store and find the nearest vector from an array/binary search tree /set of vectors?
i'm trying to spawn enemies throughout my map efficiently
a brute force approach is super slow
or must i drop to C++?
I think theres a native node for closest distance
Find Nearest Actor
But for actor array
thats awesome oke
great
i hope they have a binary search implementation
trying to spawn enemies in a navigable volume is super inefficient by brute force
Can i have multiple FABRIK nodes to change my character anim depending on a conditon?
sad
find nearest actor doesnt use a BFS
it a for loop through the array.....
im making a multiplayer game and i forgot how to give each player its own health can anyone help?
ok thank yoiu
Guys, is it possible to open a pure function in VS? I click on it, and there are only Read C ++ symbols and that's it.
Hey all, I'm just wondering about the best way to go about making a wingsuit similar to the one in Just Cause? Do I add a constant force in the forward vector of the camera and somehow add drag to it to increase the velocity? if so what's the best way to implement drag?
I think I need the force added to be based off the current velocity of the character, but I'm unsure on what calculations I'll need to do here...
I made a basic interface, but I couldn't send the "message" through to the BP that implemented the interface. Out of pure frustration, I deleted the interface from the BP that sent the message, and then it worked. Why is this? Can't two BPs that implement the same interface communicate with each other?
Has anyone been able to get function parameter descriptions working? (UE5)
You mean hovering over pins to see what they're for?
They work just fine. KismetSystemLibrary has some good examples.
/**
* Creates a literal integer
* @param Value value to set the integer to
* @return The literal integer
*/
UFUNCTION(BlueprintPure, Category="Math|Integer", meta=(BlueprintThreadSafe))
static int32 MakeLiteralInt(int32 Value);
Oh
Try leaving the [in] thing out.
I copied the C++ one in a new BP function. Seems to work.
Why would it use a BFS, there's no graph to traverse. It's just a list of actors
yeah...
wouldve thought there exists a performant solution for spawning enemies in navigable areas
without havign to drop to C++
why is the capsule resizing is glitching mesh upward?
I was searching for collision and fatfingered n in here
why is the capsule resizing is glitching mesh upward?
my guess is that it penetrates the floor on resize which causes the body to rise up
I would try setting the location before resizing it?
you mean i should offset loc. of mesh first before capsule resizing
More likely, you should consider lerping the capsule's halfheight.
Or base the height off the height of the root bone
Some sort of vertical root motion!
Or add a socket to the top of the mesh and use that socket's location to work out the height of the capsule.
Ok i wil do it.
If I want to finish a function, is it better to change it inside KismetLibraryFunction or create a new library with my own functions?
"finish" ?
Change
I wouldn't needlessly modify engine code.
is there a way to get the navigation mesh to not generate paths on top of meshes?
and only within
eg i have this map
its generating on the roofs
in addition to within the map
I would go out of my way not to modify engine code. Messes with project portability to newer engines.
Make a new library, don't touch the engine code unless you really know you need to.
NavmeshVolume
I just don't like that this function doesn't take into account max and min. That is, if Value=6, Min=0, Max=5 , then the function will return 1, but I would like it to be 0, since after 5, in fact, 0 should go. I finished it, but I don’t know whether to create a C ++ Function Library or a Blueprint Function Library, it’s just that there are two While loops and it’s possible that this function will work slowly on Blueprint
Don't worry about optimisation until you need to.
Navmesh volume is used to mark out what you want navigation to even consider. The navmesh on the roof is no problem though, it's just technically walkable if a pawn ever got up there.
Just make the function library, you'd be done by now if you just went and did it.
You could add blocker volumes
What function anyway
The function is ready in both C++ and Blueprint, I ask about where it is better to store it in a Library Function created in C++ or Blueprint?
C++, you can call it from BP
Wrap
Isn't that just modulo?
No
With value=6, min=0 and max=5, the output of 1 sounds correct.
It return wrapped value between A and B (if value = 6,A = 0,B = 5 it return 1,but but logically they had to add inclusive max and inclusive min so that it would return 0, because element 6 is essentially 0 0 1 2 3 4 5 0
That's just a decorated modulo
With a bit of extra functionality.
I mean it's ass backwards to have 6 map to 0 and not 1 but if that's what you want.
so why didn't they add the ability to include max and min? So that for example, with a value of 6, min is returned
while (EndVal < Min)
{
EndVal += Size;
}
while (EndVal > Max)
{
EndVal -= Size;
}
return EndVal;```
This is what it does.
I know
It is entirely correct 😦
A Value of 6 is outside of the range so why should Min be returned?
WTF is this function?
Like what is the use case for this
Yes
I lazily used the Min one (while < 0 ++array size) once
WrappedArrayIndex = RawArrayIndex % ArraySize
For an array of size 3,
Inputs 0,1,2,3,4,5,6,7,8
Outputs 0,1,2,0,1,2,0,1,2
I don't trust c++ to do that correctly with negative numbers. Even if I tested it.
yeah negatives you gotta be more careful
That's why I used the while loop for negatives, but modulo for positives!
Presuming you wanted the same functionality. I'd have just bool switched. Abs it. Do math. return bWasNegative ? -ReturnValue : ReturnValue
Could probably do like array max - (abs(value) % array max) if negative
I couldn't be arsed to work spend 20s to work it out. 😛
Here is a version of this function, as for me it will be wider
I would sure as fuck not use a loop but you do you lol
(a%b + b)%b
That should handle negative a
I mean a lot of math is just loops in the deeper code. But someone already wrote that stuff, I don't want to. 😄
you after all did not consider that the index can go on the private party after all. For example 0 9 8 7
This is actually the correct equation.
Thanks
return Value % Max;``` will do for an array index wrapper.
Doesn't this also work branchless?
(a%b + b)%b
I suppose abs is safer as then you never % a negative
which can get weird on certain implementations
My concern is what will happen to modulo of negative values between implementations.
ye
Thanks Guys
I want to cast to another user widget to change a bool there. If i am correct i need an object but i don't know what object
@desert field I think you're mistaken on what casting does. It's a way to make sure that the object you're working with is the correct one, and to get access to its functions
IsGroundVisible sounds like a Gameplay option. Widgets shouldn't be dictating this state, just displaying it and maybe calling functions on the object it should exist in to change it.
anyone?
Common word to denote events, OnEnter, OnDeath
OnDeath, for instance, triggers when something dies.
hey guys how can I lunch as standalone my project directly using a shortcut on the desktop? I used to do this but I completely forget how to
thanks guys
Package your project?
no just to run it you know, a shortcut
You mean the editor?
Has any of you gone and updated one of your released projects? How painful is it? anything to keep in mind to future proof your code?
Then just open .uproject
Trying to convert some vehicles to Chaos, getting a null reference for "ChaosWheeledVehicleMovementComponent".
Blueprint parent is "WheeledVehiclePawn", it automatically adds "WheeledMovementComponent" component
But this component seems to reference two classes
I need to reference "ChaosWheeledVehicleMovementComponent", but it's referencing "VehicleMovementComp", am I missing something obvious?
Can't reference from the VehicleMovementComp either
Does somebody know how I can work with physics for procedural meshes? I was able to create and display a simply procedural mesh, but when I activate the "Simulate Physics" and set it to Mobility "Moveable" it remains static
Ah, easy fix, WheeledMovementComponent can cast to ChaosWheeledVehicleMovementComponent, the examples dont include this, but lets you access more detailed parameters
[question]
So in UE4's built in damage interface, you have Damage Type class. The class seem to not have much functionality and can't have any functions/variables. So what are you supposed to do with it?
I never gave it a thought and just use the base Damage Type class, then kinda hack my way from there. At least in the context of JRPG health system
Does anyone have a guide for how to make parts of your character movement into components? I'm trying to separate my movement system into a separate bp
Using Make Literal i can avoid creating extra variables. Its very useful.
Now i'm trying to do the same for Arrays? Like, make literal Array? I tried Make Array but i cant add anything to it using the ADD node. It just comes out with 0. Is this possible?
And how do i add Vectors to it from a for loop. For example. Im getting the locations of all my characters, and i need to store it in an array.
Yup its manual. Cant automate it with a loop. Thats the thing.
For that you need a variable vectir array
Cant get around it
It can be locally scoped tho, if thats the only place you need it
yup, im trying to avoid variables i have so many.
I have like 20 functions and 20 variables at least
nodes cant create local variables
locally scoped? I googled it, couldnt find much about it.
You mean a function with local variables?
Yeah
Thats no biggie. Consider doing them locals if they just need to exist within the function,
Otherwise organization is key (hint : category)
You can also do subcategories by using a vertical bar. For example "Category | Subcategory"
The tool I'm working on for real time physics building has 50 functions and 60 variables, most of which can be local.
I think I can get that down a bit at the end though.
No reason to reduce them just for the sake of reducing them, unless its a problem
Hi there! Could anyone a bit smarter than me help me out with some math calculations? 😅
I am trying to create a cell tower signal. The actors does a linetrace to the player to check the distance.
I want a "SignalOutput" variable between 100 and 0% based on the players location within the actors range.
If the player is within the first sphere(variable MinimumDistance is radius) the SignalOutput should always be 100%. After this, the SignalOutput should decrease until the player is outside the bounds.
I would greatly appreciate if anyone could spare some time to help me out with this 😄
% =1 - max(1, ((Distance - MinDistance) /(MaxDistance-MinDistance))?
% being value from 0 to 1
Why trace btw ?
Cant you just register overlap, and 'tell' them based on the distance ? No trace needed?
using a Cellular Interface 😄
There are probably a lot of better ways of doing this 😅
I did it this way because the SignalOutput percentage is a UI variable thats always displayed and updated on the screen. There are also multiple of these actors that communicate their range to the player. I guess the overlap event would only fire when entering and exiting the spheres?
These are also very big
You'd start a timer on first overlap
Updating it at some regular interval
0.5sec prob is fine
When the last listener leaves, stop the timer
SignalStrength = Distance < MinValue ? 1 : Distance > MaxValue ? 0 : 1.0 - (Distance - MinDistance) / (MaxDistance - MinDistance)
If there's several of these then you might want to aggregate the result
@gentle urchin That might be much better. Thanks.
@mental trellis @gentle urchin How would these calculations look in blueprint? 😅 🤣
Does BP even have an equivalent of the ternary operator?
Eh. I'd use branches. Max is just going to use a branch anyway.
And it should probably use clamp, not max
whats there to clamp
Its not going below 0 , then you're out of range
Select
So why double branch it
^^
I try to avoid selects personally, for things that run often or do a lot of math
True enough!
This doesnt qualify as either, but I still prefer not using it
I've given up on giving a shit about performance for the most part. Too many things to get done. If there's really a performance issue, reimplement it in a better way when it's working.
Just go from start :)
Hehe i havnt reached that stage yet.
Just optimized a radar setup, going from 1.8ms to 0.6ms for 20 widget/quest checks
Solid win
To be fair. 1.8 ms is pretty brutal.
It is indeed
I think .6 is to much aswell
So reducing the checks to only visible ones
0.5ms is distamce checks
Are you on UE5 yet?
Btw, this is how I add together all the values from the towers and arrive at a final value
Isnt there an avg node?
Wouldnt that be more accurate? Dunno how cellular signals work on that level tbh
Would signal strength really work like that?
I'm still waiting on them to fix the NiagaraUIPlugin, but once they do I need to reimplement my minimap thing in my personal project. 1800 UVindexed icons, updated every tick. 0.7ms total between tick and paint time. I'm expecting to have like 200 actual icons in game. 😄
Or would it just be the one with the largest strength?
So instead of Sum(str) it's Max(str)
Daym ! 200 icons at the same time?
I felt 20 was a stretch, most likely it'll be around 5-10 at the time
To much just becomes noise
At work we have like 450-1000 depending on map and enemy count. I figured 1800 was a good benchmark to start with for worst case scenario for a personal project.
Indeed it is ! Are you not calulating distances then? 😄
Not sure at all, could be it just picks the strongest one
Sounds reasonable
It wouldn't be a problem to change it to the strongest one instead, that would indeed make more sense
But I still need to know how to implement the math 😅
I guess this doesnt make to much sense?
Slightly, possibly
Nah. They're projected into the player camera's local space. Rotated and all. Basically the math is constructing an array of points each tick and a UV index array that matches it. And those are fed into a Niaraga system that runs on sprites. Whole system worked incredibly well in UE4. Plugin is still a little broken in 5.
I might actually go through it myself even if they fix it. They don't really follow conventions. A lot of int and C style casts everywhere.
Inwas gonna paste my formula but i used a math expression and different variable names 😅
In Niagara or that plugin?
Plugin. Not touching engine code. 😄
Hehe.
I was getting really worried that Niagara was programmed badly then.
I mean, the engine is a bit of a mess, but yeah.
Honestly, I respect the person's work. The plugin is fantastic. But their lack of UE code style is annoying.
I also wonder if Niagara is going to allow float vectors again.
What does it do, exactly?
Turns world locations into minimap locations and sprite uv data?
You might wanna expand in the internals of that node.
Can anyone help with this issue? I've been stuck for a day now lol
for a math expression ? 😮
He did say he was terrible at math and he wanted help converting it into nodes.
this is like copy pasteable, but alright
this is true
I had no clue you could do this in blueprint
Not sure if its needed here, was gonna test it but food arrived
Sushi > bp foolery
This is true.
This works!
I am definitely ordering sushi now.
is there a way to use GetRandomPointInNavigableRadius to ignore Nav_Obstacle places?
Don't tempt me with sushi guys
i have modifier volumes with Nav_Obstacle on the ceilings but they still spawn there
I'm pretty sure I single handedly keep my local sushi place in business.
I would still leave the trace but nice that its working
I'll look into the method you described
This will do for now, thanks a lot @gentle urchin @mental trellis !
No worries.
Wizards!
Wizards wear pointy hats !
I own a pointy hat.
Has any of you gone and updated one of your released projects? How painful is it? anything to keep in mind to future proof your code? What terminology should I look for on google?
You can package "dlc" releases if you just want to release an update or new content.
If you've got a system that can patch individual files, just rebuild project and upload it I guess.
Can this be done with a completely blueprint project?
anyone?
@fallen glade I haven't done it in a very long time, but I think so?
you could trace it and see what kind of navmesh uis underneat?
Tbh, I'm not even sure it's an option any more. I haven't done any games in UE since like 4.13.
Thank you for the info anyway, I appreciate it
No worries.
Aren't all black mages wizards?
I wonder if it's ment to be Vivi or just a generic bm
Would be to random if it was Vivi
ah good memories, I barely remember anything from it
nvm
Yearly replay
apparently theres a diff between obstacle and null xD
Obstacle is usually non traversable
You have too much free time l o l
I wish
Well I guess I do
Since i got time to hangout here all day long
That counts as working
It's from 8bit comics. You'd have to ask that dude.
generic then
Fiiiiiiiine
there we go. brain not working, it's min and not max, ofc
Sad, we only have Zidane somehow gained BP knowledge through the divine power
||Got bored after saving Gaia||
I've got a really simple question about blueprints that I can't seem to crack and could do with some help, is this the best place to ask that please?
Possibly
(Also nice pfp, I just finished FFIX again two weeks ago)
Basically I'm currently trying to get fog in my level that comes in and out throughout the duration of playing the game. I've got an ExponentialHeightFog in the map and when I adjust the settings in the details tab, it looks good. I just don't know how to adjust the fog via blueprints. Can anyone help please?
It's not actually letting me make a reference to the ExponentialHeightFog in the bp either and i'm not sure why. Any help would be grateful apprechiated please!
I think you can drag the fog in the level blueprint and play with it from there no?
I thought you could, but it's not letting me at all. Tried referencing but it doesn't show up, and even just directly dragging it but it still doesn't seem to work for some reason. Is there a way to manually reference something without relying on the context sensitive box?
do you have time for a screen share?
Yeah absolutely! which channel should I jump into?
just add me and i'll try to help
Thank you so much
Pretty sure you're trying to drag it into the wrong blueprint. Dragging it from the world outliner to the level blueprint will create a reference to it.
On a better note though. Systems like this are usually better done in actors that can get a global manager from game framework to run themselves based on values in that manager.
Is it possible create a variable that holds an interface's type?
For example here, I can choose the variable's type to be a class reference of an object type, but the interfaces don't have this menu level and only an object reference can be assigned (Red).
I mean, it checks out that I can't get a CLASS reference of it, since it's not a class, it's an interface, but what do I do if I want to use a cast node to an interface type that isn't known at compile time? (Blue)
Since interfaces ARE selectable in that class reference field of the cast node.
I just can't save them as a variable to pin into it.
Think of it like a generic<T> type. That's what I was going for here.
Still pretty new here, I'll look into macros then since I don't yet know what they are.
So there's no concept of generics in blueprints then?
But I take it that I could use CPP in that case, right?
Right 😄
is there a way to see that red debug line thing that goes between nodes but in the state machine
I really feel like anything named Playable Character Interface is leading into a bad territory.
Alright, thanks a lot for your help, gives me some directions to think about 🙂
@maiden wadi
Idea was just to interface inputs from the PlayerController to a generic Character that can be replaced at run time using slottable input modules.
So a IPlayableCharacter is an empty interface to indicate a Character that supports input, then different interfaces can be defined like IMovableCharacter that supports movement input or an IJumpableCharacter that supports jump inputs.
The modules just intercept the input based on the interfaces of the spawned Character and then activate the entry point using the interface "OnJumpInputDown"/"OnJumpInputUp"/"OnMoveInput" for instance.
which one is for simple translation movement
They still need to be plugged from the input into the CharacterMovement component though, that's what this is. Just replacing the input nodes with callable entry points so that the input isn't handled by the Character blueprint, but the CharacterController blueprint.
Yes, I could call the CharacterMovement component's method directly from the CharacterController, but like I said, the intention is to support dynamic replacement of Characters at runtime.
A wolf character that transforms into a bird character, for example. They'd both inherit Character, but I don't want any common base class between them as functionality can differ greatly between forms, I just want to be able to funnel the input to the ControlledPawn of the CharacterController in a generic manner and let them handle it there.
simple move to loacation
what are you trying to move?
But maybe I'm still overly complicating this.
I just started with Unreal a couple weeks ago coming from Unity, still figuring stuff out 🙂
How can I fix this error?
PIE: Error: Blueprint Runtime Error: "Attempted to access missing property 'Castle'. If this is a packaged/cooked build, are you attempting to use an editor-only property?". Blueprint: BTService_SetCastle Function: Execute Ubergraph BTService Set Castle Graph: EventGraph Node: Set Blackboard Value as Object
this is my service bp:
im trying to move character by keyboard and not mouse
The king and blackboard have an AActor* named "Castle"
what's your starting point? the third person project?
top down, i just started a while ago with unreal
mmm I'm actually not sure about what's the best way to make a character move through wasd in third person
https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/HowTo/CharacterMovement/#:~:text=Right click on the Event,on to the Event Graph. this should help
I meant from scratch but the link I posted has a breakdown, it's not too complicated @trim matrix just follow the instructions
Inheriting from Character class is also dead simple
thanks
You can bring in third person example and snatch the part for movement (and jumping, if necessary)
You can ignore the rest camera rotatiom
It was what I did when trying to make Vagrant Story clone a while ago
How did that go? great game that was
loved the art style
This is the reason why every actor has a transient InputComponent. You should never handle pawn specific controls in the controller.
To break things down, PlayerControllers have an array that actors can register their InputComponents on.
Unreal has a layer called SlateApplication. This processes inputs from the operating system. In the correct modes these inputs are sent to the PlayerController if no slate function handles the input. Like a widget that can stop all pawn movement when it's focused.
Each tick, the player controller gathers it's list of registered components and processes them in a specific order. This order is any specifically registered actor, then the Controller, then the Level Blueprint, and then the currently Possessed Pawn.
This is important to know for delegating controls to differing things correctly. Specifically in Pawn's cases. You can have a FlyerBase class that handles flying input. Another CharacterBase that handles character like input. Then it won't matter what you spawn or possess. Your controls end up delegated correctly.
What's a good way of getting Combat music active with multiple enemies in a scene, and reliably ending when no active enemies are left?
I was thinking of adding a count to gamemode or level, and incrementing it when an enemy goes active and reducing it when it dies or goes inactive. And have it play battle music if it's not 0
Yeah you could create some manager that the enemies talk to. The benefit of that is it could be more event driven; the manager will know the instant the state changes. Another approach is to have enemies tag themselves with an Actor Tag and your music manager checks how many actors with tag there are once per tempo event of choice to queue up a crossfade or stem. The latter is "lazier" but easier/foolproof.
Thinking about it some more, enemies could tag themselves and then notify a manager that there's a state change. That'd be a hybrid approach. No manual management of an array, and without the need for periodic checking.
Hello, working on my game I noticed that maybe I'm doing something wrong
Is it normal to have this much ammount of nodes
?
Yes
You can hide them away in functions or macro or subgraphs.
But that's not that many nodes at all.
@trim matrix division picture go go!
Oh thanks
I'm new to unreal so I had that question
Wait
That means that games like gears 5 have thousands of nodes?
Yeah it's not an alarming no. of nodes... Yet. Organization is a deep subject to look into and constantly experiment with. In addition to functions, macros, collapsed graphs and multiple graphs, you can also put functions into components, utilize class inheritance, etc
any ideas on how this could possibly always point from the character to what seems to be the world origin (0,0,0)? It's just multiplied by a regular float off-screen
Actor forward vector isn't a location. It's a normalized vector (length of 1) that just points in a direction
Add the actor location to the Line End
and that should fix it
ah, thanks, I'll try it
forward vector * a lot + actor location
so if I wanted to get a point just in front of a character I'd get their location multiplied by their forward vector?
Location + (forward vector * distance)
ah, right, that makes sense
thank you all, it's been a while since I vectored 😅 the 🤔 react was definitely warranted!
better to make a blueprint function, because spaghetti blueprint isn't really convinient
Hey everyone! im making agame like gta rn and am wondering if i can make a custom cursor for when my phone is being used etc ingame so i dont have to do loads of custom controls
If you were making a game onnthe scale of gears 5 in bp then yes, but you woukd likely want to use c++ for something like that
As well as bp*
Can you better explain what you mean?
What could be a reason that input will not be received on ActorComponent added to an Actor at runtime, but WILL work if the same ActorComponent was added to the same Actor at edit time?
that can't be real
https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/UserInterface/SetMouseCursorWidget/ <-- this is what i was looking for i think
Set Mouse Cursor Widget
Any way to read a curve without it being a variable?
well it's ubisoft so I wouldn't exactly call it classy
? que
if you're asking you have to make the curve a variable first, then that's only for curve assets
incidentally, BP only supports curve assets
in cpp you have non asset curves at your disposal
that would be nice to have
thanks!
Don't be such a square face.
What's a simple way to add knockback on hit?
hey does anyone know how to make a blueprint function library with a function that automatically passes a "this" reference from the caller?
like this:
i want it so i can make a cursor thats controlled by a xbox controller
this one didnt work
the compiler gave me an error/warning when i tried to abuse it. ignore and... use anyway?
Oh I meant how to push the PC or enemy away from them in world space. I tried Add Force and Movement Input but nobody is moving from those
Yeah they're characters
Setting new world location maybe?
is there a good tutorial that explains how to do a fps game with first person animations and weapon switching?
Ryan Laley does a good one
Why can't I find the "On Quit" or game exit event in blueprint?
As in the Quit Game call, or?
I need it to be an event that calls BEFORE the editor actually exit - I'm trying to debug some garbage collection issues that cause the game to hang/crash on exiting in the editor
specifically, it is something I'm doing with these nested widgets
Hey, can I somehow fire overlap/hit events on instanced static meshes?
Yes. They work the same as normal StaticMeshes.
I don't think so. I Try to fire overlap event on box collision, and It doesn't work
Im updating instances trasnform through "Update Instacne Transform" node
I don't see a BP available one. There's OnExit, but I don't think it's BP Accessible. Something like GameMode or GameState's Destroyed override should work in BP maybe.
They work the same way. If your ISM component isn't registering overlaps or hits, it's because the mesh you're using in it doesn't have collision geometry, or your Settings for Collision are off/wrong.
I use sphere from Editor Content, It has simple collision ofc. I turn on generate overlap and hit events
Hello, I have a question about inputAction events. I have a base class that implements inputAction Jump, and I would like its child class to do some extra stuff (so I don't check "override Parent Binding"). But instead of running the parent behavior and the child one when the button is pressed, it runs the child behavior twice. Am I missing something ? (overriding the parent bidding runs the child behavior once, as intended).
It's also the case with keyboard key events and custom events
Dunno. I assume so.
it wouldn't, no. you can run that fine
it's only if you reference something on the actor
Sorry I meant would it break in terms of an execution break, for debugging - and as far as I could tell, it won't
I don't know what you mean by that. like if you made a non dev build and didn't remove the node?
Dunno. Lemme test.
I mean I would assert that it doesn't break anything
otherwise labeling the node as a dev node would do nothing
if you still had to remove it for shipping builds
can't you add a call to the parent node?
Overlap events works, only when I add movement to my box collision. Weird for me
rightclick your input event node and check if theres "add call to parent", usually you want to do that to have control over the order of execution
Weird. BP Breakpoints don't hit, but IDE C++ ones do.
Hey guys, I have a very specific problem.
I want to spawn a blueprint actor using a reference from a CSV file.
I am trying to use the relative path of a BP Class as a class data type in a struct.
Can someone help me figure this out?
This is just one issue standing between me & a playable tonight!
E G G
any reason you're using strings here for the FName?
More curiously. Why is RandomEgg being set to itself?
I can change it to name, but the issue is, I am getting the proper class name, but for some reason, it isn't spawning.
if you debug it you'll likely see that the string doesn't contain the name exactly
I would suggest trying that with breakpoints
Right, my bad, was using it for something else earlier. Removed it.
I would start by putting a class directly into the spawn function. Make sure spawning is working as intended at all.
also a good point yeah
Start with settings like Always Spawn, etc.
Spawning is working as intended. I am getting the name of the class properly as well.
is there some hack where I could make a blueprint console event that I use to fire from the IDE?
Does IsValidClass return true?
i would also highly suggest to add a boolean return value "succeeded"
which you only set to true if you found a row with valid class, then you can use the result on a branch node and only spawn on success
This is how my excel looks
Not even sure how to make a BP Console event. They're excluded in shipping builds, so I've never used them outside of our cheat manager for dev testing at work, which are all C++ base.
Nope, it is failing.
Hmm. I can test in a minute.
Only works within function , not for these events it seems
That would be amazing!!
I found this on UE4's site, I don't know how can I access this. I am not able to find this node.
you don't want to use that
when you open the datatable asset, does it show the correct class?
Aaah, it shows class as none! Didn't notice that at all!
Is there a way I can make this work?
set it to something valid 😛
I really want to make a modular system. Yeah, but, how do I do that?
The data table is based on a manual excel file.
What should I put in the class field?
the reference to your blueprint
Currently I am using the relative path I got from the BP
you can most likely drag and drop it on the field
But, won't that be a manual thing then? Is there no way to automate this process?
That's the last option of course, what you suggested.
i don't know of any automation as data tables are kind of read only on runtime
you could use an string tho, and try to find the asset in the asset registry and derive it's class, but that's prone to failure
these eggs... do they really need a class for each on its own, or could you just initialize them with different parameters and stick to one class?
They should be pretty unique to not have a common base
Got it!
Figured it out, instead of putting the path, I am just using the BlueprintName_C
Added _C at the end, and it worked like a charm
ok, but still think about if you really need a class for each egg
things can get quite messy if you continue like this
as i'm certainly sure that one class would do the job
There is 1 parent class since the primary behaviour is the same. I just need to spawn specific eggs.
Also, UE4 crashed, now the problem that I had solved became unsolved again for some reason
what is specific about them? nothing that you can solve with variables in the base class?
I can do it from a base class, I was just experimenting this way. I can do a hacky thing very fast. Wanted to try my hands at csv imports
Not mesh, but class instead. I guess I will be setting classes manually then.
well, in my experience that works with CSV, you just have to be 100% sure that the asset class path is correct
It's mostly error prone if you rely on a human to fill it
True
Make a search folder funcction for meshes/classes 😄
Autofill the list with that
Finally got it, this is how it ended up looking. If it throws errors again, I am gonna simplify the system completely.
Had to throw in _C at the end of the name
he could generate the CSV from a script tho :>
yeah that's what I meant, if you fill it form code, it will be mostly fine, it's pretty much json then
on the other hand data tables aren't exactly what i would call the optimal solution for something like this
which makes me wonder if theres some c++ way to write to the asset, so you could fill it with a editor utility widget for example (well there certainly must be a way, the question is how much work it would be to implement it) 😄
why aren't you getting them by row name though, and then just using the class in the struct?
I tried, it wasn't working that way.
Also, I have a new problem now, Parent Class begin play not firing when child spawns.
that doesn't sound correct. it's likely the setup that was wrong
add parent call
Probably, at least it is working now.
How do I do that? Is there a node that I should be looking for?
right click on event > add parent call
Ohh, wasn't this supped to be default?
it's not a given no
I think you can also click the beginplay and select a bool not to override parent?
Or perhaps i recall incorrectly
Yeah im prob mixing with the input events
how do i modify the animation thats played during this input
In the animBP
modifying animations isn't really something you do outside of animations
well i dont get it how this template game has a predefined animation
i mean i only added inputs, but animations are working on their own
Check the SkeletalMeshComponent on the character. It'll have an AnimClass specified. If you open that up, it'll show you how it all works.
In short, it ticks and pulls data like the character's velocity. And it's state machine uses that to blend animations together.
is it read only ?
Click the magnifying glass.
It'll open your last touched content browser to that asset.
cant click anything inside
Are you currently playing in editor?
nope
i do have one net speed overlay
Its from dragging a panel
let me try again
ah that worked
i was dragging the details panel and it somehow disappeared, cant bring it back
okay i loaded default from window.
Yeah it can bug out like that some times
I can't even fathom what the rest of that logic is. But uh. You're never actually setting the health.
im new to unreal btw
is there anyway to get this to show back up to NONE? I think its focing all my game modes to TDM
Nothing is calling the cast, so the cast can never succeed to call SetHealth.
Just set it back to GameMode, or GameModeBase
not sure what you meant by that
Execution goes left to right. To call a node, you have to have a white execution line coming from some event into the left side of the node. It does stuff, then executes the white line(s) on the right side. You have no execution going into the left side of your cast, which is going into the left side of your SetHealth. This means that the cast is never called, which means that SetHealth is never called.
i got it, but i just die immediately when i press play
the AI was meant to do 1 damage, instead of full damage
What did you plug into it? What is the current logic flow?
plugged in the true branch from isoverlapping zombiehand
Likely the math function then. Currently you're setting Health = 1 - Health. So if health 1 or more, you'll have zero or negative health.
I think you're trying to set Health - DamageAmount = Health
interesting @maiden wadi how come when I use this node in my gamemode event handle starting new player it always starts my game in TDM? I was told I need this node for seamless travel and map changes
I don't think that node has anything to do with your game starting in TDM.
does the HUD bp health function affect this too?
No. That's just creating a percent out of your health value for the UI to display, it's not setting health again.
Is your default health value 125?
lemme check
Asking because normally you create a percent like that out of CurrentHealth / MaxHealth
So 80 CurrentHealth and 125 MaxHealth is 0.64 or 64%
weird, im only seeing the health set for death animation
What is Health's default value?
100
Divide by that then instead of 125 for the HUD function.
In your other function here. Do SetHealth = Health - 5
Since you said you want to take 5 damage per hit.
Any ideas why an ActorComponent with just a simple Input node will not have that node receive input if the component is added during runtime?
The component is added to the PlayerController actor. That one is receiving input. It also receives the input if I add this same component at edit time, just not if I add it with the Add Component by Class node.
Is there something I need to do to register ActorComponents to receive input? There's the Enable Input node, but the PlayerController already has input enabled.
It also doesn't need to be possessed, because it IS the PlayerController.
Any ideas?
Input on components is odd. Most likely this event is bound in the owner actor's inputcomponent. It may not automatically register at runtime creation as there is different code there. Does calling EnableInput in the component's beginplay work? It may reregister it's component's events.
still getting 1 shot :(
i did 5 second delay and it just kills the character immediately after 5 seconds
is there a tutorial on youtube for taking damage from AI i can follow?
It doesn't work, no.
Neither does DisableInput into an EnableInput.
It's worth noting that the same approach works on the player character IF I add the component before possessing it. If I possess it first then it won't recognize the inputs even after an unpossess->possess or disable->enable input.
2d sidescroller if that helps
idk why when I run the game with spawned Characters it prints on screen "Client 1 : Sandshark not using AIC_Sandshark!" even though that branch should never be even run on the client
ah unless the client is spawning enemies locally too so it has authority on them
Hey guys, I am really struggling to work this out and am hoping someone can help! I created a scene where I have a planet and asteroids around it. I have followed a tutorial to do it and have created blueprints for both the planet and the asteroids to constantly rotate. When I press 'play' they do in fact rotate. However I cannot workout how to create a level sequence and still have the asteroids and planet rotate.... does anyone know how I can achieve this? Thank you so much in advance! (attached is my event graph)
what node gets the character current movement speed
When I use "Does Socket Exist" on my skeletal mesh it returns true, but calling "Find Socket" returns null (same socket name, same skeletal mesh, and I can see that socket name in the mesh asset)???
is this in response to me?
no im just asking :p
Oh hahah sorry!
Its speed limit? Or its current speed aka velocity ?
current speed
so get velocity -> lenght
ok thankyou
thankyou
hmm
@gentle urchin so basically one of my jogging animations keeps playing even tho im still. i think it is happeneing because unless i stop holding shift the speed stays at 275 and my animation keeps going because of the blend space
how would i get around that
Sounds like you're not updating the velocity value ?
Or miss a transition for the animation state
if its a blendspace then my guess is the first one
how do I render to one eye? or at least set scene capture 2D to render vr
it doesnt get updated unless i let go of shift
but i need to hold shit to keep jogging
what is the best way to keep information like this stored? i tried Map Variables but thats just confusing
you should always read the velocity value anyways
i see
is there a better option than this ?
How are you planning to use the sequencer? Because when you record sequencer, you usually do it inside a game mode which means the actors will still Tick. If you want though, you can put have your actors "run construction script in sequencer" and then control their rotation time with keyframes. You just need to move your code around a bit
You could always just store an array of something
Like have index 0 be team1
Then to get the round number back just add 1 to the index
Otherwuse you could have an array of structs
I like the array of structs idea thank you
@maiden wadi thanks for your help, i somehow fixed it, just had to redo everything
I have the system working, but it's canned because it was originally for a game jam
Now I just repurpose it into my own game, mainly taking the attack range system
Hi, I am a beginner in blueprint so sorry if this is a dumb question :p
I made a double door blueprint and I got both doors to rotate using a timeline, but my question is how do I make my custom node trigger the animation of both doors at the same time? Right now I can only plug the custom event to one flip flop:
You can use a Sequence node to have 2 actions performed in order as a result of one execution pin.
@strong topaz
Nice, it works! Thanks alot!
Thank you so much VaSSiLi! That is really useful! How would i do the sequence inside a game mode?
I just wanna move an actor forward. should I just use moveactor on tick? or use a timeline on loop?
how big an array must be (of structs) until it becomes a problem?
i never go for each loop in it
Whats your intention for this sequence? Do you plan to use it in some gameplay or do you just want to do recordings with it?
Where should I as for UI help?
To record it yeah ☺ i am sorry if i am very un-informed in this!
I don't see a UI channel.
Have you tried a recording yet? because if you record a sequence using Movie Render Queue, to the best of my memory it should spin up a game instance which starts ticking "game" logic like anything that runs on tick
the best way to preview it is to put your level sequence into the world, which will create a level sequence actor, which has options like "auto play" and stuff. And if you hit play in editor, it should auto play that sequence. That should be doing more or less the same thing that the Movie Render Queue does
A timeline on loop is tick.
Hey, just getting started with UE4. hoping anyone can help me in the right direction here. I am trying to acces my enemy blueprint from the controller which the enemy uses.
get controlled pawn perhaps?
get controlled pawn uses a invalid target (none in my case) what should i use as target ?
the controller blueprint is not a pawnActionsComponent
what are you trying to do?
trying to call a function from my enemy controller that is in my enemy blueprint
anyone knows how i can reset my spring arm rotation to be the one as when i begin play? the idea is to when my character starts walking, having a smooth transition of "
use controller rotation yaw" (so the camera would smoothly move to the back of the character as it starts moving) - i cant find set target rotation on the spring arm, so im probably doing something wrong
maybe try "get owner" ?
think ive tried them all by now. seems like simple thing to accomplish, i tried following a youtube tutorial, but off cause he skipped the part where he created the reference to the enemy.
in the first place im unsure why ur using the enemy controller in the first place
if you just want it to attack the player, wouldnt be easier to just have that logic inside the enemy bp?
(which i guess it is, but the logic to tell it needs to attack, for instance)
Under normal circumstances, you rarely touch the AI controller classes. Most times AI logic like this is handled in behavior trees through BTTasks
You could use the ProjectileMovementComponent so you don't have to write your own movement scripts
yea idk, followed the UE4 toturial on behavior trees. and they uses a controller. dont know what the alternative is
BT's and BB's are probably not the easiest thing to get started with inside ue4
if u just need simple behaviours, id stick with blueprints
Ill try Movie render queue and see how that goes! Thank you so much
totally forgot that existed @earnest mango lol
What are tutorial's obsessions with controllers?