Hi everyone.
In this video we need to create a method to get on the command by the boss id okay with specific boss.
We have so many commands.
Okay, I want to use this a bit like that right here I will create a scene called Get commands.
Okay.
The command by boss.
All right.
Here I put the ball over here okay.
It will be enough.
And let me build a controller for that robot to the command controller.
And this thing.
Will be get command.
We need to change the UI Else a little bit right here.
We need to.
Please.
Their boss, Eddie Salas.
Who?
Actually are in command.
Slash.
Boss.
And.
Boss.
Okay.
How are the wheels?
The controller.
Like that.
And make sure we replace here.
Here.
Or here also.
And pass object array pi.
Okay.
That is not about boss array.
And after that, we need to find We must run.
This.
Oh, sorry.
We need to find the model.
We need to fight.
With the boss.
The boss?
Okay.
We need to find all the commands by the boss.
And I will return the boss to say what is the result?
Let's say right here, I will duplicate.
Gen the Earl, the last boss slot.
Let me, uh, get on, boss.
Mode over here.
And let me say right here.
We already got the boss, right?
We have a pattern.
And the next command.
Okay.
We need to somehow organize it a little bit.
Let me show you what I mean.
This is the the entire result, right?
Let me show you what I mean.
This is the result.
This is the array content.
So object.
Right?
What I want to do because this is the pattern I want, it will return for me the result like this.
Replace.
And with the replies right here it will contain Container.
The array of the object.
Let us.
Okay.
What it will return for me is the data structure.
Let us.
And with everything else over here, I will show you how we can customize that using the video.
Okay.
For example, I use a command name, user command, email or something like that.
We will customize that in the video.
But the structure right here, we need to somehow customize that in the survey.
Right okay.
We need to store the next thing right here.
Well let's close it.
Right here we have a file right.
And we need to boost over here.
To actually right here we can rely a little bit.
We can rely like we will use our okay.
We need to rely on the user command over here.
And.
Reply to users okay.
Reply to users.
Also.
What will I one more time?
Okay, let me say it again.
One a little bit.
Over here.
This is the structure.
Okay.
And first of all we need to view the replies.
And put this thing also okay.
That's the only we need to know.
deal with the submitted.
We don't care about that because we will fix that in the deal.
Okay.
But right now let me restructure.
Well, how to do that right now.
Firstly we have a post Athena.
We cannot link to convert it into a JavaScript object right now.
We will look through the boss.
Sorry, this is the command run UI name is.
Correct.
Okay, we did the command run here.
We need to jump it.
This is the root command which we.
This is not a parent command.
I will create some final result will be right now.
I will post the final result over here.
Okay, I will put the command.
If the command is not apparent, we will boost it up over here.
Okay.
We will create that.
And we need to initialize the replies with empty array.
So for that reason I will put over here replies to the right.
Okay.
After that, let me show you what is written.
I will return back the final result.
Also we should have a reply with empty array, right?
So here we can say we only have a pattern with Twitter replies okay, and we need to vote.
Else we need to vote if this will be the problem.
Okay, we need to bootstrap.
Is our replies right?
Let's see how we can do that.
Inside the final result.
We need to find command.
We need to find the object.
Okay.
Don't worry.
I will show you.
What exactly does it mean?
I will call the file root.
Okay.
I will call the final result profile.
This is a command line command, not, um.
Not all string equal with the command over here.
Not.
Not a little strange.
Okay.
So here we will need to put a question mark over here.
If we found the food.
Sorry.
The file route.
And the one.
With numerous replies.
Right.
Because this is the object, we will find this object over here.
And from this object, we will not reply.
And we need to boost the command over here.
So.
Let me test that and I will explain.
Okay.
You can say we already got a pattern over here with the same with the ID over here.
Okay.
That's what I need to do.
Well, with this logic, I want to find the object.
Have a probability.
Exactly the same with the root id.
Okay.
If you file, we will have a file root command.
And with that we need to turn it to use the command into the replies okay.
This is just a JavaScript knowledge.
Please read a little bit and I'm sure you will understand that okay.
So after that we will need to return the final result.
Ready for the code right?
Let me paste a little bit.
I will create another command.
Let's say right here.
I will boost apparent will be known.
And here will be known.
Command.
So okay with this but also let's say okay after that let me get the command again.
Okay.
We have a two object.
The first object will have a reply.
And this object right here reply will be empty right.
Let me, uh, got my ID right here and command 101.
Okay, this is for sure.
We will take up the command tool.
And reply to user.
I can, uh, I can mute my user over here.
Let me, uh.
Let me go away to some user.
Let me say, uh, is it.
Huh?
I think all I got is the the boss ID, so my bad, my bad.
Let me go away again.
With Eddie over here and say.
This is the boss.
Oh, I already got my inside boss.
I think we should copy the idea over here.
Right.
Let me.
Create one more.
Next thing.
We wait here.
Oh, sorry.
Over here.
You.
Rock.
Toe to toe.
And say.
Okay, let me get on command.
Now, the first one will be have one red light right with this thing.
It should have two replies.
One and two.
Okay, so that is.
That's the how it works, replies the content.
So two by one.
Two by two.
Okay, so.
That's for the video.
And I hope you understand the logic right here.
And I will see you in the next one.
To customize the video.