Teach me some Lua :(
- Lakan Haraya
- Metropolitan
- Reactions:
- Posts: 131
- Joined: 28 Mar 2019, 09:34
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Teach me some Lua :(
Hello! Does anyone here wants to teach me some lua stuffs I wanna make cool stuffs using that programming language. I visited the lua documentation by Lobby and didn't understand some functions and how they will run. I don't know what's the proper format for the codes :/ Please teach me, I wanna know.
- Ahmad Nur Aizat
- TheoTown Veteran
- Reactions:
- Posts: 8260
- Joined: 25 Oct 2016, 15:20
- Location: Johor Bahru
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Teach me some Lua :(
Uhhh, there already is a tutorial?
- CommanderABab
- AB
- Reactions:
- Posts: 11086
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Teach me some Lua :(
Maybe you could show them where it is.
- Ahmad Nur Aizat
- TheoTown Veteran
- Reactions:
- Posts: 8260
- Joined: 25 Oct 2016, 15:20
- Location: Johor Bahru
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
- Lakan Haraya
- Metropolitan
- Reactions:
- Posts: 131
- Joined: 28 Mar 2019, 09:34
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Teach me some Lua :(
How about the actual tutorials on other module stuffs like Builder, Util, Vector and more... That tutorial only shows a toast on each month :/
- JustAnyone
- Developer
- Reactions:
- Posts: 3474
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Teach me some Lua :(
No one has time.
- JustAnyone
- Developer
- Reactions:
- Posts: 3474
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Teach me some Lua :(
Code: Select all
local ja = Draft.getDraft('$car_pickle00'):getFrame(1) --arrays start at 1
local facts = Array{'2+2 is 4 -1 is 3 quick maths', 'TheoTown 69 is in production', 'Lobby and JustAnyone are the only developers currently working on the game'}
City.showNotification{icon=ja, showOnce=true, id="$factnotifierja222", text='Got a fact for ya:'..facts:pick()..'!'}
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2220
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Teach me some Lua :(
Is City.showNotification () a real thing? I can't seem to find it in the Lua document.
- JustAnyone
- Developer
- Reactions:
- Posts: 3474
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Teach me some Lua :(
It is, just undocumented.
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2220
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Teach me some Lua :(
How does it work?
- Imran M
- Inhabitant of a Country
- Reactions:
- Posts: 844
- Joined: 24 Oct 2018, 13:41
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Teach me some Lua :(
Yes! Computer Science did actually have an impact! I can finally UNDERSTAND it!ØlskenAnyone wrote: ↑10 Aug 2019, 22:26Picks a random item from array and displays it in a notification when this code is run.Code: Select all
local ja = Draft.getDraft('$car_pickle00'):getFrame(1) --arrays start at 1 local facts = Array{'2+2 is 4 -1 is 3 quick maths', 'TheoTown 69 is in production', 'Lobby and JustAnyone are the only developers currently working on the game'} City.showNotification{icon=ja, showOnce=true, id="$factnotifierja222", text='Got a fact for ya:'..facts:pick()..'!'}