Aller au contenu

Photo

NPC Surrender


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
eucletes

eucletes
  • Members
  • 12 messages
Hi All,

I have a faction called "orcs" the global flag is set. They are initially hostile. When the orc leader is down to 25% of its max HP, I try to stop the orc leader and his faction members from attacking,by setting his faction to 80. Problem is I have henchman and they keep attacking. I thought they shared the same faction as the PC.

Any advise on how to stop the entire fight and go into conversation with the orc leader?

Regards.

One more thing I'm doing this in the EVENT_END_COMBAT_ROUND.

#2
ffbj

ffbj
  • Members
  • 593 messages
One thing you could try would be to turn all the Orcs plot at that point, or even all combatants temporarily. There are other approaches such as setting temporary friend etc...but the plot idea seems easiest.

#3
meaglyn

meaglyn
  • Members
  • 817 messages
ffbj, + 1.... the plot suggestion is very useful in these cases.

In addition to that you may want to ClearAllActions(TRUE) on all those in the PCs company. That may keep them from continuing the fight too. Once the baddies are plot it should work without this, but it can look odd to have the baddies take hits and stay blue.

#4
henesua

henesua
  • Members
  • 3 883 messages

meaglyn wrote...
In addition to that you may want to ClearAllActions(TRUE) on all those in the PCs company.


This is critical to do.

Once a fight has started a faction adjustment does not stop a critter from hammering away at a target. The combat loop will keep going unless it is broken. ClearAllActions(TRUE) should break the combat loop if it is applied AFTER the faction adjustment has completed.

#5
ffbj

ffbj
  • Members
  • 593 messages
Yeah that is important too. Forgot to mention that since things become such a matter of routine, you just don't think to point them out.

#6
eucletes

eucletes
  • Members
  • 12 messages
Thank you all for your suggestions. I found a forum thread call surrender script and it had some code that help me visualize my coding approach. It's all good :-)

Regards.

#7
Nevercallmebyname

Nevercallmebyname
  • Members
  • 102 messages
Is it posible to make this same script as a random chance outcome?
So sometimes they will surender but sometimes they wont?