Squad Stuff - Page 2
Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)
Look, this isn't about me. This is just a programming problem. Call me an idiot, if it makes you feel better, but in the end, this is just a problem that needs solving- I want to make squad-based spawning a normal option in Spring game designs. Nobody has been willing to put up the time to make this happen, so I've been trying to figure it out- it feeds directly into my work with map manipulation, among other areas- I need this stuff before I can make independent Gaia actors that wander maps randomly, among other things.
I'm probably the person least-equipped to make any headway on this problem, as my programming skills aren't exactly legendary, but my requests to everybody else have been met with, "program it yourself, we're not interested".
So, I'm trying.
If you have something actually useful to show me, like Mael's example code, or a better explanation for how to move stuff around from table to table than the LUA 5.1 reference guide, which I have open all the time, but am not finding particularly enlightening, you're perfectly welcome to do so. If you just want to take a poke at my admittedly-huge ego for not being entirely omnicompetant, that's fine, too, but it's a cheap thrill, tbh- picking on my programming prowess is like kicking a stupid kid under the table
The problem with programming problems is that you won't be able to tackle them without learning to properly program... I know that time is a scarce resource and because of that I suggest an online book about programming, because this forum can only get you so far.
Late to post, but the root causes seem to be basic programming concepts. Imagine using a machine that accepts boxes of apples. If you give it one apple, it wont work. However, if you give it a box of 5 apples, it will work. If you only want to give one apple, give is a box with just 1 apple in it. Does that help?
Oh no, i have already solved it, don't worry. I was just pointing out a potential pitfall to you, cause I know it annoyed me for a while. What I ended up doing, as I mentioned in the post, was store each newly squad spawning unit in an array when they are built, and at the next GameFrame spawn the rest of the squad. I didnt want to go in to LuaCob, cause its unneeded. I know that the unit has spawned in Lua, I don't need COB to tell me that. Using LuaCOB would be introducing an extra, unneeded and, to be honest, stupid step to the whole process.Argh wrote:Oh, and Mael... you can probably solve your specific problem with Factories by calling the create-a-squad LUA via LuaCOB a frame after Create() finishes. At least, that's my working theory, I'm going to test it now...