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.

silasfriedrich

Member
  • Content Count

    37
  • Joined

  • Last visited

Posts posted by silasfriedrich


  1. Hi everyone,

    I have trouble with my spawning system and I can't find a good way to get it to work. So basically in my game you should build a tower with blocks (cubes). And every time you place a new block a new block should spawn at a random spawn. So I worked hours on this and im really bad at scripting. This is what I have :

     

    This script is on the blocks:

    Please login or register to see this code.

    This is on the base you build on:

    Please login or register to see this code.

    and this is on a empty gameobject:

    Please login or register to see this code.

    Now what working is you place a block on the base. Then a new block spawns at a random location. But if I place the new block on the other it only spawns a new one and then it does not spawn more. Its because I decativated the gameobject holding the spawner script. But I cant find a good way to actiate it again.

     

    Does someone have a good idea?

     

    Thanks for ever answer

     

    Here is a Screenshot of the block and components:

    Please login or register to see this attachment.


  2. Hi everyone, I have a door that opens and its  rotated then, so the problem is there that the boxcollider which defines the area where you can open the door, moves to. So how can I make that this boxcollider does not move when the door moves?

     

    Thanks


  3. Hi everyone, I have a script for open and close  a door and I want to make that the sound close have a delay of 1 second. Does anyone know how i can do this ?

    this is my function for closing the door:

    Please login or register to see this code.

  4. Hi everyone, I have a script that play randomly audio and now i want a delay after every sound. I tried using waitforseconds function but i cant get it to work.

    this is the script:

    Please login or register to see this code.

    Thanks


  5. Hi everyone, I have a problem with making a door. I know how to create a animation for it (I made an empty gameobject and used it as a rotation point). But It never works correctly, I tried so many diffrent scripts an tutorials but it never works. So, does someone know a easy script for open and closing a door?

     

    Thanks


  6. Hi everyone, i have a problem with a script that should play sounds in a random order. But I cant hear anything when I test it. This is the script: 

    Please login or register to see this code.

    I attached the script to a empty gameobject and addet the sounds and a audio source to the object. Does anyone know how to fix this? (my player has a audio listener)

     

    thanks


  7. Hi everyone, so I bought Please login or register to see this link. yesterday and its awesome. But in front of my camera is a white line. Does anyone have an idea why this line is there ? Please login or register to see this attachment.


  8. I tried this and I really cant get it to work :(

    This is the code I came out with:

    Please login or register to see this code.

    Does it need this end ?

    Please login or register to see this code.

    I tried to do the ending like this but then it doesnt get the style. its just really small and red then.


  9. Hi everyone,

    My GUI is on my android phone really small and on a other phone much bigger. I know its because of the resolution and I already read many forum post about this problem but none of the solutions workt for me. So I want that the GUI is on every phone the same size. But I really have no idea how to do this. This is my script that creates the GUI:

    Please login or register to see this code.

  10. Hi everyone,

    Im sorry if i ask to many questions but im a noob at unity :d . So I have this script:

    Please login or register to see this code.

    And its working perfect but now : this script is on a object in the scene 1 now i load scene 2 and its still there but now if I die in the scene 2 and press replay so it loads the scene again the object is gone. How can I fix that? Im thinking about a loop or something will work so i tried this:

    Please login or register to see this code.

    but i dont know what to write in the condition of the while.

×
×
  • Create New...