About Store Forum Documentation Contact



Post Reply 
Several questions (dialogue and atmosphere)
Author Message
Jben Offline
Member

Post: #1
Several questions (dialogue and atmosphere)
Hello, I need your help.

-How to transfer settings from light (sun / sky glow and) that of the etiteur the source code of the game?

-Someone could help me program a system of day / night with a rotation of the sun and the moon?

-When I write a message in the chatbox the client, the character moves. (ZQSD), how to program a solution to avoid this?

Thank you for your help.
(This post was last modified: 06-23-2011 01:51 AM by Jben.)
06-23-2011 01:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
neo22 Offline
Member

Post: #2
RE: Several questions (dialogue and atmosphere)
Hi lindsay²
2 - there is a tutorial for this.
3 - use KB.eat() in your customTextLine::update method.
06-23-2011 09:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #3
RE: Several questions (dialogue and atmosphere)
Code:
STRUCT(ChatTextLine , TextLine)
//{
   virtual void update(GuiPC &gpc)
   {
      super::update(gpc);

      if(Gui.kb()==this)
      {
         if(Kb.bp(KB_ENTER)){Kb.eat(KB_ENTER); Str t=T(); t.clip(MAX_CHAT_LENGTH); CM.New(ChrData.name+": \""+t+"\""); Chat(t); hide();}
      }else
      {
         hide();
         if(Kb.bp(KB_T)){Kb.eat(KB_T); clear().activate();}
      }
   }
}ChatLine;

Merci pour ta réponse !

il y est pas déjà ?
(This post was last modified: 06-23-2011 03:27 PM by Jben.)
06-23-2011 03:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
neo22 Offline
Member

Post: #4
RE: Several questions (dialogue and atmosphere)
you can use Kb.eat() to remove every single character that is in the keyboard buffer. Then the player won't move because his update method c'ant get the keyboard character in the buffer.

Now in french grin :

lorsque tu utilise Kb.eat() tu supprime toutes les lettres qui dont dans le buffer de ton clavier. ensuite lorsque ton joueur ce met à il vérifie si la touche en question est dans le buffer du clavier, si tu a préalablement vidé le buffer avec Kb.eat(), il ne trouvera pas la touche, ton personnage ne bougera pas.

so your source will like something like this :
Code:
STRUCT(ChatTextLine , TextLine)
//{
    virtual void update(GuiPC &gpc)
    {
       super::update(gpc);

       if(Gui.kb()==this)
       {
          if(Kb.bp(KB_ENTER)){Str t=T(); t.clip(MAX_CHAT_LENGTH); CM.New(ChrData.name+": \""+t+"\""); Chat(t); hide();}
          Kb.eat();
       }else
       {
          hide();
          if(Kb.bp(KB_T)){Kb.eat(KB_T); clear().activate();}
       }
    }
}ChatLine;
06-23-2011 05:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #5
RE: Several questions (dialogue and atmosphere)
HUmm! merci.

J'ai suivis le "tuto" pour les cycle jour/nuit. j'ai essayer de bidouille en copient le code et sa ne donne rien ... tu peu m'aider ?
06-23-2011 05:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #6
RE: Several questions (dialogue and atmosphere)
I looked the code day / night in the file tutorial. I can not operate. I do not know or paste.
(This post was last modified: 06-26-2011 11:27 PM by Jben.)
06-26-2011 02:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #7
RE: Several questions (dialogue and atmosphere)
Can you help me, I'm in trouble
06-27-2011 03:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: Several questions (dialogue and atmosphere)
what's the problem? if it's about day/night tutorial then ask in public section, more people will help
06-27-2011 04:41 PM
Find all posts by this user Quote this message in a reply
Post Reply