|
| 01 Jun 2012 11:13 AM |
I probably used the wrong terminology but whatever... Could I do this:
Lava = game.Workspace.Lava:GetChildren()
for i = 1, #Lava do Lava.Touched:connect(DEATH(hit)) end
If I can't do that, how could I do the same thing in another way?
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
| |
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Jun 2012 11:16 AM |
You also just make a function like:
for ______ do v.Touched:connect(function(p) --blah end) end
however doing ur way might look cleaner. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:22 AM |
Nickmaster
You could do that but it will error if anything in Lava is not a part. If it's a script or a model or something else, it will error because you can't touch those objects.
Lava = game.Workspace.Lava:GetChildren()
for i = 1, #Lava do if Lava[i]:IsA("Part") then--checks to see if it's a part. Lava[i].Touched:connect(DEATH(hit) --code end) end end
|
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:23 AM |
| miz whai r u pointing the obvious? |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Jun 2012 11:24 AM |
| Wat nick did is perfectly legitimate, ever tries haxy stuff to insert a part into a part? Yep :) |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2012 11:24 AM |
How would the function know what brick was touched?
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Jun 2012 11:24 AM |
| Typos, why do u love me? :( |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Jun 2012 11:25 AM |
| @nick: Checking positions, reache and such for parts (collision detection) on the C side and stuff liek dat :) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:27 AM |
@su8
Because no one pointed it out . . . |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:28 AM |
| nobody needs to point the obvious jerk |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:30 AM |
Ummm . . .
Yes they do? Because
1. What if he didn't know that?
2. What if he forgot and needed a memory?
3. What if someone else looked at this thread and didn't know that before?
|
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:31 AM |
no. he obviously know that you cant connect le touched event to other than partz |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Jun 2012 11:33 AM |
@su8: Unless u hax the metatables and change le connents and do haxy st00f so u can liek put it into other objects :DDD
M |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:39 AM |
"he obviously know that you cant connect le touched event to other than partz"
You obiously don't know how to help people. |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:39 AM |
better than you. you should leave baib ai |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:41 AM |
You think you help better then me? All you pretty much do is act like an idiot trolling here and when you see a problem you don't help, you be rude and put people down.
|
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:43 AM |
..that's my personallity.. i only help people with major problems not laik
"y this no worky qq game.me:god() " or "when do i know when to put function when i dont even know what it means" |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:44 AM |
That's your personality? Man, I feel bad for your parent then.
"y this no worky game.me:god() "
Of course you wouldn't help. I wouldn't help too because who ever wrote that didn't even try to make it work.
"When do I know when to put function when I don't eve know what it means"
"Even know what it means."
Can't you just say the definition of a function??? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:45 AM |
| he told me to get out so i cant say it |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:47 AM |
| So then why don't you get out instead of spamming his thread? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 01 Jun 2012 11:49 AM |
| well.. in theory im not inside anything so i can't get "out" |
|
|
| Report Abuse |
|
|
Moolah101
|
  |
| Joined: 22 Sep 2010 |
| Total Posts: 614 |
|
|
| 01 Jun 2012 11:50 AM |
| Agreed with miz, su you are spamming because this guy who made this thread asked for something miz answered and helped and you told him what the point is, that is so pathetic. |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2012 11:50 AM |
Why do people never use the pairs function?
-orangegreenblue, the Lua Noob |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 01 Jun 2012 11:53 AM |
@orange
They do. But it's mostly used in generic for loops.
well.. in theory im not inside anything so i can't get "out"
Now that is a troll. No one likes you dude. If you can't help get out. That's why it's called "Scripting helpers". |
|
|
| Report Abuse |
|
|