Page 1 of 1

Lua Videos posted

Posted: Mon Jan 21, 2019 3:31 am
by Whicker
I decided to make a video on some basics of using Lua... well, it went a little long. 59 minutes of pure gold. Well, maybe not gold, but for a total beginner it may be helpful. If you already know the basics of Lua/coding there may not be much in there for you.
Also went over a way to do scoring with a lua event. At the end went into the deep end of the Unit Wrapper. Also a bit on the luahistory file and snaketail log viewer. Not sure what the other 45 minutes are about. Should have broken them out into separate vids but so it goes.

https://youtu.be/eDlgkYDTbUQ

looping thru units in Lua - to change their mission or loadout. I learned a bit about this while making it, and it looks like checking for nil values (from units destroyed) may not be necessary any more due to better error handling in the game? I had been a bit confused about this before.
https://youtu.be/lLiykXLExBc

making a function in Lua
https://www.youtube.com/watch?v=je6rl0YFQ_I

Functions and Returning Values
https://youtu.be/CbX6OmIzsoA

Lua Tables
https://youtu.be/F3grnsGdD7A

Unit Wrapper in Depth
https://youtu.be/F5eVMhro9kY

Using lua to set a ship's path when leaving a semi landlocked port
https://youtu.be/rvxnZJio7ac

Using lua to change the waypoints of a course - addon to one above about ships leaving port
https://youtu.be/rC0fObbhNro

Using overlays
https://www.youtube.com/watch?v=Zjhm6eX9_gw

Hopefully they are of some use to some people out there! I highly recommend playing around with Lua, it can be fun/easy to work with (sometimes).

I also created a Videos page on CommandOps to keep them together:
https://commandops.github.io/videos/

RE: Lua Videos posted

Posted: Mon Jan 21, 2019 1:30 pm
by KnightHawk75
This is great. I suspect this is going to help a fair amount of people just starting out. Hopefully it demystifies some things for those not familiar with lua or general programming constructs who may have been holding off even trying.

Nice work sir, a definite plus for the games community.

RE: Lua Videos posted

Posted: Mon Jan 21, 2019 2:43 pm
by Whicker
Thanks!
I'm a little disappointed in the video quality - I think that is the first video I have made on my new monitor that is higher resolution than the video was produced at so it is a little fuzzy from getting resized. Just about everything that could have gone wrong did go wrong while making them.

RE: Lua Videos posted

Posted: Mon Jan 21, 2019 3:02 pm
by KnightHawk75
Seemed ok to me at least in 1080p full screen via YT, you live you learn, could maybe increase the font size in the console editor maybe for next time (console view menu zoom-in), may help a little when resizing. Keep it up!

RE: Lua Videos posted

Posted: Mon Jan 21, 2019 5:07 pm
by Gunner98
Great video

I've done quit a bit of Lua but mostly the 'hunt & peck' then call for help variety! This helps a lot.

Cheers

B

RE: Lua Videos posted

Posted: Thu Feb 07, 2019 3:28 am
by Whicker
added 2 other videos above - one on a basic function that was from a week or two ago and another one from today on using a function to return a value.

Any other ideas for a lua video? I think there is some basic stuff to get people on track there. Might do a few on creating a scen but just looking for idea for a Lua video at the moment.

RE: Lua Videos posted

Posted: Thu Feb 07, 2019 6:45 am
by Primarchx
These are great because it puts Lua in context with Command. I've been watching a bunch of Lua Tutorials but particularly like yours, Whicker, because it gives game-specific examples. Great job!

RE: Lua Videos posted

Posted: Fri Feb 08, 2019 8:18 pm
by KnightHawk75
Should probably be pinned, or maybe a link added in the resources pinned item.

RE: Lua Videos posted

Posted: Sat Feb 09, 2019 3:09 am
by Whicker
glutton for punishment, vid on tables added to the list above.

RE: Lua Videos posted

Posted: Sat Feb 09, 2019 2:51 pm
by Primarchx
Good info on the #table function with regard to custom element names vs standard, ordered references!

RE: Lua Videos posted

Posted: Sat Feb 09, 2019 8:44 pm
by Whicker
another one- going over the unit wrapper a little deeper.

RE: Lua Videos posted

Posted: Sun Feb 10, 2019 4:00 am
by KnightHawk75
Cool I'll check out the newly added content, thanks.

RE: Lua Videos posted

Posted: Mon Mar 11, 2019 2:11 am
by Whicker
added 3 more this weekend to the list in the first post - 2 on fixing ship path issues when leaving a port and one on overlays.

RE: Lua Videos posted

Posted: Wed Mar 13, 2019 2:04 am
by KnightHawk75
Nice I'll check them out tonight, but in advanced - thanks for doing more of these.

RE: Lua Videos posted

Posted: Sat May 25, 2019 7:23 pm
by kevinkins
How did I miss these? Thanks a million!

Kevin