|
| 14 Oct 2013 02:46 PM |
| I put 10 zombies in my zombie place and instant lag for me. (I have really bad computer, but still) |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:50 PM |
| One of the scripts in the zombies uses while loops increase the wait time. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:52 PM |
So wait... There's a script in the zombie that uses a while loop?
And to reduce lag all I should do is increase the wait time? |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:53 PM |
Yeah. It's the one that follows the nearest player.
I know this because I took a peek at one a few days ago to make my own. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:54 PM |
Roblox did a blog on this :P
Reducing lag in zombies :) |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:54 PM |
| And yes, evolved is correct. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:56 PM |
while true do wait(math.random(1,5)) local target = findNearestTorso(script.Parent.Torso.Position) if target ~= nil then script.Parent.Humanoid:MoveTo(target.Position, target) end
So I should change the math.random(1,5) to... Say... math.random(10,15)?
Or what would be an appropriate time? |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Oct 2013 02:57 PM |
Not sure what you mean.
Copy and paste the script and change it to what you mean please. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:58 PM |
Or something like while wait (1.5) do
That may make the game more effective and have the zombies react well. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 02:58 PM |
while wait(1.5) do wait(math.random(1,5)) local target = findNearestTorso(script.Parent.Torso.Position) if target ~= nil then script.Parent.Humanoid:MoveTo(target.Position, target) end |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Oct 2013 03:05 PM |
Still tad bit laggy. But about 10x as better.
Thanks guys. |
|
|
| Report Abuse |
|
|
| |
|