I'm trying to set up a character that changes her 'outfit' using items in her inventory. (This is for cold weather and disguise options).
So far I have:
function invCloak_Interact(){
player.Say("Lovely and warm.");
player.SetIdleView(5, 0); // Where 5 is the view with the 'cloak' enabled
}
Obviously all this does is change the idle view. But I can't find similar functions for the other views. I also considered just switching characters but that gets complicated with starting rooms and I'm not sure whether Inventory would carry over?
Any advice would be greatly appreciated.
Switching characters isn't a problem but you'd indeed have to manually duplicate the inventory. It doesn't solve the issue of having to use different views/loops for special animations though.
To change the character's other views:
player.ChangeView(CLOAKWALK);
player.SpeechView = CLOAKTALK;
// player.ThinkView = CLOAKTHINK;
As for other animations like picking up stuff: you could use one view for each outfit and store the number in a global int variable.
In the above code, you'd do animationView = CLOAKANIMS;
When the player picks up something:
player.LockView(animationView);
player.Animate(...);
player.UnlockView();
Just make sure the loops do the same in each outfit's animation view.
Great. I'll test this on my game tomorrow. Thanks for your help! :)