PDA

View Full Version : .Lua not working?


Firefox11
10-18-2008, 11:11 AM
So I'm making a skills map for pyros, but it seems that I can't get the .lua to work. When I load the map, the team names (which had been changed) display as the usual blue/red/yellow/green, can't pick any class, backpacks don't show up... Basically, the .lua doesn't load. The map file is named quad_pyro.bsp and the .lua quad_pyro.lua (so it should work, right?)

It's driving me insane D= Halp plz.

A1win
10-18-2008, 11:35 AM
If you have any syntax errors or other problems in the lua file, anything after that line won't work. It should give error messages in the console though.

If you can't get it working, post the lua file and the console log of your map after you've loaded it.

Firefox11
10-18-2008, 02:02 PM
Well, it seems that I fixed it somehow lol. Since I pretty much copied and edited conc_b00n_r's .lua, I erased all things I didn't need and I deleted things I shouldn't. However, the map still doesn't work properly: class limits are not in effect, and teams don't spawn where they should. The class limit thing might be because of the Allies code, since the map uses all four teams:

I know the spawns thing is probably more Hammer-y than .lua-y, but well =o I've got 24 info_ff_teamspawn entities total, 8 named bluespawn, 8 redspawn and so on. However, it doesn't matter which team you pick, you will spawn in any of the 24 spawn points. In the .lua I don't have any kind of spawn controling function nor any of the base scripts included (including base_teamplay didn't fix it >_<)

Thanks for the help, but it seems I need a bit (lot?) more.

/Edit 22/10/2008: Took out the .lua since it works now.

PartialSchism
10-18-2008, 03:18 PM
Me thinks you should include "base_teamplay" and your spawns should work. But you said it didnt work. Your lua might have been broken when u tried it with the base included.

A1win
10-18-2008, 03:57 PM
That code you pasted sets class limits only for blue team and it doesn't limit teams at all.

Paste the whole lua next time if you still need help.

Firefox11
10-18-2008, 05:28 PM
I know this is only for the Blue Team, just wanted to know if the SetAllies function was written correctly (since this may be what screws over the classes limit?). Red, Yellow and Green use their own, just swapping the names so it makes sense. Sorry for not making it clear.

It seems the spawns work properly now, not the same about the class limits (still @_@). I'll edit my previous post with the full .lua to avoid having code spam.

Jester
10-18-2008, 05:41 PM
I recommend commenting out each function until it actually works then you can tell where your problem is. I'm sure it's a syntax problem, but don't want to read through that entire thing.

Firefox11
10-22-2008, 07:06 PM
Alright, it seems now it's fixed. Putting each Allied team alone in a SetAllies function works.

Thanks!