Author Topic: Gender Door  (Read 501 times)

Legacy_Taino

  • Sr. Member
  • ****
  • Posts: 268
  • Karma: +0/-0
Gender Door
« on: February 11, 2011, 03:38:49 am »


               I was wondering if I did something wrong on this script. Some reason it seems it isn't working. I have it on the Door's OnOpen event.. ':huh:'

//:: door_male_chker
////////////////////////////////////////////////////////////////////////////////
void main()
{
    int iOpener = GetGender(GetLastOpenedBy());

    if(iOpener != GENDER_MALE)
    {
        DelayCommand(1.0, ActionCloseDoor(OBJECT_SELF));
        ActionSpeakString("<c Â¥ >[Narrator]:</c> This door sences that your not a male.");
    }
}

Thanks in advance.
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Gender Door
« Reply #1 on: February 11, 2011, 07:00:38 am »


               hmmm...

//:: door_male_chker
////////////////////////////////////////////////////////////////////////////////
/*
I've tried all these they work except yours... I didn't have a female char
so I switched it to ==male and it worked fine not sure why its not working
for you.
*/
void main()
{
 /*
    object oOpener =GetLastOpenedBy();
    int iOpener = GetGender(oOpener);

    if(GetIsObjectValid(oOpener)==TRUE && iOpener == GENDER_MALE)
    {
    AssignCommand(oOpener,ClearAllActions(TRUE));

        DelayCommand(1.0, ActionCloseDoor(OBJECT_SELF));
        //ActionSpeakString("<c Â¥ >[Narrator]:</c> This door sences that your not a male.");
        string sData="<c Â¥ >[Narrator]:</c> This door sences that your not a male.";
        FloatingTextStringOnCreature( sData,oOpener,FALSE);
    }
 */

// /*
    int iOpener = GetGender(GetLastOpenedBy());

    if(iOpener == GENDER_MALE)
    {
        DelayCommand(1.0, ActionCloseDoor(OBJECT_SELF));
        ActionSpeakString("<c Â¥ >[Narrator]:</c> This door sences that your a male.");
    }
// */

/*
    int iOpener = GetGender(GetLastOpenedBy());

    if(iOpener != GENDER_MALE)
    {
        DelayCommand(1.0, ActionCloseDoor(OBJECT_SELF));
        ActionSpeakString("<c Â¥ >[Narrator]:</c> This door sences that your not a male.");
    }
*/

}
               
               

               


                     Modifié par Greyfort, 11 février 2011 - 07:05 .
                     
                  


            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Gender Door
« Reply #2 on: February 11, 2011, 08:21:16 am »


               Your script works just fine for me Taino. A couple things to double check:

-is the door locked?

-are you testing this with a female character as is?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Gender Door
« Reply #3 on: February 11, 2011, 08:32:13 pm »


               

GhostOfGod wrote...

Your script works just fine for me Taino. A couple things to double check:
-is the door locked?
-are you testing this with a female character as is?


Just to add to this list.   How big is your module.  It may not be firing due to being too low on the totem pole.

Try assigning the area to shut the door.