Aller au contenu

Photo

Can't count while wearing shoes ....


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

#1
kalbaern

kalbaern
  • Members
  • 824 messages
I'm looking for help counting PC in an area ... from thatt area's OnEnter event. My feeble attempts seem to count all in the module instead.

In a nutshell ... if on enter, one or more PCs are there already ... abort the script. If the triggering Pc is the first one into the area ... do something else.

Thanks in advance. I had this figured out once, but lost it when my old computer died.

#2
Shadooow

Shadooow
  • Members
  • 4 468 messages
THIS?

#3
Redunct

Redunct
  • Members
  • 49 messages

In a nutshell ... if on enter, one or more PCs are there already ... abort the script. If the triggering Pc is the first one into the area ... do something else.




Couldn't you just save a local int to an object in the room, default to 0. Add one to the onEnter for each entering PC, subtract one for each leaving PC, if int is 0, fire the script, onEnter?






#4
Shadooow

Shadooow
  • Members
  • 4 468 messages

Redunct wrote...

In a nutshell ... if on enter, one or more PCs are there already ... abort the script. If the triggering Pc is the first one into the area ... do something else.


Couldn't you just save a local int to an object in the room, default to 0. Add one to the onEnter for each entering PC, subtract one for each leaving PC, if int is 0, fire the script, onEnter?


Nope when dead pc exits game, area OnExit is not fired

#5
kalbaern

kalbaern
  • Members
  • 824 messages

ShaDoOoW wrote...

Redunct wrote...


In a nutshell ... if on enter, one or more PCs are there already ... abort the script. If the triggering Pc is the first one into the area ... do something else.


Couldn't you just save a local int to an object in the room, default to 0. Add one to the onEnter for each entering PC, subtract one for each leaving PC, if int is 0, fire the script, onEnter?


Nope when dead pc exits game, area OnExit is not fired

Thanks ShaDoOoW ... that was what I was looking for, I set my template to return if the count equals more than one PC in the area and it's working fine now.