Q: How to make text appear automaticly.

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

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

Q: How to make text appear automaticly.

Postby drebenk » Thu Feb 21, 2008 3:09 pm

I want do to the following thing: When I click on a hotspot the text that appears to be automated. For exaplme when I click on a character in my game he'll start talking "Hi my name is mr X. I've called you here because I have some work for you... What you need to do is to..." I know that I can put all that text at once but the text field in the bottom will hide half of my screen. I can make it appear by putting it into different hotspots but that will make people click 3-4-5 times on the same charecter in order to see all the text. So I want all that text to appear when the player clicks only once at the hotspot and each line to stay for about 4 secs. and after that the next line to appear.
So do I have to use scripting or what shall I do?
drebenk
Junior Member
 
Posts: 12
Joined: Sun Feb 03, 2008 12:26 am

Postby Chromegloss55 » Thu Feb 21, 2008 5:16 pm

I'm afraid scripting seems the only answer;

But it's simple, use this code;

In Hotspot Properties of the Hotspot clicked type:

Code: Select all
Action.Message "Line 1"
Action.CreateTimedEvent 4, "Action.Message ""Line 2"""
Action.CreateTimedEvent 8, "Action.Message ""Line 3"""
Action.CreateTimedEvent 12, "Action.Message ""Line 4"""


And so on...

There is another way you can do it (also with scripting), but I'd recommend it only for incredibly advanced projects.


Hope that helps. If you need any more clarification, just ask!
_________________
grand daddy purple plant
Last edited by Chromegloss55 on Tue Feb 24, 2009 3:11 pm, edited 1 time in total.
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!

Postby drebenk » Thu Feb 21, 2008 6:57 pm

Tnx that works just fine. But is it posible for the text to appear in the middle of the black field at the bottom of the screen.
When I type the text in the Actions tab under Display a text msg I put the text and after that I press Enter twice (that way there are two lines under the text) and when I click on that hotspot in game the text appears in the middle of the black field at the bottom of the screen.
So is this possible using the script you gave me?
drebenk
Junior Member
 
Posts: 12
Joined: Sun Feb 03, 2008 12:26 am

Postby Chromegloss55 » Sat Feb 23, 2008 8:33 pm

To insert a line simply use this code:

Code: Select all
Action.CreateTimedEvent 4, "Action.Message ""Line 1"" + vbLf + ""Line 2"""


To insert two lines:

Code: Select all
Action.CreateTimedEvent 4, "Action.Message ""Line 1"" + vbLf + vbLf + ""Line 2"""


I think that works. If it doesn't tell me. (If it doesn't work, try using vbCrLf instead of vbLf.)

Hope that helps!
_________________
the great depression
Last edited by Chromegloss55 on Tue Feb 24, 2009 3:11 pm, edited 1 time in total.
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!

Postby drebenk » Sun Feb 24, 2008 12:24 am

OK here is an example of what I want to do. The black area where the text shows is 4 lines. If I input 5 lines of text that area grows and takes part of the scene. So I have to use only 4 lines for inputting my text.

Line 1 (Top line):...............................................................
Line 2:........................... Hi my name is Jack......................
Line 3:......................Nice to meet you Jack how are you?....
Line 4 (Bottom line):..........................................................

When I use one of the codes you gave me the text displays like this:

With the first code (""Line 1"" + vbLf + ""Line 2""") the text shows like this:

Line 1 (Top line):...................................................................
Line 2:..................................................................................
Line 3:..........................Hi my name is Jack.............................
Line 4 (Bottom line):......Nice to meet you Jack how are you?.....

With the second code ("Action.Message ""Line 1"" + vbLf + vbLf + ""Line 2""") the text displays like this:

Line 1 (Top line):...................................................................
Line 2:....................................Hi my name is Jack..................
Line 3:..................................................................................
Line 4 (Bottom line):......Nice to meet you Jack how are you?.....

So as you can see there is always text on the bottom line and that's the thing I don't want. If there is only one line I want the text to appear in Line 2 (that way there will be 2 lines free at the bottom). And if there are 2 lines of text I want they to appear in Line 2 and Line 3 (that way there will be only 1 free line at the bottom.). So is this possible?
drebenk
Junior Member
 
Posts: 12
Joined: Sun Feb 03, 2008 12:26 am

Postby Chromegloss55 » Tue Feb 26, 2008 7:25 pm

I'm not exactly sure I understand, see if this code works:

Code: Select all
Action.CreateTimedEvent 4, "Action.Message """" + vbCrLf + ""Line 1"" + vbCrLf + ""Line 2"" + vbCrLf + """""


If that doesn't work try:

Code: Select all
Action.CreateTimedEvent 4, "Action.Message """" + ""Line 1"" + ""Line 2"" + """""


I'm going to try this out for myself, I'm writing this from memory in a cyber cafe. I'll go home and see what I can do. (I'm sure that the top code is correct, that's the way I learned to do it a few years ago).

Sorry, if that's no help. :wink:
_________________
Witchcraft Forum
Last edited by Chromegloss55 on Tue Feb 24, 2009 3:11 pm, edited 1 time in total.
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!

Postby drebenk » Tue Feb 26, 2008 11:16 pm

Yep this is the one: Action.CreateTimedEvent 4, "Action.Message """" + vbCrLf + ""Line 1"" + vbCrLf + ""Line 2"" + vbCrLf + """""

When I use this one the text shows like this:

Line 1 (Top line):...............................................................
Line 2:........................... Hi my name is Jack......................
Line 3:......................Nice to meet you Jack how are you?....
Line 4 (Bottom line):..........................................................

The first and the bottom lines are enmpty and only the middle two have text in them. So if I want to add more lines like those I need to do something like this?

Action.CreateTimedEvent 4, "Action.Message """" + vbCrLf + ""Line 1"" + vbCrLf + ""Line 2"" + vbCrLf + """""
Action.CreateTimedEvent 8, "Action.Message """" + vbCrLf + ""Line 1"" + vbCrLf + ""Line 2"" + vbCrLf + """""
Action.CreateTimedEvent 12, "Action.Message """" + vbCrLf + ""Line 1"" + vbCrLf + ""Line 2"" + vbCrLf + """""
etc.

And that way I'll have the next two lines from my text appear each 4 seconds right?
drebenk
Junior Member
 
Posts: 12
Joined: Sun Feb 03, 2008 12:26 am

Postby Chromegloss55 » Tue Mar 04, 2008 8:29 pm

Woah this is getting complicated! :?

Can we start again? :)
_________________
united states recession
Chromegloss55
Forum Master
 
Posts: 630
Joined: Sat Nov 03, 2007 2:49 pm
Location: God Knows!


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron