Data Realms Fan Forums http://45.55.195.193/ |
|
CPU LZ http://45.55.195.193/viewtopic.php?f=8&t=30422 |
Page 1 of 1 |
Author: | Pantera1993 [ Tue Feb 21, 2012 4:21 am ] |
Post subject: | CPU LZ |
I know it's on the forums somewhere, but search isn't helping me right now. Designating a LZ Team 2 or something like that isn't making the AI spawn in a certain area, and upon further investigation, the skirmish activities is making AI spawn in some random math-50 location or something, SO: How can I set up a skirmish activities that makes the AI spawn in the CPU LZ? |
Author: | Crabman [ Tue Feb 21, 2012 4:41 am ] |
Post subject: | Re: CPU LZ |
Shouldn't you put this in the Game Discussion Board? Just Sayin- And uhh.. Try tampering with some |
Author: | Pantera1993 [ Tue Feb 21, 2012 4:42 am ] |
Post subject: | Re: CPU LZ |
I figured mod making, cuz I'm making a scene, but now I think it should be in Scene Making. If a mod wants to move this there, that would be good. |
Author: | Bad Boy [ Tue Feb 21, 2012 7:03 pm ] |
Post subject: | Re: CPU LZ |
Good to see someone trying to get into scene making, it's slow but worthwhile. To change this in the skirmish defense activity you'd first have to uncomment line 79 Code: self.EnemyLZ = SceneMan.Scene:GetArea("LZ Team 2"); Then you have to change line 265 Code: ship.Pos = Vector(math.random()*SceneMan.SceneWidth,-50); Code: ship.Pos = Vector(self.EnemyLZ:GetRandomPoint().X , -50); Keep in mind that this will make the activity only work for scenes which have LZ Team 2 set as an area. That's presumably why they changed the spawn location to be a random x point anywhere within the scene. |
Author: | Pantera1993 [ Tue Feb 21, 2012 9:29 pm ] |
Post subject: | Re: CPU LZ |
Ah yes that makes perfect sense. I had the Enemy LZ line uncommented but I wasn't sure how to set up the ship.Pos line. I tried a couple things there but nothing really worked. Is there a way to have it set up similarly for my own team's LZ? The idea I've got is that I have a large area for my own team's LZ and as the enemy advances, I lose more and more area to spawn, but always have the area around the brain to spawn in. |
Author: | Bad Boy [ Wed Feb 22, 2012 12:21 am ] |
Post subject: | Re: CPU LZ |
Would you be buying the ships and troops or would the activity be spawning them in for you? akblabla's Alternative Skirmish had changing enemy LZs though much of it is pretty damn confusing (line 488 is probably the most relevant bit unless you want to try to duplicate his method of picking where the box is. Anyway I can think of two ways to do it. The better way would be to add boxes in lua, you'd create two boxes (in lua) for the original spawn areas then you'd replace them with bigger/smaller boxes depending on how far the enemy has advanced. You'd have to determine milestones for enemy advancement so you would know when to change boxes, perhaps you could do that by making area boxes and checking enemy counts or you could just base it on how far the enemy has gotten (i.e. the farthest enemy x position). The other way would be to create the LZs in the area editor, making each LZ its minumum size, then put a bunch of smaller area boxes in between. These smaller boxes would originally increase the size of the player LZ but when an enemy is in a box that box (and all those behind it) would then add to the enemy LZ and not to the player LZ. This would be fine except I don't know of a way to add area sizes together so as far as I know you'd have to use random chances to make the ship pick where to spawn. Though it may be possible to create a box from the beginning of the original area to the farthest captured area and use that box as the actual LZ. In short, it's either pretty damn difficult or there's a very easy way that I'm missing. If anyone has suggestions on this I'd like to hear them too cause my ideas don't seem great. Plus I don't think either one of them would help if the player is supposed to buy his own ships. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |