Virtual reality is a very interesting technology for professional training. We can mention in particular the ability to simulate the activity without real danger, the flexibility in the informations' presentation, or the exact control parameters of the simulation allows to reproduc specific situations. Today, technological maturity allows to plan increasingly a complex applications. However, in one hand, this complexity increases the difficulty, at the same time, to propose a pedagogical and narrative control (to ensure a given learning and narrative structure) and some freedom of actions (to promote the emergence of various, unique and suprised situations in order to ensure a learning-by-doing/errors). In other hand, this complexity makes difficult the tracking and understanding of learner's path. In this paper, we propose 1-a scripting model for training virtual environment combining both a pedagogical control and the emergence of pertinent learning situations and 2tracking of the learner's actions, but also analysis and automatic diagnosis tools of the learner's performances.