Community Forum

My game does not see the animated Object Index items

Forum Overview >> Scripting

CategoryScripting
Created14.03.2019 03:13


Larry Davenport (TiggerD) 14.03.2019 03:13
Hi Everyone, I have started my first Map , and maybe soon stopping my first Map LOL

i have a question if I may

in the following user attribute the xmlFilename points to maps/ animatedObject.xml

<Attribute name="index" type="string" value="F5garageDoor1"/>
<Attribute name="onCreate" type="scriptCallback" value="AnimatedMapObject.onCreate"/>
<Attribute name="xmlFilename" type="string" value="maps/AnimatedObject.xml"/>
</UserAttribute>

my question is this?

if that animated Object Info already exist in the items xml, why cant we just point That xmlFilename attribute back to the items xml? Isn't it redundant to create or use a maps/AnimatedObject.xml File?

I have been trying to two weeks to get my gates and doors working and till now Nothing!!!

Below are my respective files and what errors its giving , so any advice along with a answer to my question would be greatly appreciated


I have this error code when loading my game on a new game and no mods installed its a new map i am creating,


2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .
2019-03-12 17:46 Error: index 'F5garageDoor1' not found in AnimatedObject xml 'C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml'!
2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .
2019-03-12 17:46 Error: index 'F5garageDoor2' not found in AnimatedObject xml 'C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml'!
2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .
2019-03-12 17:46 Error: index 'F5garageDoor3' not found in AnimatedObject xml 'C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml'!
2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .
2019-03-12 17:46 Error: index 'F5garageDoor4' not found in AnimatedObject xml 'C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml'!
2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .
2019-03-12 17:46 Error: index 'F5garageDoor5' not found in AnimatedObject xml 'C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml'!
2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .
2019-03-12 17:46 Error: index 'F5garageDoor6' not found in AnimatedObject xml 'C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml'!
2019-03-12 17:46 Error: C:/Users/larry/Documents/My Games/FarmingSimulator2019/mods/NewTown/maps/AnimatedObject.xml. time. .




the map loads in game but the doors and gates are not working and I am not sure of this error

My AnimatedObject.xml

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<animatedObjects>
<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>



<animatedObjects>

<!-- CowBarn -->

