Can I change a faction to neutral when it started as enemy?

Hi,

I see where I can set an enemy of a faction:

kraylor:setEnemy(human)

or where I can set a faction as friendly:

kraylor:setFriendly(human)

...but how can I unset one of these to get back to a neutral or not enemy and not friendly state? I was thinking about deleting a faction and adding it back using, for example

kraylor:destroy()

...but I think that might cause problems for any existing objects with that faction already assigned.

Any ideas?

Thanks

Comments

  • The design is so that factions and relations between factions should not be modified at all during a mission. They are only loaded when the game is started, and not send across the network at all.
  • Ah. But I can change the faction of an existing object with setFaction, right? So a set of Kraylor objects could become "Independent" or could become "Human Navy" assuming I set each object using setFaction
  • edited August 2018
    Then, you could add factions like "kraylor(neutral)" and "kraylor(friendly)" in the faction script. And, at runtime, you could switch the faction of all objects having a kraylor-something faction.
  • I believe that will show both factions in the science database, so your players could know beforehand that the Kraylor may change to friendly.

    This is because the science database is pre-populated with all factions at startup.
Sign In or Register to comment.