安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题




Is it okay to use "DelayCommand" to get the code to work?
Or does the programmer's saying work here: "If it works, then don't touch it!"?
Yeah, it's fine to use DelayCommand. You will use it a lot, particularly with cutscenes.
A few notes from working on cutscenes myself:
When a PC enters a module or area, for reasons unknown their position is undefined. If you print the location, you'll see that the area is OK, but the position is (0. 0. 0.) and the facing is 0.0.
The position is actually set shortly after the event.
So, in those event scripts, anything that depends on PC position will fail. SetCameraFacing fails because it is reset almost immediately. Functions of the type GetNearest# are unreliable. Conversations may not start if the PC is not yet next to the speaker, and so on.
One remedy is to use a trigger instead. Trigger OnEnter events are very reliable and seem to wait until the area is properly set up.
The other is to use a delay. From experience, it seems that as long as you choose a fairly generous delay, it will always work.
For conversations in particular, I find that a delay of 2 seconds on entering an area is advisable, otherwise you get Unknown Speakers and default portraits.
The fact is that I already use this method, but I still have to use the "DelayCommand" function.
In any case, thank you all for the advice! The main thing is that now everything has begun to work!