Custom Dialogues System with avatars (scripting)

This forum is meant for people to share their knowledge by writing their own tutorials for Adventure Maker.

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

Postby sugawara » Fri Sep 26, 2008 5:58 am

oh! i see that other program you wrote (thankyou very much) where you can just click the hotspot right? but if it isnt obvious yet lol, im not numerically or even progamming inclined, so its a bit of a struggle to figure out what it comes next. in that newer script you wrote.
(actually to figure out the number sequence took a couple of days and a calculator. thats how sad i am)
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby mercedes » Thu Oct 02, 2008 6:49 pm

Thats right..simply have 2 hotspots..1 with a button.. put that script in there ..just to see it work...and the other..will simply just load the dialogue and the pictures at the same time..

You can copy and paste it... so u see how it works..But make a variable called whatever u want..I put Myvariable.

*EDIT*

I found another way to make A dialogue...

This has these features; so not sure if this will suit everyone..

1--You only click a hotspot ONCE..--Only 1 hotspot is used.
2--There is no blank Frame--so no merging..
3--You need 2 TEXTS..on the frame..so a DOT--a sentence..whatever, the user will not see the Text.
4--This is done with 2 Different Colors..--As many as you want..i did with 2
5--You must space the TEXT apart from each other..
6--Created with TimedEvents
7--Open Dialogue you watch--the user watches..after clicking the hotspot.
8--Text Disappears--so there is only 1 sentence or dialogue at once..on the frame..
9- The hotspot is Disabled after the first click..thereby making it so the user cannot interupt the conversation.

Here is the code..

Put this in the Advanced of the Frame Properties..


Code: Select all
Text(1).Caption=""
Text(2).Caption=""



Put this in the Advanced of the One Hotspot

Code: Select all
Text(2).caption= "Hi there, my name is Mercedes,"+vblf+ "How are you ? "
Text(2).Forecolor=RGB(0,168,0)
Hotspot(1).Enabled = False
Action.CreateTimedEvent 4, "Text(2).Caption = """""

Action.CreateTimedEvent 4, "Text(1).Caption = "" Hi there My name is Robert, Please call me Rob"" + vblf + "" I work for your boss"""
Text(1).Forecolor=RGB (102,179,255)
Action.CreateTimedEvent 10, "Text(1).Caption = """""

Action.CreateTimedEvent 10, "Text(2).Caption = ""Well, it seems something's amiss.."" + vblf + "" There is something you should see.."""
Text(2).Forecolor=RGB (0,168,0)
Action.CreateTimedEvent 16, "Text(2).Caption = """""

Action.CreateTimedEvent 16, "Text(1).Caption= ""Ok well, wait a minute, how did you come to be here..?"""
Text(1).Forecolor=RGB (102,179,255)



You add as many sentences you want..making sure you put + vblf + plus quotes if using timed events...and adjust the times to suit your needs..:)

The colors used here are Blue and Green..~ Position one Text at the top of frame..the other at the bottom to the Left like..so it looks like 2 ppl talking..If you want...:)


Peace
Last edited by mercedes on Mon Oct 06, 2008 5:29 am, edited 4 times in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Fri Oct 03, 2008 1:21 pm

Nice one...
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Fri Oct 03, 2008 10:27 pm

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

Postby sugawara » Wed Nov 19, 2008 11:08 am

Lyberodoggy wrote:To have it work by pushing the buttons, use a Select case:

create an integer variable called counter

in the hotspot that triggers the message write this:

Code: Select all
counter=counter+1
Select case counter
case 1
Text(1).caption="the first message"
case2
Text(1).caption="the second message"
etc...


Yeah, if you want to input something, you have to use a textbox.


so ive been looking at this alot again lately thinking that for my next project it would be better to have the person in the tour or game hit the button to get the next line of dialog and to see the avatar displayed. I remembered this code lybberdoggy wrote and was thinking about using it, but couldnt really understand how this would also load an avatar like the one i used for my nichidai project. does this one load an avatar as well? or just dialog that is displayed in the text box when one hotspot is clicked?

thanks!

back to work and not liking how japanese college students are so lazy!
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby mercedes » Wed Nov 19, 2008 9:36 pm

In order to have it load the avatar as well, you would have to add it in the Select case

Example: When they hit the hotspot have it load then.--Put this in hotspot where button is of dialogue..Pretend that is Hotspot(1)

