HOW TO : Make an interactive console

Post Reply
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

HOW TO : Make an interactive console

Post by ezee »

Hello .

I want to implement AIML for NPC in vegastrike .
My need is to find out a way to talk to my bots , an interface .

Looking in the GUY.py sources , i've found :
http://spacetechs.free.fr/VEGASTRIKEDEV ... ialog.html
"""------------------------------------------------------------------"""
""" """
""" GUITextInputDialog - a little dialog in which you can enter text """
""" """
"""------------------------------------------------------------------"""


class GUITextInputDialog(GUIGroup):
def __init__(self,room,index,location,text,action,color,**kwargs):
GUIGroup.__init__(self,room,kwargs)
self.children.append(GUILineEdit(self.editcallback,room,index,text,location,color))
Do you think that is a convenient way for my project ?
( the player type " hello " , the bot say " hello sir " )

I need examples how to script a input/output console .
Can you help me ?

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: HOW TO : Make an interactive console

Post by klauss »

Yeah, I think reusing line edit is probably your best bet.

You can also use a list view for the message log.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Post Reply