<animatedObject index="F5garageDoor1" >
<animation duration="7.5">
<part node="0|16|0|6|0|1"> <!--index of segment 1-->
<Keyframe time="0" translation="-0.0175004 -1.8 1.75" rotation="0 -0 0"/>
<Keyframe time="0.161" translation="-0.0175004 -1.22008 1.75" rotation="0 -0 0"/>
<Keyframe time="0.329" translation="-0.0175004 -0.619618 1.75" rotation="0 -0 0"/>
<Keyframe time="0.497" translation="-0.0175004 -0.0201835 1.75" rotation="0 -0 0"/>
<Keyframe time="0.664" translation="-0.0175004 0.580276 1.75" rotation="0 -0 0"/>
<Keyframe time="0.832" translation="-0.0175004 1.1796 1.75" rotation="0 -0 0"/>
<Keyframe time="1" translation="-0.0175004 1.77975 1.75" rotation="0 -0 35"/>
</part>
<part node="0|16|0|6|0|2"> <!--index of segment 2-->
<Keyframe time="0" translation="-0.0175004 -1.2 1.75" rotation="0 -0 0"/>
<Keyframe time="0.161" translation="-0.0175004 -0.620078 1.75" rotation="0 -0 0"/>
<Keyframe time="0.329" translation="-0.0175004 -0.0196182 1.75" rotation="0 -0 0"/>
<Keyframe time="0.497" translation="-0.0175004 0.579816 1.75" rotation="0 -0 0"/>
<Keyframe time="0.664" translation="-0.018703 1.18028 1.75" rotation="0 -0 0"/>
<Keyframe time="0.832" translation="-0.0271212 1.7796 1.75" rotation="0 -0 35"/>
<Keyframe time="1" translation="-0.361646 2.27124 1.75" rotation="0 -0 65"/>
</part>
<part node="0|16|0|6|0|3"> <!--index of segment 3-->
<Keyframe time="0" translation="-0.0175004 -0.6 1.75" rotation="0 -0 0"/>
<Keyframe time="0.161" translation="-0.0175004 -0.0200779 1.75" rotation="0 -0 0"/>
<Keyframe time="0.329" translation="-0.0175004 0.580382 1.75" rotation="0 -0 0"/>
<Keyframe time="0.497" translation="-0.0175004 1.17982 1.75" rotation="0 -0 0"/>
<Keyframe time="0.664" translation="-0.0175004 1.78028 1.75" rotation="0 -0 35"/>
<Keyframe time="0.832" translation="-0.361646 2.27109 1.75" rotation="0 -0 65"/>
<Keyframe time="1" translation="-0.905431 2.52481 1.75" rotation="0 -0 90"/>
</part>
<part node="0|16|0|6|0|4"> <!--index of segment 4-->
<Keyframe time="0" translation="-0.0175004 -9.53674e-008 1.75" rotation="0 -0 0"/>
<Keyframe time="0.161" translation="-0.0175004 0.579922 1.75" rotation="0 -0 0"/>
<Keyframe time="0.329" translation="-0.0175004 1.18038 1.75" rotation="0 -0 0"/>
<Keyframe time="0.497" translation="-0.0175004 1.77982 1.75" rotation="0 -0 35"/>
<Keyframe time="0.664" translation="-0.361646 2.27177 1.75" rotation="0 -0 65"/>
<Keyframe time="0.832" translation="-0.905431 2.52467 1.75" rotation="0 -0 90"/>
<Keyframe time="1" translation="-1.50543 2.52481 1.75" rotation="0 -0 90"/>
</part>
<part node="0|16|0|6|0|5"> <!--index of segment 5-->
<Keyframe time="0" translation="-0.0175004 0.6 1.75" rotation="0 -0 0"/>
<Keyframe time="0.161" translation="-0.0175004 1.17992 1.75" rotation="0 -0 0"/>
<Keyframe time="0.329" translation="-0.0271212 1.78038 1.75" rotation="0 -0 35"/>
<Keyframe time="0.497" translation="-0.361646 2.27131 1.75" rotation="0 -0 65"/>
<Keyyframe time="1" translation="-2.70543 2.52481 1.75" rotation="0 -0 90"/>
</part>
</animation>
<controls triggerNode="0|16|0|6|0|0" posAction="ACTIVATE_HANDTOOL" posText="action_openGate" negText="action_closeGate" />
<sounds>
<moving file="$data/sounds/tools/cotton_transporter/cotton_load_loop.ogg" loops="0" linkNode="0|16|0|6|0" volume="0.4" radius="25" innerRadius="3" fadeOut="0.25"/>
</sounds>
</animatedObject>



My i3d


frame time="0.664" translation="-0.905431 2.52534 1.75" rotation="0 -0 90"/>
<Keyframe time="0.832" translation="-1.50543 2.52467 1.75" rotation="0 -0 90"/>
<Keyframe time="1" translation="-2.10543 2.52481 1.75" rotation="0 -0 90"/>
</part>
<part node="0|16|0|6|0|6"> <!--index of segment 6-->
<Keyframe time="0" translation="-0.0175004 1.2 1.75" rotation="0 -0 0"/>
<Keyframe time="0.161" translation="-0.0175004 1.77992 1.75" rotation="0 -0 35"/>
<Keyframe time="0.329" translation="-0.361646 2.27187 1.75" rotation="0 -0 65"/>
<Keyframe time="0.497" translation="-0.905431 2.52488 1.75" rotation="0 -0 90"/>
<Keyframe time="0.664" translation="-1.50543 2.52534 1.75" rotation="0 -0 90"/>
<Keyframe time="0.832" translation="-2.10543 2.52467 1.75" rotation="0 -0 90"/>
<Ke <UserAttribute nodeId="37816">
<Attribute name="index" type="string" value="F5garageDoor1"/>
<Attribute name="onCreate" type="scriptCallback" value="AnimatedMapObject.onCreate"/>
<Attribute name="xmlFilename" type="string" value="maps/AnimatedObject.xml"/>
</UserAttribute>
<UserAttribute nodeId="37838">
<Attribute name="index" type="string" value="F5garageDoor2"/>
<Attribute name="onCreate" type="scriptCallback" value="AnimatedMapObject.onCreate"/>
<Attribute name="xmlFilename" type="string" value="maps/AnimatedObject.xml"/>
</UserAttribute>
<UserAttribute nodeId="37860">
<Attribute name="index" type="string" value="F5garageDoor3"/>
<Attribute name="onCreate" type="scriptCallback" value="AnimatedMapObject.onCreate"/>
<Attribute name="xmlFilename" type="string" value="maps/AnimatedObject.xml"/>