Code: Select all
Action.LoadAPicture Hotspot(2),"Avatar.jpg"
counter=counter+1
Select case counter
case 1
Text(1).caption="the first message"
case2
Text(1).caption="the second message"
etc...



I"m pretty sure that should do it...:D..This will load the Avatar in another hotspot..~ Although it would happen right away, the dialogue as well..You could also have the picture load with a variable..might be the best route..not sure..try both..see what happens..

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

Postby Lyberodoggy » Thu Nov 20, 2008 1:43 pm

Remember the old code?

Code: Select all
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), "theblackpicture.theextention"
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "TheAvatar.Theextention"
Text(Action.GetMergedTextIndex).caption="The message you want to appear"
Action.CreateTimedEvent 4, "ClearDialogue"


Use that along with the select case and you come up with this:

Code: Select all
counter=counter+1
Select case counter
case 1
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), "theblackpicture.theextention"
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "TheAvatar.Theextention"
Text(Action.GetMergedTextIndex).caption="The message you want to appear"
case2
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), "theblackpicture.theextention"
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "TheAvatar.Theextention"
Text(Action.GetMergedTextIndex).caption="The second message you want to appear"
End Select
Action.CreateTimedEvent 4, "ClearDialogue"
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Fri Nov 21, 2008 10:22 am

Lyberodoggy wrote:Remember the old code?

Code: Select all
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), "theblackpicture.theextention"
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "TheAvatar.Theextention"
Text(Action.GetMergedTextIndex).caption="The message you want to appear"
Action.CreateTimedEvent 4, "ClearDialogue"


Use that along with the select case and you come up with this:

Code: Select all
counter=counter+1
Select case counter
case 1
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), "theblackpicture.theextention"
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "TheAvatar.Theextention"
Text(Action.GetMergedTextIndex).caption="The message you want to appear"
case2
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), "theblackpicture.theextention"
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "TheAvatar.Theextention"
Text(Action.GetMergedTextIndex).caption="The second message you want to appear"
End Select
Action.CreateTimedEvent 4, "ClearDialogue"



I really ought to pay you guys for all the hard work you do for me and my programming, and as a matter of fact lybberdoggy and mercedes i think i will as soon as i transfer money again to my account in america, im sending you both some :) thanks for all the work you do for those of us who are p"programming stupid" :)

with this code though, you make the variable "counter" and it should work to further the conversation by clicking the hotspot instead of it automatically doing it through timed events right? so also, would you then repeat this for long dialogs by doing a copy/paste of the code? for example copy the case 1 code (all of the script between case 1 and case 2)and then renaming it "case 3 then case 4 then case 5" and so on?

hopefully that makes sense to you, i apologize if my thoughts are a bit jumbled, today was a kind of "bonenkai" here in japan and so i had to drink with some of the teachers and find my ability to think is lacking and i assume my writing is as well lol

sugawara
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby mercedes » Fri Nov 21, 2008 11:12 am

Hi Suga...:)

with this code though, you make the variable "counter"


yes that is correct, you need the variable "Counter" :)

should work to further the conversation by clicking the hotspot instead of it automatically doing it through timed events right?


Yes that's right, with the variable "Counter" + 1 as is stated in the code..The +1 is so every time u press it..it's like adding 1.
In other words, the Counter +1 = Text +1
Text+1Click = first sentence, Text+1moreclick = another sentence..= Each time you click it, you get another sentence..:)

would you then repeat this for long dialogs by doing a copy/paste of the code?


The code can be copied and pasted and just change the "Text" and "Avatar" it goes into the "button u press"

In the other Thread he has answered this as well and has included for the script [ClearDialogue] and [ClearDialogue True] for the Procedure. Thats for the avatar and text..

Hope that helps..:D

as a matter of fact lybberdoggy and mercedes i think i will as soon as i transfer money again to my account in america, im sending you both some thanks for all the work you do for those of us who are p"programming stupid"


That's a generous and thoughtful idea :D, but really I love helping and so does Lyberodoggy..Keeps us on our game..:P

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

Postby Lyberodoggy » Fri Nov 21, 2008 2:56 pm

mercedes wrote:Hi Suga...:)

with this code though, you make the variable "counter"


yes that is correct, you need the variable "Counter" :)

should work to further the conversation by clicking the hotspot instead of it automatically doing it through timed events right?


