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 'pickup'.



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
    • unity3D | Example Projects
    • unity3D | Scripts
    • unity3D | Shaders
    • unity3D | Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • FREE FPS PROJECT
    • FPSKit Download
    • FPSKit Modifications/Tutorials
    • FPSKit WIP/Showcase
    • Discussions / Bug reports
  • 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 2 results

  1. morten2808

    My inventory Script!

    Hello so i am still new at coding so i don`t say this is perfect or something stupid but yea i am abit proud of the script i have made. And all can use it to non commercial and commercial use!! PS Thanks to Jolo309 for helping me though learning C# Best person ever to help and the niceste guy ever !! Now here is the Inventory Code: Now here is the Item Code: Here is the PickUp script: Here is the Slot script: Here is the codes to use And again a big thanks to Jolo309 for learning me everything
  2. Hello Guys i have a really weird Error while trying to use Raycast to ´pick up Items. It gives the error only if the item is near by if it is like at the end of the raycast then it works fine. I cant spot any mistake? I didnt change the code since it worked yesterday The error happens in Aufheben() i think.. where i try to sendMessage to the hit transform. Heres the code? #pragma strict var distanz : int = 5;// Wie weit soll die linie gehen? var aufheben : int = 1; // Wie viele Items er immer aufheben soll! Sollte 1 Bleiben! var items : int[]; var aufnahmeSound : AudioClip; var invScript : InventarScript; var gshow :boolean = false; var aufScript : Aufhebbar; function Start () { invScript = GameObject.FindWithTag("Player").GetComponent(InventarScript); aufScript = GameObject.FindWithTag("Player").GetComponent(Aufhebbar); } function Update () { Aufheben(); } function Aufheben(){ var hit : RaycastHit; //hit speichert was er trifft zB hit.tag == ""? var ray : Ray = Camera.main.ScreenPointToRay(Vector3(Screen.width*0.5, Screen.height*0.5, 0)); //erzeugt die unsichtbare linie in der mitte des bildschirms if(Input.GetKeyDown(KeyCode.E)){ //Wenn E gedrückt wird.. if(Physics.Raycast(ray,hit,distanz)){ //Und der raycast etwas trifft bis zu der distanz hit.transform.SendMessage("Aufheben", aufheben, SendMessageOptions.DontRequireReceiver); //soll er bei dem getroffenen die funktion "Aufheben" ausführen und die Zahl aufheben liefern } } } function Itemaufheben(itemID : int){ var i : int = 0; for(i=0; i<9;i++){ if(!invScript.inventarPlatzBelegt[i]){ invScript.inventarPlatzBelegt[i] = true; items[itemID] = items[itemID] + 1; GetComponent.<AudioSource>().PlayOneShot(aufnahmeSound); invScript.geld += 1; break; } if(invScript.inventarPlatzBelegt[8]){ gshow = true; yield WaitForSeconds(0.06f); gshow = false; } } } function OnGUI(){ if(gshow){ GUI.Box(Rect(Screen.width/2,Screen.height/2,300,20),"Kein Platz mehr in der Tasche."); } } I really need help because its for my "skilled work" in Informatic at school.
×