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

Everything posted by wana7262

  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?
  12. wana7262

    Animation Problem

    hi all i wrote this script to play animation over network using RPC here is the script but my character is not playing animation.... #pragma strict function Start () { } function Update () { if(networkView.isMine == true){ var ViewID = gameObject.networkView.viewID; if (Input.GetKey(KeyCode.W)) { gameObject.GetComponent(NetworkView).networkView.RPC("Walk",RPCMode.All,ViewID); if(Input.GetKey(KeyCode.LeftShift)) { gameObject.GetComponent(NetworkView).networkView.RPC("RunGun",RPCMode.All,ViewID);; } } else { gameObject.GetComponent(NetworkView).networkView.RPC("StandIdleGun",RPCMode.All,ViewID);; } } } @RPC function Walk(viewID : NetworkViewID){ var myID : NetworkView = NetworkView.Find(viewID); myID.animation.CrossFade("WalkGun"); myID.animation.wrapMode = WrapMode.Loop; } @RPC function RunGun(viewID : NetworkViewID){ var myID : NetworkView = NetworkView.Find(viewID); myID.animation.CrossFade("RunGun"); myID.animation.wrapMode = WrapMode.Loop; } @RPC function StandIdleGun(viewID : NetworkViewID){ var myID : NetworkView = NetworkView.Find(viewID); myID.animation.CrossFade("StandIdleGun"); myID.animation.wrapMode = WrapMode.Loop; } Any Help?
  13. Hi all.... I need a script which can play animations of character over network.... or u can say Animation sync script... need help.... Thanks
  14. OK I figured it out.....but the only 1 problem left.. that whenever i shoot, the audio came from the network player...!!! why? any help? Thanks
  15. Hi all, i m using FPS kit 2.0 MULTIPLAYER Release... as u know i have edited and created a game using OMA's Kit named as "Green Force" now making its Multiplayer version... everything works fine but got 4 Null reference exception... when my player got killed and respwaned and i kill the other player... then... my player's "MouseLook" and "WeaponScriptNew" Give Null reference exception... actually i figure it out that those scripts have lines in them like in "MouseLook" cmra = GameObject.FindGameObjectWithTag ("MainCamera"); and in "WeaponScriptNew" mainCamera = GameObject.FindWithTag("MainCamera"); these lines find and assign the MainCamera of connected player...so when connected player got killed...i got the NullReference Exception... Any Idea How to Solve it BTW the error exists in Actual FPS Kit MULTIPLAYER Version.....
  16. how to make server list or lobbies please help...
  17. What do you do? : Freelance Game Developer (C#, JavaScript, 3Ds Max, Photoshop) Do you require pay? : No or May be (according to Project) Can you show us your prior work? : http://www.raptorinteractive.com Age(Optional) : 23 Name(Optional) : Syed Waqas Ali Contact Details : admin@raptorinteractive.com OR https://www.facebook.com/wana7262 Other Information : Running a small Game Company named as Raptor Interactive... Only me working in it...
  18. where can i get those hands (bf3 hands) and gun???
  • Create New...