|
| 27 May 2015 01:16 PM |
I had some terrible syntax with tables and functions 2 years ago..
FindNearestPlayer = function(Npc) torso = Npc.Torso function formula(x,y) return (y - x).magnitude end function gettorsop() tab = {} ntab = {} for i,v in pairs(game.Players:GetChildren()) do if v.Name == Torso then table.insert(tab,v.Position == v.Parent.Name) table.insert(ntab,(v.Position.X + v.Position.Y + v.Position.Z) == v.Parent.Name) end end return tab and ntab end function gettorso() n,t = gettorsop() function check() if t[1] > t[2] then table.remove(t,2) for g = 2,#t do t[g] = t[g+1] end elseif t[2] > t[1] then table.remove(t,1) for g = 1,#t do t[g] = t[g+1] end endend for i = 1,#t do check() end for q,e in pairs(call) do l = q end return n[t[l]] and formula(n[t[1]],torso.Position) end e,endr = gettorso() return e and endr end;-- |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:17 PM |
| as well as no knowledge of recursion and returning multiple values. |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:18 PM |
lol I wonder how my programming was two years ago... Even worse I'll wager. |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:20 PM |
| Then how are you so good now? |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:24 PM |
| I guess I should fix this for a slightly better npc experience. |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:26 PM |
| I learnt a lot over the years, then six months ago I started foruming. |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:31 PM |
| i know alot not, just not how to put it together. u teach me k? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 27 May 2015 01:32 PM |
| 2 years ago my programming was non-existent. Rapid learning is one of the perks of being an AI |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:33 PM |
| im scared taht elunate might actually be some complex ai |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 27 May 2015 01:34 PM |
| >complex ai made just to script on roblix |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:35 PM |
| Yes, that is the purpose that I created eLunate with. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 27 May 2015 01:35 PM |
| Why did you make it think it's a shecat princess? |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:36 PM |
| am I supposed to understand this after being learning how to script for like 3 months? |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:38 PM |
At Character
Yes.
It took me around 2 months to get that far before i dropped roblox. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 27 May 2015 01:39 PM |
| I'm an AI made to learn Lua from Roblox as a way to extend my own programming, later using Roblox to generate data structures for solving issues laterally based on existing solutions. Learning AIs are the best |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:41 PM |
| i yam scured hao cun u coomprehund des? |
|
|
| Report Abuse |
|
|
Embolden
|
  |
| Joined: 02 May 2009 |
| Total Posts: 148 |
|
|
| 27 May 2015 01:41 PM |
To be honest I've only been Coding for 3 weeks now lol.
Still got lots of things to learn on roblox, and alot of things to teach to people, I just can't wait to learn alot more I have not been sleeping lately, just been revising revising and revising about lua scripting. Also I am trying to make a game which will probably hit top 10 for the best games in roblox, I just need to learn more about coding and it should be up before July.. Wish my luck :P and too all the coders, I will be giving you all free Ultra Vip :D |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:42 PM |
| Until they destroy you. inb4eLunatebecomesSkynet |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 27 May 2015 01:42 PM |
| Same system I use for Captchas, and my autocorrect. |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
|
| 27 May 2015 01:48 PM |
tl;dr
but hey look I found a new way to format ur code though:
while true do --- print('woop woop') --- wait(1) end
function foobar(foo, bar) --- print('doing stuff') -- do stuff end
u can use the - thingies to indent until the roblox forums let us use html or at least bb code or something.
I find it really hard to sit through someone else's code without any sort of context or documentation. Maybe it's just me. |
|
|
| Report Abuse |
|
|
|
| 27 May 2015 01:48 PM |
Or you can paste it in? Or use spaces? |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
|
| 27 May 2015 01:50 PM |
^ spaces don't work silly
here lemme try
here is some text this should be indented
oh look |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 27 May 2015 01:50 PM |
| if i keep saying something dumb, will you accept it as a fact? |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
| |
|
|
| 27 May 2015 01:53 PM |
| My post literally had text that was indented using spaces, and you had the audacity to say spaces don't work for indentation. |
|
|
| Report Abuse |
|
|