oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:22 PM |
Language: Rbx.Lua (only) Level: supr hard!!11one!!1
Make a script that prints ALL BaseParts in workspace. Make it print that and _only_ that.
Rules: 1- Not allowed to create any new function. 2- Not allowed to use '=' sign. 3- Not allowed to put any new index in the environment table.
inb4morerules hope not ^ |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 10:23 PM |
| Define 'put any new index'? As in fenv, or create variables? |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 10:27 PM |
| game.Workspace:ClearAllChildren() |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 22 Mar 2013 10:31 PM |
for i, v in pairs(game.Workspace:GetChildren()) do v:IsA("BasePart") and print(v) or nil end
|
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:32 PM |
in any table* my small mistake
@pre
you're noob :( but lets say there were parts in workspace, kk. |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:33 PM |
@tenal
thats only print all baseparts in workspace. not what inside and inside annnd inside. |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 22 Mar 2013 10:34 PM |
| Exactly, you wanted all baseparts in workspace. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 10:34 PM |
Ya sorry :( I couldn't think of anything legitimate so... |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:37 PM |
| I want ALL, that's not all. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 10:39 PM |
loadstring([[ for _,v in next,(({...})[1]) do if v:IsA"BasePart" then print(v) end if #v:children()>0 then setfenv(1,getfenv(1))(v:children()) end end]])(workspace:children())
Prize pl0x. |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:40 PM |
loadstring creates new function
NoPrize Pl0x |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:41 PM |
Also please note to my small mistake in rule 3:
"3- Not allowed to put any new index in the environment table."
Fixed one: "3- Not allowed to put any new index in any table." |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 10:41 PM |
for _,v in next,(({...}) and ({...})[1] or workspace:children()) do if v:IsA"BasePart" then print(v) end if #v:children()>0 then setfenv(1,getfenv(1))(v:children()) end end
Prize pl0x. |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
| |
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:43 PM |
k rendersettings won.
my solution wuz:
for i,v in pairs((... or workspace):GetChildren()) do if v:IsA("BasePart") then print(v.Name) end setfenv(1,getfenv(1))(v) end
|
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:45 PM |
RenderSettings is noob for not giving my challenge even 15 min to survive.
:( |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 10:48 PM |
| If I didn't know about that quirk with setfenv from the script builder thread like a week ago I wouldn't have been able to do this =P I was thinking of using script.Disabled and a ObjectValue to save states if that didn't work. |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 10:50 PM |
Ya, julien is noob because he ruined some of my incoming challenges.
http://www.roblox.com/Forum/ShowPost.aspx?PostID=91398678
|
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 11:00 PM |
@Render
Also, you still need to beat the least characters possible challenge :p |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 11:01 PM |
| Do I? I thought I submitted a response and you never answered... |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 22 Mar 2013 11:04 PM |
I remember I replied and you never responded o-e
check your inbox |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 11:06 PM |
| Oh, yea. Ended with the depute over what 'generic for loop' entitled... |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2013 02:45 AM |
hi = "ok" function poop() print("ALL BaseParts in workspace.") end
while true do wait() poop() end
-- hurrr did i win |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 23 Mar 2013 03:08 AM |
My challenge idea:
Do it without touching setfenv/getfenv/_ENV...
Seriously, I think you can do it if you implement a stack using table functions (table.insert, table.remove), table.length).. Like, I'm fairly certain..
Actually... --> "3- Not allowed to put any new index in any table."
So actually, nope, probably not. :/
|
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 Mar 2013 05:22 AM |
Language: Rbx.Lua (only) Level: supr hard!!11one!!1
make air plane script
rules:
not aloud to use studio!!! not aloud to use object "script" most iposrtant but not least . do LUA controls auto
my solution:
instance.nwe('airplane').parent = workspace .name = 'snox airplane' .scriptobject = not script .size = (300, 30, 60)
airplane.velocity initiate()
airplane.controls:set#(CONTROL_TIEP_A.U.O.T.O)
airplane:mainloop.connect(fly); |
|
|
| Report Abuse |
|
|