Data Realms Fan Forums
http://45.55.195.193/

Stop CPU from spawning?
http://45.55.195.193/viewtopic.php?f=73&t=24069
Page 1 of 1

Author:  Messiah [ Thu Jun 02, 2011 4:34 am ]
Post subject:  Stop CPU from spawning?

How can I stop cpu from spawning units in skirmish defense or BvB? And how can I increase my own start money? I basically just want to have a sandbox mode. I tried messing with different lua files but nothing works. Right now, I'm resorting to putting tunnels across the top of the map to stop ships from flying in.

Author:  Xery [ Thu Jun 02, 2011 5:59 am ]
Post subject:  Re: Stop CPU from spawning?

1)Find the corresponding lua file like "SkirmishDefense.lua", open it.
2)If you don't want any enemy to be spawned, find "if self.CPUTeam ~= Activity.NOTEAM and self.ESpawnTimer:LeftTillSimMS(self.TimeLeft) <= 0 and MovableMan:GetMOIDCount() <= 210 then", add some code to make it not possible, for example, "self.ESpawnTimer:LeftTillSimMS(self.TimeLeft) > 100 and self.ESpawnTimer:LeftTillSimMS(self.TimeLeft) <= 0" will never come true.
3)Find
Code:
If/elseif self.Difficulty <= GameActivity.zDIFFICULTY then
self:SetTeamFunds(number x, Activity.TEAM_y)

x for the start money, y for the team, z for the difficulty. Just change x as you like.

Author:  Messiah [ Fri Jun 03, 2011 1:58 am ]
Post subject:  Re: Stop CPU from spawning?

#2 causes an error and console pops up.

I have tried putting the code in after the aforementioned line or just replacing it but neither works.

Author:  Xery [ Fri Jun 03, 2011 4:45 am ]
Post subject:  Re: Stop CPU from spawning?

replace "self.ESpawnTimer:LeftTillSimMS(self.TimeLeft) <= 0" with "self.ESpawnTimer:LeftTillSimMS(self.TimeLeft) > 100 and self.ESpawnTimer:LeftTillSimMS(self.TimeLeft) <= 0".

Author:  Messiah [ Fri Jun 03, 2011 5:51 pm ]
Post subject:  Re: Stop CPU from spawning?

Thanks that worked perfectly

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/