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.
Can't count while wearing shoes ....
Débuté par
kalbaern
, août 06 2010 04:51
#1
Posté 06 août 2010 - 04:51
#3
Posté 06 août 2010 - 06:14
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
Posté 06 août 2010 - 06:28
Nope when dead pc exits game, area OnExit is not firedRedunct 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?
#5
Posté 06 août 2010 - 07:15
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.ShaDoOoW wrote...
Nope when dead pc exits game, area OnExit is not firedRedunct 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?





Retour en haut