Yes that's right, with the variable "Counter" + 1 as is stated in the code..The +1 is so every time u press it..it's like adding 1.
In other words, the Counter +1 = Text +1
Text+1Click = first sentence, Text+1moreclick = another sentence..= Each time you click it, you get another sentence..:)

would you then repeat this for long dialogs by doing a copy/paste of the code?


The code can be copied and pasted and just change the "Text" and "Avatar" it goes into the "button u press"

In the other Thread he has answered this as well and has included for the script [ClearDialogue] and [ClearDialogue True] for the Procedure. Thats for the avatar and text..

Hope that helps..:D

as a matter of fact lybberdoggy and mercedes i think i will as soon as i transfer money again to my account in america, im sending you both some thanks for all the work you do for those of us who are p"programming stupid"


That's a generous and thoughtful idea :D, but really I love helping and so does Lyberodoggy..Keeps us on our game..:P

Peace..


I think mercedes covered me.

Just don't forget to create the integer called counter.

Thanks for the compliment..
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Tue Nov 25, 2008 10:13 am

very nice! so for each "case" in the code, do i need to rename it the next number up? so one code is case 1, the next is case 2, should i then copy/paste and call it case 3?

oh and in the code up at the top, in the case 1, there is a space between the case and 1, but in case2, no space. lol hopefully you get that, is it neccesary to space it or is not needed?

thanks alot for everything!
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby mercedes » Tue Nov 25, 2008 10:28 am

sugawara wrote:very nice! so for each "case" in the code, do i need to rename it the next number up? so one code is case 1, the next is case 2, should i then copy/paste and call it case 3?

oh and in the code up at the top, in the case 1, there is a space between the case and 1, but in case2, no space. lol hopefully you get that, is it neccesary to space it or is not needed?

thanks alot for everything!


Hi Suga..

The cases go by the amount of "text" there is..In other words, sentences..so ya...case 1 is equal to sentence 1 or whatever it is u are making the case of..sometimes its pictures..sometimes its both..It's for every click, that the user makes---click-1=Case-1..

If u want to copy and paste and name it Case3...note that, that will be the exact same sentence and avatar of whatever case u copy.....but i'm sure u know that..:)

I'm not sure of which space u speak of.....:?

EDIT..nevermind I see it now.,..No I don't think it should matter.. but I know it works with space in between, .I'm sure its just an oversite..:D


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

Postby Lyberodoggy » Tue Nov 25, 2008 12:10 pm

There SHOULD be space between case and 2, otherwise an error will occur. Sorry for the typo, I m a lil messy
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Mon Dec 08, 2008 12:55 pm

Hello again,
This is my current problem lol. I have gotten the new scripts and such to work, however, unless i click quickly through the hotspot to further the conversation, after a few seconds the picture and text disappear. also, after i get all the way through the conversation, i have been trying to get the hotspot that triggers the conversation to dissappear at the end with a variable as well as use a variable to make the invisible hotspots for doors to appear (all this at the end of the conversation script)
alas i am getting an error message that says something like "wrong number arguments or invalid property assignment action.createtimedevent" something like this. so im posting the scripting here to look at. please let me know whats wrong.

Frames properties:
Code: Select all
ClearDialogue


vbs procedures:



Code: Select all
sub ClearDialogue()
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), ""
Text(Action.GetMergedTextIndex).caption=""
End Sub


hotspot #1 (used for triggering the conversation and the picture):
Code: Select all
counter=counter+1
Select Case counter
Case 1
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="Hello there."
Case 2
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="This is the Bar and grill."
Case 3
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="My name is Leah."+vblf+"I am the bartender."
Case 4
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="Would you do me a favor? Go find me..."+vblf+"a human arm to cook!"
Case 5
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="I need one desperately for my BBQ."+vblf+"If you find one bring it to me in the back room."
Case 6
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="I'll cook you up some great BBQ with it!"
Case 7
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="(After she says this she walks away.)"
End Select
Action.CreateTimedEvent 10, convo2 = 1, doors = 1, "ClearDialogue"


so this is where i am stuck now lol
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby Lyberodoggy » Mon Dec 08, 2008 1:45 pm

To insert multiple lines of code to CreateTimedEvent use :
Example
Code: Select all
Action.CreateTimedEvent 10, "convo2 = 1 : doors = 1 : ClearDialogue"
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Mon Dec 08, 2008 10:58 pm

