I have a team of monsters that attack the PC and I want to set a plot flag when all the monsters are dead. I think someone else asked about this once, but my forum searching is not bringing it up and I can't find it in the wiki.
Any suggestions?
Thanks!
How do I fire a plot flag when a team of monsters is dead?
Débuté par
PavelNovotny
, mars 17 2010 12:32
#1
Posté 17 mars 2010 - 12:32
#2
Posté 17 mars 2010 - 12:38
PavelNovotny wrote...
I have a team of monsters that attack the PC and I want to set a plot flag when all the monsters are dead. I think someone else asked about this once, but my forum searching is not bringing it up and I can't find it in the wiki.
Any suggestions?
Thanks!
Obviously, make sure they are all given a unique team id, like 10. In the area that the encounter takes place, you will need to setup an area core script and catch the event like so:
...
case EVENT_TYPE_TEAM_DESTROYED:
{
int nTeam = GetEventInteger(ev, 0);
switch (nTeam)
{
//Team 10 was killed
case 10:
{
//you set your plot stuff here
break;
}
}
break;
}
...
#3
Posté 06 avril 2010 - 01:59
If I have only one creature to kill, is it generally accepted to put the creature on a unique team and add the quest update code in the area's script as in the above? Or is it easier to modify a creature_core script for the specific monster and run the quest-update code that way?
#4
Posté 06 avril 2010 - 04:48
I suggest to do what is easier for you. Since the team destroyed mechanism is not requiring more than one creature, I'd say this counts as "generally accepted". If you have a custom area script for team destroyed events anyway, I suggest to just use another team ID. If this creature has an own script already, its death event is also an option. Making an extra script is not desirable.
#5
Posté 06 avril 2010 - 08:50
BillHoyt wrote...
If I have only one creature to kill, is it generally accepted to put the creature on a unique team and add the quest update code in the area's script as in the above? Or is it easier to modify a creature_core script for the specific monster and run the quest-update code that way?
I tend to like to script all my death functionality through the team death even on the area, even if the team only has a single creature. It keeps things in one place. The death event on the creature works just as well however: it’s a question of organization and preference really.





Retour en haut







