Category | Farming Simulator 17 |
Created | 22.12.2016 15:04 |
Kjffhafa (Zocker98nsmods) | 22.12.2016 15:05 |
---|---|
Hi, my doortrigger isn't working but Im sure I have everything done that it should work, l10n and inputbinding are correct, also animatedobjects. Would be great if someone can help me |
James Norred (Cajunwolf) | 22.12.2016 17:25 |
---|---|
Which door or gate are you trying to use? Make sure you have the door, or gate main animated part set with the path to the animatedObjects.xml file in it's user attributes. You put it in the maps folder and set the path like so ... "maps/animatedObjects.xml." |
Kjffhafa (Zocker98nsmods) | 22.12.2016 17:55 |
---|---|
I have this. in animatedObjects <!-- Schranke --> <animatedObject index="Schranke"> <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" /> <animation initialTime="0" duration="2"> <part node="1"> <!-- node -> child index --> <keyFrame time="0.05" rotation="0 0 0" /> <!-- translation, rotation, scale, visibility --> <keyFrame time="1.00" rotation="90 0 0" /> </part> </animation> </animatedObject> user attributes ( was set I didnt had to change smth) index: Schranke ( I changed it from doorright) xmlFilename: animatedObjects.xml I dont know why it havnt any onCreate files. Can you tell me what script have to use for index, xmlfilename and onCreate? |
Kjffhafa (Zocker98nsmods) | 22.12.2016 18:18 |
---|---|
I have this. in animatedObjects <!-- Schranke --> <animatedObject index="Schranke"> <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" /> <animation initialTime="0" duration="2"> <part node="1"> <!-- node -> child index --> <keyFrame time="0.05" rotation="0 0 0" /> <!-- translation, rotation, scale, visibility --> <keyFrame time="1.00" rotation="90 0 0" /> </part> </animation> </animatedObject> user attributes ( was set I didnt had to change smth) index: Schranke ( I changed it from doorright) xmlFilename: animatedObjects.xml I dont know why it havnt any onCreate files. Can you tell me what script have to use for index, xmlfilename and onCreate? |
Sicklebandit (Ggoerger) | 25.12.2016 09:24 |
---|---|
have you applied the correct user attributes to the transform group you want to animate? The parent must have 2 attributes added to it. 1. Name = index Type = string 2. Name = xmlFilename Type = string now that you have them added, fill in the blanks. The index attribute is the "animation index" which in your case would be Schranke. The xmlFilename attribute will be animatedObjects.xml now you should have something like this at the bottom of the .i3d file: <UserAttributes> <UserAttribute nodeId="XXX"> <Attribute name="index" type="string" value="Schranke"/> <Attribute name="xmlFilename" type="string" value="animatedObjects.xml"/> </UserAttribute> </UserAttributes> Also, make sure you have everything in the correct order underneath the parent in the scenegraph (trigger is the first under the parent so it's node is 0) |
James Norred (Cajunwolf) | 26.12.2016 05:13 |
---|---|
I've found that in most cases you also need to add a script callback like so. create the user attribute onCreate, set it to scriptCallBack, and in the field add AnimateObjects.onCreate or .. <UserAttribute nodeId="1271"> <Attribute name="index" type="string" value="oneDoorRight"/> <Attribute name="onCreate" type="scriptCallback" value="AnimatedObject.onCreate"/> <Attribute name="xmlFilename" type="string" value="maps/animatedObjects.xml"/> </UserAttribute> Also place your animatedObjects.xml in your maps maps directory and be sure your xml file link is as mine above, else the game engine won't find it. Notice mine is maps/animatedObjects.xml |
Note: Log in to post. Create a new account here.