Use from inventory?

Does anyone know how the elixirs work when used from the inventory list? When selected, the effects do not take place until the inventory list is closed. Then you get the animation of swirling glow things and sound effects, etc.

My problem: I have an item which, when used, teleports the hero to another area. When I selected this item from inventory, the teleportation started before the inventory list closed. The hero was sent to the new area but was frozen there. The inventory list was no longer on the screen but was obviously still open because, in my attempt to unfreeze the character, I hit the "enter" key and the next item in the inventory list was used and then the character became unfrozen.

What do I have to put into my "use" event to force the action to take place after the list is closed?

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

Make a spell that does all the teleporting, then have the item cast that spell. The spell will automatically close the inventory window before doing its job.

------------------
(url="http://"http://www.thoughtslop.org")thought|slop(/url)

Quote

Originally posted by sanko:
**Make a spell that does all the teleporting, then have the item cast that spell. The spell will automatically close the inventory window before doing its job.
**

Thanks sanko. I'll try that.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

Quote

Originally posted by Rubber Ducky:
**Thanks sanko. I'll try that.

**

And you might want to add a delay after the closing (about 350) to let the screen update (or you can call refresh too). Just an idea

------------------
Just trying...

Quote

Originally posted by sanko:
**Make a spell that does all the teleporting, then have the item cast that spell. The spell will automatically close the inventory window before doing its job.
**

Nope. Didn't work. I created a spell for the item which calls the event (which checks the global to know where to teleport) and all of this happens before the inventory list closes. There is no option I can find anywhere which will close the inventory list before the actions are called. And also no way I can find to call the event immediately after the inventory list closes.

I know this works for other items in the game (i.e. elixirs) but I can't figure out how. I want something that says, "call event as soon as window closes." and it just ain't there.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

Hmm. Sorry, I thought that was it. I've been away from Coldstone for a while, I'm pretty rusty.

------------------
(url="http://"http://www.thoughtslop.org")thought|slop(/url)

Just an idea: Could there be a way to make the engine "click" the inventory closed? Like the first thing to do in the event, could you "change" map position to &&Actual;_X and &&Actual;_Y? Would that force the window to close?

------------------
-- Debra
Danillitphil Productions

Quote

Originally posted by Debra:
**Just an idea: Could there be a way to make the engine "click" the inventory closed? Like the first thing to do in the event, could you "change" map position to &&Actual;_X and &&Actual;_Y? Would that force the window to close?
**

Good try, but it doesn't work. Everything I place in the event sequence including event calls to switch to a different event all play out in order until this item is "used up" and the next item in the list is used. At that point the unseen window closes and the game proceeds.

Here's the scene: The hero is given a couple of bottles of "Home Brew" by an NPC. Hero is told to use one to celebrate some special occasion. The second bottle is to be taken to another NPC as a gift for that NPC's help with the larger quest. I don't want to dictate when the player choses to "unwind and celebrate" so I cannot script the action totally. I also do not want to dictate the players sense of obligation to the second NPC. In other words, hero can also drink the bottle he was supposed to take as a gift.

What's supposed to happen: Hero drinks bottle one. He gets dizzy, passes out, and wakes up somewhere he's never been before with no recall of how he got there. He's a little sore perhaps, and has a hangover but is otherwise unharmed. If hero choses at some point to drink the other bottle rather than deliver it, same sequence with a different location as the end result. For each action there is a consequence.

What does happen: Player selects "Home brew" and clicks "use." Player reads the dialogue about getting dizzy, screen fades, screen fades in on new location, inventory list is no longer visible but still open because to do anything which would unfreeze the hero actually causes him to drink the second bottle and get teleported once more to location two. Then he has to use the next item in the list before the game can proceed.

I have about reached the conclusion that the only answer is to have this item start a timer which will call for the whole scene a few seconds later. I will have to hope that the player does not linger too long in the perusal of the inventory list.

This of course means I have to have a plug-in load call on every map known to exist to install the global check on the timer. I was hoping for a shorter solution like having the event call linked to the closing of the inventory list, or just not have it occur while the list is still open.

I could have "use" from inventory drop a bottle at the hero's feet and when (and if) he picks this up the event is then called from the "use from map" rather than "use from inventory, but this work-around seems lame to me.

I will be extremely grateful to anyone who can come up with the "right" answer.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

I am away from my ibook (is at apple for about 3 weeks now for repairs) but:

- there could be a difference between selecting an item and using it. (which is not good but okay). So one equips the potion. Then goes back to the normal screen. The player icon could be used to show the image of the potion so the player knows the potion is equipped. And then press 'U' or whatever to really use the potion. 'U' is then connected to a script that does the rest. First it checks what item is selected, then it continues with calling the appropriate routine

- is there no way to do a script when exiting the inventory window? Is the onload script executed when re-entering the map you are at after closing the inventory?

- Does ambrosia give any sign of live (rethorical question I know)

I realy would like to have the API for Coldstone and a way to use it as a RealBasic plugin. Would they give these infor to me if I paid a little extra?

------------------

If you select the item and then click "close," nothing happens at all. Since this is a PoG plug-in, I want it to work like other items in the game, that is, either a double click or select and click "use" would have the same result of calling forth the events.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

Quote

Originally posted by Rubber Ducky:
If you select the item and then click "close," nothing happens at all. Since this is a PoG plug-in, I want it to work like other items in the game, that is, either a double click or select and click "use" would have the same result of calling forth the events.

You might drop cafalll a quick e-mail. I'm fairly sure that he got it working, but I can't recall how.

------------------
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url) | (url="http://"http://ucplugs.evula.net/pog.html")PoG Upcoming Plug-Ins Directory(/url)

Just had a thought. Is there a link to the close Inventory screen?

If you have use on the items then....
Add an event to check two globals (HomeBrew1= 1st bottle of HOME BREW, HomeBrew2=(DITTO))
Then if the globals =1(or what ever), Make it delete that bottle(this might happen anyway), fade background, message, ect.

The only thing is, you have to make them TWO different bottles of brew (or have them check to see if the global is already set, then use the other global). But you could make it work this way.

As usual,

------------------
Albadar
- - - - - - - - - -
Just trying...

Quote

Originally posted by Albadar:
Just had a thought. Is there a link to the close Inventory screen?

How do you make a link to close the inventory screen? I'd love to be able to do that. The two bottles are not the problem. Just one bottle is a problem if part of its "use" event includes a teleportation.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

Well, I've tried also, but I do not think that there's a way to close the inventory screen.

I suggest that you do NOT place this event under "use" in the item, but by using globals determine if the Player will drink a brew. Place the event in the NPC. Allow the Player to choose to drink via a dialogue choice. If he does, then call the event to get drunk, "use" a brew (which does not have this event attached to it) via the item wizard, and teleport to another location. The Player does not have to open the inventory to use anything. You can force that yourself with the item wizard.

------------------
-- Debra
Danillitphil Productions

Good Idea Debra. (i.e. Do you want to drink this now?)

Also The there is no link to the inventory screen. The button, that closes the dialog, can be reached in the interface screen of the game options. But there is no link. Wow, that's a serious flaw in the game engine design. Hope we get better control in a future version (if ever).

------------------
Albadar
- - - - - - - - - -
Just trying...

Quote

Originally posted by Debra:
**Well, I've tried also, but I do not think that there's a way to close the inventory screen.

I suggest that you do NOT place this event under "use" in the item, but by using globals determine if the Player will drink a brew. Place the event in the NPC. Allow the Player to choose to drink via a dialogue choice. If he does, then call the event to get drunk, "use" a brew (which does not have this event attached to it) via the item wizard, and teleport to another location. The Player does not have to open the inventory to use anything. You can force that yourself with the item wizard.
**

I'm working on a similar work-around where the bottle in inventory just places a bottle at the hero's feet with some silly dialogue about "Drat. The bottle slipped out of my hands" and then when this bottle is picked up, the screen is closed and the intended event can proceed. I think it will have to be that way unless the collective minds here can come up with a better method.

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

After a week of trying everything I can think of, I'm still stuck. Here's what I have done: NPC gives player bottle (bottle shows up in inventory), player selects bottle from inventory list and clicks "use" (inventory bottle launches a bottle at player's feet with a dialogue "Woops, I dropped it.") Player can now close inventory screen. Player picks up or walks over bottle and dialogue appears "Do I want to drink this now?" "No" places bottle back in inventory (this works), "Yes" calls following event:

dialogue - "You take a sip"
fade out
teleport to new square
player map position
fade in
dialogue - "Where am I?"

Everything works up to this point, but when I click to close the last dialogue box, the game crashes with the following message: "The application Pillars of Garendall has unexpectedly quit because an error of type 2 occured." If the game doesn't crash, the last dialogue box is frozen and will not close.

This is driving me crazy! Can anyone spot a flaw in the above sequence? ~RD

------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

Here's a question/theory: do you have the engine remove the item from the player's inventory? I believe that the "Use" button will do this if the item has a charge set. So, is it possible that you have the charges set to 1 which will cause the engine to remove the item itself, but then you remove the item before the engine can do it, thus it freaks out and crashes.

------------------
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url) | (url="http://"http://ucplugs.evula.net/pog.html")PoG Upcoming Plug-Ins Directory(/url)

There's the possibility that when the Player picks up the bottle the second time, it automatically goes into the inventory. Then when you try it again, you haven't really changed anything. I suggest that when the "use" button happens that the Player "drops" the bottle, but the second bottle is really a passive NPC, so it will not go into the inventory. Put the event in Player Contact. Then if the answer is "yes, I'll drink it," you can teleport without crashing. If the answer is "no", then via the item wizard, you can give the Player the item bottle in the inventory. The special bottle disappears via NPC control.

------------------
-- Debra
Danillitphil Productions

Quote

Originally posted by Debra:
**There's the possibility that when the Player picks up the bottle the second time, it automatically goes into the inventory. Then when you try it again, you haven't really changed anything. I suggest that when the "use" button happens that the Player "drops" the bottle, but the second bottle is really a passive NPC, so it will not go into the inventory. Put the event in Player Contact. Then if the answer is "yes, I'll drink it," you can teleport without crashing. If the answer is "no", then via the item wizard, you can give the Player the item bottle in the inventory. The special bottle disappears via NPC control.
**

The second bottle is a bogus item which does not have "take" checked and the event is called from the "use from map" spot. Having the second bottle as a passive NPC is something which I did not think of. That idea sounds very intriguing. I shall try that at once. The only hitch I might have is that the second bottle was launched at player's actual coordinates and two NPCs cannot be on the same tile. Let's see what the engine does with that. I might have to launch at &&player;(x) + 1 if this is possible.

Edit: The bad news is that NPC control will not launch an NPC at player coordinates or any formula including them. It wants custom coordinates or random, so this won't work. Thanks anyway, Debra.
------------------
My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
Find those areas you missed the first time around. Have you been everywhere?

(This message has been edited by Rubber Ducky (edited 06-09-2003).)