Encounters restarting when re-entering the area
#1
Posté 09 août 2013 - 06:20
It would be easy to do with normal creatures, but I want the opponents to scale, and thus, the encounter is the best (or only) way to spawn them.
Is it possible to do so? Maybe, for example, there is a way of setting encounter's respawn time left to 0 when player enters the area?
Thanks for help.
#2
Posté 09 août 2013 - 06:59
void main()
{
object oPC = GetEnteringObject();
if(GetIsPC(oPC)
{
if(GetLocalInt(OBJECT_SELF,"MONSTERLEVEL") == 0)
{
CreateObject(OBJECT_TYPE_CREATURE,"enter-low-level-creature-resref-here"),GetLocation(GetWaypointByTag("enter-waypoint-tag-here")));
//repeat this if you want more than one creature
}
else if(GetLocalInt(OBJECT_SELF,"MONSTERLEVEL") == 1)
{
CreateObject(OBJECT_TYPE_CREATURE,"enter-next-level-creature-resref-here"),GetLocation(GetWaypointByTag("enter-waypoint-tag-here")));
//repeat this if you want more than one creature
}
//go on with more else ifs for every monsterlevel you want to have
//At the end we make sure next time the next level is activated:
SetLocalInt(OBJECT_SELF,"MONSTERLEVEL",GetLocalInt(OBJECT_SELF,"MONSTERLEVEL")+1);
}
else return;
}
Modifié par Tolkiens Padawan, 09 août 2013 - 07:01 .
#3
Posté 09 août 2013 - 07:18





Retour en haut






