|
| 11 Jul 2012 06:58 PM |
Note: If you are willing to work to learn scripting, you MUST read all of this post, thus that complain that is to long is it there problem and I don't really care.
Learning goals for this chapter:
:Remove() :Clone() Parenting Linking Variables Notes
Chapter one: What is scripting?
Scripting is a bunch or codes or commands in the game that tells and does different actions when running. Scripting can accomplish anything and everything is possible with scripting, If you know how its works.
Chapter 2: Linking
Scripting is basically a locater that locates and does a specific action on the location. It’s like a chain that is connected with "."s
Let’s do an ensample
There is a house that is in a city which is in a country in the world. If we going to link to find your house we going to start with the main "location" that hold everything, in this case its "world"
And so we start linking like so...
World.Contry.City.House
Look over it and try to understand what I just did. This is a basic line to tell the script where is your house, knottiest the "."s to chain the linkage.
Now roblox games are the same idea. We have the "World" which is "game", and most of the stuff that you see on the screen is in "Workspace", which is the "Country", Models can be "Cities" and parts can be "Houses". But it all depends were each item is located.
Chapter 3: :remove()
:Remove() as you basically thinking and probably are right is to remove a specific item. This small line is just added to the location you linked, let’s say game.Workspace.Part, in this point you told the script to find part with is in workspace, to remove it just add the line :remove() at the end.
Chapter 4: :clone()
:clone() is the same idea like remove(), it just make a copy of an item that is located, but the action clone is much more complicated. When you make a clone, you need to set it a location, this called parent.
Chapter 5: Parenting
Parenting is to find a location to a specific object, Bu it also allow finding its parent or were the part is linked to. Parenting is extreme imported in clone action so the cloned parts will have a location to be, Example:
game.Workspace.Parent:Clone()
We cloned a part, now let’s set it a location to be, we simply use .Parent to set a new location.
game.Workspace.Parent:Clone().Parent
Now we need a "=" and set the new location
game.Workspace.Parent:Clone() = game.Workspace
Chapter 6: variables Variables are used to replace big lines in the script so it won’t be long and repetitive. Let’s say 1+1+1+1+1+1 =6 and we want to minimize its size, and then we use variables. X = 1+1+1+1+1 X + 1 = 6 This is useful in scripting, Ensample: a = game.Workspace a.Part:remove() a.Model:remove() Chapter 7: Notes
Sometimes is necessary to add notes to it will be user friendly or simply to find what each script is don’t, notes will have any effect for the script as only you can read it. Simply put "--" and the not you want to add.
--------------WELL DONE, YOU FINISHED THE FIRST CHAPTER---------------
If you reach and read fully this post until here and UNDERSTEND IT, then congratulation! You are now a basic scripter. This might not be much but you can do so many these with this. Later all add higher level scripting books for thus that interested.
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 06:59 PM |
try posting the wiki
~This sig is false~ |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 11 Jul 2012 06:59 PM |
World.Contry.City.House Should be World.Hemisphere.Continent.Country.State_Province.City.Street.House.Room |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 07:01 PM |
| WhiteRain, don't make it complicated, this is just an exsample to relate of. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 11 Jul 2012 07:02 PM |
| I know. I'm just bored. There were spelling and grammatical errors in here but... |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 07:03 PM |
| before i used words to fixed them you will QQ here and there. |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 11 Jul 2012 07:04 PM |
I believe the word that has evaded you is "Example" Oh @white if you were going to do that you might as well just use GPS coordinates considering some places are not states or countries. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 07:05 PM |
^ lol'd,you guys are amazing.. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
| |
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
| |
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 11 Jul 2012 07:08 PM |
| Also, why did you put :Remove() and not :Destroy()? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 07:09 PM |
| :Destroy() is used for not moving to nil which is in the next chapter |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 11 Jul 2012 07:33 PM |
Instead of :Remove you could just do: a = somerandomyobject a.Parent = nil |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 11 Jul 2012 07:35 PM |
| Also, there were 6 chapters.... |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 11 Jul 2012 07:56 PM |
I CAN CHANGE THE VARIABLES! chapters = {"Chapter1","Chapter2","Chapter3","Chapter4","Chapter5","Chapter6","Chapter7"} table.remove(chapters) print(#chapters)
output: "6" meh work here is done. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 04:06 AM |
| mamaguy dont post things i dont what others to learn in level one scripters. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 06:52 AM |
WhiteRain, actually...
World.Hemisphere.Continent.Country.State_Province.City.Street.House.Room
should be...
Universe.Galaxy.Planet.Hemisphere.Continent.Country.State_Province.County.City.Development.Street_Road_Boulevard_Way_Place_Alley_Circle.Property.House.Room.Bed.Matress
to make it really complicated, you are sleeping on the matress... |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
| |
|
|
| 12 Jul 2012 05:44 PM |
Lol, lots of typos..
My favorite was "knottiest" (notice).
And in the tutorial, he is cloning game, which cannot be done. So all readers, don't do that. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
| |
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 12 Jul 2012 07:04 PM |
| @Bunny, he may have had a part in workspace called parent and in that case the script would have errored. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2012 11:00 AM |
| but the script sees properties before parts. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2012 11:04 AM |
| Your a good scripting teacher, Nice job comparing scripting to real life. |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2012 11:36 AM |
| hey if u don't understand him just go to youtube and search:how to script on roblox for beginners 2012. click the one by Xx92jonny92xX |
|
|
| Report Abuse |
|
|