void main()
{
object oPC = GetFirstPC(); // player
object oKeyOfQuinari = GetObjectByTag("kod_plot_KeyOfQuinari"); // item needed to trigger the event
int pashinScene = GetLocalInt(oPC, "pashinScene"); // int to determine if this has been triggered before
if(GetLocalInt(oPC, "pashinScene") != 1) // if this is 1, then it's played before. otherwise, play it.
{
if (GetFirstItemInInventory(oPC) == oKeyOfQuinari) // if the player has the music box, show the scene
{
ActionStartConversation(oPC, "pashin_cutscene", FALSE, FALSE, FALSE, FALSE); // scene to be played
SetLocalInt(oPC, "pashinScene", 1); // once it's played, set the int to 1 so it doesn't play again
}
}
}
You can see what I'm trying to do in the comments. Basically, I wanna check an int that I place on the character. If it's 1, then nothing happens. If it's anything BUT 1, then do the next check. Next check is for an item in the inventory of the player. If it's there, play the scene and set the int to 1. If not, do nothing. However, on a brand new character where both of these checks should fail, the scene is still triggered. Thanks for any help.





Retour en haut






