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
0
Question by kickasskane2 · Nov 03, 2012 at 03:45 PM · audiofollownoise

Slender death and look sound script

Hi, I am making a game like Slender and i really need help! I have the script to make it so that the slenderman is following me, but I really need help making it play a sound when the player can see him and when staring at him noise appears on your screen and when its really intense it opens a new scene. Please help.

By the way, heres my follow script.

var target : Transform; //the enemy's target var moveSpeed = 3; //move speed var stopSpeed = 0; var rotationSpeed = 3; //speed of turning

var myTransform : Transform; //current transform data of this enemy

function Awake() { myTransform = transform; //cache transform data for easy access/preformance }

function Start() { target = GameObject.FindWithTag("Player").transform; //target the player

}

function Update () {

 var Speed = moveSpeed;

 if (renderer.isVisible)
 {
 myTransform.position += myTransform.forward * stopSpeed * Time.deltaTime;
 }

 if(!renderer.isVisible)
 {
 myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
 }
 //rotate to look at the player
 myTransform.rotation = Quaternion.Slerp(myTransform.rotation,
 Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);



}

I'm confused with the MyTransform because no matter what he doesnt follow he keeps getting closer but if I move he keeps going where I was not where i am. Please help

Thankyou.

Comment
Add comment · Show 4
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 Kiloblargh · Nov 03, 2012 at 04:59 PM 0
Share

Why are so many people trying to clone Slender now? Before, it was $$anonymous$$inecraft...

avatar image AlucardJay · Nov 04, 2012 at 01:36 AM 0
Share

You may want to check my answer and comments here : http://answers.unity3d.com/questions/321749/how-do-you-pick-up-pages-like-in-slender.html

avatar image Loius · Nov 04, 2012 at 02:39 AM 2
Share

"Back in my day" it was Asteroids, Pong, or Breakout. Nowadays it seems to be whatever one of the 'Big Names' on Youtube plays. Slender and $$anonymous$$inecraft -look- simple, so they're easy targets.

avatar image AlucardJay · Nov 10, 2012 at 01:23 PM 0
Share

http://answers.unity3d.com/questions/321749/how-do-you-pick-up-pages-like-in-slender.html

Slender Guide Version 2

While I have finished writing the code, I don't have time to write a full guide explaining the steps taken and what I have coded in. I am changing the code in the below guide so people can still make their own rather than just using my package, and I really hope people write their own ins$$anonymous$$d of just using my package.

Slender Guide Version 2 (I can only upload 5$$anonymous$$B, so the project is very basic, but working!) : http://www.alucardj.net16.net/unityanswers/SlenderGuideV2-scene0.unitypackage

Fixed problems from Version 1 :

picking up papers in the editor - there were some issues with using LockCursor while running in the editor, hopefully these have been compensated for, recommend use the E key to pick up papers while running in the editor (but mouse still works). some movement issues - I had no problem, but it was brought up so I have tweaked the movement script.

New features :

The more papers picked up, the $$anonymous$$an follows closer. Audio : when picking up paper, when the $$anonymous$$an is first sighted, running and walking footsteps with adjustable audio gap between steps. Custom mesh with fading alpha fullscreen static effect.

And don't forget the awesome original flickering flashlight!

Here is the video link for the obstacle avoidance raycast : http://vimeo.com/9304844

Comments and feedback are welcome, as long as you have something more to say than just it doesn't work. The package proves it does. And please don't ask new questions, post comments here. If this keeps going or more people have requests, I might have to start a Unity Forum page.

Enjoy =]

0 Replies

· Add your reply
  • Sort: 

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

12 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

Related Questions

Noise cancelling 0 Answers

Camera rotation around player while following. 6 Answers

Audio Noise Removal 0 Answers

sound (audio) makes noise only in timeline 2 Answers

Audio doesn't work in editor? 6 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