Left 4 Dead 2

Left 4 Dead 2

48 ratings
Steins;Gate cola event
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts, Miscellaneous
Game Modes: Co-op
File Size
Posted
26.898 KB
16 Aug, 2024 @ 6:18pm
1 Change Note ( view )

Subscribe to download
Steins;Gate cola event

Description
It's technically possible, su I did it.

Requirement:
* Running on your Local Server(Listen Server) or your Dedicated Server.

Used TypicalType's c130 code[forums.alliedmods.net], as well as some code I wrote before.

一些笔记:
因为我没移植过与事件有关的代码,所以遇到了一些相对来说比较麻烦的问题。
比如,VScript 的 kill 也会删除其所生成的实体,即使生成实体的代码在移除实体的 kill 代码之后;
或者,相机也存在一些预料之外的问题(point_viewcontrol 类实体):要么相机不正常工作、要么相机会导致 !activator 被踢出。

好在我以前处理过这种问题。

对于前者,可以用 logic_auto >> RunScriptFile >> 另外一个用于生成实体的脚本来推迟实体的生成,也可以用 trigger_once 和 logic_relay 及 RunScriptFile 来进一步地推迟实体的生成。

对于后者,我用我之前用于修复 intro camera 问题的代码[forums.alliedmods.net]解决了这个问题:将 OnTrigger 的 camera,Enable 改为由 RunScriptFile 和 EntFire 执行。
* 这么做的原因是因为 VScript 的 EntFire 可以传递相机所必须的 !activator 参数。由于(嵌套的)logic_relay 的 OnTrigger 无法传递该参数,因此与该参数有关的相机功能无法正常工作。通过在外置的脚本文件中的 EntFire 来传递 !activator,相机动画就能正确地被播放。