Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,256 --> 00:00:04,096
Rui to show our ability upgrade choices is
2
00:00:04,352 --> 00:00:06,912
Roughly in place but we still need to be a
3
00:00:07,168 --> 00:00:08,192
How to select an upgrade
4
00:00:08,448 --> 00:00:09,728
So let's get into it
5
00:00:09,984 --> 00:00:12,800
So go ahead and open up your upgrade screen
6
00:00:13,312 --> 00:00:17,408
And there is going to be a couple things that we need to do actually let's go had an upgrade
7
00:00:17,664 --> 00:00:19,712
What's an open H
8
00:00:19,968 --> 00:00:21,760
Ability upgrade car
9
00:00:22,016 --> 00:00:24,320
As well this is the first one that we're going to want to
10
00:00:24,832 --> 00:00:26,112
Open up that script
11
00:00:26,624 --> 00:00:30,208
And we got our loan function right here set ability upgrade
12
00:00:30,464 --> 00:00:31,744
Now what would you want to do
13
00:00:32,000 --> 00:00:33,536
Is there going to want to
14
00:00:33,792 --> 00:00:36,352
Can a signal that let us know
15
00:00:36,608 --> 00:00:37,120
That
16
00:00:37,376 --> 00:00:38,912
This ability was so
17
00:00:39,168 --> 00:00:41,984
In the basic way that we're going to get the story cos we're going to say
18
00:00:42,240 --> 00:00:44,288
If the player clicks on a car
19
00:00:44,800 --> 00:00:46,592
The knackered is going to be
20
00:00:46,848 --> 00:00:49,152
Chosen or that ability is going to be chosen
21
00:00:49,408 --> 00:00:50,944
And then we can
22
00:00:51,456 --> 00:00:53,760
Close the screen and continue on with the game
23
00:00:54,016 --> 00:00:56,832
So what we going to do is we need to detect
24
00:00:57,088 --> 00:00:57,856
If this card
25
00:00:58,112 --> 00:01:02,189
Incorrect fortunately control nodes come with a signal so if you select ability upgrade card and
26
00:01:02,191 --> 00:01:04,540
Subtitled by
online-courses.club
We compress knowledge for you!
27
00:01:04,540 --> 00:01:05,024
Innotab
28
00:01:05,280 --> 00:01:08,608
You can see that we have a gym input signal here
29
00:01:08,864 --> 00:01:09,632
Which we can
30
00:01:10,400 --> 00:01:13,728
So we're going to override the ready funk
31
00:01:14,240 --> 00:01:15,776
Underscore read
32
00:01:16,800 --> 00:01:18,848
And we are going to say
33
00:01:19,104 --> 00:01:20,128
Gym
34
00:01:20,640 --> 00:01:21,664
Dartconnect
35
00:01:22,944 --> 00:01:23,712
Gy
36
00:01:24,480 --> 00:01:24,992
In
37
00:01:25,760 --> 00:01:30,112
Ok let's Create that function at the bottom on gui input
38
00:01:31,136 --> 00:01:35,488
Add this as noted in the note tab on the left takes an input
39
00:01:35,744 --> 00:01:36,512
So let's ride
40
00:01:36,768 --> 00:01:37,280
Event
41
00:01:37,792 --> 00:01:38,560
In Britain
42
00:01:39,584 --> 00:01:42,912
And so let's just right passed here real quick so that we can talk about it
43
00:01:43,424 --> 00:01:48,032
So what do we need to do well we need to detect a mouse click how are we going to do that one
44
00:01:48,288 --> 00:01:51,360
This is going to be very similar to how we did
45
00:01:51,616 --> 00:01:53,408
The player movement where we detect
46
00:01:53,664 --> 00:01:54,688
If an action
47
00:01:54,944 --> 00:01:56,992
In our input map
48
00:01:57,248 --> 00:01:57,760
Why
49
00:01:58,272 --> 00:02:01,856
Done right so we have a bunch of events associated with actions
50
00:02:02,112 --> 00:02:03,648
And we can detect that
51
00:02:03,904 --> 00:02:05,952
By name rather than doing
52
00:02:06,208 --> 00:02:07,232
Checks first
53
00:02:07,488 --> 00:02:08,256
Mickey coding tool
54
00:02:08,512 --> 00:02:09,792
So detecting if we click
55
00:02:10,048 --> 00:02:12,864
Into this card is going to be very similar to how
56
00:02:13,120 --> 00:02:13,888
Did
57
00:02:14,144 --> 00:02:14,912
Player movement
58
00:02:15,424 --> 00:02:17,216
So let's go out an open project
59
00:02:17,472 --> 00:02:18,496
Project settings
60
00:02:19,008 --> 00:02:20,544
Go to the input
61
00:02:20,800 --> 00:02:23,360
Stop the tab and we're going to set up another input
62
00:02:23,616 --> 00:02:26,688
Which is going to be very similar and that's just going to be
63
00:02:27,200 --> 00:02:27,712
Click
64
00:02:27,968 --> 00:02:29,760
And let's go ahead and add any
65
00:02:30,272 --> 00:02:31,808
For the Leftwich
66
00:02:32,064 --> 00:02:33,344
What do the mouse button
67
00:02:33,856 --> 00:02:34,880
And I will do
68
00:02:35,136 --> 00:02:35,648
Mouse
69
00:02:36,160 --> 00:02:38,720
Adra default hair should be fine so I click ok
70
00:02:38,976 --> 00:02:40,000
Until there's are left
71
00:02:40,256 --> 00:02:43,072
So how we detect if this thing was
72
00:02:43,328 --> 00:02:45,376
Well in our own gym
73
00:02:45,888 --> 00:02:49,728
We can simply say if event dot is action press
74
00:02:50,240 --> 00:02:50,752
Left
75
00:02:51,776 --> 00:02:52,288
Ok
76
00:02:53,312 --> 00:02:57,664
This is pressed we are going to emit a signal now we don't have a signal define
77
00:02:57,920 --> 00:03:00,224
Define one of the top
78
00:03:00,480 --> 00:03:00,992
Signal
79
00:03:01,248 --> 00:03:02,784
Where they call it selective
80
00:03:03,808 --> 00:03:07,648
And then in our if block here we're just going to say selected
81
00:03:09,696 --> 00:03:10,208
Ok
82
00:03:10,464 --> 00:03:14,048
Somewhere knitting there so I can sing on now when this ability
83
00:03:14,304 --> 00:03:17,120
Is klekt however we need to listen for that on the upgrade
84
00:03:18,400 --> 00:03:20,192
Open up our upgrade screen
85
00:03:20,704 --> 00:03:23,520
Bye going to upgrade screen scene and clicking on
86
00:03:24,032 --> 00:03:24,544
The
87
00:03:24,800 --> 00:03:25,568
Skip button
88
00:03:25,824 --> 00:03:30,688
Any here we're creating this card instance right and so we can very easily
89
00:03:30,944 --> 00:03:33,248
Say card instance
90
00:03:34,272 --> 00:03:35,040
Select
91
00:03:35,552 --> 00:03:36,576
Dartconnect
92
00:03:37,088 --> 00:03:38,368
Since that is a signal now
93
00:03:38,624 --> 00:03:40,160
Connect on
94
00:03:40,416 --> 00:03:41,184
Ability
95
00:03:41,440 --> 00:03:43,744
Why we're going to call on upgrade select
96
00:03:44,000 --> 00:03:45,280
And we're going to use
97
00:03:45,536 --> 00:03:46,304
Bynes
98
00:03:46,560 --> 00:03:47,840
To be able to
99
00:03:48,096 --> 00:03:49,888
Track which ability was
100
00:03:50,144 --> 00:03:51,168
So they're buying
101
00:03:51,680 --> 00:03:53,216
If we open up our documentation
102
00:03:53,472 --> 00:03:54,496
Look for Kinect
103
00:03:55,008 --> 00:03:55,776
You can see that
104
00:03:56,032 --> 00:03:59,872
We can use this strategy right here so an example here it says
105
00:04:00,128 --> 00:04:02,176
I'm player hit.by
106
00:04:02,432 --> 00:04:02,944
And we can't
107
00:04:03,200 --> 00:04:04,224
Some vines in
108
00:04:04,736 --> 00:04:09,088
And that allows us to pass I retrieve arguments alongside the signal emission
109
00:04:09,344 --> 00:04:13,440
So if I go back to my upgrade screen what I can do is I can say on upgrades elected
110
00:04:13,696 --> 00:04:14,976
Bind
111
00:04:15,232 --> 00:04:17,791
And we're going to bind the upgrade
112
00:04:18,559 --> 00:04:19,327
That were passing
113
00:04:19,839 --> 00:04:21,375
So let's to find out funk
114
00:04:21,887 --> 00:04:23,167
Bank on
115
00:04:23,423 --> 00:04:24,191
Upgrade
116
00:04:24,703 --> 00:04:25,471
Selecting
117
00:04:25,727 --> 00:04:27,775
And then we're going to have our upgrade
118
00:04:28,031 --> 00:04:28,799
Ability
119
00:04:29,311 --> 00:04:29,823
Upgrade
120
00:04:30,079 --> 00:04:31,359
And then I'm just going to write
121
00:04:32,383 --> 00:04:33,663
So what's linger on
122
00:04:33,919 --> 00:04:34,687
For justice
123
00:04:35,199 --> 00:04:36,991
So we have in our
124
00:04:37,247 --> 00:04:39,295
Ability upgrade card is selected singer
125
00:04:39,551 --> 00:04:41,599
This does not have any arguments
126
00:04:41,855 --> 00:04:42,623
Or parameter
127
00:04:42,879 --> 00:04:43,903
Associated with it
128
00:04:44,159 --> 00:04:47,487
And when we were meeting nothing with it so it's just
129
00:04:47,743 --> 00:04:50,047
A blank event there's no data
130
00:04:50,303 --> 00:04:51,327
Coming along with you
131
00:04:51,839 --> 00:04:56,191
That presents a problem though when we are looking at our upgrade screen screw
132
00:04:56,447 --> 00:05:01,055
Because when an upgrade is elected we ideally want to be able to know
133
00:05:01,311 --> 00:05:02,079
Which up
134
00:05:02,335 --> 00:05:03,359
Specifically was
135
00:05:03,871 --> 00:05:05,919
And they were doing that is in the
136
00:05:06,175 --> 00:05:06,943
For Loop
137
00:05:07,455 --> 00:05:10,015
Where can I get into that selected signal
138
00:05:10,271 --> 00:05:10,783
The car
139
00:05:11,295 --> 00:05:12,319
And then we're connecting
140
00:05:12,575 --> 00:05:13,087
The
141
00:05:13,343 --> 00:05:14,623
On upgrade selected
142
00:05:14,879 --> 00:05:15,391
But
143
00:05:15,647 --> 00:05:17,951
We're attaching extra information to
144
00:05:18,207 --> 00:05:20,767
Which is the current upgrade that we are
145
00:05:21,023 --> 00:05:21,535
Looking
146
00:05:21,791 --> 00:05:22,303
In the
147
00:05:23,071 --> 00:05:24,351
Right so essential
148
00:05:24,607 --> 00:05:28,703
The selected signal does not have does that send any data by itself
149
00:05:28,959 --> 00:05:32,031
But by using the stop bind with upgrades
150
00:05:32,287 --> 00:05:33,311
We're going to be a
151
00:05:33,567 --> 00:05:35,103
To keep track of that
152
00:05:35,359 --> 00:05:37,151
How to make sense but you can see how this
153
00:05:37,663 --> 00:05:38,175
Real
154
00:05:38,431 --> 00:05:42,015
Quick and salt we're basically just going to pass another signal from here
155
00:05:42,527 --> 00:05:44,319
So I'm gonna do another singing
156
00:05:44,575 --> 00:05:45,855
And it's going to be cold ability
157
00:05:46,367 --> 00:05:47,903
Selected or rather
158
00:05:48,159 --> 00:05:48,927
Upgrade
159
00:05:49,439 --> 00:05:49,951
Selected
160
00:05:50,207 --> 00:05:52,255
And then we're going to pass in as an argument
161
00:05:52,767 --> 00:05:54,559
Same thing upgrade
162
00:05:55,327 --> 00:05:55,839
Inability
163
00:05:57,887 --> 00:05:59,679
And so we're going to replace this pathway
164
00:05:59,935 --> 00:06:00,959
Past weather
165
00:06:01,215 --> 00:06:02,495
With upgrades
166
00:06:03,007 --> 00:06:03,519
Select
167
00:06:03,775 --> 00:06:04,543
Gmail
168
00:06:04,799 --> 00:06:05,823
And then
169
00:06:06,079 --> 00:06:06,591
What three letter
170
00:06:07,871 --> 00:06:11,199
So why are we doing this nested select while because
171
00:06:11,455 --> 00:06:12,479
We want
172
00:06:12,735 --> 00:06:14,783
Which thing to be to have it owners
173
00:06:15,039 --> 00:06:15,551
Disability right
174
00:06:16,063 --> 00:06:18,367
So the card is just responsible for the taking
175
00:06:18,623 --> 00:06:20,415
It's been collected and also responsible ID
176
00:06:20,671 --> 00:06:22,207
For displaying the date
177
00:06:22,463 --> 00:06:26,815
Are upgrades screen is responsible for displaying all the abilities
178
00:06:27,327 --> 00:06:28,607
Supplied or chosen
179
00:06:28,863 --> 00:06:31,167
As well as telling us when ability was
180
00:06:31,679 --> 00:06:33,727
And then if we go back to upgrade
181
00:06:33,983 --> 00:06:35,263
Manager so let's go
182
00:06:35,519 --> 00:06:36,287
Control shift
183
00:06:36,543 --> 00:06:37,823
Search for upgrade Manor
184
00:06:38,079 --> 00:06:39,103
Go ahead and open up
185
00:06:39,359 --> 00:06:41,151
I'm here now we're going to listen to that
186
00:06:41,407 --> 00:06:42,687
Upgrade screen
187
00:06:42,943 --> 00:06:44,735
Upgrade select
188
00:06:45,759 --> 00:06:47,295
Single so upgrade
189
00:06:47,551 --> 00:06:48,319
Screen
190
00:06:50,111 --> 00:06:50,879
Ability
191
00:06:51,135 --> 00:06:53,695
Or sorry I keep saying ability this is up to
192
00:06:53,951 --> 00:06:54,463
Select
193
00:06:54,975 --> 00:06:55,999
Dartconnect
194
00:06:56,511 --> 00:06:57,791
On upgrade
195
00:06:58,303 --> 00:06:58,815
Select
196
00:07:00,863 --> 00:07:04,959
And then at the very bottom let's go out and create a definition for that funk
197
00:07:05,471 --> 00:07:07,007
Funk on upgrade
198
00:07:07,519 --> 00:07:08,031
Select
199
00:07:08,287 --> 00:07:11,615
And remember we're getting an upgrade which is an ability
200
00:07:11,871 --> 00:07:14,175
Grid as a parameter here
201
00:07:14,431 --> 00:07:17,503
And they were going to do or just going to call apply upgrade
202
00:07:19,295 --> 00:07:22,111
So you see how all that data is flowing now
203
00:07:22,367 --> 00:07:23,391
So we
204
00:07:23,647 --> 00:07:24,415
Just a retard
205
00:07:24,927 --> 00:07:28,255
We choose which upgrades you want to show on the upgrade Sky
206
00:07:28,767 --> 00:07:31,327
We instantiate the upgrade screen and add it as a child
207
00:07:31,583 --> 00:07:32,095
We
208
00:07:32,351 --> 00:07:33,119
Khaled ok
209
00:07:33,375 --> 00:07:35,423
Here are the upgrades I want to show
210
00:07:36,447 --> 00:07:37,727
Dinner upgrade screen
211
00:07:37,983 --> 00:07:41,823
We read through that supply the rear creating a card for each other
212
00:07:42,335 --> 00:07:43,615
And then making sure toucan
213
00:07:44,127 --> 00:07:44,895
To each car
214
00:07:45,407 --> 00:07:46,431
Selected syn
215
00:07:46,687 --> 00:07:48,223
Otherwise known as when we
216
00:07:48,735 --> 00:07:52,575
But also binding the upgrade that we are currently looking at
217
00:07:52,831 --> 00:07:53,855
When we're in
218
00:07:55,391 --> 00:07:56,671
When that single
219
00:07:57,951 --> 00:07:59,231
We also in
220
00:07:59,487 --> 00:08:03,071
The upgrade selected single passing along the upgrade that was
221
00:08:03,839 --> 00:08:06,143
Back to the upgrade manager
222
00:08:06,399 --> 00:08:06,911
Scene
223
00:08:07,167 --> 00:08:09,471
Where we can then officially
224
00:08:09,727 --> 00:08:12,543
To our current upgrades
225
00:08:13,055 --> 00:08:15,615
So sexually passing data into the upgrades
226
00:08:15,871 --> 00:08:18,431
And waiting for data to come back out of the oven
227
00:08:19,199 --> 00:08:20,735
Now there's one final thing that we were
228
00:08:21,503 --> 00:08:22,271
And that is we won
229
00:08:22,527 --> 00:08:24,063
Really upgrade screen
230
00:08:24,575 --> 00:08:25,087
When
231
00:08:25,343 --> 00:08:26,879
The upgrade was
232
00:08:27,391 --> 00:08:29,695
And the way that we're going to do that is really going to go back
233
00:08:29,951 --> 00:08:30,719
The upgrade Sky
234
00:08:30,975 --> 00:08:33,279
Script and we are going to
235
00:08:33,535 --> 00:08:36,095
Simply after the emission we're just going to queue
236
00:08:37,119 --> 00:08:39,423
So every select the upgrade Windows key free
237
00:08:39,679 --> 00:08:43,007
Now we don't want to do that without first unpausing
238
00:08:43,775 --> 00:08:45,311
So let's go ahead and highlight
239
00:08:45,567 --> 00:08:46,079
This
240
00:08:46,335 --> 00:08:48,127
Or copy this line in the ready method
241
00:08:48,383 --> 00:08:49,663
Put that just above
242
00:08:50,175 --> 00:08:50,943
The Q3
243
00:08:51,199 --> 00:08:51,967
And we'll set
244
00:08:52,479 --> 00:08:52,991
False
245
00:08:54,015 --> 00:08:57,087
Now just to make sure that our upgrade is indeed going to work
246
00:08:57,343 --> 00:08:58,879
What I'm going to do is I'm going
247
00:08:59,647 --> 00:09:01,951
Go back to our upgrade manager screen
248
00:09:02,207 --> 00:09:02,719
Honour
249
00:09:02,975 --> 00:09:03,487
Inside here
250
00:09:03,743 --> 00:09:05,535
And I'm just going to go ahead in print
251
00:09:06,559 --> 00:09:09,375
Current upgrades in our apply upgrade
252
00:09:09,631 --> 00:09:10,143
Method
253
00:09:10,399 --> 00:09:12,703
So let's see if all of this work
254
00:09:12,959 --> 00:09:13,983
So I'm going to go ahead and
255
00:09:14,239 --> 00:09:15,519
And collect a vile
256
00:09:16,543 --> 00:09:17,823
Ok so I've got
257
00:09:18,335 --> 00:09:20,639
The game is paused if I click everywhere else
258
00:09:20,895 --> 00:09:22,687
Nothing's happening but I clicked this
259
00:09:22,943 --> 00:09:25,503
The game starts again and then screen goes away
260
00:09:25,759 --> 00:09:27,551
And have a look at my output you can see
261
00:09:28,063 --> 00:09:29,855
This has been properly added
262
00:09:30,111 --> 00:09:30,879
To my
263
00:09:31,391 --> 00:09:32,671
Current upgrades
264
00:09:33,183 --> 00:09:34,719
So we've got EU I am please
265
00:09:35,231 --> 00:09:35,743
And
266
00:09:35,999 --> 00:09:39,583
The next step is to make the upgrade actually work
16805
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.