IPB


Welcome Guest ( Log In | Register )

 Forum Rules ArmedAssault.info Forum Rules
 
Reply to this topicStart new topic
> Lads, need a hand with first addy
Elliot Carver
post Aug 14 2010, 07:19
Post #1


Record Holder for the most Pornstars ever contacted
Group Icon

Group: Newshound
Posts: 567
Joined: 12-November 06
From: Beyond the event horizon
Member No.: 56



edit: Dave can ye stick this in ArmA2 OA ... iFail, cheers bud

Hey folks,
Been teaching myself how to make an addon from start to finish this week, ironing out the problems as i go. What im left with are a few issues that im gunna have to ask for a hand with (Been following Mondkalb's "How to create an Addon from scratch")

1. Cant get the animation to work in game but it works in Buldozer.
2. I managed to fix the damage and rvmat issue to make it solid but now when you shoot the addon it hard crashes back to the desktop lol (i only have O:A - destruction effect conflict?)
3. How to make the damage smoke effects smaller.

4. if your feeling generous how to attach a sound to the animation but i don't mind having a shot at that myself before asking here.

From what i can tell i've ironed out the O2 side of business and the Stringtable.csv is correct. Appreciate the help chaps, top quality community. [/ass kissing]

Carver


model.cfg

CODE
//The Class "CfgSkeletons" defines all moving objects.

class CfgSkeletons {
    //Always create class "default" first.
    //Your actual config-entry should be a derivate of this.
    class Default {
        isDiscrete = 1;
        skeletonInherit = "";
        skeletonBones[] = {};
    };
    //the derivate of your skeleton from claa "Default".
    class HDS_obj_skeleton : Default {
        isDiscrete=1;
        skeletonInherit="";
        
        // The moving objects are here defined
        // If two selections are linked together
        // they can be written next to each seperated by only a comma
        // if they are not linked, they need to be
        // seperated by  ,"",
        skeletonBones[]= {
            "Door",""
        };
        // The last entry gets no comma
    };
};


// This class defines the actual moves
class CfgModels {
    //load some bases from which you can derivate
    class rotation;
    // And again: class default
    class Default {
    sectionsInherit="";
    sections[]={};
    skeleton="";
    
    class Animations {};
    };
    
    // Your own "class default"
    class HDS_obj {
    sectionsInherit="";
    sections[]= {};

    skeletonName="HDS_obj_skeleton";    // same as in cfgskeletons
    };  

    // The name behind the class
    // dhas to be the exact name of your .p3d
    // without .p3d
    class HDS_Door_3x3m : HDS_obj {
        sectionsInherit="HDS_obj";
        sections[]={};

        // the rotation animation
        class Animations {
            class Open_door : Rotation { // name of the animation
            

            type="rotation";     // Type of movement
            
            source="user"; // Trigger of the animation
            
            selection="Door"; // the thing that moves
            
            axis="Door_Achse"; // take a guess what this does...
            
            memory = 1; // can the axis be found in memory-lod? 1 = yes, 0 = no
            
            angle0=0; // initial angle of the door in radians
            
            angle1=-1.6; // final position after playing the animation
            };
        };
    };
};


Config.ccp

CODE
/* Declaration as Addon-Content.*/
class CfgPatches         {
    /* "Hey ArmA2, this is an addon and it's named "HDS_Gate"*/
    /* The name should be indentical to the folder's name*/
    class HDS_Gate    {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
    };
};

/* The category in the editor like "Objects" or "Cars".*/
class CfgVehicleClasses {

    class HDS_GateVehicleClass {
        displayName = "HDS Gate";
    };
};

/* This is where arma gets the information about a new object. */
/* Donät be confused by the "vehicles" in CfgVehicles*/
class CfgVehicles {
    /* everything between here and "Class Land_ ..." is important for the animation to work properly without any "lags". */

    class All;

    class HouseBase;

    class Ruins: HouseBase {};
    
    /* Again your very own basic definition*/
    class HDS_Base_Object : All {
        scope = 0;
        side = 3;
        icon = "iconStaticObject";
        nameSound = "object";
        simulation = "house";
        picture = "pictureStaticObject";
        model="";
        sound = "Building";
        placement = "vertical";
        ladders[] = {};
        vehicleClass =  "";
        displayName = "";
        coefInside = 1;
        coefInsideHeur = 0.25;
        mapSize = 7.5;
        animated = true;
        armor = 200;
        destrType = "DestructBuilding";
        damageResistance = 0.004;

        class DestructionEffects {
            class Sound {
                simulation = "sound";
                type = "DestrHouse";
                position = "destructionEffect1";
                intensity = 0.1;
                interval = 1;
                lifeTime = 0.05;
            };

            class DestroyPhase1 {
                simulation = "destroy";
                type = "DelayedDestruction";
                lifeTime = 2.5;
                position = "";
                intensity = 0.1;
                interval = 1;
            };

            class DamageAround1 {
                simulation = "damageAround";
                type = "DamageAroundHouse";
                position = "";
                intensity = 0.1;
                interval = 1;
                lifeTime = 1;
            };
        };
    };

    /* Your very own base class for buildings*/
    class HDS_Housebase : HDS_Base_Object {
        scope = 1;
        model = "";
        icon = "";
        displayName = "";
        animated = true;
        vehicleClass = "HDS_GateVehicleClass";
        nameSound = "house";
        accuracy = 0.2;
        typicalCargo[] = {};
        transportAmmo = 0;
        transportRepair = 0;
        transportFuel = 0;
        mapSize = 11;
        cost = 0;
        armor = 800;
        /*extern*/ class DestructionEffects;
    };
    /* Everything between here and "Class All" (above)  is important for the animation to work without any "lags". */
    /* The "Land_" infront of all buildings is important for the destructioneffects to work properly. After the "Land_" the name of the .p3d (without the .p3d ending) has to follow!*/

    class Land_HDS_Gate_3x3m: HDS_Housebase {
        model = "\HDS_Gate\HDS_Gate_3x3m.p3d";    /* path to the object */
        displayName =  "$STR_HDS_Gate";     /* entry in Stringtable.csv */
                                            /* Important are the $ and the capital STR_*/
        nameSound = "";                        
        mapSize = 4;                        /* Size of the icon */
        icon = "iconStaticObject";            /* Path to the picture shown in the editor. */
        accuracy = 1000;  
        armor = 450;                        /* "Lifepoints", if you like to call it that way.*/
        destrType = "DestructBuilding";        /* type of destruction, when armor = 0 */
        scope = 2;                            /* Display it in the editor? 1 = No, 2 = Yes */
        class DestructionEffects : DestructionEffects
        {
            
            class Ruin1
            {
            simulation = "ruin";
            type = "\HDS_Gate\HDS_Gate_3x3m_Ruin"; /* path to the object*/
                /* Warning, if you use a custom rubble model, it has to be defined in the cfgvehicles (see below)*/
            position = "";
            intensity = 1;
            interval = 1;
            lifeTime = 1;
            };
        };
    };
    
    /*  Same name as stated in the Class DestructionEffects, but an "Land_" added infront*/
    class Land_HDS_Gate_3x3m_Ruin : ruins    {
        scope = 1;
        model = "\HDS_Gate\HDS_Gate_3x3m_Ruin.p3d";
        displayName = "Gate ruins";
    };
    
    /* Your doorsegment is derivated from the normal Gate.*/
    class Land_HDS_Tur_3x3m: Land_HDS_Gate_3x3m {
        model = "\HDS_Gate\HDS_Tur_3x3m.p3d";
        displayName =  "$STR_HDS_Tur";
    
        /* Arma needs to know, how the animation trigger is triggered*/
        class AnimationSources {
                /* name must be identical to the one given by the model.cfg ("Open_Door")" */
            class Open_door {
                source = "user";
                animPeriod = 4; /* duration in seconds */
                initPhase = 0;
            };
        };
        
        /* The entry to the actionmenu */
        class UserActions
        {            
            class Open_door
            {
                displayName="$STR_HDS_OpenDoor";
                onlyforplayer = true;
                position="Door_knopf";
                radius=3; /* visibility distance of the entry */
                condition="this animationPhase ""Open_door"" < 0.5";
                statement="this animate [""Open_door"", 1]";
            };
            class Close_door : Open_door
            {
                displayName="$STR_HDS_CloseDoor";
                condition="this animationPhase ""Open_door"" >= 0.5";
                statement="this animate [""Open_door"", 0]";
            };
        };
    };
};




--------------------
 
Quote Post
D@V£
post Aug 14 2010, 13:00
Post #2


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



What engine are you working with? I think this is in the wrong section unsure.gif


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post
Elliot Carver
post Aug 14 2010, 16:59
Post #3


Record Holder for the most Pornstars ever contacted
Group Icon

Group: Newshound
Posts: 567
Joined: 12-November 06
From: Beyond the event horizon
Member No.: 56



rofl mate read the top of my post tongue.gif

(7.30am) edit: Dave can ye stick this in ArmA2 OA ... iFail, cheers bud


thumbsup.gif


--------------------
 
Quote Post
D@V£
post Aug 14 2010, 17:13
Post #4


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



Got done moved! Hopefully no one will heckle me about how it's in the right section now that I've moved it like they did last time! ohnoo.gif


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post
Elliot Carver
post Aug 15 2010, 12:37
Post #5


Record Holder for the most Pornstars ever contacted
Group Icon

Group: Newshound
Posts: 567
Joined: 12-November 06
From: Beyond the event horizon
Member No.: 56



Boooo *cough...splutter* bloody age. cant boo like we used back in the ofp days ...
lol this thread is about as on track as Madeleine Mccann is to finish school

Its just the animation bit that im really stumped on stupid.gif


--------------------
 
Quote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 29th March 2024 - 00:16