View unanswered posts | View active topics It is currently Thu Jan 16, 2025 5:51 am



Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
 Toggle enemies in 1 player skirmish 
Author Message

Joined: Sun Aug 30, 2009 6:56 pm
Posts: 5
Reply with quote
Post Toggle enemies in 1 player skirmish
I was wondering how to switch on or off enemies in 1 Player skirmish. I'm getting tired of having to block off the top with modules. I'm expecting i have to do something with the .ini file. But, i want to be able to switch on enemies when im done. Is there anyway to do this safely?


Sun Aug 30, 2009 7:00 pm
Profile

Joined: Sun Aug 30, 2009 6:56 pm
Posts: 5
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
.-. can someone help me! D:


Sun Aug 30, 2009 11:36 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
be patient, ♥♥♥♥♥♥.

go to Missions.rte/Skirmish Activities.ini.
make a backup (copy it somewhere), then open it and delete everything below and including "AddAttackerSpawn"


Sun Aug 30, 2009 11:39 pm
Profile WWW
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
I think he wants something he can toggle in game.

What I suggest is that you backup Skirmish Activities.ini, and then open it up, and look inside.

You'll see
SpawnIntervalEasiest = 20000
SpawnIntervalHardest = 8000

This is the spawn interval in milliseconds for the easiest and hardest difficulties.

Just plug in a huge number to the easy one, and the first enemy wont spawn for a long time. 3600000 should do nicely, making for an hour.
And then just play suicidal when you want to play regularly. If suicidal is too hard for you, up the hardest number. 8000, what it's at, spawns an enemy every 8 seconds, 20000, what easy is at, spawns an enemy every 20 seconds, just to give you a frame of reference.


And never bump your own topic like that. Especially so early.
The impatient whining made me want to not help you.


Mon Aug 31, 2009 1:56 am
Profile
DRLGrump
User avatar

Joined: Tue Nov 07, 2006 1:26 am
Posts: 2037
Location: Jerking off in a corner over by the OT sub-forum
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Any way to do this with Lua? Like make a copy of grasslands with some lua thrown in that stops the spawn when you press a key? I'm an idiot, so I don't know if it's actually possible to do with Lua.


Wed Sep 02, 2009 9:53 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
with null activities and a bunkermodule with that lua, probably.
has anyone tested if GAScripted can be used for skirmish yet? i dont have access to CC at the moment so i cant do it myself, but it would be nice to be able to have stages in skirmish, for bosses and whatnot.


Wed Sep 02, 2009 11:16 pm
Profile WWW
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Couldn't the scene just have a particle or something in it that has the necessary Lua to fling opposite team crafts back into space the moment they spawn?


Fri Sep 04, 2009 6:12 am
Profile
User avatar

Joined: Mon Feb 12, 2007 12:46 am
Posts: 1765
Location: ..............
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Better idea.
Just make a mission that never spawn enemies.


Fri Sep 04, 2009 12:45 pm
Profile
User avatar

Joined: Fri Jul 24, 2009 9:03 am
Posts: 159
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
I know this is a tad unrelated, but is there a way to disable the AI completly?
As in the AI that controls units not being controlled directly, the scripts that make actors attack nearby enemies. Not the enemy spawns.
Could there be a command for this?


Sat Sep 05, 2009 2:59 pm
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
You can do that with Lua.


Sat Sep 05, 2009 6:40 pm
Profile
User avatar

Joined: Fri Jul 24, 2009 9:03 am
Posts: 159
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Thanks Mail, I may need some help though since I can't use Lua yet.
I am trying to find a solution but any examples of Controller:SetState would be extremly usefull.


Sun Sep 06, 2009 7:44 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
actor:GetController():SetState(<state>, bool)


Sun Sep 06, 2009 9:48 am
Profile WWW
User avatar

Joined: Fri Jul 24, 2009 9:03 am
Posts: 159
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Thanks so much Geti!
I'v been looking for this so I can try some form of comic or adventure,
there's a forum called cortex adventures that looked like a good concept.

EDIT: Sorry, I don't know how to enter this into the console to disable the AI, also I'm not sure if this is the right function.


Sun Sep 06, 2009 4:36 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Put this code on a custom made actor, or even the brain (You just wont be able to do most missions that include a brain).
Code:
function Update(self)
   for actor in MovableMan.Actors do
      if actor.Team ~= self.Team then
         actor:ClearAIWaypoints();
      end
         actor:GetController():SetState(Controller.WEAPON_FIRE,false);
      end
   end
end

This basically means: If any actors are not on the same team as this actor, then make it not move, and not fire.

They will still wave their gun around and such, and point it at you though.
Perfect for making a comic, eh?


Sun Sep 06, 2009 6:25 pm
Profile WWW
User avatar

Joined: Fri Jul 24, 2009 9:03 am
Posts: 159
Reply with quote
Post Re: Toggle enemies in 1 player skirmish
Wow, thanks CrazyMLC, I might try to use this in a console command to disable all AI, would never have found this otherwise.

PS: Do you think starting up the Cortex adventures thread would be a good idea?

EDIT: Dosen't seem to work attached to a brain unit, not sure why.


Sun Sep 06, 2009 8:34 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page 1, 2  Next

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.088s | 14 Queries | GZIP : Off ]