Search Unity

Slender Guide by alucardj

Discussion in 'Scripting' started by AlucardJay, Mar 2, 2013.

Thread Status:
Not open for further replies.
  1. Steve Cogbill

    Steve Cogbill

    Joined:
    Apr 23, 2013
    Posts:
    19
    All problems fixed! Thanks so much Jay! Everything is great now!
    Now I just need to publish it
     
  2. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Do you mind telling me where you got your Slender Man model? I really need to find one that looks terrifying. :D
     
    Last edited: May 14, 2013
  3. Steve Cogbill

    Steve Cogbill

    Joined:
    Apr 23, 2013
    Posts:
    19
    I made my own in Maya 2013. It took like 10 minutes. Just scale and move shapes to make the body and head and arms and legs and then add materials in Unity. Worked quite well for me.
     
  4. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    If it isn't too much to ask, can you help bring down my Slender Man model's arms down? His model has his arms sticking out like most other models, but his arms are connected to the entire body, they're not separate limbs.... I tried using Blender but it is getting too difficult at the moment....

    The download link is here http://www.mediafire.com/?zovp7dbv7ncpn0e

    I would really appreciate it if you took 5 minutes, at the most, of your time to help bring down his arms. I tried to rotate his arms in edit mode, didn't work cause his body rotated with his arms, and many other problems occurred... :(
     
  5. Pdoepke

    Pdoepke

    Joined:
    May 15, 2013
    Posts:
    1
    Hello alucardj, before I begin I must say I am a huge fan of your work. I'm currently in development of a survial-horror style game myself and...well to be honest I suck at coding lol. I have bungled my way through creating a few scripts for my game but they are just not up to par really. I have been attempting to locate the scripts you have so graciously uploaded for us. However your link is not working for me. Would you happen to have another way for me to get my hands on your script packages?
     
  6. Steve Cogbill

    Steve Cogbill

    Joined:
    Apr 23, 2013
    Posts:
    19
    I couldn't open your file. Here is a download link to mine, you can use it if you want to.
    http://www.mediafire.com/?wf7dkz75vaftt66
    This is my first time exporting a model and uploading it for people to download so I hope it works
     
  7. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Thanks for letting me use your model! :D

    I also re-uploaded my model into a Unity Package. Sorry for the earlier link, it was an .obj file within a .RAR archive.

    Link:
    http://www.mediafire.com/?f8dcablm27ub0bi
     
  8. Steve Cogbill

    Steve Cogbill

    Joined:
    Apr 23, 2013
    Posts:
    19
    You're welcome. I hope it works out for you!
     
  9. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
  10. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Haha, that's a funny video. :p
     
  11. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
  12. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    Thank you for that "WONDERFUL" model.

    Previously, I used a skeleton for Slender. My game is very cool. It works fine and Slender follows too. I made the textures for the pages too. I have 8 pages now. What I need to work on is to make it really scary. In the moment, when you see Slender, the Static effect pops up.... and nothing more. I have edited the Headbobber script from Unify Community and made the Flashlight bob. All in all, my game is good. AND.......

    I am only 12 years old!
     
  13. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    joachimschmidt:
    Your welcome man, and way to go for making a game at such a young age!

    Alucardj:
    It's been a while since I was last on this page. I have BETA tested my game many times, edited things, and had many friends at school try it out and give me their thoughts before Summer Break. Two concerns are:
    1) My game is a bit laggy, but I am currently fixing that and have found substantial improvements.

    2) Now many people just say never look behind you and you'll never die, which is the case for my game at the moment. Slender Man is terrifying when you turn around and he's RIGHT BEHIND you, with the amazing Slender: The Arrival SFX.

    My point is, your teleporting script is working great, as far as Slender Man teleporting left or right of the player's transform. I really want to add the fear of having Slender Man teleporting in FRONT of the player as well, like Mark Hadley's Slender games, so the player is never safe if they never look behind them.

    Can you help me out with this Alucardj? :)
     
    Last edited: Jun 5, 2013
  14. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    I have the same problem.

    For teleporting, I guess you should do this:

    Code (csharp):
    1.  
    2. // Do 3 random things
    3. if ( randomnum == 3 )
    4. {
    5.  transform.x = //something
    6. }
    7.  
     
  15. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    For doing it scarier, I think some kind of "wild animals" would be good. They just hop out of a bush, which would be great for scarifying Slender. Can anybody give me a hint for a Script (I am using javascript)
     
  16. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Thanks for helping out joachimschmidt. For your wild animal scipt, I have no clue, sorry. :p

    Also, I found out the difference between black tie Slender Man, and red tie Slender Man. Black is when he's stalking or watching you. Red is when Slender Man is going to kill you. I like how the red tie popped out, so I altered the texture for Slender Man to give him a red tie! Looks awesome! :D
     
  17. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    I was inspired by the Particle Effect Video of alucardj. Is it passible to make the same on raining?
     
  18. kingsleyfs

    kingsleyfs

    Joined:
    Jul 5, 2012
    Posts:
    14
    Hi Jay,

    Just started viewing some of your videos, they are brilliant, thank you so much.

    Am currently working my way (slowly) through the photon multiplayer ones, is there a seperate thread for those anywhere on the forum ?
    In particular looking for a list, showing links to videos (order to watch) and any other relevant info. eg missing ones.

    I tend to move slowly over 1 hurdle and onto the next, really appreciate you working through the .js on these and comparing back to C# where different, as a learning tool, and with your generosity, I can not say enough. If you are in Sydney, be happy to buy you a drink or more when (with luck) we meet.

    As a "noob" as you used to call yourself, I am very impressed with your thinking and approach. Just wish I was a bit younger and could keep up. :)
     
    Last edited: Jun 10, 2013
  19. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    YES! I did it. I played with the variables and finally I got rain!
     
  20. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    Now I added Batteries to pick up. I am working on "MedicKits" to increase Health. I got some lizard and snake models and started doing an wild animal script.


    Halo555:

    Here the more detailed version of front teleporting:

    Code (csharp):
    1.  
    2. Var Random : int = Random.Range(0,3
    3. if ( Random == 3 )
    4. {
    5. // new teleporting
    6. }
    7. Else
    8. {
    9. //old teleporting
    10. }
    11.  
     
    Last edited: Jun 28, 2013
  21. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Thanks joachimschmidt!
     
    Last edited: Jul 6, 2013
  22. PrinceOfUnity

    PrinceOfUnity

    Joined:
    Jun 16, 2013
    Posts:
    4
    The screen goes blank and does not static moment I look slender .The World Very Foggy :) Google Translate...

    Please Help Me :(
     
  23. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Hey alucardj, it's me again. I was wondering if I can get some help on having the pages spawn at different locations.

    I created 10 to 12 empty gameObjects and place them at selected locations. I tagged all of them as "SpawnPoint" and tagged all 8 pages as "SpawnPoint" as well.

    I'm not sure how to put the script together.... I've recently asked this question and got an answer that sounds right. Here's the page:

    http://answers.unity3d.com/questions/488145/random-spawn-location-with-tags.html#comment-492131

    I would really appreciate it if you could help me with this one last thing to bring some replay value to my game. Possibly in the future you can even make a video of this for your guide later on.
     
    Last edited: Jul 17, 2013
  24. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    Here's a script to spawn the papers at random locations. Drag and drop all your spawn points into the spawnPoints array. Then make prefabs of all your papers, remove them from the scene and drag the prefabs into the paperPrefabs array.

    Code (csharp):
    1.  
    2. #pragma strict
    3. import System.Collections.Generic; // to use List
    4.  
    5. public var spawnPoints : Transform[];
    6. public var paperPrefabs : Transform[];
    7.  
    8. private var availableSpawnPointsList : List.< Transform >;
    9. private var spawnList : List.< Transform >;
    10.  
    11.  
    12. function Start()
    13. {
    14.     ChooseRandomSpawnPoints();
    15.     SpawnPapers();
    16. }
    17.  
    18.  
    19. function ChooseRandomSpawnPoints()
    20. {
    21.     var i : int = 0;
    22.    
    23.     availableSpawnPointsList = new List.< Transform >();
    24.     spawnList = new List.< Transform >();
    25.    
    26.     // add all spawn points to a list
    27.     for ( i = 0; i < spawnPoints.Length; i ++ )
    28.     {
    29.         availableSpawnPointsList.Add( spawnPoints[i] );
    30.     }
    31.    
    32.     // choose a different random position for each paper prefab
    33.     for ( i = 0; i < paperPrefabs.Length; i ++ )
    34.     {
    35.         var rndPos : int = Random.Range( 0, availableSpawnPointsList.Count );
    36.        
    37.         spawnList.Add( availableSpawnPointsList[rndPos] ); // add this to the spawn point list
    38.        
    39.         availableSpawnPointsList.RemoveAt( rndPos ); // remove this from the available points list
    40.     }
    41.    
    42. }
    43.  
    44.  
    45. function SpawnPapers()
    46. {
    47.     // spawn paper at each location
    48.     for ( var i : int = 0; i < paperPrefabs.Length; i ++ )
    49.     {
    50.         var paper : Transform = Instantiate( paperPrefabs[i], spawnList[i].position, spawnList[i].rotation );paper.name = "Paper";
    51.         paper.name = "Paper";
    52.     }
    53. }
    54.  
     
    Last edited: Jul 19, 2013
  25. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    Not sure what the problem could be, need a better description or screenshot.

    Make sure the static plane object is set up correctly.
    On the material :
    check the shader is Unlit/AlphaSelfIllumWithFade
    check the texture is your static texture

    check you have the player health script correct. (there is a link to the downloads in my first post)

    $StaticScreenEffect.jpg
     
  26. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    If you want 360' teleporting, you can use this :

    Code (csharp):
    1.  
    2. function TeleportEnemy() // 360' teleporting
    3. {
    4.     CheckIfVisible();
    5.    
    6.     if ( !isVisible )
    7.     {
    8.         // choose a random angle
    9.         var angle : Quaternion = Quaternion.Euler( 0.0, Random.Range( 0.0, 359.9 ), 0.0 );
    10.        
    11.         var terrainPosCheck : Vector3 = angle * target.forward;
    12.        
    13.         terrainPosCheck *= minimumRange;
    14.         terrainPosCheck += target.position;
    15.         terrainPosCheck.y = 5000.0;
    16.        
    17.         // raycast to check if position on the terrain is free
    18.         var hit : RaycastHit;
    19.        
    20.         if ( Physics.Raycast( terrainPosCheck, -Vector3.up, hit, Mathf.Infinity ) )
    21.         {
    22.             if ( hit.collider.gameObject.name == "Terrain" )
    23.             {
    24.                 myTransform.position = hit.point + new Vector3( 0, 0.25, 0 );
    25.             }
    26.         }
    27.     }
    28. }
    29.  
     
  27. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
  28. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Wow Alucardj, thank you VERY MUCH!! I can't tell you how happy I am right now! I also just passed my driving permit test yesterday so I'm pretty happy!

    Can you explain what the 360° teleporting does compare to your original teleport one? Is it where Slender now teleports from any angle from you, instead of only left or right?

    By the way, I've seen and played Kraven Manor, a great horror game! I couldn't believe it when I first played it!
     
    Last edited: Jul 17, 2013
  29. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    what the 360° teleporting does : So looking down on top of the player, an angle is randomly generated (only on the Y axis). Looking down, this is a random point on a circle around the player.

    Code (csharp):
    1. var angle : Quaternion = Quaternion.Euler( 0.0, Random.Range( 0.0, 359.9 ), 0.0 );
    To get that angle as a directional vector, you can multiply a Quaternion by a Vector3, this returns a directional Vector3 in relation to the targets forward.

    Code (csharp):
    1. var terrainPosCheck : Vector3 = angle * target.forward; // this returns a directional Vector3
    Then some calculations to find a world-space vector, that is a set distance from the target :

    Code (csharp):
    1.  
    2. terrainPosCheck *= minimumRange; // make it the correct distance away from the target
    3. terrainPosCheck += target.position; // make it in world-space, relative to the target
    4. terrainPosCheck.y = 5000.0; // the same as before, to raycast from way above the terrain straight down
    5.  
     
  30. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    Oh, and Congratulations !

    What country should people stay in their homes, now you are loose on the streets ?! (just joking, stay safe and have fun).
     
  31. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Haha, thanks alucardj! :D

    Also, thanks for taking the extra mile to update your teleporting script for Slender and for explaining it to me! Your page spawn script works wonderfully and I couldn't be any happier! Now my game has much more replay value with 10 to 14 spawn points around the map instead of only 8 locations! :p
     
    Last edited: Jul 19, 2013
  32. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Crap, I ran into another problem. I can't seem to collect the pages anymore for some reason... If I was to place the prefabed paper normally into the hierarchy, I can collect it. But when the paper are all cloned from the script around the map, I can't pick them up.... Is it because of the name "Paper (Clone)" or some other reason? :(
     
    Last edited: Jul 19, 2013
  33. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    HAHA! Never mind! Since the pages are named "Paper(Clone)" on the hierarchy when they spawn, I adjusted your script for it to destroy objects with the name "Paper(Clone)", instead of "Paper". :D
     
  34. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    Sorry, I didn't test that script. This would have been solved by naming the object when it is instantiated. I have fixed the above script.

    Code (csharp):
    1.  
    2. function SpawnPapers()
    3. {
    4.     // spawn paper at each location
    5.     for ( var i : int = 0; i < paperPrefabs.Length; i ++ )
    6.     {
    7.         var paper : Transform = Instantiate( paperPrefabs[i], spawnList[i].position, spawnList[i].rotation );
    8.         paper.name = "Paper";
    9.     }
    10. }
    11.  
     
  35. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Thanks for fixing it Alucardj! Your forum is the best for learning how to make a Slender game, which helps us learn more in-depth of Unity and creating other games! :mrgreen:
     
  36. PrinceOfUnity

    PrinceOfUnity

    Joined:
    Jun 16, 2013
    Posts:
    4
    Thanks alucardj...
     
  37. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    Thanks too!

    BTW Halo555:
    Where did you get your Slender: The Arrival SFX from?
     
    Last edited: Jul 31, 2013
  38. AlucardJay

    AlucardJay

    Joined:
    May 28, 2012
    Posts:
    328
    I was curious about the audio as well. There was an audio question on UA where someone mentioned the author had granted free license to the Slender audio, you just had to credit him. Does anyone know?
     
  39. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    I got my audio off ripping it in gameplay videos, when there wasn't any other noise in the background interfering with the SFX. It would be really nice if the real sound effects were out there now! :D

    I have a question for you alucardj:

    I have just gotten the Slender: The Arrival model that was ripped (http://www.youtube.com/watch?v=wTjH3j1cTWw) and he seems to always fall through the ground when he teleports.... I noticed that whenever I place him in the game, his body is always half-way through the terrain. I tried adjusting the collider with no success, and I even brought down everything in the game for him to stand on.

    $Untitled.jpg

    I was wondering if in the NPCMovement script, we can edit it to where whenever he teleports, he'll teleport over the ground for precautions. Really sucks to have such an amazing model not work over something so stupid coming from the model itself! :(
     
    Last edited: Aug 4, 2013
  40. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    NEVERMIND! I have found a solution. I downloaded Blender, imported the 3DS Max .OBJ file into Blender, and the model is HUMONGOUS! But I realized that the model is half-way through the default plane, so I lifted up the model (A LOT) to where his ginormous shoes were above the default plane.

    After I exported the model into a .OBJ file, I put it in Unity, scaled the model from 1 to 0.01 (THAT'S HOW BIG IT IS!!!), and when I place it on the Terrain normally, it doesn't sink through! YAY!!! ;)
     
  41. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    But I do have a minor problem.

    Some reviews for my game are asking if I can have it to where if you try to get near Slenderman, you will get caught (a.k.a lose your sanity instantly or quicker). Some people dislike that they can sometimes walk all the way to Slenderman and give him a hug and get away with it.

    So I need some help with where if you are trying to walk closer to Slenderman, you'll die A LOT quicker or get "caught" from him if you get near him.
     
    Last edited: Aug 8, 2013
  42. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    I have a question.

    Is it possible to rotate the camera on its X-Axis to make it "distort" when Slender is near?
     
  43. joachimschmidt

    joachimschmidt

    Joined:
    Apr 29, 2013
    Posts:
    10
    Here's a snapshot of my game:
    $Capture.JPG
    I based it on Slender: The Arrival, that's why there are REC and the Battery.
     
  44. Halo500

    Halo500

    Joined:
    Apr 24, 2013
    Posts:
    37
    Wow, looks really good! I'm trying to imitate "The Arrival's" Camera screen as well, but I decided not to at the end. :p
     
  45. nownz

    nownz

    Joined:
    Aug 13, 2013
    Posts:
    14
    how to die by looking at slender?
     
  46. addy253

    addy253

    Joined:
    Jul 31, 2013
    Posts:
    5
    Im not sure but they say you lose your sanity and become a proxy so it would be good to see the game through a proxy's eyes
     
  47. nownz

    nownz

    Joined:
    Aug 13, 2013
    Posts:
    14
    i dont understand i am new at unity xD
     
  48. addy253

    addy253

    Joined:
    Jul 31, 2013
    Posts:
    5
    Yea its hard to get the jist of things I'm new too I've been on unity for past 5 weeks I'm making a slender game for Google play I'm following alucardj's guide it's straight forward just watch it once then follow on second time ul get there
     
  49. nownz

    nownz

    Joined:
    Aug 13, 2013
    Posts:
    14
    whats the number of the video that explains .. . how to die by looking at slender?
     
  50. addy253

    addy253

    Joined:
    Jul 31, 2013
    Posts:
    5
    *54-60 make sure u follow the guide from scratch
     
Thread Status:
Not open for further replies.