Data Realms Fan Forums
http://45.55.195.193/

Toggle enemies in 1 player skirmish
http://45.55.195.193/viewtopic.php?f=4&t=16394
Page 1 of 2

Author:  battleblade5 [ Sun Aug 30, 2009 7:00 pm ]
Post subject:  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?

Author:  battleblade5 [ Sun Aug 30, 2009 11:36 pm ]
Post subject:  Re: Toggle enemies in 1 player skirmish

.-. can someone help me! D:

Author:  Geti [ Sun Aug 30, 2009 11:39 pm ]
Post subject:  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"

Author:  Azukki [ Mon Aug 31, 2009 1:56 am ]
Post subject:  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.

Author:  Tomaster [ Wed Sep 02, 2009 9:53 pm ]
Post subject:  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.

Author:  Geti [ Wed Sep 02, 2009 11:16 pm ]
Post subject:  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.

Author:  Azukki [ Fri Sep 04, 2009 6:12 am ]
Post subject:  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?

Author:  Roy-G-Biv [ Fri Sep 04, 2009 12:45 pm ]
Post subject:  Re: Toggle enemies in 1 player skirmish

Better idea.
Just make a mission that never spawn enemies.

Author:  Samohan25 [ Sat Sep 05, 2009 2:59 pm ]
Post subject:  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?

Author:  mail2345 [ Sat Sep 05, 2009 6:40 pm ]
Post subject:  Re: Toggle enemies in 1 player skirmish

You can do that with Lua.

Author:  Samohan25 [ Sun Sep 06, 2009 7:44 am ]
Post subject:  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.

Author:  Geti [ Sun Sep 06, 2009 9:48 am ]
Post subject:  Re: Toggle enemies in 1 player skirmish

actor:GetController():SetState(<state>, bool)

Author:  Samohan25 [ Sun Sep 06, 2009 4:36 pm ]
Post subject:  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.

Author:  CrazyMLC [ Sun Sep 06, 2009 6:25 pm ]
Post subject:  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?

Author:  Samohan25 [ Sun Sep 06, 2009 8:34 pm ]
Post subject:  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.

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