Author Topic: Small Holes, Big Difference  (Read 1301 times)

Legacy_Redunct

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #15 on: July 28, 2010, 03:37:15 am »


               

void main()
{
object oPC=GetPCSpeaker();
object oWay=GetObjectByTag("CrawlToGoblinCave2");
location iTarget=GetLocation(oWay);
object oHench=GetHenchman(oPC);


if ((GetCreatureSize(oPC)==CREATURE_SIZE_SMALL) || (GetCreatureSize(oPC)==CREATURE_SIZE_TINY))
{
AssignCommand(oPC,ActionJumpToLocation(iTarget));
}
else
{
AssignCommand(oPC,SpeakString("I don't think I can fit."));
}

if ((GetCreatureSize(oHench)==CREATURE_SIZE_SMALL) || (GetCreatureSize(oHench)==CREATURE_SIZE_TINY))
{
AssignCommand(oHench,ActionJumpToLocation(iTarget));
}
else
{
RemoveHenchman(oPC,oHench);
}

}


This works. If the Henchman can't fit, He'll leave the Player's group. He SHOULD wait for the player where he was left, where he can rejoin.
               
               

               


                     Modifié par Redunct, 28 juillet 2010 - 02:37 .
                     
                  


            

Legacy_Redunct

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #16 on: July 28, 2010, 03:38:55 am »


               

One Thousand Talons Mao Ra wrote...

':wizard:' It works now! I rarely say this but... Woot!


It shouldn't, I don't see how you can define a henchmen via a Faction, but if it does, great.
               
               

               
            

Legacy_One Thousand Talons Mao Ra

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #17 on: July 28, 2010, 03:50:00 am »


               Isn't each PC party their own faction? I should be able to loop through that faction and move 'em if they're the right size. Worked on the PC anyway...
               
               

               
            

Legacy_Redunct

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #18 on: July 28, 2010, 04:05:42 am »


               

One Thousand Talons Mao Ra wrote...

Isn't each PC party their own faction? I should be able to loop through that faction and move 'em if they're the right size. Worked on the PC anyway...


No, I don't believe so.

In order to prevent them from coming through you're gonna have to either 1.Force them to stay there or 2.Remove them from the party. I'll test it now, but I believe only a PC belongs to his respective faction, no one else can join it.

Just tested it, I am correct. NPCs cannot belong to a PC faction.

Switch it to "GetHenchmen(oPC)" and make sure you put some command to prevent the henchman from materializing next to the PC.
               
               

               
            

Legacy_Redunct

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #19 on: July 28, 2010, 04:06:23 am »


               Double post.
               
               

               


                     Modifié par Redunct, 28 juillet 2010 - 03:06 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #20 on: July 28, 2010, 04:23:57 am »


               Sorry,   Yes It should have been != in the check instead of the ==;   The return should have been there if i was reading what he was trying to do right.  Use the same convo for trafic both ways.  





And yes a party if a faction.  If they are in the party they are in that same faction.  With the party leader the leader of the faction.   If a PC leaves the party then they are in a different faction.  

               
               

               
            

Legacy_Redunct

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Small Holes, Big Difference
« Reply #21 on: July 28, 2010, 04:33:19 am »


               

Lightfoot8 wrote...


And yes a party if a faction.  If they are in the party they are in that same faction.  With the party leader the leader of the faction.   If a PC leaves the party then they are in a different faction.  


I just tested this again, it appears to be a hit and miss.

Still think you'd be safest just changing it to GetHenchmen(oPC)