Lyberodoggy wrote:To insert multiple lines of code to CreateTimedEvent use :
Example
Code: Select all
Action.CreateTimedEvent 10, "convo2 = 1 : doors = 1 : ClearDialogue"


thankyou! that fixed it! but im also still curious about a couple of other things.
between each case, if i dont click the button it will clear the text and picture and you need to click it again to get the text/pic back. is there a way to have the picture not dissapear?or even when you get to the end of a dialogue you click the button and it clears everything without a timed event?
2. is the timed event at the bottom for the whole script? that would explain why when i get to the last dialog it clears to quickly to read. could it be done that there is a timed event for each line of dialogue? or is it just the one timed event at the bottom for all of it? (this is in referance to it clearing to fast or if i set it to 60 secs then it clears to slow and i have to wait for the script to catch up)

and one more question! is there a script or line of script that could be put into a script to give the player an item OR send them to a different frame?

thanks for all the help again! i am going to pay you!
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby Lyberodoggy » Mon Dec 08, 2008 11:38 pm

Action.AddItem "itemname"
Action.GotoFrame "framename"

These are the commands you are looking for.

As for the event, you got it, that's the one clearing your avatar every time.
You can remove it and have te reset button also execute the ClearDialogue sub
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Tue Dec 09, 2008 5:29 am

between each case, if i dont click the button it will clear the text and picture and you need to click it again to get the text/pic back. is there a way to have the picture not dissapear?or even when you get to the end of a dialogue you click the button and it clears everything without a timed event?


Because of the Select Case..this is why u have to click it to see the next dialogue..and picture..You have it set to load a picture with each click..If you don't want it to dissapear..don't load another one..From the looks of it..Its the same picture u are loading..it's not necessary to load it each time. :)

2.
is the timed event at the bottom for the whole script? that would explain why when i get to the last dialog it clears to quickly to read. could it be done that there is a timed event for each line of dialogue?


Yes this is possible..just put it with each select case..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby sugawara » Tue Dec 09, 2008 5:58 am

lyberdoggy:
As for the event, you got it, that's the one clearing your avatar every time.
You can remove it and have te reset button also execute the ClearDialogue sub


just remove the last timed event to have the hotspot also cleardialogue? would it need to be in case?

Because of the Select Case..this is why u have to click it to see the next dialogue..and picture..You have it set to load a picture with each click..If you don't want it to dissapear..don't load another one..From the looks of it..Its the same picture u are loading..it's not necessary to load it each time.


hmm again, as if this isnt normal for me, just take out the picture of all the other cases and it should keep the one picture onscreen the whole time? should i take out the whole line of script saying to show the next picture?

hopefully that makes sense, also is there a way that at the end it could possibly repeat from the begining? )im so sorry that im always hounding you guys for info, i spend so much time looking at your help i feel like friends :) ) you might not want any payment but i would definately send you some nice stuff from japan!
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby mercedes » Tue Dec 09, 2008 6:19 am

Hi there....

hmm again, as if this isnt normal for me, just take out the picture of all the other cases and it should keep the one picture onscreen the whole time? should i take out the whole line of script saying to show the next picture?


Yes you could try that..in the other cases from 2 down..Remove..

Code: Select all
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"


See if that works..

You can create the word "repeat" on the frame..Or a picture that says repeat on it..and it is used with a variable..The text wouldn't be t hough..it's done differently..I guess it depends on which u want..:)

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

Postby Lyberodoggy » Tue Dec 09, 2008 8:06 am

If you don't have a clear or reset button, just enter another case to cleardialogue

If you DO have a reset button, just add cleardialogue to it
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Tue Dec 09, 2008 9:47 am

ok so far ive tried alot of what you said with no luck. I hve added a new case at the bottom with "ClearDialogue" in it with no luck, it wont go back and let me repeat from the begining. also is there a way to just take the timed event out so the person just has to click to forward the conversation? it doesnt matter as much if they repeat it if they have as much time as they need to read what is written. i guess i just keep running into the problem that i can change the timed event at the bottom of the script, but if i just wipe the whole line out, it gives me an error, and stupidly i dont know what to do with it.


ideas?


(I do think if i can, im going to order a book on VB from the states during christmas break here)
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby Lyberodoggy » Tue Dec 09, 2008 10:00 am

To reset the dialogue.
Create a hotspot that will be the reset button.
Add this code:

Code: Select all
counter=0
ClearDialogue


remove the case with the cleardialogue and the timed event from the end of the code.
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Tue Dec 09, 2008 9:17 pm

