Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by dipixoft · Apr 18, 2014 at 01:36 AM · animationnetworkingnetworknetwork view

Need help with networking

Hi, My name is andys, i'm working in an Animation script, i have a problem with punch animations, the problem is: the attack animations won'w work and the player plays other animation, but idle, walk , works perfect, even swim animations, well i use Crossfade for the animation what works good and the attack animation i'm using CrossFade and i have a network view attached to the character with the animation on it, well here's the code, the code works perfect offline, sorry for my bad english.

 animation.CrossFade("blablbla");// works 
 
 animation.Play("bla bla bla ");// plays other animation

   
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image thornekey · Apr 18, 2014 at 03:39 PM 0
Share

im having a hard time getting what is wrong. Not to worry, we'll work through it. Is it when other players look at you punch it doesnt appear as a punch to them?

avatar image dipixoft · Apr 18, 2014 at 03:51 PM 0
Share

and now after i walk again after attack appear as swi$$anonymous$$g -.- damm

avatar image dipixoft · Apr 18, 2014 at 04:37 PM 0
Share

well i see the problem start wheni call the attack script

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by lancer · Apr 18, 2014 at 05:34 PM

I think, from what you have posted, that you will need to set the network view to observe the script. Also you should be sending it serialization so the other player knows what your player is doing.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dipixoft · Apr 18, 2014 at 05:52 PM 0
Share

well let's try XD

avatar image dipixoft · Apr 18, 2014 at 06:07 PM 0
Share

i did it and it doesn't work !! :(

avatar image lancer · Apr 18, 2014 at 06:12 PM 0
Share

Can you please put your full code?

avatar image dipixoft · Apr 18, 2014 at 06:17 PM 0
Share
 @script AddComponent$$anonymous$$enu("Naruto$$anonymous$$mo/Controladores personajes/Controlador Animacion")
 //enumeracion de los estados
 var puedeCambiar : boolean;
 var atacando : boolean;
 var animNombre : String;
 
 
 
 function idle(w : boolean) 
 {
     if(!w){
     
         if(atacando){
             animation.CrossFade("idle_taijutsu", 0.2, Play$$anonymous$$ode.StopAll);
             }else{
             animation.CrossFade("idle2", 0.2, Play$$anonymous$$ode.StopAll);    
             }
         
     }else{
     animation.CrossFade("idleNadar", 1, Play$$anonymous$$ode.StopAll);
     }
 }
 
 function ca$$anonymous$$ar(r : boolean, v : boolean)
 {
     animation["walk"].speed = 1.0;
     if(r){
     animation["walk"].speed = -1.0;
     }
      animation.CrossFade("walk", 0.2, Play$$anonymous$$ode.StopAll);
      
 }
 
 function ca$$anonymous$$arLado(r : boolean)
 {
         animation["SideWalk"].speed =1;
         if(r){animation["SideWalk"].speed =-1;}
         animation.CrossFade("SideWalk",0.1);
 }
 
 function correr(f : boolean , r : boolean)
 {
     if(r)
         {
         animation["run"].speed = -1.0;
         }else{
         animation["run"].speed = 1.0;
         }
 
     if(f)
         {
             animation.CrossFade("runfast",0.05,Play$$anonymous$$ode.StopAll);
         }else{
             animation.CrossFade("run",0.1,Play$$anonymous$$ode.StopAll);
             }
 }
 
 function nadarAdelante(b : boolean,f: boolean , d : boolean,normal : boolean)
 {
             if(normal){
                 if(f){
                     animation["nadar"].speed = 1.0;
                     animation["nadarRapido"].speed = 1.0;
                      if(!b){
                      animation.CrossFade("nadar", 0.2, Play$$anonymous$$ode.StopAll);    
                     }else{
                     animation.CrossFade("nadarRapido", 0.2, Play$$anonymous$$ode.StopAll);
                     }
                 }else{
                     animation["nadarAtras"].speed = 1;
                     animation.CrossFade("nadarAtras", 0.2, Play$$anonymous$$ode.StopAll);            
                 }
             }else if(d)
             {
                 animation["nadarAbajo"].speed = 1;
                 animation.CrossFade("nadarAbajo", 0.5, Play$$anonymous$$ode.StopAll);            
             }
 }
 
 
 function saltar()
 {
             animation.CrossFade("jumpFlip",0.1);
             return animation["jumpFlip"].length * 3;
 }
 
 function caer()
 {
     animation.CrossFade("fall",0.1,Play$$anonymous$$ode.StopAll);
 }
 
 function caerSuelo() // c es si cae si es false inicia el salto , s de speed si va corriendo 
 {            
     
         animation["jumpStart"].speed = 1.0;
 
         animation.CrossFade("jumpStart",0.1,Play$$anonymous$$ode.StopAll);
         
         return  animation["jumpStart"].length / 1.7;    
         
 
 }
 
 function dodge(f : boolean, s : float)
 {
     
     
     if(f){animation.Play("Flip");}
     else{
             animation["dodge"].speed = s;
             animation.Play("dodge",Play$$anonymous$$ode.StopAll);            
             }
     return animation["dodge"].length;
 }
 
 
 function taijutsu(g : String,h : int, a : boolean)
 {            
                 animNombre = (g + h);
             if(a)
                 {
                     animNombre = "air"+animNombre;
                 }
             animation[animNombre].layer = 1;    
             animation.Play(animNombre,Play$$anonymous$$ode.StopAll);            
             return animation[animNombre].length;        
 }


 
 
 
 
 
 
 
 
 
 
avatar image dipixoft · Apr 18, 2014 at 06:18 PM 0
Share

the script works perfect offline

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Synchronizing objects over the network 4 Answers

How do i animate threw network 1 Answer

Problem with Unity Network syncrhonization 0 Answers

Network Animator set trigger not working 2 Answers

Network Animator not working 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges