请选择 进入手机版 | 继续访问电脑版
跳转到:
打印 上一主题 下一主题

[资料] 帝国时代3第三人称视角触发程序

[复制链接]
LV20 ????

三好萌新

阅读权限
255
积分
33735
食物
4618
木材
2221
钱币
3876
茶叶
191
钻石
1325
经验
16094

幸运勋章

跳转到指定楼层
楼主
发表于 2019-10-8 16:19:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
花了一天时间研究制作的第三人称视角,终于制作成功了。有了这个触发程序,以后可以在帝国3制作第三人称视角剧情了。


触发程序:

	<Effect name="*Advanced Camera Face and Follow Unit">
		<Param name="Player" dispName="player" VarType="player"></Param>
		<Param name="DstObject" dispName="Target Unit" varType="unit">default</Param>
		<Param name="NormalZoom" dispName="NormalZoom" varType="long">16</Param>
		<Param name="MaxZoom" dispName="MaxZoom" varType="long">10</Param>
		<Param name="MinZoom" dispName="MinZoom" varType="long">10</Param>
		<Param name="ExtraZoom" dispName="ExtraZoom" varType="long">10</Param>
		<Param name="LimitPitch" dispName="LimitPitch" varType="long">20</Param>
		<Command>if(trCurrentPlayer()==%Player%)</Command>
		<Command>{</Command>
		<Command>trUnitSelectClear();</Command>
		<Command loop="" loopParm="DstObject">trUnitSelect("%DstObject%");</Command>
		<Command>trCameraLockOnUnit(true,0,-1);</Command>
		<Command>configSetInt("NormalZoom",%NormalZoom%);</Command>
		<Command>xsSetContextPlayer(%Player%);</Command>
		<Command>uiLookAtAndSelectUnit(kbGetBlockID("%DstObject%"));</Command>
		<Command>configSetInt("MaxZoom",%MaxZoom%);</Command>
		<Command>configSetInt("MinZoom",%MinZoom%);</Command>
		<Command>configSetInt("ExtraZoom",%ExtraZoom%);</Command>
		<Command>configSetInt("limitPitch",%LimitPitch%);</Command>
		<Command>map("mousez", "world", "");</Command>
		<Command>uiShowCameraStartLoc();</Command>
		<Command>}</Command>
	</Effect>




帝国时代3第三人称视角触发程序






	<Effect name="*Advanced Camera Reset">
		<Param name="EventID" dispName="Disable Trigger" VarType="event"></Param>
		<Param name="Player" dispName="player" VarType="player"></Param>
		<Command>trDisableTrigger(%EventID%);</Command>
		<Command>if(trCurrentPlayer()==%Player%)</Command>
		<Command>{</Command>
		<Command>trCameraLockOnUnit(false,0,-1);</Command>
		<Command>map("mousez", "world", "uiWheelRotate");</Command>
		<Command>configSetInt("NormalZoom",50);</Command>
		<Command>configSetInt("MaxZoom",60);</Command>
		<Command>configSetInt("MinZoom",29);</Command>
		<Command>configSetInt("ExtraZoom",29);</Command>
		<Command>configSetInt("limitPitch",47);</Command>
		<Command>cameraRotate();</Command>
		<Command>}</Command>
	</Effect>
帝国时代3第三人称视角触发程序
下载本触发程序(回复本帖后即可下载):
游客,如果您要查看本帖隐藏内容请回复
将下载的xml文件放到帝国3目录的trigger3文件夹里面。
  1. <Effect name="*Advanced Camera Face and Follow Unit">
  2. <Param name="Player" dispName="player" VarType="player"></Param>
  3. <Param name="DstObject" dispName="Target Unit" varType="unit">default</Param>
  4. <Param name="NormalZoom" dispName="NormalZoom" varType="long">16</Param>
  5. <Param name="MaxZoom" dispName="MaxZoom" varType="long">10</Param>
  6. <Param name="MinZoom" dispName="MinZoom" varType="long">10</Param>
  7. <Param name="ExtraZoom" dispName="ExtraZoom" varType="long">10</Param>
  8. <Param name="LimitPitch" dispName="LimitPitch" varType="long">20</Param>
  9. <Command>if(trCurrentPlayer()==%Player%)</Command>
  10. <Command>{</Command>
  11. <Command>trUnitSelectClear();</Command>
  12. <Command loop="" loopParm="DstObject">trUnitSelect("%DstObject%");</Command>
  13. <Command>trCameraLockOnUnit(true,0,-1);</Command>
  14. <Command>configSetInt("NormalZoom",%NormalZoom%);</Command>
  15. <Command>xsSetContextPlayer(%Player%);</Command>
  16. <Command>uiLookAtAndSelectUnit(kbGetBlockID("%DstObject%"));</Command>
  17. <Command>configSetInt("MaxZoom",%MaxZoom%);</Command>
  18. <Command>configSetInt("MinZoom",%MinZoom%);</Command>
  19. <Command>configSetInt("ExtraZoom",%ExtraZoom%);</Command>
  20. <Command>configSetInt("limitPitch",%LimitPitch%);</Command>
  21. <Command>map("mousez", "world", "");</Command>
  22. <Command>uiShowCameraStartLoc();</Command>
  23. <Command>}</Command>
  24. </Effect>
  25. <Effect name="*Advanced Camera Reset">
  26. <Param name="EventID" dispName="Disable Trigger" VarType="event"></Param>
  27. <Param name="Player" dispName="player" VarType="player"></Param>
  28. <Command>trDisableTrigger(%EventID%);</Command>
  29. <Command>if(trCurrentPlayer()==%Player%)</Command>
  30. <Command>{</Command>
  31. <Command>trCameraLockOnUnit(false,0,-1);</Command>
  32. <Command>map("mousez", "world", "uiWheelRotate");</Command>
  33. <Command>configSetInt("NormalZoom",50);</Command>
  34. <Command>configSetInt("MaxZoom",60);</Command>
  35. <Command>configSetInt("MinZoom",29);</Command>
  36. <Command>configSetInt("ExtraZoom",29);</Command>
  37. <Command>configSetInt("limitPitch",47);</Command>
  38. <Command>cameraRotate();</Command>
  39. <Command>}</Command>
  40. </Effect>
复制代码

视频链接:https://www.bilibili.com/video/av70551248


不是萌新,不是大佬,只是云玩家。
LV0 云玩家
阅读权限
10
积分
11
食物
15
木材
12
钱币
5
茶叶
0
钻石
0
经验
10
沙发
发表于 2022-4-14 09:50:48 | 只看该作者
第三人称修改
回复
LV1 Conscript

阅读权限
10
积分
17
食物
21
木材
15
钱币
13
茶叶
0
钻石
0
经验
16
板凳
发表于 2022-5-2 21:19:26 来自手机 | 只看该作者
谢谢你,借用一下触发程序
收起回复
  • 青天小羽 : 顺便提醒一下,地形高度是固定的
    2022-5-2 21:33| 回复
  • 我也说一句
    回复: UID:
您需要登录后才可以回帖 登录 | 注册

本版积分规则