Code: Select all
counter=counter+1
Select Case counter
Case 1
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="Hello there."
Case 2
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="This is the Bar and grill."
Case 3
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="My name is Leah."+vblf+"I am the bartender."
Case 4
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="Would you do me a favor? Go find me..."+vblf+"a human arm to cook!"
Case 5
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="I need one desperately for my BBQ."+vblf+"If you find one bring it to me in the back room."
Case 6
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="I'll cook you up some great BBQ with it!"
Case 7
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="(After she says this she walks away.)"
End Select
Action.CreateTimedEvent 10, "convo2 = 1 : doors = 1 : ClearDialogue"



Hello again!
so as you can see ive got it all worked out and i found a way to add timed events to each case(not shown in the script above but to each case i added "Action.CreateTimedEvent 10, "ClearDialogue"),
but still i am getting it so that some dialogue stays on longer and some ends up being to quick to see.(i think it depends on how fast you click the hotspot for the next line of dialogue?)
to try to stop this i deleted all the timedevents and this last line of script with the timed event (Action.CreateTimedEvent 10, "convo2 = 1 : doors = 1 : ClearDialogue") but just the timedevent, i left the variable changes and the cleardialogue, but! i keep getting an error that says there is an expected statement. i assume it wants a timed event no matter what? so it cannot be undone so that a person just clicks through the dialogue and then on the last dialogue it changes the variables and also does the cleardialogue?
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby mercedes » Tue Dec 09, 2008 9:55 pm

Suga...would you be willing to try a different script..?..

One that has timed events with each dialogue...and enough time to see each sentence..with No "Cleardialogue" sub..? This can be optional...Its up to u..

Features..

Only script in the Frames Advanced..and in the Hotspot where dialogue appears..with timed events.

Select case--to click through each dialogue...or NONE..You can also have it so the dialogue just forwards on..by itself with only one click at the beginning..If you want..

Repeat button
Finished button..[go to another frame if no Repeat is necessary..]

If so..please let me know..and i'll write it up so all u have to do is copy and paste it..:) Or you can upload 1 frame..with whatever picture u want in there...and i'll do it for you that way..

Let me know exactly what features you want..if not listed here..write them up here and i'll do it...:)

Peace..

P.S. If You are getting an Expected Statement error...look for a place that is supposed to have a comma...Or if you have one to many..or a period where there should be none..vica versa..Also quotation marks..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Tue Dec 09, 2008 10:52 pm

I can't find the bug but there's one thing you can do to have different durations for the different lines:

modify your code like this
Code: Select all
counter=counter+1
diallength 'this variable doesn't have to be declared
Select Case counter
Case 1
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
Text(Action.GetMergedTextIndex).caption="Hello there."
diallength=5 'change this accordingly to each case
Case 2
.... etc
End Select
Action.CreateTimedEvent diallength, "convo2 = 1 : doors = 1 : ClearDialogue"
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby sugawara » Thu Dec 11, 2008 1:42 pm

hello lybber doggy and mercedes!

yeah id like a script an example of one where you can click at your own speed through the dialogue. so far if i use alot of time at the begining of the event, it seems to be ok, but it would be cool to have it sit there with the dialogue and not change at all if need be. (if you have a good example mercedes id love to see it!)

also! onegaishimasu (please in japanese) is there a script, or a line of code that would play a sound along with a dialogue? im still going on what i have previously done as you can see on this pages script, but i have some recorded voice id like to play along with the dialogue. if it is possible, let me know!

again, THANKYOU THANKYOU THANKYOU THANKYOU THANKYOU THANKYOU mercedes and lybberdoggy!!!
sugawara
Active Member
 
Posts: 90
Joined: Sat Oct 28, 2006 4:25 am

Postby Lyberodoggy » Thu Dec 11, 2008 2:14 pm

sugawara wrote:hello lybber doggy and mercedes!
also! onegaishimasu (please in japanese) is there a script, or a line of code that would play a sound along with a dialogue? im still going on what i have previously done as you can see on this pages script, but i have some recorded voice id like to play along with the dialogue. if it is possible, let me know!


Run through the documentation of AM. In VBS Techniques there is a Question "How can I play sound and video with vbs?" Go there, copy paste the code to your procedures and then after placing your files in the right folder play them using

Code: Select all
Playsound "filename.extention"
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Previous

Return to Post Your Own Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest