Search Unity

showing an animation to all players

Discussion in 'Multiplayer' started by timbo, Jun 16, 2009.

  1. timbo

    timbo

    Joined:
    Jun 16, 2009
    Posts:
    4
    hi i am adding buildings to sfsisland demo. I am a complete novice and am not that good at code. (probs not the best start)

    and i have modeled and animated sliding doors made in 3dsmax that are trigered when a player walks up to them by way of a box colider.

    the code i have used is below.

    function OnTriggerEnter () {
    animation.CrossFade ("open");
    Debug.Log ("open");
    }
    function OnTriggerExit () {
    animation.CrossFade ("closed");
    Debug.Log ("closed");
    }


    my problem is that although i can see the animation when i trigger it, other players cant! could anyone tell me why that is and how do i correct it please.

    many thanks

    Tim
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you need to syncronize animation states.
    Thought I thought that happened automatically in the sfs island demo
     
  3. timbo

    timbo

    Joined:
    Jun 16, 2009
    Posts:
    4
    Thanks for you reply. only i realy am a novice and although i have some idea of what your saying i have no idea how to impliment it. could you expand a bit please? or point me to a realy easy tutorial :)

    if sfsislanddemo does do syncronizing it doesnt seem to do it to my animation, would there be a way of telling the demo that my animation exists so it can sync it?

    ty

    tim