Text Adventure in Rev?

Philip Richmond catventure at yahoo.co.uk
Mon Oct 24 15:00:40 EDT 2005


Hello,

Alex: It's nice to be a part of this community. I'm
looking forward to playing around with Rev to see what
I can sort... I can create the input textfield and the
game text textfield and used an 'on enterinfield'
event to get the player input when the player presses
the enter/return key in the field before emptying the
input textfield and printing a response in the larger
game textfield above. The focus then goes back to the
input textfield for the next player input... It's just
the scrolling that has me bamboozled. Thanks for your
reply.

Ken:

> on AddToConsole pText
>   if field "AdventureText" is empty then
>     put pText into field "AdventureText"
>   else
>     put CR & pText after field "AdventureText"
>     put the formattedHeight of field "AdventureText"
> into tFHT
>     put the height of field "AdventureText" into tHT
>     set the scroll of field "AdventureText" to (tFHT
> - tHT)
>   end if
> end AddToConsole

This looks interesting to try out so I'll investigate
it and let you know my findings. I want the player to
simply type in command(s) in an input text field,
press enter/return key and then see the results of
their command printed in the readonly game textfield -
without having to use mouse or arrow keys to scroll
for further text. I'd rather display a 'press a key to
continue' prompt before revealing further text in the
game text field... The scrolling would be as you
described in your reply with the ealier text scrolling
upwards out of sight and the newer text printed below
perhaps with a "What now?" prompt to the player..

Regards,
Phil


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com



More information about the use-livecode mailing list