oops. Another script was effecting the forcegreeting and I totally didn't remember it.
This worked fine for me.
Begin SM_forcescriptshort do_Onceif ( do_Once == 0 ) If ( player->GetPos, Z >= 14780 ) If ( player->GetPos, Z <= 14810 ) If ( player->GetPos, X <= 5200 ) If ( player->GetPos, X >= 4300 ) If ( player->GetPos, Y <= 4500 ) If ( player->GetPos, Y >= 4100 ) set do_Once to 1 "SM_telvanni guard"->ForceGreeting endif endif endif endif endif endifelseif ( Do_once == 1 ) stopscript SM_forcescriptendifend
Now what i'm trying to do is have either NPC-A force greeting or NPC-B force greeting and if either one forces the greeting first it will not allow the other to force the greeting. So in other words i just want one of the npc's to force the greeting if i get within x amount of feet of them.
Begin SM_forcescriptshort do_Onceif ( do_Once == 0 ) If ( player->GetPos, Z >= 14780 ) If ( player->GetPos, Z <= 14810 ) If ( player->GetPos, X <= 5200 ) If ( player->GetPos, X >= 4300 ) If ( player->GetPos, Y <= 4500 ) If ( player->GetPos, Y >= 4100 ) set do_Once to 1 "SM_telvanni guard"->ForceGreeting endif endif endif endif endif endifelseIF ( DO_oNCE == 0 ) If ( player->GetPos, Z >= 15684 ) If ( player->GetPos, Z <= 15776 ) If ( player->GetPos, X <= 5550 ) If ( player->GetPos, X >= 4826 ) If ( player->GetPos, Y <= 4052 ) If ( player->GetPos, Y >= 3383 ) set do_Once to 1 "SM3_telvanni guard"->ForceGreeting endif endif endif endif endif endifelseif ( Do_once == 1 ) stopscript SM_forcescriptendifend
I thought maybe i could make this work but it doesn't. Any hints?
*edit* i just did it for two seperate scripts.
Begin SM_forcescriptshort do_Onceif ( do_Once == 0 ) If ( player->getjournalindex "SM_glass" < 40 ) If ( player->GetPos, Z >= 14780 ) If ( player->GetPos, Z <= 14810 ) If ( player->GetPos, X <= 5200 ) If ( player->GetPos, X >= 4300 ) If ( player->GetPos, Y <= 4500 ) If ( player->GetPos, Y >= 4100 ) set do_Once to 1 "SM_telvanni guard"->ForceGreeting endif endif endif endif endif endif endifelseif ( Do_once == 1 ) stopscript SM_forcescriptendifend
Begin SM_force2scriptshort do_onceIF ( DO_oNCE == 0 ) If ( Player->getjournalindex "SM_glass" < 40 ) If ( player->GetPos, Z >= 15684 ) If ( player->GetPos, Z <= 15776 ) If ( player->GetPos, X <= 5550 ) If ( player->GetPos, X >= 4826 ) If ( player->GetPos, Y <= 4052 ) If ( player->GetPos, Y >= 3383 ) set do_Once to 1 "SM3_telvanni guard"->ForceGreeting endif endif endif endif endif endif endifelseif ( Do_once == 1 ) stopscript SM_force2scriptendifend
Is there any way to combine the two so it functions?