View unanswered posts | View active topics It is currently Tue Mar 19, 2024 3:37 am



Reply to topic  [ 6 posts ] 
 CPU LZ 
Author Message
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post 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?


Tue Feb 21, 2012 4:21 am
Profile
User avatar

Joined: Sun Dec 19, 2010 7:21 pm
Posts: 36
Location: Tutorial Mission
Reply with quote
Post Re: CPU LZ
Shouldn't you put this in the Game Discussion Board?

Just Sayin-
And uhh..
Try tampering with some
inside the game files...


Tue Feb 21, 2012 4:41 am
Profile
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post 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.


Tue Feb 21, 2012 4:42 am
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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");
This lets the script have a variable for that area.
Then you have to change line 265
Code:
ship.Pos = Vector(math.random()*SceneMan.SceneWidth,-50);
to
Code:
ship.Pos = Vector(self.EnemyLZ:GetRandomPoint().X , -50);
This will make the ship spawn at a random x point at the top of the screen.

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.


Tue Feb 21, 2012 7:03 pm
Profile
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post 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.


Tue Feb 21, 2012 9:29 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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.


Wed Feb 22, 2012 12:21 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.466s | 15 Queries | GZIP : Off ]