Page 1 of 1
Wave Mode Tutorial?
Posted: Sat May 09, 2009 2:38 pm
by YTF
I've been wanting to add a multiplayer Wave mode to my map, like Hoth in Mav's Dark Times, but I haven't found anything explaining exactly how to set it up. Can anyone direct me to a tutorial or something?
Re: Wave Mode Tutorial?
Posted: Sat May 09, 2009 3:01 pm
by DarthD.U.C.K.
there is no tutorial about it (yet) because it actually a "simple" campaign script
Re: Wave Mode Tutorial?
Posted: Mon May 11, 2009 8:23 pm
by YTF
Would anyone be willing to show me an example script? I haven't found much using Search..
Re: Wave Mode Tutorial?
Posted: Mon May 11, 2009 8:31 pm
by Fiodis
I doubt there are any in existence aside from Mav's at this point in time. When he chooses to release them, if he chooses to release them, we will all be grateful; but until that hypothetical moment you'll have to learn how to script yourself, I'm afraid.
The general layout: you have timers that, on the elapse of each, spawn an ambush and set off the next timer in the sequence. Then you have the objectives. For a simple wave mode, to just survive until the final wave is over, you trigger a victory on the elapse of the last timer.
That's the general skeleton, as I see it. Now you have to go learn how to fill in the gaps and figure out LUA coding. It's not that bad, once you get the hang of it....
Re: Wave Mode Tutorial?
Posted: Mon May 11, 2009 10:35 pm
by Maveritchell
Fiodis wrote:I doubt there are any in existence aside from Mav's at this point in time. When he chooses to release them, if he chooses to release them, we will all be grateful; but until that hypothetical moment you'll have to learn how to script yourself, I'm afraid.
I'm more than happy to show it to anyone who can use it; unfortunately if you do not have a little bit of scripting knowledge it will not be very useful. No wave mode is ever exactly the same, so you can't just plunk some lines of script into a new .lua and have it work for any map.
Re: Wave Mode Tutorial?
Posted: Mon May 11, 2009 10:42 pm
by RepSharpshooter
Battle Arena 2.0 has a wave mode as well. It's just a timer that elapses triggering the Ambush() lua call.
I would benefit from seeing how you did yours, Mav. I'm running into the issue that in order to be able to spawn different unit classes, I have to make more and more local teams, which hits the limit. Ultimately I'd like to find a way to be able to spawn any unit class in a certain number via lua.
Re: Wave Mode Tutorial?
Posted: Tue May 12, 2009 12:26 am
by Maveritchell
RepSharpshooter wrote:I would benefit from seeing how you did yours, Mav. I'm running into the issue that in order to be able to spawn different unit classes, I have to make more and more local teams, which hits the limit. Ultimately I'd like to find a way to be able to spawn any unit class in a certain number via lua.
Shoot me a PM if you need it. I used different local teams for different groups of classes, but depending on what you want to do there could be a number of ways to try. You can always start with one local team, ambush it, add a unit class to it, ambush it again, etc., rinse and repeat with other local teams. If you want to spawn specific units at specific times it might get tougher, but a unit can only be spawned if it's on a team. You can always spawn units and kill them if they aren't the right unit (and iterate through that cycle until you get the unit you want) - I ended up having to do that on one (or two?) of my wave modes.
Re: Wave Mode Tutorial?
Posted: Tue May 12, 2009 12:31 am
by Frisbeetarian
Couldn't you just set variables to many of the inputs for SetupTeams and update them between ambushes?
Re: Wave Mode Tutorial?
Posted: Tue May 12, 2009 12:34 am
by Maveritchell
Frisbeetarian wrote:Couldn't you just set variables to many of the inputs for SetupTeams and update them between ambushes?
SetupTeams is run in ScriptInit; it isn't updated once the map has loaded. Simply, you can't modify/remove team parameters once a mission starts, you can only add to them.
Re: Wave Mode Tutorial?
Posted: Tue May 12, 2009 4:53 pm
by YTF
If you wouldn't mind, Mav, I would very much like to see your scripts. I am somewhat of a beginner at BF2 LUA coding, but I do know a few things, and I would be willing to learn anything else that is involved. ^^
Re: Wave Mode Tutorial?
Posted: Thu May 14, 2009 1:30 am
by [RDH]Zerted
Maveritchell wrote:...You can always spawn units and kill them if they aren't the right unit (and iterate through that cycle until you get the unit you want)...
I think it would be easier to just set the unit's class before spawning it.
SelectCharacterClass should do that. It's in the docs...