Search Unity

Building mechanics

Discussion in 'Scripting' started by Scott_FR, Jul 24, 2014.

  1. Scott_FR

    Scott_FR

    Joined:
    Jul 24, 2014
    Posts:
    1
    Hey, i am new to programing.

    I am trying to implement building mechanics into a friends game ( he is just a designer), but no luck there.

    I know a few games with those mechanics like Beast of prey (video of how it looks). And those mechanics would be greate for the game.

    Could it be possible to have minimum script that can be reworked ?

    The language i use the most is Java but it can be on C#

    I will be so greathfull for the ones that helps me.

    Thank you.
     
  2. cmcpasserby

    cmcpasserby

    Joined:
    Jul 18, 2014
    Posts:
    315
    If you want help with something like this you will have to meet the community halfway and try to get things started yourself first.
     
  3. Pysassin

    Pysassin

    Joined:
    Dec 27, 2012
    Posts:
    87
    I don't mean to offend but if drag/drop build mechanics like those displayed in the linked vid are beyond your grasp you REALLY need to hit the books and possibly some tutorials.

    The system shown can easily be done by instantiating the prefab with a transparency shader then moving its transform based on the mouses world space position. Once the mouse is clicked again you alter the variables on the script making it follow the mouse and change its shader to the normal diffuse or whatever you are using on it in its "built" form.

    All of this and much more can easily be found with a quick google search.
     
  4. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    It's a little more complicated than that, but that would be the start. The video also shows objects snapping to other objects, to make building easier, for instance.