Jump to content

Home

Creating Puppets anyone?


Dak Vesser

Recommended Posts

Originally posted by Darkkender

However has anybody on this thread tried Darth333's script above since she posted it?

 

If you mean this code:

 

Originally posted by Darth333

[size=1][color=#FF6666]// Adds baodur and remote to party
// JAB-OEI 9/14/04

void main()
{
   vector vPos = GetPosition(GetPartyLeader());
   float fPCFace = GetFacing(GetPartyLeader());

   location lLoc = Location(vPos + AngleToVector(fPCFace) * 1.5f,fPCFace);

   object oBaoDur = CreateObject(OBJECT_TYPE_CREATURE,"p_baodur",lLoc);
   object oRemote = CreateObject(OBJECT_TYPE_CREATURE,"p_remote",lLoc);

   AddAvailableNPCByObject(NPC_BAO_DUR,oBaoDur);
   AddAvailablePUPByObject(PUP_SENSORBALL,oRemote);
   AddPartyMember(NPC_BAO_DUR, oBaoDur);
   AssignPUP(PUP_SENSORBALL,NPC_BAO_DUR);

...
}[/color][/size]

 

I have tested it and it works fine. It spawns BauDur and the Remote right in the Party and into the game. The only problem is that the Remote doesn't follow him at all, at least on Peragus which is where I tested it. Oh yeah, Take out the three dots at the end of the script.

Link to comment
Share on other sites

Finally! After 16 failed attempts to create a heartbeat script that'll make the puppet follow it's owner, I got it working "It's about time, eh?" lol :D

 

Anyways, here it is. What I changed in the K_hen_heartbt01.nss, will be displayed in red:

[size=1]
[color=#33FFFF]#include "k_inc_debug"
#include "k_inc_generic"
#include "k_inc_switch"
#include "k_inc_utility"

void main()
{

           object oEnemy = GetNearestCreature(CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, OBJECT_SELF, 1, CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
           //GN_SetSpawnInCondition(SW_FLAG_SHOUTED_AT, FALSE);

           if(!GN_GetSpawnInCondition(SW_FLAG_AI_OFF) && !GetSoloMode())
           {
               if(GetPartyMemberByIndex(0) != OBJECT_SELF)
               {
                   if(//IsObjectPartyMember(OBJECT_SELF) &&  //Note that this check replaces GetIsObjectValid(oMaster)
                      //GetCurrentAction(OBJECT_SELF) != ACTION_FOLLOW &&
                      GetCurrentAction(OBJECT_SELF) != ACTION_MOVETOPOINT &&
                      //GetCurrentAction(OBJECT_SELF) != ACTION_WAIT &&
                      GetCurrentAction(OBJECT_SELF) != ACTION_FOLLOWLEADER &&
                      !GetIsConversationActive() &&
                      //GetDistanceBetween(OBJECT_SELF, GetPartyMemberByIndex(0)) > 4.5 &&
                      !GN_GetSpawnInCondition(SW_FLAG_SPECTATOR_STATE) &&
                      GetCommandable())
                   {
                       //Db_PostString(GetTag(OBJECT_SELF) + " HEARTBEAT CHECK 1 PASS", 4, 10, 2.0);
                       if(!GN_GetIsFighting(OBJECT_SELF) && !GetIsObjectValid(oEnemy))
                       {
                           //Db_PostString(GetTag(OBJECT_SELF) + " HEARTBEAT CHECK 2 PASS", 4, 12, 2.0);
                           //The distance checking is now down in the script fired from AI Action Update - Leave 5m Radius of party leader.
                           ClearAllActions();[/color]
                           [color=#FF0000]ActionFollowOwner(2.5f);[/color]
                      [color=#33FFFF] }

                   }
               }
           }
           else if(GetSoloMode() && GetCurrentAction(OBJECT_SELF) == ACTION_FOLLOWLEADER)
           {
               ClearAllActions();
           }
           if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_HEARTBEAT))
           {
               SignalEvent(OBJECT_SELF, EventUserDefined(1001));
           }


}[/size]

[/color]

 

That red line"ActionFollowOwner" tells the henchmen (Puppet) to follow the NPC it was assigned to. "(2.5f)" is the distant radius around the owner that the puppet floats - which of course can be changed to any distance of your choosing.

 

I strongly recommend that you set the "IgnoreCrePath" to equal 1 in your puppet's .UTC file (You can find that entry in your .utc if you open it in GFF editor - you'll also find "Hologram [byte] =1" or 0), that way, all the other characters can walk throught it and not cause a clutter

 

Let me know what you all think.

Link to comment
Share on other sites

Originally posted by Darkkender

the k_hen_heartbt01 script is the same script for all henchmen.

 

k_hen_heartbt01 does nothing but execute k_ai_master. Look closely, most of it is commented out.

 

 

Originally posted by Darkkender

However has anybody on this thread tried Darth333's script above since she posted it?

 

It is (essentially) the same script I posted above. ;)

 

@Dak, glad you have it working.

Link to comment
Share on other sites

Originally posted by Xcom

k_hen_heartbt01 does nothing but execute k_ai_master. Look closely, most of it is commented out.

 

It is (essentially) the same script I posted above. ;)

 

@Dak, glad you have it working.

 

k0ol! Now all we need to do is cook up a script that will allow us to delete the puppet for the purpose of getting rid of it or re-assigning it to another party member.

 

[Note to self ]"Or I wonder if we'll have to delete the actual party member in order to delete the puppet"

 

Any thoughts - anyone?

Link to comment
Share on other sites

I'm not a modder in any sense except for the Homeworld series, but when I played TSL, I noticed there were 2 different types of temporary puppets. One was the medical droids that followed you around when you repaired them. Of these, I found only 2(Harbinger and Dxun Temple). Then there was that dude in the Telos military base that followed you around too. It seems the scripts for the medical droid was more reliable since they followed closer and continued following after a major battle. The engineer on Telos military base stopped following after a battle and you had to come real close to reaqquire him.

 

Of course, this was on the X-Box version, so it may not apply. I thought it was relevant.

 

Cheers and good luck!

Link to comment
Share on other sites

BTW, can anyone make a mod that allows you to upgrade remote in any way? Stronger blaster or something? Also, I played through on Easy (I'm a noob) but noticed that Remote kept getting damaged. Can he be destroyed? If so, is there any way to repair him?

 

Thanks for you help.

Link to comment
Share on other sites

Originally posted by Sandwyrm

I'm not a modder in any sense except for the Homeworld series, but when I played TSL, I noticed there were 2 different types of temporary puppets. One was the medical droids that followed you around when you repaired them. Of these, I found only 2(Harbinger and Dxun Temple). Then there was that dude in the Telos military base that followed you around too. It seems the scripts for the medical droid was more reliable since they followed closer and continued following after a major battle. The engineer on Telos military base stopped following after a battle and you had to come real close to reaqquire him.

 

Of course, this was on the X-Box version, so it may not apply. I thought it was relevant.

 

Cheers and good luck!

 

Actually those are not puppets. They're just regular game characters scripted to follow whoever takes the lead in the party and they only stay within that area. Since they're not assigned to any of your party members, you can't take them with you to new areas or other worlds.

 

Now when you create a "puppet" you're creating a permanent, subsequential charater to whatever party member you assign it to. Not a true NPC that you can equip or level up, but it'll be there in your party, ready to do whatever you script it to do. In my case - fight foes, assailants, rivals, tyrants, ya know? Puppets are good for adding to your faction (even though they have their own faction number "23" they're on your side) It can be any character you want or you can create a really good custom UTC, give it lightsabers or blasters and whatever kinda of gear you want on it, him, or her.

 

There's only "one" puppet in the game and that's Bau Dur's little Remote Sensor Ball floating around him everywhere ya go and it's not there to do anything but stand around during combat which is kind of a drag.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...