Cookbook: Difference between revisions
>Camoy linked toc |
>Camoy linked toc |
(No difference)
|
Revision as of 15:08, 5 February 2011
RBX.Lua Cookbook
Author
The entire cookbook was written by Camoy.
Preface
The RBX framework for Lua provides an API (Application Programming Interface) for creating 3D games for the ROBLOX game. The API has a vast variety of functionality such as functions for moving in game players to properties controlling custom in game GUI. The API is easy to use and is quite powerful. This book will cover the basics of the framework and what you will need in order to start programming your own ROBLOX games.
Getting started is easy, just head on over to the download page in order to download the ROBLOX IDE (called Roblox Studio), and the browsing client.
This book assumes a prerequisite knowledge of Lua, however if you do not know Lua at all, don’t turn this book away yet. There are many good resources in learning Lua (one especially helpful resource is here). Even if you have no prior knowledge to Lua, in the early chapters, simple Lua syntax will be explained.
The documentation for the ROBLOX framework can be found at here, at the wiki. Under the “Building and Scripting” category, you will find a link to the “Scripting Reference” and the “Class Reference”. The “Scripting Reference” page is an index of the many scripting articles already written on the wiki site. You may find it useful to check out some of these articles as well. Under the “Class Reference” section, you will find all the ROBLOX objects and will be able to interactively explore their properties, methods, events, and general information. The ROBLOX IDE also has an “Object Browser” (found under Help --> Object Browser), however this is not as comprehensive as the wiki documentation.
In general, this book will provide solutions and examples of many types of problems you may need to solve when building a ROBLOX game. The difficulty level progresses as the book progresses. It is suggested that you read the book cover to back, however if there a certain solution that you need, feel free to jump to it.
Table of Contents
- Basics
- 1.0 Part Instantiation
- 1.1 Color and Transparency
- 1.2 Applying the Touched Event
- 1.3 Killing Players
- 1.4 Removing Limbs
- 1.5 Handling Non-Existent Objects
- 1.6 Creating a Kill Brick
- 1.7 Removing Multiple Limbs
- 1.8 Removing All Character Parts
- 1.9 Killing All Players
- 1.10 Killing Random Players on Interval
- 1.11 Using an Exception Table
- 1.12 Killing Spawning Characters
- 1.13 Creating a Message
- 1.14 Debounce
- 1.15 Creating a Clickable Part
- 1.16 Touch Activated Explosion
- 1.17 Dance Floor
- 1.18 Creating a Healing Part
- 1.19 Creating a Restricted Access Door
- 1.20 Creating an Invisibility Part
- 1.0 Part Instantiation
- Positioning
- 2.0 Positioning Types
- 2.1 Simple Part Positioning
- 2.2 Overlapping Positioning
- 2.3 Simple CFrame Positioning
- 2.4 Rotating Toward Another Position
- 2.5 Rotating in Radians
- 2.6 Rotating in Degrees
- 2.7 Relative Positioning
- 2.8 Getting Relative Position
- 2.9 Using the Rotational Matrix
- 2.10 Using Lerp
- 2.11 Simple GUI Positioning
- 2.12 Centering GUI
- 2.0 Positioning Types
- GUI
- Beyond the Basics
- 4.0 Using BrickColor
- 4.1 Using Color3
- 4.2 Using Base Classes
- 4.3 Using Enumerations
- 4.4 Event Members
- 4.5 Disconnecting a Connection
- 4.6 Using LocalScripts
- 4.7 Creating a Regeneration Button
- 4.8 Creating a Template
- 4.9 Creating a Leaderboard
- 4.10 Creating a Point Earning Button
- 4.11 Applying the Chatted Event
- 4.12 Applying the Changed Event
- 4.13 Applying the ChildAdded/Removing Event
- 4.14 Descendants
- 4.15 Creating a Marquee
- 4.16 Using a SpecialMesh
- 4.17 Using a VehicleSeat
- 4.18 Using Fire
- 4.0 Using BrickColor
- Tools and HopperBins
- Service Level
- Moving
- Miscellaneous