Aller au contenu

Photo

Aoe Problem [SOLVED]


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

#1
Irisiri

Irisiri
  • Members
  • 8 messages
When I cast an AOE in a no PVP area, it doesn't harm anyone as intended. But  once I leave the server, it immediatly start to harm players.

how to fix?

Modifié par Irisiri, 03 février 2012 - 06:52 .


#2
Shadooow

Shadooow
  • Members
  • 4 474 messages
the fix can be done via validity check in the AOE heartbeat script, alternatively you can dispell all AOE effects of the caster at OnClientExit event

#3
Irisiri

Irisiri
  • Members
  • 8 messages
I'm trying this on Module Exit


void CleanPlayerAOES(object oPC)
{
object oAREA = GetArea(oPC);
object oSEEK = GetFirstObjectInArea(oAREA);
while(GetIsObjectValid(oSEEK))
{
if(GetObjectType(oSEEK) == OBJECT_TYPE_AREA_OF_EFFECT)
{
if(GetAreaOfEffectCreator(oSEEK) == oPC)
{
DestroyObject(oSEEK);
}
}
oSEEK = GetNextObjectInArea(oAREA);
}
}


But it doesnt work, when player leave, some data is missing i guess

Modifié par Irisiri, 03 février 2012 - 06:19 .


#4
Failed.Bard

Failed.Bard
  • Members
  • 774 messages

Irisiri wrote...

I'm trying this on Module Exit


void CleanPlayerAOES(object oPC)
{
object oAREA = GetArea(oPC);
object oSEEK = GetFirstObjectInArea(oAREA);
while(GetIsObjectValid(oSEEK))
{
if(GetObjectType(oSEEK) == OBJECT_TYPE_AREA_OF_EFFECT)
{
if(GetAreaOfEffectCreator(oSEEK) == oPC)
{
DestroyObject(oSEEK);
}
}
oSEEK = GetNextObjectInArea(oAREA);
}
}

But it doesnt work, when player leave, some data is missing i guess


  I don't think you can get a valid area off an exiting player from the client exit script.  Even if you did somehow manage it, then it would still only affect the area they were last in with the script you have here.

#5
henesua

henesua
  • Members
  • 3 883 messages
rather than player exit... can you capture the area exit event?

#6
Irisiri

Irisiri
  • Members
  • 8 messages
--

Modifié par Irisiri, 03 février 2012 - 06:49 .


#7
Irisiri

Irisiri
  • Members
  • 8 messages

henesua wrote...

rather than player exit... can you capture the area exit event?


Thanks, that worked.
I first thought that when a player leaves the module it wouldnt trigger the onExit of an area.

Modifié par Irisiri, 03 février 2012 - 06:53 .


#8
henesua

henesua
  • Members
  • 3 883 messages
AFAIK - everything works as "in first, out last" like layers of an onion. So Area is entered after client enter when a player logs in, and exited before when a player logs out.

I think it goes
Client Enter
Area Enter
Trigger Enter
...
Trigger Exit
Area Exit
Client Exit