Thank you! What I needed in this video was "for each loop", if anyone else is wondering about it too.
@BigDOG63008 жыл бұрын
You deserve more views man, keep it up, its been such a help!
@dan3236093 жыл бұрын
The array already has the ability to randomize, there is no need to create a random int )
@李泊远7 жыл бұрын
Hi Mathew, I wonder how can you get a specific actor from get all actors. Can you add tags or names to one specific actor instead of using index number?
@hauntedshadowslegacy28264 жыл бұрын
ay, m8, think ya can tackle 'Get Actor Of Class'? Cuz it ain't the same as this node and I, for the life of me, can't figure out if it's what I need or not, and I don't really wanna spend the next three months or smth using a setup that's just gonna break everything. Basically, I have a parent class that's taking an event from an interaction interface, but I need those things it does to translate to the child actors. I wanna check which 'resource node' the player is interacting with and set a value on that resource node. I can access the 'resource node' type through a struct that I've already brought into the parent class, but how do I pick specifically the one the player is interacting with? (Doing 'nearest to player' won't work long-term cuz of how many resource nodes a player can have around them at any given time.) Until I either figure it out or find a better way, I'll keep doing other things, but having interactable, modular resource nodes is kinda important for my game.
@hdgdoomknight5926 жыл бұрын
In my game I have 2 generators, how do I cast to the generator closest to the character? Because I'm increasing it's value when I'm close to it but I can't cast to the right generator...
@sleeper_0008 жыл бұрын
Why don't you have more subscribers? Good video!
@NoPasaNada79 жыл бұрын
You are amazing, man. Love you videos ;)
@darikostov95836 жыл бұрын
How to get reference to new spawned actors
@troyhayder69863 жыл бұрын
Just like traces you should use it as sparingly as possible... Store the result in an array.. So you don't have to call it again.. Massive performance dip... If you were being clever you'd have a single get all actors of class actor.. Sort the results and add them to their own arrays... If you were even smarter you would give them a tag.. Get all actors with tag.. Once.. Then another identifier tag.. And add them to arrays for your usage..
@rifz425 жыл бұрын
great stuff!! I've been trying to use this to select target points for a "ai move to" waypoints but it does not pick them in a consistent order, it seem random.. is there a way to force it to use the World Outliner order?.. or is there another way to get the vector of a target point in the level? thank you!
@РикоКовальски4 жыл бұрын
try to create an array of points. Having reached one, give the command to go to the next element of the array.
@jesseyuen32386 жыл бұрын
Hey Making a very Complex game atm while learning this engine..... :) Gonna have Structs, Enums and datatables of char stats, Weapons Abilities, Booleans such as can be possessed by Demon. Now i made parent character BP, Using components such as one to handle Stats, one to handle damage, one to handle traps one to handle weapons. Doing it like this because it is gonna have a lot of upgrades in future. But now I finding it to be getting confusing..... Is this normal? Want to pull out my character creature type Enum from character datatable..... Match it with trap BP and pull out the trap Creature that can be trapped enum. If it matches, Character is trapped in the Trap! >< Shall i do trap component and attach on char or trap BP and cast to char or whatever? I might be just overthinking things though Thanks :)
@loudmounthartist2257 Жыл бұрын
Could you use this for ai move towards a object
@andytheodorko98744 жыл бұрын
How do I do this in c++? TArray foundEnemies; UGameplayStatics::GetAllActorsOfClass(GetWorld(), BP_APanel::StaticClass(), foundEnemies); says error C2653: 'UGameplayStatics': is not a class or namespace name
@screwfish38 жыл бұрын
Hi Matthew, Thanks for the tutorial - it's great. I have an enemy AI which I've put into an array targeting system which works great if all of the enemies are the same type. Although I'm a bit boggled on how to add multiple enemies to this targeting system, as they aren't all from the same blueprint. Hopefully this makes sense, I'm basically trying to understand how to make a targeting system go through multiple arrays to find the closest enemy, maybe that's even the wrong way of doing it! Any advice would really be appreciated. Thanks again.
@MathewWadsteinTutorials8 жыл бұрын
This would be a good reason to have a master "Parent" Blueprint you would use as your base for enemies that you would then make children for each different type. This would let you then get all of the enemies of this base class for example. Alternately when you are spawning in your AI you can add them to another list that is of type Actor or Pawn (the Parent for your enemies themselves right now) and then use that list as your master list of enemies. Keeping track of them this way as well might be better as you are not using the get all actors node during gameplay but just adding/removing from an existing list as you play. Alternately you could get all actors and filter by the tag? You can add an enemy tag to your enemy blueprints and then just see if the actor you are looking at has that tag. Alternately you could use something like a multi sphere trace to get all the items within a radius of you (instead of your get all actors) and then do your searching for the closest from there. Limiting your list of things to go thru to one array instead of more than 1 might be the easiest way to make this work =)
@screwfish38 жыл бұрын
Thanks for the quick reply Matthew. I'm going to have a look into the options you've suggested - hopefully I can get one working, then post a response for others. I didn't realise that a master blueprint could be created, that'll be my first attempt!
@MathewWadsteinTutorials8 жыл бұрын
Well hopefully it all works out well for you =) Technically you have already been using a master blueprint whenever you create a new one as whenever you choose your class (Actor, Character, Etc.) those are just pre defined classes that you are using as the parent and you are making a child from that. When you make say a base Enemy Blueprint the next time you create a new blueprint you can right click the Enemy and make a child from it or just make a new blueprint like normal and click the drop down arrow at the bottom and choose your Enemy as the parent to make it from =)
@screwfish38 жыл бұрын
I didn't realise you could do this, I made them all from scratch everytime... It's probably helped me totally grasp their scripts, but it would have been way quicker and better to make children for the targeting method. Thanks again, I'll definitely remember this for my next project!
@Latvian3Dman6 жыл бұрын
Hello, Lou. I know this thread is old, but I was searching similar question as you did. So, I wonder - did you succeed, and how exactly? :) Thanks.
@venomtailOG2 жыл бұрын
Error says "Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue". Node: Set Actor Location Graph: EventGraph Function: Execute Ubergraph BP Waypoint Blueprint: BP_Waypoint"