PC/Device 'Log in' sequence

OurJud
05 Jan 2015, 21:29
I've seen some pretty fancy stuff done with these games; fades, scrolls, typewriter effects.

I have a tablet/laptop type device in my game that the player must hack into to gather some information. As it stands it's pretty dull and doesn't feel much like you're hacking/looking at a tablet/laptop type device.

I would love to be able to do something similar to this and any help on whether it's achievable would be very much appreciated.

http://youtu.be/NErlfxwzrMs?t=2m34s

Silver
05 Jan 2015, 22:24
That's an 11 minute video.

OurJud
05 Jan 2015, 22:36
I'm talking about the PC screen thing, which is why I've set the clip to play from the relevant point.

Silver
05 Jan 2015, 22:39
Oh, it didn't work on my mobile device but that's probably a problem at this end. It just launches the youtube app and plays from the beginning.

OurJud
05 Jan 2015, 22:42
Silver wrote:Oh, it didn't work on my mobile device but that's probably a problem at this end. It just launches the youtube app and plays from the beginning.

Oh, I see. Well the rel vent point starts at 2:35

Anyway, I have discovered I can do it by just setting the 'typewriter' effect, but when I run the sequence I get the following error message:
Error running script: Too few parameters passed to TextFX_Typewriter function - only 1 passed, but 2 expected


This is my script:
TextFX_Typewriter ("Enter password | {command:log off:Log off}<br/>", 40)
get input {
if (result="337E18" or result="337e18") {
ClearScreen
TextFX_Typewriter ("Logging in. Please wait.<br/>", 40)
SetTimeout (3) {
TextFX_Typewriter ("Pear ePad4 | User ID: Lance Matthews | Session log: 2334#4 | {command:log off:Log off}<br/><br/>{command:contacts:Contacts}")
}
}
else if (result="log off") {
TextFX_Typewriter ("Logging off. Please wait.", 40)
SetTimeout (2) {
TextFX_Typewriter ("<br/>Logged off.<br/>")
}
SetTimeout (3) {
ShowRoomDescription
}
}
else {
TextFX_Typewriter ("<br/>Incorrect password | {command:log off:Log off}<br/>")
do (EpadCommand, "script")
}
}


Also, the {command:log off:Log off} which should render as a clickable link for logging off and returning to the game, is rendered as text only.

jaynabonne
05 Jan 2015, 22:48
This line with the second parameter is correct:

TextFX_Typewriter ("Logging in. Please wait.<br/>", 40)

Lines like this with only the text and not the second parameter are not:

TextFX_Typewriter ("<br/>Logged off.<br/>")

You need to pass two parameters (text, speed) in all cases. You have three cases in that code that don't have a speed parameter.

OurJud
05 Jan 2015, 22:51
So what you're saying is anything that prints out needs to have the ", 40" ?

Yup, that stops the error message, but what about the command links rendering as text and not links? I know I could have them be printed out as a separate and normal 'msg' so that they render properly, but how would I keep them on the same line as the text that has the typewriter effect on it?

Silver
05 Jan 2015, 23:08
Isn't there just a way to do an html span code like you can with font colour etc?

jaynabonne
05 Jan 2015, 23:15
Unfortunately, the way typewriter works, you can't have any HTML sequences in it (including <br/>). It didn't occur to me before when I was looking at your code. For example, it will output "<" and then "<b" and then "<br" and then... It would have to know how to recombine partial HTML tags, and that's not simple (e.g. it would have to know to stick a </span> on long before it reaches it if it sees a lead-in <span>).

Also, the way the effect works, it uses its own div (I believe) that is keeps appending text onto. That prevents it from being inline with other text.

OurJud
05 Jan 2015, 23:31
Yes, I discovered all this. In fact, the typewriter effect doesn't print html tags, but it does ignore them. I had to put the line separaters back in with a msg ("<br/") after each "TextFX_Typewriter".

I've also had to put the command links on their own line using the normal msg script so that they render as links.

Thanks, all.