Teach me some Lua :(

Here you can talk about everything you want.
User avatar
Lakan Haraya
Townsman
Reactions:
Posts: 43
Joined: Thu Mar 28, 2019 9:34
Location: Manila, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Teach me some Lua :(

#1

Post by Lakan Haraya » Fri Aug 09, 2019 17:32

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. :lua: :fire
Ako ang iyong Haráya
I am your Imagination

Founder of the first rebuilder-manufacturer of passenger-type jeepneys in TheoTown history.
____________________________
Taumbayan

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8182
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Phone model: Galaxy A50
Contact:

Platform

Plugin Creator

Re: Teach me some Lua :(

#2

Post by Ahmad Nur Aizat » Sat Aug 10, 2019 2:33

Uhhh, there already is a tutorial?

User avatar
CommanderABab
AB
Reactions:
Posts: 7878
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Teach me some Lua :(

#3

Post by CommanderABab » Sat Aug 10, 2019 3:23

Maybe you could show them where it is. :)
770!770Currently using alpha 770. 770 What's new? :)
Need plugins dialog!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8182
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Phone model: Galaxy A50
Contact:

Platform

Plugin Creator

Re: Teach me some Lua :(

#4

Post by Ahmad Nur Aizat » Sat Aug 10, 2019 7:44

CommanderABab wrote:
Sat Aug 10, 2019 3:23
Maybe you could show them where it is. :)
Here

User avatar
Lakan Haraya
Townsman
Reactions:
Posts: 43
Joined: Thu Mar 28, 2019 9:34
Location: Manila, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Teach me some Lua :(

#5

Post by Lakan Haraya » Sat Aug 10, 2019 10:09

Ahmad Nur Aizat wrote:
Sat Aug 10, 2019 7:44
CommanderABab wrote:
Sat Aug 10, 2019 3:23
Maybe you could show them where it is. :)
Here

How about the actual tutorials on other module stuffs like Builder, Util, Vector and more... That tutorial only shows a toast on each month :/
Ako ang iyong Haráya
I am your Imagination

Founder of the first rebuilder-manufacturer of passenger-type jeepneys in TheoTown history.
____________________________
Taumbayan

User avatar
JustAnyone
Junior Developer
Reactions:
Posts: 2677
Joined: Sun Jul 23, 2017 12:45
Location: No idea either
Plugins: Show
Phone model: Nokia 3310

Plugin Creator

Platform

Re: Teach me some Lua :(

#6

Post by JustAnyone » Sat Aug 10, 2019 22:16

No one has time.

User avatar
JustAnyone
Junior Developer
Reactions:
Posts: 2677
Joined: Sun Jul 23, 2017 12:45
Location: No idea either
Plugins: Show
Phone model: Nokia 3310

Plugin Creator

Platform

Re: Teach me some Lua :(

#7

Post by JustAnyone » Sat Aug 10, 2019 22:26

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()..'!'}
Picks a random item from array and displays it in a notification when this code is run.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1937
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Re: Teach me some Lua :(

#8

Post by KINGTUT10101 » Sat Oct 19, 2019 17:47

Is City.showNotification () a real thing? I can't seem to find it in the Lua document.

User avatar
JustAnyone
Junior Developer
Reactions:
Posts: 2677
Joined: Sun Jul 23, 2017 12:45
Location: No idea either
Plugins: Show
Phone model: Nokia 3310

Plugin Creator

Platform

Re: Teach me some Lua :(

#9

Post by JustAnyone » Sat Oct 19, 2019 23:12

It is, just undocumented.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1937
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Re: Teach me some Lua :(

#10

Post by KINGTUT10101 » Sun Oct 20, 2019 21:38

How does it work?

Imran M
Inhabitant of a Conurbation
Reactions:
Posts: 525
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Platform

Plugin Creator

Re: Teach me some Lua :(

#11

Post by Imran M » Fri Nov 01, 2019 19:38

ØlskenAnyone wrote:
Sat Aug 10, 2019 22:26

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()..'!'}
Picks a random item from array and displays it in a notification when this code is run.
Yes! Computer Science did actually have an impact! I can finally UNDERSTAND it!
https://m.youtube.com/watch?v=AqpYHdv3S00 gives 404 error.

Post Reply Previous topicNext topic

Return to “Smalltalk”

Who is online

Users browsing this forum: No registered users and 2 guests