fbef0102 / l4d2-unlimited-map Goto Github PK
View Code? Open in Web Editor NEWOriginal L4D2 maps are modified in this config. Create the Unlimited Map.
Original L4D2 maps are modified in this config. Create the Unlimited Map.
https://forums.alliedmods.net/showthread.php?t=331792&page=15
我在这里写了一些乱七八糟的东西,主要是各种bug(例如 nav_save 保存更改方面上的问题)和解决的方法。
试了一下让电脑上房:
https://www.youtube.com/watch?v=9IGKrb7KCsE
貌似只有最接近激光路障(触发相关触发器)的玩家接收到了“等待60秒”的信息。
我在另一张图测试 env_instructor_hint 这个东西时也注意到了这个BUG的存在,并且这个BUG似乎同时也在C1M2给发电机灌油桶的相关提示("The generator is way too low on gas to operate the door!")中出现。
于是我想了一个比较阴间的方法:能不能将【文字提示】的触发范围设置为一个无限大的值并将其禁用,同时将相关触发器的设置变更为重新启用文字提示触发器,从而使所有位于【文字提示】触发范围(无限大的)生还者接收到相关的推送信息的“广播”呢?
例如:
add:
{
"classname" "logic_auto"
"OnMapSpawn" "房顶_文本提示_触发器�Disable�0�-1"
"OnMapSpawn" "房顶_文本提示_触发器�addoutput�mins -9999 -9999 -9999�0.1�-1"
"OnMapSpawn" "房顶_文本提示_触发器�addoutput�maxs 9999 9999 9999�0.1�-1"
"OnMapSpawn" "房顶_文本提示_触发器�addoutput�solid 2�0.1�-1"
"OnMapSpawn" "我是一个用来启用文字提示的触发器�addoutput�mins 0 -50 0�0�-1"
"OnMapSpawn" "我是一个用来启用文字提示的触发器�addoutput�maxs 0 50 200�0�-1"
"OnMapSpawn" "我是一个用来启用文字提示的触发器�addoutput�solid 2�0�-1"
}
}
"classname" "trigger_once"
"targetname" "我是一个用来启用文字提示的触发器";在玩家移动到addoutput定义的范围时触发该触发器
"OnTrigger" "房顶_文本提示_触发器,Enable,,0.1,-1"
}
{
"classname" "trigger_once"
"targetname" "房顶_文本提示_触发器"
"filtername" "sky_filter_survs"
"spawnflags" "1"
"startdisabled" "0"
"origin" "-5945 -3228 744"
"OnTrigger" "房顶_文本提示_逻辑中继,Trigger,,0.1,-1"
}
{
"targetname" "房顶_文本提示_逻辑中继"
"classname" "logic_relay"
"spawnflags" "0"
"startdisabled" "0"
"OnTrigger" "房顶_文本提示,ShowHint,,0.1,-1"
}
{
"targetname" "房顶_文本提示"
"hint_target" "在这儿显示_房顶_文本提示"
"hint_caption" "快跑!"
"hint_color" "255 0 0"
"hint_range" "10000"
"hint_icon_onscreen" "icon_alert"
"hint_icon_offscreen" "icon_alert_red"
"hint_forcecaption""1"
"hint_pulseoption" "1"
"classname" "env_instructor_hint"
}
{
"origin" "-5412 -17 384"
"targetname" "在这儿显示_房顶_文本提示"
"spawnflags" "1"
"classname" "info_target"
}
嗯……我测试了一个类似的代码,显然它奏效了。
然而貌似有个小问题,这个触发器在镶嵌CAMERA相关代码时会导致视角切回后玩家无法移动、无法转动视角、没有第一人称手臂且无法射击。我甚至以为我电脑死机了XD。
这个问题我也测试了一下,简单来说就是不要把相关代码放进文本提示的触发器和逻辑中继(logic_relay)里。例如:
add:
{
"classname" "logic_auto"
"OnMapSpawn" "房顶_文本提示_触发器�Disable�0�-1"
"OnMapSpawn" "房顶_文本提示_触发器�addoutput�mins -9999 -9999 -9999�0.1�-1"
"OnMapSpawn" "房顶_文本提示_触发器�addoutput�maxs 9999 9999 9999�0.1�-1"
"OnMapSpawn" "房顶_文本提示_触发器�addoutput�solid 2�0.1�-1"
"OnMapSpawn" "我是一个用来启用文字提示的触发器�addoutput�mins 0 -50 0�0�-1";被定义“无限大的触发范围”的触发器似乎会对某些代码的正常工作产生不利影响,然而这个触发器没有定义“无限大的触发范围”,因此它应该不会引起某些问题。
"OnMapSpawn" "我是一个用来启用文字提示的触发器�addoutput�maxs 0 50 200�0�-1"
"OnMapSpawn" "我是一个用来启用文字提示的触发器�addoutput�solid 2�0�-1"
}
}
"classname" "trigger_once"
"targetname" "我是一个用来启用文字提示的触发器";在玩家移动到addoutput定义的范围时触发该触发器
"OnTrigger" "房顶_文本提示_触发器,Enable,,0.1,-1"
"OnTrigger" "房顶_相机镜头_逻辑中继,Trigger,,0.1,-1";显然有一些其他的代码为了正常工作而被放进了这个触发器里。
}
{
"targetname" "房顶_相机镜头_逻辑中继";看来下面那个逻辑中继是专门为妨碍风化的粗鄙之语提供的,这个逻辑中继显然比下面那个要高雅一些。
"classname" "logic_relay"
"spawnflags" "0"
"startdisabled" "0"
"OnTrigger" "房顶_相机,Enable,,0.1,-1"
"OnTrigger" "房顶_相机,Disable,,7.0,-1"
}
{
"classname" "trigger_once"
"targetname" "房顶_文本提示_触发器"
"filtername" "sky_filter_survs"
"spawnflags" "1"
"startdisabled" "0"
"origin" "-5945 -3228 744"
"OnTrigger" "房顶_文本提示_逻辑中继,Trigger,,0.1,-1"
;在这里添加其他的代码可能会产生一些不可预料的后果
}
{
"targetname" "房顶_文本提示_逻辑中继"
"classname" "logic_relay"
"spawnflags" "0"
"startdisabled" "0"
"OnTrigger" "房顶_文本提示,ShowHint,,0.1,-1"
}
{
"targetname" "房顶_文本提示"
"hint_target" "在这儿显示_房顶_文本提示"
"hint_caption" "快跑!"
"hint_color" "255 0 0"
"hint_range" "10000"
"hint_icon_onscreen" "icon_alert"
"hint_icon_offscreen" "icon_alert_red"
"hint_forcecaption""1"
"hint_pulseoption" "1"
"classname" "env_instructor_hint"
}
{
"origin" "-5412 -17 384"
"targetname" "在这儿显示_房顶_文本提示"
"spawnflags" "1"
"classname" "info_target"
}
总的来说,……也许不需要什么总结:
1)将HINT的相关代码(trigger_once*2和logic_relay)独立出来;
2)为HINT和其他事件按需定义触发范围(logic_auto);
3)将HINT的触发器定义为无限大范围,并将其禁用;
4)使某个事件重新启用HINT的触发器,从而实现HINT的广播;
5)没了,是不是很简单?学废了吗XD。
例如:
add:
{
"classname" "logic_auto"
"OnMapSpawn" "aviso_camara1_event�addoutput�mins -125 -125 0�0�-1"
"OnMapSpawn" "aviso_camara1_event�addoutput�maxs 125 125 200�0�-1"
"OnMapSpawn" "aviso_camara1_event�addoutput�solid 2�0�-1"
"OnMapSpawn" "aviso_camara1_tigger�Disable�0�-1"
"OnMapSpawn" "aviso_camara1_tigger�addoutput�mins -9999 -9999 -9999�0.1�-1"
"OnMapSpawn" "aviso_camara1_tigger�addoutput�maxs 9999 9999 9999�0.1�-1"
"OnMapSpawn" "aviso_camara1_tigger�addoutput�solid 2�0.1�-1"
}
{
"targetname" "aviso_camara1_event"
"origin" "5384 -2624 384"
"angles" "0 0 0"
"model" "*148"
"spawnflags" "1"
"filtername" "filter_survivor"
"classname" "trigger_once"
"OnTrigger" "!activator,speakresponseconcept,PlayerWarnCareful,0,1"
"OnTrigger" "director,PanicEvent,,2.5,-1"
"OnTrigger" "camara_end,Trigger,,60,-1"
"OnTrigger" "aviso_camara1_tigger,Enable,,0,-1"
}
{
"classname" "trigger_once"
"targetname" "aviso_camara1_tigger"
"filtername" "sky_filter_survs"
"spawnflags" "1"
"startdisabled" "0"
"origin" "5384 -2624 384"
"OnTrigger" "aviso_camara1_relay,Trigger,,0.1,-1"
}
{
"targetname" "aviso_camara1_relay"
"classname" "logic_relay"
"spawnflags" "0"
"startdisabled" "0"
"OnTrigger" "aviso_camara1,ShowHint,,0,-1"
}
{
"targetname" "aviso_camara1"
"hint_caption" "Wait until 60 seconds!"
"hint_icon_onscreen" "icon_tip"
"hint_color" "249 247 151"
"hint_static" "1"
"classname" "env_instructor_hint"
}
不知道为什么文本编辑器的插入代码不能用,凑合一下吧XD。
C1M3的激光路障的相关代码改成这样应该就能用推送给每名生还者了,虽然我没测试过。我等会还要去给C1M3的一个电锯锯铁丝网触发警报的事件添加类似的文本提示XD。
还有就是 aviso_camara1_event 的 addoutput - min / max 的范围我还没试过有多近/多远,不过这应该不会有太大影响。
这个(c1m2_streets.zip)是我用来测试 env_instructor_hint 时反复修改出的最终代码。
在测试过程中主要通过用控制台命令 warp_all_survivors_here 传送电脑(BOTS)到附近,然后用电脑触发相关事件以测试 hint_caption 是否推送给每名生还者。
应该没什么问题,除了不小心可能会摔死XD。
BTW没想到这图里的铁丝网是那个围栏大门塞地里弄出来的XD。
为了能上房顶我想着把空气墙(invisible walls)删掉,然而折腾半天不知道怎么删索性用了个能删掉空气墙的附加组件(add-on)。
还是上房适合我XD。
放了点狙击枪,想用同样的方法放铁铲放不了(放置动态物件 - 装饰 - 铁铲)。本来想弄点补给在里面当彩蛋的,然而我不知道怎么放医疗包、药瓶还有肾上腺素之类的东西。
有个空气墙在楼下窗台堵着,得走楼梯这个空气墙才会消失(估计是为了避免玩家从楼上直接跳到楼下的新改动)。索性弄成从楼下往楼上走,再从楼上往楼下走。
弹药堆也是不知道该怎么放。貌似二代的放不了,一代的弹药堆放了没法捡。
Modified.The.Parish.2022-11-20_0943.zip
——————
Modified.The.Parish.2022-11-14.zip
一杯水,一张图,一个BUG修一天。
——————
Modified The Parish, Part 1, 2 and 3 (2022-11-12).zip
包括 c5m1、c5m2 和 c5m3 的新版本。.nav 文件已打包进 vpk 文件内,它应该能够与移除空气墙的附加组件一并正常工作(不需要手动修改或覆盖原版的 .nav 文件)。
——————
先占个坑,做完了c5m1,后面的改天再慢慢改。
Modified The Parish, Part 1 (2022-11-01).zip
c5m1_waterfront.nav 需要扔到 /left 4 dead 2/update/maps/ 文件夹里,而相应的 vpk 也需要移动到 addons 文件夹里。
然后就是有报告说客户端和服务端在移除了空气墙的位置上有不同步的延迟问题,类似于丢包或 lux's survivor leg
我大概过两天会再弄一个不需要移除空气墙(也不会走那些路)的版本。
预览:https://www.youtube.com/watch?v=WyY53vRAHbw
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.