Community Forum

animatedObject

Forum Overview >> Editor

CategoryEditor
Created31.12.2018 02:00


John Campbell (Unknown) 31.12.2018 02:00
hi i have gate with a latch,draw bar and openable gates.

i have set the game keys for the gates (left mouse button).
<controls triggerNode="0|0" posAction="ACTIVATE_HANDTOOL" posText="action_openGate" negText="action_closeGate" />

then set the latch on letter o
<controls triggerNode="0|3" posAction="TOGGLE_PIPE" posText="action_openLatch" negText="action_closeLatch" />

which both work fine but can't find any where about the keys for any other letter on the keyboard.

so how do a find another one so all three have different keys in game

tahnks for your help

Bilbo Beutlin (BBeutlin) 31.12.2018 04:09
The keys posAction=".." are related to your "inputBinding.xml", where 'posAction' corresponds to <actionBinding action="..">.
You may also define the inputBindings and describing texts in the "modDesc.xml".

John Campbell (Unknown) 31.12.2018 08:04
thank you so much just i copied this line from some one else is mod
<controls triggerNode="0|3" posAction="TOGGLE_PIPE" posText="action_openLatch" negText="action_closeLatch" />

which i new worked but i couldn't figure out how the game new what to press as he didn't say anything in the mod desc.

but just searched the game directory in inputBindings.xml and see he just copied it from there.

thank you so much.

Andrei Sprinseana (xsenio) 03.01.2019 13:58
Hello, such a question, you can make the opening of the gate on the clock, as in FS17. Thank you in advance.
It seems to have done everything right, but it does not work.
<animatedObject saveId="gate_01" >
<animation duration="2">
<part node="0|1"> <!--index of left Door node-->
<keyFrame time="0.00" rotation="0 0 0" />
<keyFrame time="1.00" rotation="0 -120 0" />
</part>
<part node="0|2"> <!--index of right Door node-->
<keyFrame time="0.00" rotation="0 0 0" />
<keyFrame time="1.00" rotation="0 120 0" />
</part>
</animation>
<controls triggerNode="0|0" posAction="ACTIVATE_HANDTOOL" posText="action_openGate" negText="action_closeGate" />
<openingHours startTime="6" endTime="21" disableIfClosed="true" />
<sounds>
<moving file="maps/sounds/metalSqueak.wav" loops="0" linkNode="0" volume="0.8" radius="25" innerRadius="3" fadeOut="0.25"/>
<posEnd file="$data/sounds/prefab/gate/gate_opened.wav" linkNode="0" volume="0.8" radius="25" innerRadius="3" />
<negEnd file="$data/sounds/prefab/gate/gate_closed.wav" linkNode="0" volume="0.8" radius="25" innerRadius="3" />
</sounds>
</animatedObject>

Andrei Sprinseana (xsenio) 05.01.2019 12:17
Although prescribed the opening of the gate on openingHours, but does not automatically work, only then a year on foot I come up to the trigger then it works.

Bilbo Beutlin (BBeutlin) 05.01.2019 12:34
Control by time like <openingHours> isn't referenced in the doorTriggerSDK, so I doubt it is implemented.

Andrei Sprinseana (xsenio) 05.01.2019 12:42
Bilbo is written in the script itself.

Bilbo Beutlin (BBeutlin) 05.01.2019 13:00
hmm .. just looked into FS17 "animatedObject"
maybe this feature isn't ported to FS19 (yet).

Also be sure, the script name for FS19 is now "animatedMapObject" instead FS17 "animatedObject"

Andrei Sprinseana (xsenio) 05.01.2019 15:21
Bilbo here I found https://gdn.giants-software.com/documentation_scripting_fs19.php?version=script&category=65&class=7094#hourChanged118951
and it works, but only then I enter the trigger, the gate opens automatically.

Bilbo Beutlin (BBeutlin) 05.01.2019 17:59
I've read the LUA and as present, it works in this way:
If disableIfClosed="true" the door is enabled in openingHours and disabled the other time. That means, it is not opened automatically, but by trigger.

Perhaps an automatic is/was planned. There's a variable 'self.openingHours.isOpen' which is 'true' during openingHours, but I didn't see it referenced elsewhere.

Jos Kuijpers (Unknown) 06.01.2019 14:45
The door does open/close automatically at the times, but there was a bug I discovered last week that broke this. I fixed it and it will be in the next update. (We don't use this functionality in the base maps)


Note: Log in to post. Create a new account here.