在实现一个脚本系统时,你可以使用几种方法。
You can take several approaches when implementing a scripting system.
在开发一个脚本系统时你还应当考虑其他一些因素。
You also should consider other factors when developing a scripting system.
音乐、声音、脚本系统、自定义模型以及测试都获得了许多外界的帮助。
The music, voice, scripting systems, custom models, and testing had a lot of outside help.
为了完成这些我们需要向脚本系统中添加预定义的全局变量。
To accomplish this we can add predefined global variables to our scripting system.
脚本系统看上去像什么和怎样工作从根本上取决于谁将要使用它。
Deciding how the scripting system looks and works depends primarily on who will be using the scripting system.
图8 - 1展示了游戏设计者可以用脚本系统实现的模式移动的实例。
Figure 8-1 shows an example of a movement pattern that a game designer can implement using a scripting system.
如果你希望玩家能像游戏设计者一样使用脚本系统的话,这是十分重要的。
This is true particularly if you want players as well as game designers to use the scripting system.
我们可以提出一种像第3章的模式移动那样的概念并在脚本系统中实现它。
We can take a concept, such as pattern movement from chapter 3, and implement it in a scripting system.
然后游戏引擎让脚本系统可以使用这些文本,以便于分析文本并对此做出适当的响应。
The game engine then makes the text strings available to the script system, which analyzes the text and provides an appropriate response.
这一章讨论一些如何应用脚本系统到游戏AI问题中去的技术,以及这样做你能获得哪些好处。
This chapter discusses some of the techniques you can use to apply a scripting system to the problem of game AI, and the benefits you can reap from doing this.
基于VBS脚本系统的二次开发功能和强大的公式编辑器,满足高端用户的分析以及二次开发。
VBS script system based on the secondary development of functional and powerful formula editor, to meet the high-end user's analysis and secondary development.
如例8 - 16所示,脚本系统会拿玩家的位置和预先设定的值比较,当它们相等的时候陷阱就被触发了。
As Example 8-16 shows, the scripting system can compare the player position to some predetermined value and then trigger a trap if they are equal.
实际的游戏引擎中一个复杂完善的脚本系统可以使用一种已经存在的脚本语言,例如Lua或者Python。
A sophisticated scripting system might interface an already existing scripting language, such as Lua or Python, for example, with the actual game engine.
其次,也是最重要的,你的脚本系统可能增长,复杂到仅仅通过在文件中包含它们的数值来指定属性变得不切实际的地步。
Second, and most important, your scripting system can increase in complexity to the point where specifying attributes by just including their numerical values in a file becomes impractical.
例如,在我们的脚本系统中有一个控制着胆怯的巨人只是埋伏徒手的敌人(译者注:也可能指的是玩家)的全局布尔型变量。
For example, in our scripting system we might have a global Boolean variable called PlayerArmed which will direct a cowardly troll to ambush only unarmed opponents.
例如,在我们的脚本系统中有一个控制着胆怯的巨人只是埋伏徒手的敌人(译者注:也可能指的是玩家)的全局布尔型变量。
For example, in our scripting system we might have a global Boolean variable called PlayerArmed which will direct a cowardly troll to ambush only unarmed opponents.
应用推荐