こはね 发表于 2019-10-8 16:19:00

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

<font color="#212121"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font size="4">花了一天时间研究制作的第三人称视角,终于制作成功了。有了这个触发程序,以后可以在帝国3制作第三人称视角剧情了。</font></font></font><br><font size="5"><br></font><br><font size="5"><font size="5">触发程序:</font></font><div><font size="5"><font size="5"><br></font></font><pre style="white-space:pre-wrap;word-wrap:break-word;font-size:12.0pt;">        &lt;Effect name=&quot;*Advanced Camera Face and Follow Unit&quot;&gt;
                &lt;Param name=&quot;Player&quot; dispName=&quot;player&quot; VarType=&quot;player&quot;&gt;&lt;/Param&gt;
                &lt;Param name=&quot;DstObject&quot; dispName=&quot;Target Unit&quot; varType=&quot;unit&quot;&gt;default&lt;/Param&gt;
                &lt;Param name=&quot;NormalZoom&quot; dispName=&quot;NormalZoom&quot; varType=&quot;long&quot;&gt;16&lt;/Param&gt;
                &lt;Param name=&quot;MaxZoom&quot; dispName=&quot;MaxZoom&quot; varType=&quot;long&quot;&gt;10&lt;/Param&gt;
                &lt;Param name=&quot;MinZoom&quot; dispName=&quot;MinZoom&quot; varType=&quot;long&quot;&gt;10&lt;/Param&gt;
                &lt;Param name=&quot;ExtraZoom&quot; dispName=&quot;ExtraZoom&quot; varType=&quot;long&quot;&gt;10&lt;/Param&gt;
                &lt;Param name=&quot;LimitPitch&quot; dispName=&quot;LimitPitch&quot; varType=&quot;long&quot;&gt;20&lt;/Param&gt;
                &lt;Command&gt;if(trCurrentPlayer()==%Player%)&lt;/Command&gt;
                &lt;Command&gt;{&lt;/Command&gt;
                &lt;Command&gt;trUnitSelectClear();&lt;/Command&gt;
                &lt;Command loop=&quot;&quot; loopParm=&quot;DstObject&quot;&gt;trUnitSelect(&quot;%DstObject%&quot;);&lt;/Command&gt;
                &lt;Command&gt;trCameraLockOnUnit(true,0,-1);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;NormalZoom&quot;,%NormalZoom%);&lt;/Command&gt;
                &lt;Command&gt;xsSetContextPlayer(%Player%);&lt;/Command&gt;
                &lt;Command&gt;uiLookAtAndSelectUnit(kbGetBlockID(&quot;%DstObject%&quot;));&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;MaxZoom&quot;,%MaxZoom%);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;MinZoom&quot;,%MinZoom%);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;ExtraZoom&quot;,%ExtraZoom%);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;limitPitch&quot;,%LimitPitch%);&lt;/Command&gt;
                &lt;Command&gt;map(&quot;mousez&quot;, &quot;world&quot;, &quot;&quot;);&lt;/Command&gt;
                &lt;Command&gt;uiShowCameraStartLoc();&lt;/Command&gt;
                &lt;Command&gt;}&lt;/Command&gt;
        &lt;/Effect&gt;



        &lt;Effect name=&quot;*Advanced Camera Reset&quot;&gt;
                &lt;Param name=&quot;EventID&quot; dispName=&quot;Disable Trigger&quot; VarType=&quot;event&quot;&gt;&lt;/Param&gt;
                &lt;Param name=&quot;Player&quot; dispName=&quot;player&quot; VarType=&quot;player&quot;&gt;&lt;/Param&gt;
                &lt;Command&gt;trDisableTrigger(%EventID%);&lt;/Command&gt;
                &lt;Command&gt;if(trCurrentPlayer()==%Player%)&lt;/Command&gt;
                &lt;Command&gt;{&lt;/Command&gt;
                &lt;Command&gt;trCameraLockOnUnit(false,0,-1);&lt;/Command&gt;
                &lt;Command&gt;map(&quot;mousez&quot;, &quot;world&quot;, &quot;uiWheelRotate&quot;);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;NormalZoom&quot;,50);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;MaxZoom&quot;,60);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;MinZoom&quot;,29);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;ExtraZoom&quot;,29);&lt;/Command&gt;
                &lt;Command&gt;configSetInt(&quot;limitPitch&quot;,47);&lt;/Command&gt;
                &lt;Command&gt;cameraRotate();&lt;/Command&gt;
                &lt;Command&gt;}&lt;/Command&gt;
        &lt;/Effect&gt;</pre>



<br/>
下载本触发程序(回复本帖后即可下载):
将下载的xml文件放到帝国3目录的trigger3文件夹里面。


    <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>
    <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>





</font></font><br><font size="5">视频链接:</font><font size="5"><a href="https://www.bilibili.com/video/av70551248" target="_blank">https://www.bilibili.com/video/av70551248</a></font><br><br>70551248<br></div>

jinli 发表于 2022-4-14 09:50:48

第三人称修改

吊儿郎当玩游戏 发表于 2022-5-2 21:19:26

谢谢你,借用一下触发程序{:4_91:}

小趴菜、、、 发表于 2023-6-3 21:04:08

6666666666

ykage3 发表于 2023-11-11 20:26:04

厉害呢
页: [1]
查看完整版本: 帝国时代3第三人称视角触发程序