Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a code sample #34

Open
HatsuneKid opened this issue Jun 30, 2023 · 3 comments
Open

Need a code sample #34

HatsuneKid opened this issue Jun 30, 2023 · 3 comments

Comments

@HatsuneKid
Copy link

Node "0>0|13|0|3|0" is a functional paddle.
`

</cylindered>
    <movingTools>
        <movingTool node="supportArm" playSound="true">
            <controls axis="AXIS_CRANE_TOOL2" invertAxis="false" mouseSpeedFactor="0.8" iconName="CRANE_EC_TRANSLATE_Y" />
            <animation animSpeed="1" animAcceleration="200" animName="folding4" />
        </movingTool>
    </movingTools>
    <dashboards>
       <dashboard displayType="ROT" valueType="movingTool" node="0>0|13|0|3|0" rotAxis="3" minRot="20" maxRot="-20" axis="AXIS_CRANE_TOOL2"  doInterpolation="true"/>
    </dashboards>
</cylindered>

`
How to make node"0>0|13|0|3|0" perform the same rotation action using ic? This doesn't work.

`

                <interactiveControl posText="$l10n_actionIC_liftSupportArm" negText="$l10n_actionIC_lowerSupportArm" >
                    <clickPoint node="0>0|13|0|3|3" size="0.1" type="OUTDOOR" iconType="SUPPORTARM" alignToCamera="false"/>
                    <animation name="folding4" speedScale="1.0" initTime="0.0" />
                    <dependingMovingTool isInactive="false" node="supportArm"/>
                    <dashboard raiseTime="1" activeTime="1" maxRot="20" minRot="-20" onICActivate="true" onICDeactivate="true" node="0>0|13|0|3|0" rotAxis="3" valueType="ic_action">
                    </dashboard>
                </interactiveControl>

`

@HatsuneKid
Copy link
Author

After I added displayType="ROT", it worked. But on activate and deactivate can only cause the paddle to rotate in the same direction, it wasn't the exercise mode I wanted.

@HatsuneKid
Copy link
Author

Problem solved!
`

                <interactiveControl posText="$l10n_actionIC_liftSupportArm" negText="$l10n_actionIC_lowerSupportArm" >
                    <clickPoint node="0>0|13|0|3|3" size="0.1" type="OUTDOOR" iconType="SUPPORTARM" alignToCamera="false"/>
                    <animation name="folding4" speedScale="1.0" initTime="0.0" />
                    <dependingMovingTool isInactive="false" node="supportArm"/>
                    <dashboard displayType="ROT" raiseTime="0.1" activeTime="1" maxRot="-20" minRot="0" onICActivate="true" onICDeactivate="false" node="0>0|13|0|3|0" rotAxis="3" valueType="ic_action">
                    </dashboard>
                    <dashboard displayType="ROT" raiseTime="0.1" activeTime="1" maxRot="20" minRot="0" onICActivate="false" onICDeactivate="true" node="0>0|13|0|3|0" rotAxis="3" valueType="ic_action">
                    </dashboard>
                </interactiveControl>

`

@HatsuneKid
Copy link
Author

Problem solved! `

                <interactiveControl posText="$l10n_actionIC_liftSupportArm" negText="$l10n_actionIC_lowerSupportArm" >
                    <clickPoint node="0>0|13|0|3|3" size="0.1" type="OUTDOOR" iconType="SUPPORTARM" alignToCamera="false"/>
                    <animation name="folding4" speedScale="1.0" initTime="0.0" />
                    <dependingMovingTool isInactive="false" node="supportArm"/>
                    <dashboard displayType="ROT" raiseTime="0.1" activeTime="1" maxRot="-20" minRot="0" onICActivate="true" onICDeactivate="false" node="0>0|13|0|3|0" rotAxis="3" valueType="ic_action">
                    </dashboard>
                    <dashboard displayType="ROT" raiseTime="0.1" activeTime="1" maxRot="20" minRot="0" onICActivate="false" onICDeactivate="true" node="0>0|13|0|3|0" rotAxis="3" valueType="ic_action">
                    </dashboard>
                </interactiveControl>

`

oh no! Animation "folding4" lasts for 6 seconds in this case. So the value of activeTime should also be 6.
This will cause once I deactivate the IC midway through activation, the animation of the paddle reverse will still take 6 seconds to complete instead of 3 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant