Français Solved Comment faire fonctionner un modèle de Plots Fix animé

  • Auteur de la discussion Auteur de la discussion mrtony46
  • Date de début Date de début
Solution
Salut,

Tu peux remplacer dans ton config.cpp:

Code:
 class AnimationSources
        {
            class Plots_Auto_source
            {
                source="user";
                animPeriod=3;
                initPhase=0;
            };
        };
 class Useractions{           
            
            class Monter_Plots_1

            {

                displayName="<t color='#0065ef'>Monter les plots</t>";

                radius=7;

                position="Door_2_trigger";

                onlyforplayer=0;

                condition="((this animationPhase 'Door_2') < 0.5)";

                statement = "this animate [""Door_2"", 1]";

            };

            class Descendre_Plots_1: Monter_Plots_1

            {...
Oui regarde
Code:
    class MrTony46_Plot_Auto: House
    {
        scope=2;
        displayName="Plots Fix";
        model="\MrTony46_Object\Models\Mapping_Ville\Plots_Auto.p3d";           
        author="MrTony46";
        icon="MrTony46_Object\icon.paa";                   
        editorCategory="MrTony46";
        editorSubcategory="Mapping_Object_Ville";
        destrType="DestructNo";
        mapSize=10;
        cost=10;
        class AnimationSources
        {
            class Plots_Auto_source
            {
                source="user";
                animPeriod=3;
                initPhase=0;
            };
        };
            class Monter_Plots_1
            {
                displayName="<t color='#0065ef'>Monter les plots</t>";
                radius=7;
                position="Door_2_trigger";
                onlyforplayer=0;
                condition="((this animationPhase 'Door_2') < 0.5)";
                statement="this animate [""Door_2"", 1]";
            };
            class Descendre_Plots_1: Monter_Plots_1
            {
                displayName="<t color='#01df01'>Descendre les plots</t>";
                condition="((this animationPhase 'Door_2') >= 0.5)";
                statement="this animate [""Door_2"", 0]";
            };
        };
 
Code:
class CfgSkeletons
{
    class Default
    {
        isDiscrete = 1;
        skeletonInherit = "";
        skeletonBones[] = {};
    };

    class MrTony46_Object_skeleton: Default
    {
        skeletonInherit = "Default";
        skeletonBones[] = {"Door_2"};
    };
};   

class CfgModels
{
    class Default
    {
        sectionsInherit = "";
        sections[] = {};
        skeletonName = "";
    };

    class Plots_Auto: Default // class name must be the same as name of p3d
    {
        skeletonName = "MrTony46_Object_skeleton"; // Set to use above defined skeleton.
        sections[] = {};
        sectionsInherit = "";       
        class Animations
        {
            // Animation for rotating door #1 (without a door handle)
            class Door_2
            {
                type            = vertical;   
                source            = Plots_Auto_source; // Controler defined in class AnimationSources in config.cpp.
                selection        = Plot; // Selection from p3d that also has to be defined as a bone in this model`s skeleton.
                axis            = Door_2_axis; // Axis of the rotation.
                memory            = 1;
                minValue        = 0; // Value of the controller at which the rotation will be angle0
                maxValue        = 1; // Value of the controller at which the rotation will be angle1
                offset0         = 0;
                offset1         = 1;
                angle0            = 0;
                angle1            = -(rad 90); // "rad" converts from degrees to radians
            };
        };
    };
};
 
Reprend bien ce que je t'ai mis, il y a la classe AnimationSources et la classe UserActions et tu peut enlever les angle0 et angle1 de ton model.cfg
 
Dernière édition:
Salut, vu que le problème est pas encore régler renvoie ton config.cpp et ton model.cfg et si tu peut aussi renvoyer un screen de p3d avec les memory et la 3d ?