Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
Text(1).Caption=""
Text(2).Caption=""
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)
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.
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...
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"
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"
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"
with this code though, you make the variable "counter"
should work to further the conversation by clicking the hotspot instead of it automatically doing it through timed events right?
would you then repeat this for long dialogs by doing a copy/paste of the code?
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"
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..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 , but really I love helping and so does Lyberodoggy..Keeps us on our game..
Peace..
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!
ClearDialogue
sub ClearDialogue()
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), ""
Text(Action.GetMergedTextIndex).caption=""
End Sub
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"
Action.CreateTimedEvent 10, "convo2 = 1 : doors = 1 : ClearDialogue"
Lyberodoggy wrote:To insert multiple lines of code to CreateTimedEvent use :
Example
- Code: Select all
Action.CreateTimedEvent 10, "convo2 = 1 : doors = 1 : ClearDialogue"
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?
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?
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
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?
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex+1), "leahBS.gif"
counter=0
ClearDialogue
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"
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"
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!
Playsound "filename.extention"
Return to Post Your Own Tutorials
Users browsing this forum: No registered users and 0 guests