Arrays in the Battlefield 2042 Portal Logic Editor Explained! - Introducing Arrays Part 1
I know almost noone reads these things but I do write one for every video lol.
So, first, sorry about the big gap between videos. Things happened. Time passed. Plans got put to one side. Anyway, I finally finished this video last night (its just been waiting for a final edit..) and here it is. Hopefully this gives you a decent run down of how to get started with arrays. A couple of points I'd probably make about this video if you are reading that I think might be important.
First, it is a bit of an intermediate video. You can grasp this without too much experience but I have made a few assumptions about what you might already know about the logic editor (and I think that if you are looking at arrays you have probably moved past the basics). If you are not confident with the basics though you should probably watch one of my earlier videos first, just to familiarise yourself with it - a good place to start is probably here:
https://youtu.be/odXpQlGvq8c
This video introduced arrays, working through how to create your own, get and set values within them and iterate through them. It also looks at how you can reduce complex If/Selection structures in some cases by replacing multiple variables with a single array.
Next, a little side note for programmers. As this is a short video and I need to aim for total non programmers to understand, I have taken a few quick short cuts to help with visualisation. I think visualising an array as a table is a good place to start and to help beginners see in their mind what an array 'looks' like. Of course with my students we will talk about the structure of an array in memory, as we go on to discuss 2D, 3D arrays and how to best manipulate data in those. But clearly, here that is all rather unhelpful.
Second, I really think that arrays in Portal are more like lists. An array is usually fixed in size, with the size being stated when it is created. We shouldn't really be able to 'append' items to an array. But of course here we are really working with a list, which we can append to and remove from to make the structure grow and shrink as needed. I mean Python doesn't have arrays as such, but uses lists to perform the same function. It's not really a topic for here, more of an observation and point of clarification I guess.
Finally, all I really want is for you to watch the videos, press the like button and subscribe. I'm just really greatful for the support! However, if you want to give me a little more support while I am on the super long journey to 1000 subscribers then I really do love coffee (don't we all) and I've opened a little donation site to keep me chugging along. I'd be over the moon if you wanted to donate to my coffee fund and you can do just that at:
https://ko-fi.com/battlefielddad
Let me know how you get on with the challenges!
Chapters:
00:00 - Introduction
02:25 - What's the problem?
07:30 - What is an array?
09:25 - How to create an array in the Portal logic editor
16:22 - Using arrays in the Portal logic editor (examples)
20:37 - Iterating through an array
24:48 - Setting and getting items from an array
28:13 - Closing thoughts and challenges for you!
Other Videos By Battlefield Dad
Other Statistics
Battlefield 2042 Statistics For Battlefield Dad
At this time, Battlefield Dad has 84,930 views for Battlefield 2042 spread across 73 videos. His channel uploaded over 1 day worth of Battlefield 2042 videos, roughly 39.77% of the content that Battlefield Dad has uploaded to YouTube.