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.

Search the Community

Showing results for tags 'java'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 11 results

  1. So im going to summarize what i need help with. I am trying to copy a kill streak from Call of Duty "The Mortar Strike" but with changes. i Want the player to go to a station and spend theyre In-Game points they have earned (from kills and other tasks) to be able to use this kill streak. and instead of a mortar strike. It will be artillery strike from the battleships in the distance. I would like to see someone write the script for me, but that takes time out of peoples lives, so Id like to learn if if possible. I was hoping if someone can show me a video tutorial of someone making a script for this situation :/ that would really help
  2. Version 0.1

    27 downloads

    A text file containing a JavaScript which assigns a random colour out of six choices. Copy and pasta this into MonoDevelop or whatever. Replace R, G and B in the declarations to get your own custom colours and not errors. Example: Color(R, G, B ) into Color(0.41,0.51,1.59); a cool blue. I recommend using www.colorpicker.com for finding RGB values. Be sure to divide the RGB values by 100 and make them float. haha It's a bit of hassle, but I just wanted to share it with the community.
  3. I'd like to implement counters in my java server-sided scripts, but how? As i understand there are not built in coroutines in Java. I have built custom game loop thread which simulates unity update loop with delta time. I could theoretically process all those counters in update loop, but i think using separate timer for each object would be a more logical step. I know there are some libraries which let you use their coroutines, but is there really no built in way? Thanks
  4. hi, im a bit of an idiot when it comes to programming and need some help. can someone help me make a simple boat script? I found some online but for some reason they all have errors im only using this for practise as I understand programming
  5. I want (When the fps kit 1.3.5 zombie is idle) the zombie to walk around randomly when the zombie has no target in sight. Also when I change the move speed of the AI script in the inspector it still keeps the speed for the zombie the same.
  6. var SplashTime : float = 2; function Start () { yield WaitForSeconds(SplashTime); Application.LoadLevel(1); } function Update () { } THIS SCRIPT IS JAVASCRIPT! Hey Guys! I've been with this community for about 15 days now? Something like that Anyway. I have came across a pretty cool Splash Screen script. I've been using it and it works great. Just attach this script to the main camera of the scene you want your splash screen in. But first your going to want to go into your build settings and make sure that your splash screen scene is at 0. And then your main menu (Or what ever scene you want to load after the first splash screen) is at 1. In the main camera inspector there should be a script called "Splash Screen" And there you can fiddle around with how long you want your splash screen to play for. Mines at 4.9 so it plays for 4.9 seconds. I do not take credit for this script. Found it on youtube Just thought it may help some people out there. PS. This is the first script I posted here. So idk if I posted it right or not. If not then ill past the code in the comments
  7. Guest

    Networking Multiplayer

    Heyy Guys, Just wounding.. I've been looking around for a while.. Now, I'm looking on helps of websites for this, but it doesn't answer my Question.. How would you go about doing a server like Minecraft, Valve Games, Dedicated Servers? Does anyone, know how to go about this? Cheers! Caleb Butterfield!
  8. Hello! I have coded a Login system in java. It is only Single Player, but it works well. Enjoy! var mySkin : GUISkin; var GeneralWidth = 73; // Width for most bottons should be the same. Use GeneralWidth. Use there custom Width if needed. var LoaderHeight = 10; var LoaderWidth = 10; var LogHeight = 101; var LogWidth = 163; var PlayerUsername = ""; var PlayerPassword = ""; var UserHeight = 35; var UserWidth = 1; var PassHeight = 65; var PassWidth = 1; var GameOwner = ""; var GameOwnerPassword = ""; var UsernameCORRECT = false; var PasswordCORRECT = false; var onSave : boolean = false; var Incorrect : boolean = false; var LogIn : boolean = false; var wrong : boolean = false; var waitTime : int = 3; function Start () { GameOwner = (PlayerPrefs.GetString("GameOwner")); GameOwnerPassword = (PlayerPrefs.GetString("GameOwnerPassword")); } function Update (){ // Updates each frames and checks if the TextArea is equal to the username we want if (PlayerUsername == GameOwner){ UsernameCORRECT = true; } else { UsernameCORRECT = false; } // Updates each frames and checks if the TextArea is equal to the password we want if (PlayerPassword == GameOwnerPassword){ PasswordCORRECT = true; } else { PasswordCORRECT = false; } if(onSave) { PlayerPrefs.SetString("GameOwner", GameOwner); PlayerPrefs.SetString("GameOwnerPassword", GameOwnerPassword); } } function OnGUI () { // Assign a skin to you menu GUI.skin = mySkin; // Background box GUI.Box (Rect (LoaderHeight,LoaderWidth,220,120), "Log-in"); //Text area for the username PlayerUsername = GUI.TextArea (Rect(GeneralWidth,UserHeight,100,20),PlayerUsername); //Text area for the password PlayerPassword = GUI.TextArea (Rect(GeneralWidth,PassHeight,100,20),PlayerPassword); // Loads level (0). This map can be set in the build settings if (GUI.Button (Rect (LogWidth,LogHeight,60,25), "Log-In")) { LogIn = true; if(UsernameCORRECT == true && PasswordCORRECT == true) { Application.LoadLevel(2); } else { Incorrect = true; wrong = true; } } if(GUI.Button (Rect (100,101,60,25), "Register")) { GameOwner = PlayerUsername; GameOwnerPassword = PlayerPassword; onSave = true; } if(Incorrect == true && LogIn == true) { if(wrong == true) { IncorrectGUI(); } } } function IncorrectGUI() { GUI.color = Color.red; GUI.Label (Rect (LogWidth,LogHeight + 30,200, 200), "Incorrect username or password"); yield WaitForSeconds(waitTime); wrong = false; } single_player_login.zip
  9. Hey Guys I just saw a few examples on how to make like Coin Collection Scripts but then I found a Script of a Guy who was stuck on a Script. He wanted to do if his player collected like 10 coins the the level would switch to the next scene. I also dont know what to do does anybody knows how to make the script working. Heres the Script: private var coinsBegin : int; private var coinsCurrent : int; var levelToLoad:int; //level to load private var coinToNext:int=10; //coin necessary to open next level function OnGUI() { coinsCurrent = 0; var coinObjects = FindObjectsOfType( GameObject ); for ( var coinObject : GameObject in coinObjects ) { if ( coinObject.name == "coin" ) coinsCurrent++; } GUI.Label( Rect( 0, 0, 320, 20 ), "Collected " + ( coinsBegin - coinsCurrent ) + " of " + coinsBegin + " coins!" ); } function Start() { var coinObjects = FindObjectsOfType( GameObject ); for ( var coinObject : GameObject in coinObjects ) { if ( coinObject.name == "coin" ) coinsBegin++; } } function Update() { if (coinsCurrent == coinToNext ) { Application.LoadLevel (2); } } Heres the Link to his question: http://answers.unity3d.com/questions/28245/collect-10-coins-load-next-levelscript-not-working.html
  10. Hi guys i was just wondering if anyone knew how to make a menu that pops up when the player dies. With buttons (and text) for restart and quit to menu (load a level) . Thanks
  11. Hey guys, just wondering if it was possible to add a line of code to this script the "Zombie" will have its waypoints and once the player comes in contact it will attack and if the player runs away it will go back to its waypoints? this is the script var target : Transform; //the enemy's target var moveSpeed = 3; //move speed var rotationSpeed = 3; //speed of turning var attackRange = 3; // distance within which to attack var chaseRange = 10; // distance within which to start chasing var giveUpRange = 20; // distance beyond which AI gives up var attackRepeatTime : float = 1.5; // delay between attacks when within range var anim : GameObject; var maximumHitPoints = 5.0; var hitPoints = 5.0; var attack : AudioClip; private var chasing = false; private var attackTime : float; var checkRay : boolean = false; var idleAnim : String = "idle"; var walkAnim : String = "walk"; var attackAnim : String = "attack"; var dontComeCloserRange : int = 4; private var myTransform : Transform; //current transform data of this enemy function Awake(){ myTransform = transform; //cache transform data for easy access/preformance anim.animation.wrapMode = WrapMode.Loop; anim.animation[attackAnim].wrapMode = WrapMode.Once; anim.animation[attackAnim].layer = 2; anim.animation.Stop(); } function Start(){ target = GameObject.FindWithTag("Player").transform; } function Update () { // check distance to target every frame: var distance = (target.position - myTransform.position).magnitude; if (distance < dontComeCloserRange){ moveSpeed = 0; anim.animation[idleAnim].speed = .4; anim.animation.CrossFade(idleAnim); }else{ moveSpeed = Random.Range(4, 6); anim.animation.CrossFade(walkAnim); } if (chasing) { //move towards the player myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime; //rotate to look at the player myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime); transform.eulerAngles = Vector3(0, transform.eulerAngles.y, 0); // give up, if too far away from target: if (distance > giveUpRange) { chasing = false; } // attack, if close enough, and if time is OK: if (distance < attackRange && Time.time > attackTime) { anim.animation[attackAnim].speed = 2.0; anim.animation.CrossFade(attackAnim); target.SendMessage( "PlayerDamage", maximumHitPoints); attackTime = Time.time + attackRepeatTime; audio.PlayOneShot(attack, 1.0 / audio.volume); } } else { // not currently chasing. anim.animation[idleAnim].speed = .4; anim.animation.CrossFade(idleAnim); // start chasing if target comes close enough if (distance < chaseRange) { chasing = true; } } } function OnDrawGizmosSelected (){ Gizmos.color = Color.yellow; Gizmos.DrawWireSphere (transform.position, attackRange); Gizmos.color = Color.red; Gizmos.DrawWireSphere (transform.position, chaseRange); }
×
×
  • Create New...