User:Anaminus/Doc:ScriptBuilder: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker
rev vandalism
>Anaminus
Blanked the page
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Script Builder Help=


This is the basic documentation to the ever popular [http://www.roblox.com/Item.aspx?ID=113456 Script Builder].
__TOC__
==General==
These are the general commands used in script builder.
'''Location:''' <tt>//SB/</tt>
===Basic Commands===
{{User:Anaminus/Temp:Command|
name = Create
|command = create/''string''
|function = Creates a new script named ''string'', if ''string'' doesn't already exist.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Edit
|command = edit/''string''
|function = Enters edit mode with a script named ''string'', if it exists. You cannot go into edit mode if the script is already being edited. For more information on edit mode, see [[#Edit_Mode|Edit Mode Help]].
|}}<br>
{{User:Anaminus/Temp:Command|
name = Run
|command = run/''string''
|function = Runs a script named ''string'', if it exists. This will work even if the script has been run before. This will not work if the script is being edited.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Remove
|command = remove/''string''
|function = Removes a script named ''string'', if it exists.
|}}<br>
===Other Commands===
{{User:Anaminus/Temp:Command|
name = Get
|command = get/''string''
|function = Aquires and runs a premade script named ''string'', if it exists. For more information on premade scripts, see [[#Basic_Commands_3|Call Section]].
|}}<br>
{{User:Anaminus/Temp:Command|
name = Library
|command = library/
|function = Opens up the library for you to search through. For more information on the library, see [[#Library|Library Help]].
|}}<br>
{{User:Anaminus/Temp:Command|
name = Help
|command = help/[''string'']
|function = Runs in-game help. An optional argument specifies which section of help you would like to view. For more information, see [[#In-game_Help|In-Game Help]].
|}}<br>
==Edit Mode==
These commands are used while in edit mode.
'''Location:''' <tt>//SB/edit/</tt>
===Basic Commands===
{{User:Anaminus/Temp:Command|
name = Add Text
|command = ''string''
|function = Adds ''string'' as a new line in the script being edited (Simply saying something adds it to the script).
|}}<br>
{{User:Anaminus/Temp:Command|
name = Exit
|command = exit/
|function = Exits out of edit mode (this overrides the previous command, so it will not appear on your scirpt).
|}}<br>
===Other Commands===
{{User:Anaminus/Temp:Command|
name = Insert
|command = insert/''n''/''string''
|function = Insert ''string'' into line ''n'' of the script being edited.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Replace
|command = replace/''n''/''string''
|function = Replace line ''n'' of the script being edited with ''string''.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Remove
|command = remove/''n''
|function = Remove line ''n'' of the script being edited.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Recall
|command = recall/''n''
|function = Displays line ''n'' of the script being edited.
|}}<br>
==Library==
===Basic Commands===
These commands are used while browsing the library.
'''Location:''' <tt>//SB/library/</tt>
{{User:Anaminus/Temp:Command|
name = Script
|command = script/
|function = Enters the Script section of the library. This section lets you browse through the scripts created with script builder.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Call
|command = call/
|function = Enters the Call section of the library. This section lets you browse through the premade scripts that are called with the "get/" command.
|}}<br>
===Section Commands===
These commands are used while browsing the Script section or the Call section of the library.
'''Location:''' <tt>//SB/library/script/</tt> ''';''' <tt>//SB/library/call/</tt>
{{User:Anaminus/Temp:Command|
name = Next
|command = n/
|function = Views the next item in the current section.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Previous
|command = p/
|function = Views the previous item in the current section.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Total
|command = total/
|function = Show the total amount of items in the current section.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Exit
|command = exit/
|function = Exits out of the current section.
|}}<br>
==Tool Extension==
The tool extension helps you create a custom tool.
To make a custom tool, first create the script you want to use with it. (This will be the ''source'')
To run the tool extension, call "'''Tool'''" with the get/ command (get/Tool).
These commands are used while using the tool extension.
'''Location:''' <tt>//SB/library/call/Tool/</tt>
===Basic Commands===
{{User:Anaminus/Temp:Command|
name = Name
|command = name/''string''
|function = Sets the tool's name to ''string''.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Source
|command = source/''string''
|function = If a script named ''string'' exists, that script becomes the tool's source. This will replace the tool's source, if it exists, so there can be only one source per tool.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Create
|command = create/
|function = Creates the tool, adds it to your backpack, and exits out of the tool extension.
|}}<br>
{{User:Anaminus/Temp:Command|
name = Cancel
|command = cancel/
|function = Aborts operations and exits out the tool extension.
|}}<br>
==Global Functions==
These are global functions that are enabled in script builder.
You do '''not''' need to add functions to your script for these to work. You call them just like any other global function (print or wait).
'''Location:''' <tt>//_G/</tt>
===Remove(''object'')===
Removes ''object'' if it can legally be removed.
'''Note!''' You must specify the entire directory of the object if you want it to be removed!
<pre>
Remove(game.Workspace.Part.Script)
--> Works
game.Workspace.Part.Script:Remove()
--> Doesn't work
game.Workspace.Part.Remove(Script)
--> Doesn't work
game.Workspace.Part:Remove(Script)
--> Doesn't work.
s = game.Workspace.Part.Script
Remove(s)
--> Works
p = game.Workspace.Part
Remove(p.Script)
--> Works
p = game.Workspace.Part
p:Remove(Script)
--> Doesn't work
</pre>
Remove(''object'') replaces ''object'':Remove() or ''object''.Parent = nil
===Clone(''object'')===
Returns a clone of ''object'' if it can legally be cloned.
'''Note!''' You must specify the entire directory of the object if you want it to be cloned!
<pre>
c = Clone(game.Workspace.Part.Script)
--> Works
c = game.Workspace.Part.Script:Clone()
--> Doesn't work
c = game.Workspace.Part.Clone(Script)
--> Doesn't work
c = game.Workspace.Part:Clone(Script)
--> Doesn't work.
s = game.Workspace.Part.Script
c = Clone(s)
--> Works
p = game.Workspace.Part
c = Clone(p.Script)
--> Works
p = game.Workspace.Part
c = p:Clone(Script)
--> Doesn't work
Clone(game.Workspace.Part.Script).Parent = game.Workspace
--> Works
</pre>
Clone(''object'') replaces ''object'':Clone()
===SetSource(''script'',''source'')===
Sets the source of ''script'' to ''source''.
'''Note!''' You must specify the entire directory of the script if you want the source to be set!
<pre>
SetSource(game.Workspace.Part.Script,"-- Hello World!")
--> Works
game.Workspace.Part.Script.Source = "-- Hello World!"
--> Doesn't work
SetSource(game.Workspace.Part.Script,[[
print("Hello World!")
]])
--> Works
s = game.Workspace.Part.Script
SetSource(s,[[
print("Hello World!")
]])
--> Works
s = game.Workspace.Part.Script
s.Source = [[
print("Hello World!")
]]
--> Doesn't work
</pre>
SetSource(''script'',''source'') replaces ''script''.Source = ''source''
===GetSource(''script'')===
Returns the source of ''script''.
'''Note!''' You must specify the entire directory of the script if you want to get the source!
<pre>
source = GetSource(game.Workspace.Part.Script)
--> Works
source = game.Workspace.Part.Script.Source
--> Doesn't work
s = game.Workspace.Part.Script
source = GetSource(s)
--> Works
s = game.Workspace.Part.Script
source = s.Source
--> Doesn't work
</pre>
GetSource(''script'') replaces var = ''script''.Source
==In-game Help==
The following are optional arguments used with the help/''argument'' command..
'''Location:''' <tt>//SB/help/</tt>
{| class="wikitable" style="text-align:center" border="1"
|+Arguments
|-
! Argument !! Info !! Command
|-
! (none)
| General information. || help/
|-
! edit
| Information about edit mode. || help/edit
|-
! library
| Information about the library. || help/library
|-
! tool
| Information about the tool extension. || help/tool
|-
! global
| Information about the global functions. || help/global
|}

Latest revision as of 06:07, 5 May 2012