Jma88
|
  |
| Joined: 06 Jun 2009 |
| Total Posts: 479 |
|
|
| 04 Jun 2013 10:10 PM |
| This is what I need, an enemy called a "troll" that walks around and occasionally deletes bricks around it. Help would be appreciated. |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 04 Jun 2013 10:15 PM |
Cool, give us your non functional script so we can fix it. If you don't have one, make one or leave.
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2013 10:39 PM |
If u want to mod one, take "Speed AI", AIScript then add an elseif Hit.Parent.Name == "DeleteableBrick" or Hit.Parent.Name == "Ugly wart" then Hit:remove() -- or something else u wanna do
. . .
function FireRayToward() -- possible path, and read the Part we hit, if any. ClimbingLadder = false
local originPrime = origin * Vector3.new(.8,0,0) - Vector3.new(0,.4,0) -- Offset Right + OffY local offset = origin * Vector3.new(.8,0,0) - origin * Vector3.new(-.8,0,0) -- left (I guess this is increment. I didn't WANT to do it this way) local point = origin.lookVector * 7 -- dir local pointPrime = point - offset + Vector3.new(0,2,0) -- dir + OffsetLeft + OffsetY = direction of Ray
local Hit = DrawRay(originPrime, pointPrime) -- see if we hit anything
if Hit then if target.Parent == Hit.Parent then -- AI.Head:BreakJoints() if Hit.Name ~= "Torso" and Hit.Name ~= "Head" then Hit:BreakJoints() Hit.CanCollide = true else Hit.Parent.Humanoid:TakeDamage(15) end -- kill
Logic = 0 Hit = nil
--HERE
elseif Hit.Parent.Name == AIName then . . . |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2013 10:42 PM |
*sorry elseif Hit.Parent.Name == "DeleteableModel" or Hit.Name == "DeleteablePart" then |
|
|
| Report Abuse |
|
|
Jma88
|
  |
| Joined: 06 Jun 2009 |
| Total Posts: 479 |
|
|
| 04 Jun 2013 11:03 PM |
| Carpenter, I don't quite understand. |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2013 11:06 PM |
| @usering Not cool. You're obviously a forum troll. Get out. |
|
|
| Report Abuse |
|
|
| |
|
Jma88
|
  |
| Joined: 06 Jun 2009 |
| Total Posts: 479 |
|
|
| 05 Jun 2013 12:05 AM |
| I know basically nothing about scripting. |
|
|
| Report Abuse |
|
|
Jma88
|
  |
| Joined: 06 Jun 2009 |
| Total Posts: 479 |
|
| |
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 05 Jun 2013 09:08 AM |
| @Blox, I'm not a forum troll. These request scripts do not belong here and I'm always helping out people who actually NEED help on this. |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2013 09:56 AM |
For this one you need to name the bricks that can be touched to a specific name. For now we will call it "brick"
function onTouch(Troll) if Workspace ~= then local found = Workspace.findFirstChild("Brick") if found then game.Workspace.Brick:remove() end end
script.Parent.Touched:connect(onTouch)
Just the general idea, not sure if it will work but pretty much what you want the script to do is find the brick and remove it when touched. So I tried to combine a onTouch script with a remove script. |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2013 10:25 AM |
*I know basically nothing about scripting.....
Yeah I know. That's why this doesn't belong here, u should be Searching the Catalog, and Testing like nuts....
That's why I a gave you a complete model from the Catalog, and the exact line u need to add.
You may be able to see a forest, if u would stop looking at that tree in front of you, Brian
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 05 Jun 2013 02:11 PM |
| I do know what you mean. This kinda belongs in LMaD. |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 05 Jun 2013 02:46 PM |
Here's my advice:
Learn to script |
|
|
| Report Abuse |
|
|