I've already found a work around for dealing with removing some of a stack (thanks long time ago to KevL!)
But, I was messing around with something and through use of debug messages, I can't figure out how the game engine is executing.
Here's the code snippet...
SendMessageToPC(oPC, "You have " + IntToString(nTotalItem)); SendMessageToPC(oPC, "Your balance after should be " + IntToString(nBalance)); TakeNumItems( oPC, sItemTag, nQuantity ); SendMessageToPC(oPC, "NPC took " + IntToString(nQuantity)); GiveNumItems(oPC, sItemTag, nBalance); SendMessageToPC(oPC, "Gave back " + IntToString(nBalance));
If running this in a Actions event of the conversation, you see all these messages fine, EXCEPT that AFTER the "Gave back..." message you then see the message that system generates when it takes an item from you "Lost (the item)"
I have a fix for this, I am just trying to understand why the above does not behave as expected, and why the system's "Lost item" message comes after all of my SendMessages, and does the take item at that point.
I assume that clicking the PC response line is what triggers an Action sequence, but am I wrong? Is it queued somehow?
Just curious, knowing this may help me with something later...
Added, I only see this problem in the Action of a conversation, that script above fires as expected in the On Used or elsewhere.





Наверх






