Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Scripting help

Discussion in 'Scripting' started by ch66666, Jul 13, 2020.

  1. ch66666

    ch66666

    Joined:
    Jul 3, 2020
    Posts:
    7
    how would a script look like that would make me collect one specific object, and then when im entering a triggerbox to understand that ive brought it there, can also be a dubug text.

    i want a system that can make me collect 3 specific objects, and after i collect the first specific object i have to go to the specific location to leave it there, and after im leaving the object there, i have to go search the second object and i have to return it also back. i hope this was understandable. it would help me a lot since im a beginner.
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    5,487
    I don't think anybody is going to give you all that. So instead, you need to try to work on it yourself and then come back for help. Break down what you want and start working on each piece.

    Example, start with picking up/collecting on object. Start working on that script/system first. Look for tutorials on it. My guess is a system with a collider box that is set as a trigger and a tag that you can compare against would work. Once you get that, move to the next part. How do you indicate that you player has picked up the object? Is it a bool you toggle or a list that you add the object to that you can check against?

    See why nobody will do this for you? It's not just a few lines of code. You need to break it down, work on it, and then come back for help if you are confused or stuck.
     
    ch66666 likes this.
  3. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    248
    Perhaps this can give you some ideas:
     
    ch66666 likes this.
unityunity