Jump to content

Home

Switching Characters


brwarner

Recommended Posts

I was wondering if there is a script that fires when you switch to a party member.

 

As far as I know there are no scripted events tied to this. But you could probably fake it by continually checking who is the current party leader and compare it to who was party leader last time it checked.

Link to comment
Share on other sites

Ok then well this is what I was thinking-

If one could run a script every time the party leader changed, then checked when you have revolved once around the party I may have found a work around to the only three party member problem.

Let's say you have the party - Mira,Atton,PC. Add let's say Kreia as a puppet. Starting of with the Atton being the party leader you use the script to see when you switch to the PC then when you try to switch to atton a new script fires. It removes Kreia as a puppet and removes Atton from the PArty. Then it adds Kreia to the party and adds Atton as a puppet. repeating this makes it seem you have 4 people in the party. Do you think this would work??

Link to comment
Share on other sites

The Puppet and NPC Kreia would be different individuals. They would not share the same inventory nor the same Feats/Powers after level ups. The script to add the puppet to the NPC should only happen one time when the NPC joins the party -- otherwise you would have to keep invoking a .utc template to add the puppet and the puppet would be reset in its stats, inventory, etc. Instead, the script that you describe would simply call RemoveNPCPartyToBase and AddPartyMember to switch the NPC. The corrsponding puppet would follow.

 

I assume here you would have a Puppet Kreia for the NPC Atton and vice versa. It could get very confusing if you chose to have both NPC Atton and NPC Kreia in the party.

 

Edit tk102: Perhaps the SavePUPByObject and SaveNPCByObject functions may hold the answer?

Link to comment
Share on other sites

The Puppet and NPC Kreia would be different individuals. They would not share the same inventory nor the same Feats/Powers after level ups. The script to add the puppet to the NPC should only happen one time when the NPC joins the party -- otherwise you would have to keep invoking a .utc template to add the puppet and the puppet

 

If you use the AddAvailableNPCByObject() and AddAvailablePUPByObject() you can add a creature instance as a party member, rather than add them from a template. That way the current state of that NPC should be preserved.

 

It should, theoretically, work to flip an NPC in and out of the party <--> puppet table with those, though I don't know what the point of doing so would be. The party members are already globally stored in the party table.

 

If you just want one of them to tag along without joining the party, just use SpawnAvailableNPC() to spawn them into the game world, without calling AddPartyMember(). Then put a follow command in their heartbeat script that is triggered if a Global or Local var is set for them, and set their faction to a party-friendly one. No need to mess around with puppets for that, it would merely add complexity with no visible gain (as far as I can see).

 

The problem as I see it would be to seamlessly shift party members in and out of the party. You can switch party leader while the game is paused, but scripts don't run when the the game is paused.

 

Perhaps the SavePUPByObject and SaveNPCByObject functions may hold the answer?

 

I'm not sure what those functions are supposed to do. I played with them briefly a few months ago and the only visible effect I could produce was to crash the game. :)

Link to comment
Share on other sites

f you just want one of them to tag along without joining the party, just use SpawnAvailableNPC() to spawn them into the game world, without calling AddPartyMember(). Then put a follow command in their heartbeat script that is triggered if a Global or Local var is set for them, and set their faction to a party-friendly one.
That seems as good of an idea as any to "expand the party". Thanks for the clarification stoffe -mkb-. :)
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...