generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: TranslateBy() was locked

Previous Thread :: Next Thread 
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 09:32 PM
Does anybody know why it was?
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
03 Aug 2011 09:33 PM
Because Telamon is stupid and dumb and stupid.
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
03 Aug 2011 09:34 PM
^

~The Master~
Report Abuse
TheCapacitor is not online. TheCapacitor
Joined: 19 Jan 2011
Total Posts: 7045
03 Aug 2011 09:35 PM
function TranslateBy(Model, Vector)
Model:MoveTo(Model:GetModelCFrame().p + Vector)
end
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 09:36 PM
@Cap
Yeah I know, it's a huge pain replacing all of my TranslateBys though :/
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 09:36 PM
*facedesk*

Just insert that at the top or as a global function.

~"raycat" >Nyan expected, got ray
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 09:38 PM
Oh my god I'm such an idiot :\
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 09:39 PM
TROLOLOLOL

The other night I failed at using FORUM.RBX.Lua. I almost cried...

~"raycat" >Nyan expected, got ray
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 09:41 PM
lmao, I didn't actually read his post. I saw that he wrote TranslateBy( and then I saw MoveTo( and I assumed he had just written an example of each demonstrating they were the same. *headdesk*

Still though, it creates ambiguities with the humanoid's :MoveTo() does it not?
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
03 Aug 2011 09:49 PM
No...
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 09:49 PM
Humanoid ~= model. Right?? Therefore, no.

~"raycat" >Nyan expected, got ray
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 09:50 PM
I meant like in conversation, what are some other functions that share names?
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 09:51 PM
*methods

functions ~exist

~"raycat" >Nyan expected, got ray
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 09:53 PM
I'm sorry, methods.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
03 Aug 2011 09:57 PM
A method is the same a function, but the former is object oriented.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 09:59 PM
:ST00F() == method. functions are just methods in function form :P

~"raycat" >Nyan expected, got ray
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 10:02 PM
So I was right then, I meant both.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 10:03 PM
roblox doesn't have explicit functions with double meanings... Only with methods really. They define some things in method form normally and like strings/math/tables in function formatting. So the function ones, not really, theyre explicit.

~"raycat" >Nyan expected, got ray
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
03 Aug 2011 10:04 PM
":ST00F() == method. functions are just methods in function form :P"

no u. And that's wrong.

A method is a function, but a function isn't necessarily a method.

A method is just a function that is a member of an userdata and that is called in an object-oriented way. Using methods is considered a better programming practice than using functions.
Report Abuse
Avus is not online. Avus
Joined: 05 Aug 2009
Total Posts: 9768
03 Aug 2011 10:04 PM
Alright methods then, just answer the freaking question :U
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 10:09 PM
>functions are just methods in function form(at)
>functions are
>implying that functions can be exchanged from a method

>implying that I was right and now your just trolling

~"raycat" >Nyan expected, got ray
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
03 Aug 2011 10:14 PM
"roblox doesn't have explicit functions with double meanings... Only with methods really. They define some things in method form normally and like strings/math/tables in function formatting. So the function ones, not really, theyre explicit."

lrn2scriptyounoob

print("Hello")

That's a function.

game.Workspace.Part.Remove(game.Workspace.Part)

That's a function that is a member of an userdata/table.

game.Workspace.Part:Remove() or game.Workspace.Part.Remove(game.Workspace.Part)

That's a method.

Defining a function:

function remove(part)
part.Parent = nil
for i, child in next, part:GetChildren() do
remove(child)
end
end

called using remove(part)

Defining a function that is a member of a table:

Part = {
Parent = Workspace;
Name = "Part";
}

function Part.remove()
Part.Parent = nil
end

called using:
Part.remove()

Defining a method:

Part = {
Parent = Workspace;
Name = "Part";
}

function Part.remove(self)
self.Parent = nil
for i, child in next, self:GetChildren() do
child.remove(child)
end

SYNTACTIC SUGAR!!! :
function Part:remove() -- Assumes the self argument.
self.Parent = nil -- Where was self defined? Nowhere! It's assumed! =D
for i, child in next, self:GetChildren() do
child:remove()
end
end

Calling it using the syntactic sugar:
Part:remove()
Calling it using the normal syntax:
Part.remove(part)

Note that using the syntactic sugar is a preferred way of doing it, but both ways are still considered as methods and work the same way. You can even define it using the syntactic sugar and use it the normal way or define it using the normal way and call it using the syntactic sugar.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
03 Aug 2011 10:16 PM
I was saying that no functions that Roblox SETS IN STONE (aka the wiki's functions) have a second usage. Lrn2read nub.

~"raycat" >Nyan expected, got ray
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
03 Aug 2011 10:18 PM
:p
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
03 Aug 2011 10:19 PM
If you mean that you can't call a ROBLOX method both way, then you're wrong. Otherwise, I don't understand what you mean.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image