Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
-1
Question by zTizzle · Nov 21, 2012 at 01:21 AM · pages

Need help with showing slender static?

Hi, I am trying to make a Slender game, and I have this script to show static on the screen when you look at the Slenderman for too long, but when it displays it, it only shows it on the lower half of the screen and if I look up and down, I cannot see it. Here is what I mean:

http://youtu.be/DNJTv24zZ7g

Here is the script for the static:

 // script has now been removed

Any ideas? Any help is appreciated. Thanks!


The script has now been removed. To future readers, follow the instructions as given by sparkzbarca and No1Survivalist :

  • Use a plane. Position and scale it to cover the front of the camera

  • remove the collider

  • add your material

  • give the material a shader that uses the alpha of the color in the material (eg a transparent shader, a shader with transparency)

  • adjust the alpha through script

  • wham bam, done and done =]

.

 var newAlpha : float = 1.0 - (health / startingHealth);
 renderer.material.color.a = newAlpha;

alucardj


Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AwsomeRod · Dec 08, 2012 at 05:08 PM 0
Share

How did you get the static, did u get the sound 2, if so were.... I need both

avatar image AwsomeRod · Dec 08, 2012 at 05:09 PM 0
Share

Yeah I also got this script but didn't work, error... Idk y, ideas anyone????

avatar image AlucardJay · Mar 02, 2013 at 12:44 AM 0
Share

New Forum Thread. This is now the only place I shall write answers to problems with my scripts : http://forum.unity3d.com/threads/172415-Slender-Guide-by-alucardj

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by AlucardJay · Nov 21, 2012 at 04:14 AM

This is my script. It creates a mesh that extends to the full view fustrum. Basically it displays an image for the whole screen, and the alpha can be controlled. To make it work, you must make the script object a child of the camera ... simple.

As I said where you saw this script, for all questions regarding the guide, ask on the question I posted the guide

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Nov 21, 2012 at 04:18 AM 0
Share

I also bet you never upvoted my answer where you found this :/

avatar image AlucardJay · Nov 21, 2012 at 04:39 AM 0
Share

Just to say I have now removed the packages for my guide. Reasons : no thanks except from 2 people total and 5 votes over 2 answers; when specifically stating don't ask new questions but post problems on those questions, there have been at least 20 questions all using my scripts, all by people that don't understand and just want their game written for them;

I am extremely disappointed. and sorry for the few people that actually read the guide, absorbed the script and learned from it, then expanded my guide into their own projects rather than copy-paste this doesn't work . Hope you feel lucky to be the last one with the packages. I bet I get more comments asking me to put them back up than comments saying thanks.

avatar image AlucardJay · Nov 21, 2012 at 04:49 AM 0
Share

TO future readers who are lucky enough to stumble across this, the answer to this question has already been given in a comment by me (AlucardJ) to Peanut97 in the comments where all questions related to this guide should be posted : http://answers.unity3d.com/questions/296068/how-to-make-a-slender-man-follow-character-script.html

$$anonymous$$y comment :

Yeah I wrote that script for this, but it pretty cool so might use it for other full-screen effects (blood splats, rain). I asked a question on how to use an unlit shader (so the whole effect is bright, not just where the flashlight hits it), the answer and shader can be found here : http://answers.unity3d.com/questions/345917/correct-unlit-shader-to-use-when-fading-a-material.html Edit : the shader is now in the V2 package =]

Now to your question. The static should be working already, just look at the $$anonymous$$an.

EDIT : I just realized I left some code in that script from testing that shouldn't be there! In the Update, delete if(Input.Get$$anonymous$$ouseButtonDown() and everything in {}, just leave SetAlpha(); and ScrollUVs(); (I have just fixed the script in the package for future people, sorry!)

If you want to use the script for your self, follow these steps.

 create a new script, copy everything from static into it.
 now in the new script, delete var theEnemy : EnemyScript;
 in function Start, delete everything except Startup();
 in function SetAlpha() , delete the line theAlpha = ( 100.0 - theEnemy.health ) * 0.01;

