I'm trying to set the raid strategy of an IncidentParms instance for a raid I'm manually calling in my raid. I want to set "raidStrategy" to Immediate Attack but it doesn't seem to be working as I still get raids that are set to wait and then attack.
Here's a snippet of my code where I'm trying to set the raid strategy.
while (!raidFaction.HostileTo(Faction.OfPlayer))
{
Find.FactionManager.TryGetRandomNonColonyHumanlikeFaction(out raidFaction, true, false);
parms.faction = raidFaction;
}
parms.raidArrivalMode = PawnsArriveMode.CenterDrop;
parms.raidStrategy = new RaidStrategyWorker_ImmediateAttack().def;
EDIT: Go figure, I figure it out right after I make a post. I had to do "parms.raidStrategy = RaidStrategyDefOf.ImmediateAttack;" instead.
i see no trace output
is your code actually fire?
Quote from: RawCode on March 26, 2017, 03:38:49 AM
i see no trace output
is your code actually fire?
I didn't paste the entire cs file, just the part that was supposed to set the raid strategy.