General > Developers Corner

Need some help with a ULX LUA command.

<< < (2/14) > >>

Megiddo:

--- Quote from: HeLLFox_15 on June 22, 2011, 03:18:29 PM ---Ok fixed that. Also just to avoid clutter is it not better to do 2 at a time?

--- End quote ---

From personal experience, I know that trying to take on two errors at once is usually a waste of time because the first one causes the other(s) 95% of the time. Show us the new logs from using the commands now.

LuaTenshi:

--- Quote from: Megiddo on June 22, 2011, 03:54:27 PM ---From personal experience, I know that trying to take on two errors at once is usually a waste of time because the first one causes the other(s) 95% of the time. Show us the new logs from using the commands now.

--- End quote ---

OK, I fixed the index error. I did not bother testing it through the server because. I now know the error after fiddling around with the code a few times. The main error is that it can not find the entity of the zombie.

When i get a fix for that I will test the code.

JamminR:
*bright eyes*
You get this working, and it might be one of the more 'fun' commands to have come out since rocket or explode.

MrPresident:
You are creating the zombie as a local entity. This can not be called from outside the function it was created in. If the zombie entity is going to be associated with a player and they will only have one at a time, I would recommend anchoring your zombie entity to the player entity. (Ya for OOP)


so instead of zomb you would use ply.zomb. Just make sure you pass the ply entity to the Spawnzomb function.


*Edit* If for some reason you can't get this working.. I would really like to pick it up. Of course I'm not going to steal your idea. ;) Also any help you need on this, let me know.

LuaTenshi:

--- Quote from: MrPresident on June 22, 2011, 06:52:09 PM ---You are creating the zombie as a local entity. This can not be called from outside the function it was created in. If the zombie entity is going to be associated with a player and they will only have one at a time, I would recommend anchoring your zombie entity to the player entity. (Ya for OOP)


so instead of zomb you would use ply.zomb. Just make sure you pass the ply entity to the Spawnzomb function.


*Edit* If for some reason you can't get this working.. I would really like to pick it up. Of course I'm not going to steal your idea. ;) Also any help you need on this, let me know.

--- End quote ---

OK, this may seem like a stupid question but would this...

--- Code: ---timer.Create( "zombSpawn_"..CurTime(), 1, 1, Spawnzomb( pl:GetPos(), pl:GetAngles(), pl ) )
--- End code ---
...work to pass the players entity to the Spawnzomb command?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version