Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Theres Problems with my scipts

Discussion in 'Scripting' started by XPGamingXPDK, Sep 3, 2014.

  1. XPGamingXPDK

    XPGamingXPDK

    Joined:
    Sep 3, 2014
    Posts:
    10
    Hello My name is Oliver im working on a game, some Minecraft and Rust. But there is a problem then say there coming problems i cant make it, have see the videos its java script and c# script i need. Theres problems so i cant test the game, i has see the tutorial videos and its not working.
     
  2. zDemonhunter99

    zDemonhunter99

    Joined:
    Apr 23, 2014
    Posts:
    478
    Can you post the code here so that we can view it and help you?
     
    elmar1028 likes this.
  3. XPGamingXPDK

    XPGamingXPDK

    Joined:
    Sep 3, 2014
    Posts:
    10
    1:using UnityEngine;
    2:using System.Collections;
    3:
    4:public class PickUp : MonoBehaviour {
    5:
    6: // Use this for initialization
    7: void Start () {
    8:
    9: }
    10:
    11: // Update is called once per frame
    12: void Update () {
    13:
    14:
    15:
    16:
    17: void OnTriggerEnter (Collider other) (
    18:
    19: Destroy(gameObject);
    20:
    21:
    22:
    23: )
    24:)
    25:
     
  4. XPGamingXPDK

    XPGamingXPDK

    Joined:
    Sep 3, 2014
    Posts:
    10
    24: )
    4 public class PickUp : MonoBehaviour {
     
  5. zDemonhunter99

    zDemonhunter99

    Joined:
    Apr 23, 2014
    Posts:
    478
    Erm... It looks like you have no idea what you're doing. You need to be acquainted with the basics of scripting in Unity. Go here and learn : http://unity3d.com/learn/tutorials/modules

    Also you might have tried to do this?
    Code (CSharp):
    1. 1:using UnityEngine;
    2. 2:using System.Collections;
    3. 3:
    4. 4:public class PickUp : MonoBehaviour {
    5. 5:
    6. 6: // Use this for initialization
    7. 7: void Start () {
    8. 8:
    9. 9: }
    10. 10:
    11. 11: // Update is called once per frame
    12. 12: void Update () {
    13. 13:
    14. 14:
    15. 15:
    16. 16:}
    17. 17: void OnTriggerEnter (Collider other) {
    18. 18:
    19. 19: Destroy(other.gameObject);
    20. 20:
    21. 21:
    22. 22:
    23. 23: }
    24. 24}
    25. 25:
     
  6. XPGamingXPDK

    XPGamingXPDK

    Joined:
    Sep 3, 2014
    Posts:
    10
    No sorry im new to Unity :).
     
  7. XPGamingXPDK

    XPGamingXPDK

    Joined:
    Sep 3, 2014
    Posts:
    10
    Whats should i write if i will only take tree up, in my game on other som cube or other things?
     
  8. SkillBased

    SkillBased

    Joined:
    Aug 11, 2014
    Posts:
    141
    Unfortunately, and FORTUNATELY, Unity is not that simple. You have to create your objects and then handle their behaviours through a script. You need to study Unity for a while and you will realize why your question doesn't have a simple answer. Learn along with tutorials and within a few weeks you should be able to answer these questions on your own.Good luck.
     
  9. XPGamingXPDK

    XPGamingXPDK

    Joined:
    Sep 3, 2014
    Posts:
    10
    Where can i download Unity things some a island or a tree?
     
  10. zDemonhunter99

    zDemonhunter99

    Joined:
    Apr 23, 2014
    Posts:
    478