Removing items after an answer, in dialogue wizard

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Removing items after an answer, in dialogue wizard

Postby Mr.C » Thu Aug 27, 2009 10:09 pm

Hey there,

How would I be able to remove maltble diffrent items after an answer in the dialogue wizard? A code or somthing? :?
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby mercedes » Fri Aug 28, 2009 5:32 am

Action.RemoveItem "Item Name''--AdvancedTAB
This is for the inventory..Is that what you mean..?

http://www.adventuremaker.com/help/vbscript_techniques.htm

This page is for if u have the Full version...the help files are full of useful tips..:D

You can also reach this page from within AM with the ''Help'' link in any window...--online/offline..

Hope that helps..:)
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Removing items after an answer

Postby Mr.C » Fri Aug 28, 2009 7:27 am

Hello mercedes,

I already tryed the help files...they did'nt help me much. :(
since I know nothing of scripting...and yes, this is for the inventory, but what I need to know is how to remove several diffrent items all at once from the inventory after an answer has been given in the dialogue?
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby reneuend » Fri Aug 28, 2009 8:42 am

Mercedes is correct, here is an example:
Attachments
removeitem_dialogue.jpg
removeitem_dialogue.jpg (50.22 KiB) Viewed 4147 times
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Fri Aug 28, 2009 8:50 am

Hi there...:)

yes exactly like that...just simply type in each item u want removed..~


Make sure you use the exact name u named the item--in your inventory items..or u will get an error message...:)

So if you named a couple of them ''knife'' and ''scissors''---You type;

Code: Select all
Action.RemoveItem "knife"
Action.RemoveItem "scissors"


All within the same dialogue box of that answer..as the picture shows u...:)


I already tried the help files...they didn't help me much. since I know nothing of scripting...


As for the help files, the demonstrations given...are mostly copy and paste..So really u don't need to know much..other than perhaps read what u are pasting..to make sure you have the names of variables and such...if its indeed that type of script... It will tell u if its just copy and paste the script, and where to paste it..~:)

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Removing items after an answer

Postby Mr.C » Fri Aug 28, 2009 11:11 pm

Wow thanks guys,

that was so simple, I now understand! :oops: :D
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Removing items after an answer

Postby Mr.C » Sat Aug 29, 2009 2:36 am

Hello there,

I did what you told me, and it was real easy to do...but now I've been geting two error messages after the answer has been given. The first one is...

Error executing script.
Make sure that:
-your system is not set to use chinese characters, or other special character sets;
-your global variables do not have names that are reserved by Adventure Maker.
The Scripting Engine returned the following error message:
Unterminated string constant

And the second one...

Error executing script.
The Scripting Engine returned the following error message:
Object doesn't support this property or method
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby mercedes » Sat Aug 29, 2009 4:40 am

Make sure you don't have too many quotations..It has to do with what u have for script in the Advanced tab..once the answer has been given..Usually quote""-- related..

Can u please post here what u have in the Advanced TAB..

I'm assuming you only have a Question and an Answer..?

Nothing associating with a hotspot..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Removing items after an answer

Postby Mr.C » Sat Aug 29, 2009 5:57 am

Hey there,

yes, just a question and answer, no hotspots
here's the Advaced TAB script

Action.RemoveItem "Blue''
Action.RemoveItem "L-blue''
Action.RemoveItem "Pink''
Action.RemoveItem "Red''
Action.RemoveItem "Yellow''

(Is this what you want to see?) :?
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby mercedes » Sat Aug 29, 2009 8:41 am

Hi there...You are not using proper quotes...Instead u used the single quote--Twice in a row.....Make sure you use the double quotes..by holding down the shift key..:)

I noticed it when i went to delete the item and input my own..I had to delete twice in a row...lol..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Removing items after an answer

Postby Mr.C » Sat Aug 29, 2009 6:59 pm

Hey there, :D

I never even notest the the singe quotes, or realisd I typed them! :roll:
The script works fine now. :) Thanks.
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

An error...

Postby Mr.C » Sat Aug 29, 2009 7:59 pm

Hey there again,

I must of done somthing...don't know what--has nothing to with items this time, but I now keep getting an error upon game test or game start. here's the anoing error...

Error executing script.
The Scripting Engine returned the following error message:
Type mismatch: 'DisplayCustomMessageBox'

So obviessly (pardon my bad spelling) I typed the "DisplayCustomMessageBox"...somewere. :?
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby reneuend » Sat Aug 29, 2009 10:17 pm

It's more likely AM thinks you are trying to use the "DisplayCustomMessageBox" routine, but are doing so incorrectly. The best thing to do is to check ALL of your custom scripting to be sure you are using them correctly. Also, if you use any illegal characters in one of AM's fields, like the dialogue tool for instance, then this might spur an error. I always run a test of my game after each small change. If you get too far into it without checking your work, it can get really complicated to debug...especially if you have multiple errors and don't know it!

Good luck. If you get too stuck, come back for help.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Error solved

Postby Mr.C » Sat Aug 29, 2009 10:41 pm

Hey, :)

it didn't take me long to find the problem, it was in Project Properties. So
I'm good. 8) and thanks
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron