Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 8,079
» Latest member: seanac11
» Forum threads: 10,350
» Forum posts: 91,276
Full Statistics
|
Online Users |
There are currently 222 online users. » 0 Member(s) | 221 Guest(s) Bing
|
Latest Threads |
I'm leaving the site too....
Forum: 2DWorlds Discussion
Last Post: Jacob_
07-03-2023, 04:59 AM
» Replies: 12
» Views: 6,291
|
hi there.
Forum: 2DWorlds Discussion
Last Post: Jacob_
01-03-2020, 04:30 AM
» Replies: 1
» Views: 738
|
obroke
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 10:11 AM
» Replies: 0
» Views: 20,523
|
fcouldn't
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 09:02 AM
» Replies: 0
» Views: 8,230
|
qhow
Forum: Current Games
Last Post: PhilipShums
09-06-2017, 07:25 AM
» Replies: 0
» Views: 2,110
|
zstone
Forum: Current Games
Last Post: TimothyTox
09-06-2017, 07:03 AM
» Replies: 0
» Views: 977
|
vbit
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 03:00 AM
» Replies: 0
» Views: 960
|
sildenafil 100 mg sandoz
Forum: Current Games
Last Post: RichardLen
09-06-2017, 12:28 AM
» Replies: 0
» Views: 1,170
|
mhis
Forum: Current Games
Last Post: TimothyTox
09-05-2017, 04:09 PM
» Replies: 0
» Views: 985
|
sildenafil citrate 100mg ...
Forum: Current Games
Last Post: Waltertog
09-05-2017, 12:27 PM
» Replies: 0
» Views: 939
|
|
|
Duck's Scripting tutorial (Not finished) |
Posted by: Duck - 04-13-2011, 12:59 PM - Forum: Help
- Replies (6)
|
 |
This is a basic Lua tutorial for Buildism Lua.
==Getting set up==
To start off, go to the Buildism site and click the 'Lauch Editor' button in the top right.
So, let's start with the scripting console, click the lua icon near the bottom left of your Buildism client and it will appear. You can use it like a script, but it is only possible to write one line of lua.
So, let's start by inserting a box. Once you've drawn your box let's open the advanced tools. This is achieved by pressing the middle of the three tabs on the left of the client. From here try to find your box in the sidebar that appears. Once you've found it see if you can figure out how to rename it to 'ScriptBox'.
==Stage 1==
So, now we're going to use our scripting console. To locate the 'ScriptBox'. Follow the dotted line on the side of it in your panel, it should lead you to World. So we can write in our scripting console the following.
[lua]World.ScriptBox[/lua]
The '.' shows that ScriptBox is a child of World. This means that it is part of 'World'.
World is also a part of something else known as 'game'. So let's write in our command bar:
[lua]game.World.ScriptBox[/lua]
==Stage 2==
Now that we've located the ScriptBox in lua let's try doing something to it.
Try clicking it in that panel we opened up earlier (Advanced tools). Now let's look at the properties box (The one that pops up giving you information about the item you just selected)
So, let's start by editing a boolvalue. A boolvalue is either 'true' or 'false'. It is represented as a checkbox in the properties box. Let's 'lock' the ScriptBox. First we have to locate the 'Locked' property.
[lua]game.World.ScriptBox.Locked[/lua]
Now let's lock the box.
[lua]game.World.ScriptBox.Locked = true[/lua]
Now try and drag/resize the box. You can't. It's locked. To unlock it:
[lua]game.World.ScriptBox.Locked = false[/lua]
Now you should be able to move it.
A box has four other boolvalues. ShowBorder, Fixed, Collidable and CharacterCollide, they are all manipulated with lua in the same way as 'Locked'.
Now let's do IntValues. IntValues are number values. Let's play around with transparency. Try and use what you've learnt to make a block semi transparent (translucent). Try and do it yourself before you look at the answer below.
[lua]game.World.ScriptBox.Transparency = 0.5[/lua]
Finally we have stringvalues. The important thing to remember with stringvalues is that because it is a string it goes in quotes. So if we want to change our ScriptBox's name to NonScriptBox we can do the following.
game.World.ScriptBox.Name = "NonScriptBox"
Don't forget the quote marks!
Now we just have one last thing to do to our box, remove it!
[lua]game.World.NonScriptBox:remove()[/lua]
|
|
|
CleverBot is Awesome. |
Posted by: Brassrhino - 04-13-2011, 11:23 AM - Forum: General Discussion
- Replies (3)
|
 |
User: DERP.
CleverBot: Derp?
User: Yeah! DERP.
CleverBot: Derp?!
User: OYES.
CleverBot: So, ask me something. Anything you want.
User: ABCDEFGHIJKLMNOPQRSTUVWXYZ?
CleverBot: You don't know the alphabet lol.
|
|
|
|