Hi,
I am working on MMO game. In my game, User1 attack on User2 (user2 get damage now the health need to be lessend) then the health of User2 should change. It perfectly work on local bases. I debug it thorougly. The problem I found from network sending is that it only send the information which is assigned on start OR default value.
Logic I am using to deal with health is that
1. I get weapon equipped by user1
2. Now, Each weapon contains its specification i.e. % of damage pass to user2 on different attacks.
3. Now, user2 convert the damage provided by user1 between 0-1 and pass it to its health bar and set value.
All above points are working on local now I need to pass the value return from point2 to network. So I need help in this case.
Any Idea to solve this.
Thanks in advance.
Following snippet will work on collider enter. And the varaible PassOnNetwork will pass on Network, to user2 from user1.
int AttackNo = GameManager.Instance.AttackNo;
float val = transform.root.gameObject.GetComponent ().Attack_Converter (WeaponNo,AttackNo,other.gameObject.GetComponent ().MyHealth);
PassOnNetwork = other.gameObject.GetComponent ().DecreaseHealth (val);
(Sorry for my english).
I am working on MMO game. In my game, User1 attack on User2 (user2 get damage now the health need to be lessend) then the health of User2 should change. It perfectly work on local bases. I debug it thorougly. The problem I found from network sending is that it only send the information which is assigned on start OR default value.
Logic I am using to deal with health is that
1. I get weapon equipped by user1
2. Now, Each weapon contains its specification i.e. % of damage pass to user2 on different attacks.
3. Now, user2 convert the damage provided by user1 between 0-1 and pass it to its health bar and set value.
All above points are working on local now I need to pass the value return from point2 to network. So I need help in this case.
Any Idea to solve this.
Thanks in advance.
Following snippet will work on collider enter. And the varaible PassOnNetwork will pass on Network, to user2 from user1.
int AttackNo = GameManager.Instance.AttackNo;
float val = transform.root.gameObject.GetComponent ().Attack_Converter (WeaponNo,AttackNo,other.gameObject.GetComponent ().MyHealth);
PassOnNetwork = other.gameObject.GetComponent ().DecreaseHealth (val);
(Sorry for my english).