Search Unity

Create destructable buildings with a single script ( free )

Discussion in 'Made With Unity' started by eskovas, Sep 7, 2010.

  1. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello Everyone,

    here is my contribution!
    hope you like it

    if you don't already know, i was making a game that consisted of destroying buildings to make a high score


    here is the link if you want to see it:
    http://forum.unity3d.com/viewtopic.php?t=52261

    well here is the tutorial:
    1- apply the script to all objects you want to joint
    2- the objects have to be close to each other
    3- all objects that have the script, will have to have the same tag and you have to assign the tag variable of the script to the tag of your objects

    if i didn't explain well, then ask a question.
    You can see how i did my buildings, by seeing and playing my game

    --------------

    well, here you can download the script:
    http://drunkenlizardgames.blogspot.com/2010/09/we-offer-script-today.html

    also would apreciate any contribution for all the work we had and are having

    also see our new game, its also on our blog
     
  2. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    come on...
    no responses?

    i would like to know if you think this is useful and would like to know what kind of buildings you did

    any feedback would be great

    and if you saw the game we are currently developing(it's on our blog), we would like to know what you think

    thanks
     
  3. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    So im not sure how this really works, or if im even using it properly... I just have some cubes n stuff here and that and made a tower out of them, put the script on each cube, and gave them all the same tags, added the tag in the script, ran it, it asked for the rigidbody, so i added that, then ran it, and it feels the exact same as adding a rigidbody, i see no difference with this script.

    Whats it exactly suppose to do?
     
  4. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    this script connects every object that is close to other object, by adding joints and connecting them automatically

    try playing my game, you will see what the script does
     
  5. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    Oh i see, but it doesnt seem to do that for me, it acts like a regular rigidbody tower instead of making them actual joint together.
     
  6. AquaGeneral

    AquaGeneral

    Joined:
    Oct 30, 2008
    Posts:
    141
    Thank you for posting this. I tried making the same kind of script for connecting breakable joints, however I never got that far.

    Be sure to share more thing like this in the future :D
     
  7. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    This might be usefull too to connect different car chassis parts and let the car chassis fall into pieces during crashes.