Search Unity

create and save a custom character for mmo

Discussion in 'Scripting' started by blackant, Sep 1, 2009.

  1. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    hello,

    i try to make a character editor.
    top arrows must change hair mesh
    others arrows must change textures only of eatch part of body
    (after that, maybe i'll make a widow for color choice for skin and hairs.)
    and finally, character must be saved as it....

    wich function and way may i work to succes it ?
     

    Attached Files:

  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    OK, big question... :wink:

    This needs to be broken down into separate tasks:-

    - Detecting clicks on the arrows.
    This could be done using GUI elements, but from the picture, it looks as though you want the arrows to be in 3D within the scene. I accidentally posted some code that shows how this can be done in this thread.

    - Choosing the body parts.
    This is probably fairly straightforward. You will need an array containing all the heads, another containing all the bodies... etc. You also need an integer for each array to mark which element is currently chosen. Whenever the user clicks on an arrow, you need to increment/decrement the marker for the appropriate array.

    - Saving the data.
    This really depends on how the system is going to work. If it will save the data locally then you need to use the Mono engine's file commands to load/save the data. If you are making a web player, then you will pass the data to URLs on the web server which will store it in a database or file. Unity has the WWW andWWWForm classes to communicate with web servers. Writing the server-side code is another issue altogether...
     
  3. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    ok, thanks for lighting,

    arrows are 2D GUI, i actually just set a print on eatch to see what should be done.

    i make a video that show advencement of work
    http://www.youtube.com/v/ieFsa7-FcQ4&hl=fr&fs=1

    if anybody is interrested to help me , it should be nice and welcome for sure !
     
  4. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    how do i do that ?

    and finally the saving must be sended to derver.