General > Developers Corner

Need some help with a ULX LUA command.

<< < (3/14) > >>

MrPresident:
Yes, be sure that you change all instances of zomb to pl.zomb though. Also.. it's not a local anymore. You are anchoring it to a global entity.


pl.zomb = ents.Create

not

local zomb = ents.Create


edit: Also.. since you are anchoring it to the players entity.. there is no reason why you can't do this to more than one player at a time. You may want to include some sort of redundancy check though. Maybe check to see if there is already a pl.zomb before creating a new one, and if there is then removing it first.

LuaTenshi:

--- Quote from: MrPresident on June 22, 2011, 07:16:20 PM ---Yes, be sure that you change all instances of zomb to pl.zomb though. Also.. it's not a local anymore. You are anchoring it to a global entity.


pl.zomb = ents.Create

not

local zomb = ents.Create


edit: Also.. since you are anchoring it to the players entity.. there is no reason why you can't do this to more than one player at a time. You may want to include some sort of redundancy check though. Maybe check to see if there is already a pl.zomb before creating a new one, and if there is then removing it first.

--- End quote ---

I made the changes to the code. Now all I need to do is test it. By that I mean I need to test it on the Server. So I can get the exact log and errors if there are any.

MrPresident:
You left them out of the remove timer. You need to fix your zomb variables there as well.

LuaTenshi:

--- Quote from: MrPresident on June 22, 2011, 07:45:28 PM ---You left them out of the remove timer. You need to fix your zomb variables there as well.

--- End quote ---

I have now replaced each and every occurrence of zomb with pl.zomb, I made sure of that. I will test the script tomorrow. Thank you very much for the help and yes, you can work on it, but I really hope that you give me credit as well.

Note: An effect needs to be added when the zombie replaces the player. (But that's after we get the zombie to actually replace the player.)

Edit: I removed my last one to change the post time. Sorry.

MrPresident:
Cool, let me know how it runs.

I was only going to pick it up if you gave up on it. The idea is too good to let it just die, though I'd rather have you be the one to complete and release it seeing as it was your idea.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version