and of course it goes on, but i figure if I can fix one I can fix them all since they all have the same error



My Defaultitem.xml


<item mapBoundId="gasStation" className="BuyingStationPlaceable" filename="data/placeables/mapUS/gasStation/gasStation.xml" position="-372.367 58 903.479" rotation="0 0 0" />
<item mapBoundId="gasStationPump" className="BuyingStationPlaceable" filename="data/placeables/mapUS/gasStationPump/gasStationPump.xml" position="-273.972 57.992 -40.763" rotation="0 0 0" />
<item mapBoundId="sellingStationWool" className="SellingStationPlaceable" filename="data/placeables/mapUS/sellingStationWool/sellingStationWool.xml" position="1060.261 58.628 1571.958" rotation="-180 -90 -180" />







<item className="AnimalHusbandry" filename="placeables/FS19_CowHusbandry/cowHusbandry.xml" position="653.661 85.853 1271.44" rotation="0 180 0" defaultFarmProperty="true" farmId="1" />

</items>

I Hope I have provided enough info, to help me find this issue and get my gates and doors working, FYI The lights are working on all the imports i have added just a issue with doors and gates ect..

PinchTheFarmer 16.03.2019 12:00
I am not sure you are doing the nice XML skeleton :O, it have to be like that in XML:
The ID is not so important unless you maybe want to access this element from SCRIPT (like changing sounds/animation depending of something) , just NODES are important and linked to a part into Giant Editor, this is this part who will move :

<animatedObject saveId="huge_gate_01">
<animation duration="2.5">
<part node="0|10|2|6|2|0|1">
<keyFrame time="0.0" rotation="-180 0 -180"/>
<keyFrame time="0.5" rotation="-170 0 -180"/>
<keyFrame time="2.5" rotation="45 0 -180"/>
</part>
<part node="0|10|2|6|2|0|2">
<keyFrame time="0.0" rotation="0 0 0"/>
<keyFrame time="0.5" rotation="15 0 0"/>
<keyFrame time="2.5" rotation="125 -123 -120"/>
</part>
</animation>
<controls triggerNode="0|10|2|6|2|0|0" posAction="ACTIVATE_HANDTOOL" posText="action_openGate" negText="action_closeGate"/>
<sounds>
<moving file="$data/sounds/prefab/gate/gate_loop.wav" loops="0" linkNode="0|10|2|6|2|0" volume="0.8" radius="25" innerRadius="3" fadeOut="0.25"/>
<posEnd file="$data/sounds/prefab/gate/gate_opened.wav" linkNode="0|10|2|6|2|0|1" volume="0.8" radius="25" innerRadius="3"/>
<negEnd file="$data/sounds/prefab/gate/gate_closed.wav" linkNode="0|10|2|6|2|0|1" volume="0.8" radius="25" innerRadius="3"/>
<posEnd file="$data/sounds/prefab/gate/gate_opened.wav" linkNode="0|10|2|6|2|0|2" volume="0.8" radius="25" innerRadius="3"/>
<negEnd file="$data/sounds/prefab/gate/gate_closed.wav" linkNode="0|10|2|6|2|0|2" volume="0.8" radius="25" innerRadius="3"/>
</sounds>
</animatedObject>



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