Community Forum

Door trigger don't work

Forum Overview >> Editor

CategoryEditor
Created04.01.2017 11:16


Julien Juju (jujuokl) 04.01.2017 11:21
Hello,

I'm trying to add one of this building on my map from Giant Editor http://www.farming-simulator.com/mod.php?lang=fr&country=fr&mod_id=50215&title=fs2017
But door don't work and I don't know why.

User Attributes from my door

<UserAttribute nodeId="2232">
<Attribute name="index" type="string" value="oneDoorRight"/>
<Attribute name="onCreate" type="scriptCallback" value="AnimateObjects.onCreate"/>
<Attribute name="xmlFilename" type="string" value="maps/animatedObjects.xml"/>
</UserAttribute>

In animatedObjects.xml I have this

<animatedObject index="oneDoorRight">
<controls posKey="ANIMATED_OBJECT_OPEN_DOOR" negKey="ANIMATED_OBJECT_CLOSE_DOOR" triggerNode="0" posText="input_ANIMATED_OBJECT_OPEN_DOOR" negText="input_ANIMATED_OBJECT_CLOSE_DOOR"/>
<sound file="Sound/OpenDoorSound.wav" pitchOffset="1.00" volume="0.20" indoorVolumeFactor="0.55" indoorLowpassGain="0.85" pitchMax="1.15" />
<animation initialTime="0" duration="4">
<part node="1">
<keyFrame time="0.00" translation="0 0 0" />
<keyFrame time="1" translation="0 0 4.5" />
</part>
</animation>
</animatedObject>

In <l10n> I have this

<l10n>
<text name="input_ANIMATED_OBJECT_OPEN_DOOR">
<en>Open door</en>
<de>Tor öffnen</de>
</text>

<text name="input_ANIMATED_OBJECT_CLOSE_DOOR">
<en>Close door</en>
<de>Tor schließen</de>
</text>

<text name="input_LIGHTSWITCH_CLICK">
<en>Lightswitch on/off</en>
<de>Lichtschalter an/aus</de>
</text>
</l10n>

And in <inputBindings> I have this

<inputBindings>
<input name="ANIMATED_OBJECT_OPEN_DOOR" category="ONFOOT" key1="" key2="" device="0" button="BUTTON_3" mouse="MOUSE_BUTTON_LEFT" />
<input name="ANIMATED_OBJECT_CLOSE_DOOR" category="ONFOOT" key1="" key2="" device="0" button="BUTTON_1" mouse="MOUSE_BUTTON_RIGHT" />
<input name="LIGHTSWITCH_CLICK" category="ONFOOT" key1="" key2="" device="0" button="BUTTON_3" mouse="MOUSE_BUTTON_LEFT" />
</inputBindings>

Bilbo Beutlin (BBeutlin) 04.01.2017 12:04
<Attribute name="onCreate" type="scriptCallback" value="AnimateObjects.onCreate"/> is wrong.
It must be written "AnimatedObjects.onCreate"

Julien Juju (jujuokl) 04.01.2017 12:40
I edit it but still don't work :/

William Rowe (Bonger76) 04.01.2017 23:58

this is what my looks like it is a double door that is why to part nodes.it might be that thier is to much texyed in controls line


<animatedObject index="doorThree">
<controls posKey="ANIMATED_OBJECT_OPEN_DOOR" triggerNode="0" posText="input_ANIMATED_OBJECT_OPEN_DOOR" negText="input_ANIMATED_OBJECT_CLOSE_DOOR" />
<sound file="maps/sounds/OpenDoorSound.wav" pitchOffset="1.00" volume="0.40" indoorVolumeFactor="0.55" indoorLowpassGain="0.85" pitchMax="1.15" />
<animation initialTime="0" duration="8">
<part node="1">
<keyFrame time="0.00" translation="-0.073 0.009 -1.5" />
<keyFrame time="0.47" translation="-0.073 0.009 -4.3" />
</part>
<part node="2">
<keyFrame time="0.53" translation="-0.073 0.009 1.5" />
<keyFrame time="1.00" translation="-0.073 0.009 4.4" />
</part>
</animation>
</animatedObject>

Julien Juju (jujuokl) 05.01.2017 13:56
Mine animatedObjects.xml was with the building, and in placeable it work, i don't think there is problem in it

Julien Juju (jujuokl) 08.01.2017 18:30
Help please

James Norred (Cajunwolf) 09.01.2017 03:40
I have all three of those buildings working.

Here's your problem ...

<Attribute name="onCreate" type="scriptCallback" value="AnimateObjects.onCreate"/>

it's "AnimateObject" without the "s."

Use the stock animatedObjects.xml file, and place it in your maps, maps folder (looks like you have it right from your user attributes above), add the inputBindings to your modDesc.xml file, and you should be good to go. Lft Clk opens, and rt click closes.

Tony Price (brownthumb) 09.01.2017 08:28
if that don't work add a d to the word Animate so it looks like this"AnimatedObject.onCreate"

Julien Juju (jujuokl) 09.01.2017 08:37
OMG, thank you very much ! :D 2 weeks I'm stuck on this and I don't see it before :/


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