|
| 22 Nov 2011 03:03 PM |
print("Ant Hill has been loaded") local Ant = Instance.new("Part",Workspace) Ant.Size = Vector3.new(2,1.2,1) Ant.BrickColor = BrickColor.new("Bright red") Ant.BottomSurface = ("Smooth") Ant.TopSurface = ("Smooth") Ant.Position = Vector3.new(0,6.4,0)
Ok, i got that much done, but i need to put a script inside the "Ant". How would i do that? I want it to slowly "Eat" everything it touches. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:08 PM |
| Put the script in Lighting, clone it, and parent it to the ant. |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Nov 2011 03:08 PM |
@City
No..
It's going to be making lots of ants that pretty much invade everything. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:10 PM |
print("Ant Hill has been loaded") local Ant = Instance.new("Part",Workspace) Ant.Size = Vector3.new(2,1.2,1) Ant.BrickColor = BrickColor.new("Bright red") Ant.BottomSurface = ("Smooth") Ant.TopSurface = ("Smooth") Ant.Position = Vector3.new(0,6.4,0) script = game.Lighting.Scriptname:Clone() script.Parent = Ant |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:12 PM |
@City
Now how would i make them go to the nearest Part, and remove it? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 22 Nov 2011 03:18 PM |
Find the closest part to it. Use :FindPartsInRegion3(), if there aren't any parts, make it roam around. When it touches part, use the .Touched event, and then use the :Remove() method to remove the part.
Simple |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:20 PM |
@City
I'm not a good enough scripter to know how to do that without an example...
I'm still confused as to how the lighting works.
1+ Respect if you help me :D |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:21 PM |
LOL, lighting is just a folder.
Use the wiki for :FindPartsInRegion3(). It's easy actually. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:22 PM |
@City
I know lighting is a folder, but why would i put it there? :o?
Oh, i'v already checked out the wiki about that :3 |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:23 PM |
Here:
pos = Ant.Position region = Region3.new(Vector3.new(pos.X + 10, pos.Y + 10, pos.Z + 10), Vector3.new(pos.X - 10, pos.Y - 10, pos.Z - 10))
parts = workspace:FindPartsInRegion3(region)
There. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:24 PM |
| jojo, any script in LIghting doesn't execute. So putting it there, and then moving it to workspace allows for easy execution of scripts you want to clone. :D |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:27 PM |
@City
So, would i move it using a script? Oh just move it by dragging it.. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:28 PM |
*facepalm* You clone it from lighting, and then parent it to anything in workspace. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:31 PM |
@City
OH ok :o
Then it creates 2 ants. :D
But the ants don't move..? |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2011 03:32 PM |
| So make them move. Take a zombie script, study it, and then see how it works :D Then use that for the ants. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 22 Nov 2011 03:35 PM |
OR
Just use the MoveTo method ....To make it move. |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Nov 2011 03:40 PM |
I'd use just on script with coroutines and Region3.
http://wiki.roblox.com/index.php/Region3 http://wiki.roblox.com/index.php/Function_Dump/Coroutine_Manipulation
~RATEXmegaGAMER~ -Gamer for life- |
|
|
| Report Abuse |
|
|
| |
|