// this is an object that is unknown by the game player which will hold your inventory items (which will be moved here) while in your dream
<object name="item_game_storage_object">
<inherit name="editor_object" />
<parent>null</parent>
</object>
<!-- -->
// this is a function that will move back your items to your inventory. Place this where you want it (such as on the script of upon going from the dream back to reality)
<function name="restore_items_function">
foreach (obj,GetDirectChildren (item_game_storage_object)) {
MoveObject (obj,game.pov)
}
</function>
<!-- -->
// this is a function that will move your inventory items to an object unknown by the game player, that will hold those items, such as while in the dream. Place this where you want it (such as on the script of upon going from reality to the dream).
<function name="item_game_storage_function">
foreach (obj,ScopeInventory ()) {
MoveObject (obj,item_game_storage_object)
}
</function><!--Optional-->
game.pov.originalinventory = ScopeInventory()
<!--Not optional-->
foreach (object, ScopeInventory()) {
MoveObject (object, [i]some kind of container[/i])
}
ClearScreen[/*:m][/list:o]foreach (object, game.pov.originalinventory) {
MoveObject (object, game.pov)
}
game.pov.originalinventory = null
player.original_inventory = player.inventory
player.inventory = dream_inventory
player.inventory = player.original_inventory
sgreig wrote:I know this has been mentioned already, but it seems to keep getting glossed over. The easiest way to deal with this is having a separate "dream" character, and use Quest's POV switching command to transfer the player POV to the dream character and back. There's really no reason to do it any other way, and that's one of the reasons this feature was implemented in the first place.
levicki wrote:"sgreig"
I know this has been mentioned already, but it seems to keep getting glossed over. The easiest way to deal with this is having a separate "dream" character, and use Quest's POV switching command to transfer the player POV to the dream character and back. There's really no reason to do it any other way, and that's one of the reasons this feature was implemented in the first place.
That is ok if a dream is just part of storytelling without interaction. Otherwise you would have to replicate needed player object functionality on another object.
By the way, character switching is done so you can write an RPG with NPCs which can take over active party roles if the main character is incapacitated in fight or incapable of completing some task that only another party member can do (for example if you have a party memeber "mouse" they can crawl into small spaces where you cannot so it makes sense to switch the character).
Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters...
By the way, character switching is usually done...
levicki wrote:Just to check whether I understood you two correctly -- are you really saying that people never put scripts, variables, verbs, and status attributes in player object?
Quest Wiki specifically says in its only article which mentions changing POV:Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters...
So can you please explain how exactly what I said doesn't hold true?
levicki wrote:That is ok if a dream is just part of storytelling without interaction. Otherwise you would have to replicate needed player object functionality on another object.
wiki: Changing the player object wrote:Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters. For status attributes which apply across the entire game (perhaps "score" for example), you should set these on the "game" object itself, so they will apply all the time regardless of which object is the current POV.
levicki wrote:As for the RPG part what I meant to write was:
"By the way, character switching is usually done..."
But I was writing from work so it somehow slipped, you really don't have to jump all over me because of that claim given how this feature can be used for what I said.
If you feel threatened by my presence here in any way and would prefer me to stop posting just say so and I will leave.
levicki wrote:... character switching is done so ...
TriangleGames wrote:"levicki"
Just to check whether I understood you two correctly -- are you really saying that people never put scripts, variables, verbs, and status attributes in player object?
Quest Wiki specifically says in its only article which mentions changing POV:Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters...
So can you please explain how exactly what I said doesn't hold true?
Okay, here's what you originally said...
TriangleGames wrote:..."levicki"
That is ok if a dream is just part of storytelling without interaction. Otherwise you would have to replicate needed player object functionality on another object.
I suppose that depends on one's opinion of what's needed for player functionality, but the statement comes off sounding like the player can't function or interact with anything.
request (Hide, "Command")
request (Hide, "Panes")
request (Show, "Command")
request (Show, "Panes")
TriangleGames wrote:We can only respond to what's on the screen.
...
No one is asking you to leave, just to be careful with how you phrase things, so new people coming in won't end up getting confused.
gabelance1 wrote:... Logically, you wouldn't have anything with you in the dream that you had when you fell asleep, so is there any way for me to clear the player's inventory via script? ...
sgreig wrote:... The easiest way to deal with this is having a separate "dream" character, and use Quest's POV switching command to transfer the player POV to the dream character and back. There's really no reason to do it any other way, and that's one of the reasons this feature was implemented in the first place.
levicki wrote:... That is ok if a dream is just part of storytelling without interaction. Otherwise you would have to replicate needed player object functionality on another object.
By the way, character switching is done so you can write an RPG with NPCs which can take over active party roles ...
TriangleGames wrote:... levicki, I like you, and you've been very helpful to several people, including myself, in the one day you've been here. However, it seems like you have a tendency to make assumptions and assertions that you're not really in a position to make. How do you know that switching the pov does not carry over "needed player object functionality?" Did you read through the code for Quest's engine to see how pov switching works in detail? And how do you know that Alex had such a specific purpose in mind when he put pov switching into Quest? I would think it could be used in any way designers come up with and use effectively.
sgreig wrote:Actually levicki, you'll find that you're quite incorrect ... " Switching the POV to another player object does not affect anything in the game world in terms of how you can interact with other objects unless you specifically design it to.
And to state that it's only purpose is for RPG games so you can switch between party members is grossly false. You could use it for that, but the reason it was added was because some users requested the feature. ...
So, please don't make statements like that in the forum in the future unless you know for a fact what you're talking about. There are a lot of inexperienced users who browse these forums who could read that post and get the wrong idea about how something is supposed to work when that's simply not the case. We only want to disseminate accurate information on the forums. Anything else just adds to the confusion and we want to avoid that.
levicki wrote:Wow... talk about warm welcome...
Just to check whether I understood you two correctly -- are you really saying that people never put scripts, variables, verbs, and status attributes in player object?
How can those still be accessible when you change POV to another non-default player object unless you specifically coded them to take POV into account in the first place?
Quest Wiki specifically says in its only article which mentions changing POV:Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters...
So can you please explain how exactly what I said doesn't hold true?
As for the RPG part what I meant to write was:
[quote]By the way, character switching is usually done...
TriangleGames wrote:... We can only respond to what's on the screen. What we saw was:"levicki"
... character switching is done so ...
That sounds like a very broad, firm statement, as if there are not any other reasons for doing it. Which would be false. So, because we reacted to what YOU typed (incorrectly, according to you), because a site mod (on a forum designed to help people) is trying to make sure new users are not being given misinformation, YOU'RE response is to make it personal and belittle us? Let me tell you something, I can openly admit that you seem to know a lot more about programming in general than I do, and you have a much more aggressive personality than I do, and you're very good at quickly researching information, and I don't feel the least bit "threatened" by you. I feel like you're very helpful, as well as overbearing, presumptuous, and condescending. I am usually very complaisant on the web. I DO NOT like arguing with people, but I will not be bullied, even by someone who has helped me.
No one is asking you to leave, just to be careful with how you phrase things, so new people coming in won't end up getting confused.
levicki wrote:"TriangleGames"
[quote="levicki"]Just to check whether I understood you two correctly -- are you really saying that people never put scripts, variables, verbs, and status attributes in player object?
Quest Wiki specifically says in its only article which mentions changing POV:
Quote: "Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters..."
So can you please explain how exactly what I said doesn't hold true?
Okay, here's what you originally said...
Changing the player object wrote:Each player object gets its own inventory and attributes. This includes status attributes, so each player could have their own health or stats, and these will be updated on-screen as the player switches between characters. For status attributes which apply across the entire game (perhaps "score" for example), you should set these on the "game" object itself, so they will apply all the time regardless of which object is the current POV.
levicki wrote:... That is ok if a dream is just part of storytelling without interaction. Otherwise you would have to replicate needed player object functionality on another object. ... are you really saying that people never put scripts, variables, verbs, and status attributes in player object?
levicki wrote:And I clearly stated "if a dream is just part of storytelling without interaction". If it was not obvious what I meant by that, you could have asked for clarification just like I asked you above. Instead, you did not bother to answer, but continued analyzing what I said and finding stuff to argue about.
levicki wrote:So this time I will give an example.
Storytelling without interaction:
You fall asleep and dream about your homeland. You remember your mother and how she used to tell you than "not all that glitters is gold". You also dream about your castle dungeons and some monsters and your dream drifts into a nightmare from which you wake up screaming and covered in sweat but you do remember your mother's words, and you cannot but wonder about their importance in your current situation.
Press any key to continue
The above is what I would consider "storytelling without interaction". If that is all you want to do, then you could add:
request (Hide, "Command")
request (Hide, "Panes")
to your script at the beginning of the dream sequence and:
request (Show, "Command")
request (Show, "Panes")
after the key is pressed. The above should be enough to prevent player from interacting with the inventory without even having to change POV.
levicki wrote:... That is ok if a dream is just part of storytelling without interaction …
levicki wrote: Storytelling with high interaction:
Suddenly, your whole party is surrounded by noxious fumes and you all collapse to the ground and fall asleep. When you wake up, you are tied to the post naked and all your things are gone and your friends are nowhere to be seen. You first need to find a way to free yourself and find your equipment if you want to get to the bottom of this.
The above RPG-ish example is what I meant when I said that you need to replicate some functionality. If you empty the inventory by changing POV, how do you make new character to have the same capabilities, status attributes, commands, verbs, etc?
levicki wrote:If you didn't plan this from the beginning and created a new object type, then make both the player and dream object inherit from that type and implemented all required player functionality in the type itself so that both objects can use it, you will face problems which if you are beginner you most likely won't know how to solve.
levicki wrote:"TriangleGames"
We can only respond to what's on the screen.
...
No one is asking you to leave, just to be careful with how you phrase things, so new people coming in won't end up getting confused.
You can also ask me to clarify or if you really feel like arguing you can confront me, hopefully with less vitriol and more arguments.
levicki wrote:If you feel threatened by my presence here in any way and would prefer me to stop posting just say so and I will leave.
TriangleGames wrote: I feel like you're very helpful, as well as overbearing, presumptuous, and condescending. I am usually very complaisant on the web. I DO NOT like arguing with people, but I will not be bullied, even by someone who has helped me.
No one is asking you to leave, just to be careful with how you phrase things, so new people coming in won't end up getting confused.
TriangleGames wrote:So, you clearly meant NO INTERACTION at all.
TriangleGames wrote:Now, you’re even going so far as to suggest that the command line and panes may as well be removed, because the player won’t be able to use them properly. That is patently false.
TriangleGames wrote:I can prove that it is false, with the following game, where the player object is switched with nothing being copied or recreated whatsoever. The object “playerb” is a raw object I have done nothing to except to set the option for “Can be a player.”
sgreig wrote:I know this has been mentioned already, but it seems to keep getting glossed over. The easiest way to deal with this is having a separate "dream" character, and use Quest's POV switching command to transfer the player POV to the dream character and back. There's really no reason to do it any other way, and that's one of the reasons this feature was implemented in the first place.
jaynabonne wrote:(Carefully tiptoeing around the flaming bodies...)
As far as sharing functionality among the various POVs, you can easily create a base type that they all inherit from, which would allow sharing of scripts and other common functionality.
If you wish to share dynamically changing data, then the easiest way would be with a separate state object that they all share.