in a new scene, create an empty gameObject, attach the new edited static script, and then make the gameObject the child of the camera (you need to do this so the effect follows the camera and is always seen as full-screen.

Add a material to the empty gameObject.

When you hit play, the mesh wont be visible. In the inspector, change the value for theAlpha to between 0 and 1 (while the scene is playing. You should see the material being faded in and out.

avatar image AwsomeRod · Dec 06, 2012 at 03:32 AM 0
Share

I DONT GET HOW TO DO IT?

avatar image AlucardJay · Dec 06, 2012 at 03:48 AM 1
Share

Here are some links I strongly suggest to all new users :

Start at the bottom and work up : http://www.unity3dstudent.com/category/modules/essential-skills/

Start at the bottom and work up : http://www.unity3dstudent.com/category/modules/beginner/

this is the YouTube link for the above as one playlist : http://www.youtube.com/watch?v=-oXYHNSmTxg&list=PL27B696FB515608D2&feature=plcp

Character controller and terrain : http://cgcookie.com/unity/2011/12/05/introduction-to-character-controllers/

That is good to get started. Then start with a small tutorial, this is a simple 2D space shooter : http://www.unityjumpstart.com/ProofOfConcept_1/ : click on the videos part1.mp4 part2,3,4 =]

I just found another by our own Eric : http://wiki.unity3d.com/index.php?title=2DShooter : http://forum.unity3d.com/threads/7883-2D-shooter-tutorial

By then you should be getting the hang of things and starting to have ideas of your own. When you decide what kind of game you want to make, then look at each part you'll need. For example, if you want to make some terrain then walk around it with a character : http://cgcookie.com/unity/2011/12/05/introduction-to-character-controllers/

Here's another on the same 'site but I havn't checked the difficulty : http://cgcookie.com/unity/2012/02/24/game-planning-lunar-lander-01/

Basically then just search for tutorials, there are many out there, either written or on youtube.

the Unity Wiki tutorials : http://wiki.unity3d.com/index.php/Tutorials

A big list of tutorials : http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html

Helpful page with information on using Built-In Arrays and Lists (you'll need this later!) : http://www.unifycommunity.com/wiki/index.php?title=Which_$$anonymous$$ind_Of_Array_Or_Collection_Should_I_Use?

The unity wiki link above is very handy with lots of scripts and shaders too (just check out all the links down the left, and the tabs along the top : http://wiki.unity3d.com/index.php/Scripts )

http://answers.unity3d.com/questions/148211/list-of-frequently-asked-beginners-questions.html

http://forum.unity3d.com/threads/132628-How-to-help-the-Absolute-Beginner

If you know what kind of game you want to make, edit your question and write there what you are thinking of, then there may be a tutorial out there for that!

But just be aware, you will do lots of typing, deleting, typing, bashing head on desk, being really happy when it works and you understand how and why. I hope this helps, Happy Coding =]

Show more comments
avatar image
1

Answer by sparkzbarca · Nov 21, 2012 at 04:06 AM

too complicated :P

much easier way to do this.

attach the static image to the camera (make it a child) in the scene so it completely shows up in front of the camera at all times.

Now enable and disable this object depending on whether you can see slenderman.

mark as answered :)

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AwsomeRod · Dec 06, 2012 at 03:42 AM 0
Share

how do u make it that if you see slender it happens

avatar image corriedotdev · Mar 26, 2013 at 05:31 PM 0
Share

by using my code, hes right. Its really not complicated. $$anonymous$$inda simplest way of doing it... hits collider hits collider, enables gui texture..

avatar image AlucardJay · Mar 26, 2013 at 05:47 PM 0
Share

Absolutely. I'm even going to upvote both your answers! It's funny, this is the technique I have fallen back to when I demonstrated it in my new video series. I was proud of my script for its technical ability, but really it is dangerous in the wrong hands.

  • Use a plane. Position and scale it to cover the front of the camera

  • remove the collider

  • add your material

  • give it a shader that uses the alpha of the color in the material (eg a transparent shader, a shader with transparency)

  • adjust the alpha through script

  • wham bam, done and done =]

.

 var newAlpha : float = 1.0 - (health / startingHealth);
 renderer.material.color.a = newAlpha;
avatar image corriedotdev · Mar 26, 2013 at 06:12 PM 0
Share

what ever works best for you buddy!

avatar image
1

Answer by corriedotdev · Mar 24, 2013 at 02:14 PM

Ok so i think this is probably the best way to do it personally. On your fps controller make a collider, a cube will do. Extend this out about 15 meters from you fps character. Make the mesh invisible. Then attach it as a child of the camera so it moves where you look. Add the script below to a cube collider which is around slender, again make it invisible and a child of slender. Attach the cotect gameobjects in the inspector menu to the script.

Now you need a gui texture. So get some static put it on phtotshop and turn opacity down a little bit so you can see throug hit a little, allowing you to see slender. This is the guitexture you want to use in the script.

So basically this is the idea

  1. Collider on fps controller hits the collider on slender

  2. plays the gui texture // for how many seconds, change in code

If you want sound attach a audio source to the collider on slender and the following script. SO this sound will play when they collide. i.e your looking at slender

Static image

also disable the gui texture and on the fps walker in inspector tag player

 var Static : GUITexture;
  
 function OnTriggerEnter(hit : Collider){
     if(hit.gameObject.tag == "Player")
         {
             YourTexture.enabled = true; 
             yield WaitForSeconds(0.5);
             YourTexture.enabled = false;
         }
 }


Sound script

make sound static sound in inspector remember to attach audio source to the collider

 var Sound : AudioClip;
 
 function OnTriggerEnter(){
 audio.PlayOneShot(Sound);
 }



If you get stuck ill try help but its pretty self explanatory if you have some basic unity skills

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

How could I create a book? 6 Answers

I made a better shader how do i fix[add _Shadow Strength]help???>Sorry that im asking for to much 1 Answer

Help with Slender Pick Up Pages Script? 1 Answer

Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges