Interesting.
A number of options come to mind.
But I think the cleanest one (and one that will leave no trace what-so-ever) is to destroy the very Store object.
That will cause the immediate cessation of shopping activity -- for sure.
But it will also do it for any other PC shopping at the same Store in that moment (multiplayer).
When you destroy a Store, you lose any customization made to it after its spawning. That includes you also lose any and all items that were sold _to_ the Store.
Recreating the Store (that is, spawning it anew from its blueprint) would not bring the sold items back. Makes perfect sense.
So... To solve this problem, just CopyObject() the original Store somewhere (you clone it).
You can spawn it at the same Location of the original Store currently open for shopping -- the game will not care.
Then you simply destroy the original Store object.
That should do the trick nicely.
And because you have copied (cloned) the original Store, you have also preserved all items that were sold to it.
Please let me know if it works -- I can not make tests from here at the moment.
-fox
[edit]Let us steppify it:
1) Query the Location of the currently opened Store.
2) CopyObject() the currently opened Store at the Location from point 1.
3) Destroy the currently opened Store.
4) Send fox a bunny.
-fox
Modifié par the.gray.fox, 16 juin 2011 - 11:48 .