Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content Count

  • Joined

  • Last visited

Community Reputation

-3 Poor

1 Follower

About wana7262

  • Rank
  • Birthday 12/22/1988

Profile Information

  • Gender
    Not Telling
  1. i want to show other players that which weapon i am using thats why i am doing this all...!!!! i want to sync the selected weapon on my screen with the selected weapon other seeing my player holding...!!! i think u can understand now
  2. Hello all, from past 6 days i am trying to sync selected weapons over network in my game... but i failed... i am using AU Fps kit and its weapon manager... but i want to sync the selected weapon that others will see on my network character holding it... here is little try i did.. but failed...please help me..!!! Thanks #pragma strict class NetworkWeaponManager extends Photon.MonoBehaviour { private var P_Weapon : int; private var S_Weapon : int; public var weaponsInUse : GameObject[]; // used weapons, among which you can switch. public var weaponsInGame : GameObject[]; public var weaponToSelect : int; var pw : PhotonView; function Start () { if(PlayerPrefs.HasKey("Selected_P")) { P_Weapon = PlayerPrefs.GetInt("Selected_P"); weaponsInUse[0] = weaponsInGame[P_Weapon]; } if(PlayerPrefs.HasKey("Selected_S")) { S_Weapon = PlayerPrefs.GetInt("Selected_S"); weaponsInUse[1] = weaponsInGame[S_Weapon]; } DeselectWeapon(); } function FixedUpdate() { if (photonView.isMine) { weaponToSelect = ToSelect; DeselectWeapon(); } else { DeselectWeapon(); } } function DeselectWeapon(){ //Dectivate all weapon for (var i : int = 0; i < weaponsInUse.length; i++){ weaponsInUse[i].SetActive(false); } SelectWeapon(weaponToSelect); } function SelectWeapon (i : int) { //Activate selected weapon weaponsInUse[i].SetActive(true); // Debug.Log("WeaponSelected"); } private var ToSelect : int; function OnPhotonSerializeView ( stream : PhotonStream, info : PhotonMessageInfo ) { if (stream.isWriting){ stream.SendNext(weaponToSelect); } else { ToSelect = stream.ReceiveNext(); } } } i am not good at scripting.... my Local Weapon Manager assigns the weaponToSelect variable of NetworkWeaponManager like this Declared a variable var NetWorkWeapons : NetworkWeaponManager; Assigning Values function Update () { if (Input.GetButtonDown("1") && weaponsInUse.length >= 1 && canSwitch && weaponToSelect != 0) { DeselectWeapon(); weaponToSelect = 0; NetWorkWeapons.weaponToSelect = 0; } //calling function at NetworkWeaponManager to Deselect the weapon NetWorkWeapons.DeselectWeapon(); } Thanks in Advance
  3. is it possible to convert its menu to NGUI? i only want to display list of server into NGUI
  4. you better checkout my android FPS Game....!!! https://play.google.com/store/apps/details?id=com.raptor.trinity.gfzombies
  5. how did u imported CS map in Unity3D?
  6. jawad did u found any mobile 3d car racing game project??? i have created one for myself
  7. is there any car tutorial exist for mobile? btw i tried to compile Unity Car for android... that gives me lots of error
  8. Unity's Server Down can anyone change this kit into photon based?
  9. can anyone help me? i have a character with biped.. i want to attatch headlook controller to it.... how can i configure it?? btw the character is of my FPS game... i want to give it a functionality to look around on mouse move.... HELP
  10. make something like this javascript: function Update () { if(input.GetKeyDown(KeyCode.//insert a key here or somthing//)){ animation.Play("Example"); networkView.RPC("PlayExampleAnimation", RPCMode.All); } } @RPC function PlayExampleAnimation () { animation.Play("Example"); } YOU NEED TO ADD A NETWORKVIEW ON THE GAMEOBJECT WHERE THIS SCRIPT WILL BE. you can simply do this by going to Component > Miscellanious > Network View and heres something more: RPCs and Networkviews are really important if you want to edit a game. if you want to learn how to use them, here are some links: RPC attribute http://docs.unity3d.com/Documentation/ScriptReference/RPC.html RPC functions http://docs.unity3d.com/Documentation/Components/net-RPCDetails.html network Views http://docs.unity3d.com/Documentation/Components/class-NetworkView.html network view functions http://docs.unity3d.com/Documentation/ScriptReference/NetworkView.html Another multiplayer example is the GTGD S1 tutorial on youtube, you can learn very much about it i hope i helped you That Method plays animations of opponent :-/ tried everything but cant fix it help plz
  11. bump.... why no one is replying me?
  • Create New...