Aller au contenu

Photo

Can I hide an animal companion from a Cutscene?


  • Veuillez vous connecter pour répondre
13 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 651 messages

Hi all. As the title says. I have some cutscenes where the PC should be alone. I hide the companions via SetScriptHidden but I don't know how to do it for their animals...



#2
Loki_999

Loki_999
  • Members
  • 430 messages

Aren't companions in the party anyway? And what about summons, you need to hide them.  So why not just loop through all members of the party and set them all hidden except for  the main PC?



#3
andysks

andysks
  • Members
  • 1 651 messages
That's what I do. But animals and summons stay visible. The companions hide but their animals don't follow :).

#4
Eguintir Eligard

Eguintir Eligard
  • Members
  • 1 832 messages
Scripthidden

#5
andysks

andysks
  • Members
  • 1 651 messages
On which tag? Do the animals and summons have tags?

#6
Tchos

Tchos
  • Members
  • 5 063 messages

Can you show your loop?  You might not be including PC-owned creatures.



#7
andysks

andysks
  • Members
  • 1 651 messages

Hi Tchos. I haven't yet created a loop. All I use so far is the stock ga_scripthidden. And this is the reason I asked now. Because with this stock script I cannot hide the animals. If by creating a loop I can include their summons, then yes :). I wish I knew how to do it though. I will find out by trying.



#8
Morbane

Morbane
  • Members
  • 1 883 messages

you might consider hiding faction members - seems more of a catch-all?



#9
kevL

kevL
  • Members
  • 4 070 messages

here's yer basic 'hide all but PC' loop

// 'ga_hideall'
// bHide:    true to set all PC faction ScriptHidden (except PCs)
//            false to reveal them again (except PCs).

void main(int bHide)
{
    object oPC = GetFirstPC();

    object oFM = GetFirstFactionMember(oPC, FALSE);
    while (GetIsObjectValid(oFM))
    {
        if (!GetIsOwnedByPlayer(oFM))
            SetScriptHidden(oFM, bHide);

        oFM = GetNextFactionMember(oPC, FALSE);
    }
}


#10
andysks

andysks
  • Members
  • 1 651 messages

Thanks KevL. What would happen with this script if a companion is controlled? Will it follow rules of CanTalkToNonPlayerCreatures and hide the created PC but not the controlled companion if the property is set to true? And if it's set to false will it warp the created PC first, hiding the companions afterwards? Jeez. writing that got me confused...



#11
kevL

kevL
  • Members
  • 4 070 messages


Thanks KevL. What would happen with this script if a companion is controlled? Will it follow rules of CanTalkToNonPlayerCreatures and hide the created PC but not the controlled companion if the property is set to true?

It assumes mainPC is controlled. I have no idea what happens if it runs otherwise; Player would probably be left controlling an invisible character during dialog.

Does it have to be the PC left visible for the cutscene to make sense? If not, if any companion or party-member is okay, replace

!GetIsOwnedByPlayer(oFM) // not truePC

with

!GetIsPC(oFM) // not PlayerControlled


And if it's set to false will it warp the created PC first, hiding the companions afterwards? Jeez. writing that got me confused...

( Created PC is different, btw. a player-created character is one made with the SoZ party-creation system ) It shouldn't warp anyone. What's tricky, now, is getting things lined-up pre-cutscene, to ensure player is controlling the 'right' character. of note is a function that will warp the *player* into a different character: SetOwnersControlledCompanion()

but again, how to do it depends on how you've structured things before the CS.

#12
andysks

andysks
  • Members
  • 1 651 messages

So, yes. The main PC should be the only one visible here. So I leave it as it is. I think I know how to set this up actually. This cutscenes are some dreams of the main PC that happen when you interact with some objects found around the world. So they should happen only to the main PC. If no one else can talk to these objects, and the main PC gets warped before the jump, being the one who interacts, then he is also the one to get jumped first to the dream area, therefore the not hidden. Making sense?



#13
andysks

andysks
  • Members
  • 1 651 messages

Yeah that seemed to do the trick. Thanks so much for this. The way I used to do this was with ga_scripthidden for all companion tags, but I never got into consideration the summons.



#14
kevL

kevL
  • Members
  • 4 070 messages

sounds good. Look(ing) forward to playing it someday